From patchwork Wed Jan 30 19:39:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 14369 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0525E23EAD for ; Wed, 30 Jan 2013 19:40:20 +0000 (UTC) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by fiordland.canonical.com (Postfix) with ESMTP id 98922A19350 for ; Wed, 30 Jan 2013 19:40:19 +0000 (UTC) Received: by mail-ve0-f172.google.com with SMTP id 15so1396432vea.31 for ; Wed, 30 Jan 2013 11:40:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:x-gm-message-state; bh=zRjlutm8nP7GzOf6e6l+vzQ1ghoRu/ZScU7b+d8q2V8=; b=ShOu9etvfOTW8M1WIPe8Ec6A5Svo/KyWF7iFGzyrr/5qO1OWQVpOHT5k+LgOwyIjxI wDSxy9ixd7XTX7hCwkMDi52J+eFkyI7x6g2DNEtZvCSrUm3Q878Ur+5KDOZcqLU0Fqm7 XVfLlT8Sk7giqrInB1U5Q5fdYQoISeR33uvxiVMiagKMEMt1Kp8KdSgpES8Aod9nSZo6 YM7/sFs+86IAoquF15fbdpSiUgF8RPpepMQH79ehfH3MkZ2xSqOW34x5Hz97FO3FKpQi Uh8U60yfujOEdWbEvhWo39GKTAo/OsvZpgkvk2wP/u4153gQg85hrgiDznev0Y/FMc8e EEcg== X-Received: by 10.52.66.14 with SMTP id b14mr5273954vdt.0.1359574819065; Wed, 30 Jan 2013 11:40:19 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp26279vec; Wed, 30 Jan 2013 11:40:18 -0800 (PST) X-Received: by 10.14.203.3 with SMTP id e3mr18367579eeo.9.1359574817294; Wed, 30 Jan 2013 11:40:17 -0800 (PST) Received: from eu1sys200aog104.obsmtp.com (eu1sys200aog104.obsmtp.com [207.126.144.117]) by mx.google.com with SMTP id d45si4172351eem.51.2013.01.30.11.40.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 30 Jan 2013 11:40:17 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.117; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob104.postini.com ([207.126.147.11]) with SMTP ID DSNKUQl3F26c1xb3c/bM1mh5xWA4xWkMY1WP@postini.com; Wed, 30 Jan 2013 19:40:16 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id CBF3FD6; Wed, 30 Jan 2013 19:31:54 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 45A4B901; Wed, 30 Jan 2013 19:40:03 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 201EEA807E; Wed, 30 Jan 2013 20:39:55 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 30 Jan 2013 20:40:02 +0100 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Lee Jones , Linus Walleij Subject: [PATCH 1/4] pinctrl/abx500: use the BIT() macro where appropriate Date: Wed, 30 Jan 2013 20:39:59 +0100 Message-ID: <1359574799-15627-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmOpDfrUYOkCTbCtAjgSYhRlQaCULTAWye4bnfxfrA3bcPpg4oWVL7XXFJY6wTUO3hgvQXP From: Lee Jones The BIT() macro provides a simple and easy to read way of obtaining bit offsets into things like masks and hardware registers. In this patch we're simply replacing all instances of '1 << x' with 'bit(x)'. Signed-off-by: Lee Jones Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-abx500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c index 7046aef..539c9bb 100644 --- a/drivers/pinctrl/pinctrl-abx500.c +++ b/drivers/pinctrl/pinctrl-abx500.c @@ -157,7 +157,7 @@ static int abx500_gpio_set_bits(struct gpio_chip *chip, u8 reg, reg += offset / 8; ret = abx500_mask_and_set_register_interruptible(pct->dev, - AB8500_MISC, reg, 1 << pos, val << pos); + AB8500_MISC, reg, BIT(pos), val << pos); if (ret < 0) dev_err(pct->dev, "%s write failed\n", __func__); return ret;