From patchwork Mon Apr 23 09:14:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 8028 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 BF83023E23 for ; Mon, 23 Apr 2012 09:14:52 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7AD66A1835A for ; Mon, 23 Apr 2012 09:14:52 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so22452743iag.11 for ; Mon, 23 Apr 2012 02:14:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=d8JtbPZkaaInBRcmlm4DvH8A49Trk+/Mx/kKumiW6W0=; b=ORsrgJxWe/jlh6B9libBTyJyQzXmtKRU6lqfkzkVQH2ZulATznwscPsnsH70UPHsZl ynSUUSaMWpLRLYFC5Zt7q1qKk1OcuwJoIvvOJnAY54EGOtD4cj80Hhk6jScw/RfB9IxW rFVuTP8StWdpJUaRQGlKzStXLJN2JZhxOUvESZss1hDrpuREvcbnXBg6s8i/CKca4fLp 826Nd20h1AjVc66WVIcQ6CkY/FrskyjEGm5qHhQhRuTEtcI3uiqLGAHI/wUpaeeMl0Xp 5Pfhdr8v8T0r0EVf0q3ursxy01gix4ng40CH7/30XnPUpbwOoiCAMvcLaUeCMO8ik3R3 wYAA== Received: by 10.42.80.19 with SMTP id t19mr1464172ick.55.1335172492294; Mon, 23 Apr 2012 02:14:52 -0700 (PDT) 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.231.137.198 with SMTP id x6csp97944ibt; Mon, 23 Apr 2012 02:14:51 -0700 (PDT) Received: by 10.213.113.200 with SMTP id b8mr1137943ebq.68.1335172491032; Mon, 23 Apr 2012 02:14:51 -0700 (PDT) Received: from eu1sys200aog110.obsmtp.com (eu1sys200aog110.obsmtp.com. [207.126.144.129]) by mx.google.com with SMTP id m1si4195885eeh.116.2012.04.23.02.14.47 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Apr 2012 02:14:51 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.129; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.129 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-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKT5Udh3Fx5MUhMsu6vID00BQfZ73Hwi0w@postini.com; Mon, 23 Apr 2012 09:14:50 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4ADBA1D2; Mon, 23 Apr 2012 09:14:46 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DC17224F8; Mon, 23 Apr 2012 09:14:45 +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 relay1.stm.gmessaging.net (Postfix) with ESMTPS id 4235524C2F2; Mon, 23 Apr 2012 11:14:40 +0200 (CEST) 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; Mon, 23 Apr 2012 11:14:45 +0200 From: Linus Walleij To: , Cc: Grant Likely , Philippe LANGLAIS , Rabin Vincent , Jonas Aberg , Lee Jones , Linus Walleij Subject: [PATCH 5/9] gpio/nomadik: use typesafe __io_address() Date: Mon, 23 Apr 2012 11:14:42 +0200 Message-ID: <1335172482-27648-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmg36ZJX3EGIrznJKKNX1ZnG9swKsKdH8bMOl7+Qxiz00LgbF3mQrYWZDcslQURv+OSuFrP From: Linus Walleij We were using a custom io_p2v() (physical-to-virtual) translation macro, but with the advent of the cross-platform __io_address() let us try to get rid of this. Inspired by a similar patch by Jonas Aberg. Signed-off-by: Linus Walleij --- drivers/gpio/gpio-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c index 7b45d88..edf9a95 100644 --- a/drivers/gpio/gpio-nomadik.c +++ b/drivers/gpio/gpio-nomadik.c @@ -1186,7 +1186,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev) */ nmk_chip->bank = dev->id; nmk_chip->clk = clk; - nmk_chip->addr = io_p2v(res->start); + nmk_chip->addr = __io_address(res->start); nmk_chip->chip = nmk_gpio_template; nmk_chip->parent_irq = irq; nmk_chip->secondary_parent_irq = secondary_irq;