From patchwork Thu Mar 24 16:19:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 64398 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp756289lbc; Thu, 24 Mar 2016 09:20:10 -0700 (PDT) X-Received: by 10.98.71.70 with SMTP id u67mr14158312pfa.85.1458836410297; Thu, 24 Mar 2016 09:20:10 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si463783pap.29.2016.03.24.09.20.10; Thu, 24 Mar 2016 09:20:10 -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 S1757282AbcCXQUD (ORCPT + 1 other); Thu, 24 Mar 2016 12:20:03 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:38908 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756014AbcCXQTv (ORCPT ); Thu, 24 Mar 2016 12:19:51 -0400 Received: by mail-wm0-f54.google.com with SMTP id l68so73701897wml.1 for ; Thu, 24 Mar 2016 09:19:50 -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=lRKO6DutO3pRup+qL0zgbxzSiXPCYsYV9bb0Eiq7NPCFomotxbt6XNVMQf0fltlCsX yC9ZneWUtXAMNZbrFXrEaD5Odv/2BEvEpmrswRXd8BWjsjZaSpDk3C7HlIVdr7WIX8l3 Du2R6FPzndNalYBTonNY0ypFeWZK9i4YX9P8qP/US0x/AXs9Bg7IiJ/XrRbg+zxQ4NHd yqRbtUSkre0oGsNQErUQ6h31bU1EhxD7Ou0niOvMJk2oaj7dG848uAqgila+uqdYDcPc 8nq5jCdF1hl7+khgUYZ4ZptbUo1qb/vqUmWFmbjflRZ/HXKD3GUsahoGiVQBWLl2vCcr 5Paw== 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=CXwo4okrOtnqeq/XEE27ex37c1AV2ON2XKdGSxDfapWZV8WCBiuYx5R9HPSCXbDT7K xxVM3HSTO9Fcmdy+EXvD/KNRGeztdPfeP3Nlv4oXzVfLzkkZRH+KMQKBdZ3KRmfMhgOm B/gDrTLbmWloPNLWsM63D4MZRuG6kvrgVBdRykepsvBsKYMcCmGpLLI0tuoYmECgtlqG NEvsjpp2WCj4oKHytpjW2SEX+m6c2ZtdXZ1BMpn8amJKDx11C1m8fELPElGc/Hpj3PU1 GSQFS3HPNVeTs9bfwZ176AOMjphDSJClFy/8etqCl3PKgU4Vmev9rKo09UcPTFYIpy/Q h2cw== X-Gm-Message-State: AD7BkJL69c1Lit3+PplSRS7UkOvW+sNN2rfM4xAp17K7LgGXFf/NpQaBPtBdByRfNZlv49Wc X-Received: by 10.28.129.7 with SMTP id c7mr32319285wmd.11.1458836389628; Thu, 24 Mar 2016 09:19:49 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id k124sm8370718wmb.11.2016.03.24.09.19.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Mar 2016 09:19:48 -0700 (PDT) From: Bartosz Golaszewski To: Wolfram Sang , linux-i2c , LKML Cc: Andrew Lunn , Bartosz Golaszewski Subject: [PATCH v2 03/13] eeprom: at24: platform_data: use BIT() macro Date: Thu, 24 Mar 2016 17:19:33 +0100 Message-Id: <1458836383-6668-4-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1458836383-6668-1-git-send-email-bgolaszewski@baylibre.com> References: <1458836383-6668-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;