From patchwork Tue Nov 17 09:52:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 56759 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1828979lbb; Tue, 17 Nov 2015 01:52:47 -0800 (PST) X-Received: by 10.68.142.74 with SMTP id ru10mr26326055pbb.157.1447753967827; Tue, 17 Nov 2015 01:52:47 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kk8si57065349pbc.178.2015.11.17.01.52.47; Tue, 17 Nov 2015 01:52:47 -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 S1753526AbbKQJwp (ORCPT + 28 others); Tue, 17 Nov 2015 04:52:45 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35805 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752673AbbKQJwh (ORCPT ); Tue, 17 Nov 2015 04:52:37 -0500 Received: by wmdw130 with SMTP id w130so146987832wmd.0 for ; Tue, 17 Nov 2015 01:52: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=OM8dAljvMwpmKny6tTN/m8tqrPTM4utj0oRgp8OiG+N/zI9gXrr6uy7TVMz9iz5fVH AKYKisQ6IB/FUys44jE0y1gkrnLQxZ3SDBcku5XBfpFm1C82sw40LxLJqqoszdLzdgPM 8QS/u4Rj2K4sS9Vr0X8AwqCKFU+/huNU1pEMRSdtF32ojwLgf6nz6Vs0tPrtEXwDR4Ku c/SbVMFDjHJxOZ+JSEjRT+WHNwXg64WJgld9D8plRg+TdYJEXYLo4KBftZxxlt3lsz+i KxCAM6cvHpcRtWwzwbrBUCjsArc9FyrvdgpUQMTEsC7goGjx+4eowQQYzIcCRs0tOF4f ZLYg== 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=GZ0jNsgtuhYOTtZJ8NjHMMnzd8YzqOh0y5GS92kp91UsNV447HZNtCik7s87q48gfE hoX09RwE815p4wwn5ZxQ02jkr5ywIaRY/I8lENOSXgSLAO9qYKu8m7aeONRiarGQkGEh 0wePfdprDFBtR45CEkavoZyKtwIxFQMbNKK7C618GhFPaKajR31Ym5Hu9IVwl5Zc0hB3 VzQn3adnXq29t6DBgKHZBnGvVlFC011h7fcKSFkN6+LkAUrWRZWTaPSAnDUbawWnA6HG BmXptXgNMHhNQQfTYZOWqqStQZbG1UtU0Qal2y2k2aqMdi57/Ctno+S0PxGTop5lGGzv MDgA== X-Gm-Message-State: ALoCoQmvIjA+Ph5wI8xlRlzvs19suCo2bhjijox+SNr+8c8BLTi3lw75r4fl2ZO3q7v9pWWgcpPs X-Received: by 10.194.112.131 with SMTP id iq3mr40362923wjb.35.1447753956155; Tue, 17 Nov 2015 01:52:36 -0800 (PST) Received: from bgdev-debian.home ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id bk7sm38993546wjb.25.2015.11.17.01.52.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:52: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: Tue, 17 Nov 2015 10:52:22 +0100 Message-Id: <1447753950-17213-2-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447753950-17213-1-git-send-email-bgolaszewski@baylibre.com> References: <1447753950-17213-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;