From patchwork Mon Oct 12 14:31:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 54764 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id B1DD722DB6 for ; Mon, 12 Oct 2015 14:32:03 +0000 (UTC) Received: by wicid10 with SMTP id id10sf10631757wic.2 for ; Mon, 12 Oct 2015 07:32:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=hEtKQnWuJr71nG3cGykvAVaOglN2ZOzGSGG/zYK1eyk=; b=TZ4xSzXo/ukfqfNWMSaM6bduRHq3U2VKNzGGcBjDsr8E6vKgxrIQSaxbqRprotSTEM PteaWauGVJBhHJyDn18eALvc+l+VJsrATDkQEUGa3Zi/56nr3K/3ROc+XxLNe1LHjNQn L9IyMe1/20MrqASvlyKfWQWGsQNxGC+4/PCBuVFahBvt4uHfiMZQ0m9xnHdqjWbg1q9u /bJOc6Bt4jS8BIcSu/W8EQ1WxpAnJ0AY/yClupUkyqAnjmWlkIKCy7uEZ2sRJh754bEb +z4Jop2u3+rcQ+rxFDs52MnYIQ0bQgtvXPI/lFBdZ8eag7qn1ATgsFGMRrjkOhvVcP06 Ljfg== X-Gm-Message-State: ALoCoQmCk8Y6OxfNxGn5KwbfDRHG8CEGtUZhJMiV74x1Zym1ILEmvhqX5iR2s+QfW/PUMGl2w12Y X-Received: by 10.180.208.7 with SMTP id ma7mr2960171wic.5.1444660323052; Mon, 12 Oct 2015 07:32:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.159.82 with SMTP id i79ls490430lfe.102.gmail; Mon, 12 Oct 2015 07:32:02 -0700 (PDT) X-Received: by 10.25.209.146 with SMTP id i140mr8246913lfg.69.1444660322862; Mon, 12 Oct 2015 07:32:02 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id dw9si11420386lbc.71.2015.10.12.07.32.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Oct 2015 07:32:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbcao8 with SMTP id ao8so145138759lbc.3 for ; Mon, 12 Oct 2015 07:32:02 -0700 (PDT) X-Received: by 10.25.86.213 with SMTP id k204mr8251711lfb.36.1444660322658; Mon, 12 Oct 2015 07:32:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1582938lbq; Mon, 12 Oct 2015 07:32:01 -0700 (PDT) X-Received: by 10.107.137.106 with SMTP id l103mr26785706iod.112.1444660321488; Mon, 12 Oct 2015 07:32:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4si8515311igw.81.2015.10.12.07.31.53; Mon, 12 Oct 2015 07:32:01 -0700 (PDT) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbbJLObu (ORCPT + 30 others); Mon, 12 Oct 2015 10:31:50 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:35238 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752602AbbJLObr (ORCPT ); Mon, 12 Oct 2015 10:31:47 -0400 Received: by wicge5 with SMTP id ge5so152877189wic.0 for ; Mon, 12 Oct 2015 07:31:46 -0700 (PDT) X-Received: by 10.180.37.130 with SMTP id y2mr11633039wij.9.1444660305956; Mon, 12 Oct 2015 07:31:45 -0700 (PDT) Received: from localhost.localdomain (LPoitiers-656-1-62-228.w90-63.abo.wanadoo.fr. [90.63.143.228]) by smtp.gmail.com with ESMTPSA id az6sm11102907wib.12.2015.10.12.07.31.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Oct 2015 07:31:45 -0700 (PDT) From: Bartosz Golaszewski To: Wolfram Sang Cc: linux-i2c , LKML , Patrick Titiano , Bartosz Golaszewski Subject: [PATCH 1/9] eeprom: at24: platform_data: use BIT() macro Date: Mon, 12 Oct 2015 16:31:13 +0200 Message-Id: <1444660281-19150-2-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444660281-19150-1-git-send-email-bgolaszewski@baylibre.com> References: <1444660281-19150-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bgolaszewski@baylibre.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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(-) 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;