From patchwork Tue Oct 27 11:43:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 55590 Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1739308lbq; Tue, 27 Oct 2015 04:44:13 -0700 (PDT) X-Received: by 10.50.56.17 with SMTP id w17mr1690941igp.36.1445946253587; Tue, 27 Oct 2015 04:44:13 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y18si1534941igp.44.2015.10.27.04.44.13; Tue, 27 Oct 2015 04:44:13 -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; 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; 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 S1753543AbbJ0LoM (ORCPT + 1 other); Tue, 27 Oct 2015 07:44:12 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:33396 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752408AbbJ0LoL (ORCPT ); Tue, 27 Oct 2015 07:44:11 -0400 Received: by wijp11 with SMTP id p11so209412873wij.0 for ; Tue, 27 Oct 2015 04:44:10 -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=OD5j6a37NwVaFdDZhMpUoof0NN2dGq3L1muMvJjNpmo=; b=AIF3Lh/F4Vtf4LohrAtSymH3m7W86Y8QnmXAjd+C1fVuswP9BfW3EHI141XLY+67sS u0MUbs8IeE7H3zstNXfsWR16WbfTh156um+55q7lyq4kgyXApH06jLeaxXDPrh8rfwH8 gH3KWGUDpGrE49N6tayZ/SEPID1P8j8t/jW7C3qolZ/i/mGFNhCvDuPKQlqiW9HuQLo7 Ms/tCw6VkuGYZJxUgu6+FJAfnZfMFxemr8I7oWL77qC8WYJLapbOowoc4JlAbyWynFfV 1yrmdtLkkZyTyDL9LqGhJjIgeELYFiLcbN4Yg9PA3t+DC5s7POkN78W7FRcf88ireDCM K3GQ== 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=VtmNXm4aSB5sB/vvMAI+nwrWfkxblpjpdSZDfgix/5hQiA3Lbninr6xYtBb+xGvtW9 ZbYiUqC70hKDkUEJeLspaVa3/yklA1XOJDQojt8qbcuJap8BhWoty2wLIlAkLahe6cPP ODTsW30fIbsdsWjVCH3HrbfFa/3PReVtrMb94Ja+wcyZxW8C+CxB0iuiQ7s4HDi8KDs3 cmX03tKekClTQor4IJBSl+hoZkKC74kcCfGkGRXLObImVo2E88HWB0XVpxUOcSkHXp78 tRsUIIa56XWLkr+UTo+CQkh878acFDfD/3BJYEW7MH+/cu2qhH7BrI1mX+r1wXDrh9nP sFNA== X-Gm-Message-State: ALoCoQmLksMhDVQGhcm1jHJ4YsaS7Ph3/iZK1+Xc5eXL9VAVSp1wwZThQoufsBGBm0QNlzvmHL2J X-Received: by 10.194.78.77 with SMTP id z13mr29196204wjw.145.1445946250065; Tue, 27 Oct 2015 04:44:10 -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 gd11sm17451281wic.20.2015.10.27.04.44.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 04:44:09 -0700 (PDT) From: Bartosz Golaszewski To: Wolfram Sang Cc: linux-i2c , LKML , Bartosz Golaszewski Subject: [PATCH v2 1/9] eeprom: at24: platform_data: use BIT() macro Date: Tue, 27 Oct 2015 12:43:45 +0100 Message-Id: <1445946233-6071-2-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445946233-6071-1-git-send-email-bgolaszewski@baylibre.com> References: <1445946233-6071-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.1.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 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;