From patchwork Tue Oct 20 08:43:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 55280 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f70.google.com (mail-lf0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 6640E23024 for ; Tue, 20 Oct 2015 08:43:50 +0000 (UTC) Received: by lffz202 with SMTP id z202sf1867503lff.3 for ; Tue, 20 Oct 2015 01:43:49 -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=/mGSgjp9lUf4paY8S8h6j8rXRhVNP+IyEiHU6No9JUs=; b=CVGJ34uqDWPEImqDom33iTtE5H9bvYO+X4fIEXwnoZ+4i7fJRXQ+2tYc3+hyad7geq 7vHXnsydPpaTbueV31mkiUWPXHtFdf0VjFpvIlBFaE8TahPCxnOgLrheVyxGh7pDQeBy mJZPpYZQ4GXoSyC9FQ8Y3Wqw1Pfg+vyNzOoEsxG4A8eZ63F9t9ysxl1nxIYjT1DKxRag 9cuCZEbsNAUXkFPfs4c3h6k5u9wexh5rzuYT89mno/yqAA5GBEC0Yid5RO8Of0CPNmKZ yuB6E+bs5ciVo25LygA2Qqpq/ZpAgQRSkj1Rm42bHbYWuP4B8wlzfuzWX3JKLwF7XaxN nhYg== X-Gm-Message-State: ALoCoQlwPBZPntmB/Axjby8wuIPmvhLCMEOtxAsw7STrl2wAq8ge7M7R0XQKNi7rOX9yvsJrZpiJ X-Received: by 10.112.144.105 with SMTP id sl9mr370536lbb.3.1445330629393; Tue, 20 Oct 2015 01:43:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.141.198 with SMTP id p189ls44655lfd.79.gmail; Tue, 20 Oct 2015 01:43:49 -0700 (PDT) X-Received: by 10.112.125.231 with SMTP id mt7mr1003945lbb.87.1445330629264; Tue, 20 Oct 2015 01:43:49 -0700 (PDT) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id rg9si1439829lbb.79.2015.10.20.01.43.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2015 01:43:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lfaz124 with SMTP id z124so2010519lfa.1 for ; Tue, 20 Oct 2015 01:43:49 -0700 (PDT) X-Received: by 10.25.154.203 with SMTP id c194mr698479lfe.32.1445330629159; Tue, 20 Oct 2015 01:43:49 -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 w3csp1941590lbq; Tue, 20 Oct 2015 01:43:48 -0700 (PDT) X-Received: by 10.67.16.15 with SMTP id fs15mr2655246pad.82.1445330626115; Tue, 20 Oct 2015 01:43:46 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pi7si3598307pbc.130.2015.10.20.01.43.45; Tue, 20 Oct 2015 01:43: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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753656AbbJTIno (ORCPT + 1 other); Tue, 20 Oct 2015 04:43:44 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:35069 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753622AbbJTInm (ORCPT ); Tue, 20 Oct 2015 04:43:42 -0400 Received: by wicll6 with SMTP id ll6so34313251wic.0 for ; Tue, 20 Oct 2015 01:43:41 -0700 (PDT) X-Received: by 10.180.93.168 with SMTP id cv8mr27030189wib.54.1445330620881; Tue, 20 Oct 2015 01:43:40 -0700 (PDT) Received: from localhost.localdomain (cag06-6-78-235-100-105.fbx.proxad.net. [78.235.100.105]) by smtp.gmail.com with ESMTPSA id kr10sm2390754wjc.25.2015.10.20.01.43.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Oct 2015 01:43:40 -0700 (PDT) From: Bartosz Golaszewski To: Wolfram Sang Cc: linux-i2c , LKML , Bartosz Golaszewski Subject: [RESEND PATCH 1/9] eeprom: at24: platform_data: use BIT() macro Date: Tue, 20 Oct 2015 10:43:19 +0200 Message-Id: <1445330607-12470-2-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445330607-12470-1-git-send-email-bgolaszewski@baylibre.com> References: <1445330607-12470-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-i2c-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-i2c@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.215.43 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;