From patchwork Thu Mar 24 14:45:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 64367 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp696599lbc; Thu, 24 Mar 2016 07:46:49 -0700 (PDT) X-Received: by 10.98.33.91 with SMTP id h88mr13279224pfh.54.1458830796172; Thu, 24 Mar 2016 07:46:36 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14si1987457par.197.2016.03.24.07.46.35; Thu, 24 Mar 2016 07:46:36 -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 S1753130AbcCXOqa (ORCPT + 1 other); Thu, 24 Mar 2016 10:46:30 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:34937 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbcCXOqP (ORCPT ); Thu, 24 Mar 2016 10:46:15 -0400 Received: by mail-wm0-f54.google.com with SMTP id l68so239767773wml.0 for ; Thu, 24 Mar 2016 07:46:14 -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=7D4DxzFg3OQdttP14pH7eQrizBN3FK9ZCeql30e51W4=; b=cRbDgH5Q9dcaCjK9eJu5IX1OBnkAqZdiUxc6kokmVWRTw+tNGvKRtNjUR3gUn9/czS Tes0m3DeejzCtirLexciK63ZIToETMhSLkbD+XvlTrMj8Wy+t2QTqU90dXM3561KOjIz oHJMjKWHlfWIopZqMg99SGtTliekUm0N/9+bLN13S15OeN4eNtlxSZI/J7X3aQ9jzBtm yD0GF/ugyanrMFwRwzjiNp+g048MZBbCa4PIHSaRFDrTfuDEZWRh7+DN9Du6cAhX2hYt idpLbqFeJ3fmKoFJZVZ93hHHogyHY/mCCDcWNnGAtVQuj7IMMLhgk6Ci1cz2RhBnp9KW ETyQ== 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=7D4DxzFg3OQdttP14pH7eQrizBN3FK9ZCeql30e51W4=; b=AWtLZNUh8cxMguiV0GRo41IjdTShLLT5mUs7b/HPtcYARCru8GojIX1ufN+SDI9Xq5 kzA3tPQv2vUy7DXujDMUrrmb5JqEI+OWYqsVOZuRrwjyQzTVDVEblC8Rx8OhbluEd2m+ fOrxdCUlSqaCnARE69gwT4cAj8SgqSolH5YH1SN9poXNGThkiNVY7RkTe9Bp+tRUkqvn IFq0C/oT9PK3WHYKuPzVKOKB1RpVwakbZGZUjwOJnLve0xlO5tgT1mEp10snlk3+/aVd EGOhsc3BqvtY737Oo+mn3v8S0XjwNbnRU2xJ5TNfAy7T+8TN9LMa1nyDsDKyLJmEva7e eqyA== X-Gm-Message-State: AD7BkJLk1TJbJEnAO7kMdksO9wtY+9kfXXD9haC4qBCkXdyBnowVULTvMcQYRZFXutIM2Jzx X-Received: by 10.28.109.16 with SMTP id i16mr11058859wmc.10.1458830774129; Thu, 24 Mar 2016 07:46:14 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id k125sm27255752wmb.14.2016.03.24.07.46.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Mar 2016 07:46:13 -0700 (PDT) From: Bartosz Golaszewski To: Wolfram Sang , linux-i2c , LKML Cc: Andrew Lunn , Bartosz Golaszewski Subject: [PATCH 03/13] eeprom: at24: platform_data: use BIT() macro Date: Thu, 24 Mar 2016 15:45:57 +0100 Message-Id: <1458830767-23816-4-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1458830767-23816-1-git-send-email-bgolaszewski@baylibre.com> References: <1458830767-23816-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 | 8 ++++---- 1 file changed, 4 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..a543b93 100644 --- a/include/linux/platform_data/at24.h +++ b/include/linux/platform_data/at24.h @@ -43,10 +43,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;