From patchwork Wed Dec 2 10:25:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 57544 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2772106lbb; Wed, 2 Dec 2015 02:25:46 -0800 (PST) X-Received: by 10.98.14.129 with SMTP id 1mr3370767pfo.161.1449051946826; Wed, 02 Dec 2015 02:25:46 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sq8si3866929pab.10.2015.12.02.02.25.46; Wed, 02 Dec 2015 02:25:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755896AbbLBKZm (ORCPT + 28 others); Wed, 2 Dec 2015 05:25:42 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:34685 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752541AbbLBKZh (ORCPT ); Wed, 2 Dec 2015 05:25:37 -0500 Received: by wmvv187 with SMTP id v187so247550777wmv.1 for ; Wed, 02 Dec 2015 02:25:36 -0800 (PST) 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=OD5j6a37NwVaFdDZhMpUoof0NN2dGq3L1muMvJjNpmo=; b=J1ycQPP9RC6e86AFCtE393h+3PVU7OQu73qgLbcAZj26JRMAVjJNooa6AqJd969/EL PdiLWt/8izh4oke+wqk4WArc9zQBgOQuZTcnlSGC4VAtDG9UmlY3U5nhb9pWl9ur6nwt Ay/GpSaRcMoRhGY6i3E+xUkMoLfUuXXqxfmXf7puLtNWgS/Nc4F14HzUTnJUv9qbDpSq fLf6bP/bLfQMH0ls4M6Y9k5jPn73OAXZP9jEqXHuF5YBS4W2QeW1HpkJAdt/9LJUYcEk slKGASpneuSu4dZTMXHLSzPBqLsq7J+FRIG06wjod65anvJBR/Y8KEP3dLhijME90MF8 w0Qw== 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=OD5j6a37NwVaFdDZhMpUoof0NN2dGq3L1muMvJjNpmo=; b=dzutkPZfqWJTTX7OidHrZyKD2tm1J1P6bxY0TrG9qCXEInd46v8IbHZqY+Z8NmYlZs dnRZOjyeq0yUwG0gi8S5LH1o8Zvz+ZvdJUaKrZfkBwOJeoNOX9jwujoGIAqqrQO5OmTc 3Ff8/2wL3LAVru1Lazvdoxn6huTNSrntqhQD1xBSLFMp893NOoyX538h344P+7AUSKP1 mwe3ZIaTPj+DMttXzYWkxQ2giY45hmT+S6AaytSmVNUXBPJ3lJU1HS3fXxo/CxinLt6p 03dFujzlI21ZOQoLVqjbqDOPKDc06An4aIGspVECaVTLr2PqRh1iaKNM5bml1W4WAozA cAVQ== X-Gm-Message-State: ALoCoQlT3342WeqkdispCpniOJwlnvrQo8fvdRLgEVk7Lts3mGXt5/Ewr9l9c9xVrK0/yB+CegA9 X-Received: by 10.28.175.144 with SMTP id y138mr42563788wme.47.1449051935990; Wed, 02 Dec 2015 02:25:35 -0800 (PST) Received: from bgdev-debian.home ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id bg10sm2077707wjb.46.2015.12.02.02.25.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Dec 2015 02:25:35 -0800 (PST) From: Bartosz Golaszewski To: Wolfram Sang Cc: linux-i2c , LKML , Bartosz Golaszewski Subject: [RESEND PATCH v2 1/9] eeprom: at24: platform_data: use BIT() macro Date: Wed, 2 Dec 2015 11:25:18 +0100 Message-Id: <1449051926-21918-2-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1449051926-21918-1-git-send-email-bgolaszewski@baylibre.com> References: <1449051926-21918-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/include/linux/platform_data/at24.h b/include/linux/platform_data/at24.h index c42aa89..8d90f52 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 memory_accessor *, void *context); void *context;