From patchwork Sun May 29 21:53:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 68808 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1113676qge; Sun, 29 May 2016 14:56:54 -0700 (PDT) X-Received: by 10.98.30.133 with SMTP id e127mr1360279pfe.112.1464559014928; Sun, 29 May 2016 14:56:54 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7si45798376paw.13.2016.05.29.14.56.54; Sun, 29 May 2016 14:56:54 -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 S932413AbcE2V4x (ORCPT + 1 other); Sun, 29 May 2016 17:56:53 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:37329 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753239AbcE2VyW (ORCPT ); Sun, 29 May 2016 17:54:22 -0400 Received: by mail-wm0-f54.google.com with SMTP id z87so50832752wmh.0 for ; Sun, 29 May 2016 14:54:21 -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=o7Xbh1eJBA1QQ2LihUL+bMqWwk14iLzuLW52wGYS+Ww=; b=WHSkkdNdAG/NrKYoSCtwFGMCilD8Vb1RhwegFN6bdRTbw9Vsi6MlioQoc0mHdh/Su8 GsvsfIOwFJPXZeyY5U4R2Foxlh9Exl9t09nqT5E9fjOxr47L+4BBqAMQySEMBQo7k6Gg vHRRQCbEMQGb1956NzlhbVATsiu1elc5yiNEdQPDFtMLfrBswVlqm5xYJZmswCyuRnMt 6z5f3E8G1XCB55Y9DjkIBFdMD+/Aycnm88fTm90ALElLrseQ2Yozm/uqNPbgJ/JAfFY3 QSU1ksGqRiK+fQhdvwwFlffIkgFo9FwBO+yB+OLyx4QDEcD0CMgPjNJYfws1U8dq+EVa yC4Q== 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=o7Xbh1eJBA1QQ2LihUL+bMqWwk14iLzuLW52wGYS+Ww=; b=kjq2Kfrjv2F9hkPf/Z7vQZZMp30aYxZAPCS8eDQ2jK8oaa2oflxFe4rDV+LcsxVO3T UQtxNmssWNIz+2fztimiJoi0HtAfc8gI/RnSM5H3E5QExrzmnKd3ZRjvfzBKUoSGB9f8 BXDmI0NJsYkzxlkhUGdagHCPJMNOr+oHtXwWU6u+mCippDhUt0UR2tbIGVBqLtlAwxeK mPub3sahF9lEZtitoIogiOzap0FyNpUjc9rxhSnBUeWpKUvdqRkpP9LZ9wgtMlvE+VyT kSodnNCEU7tTOmkfGXgyrSPHgfZiklivSGJrYv/PLwSS1Whv9LEK7hcyL8jqn+wx7NTk EX3g== X-Gm-Message-State: ALyK8tIMOY8C8SZGEm1yNrkdpmFr4bX8VfemY3yPsh+9QPac4gJcDPVGg9zs8eMFjwc998h5 X-Received: by 10.28.181.148 with SMTP id e142mr7467497wmf.38.1464558861006; Sun, 29 May 2016 14:54:21 -0700 (PDT) Received: from bgdev-debian.lan (jua06-1-82-242-157-225.fbx.proxad.net. [82.242.157.225]) by smtp.gmail.com with ESMTPSA id a128sm20490367wme.16.2016.05.29.14.54.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 May 2016 14:54:20 -0700 (PDT) From: Bartosz Golaszewski To: Wolfram Sang , linux-i2c , LKML , Andrew Lunn , Srinivas Kandagatla , Maxime Ripard , GregKH Cc: Bartosz Golaszewski Subject: [PATCH 08/14] eeprom: at24: platform_data: use BIT() macro Date: Sun, 29 May 2016 23:53:46 +0200 Message-Id: <1464558832-2262-9-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1464558832-2262-1-git-send-email-bgolaszewski@baylibre.com> References: <1464558832-2262-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 dc9a13e..d5e9024 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;