From patchwork Mon Jun 6 08:48:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 69377 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp1376364qgf; Mon, 6 Jun 2016 01:52:47 -0700 (PDT) X-Received: by 10.66.66.234 with SMTP id i10mr23699158pat.114.1465203166494; Mon, 06 Jun 2016 01:52:46 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lw5si25400063pab.156.2016.06.06.01.52.46; Mon, 06 Jun 2016 01:52:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751561AbcFFIwn (ORCPT + 1 other); Mon, 6 Jun 2016 04:52:43 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36719 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752246AbcFFItQ (ORCPT ); Mon, 6 Jun 2016 04:49:16 -0400 Received: by mail-wm0-f46.google.com with SMTP id n184so81006169wmn.1 for ; Mon, 06 Jun 2016 01:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=o0/BvEJe0ej6PP2oiGBnigOcc/2l+K4qp6M4h0C+RpE=; b=w8Ibk79xG60VVDhrdAXoudEyydkNijcgmflrGnXegT1srUZoaFsYYoJ6ilT59IQZS4 lWmVisDJBj8HKzmhpQACqoLJOdG/8FS7QqUN7sza8SQh8UwaWqzztaL1z4kmJ/63EdnK uldowUupIOpciVosMeijk+F3Qt5I3lFD4LW3HbiUP7PJtRZKb5rYiuvYAqacbILgOz8U MHaUhY9wMKTgMHvqVbPXxhWJLBIrtHOnus3u7zTsjvVp7im3t2l5SgcEYiSWglwLT0QZ W90WSViKTJ+rZvdXPi5qzyjD/l3OIgrqO0nQxSeWr0qp/7ndoEXi347b7pgd7CFPyzYi kKQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=o0/BvEJe0ej6PP2oiGBnigOcc/2l+K4qp6M4h0C+RpE=; b=USlIYJEpBSo6IThG9WdlsomR8R6XYP6pMKaYGbSgfHnp3c9R0+cLlIQ2YPCY1eJP4G 5gItHpIUcRpmU+CWdhA/9aNGVHXHCkfOFRBH/SOzLz4qHDqIOj0wO3OYMQdR9GTcvonN Gg79i1vEP46FR/Ol2MOTACmgwS9PeGwr8l9vs2xhm//9mJ02o7TELZGt0cAjVtnuqtaw nsXdYrlQBAYIuuSfbCeZd3AIzzDDJjje1UhLRr/SaC/C/h0RJ9OKnhYncI4hOrkXtVsg X551uFuLiHlniPXXoOOOeENhYUsbWqwo0aw4bZC49WDNUH/dYmZZEyN/92zbfa4CPAHU 16+g== X-Gm-Message-State: ALyK8tJIo649iiyPl+jQF7WhxD7+lhmE489HiWmpefIOTSSC0VB5OQa0OBaqUw2VZtVy7JV5 X-Received: by 10.28.104.5 with SMTP id d5mr10988781wmc.82.1465202954627; Mon, 06 Jun 2016 01:49:14 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id dd7sm19090384wjb.22.2016.06.06.01.49.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jun 2016 01:49:14 -0700 (PDT) From: Bartosz Golaszewski To: Wolfram Sang , linux-i2c , LKML , Andrew Lunn , Srinivas Kandagatla , Maxime Ripard , GregKH Cc: Bartosz Golaszewski Subject: [RESEND PATCH 08/14] eeprom: at24: platform_data: use BIT() macro Date: Mon, 6 Jun 2016 10:48:50 +0200 Message-Id: <1465202936-16832-9-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1465202936-16832-1-git-send-email-bgolaszewski@baylibre.com> References: <1465202936-16832-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Use BIT() macro to replace the 0xXX constants in platform_data flags definitions. Signed-off-by: Bartosz Golaszewski --- include/linux/platform_data/at24.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/platform_data/at24.h b/include/linux/platform_data/at24.h index be830b1..fcfdfe3 100644 --- a/include/linux/platform_data/at24.h +++ b/include/linux/platform_data/at24.h @@ -10,6 +10,7 @@ #include #include +#include /** * struct at24_platform_data - data to set up at24 (generic eeprom) driver @@ -43,10 +44,10 @@ struct at24_platform_data { u32 byte_len; /* size (sum of all addr) */ u16 page_size; /* for writes */ u8 flags; -#define AT24_FLAG_ADDR16 0x80 /* address pointer is 16 bit */ -#define AT24_FLAG_READONLY 0x40 /* sysfs-entry will be read-only */ -#define AT24_FLAG_IRUGO 0x20 /* sysfs-entry will be world-readable */ -#define AT24_FLAG_TAKE8ADDR 0x10 /* take always 8 addresses (24c00) */ +#define AT24_FLAG_ADDR16 BIT(7) /* address pointer is 16 bit */ +#define AT24_FLAG_READONLY BIT(6) /* sysfs-entry will be read-only */ +#define AT24_FLAG_IRUGO BIT(5) /* sysfs-entry will be world-readable */ +#define AT24_FLAG_TAKE8ADDR BIT(4) /* take always 8 addresses (24c00) */ void (*setup)(struct nvmem_device *nvmem, void *context); void *context;