From patchwork Mon Oct 14 08:09:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20997 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D437B20D84 for ; Mon, 14 Oct 2013 08:10:00 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id uy5sf26573468obc.4 for ; Mon, 14 Oct 2013 01:10:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=fEQ+jbgDt/rTE7YnDRQxefXgUAqgj5IZMFvovJfqqDI=; b=O7aUdYS2DkllR9dkbCbAhp2B71fHdInoZe3CInw5WWbh7yuNxPPrn+hofc0DVhz3CX 7n8eezfX5tvv73nkB+l7PSm+MhqxJBuJG/nq+ZfdqKgjuBxqV/Y8/H8ypZWi03eeM52x WQ13bzHQwyKNGZpNPXNkRHdWrJu+abQHyBmkZmabdktDDB4tt0f7NepG/RJ7U3gdTCyJ VXjInWA/CRkvuLZ9pFXLZMYWg7m0bD6zYdqEXCM15TvQSBPugORPCVHRjg/HFNHZKDh9 x19+RJks9O02vAw743t0b6LZsRssErGo2VkPcSx9td1EU5yVklvyDEZKoR+QWT7okVDB v5Iw== X-Received: by 10.43.100.129 with SMTP id cw1mr1399155icc.30.1381738200232; Mon, 14 Oct 2013 01:10:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.3.129 with SMTP id c1ls62055qec.84.gmail; Mon, 14 Oct 2013 01:10:00 -0700 (PDT) X-Received: by 10.58.38.200 with SMTP id i8mr5733196vek.6.1381738200136; Mon, 14 Oct 2013 01:10:00 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id yc9si1350745veb.80.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Oct 2013 01:10:00 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id oz11so473375veb.3 for ; Mon, 14 Oct 2013 01:10:00 -0700 (PDT) X-Gm-Message-State: ALoCoQnFOrrfy3n+nmpBBplbDAzG6wYG0OMWP7017w4Or1siC+us7DVv+XqlhRPlWaS2/1lwd9om X-Received: by 10.52.187.138 with SMTP id fs10mr27570448vdc.10.1381738200023; Mon, 14 Oct 2013 01:10:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp205669vcz; Mon, 14 Oct 2013 01:09:59 -0700 (PDT) X-Received: by 10.180.92.100 with SMTP id cl4mr13707273wib.1.1381738199013; Mon, 14 Oct 2013 01:09:59 -0700 (PDT) Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by mx.google.com with ESMTPS id fp6si4955540wib.60.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Oct 2013 01:09:59 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.176 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.176; Received: by mail-we0-f176.google.com with SMTP id w62so6562570wes.21 for ; Mon, 14 Oct 2013 01:09:58 -0700 (PDT) X-Received: by 10.194.119.132 with SMTP id ku4mr432650wjb.51.1381738198579; Mon, 14 Oct 2013 01:09:58 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id h15sm31702131wic.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Oct 2013 01:09:57 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Ryan Mallon , H Hartley Sweeten Subject: [PATCH] gpio: ep93xx: get rid of bogus __raw* accessors Date: Mon, 14 Oct 2013 10:09:53 +0200 Message-Id: <1381738193-11448-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , I have no idea why this driver is using __raw* accessors for reading and writing registers, I suspect it is just force of habit or copy/paste. Change all to readb()/writeb() except one chain where I used writeb_relaxed() up until the last writeb(). Cc: Ryan Mallon Cc: H Hartley Sweeten Signed-off-by: Linus Walleij --- drivers/gpio/gpio-ep93xx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c index 56b98ee..80829f3 100644 --- a/drivers/gpio/gpio-ep93xx.c +++ b/drivers/gpio/gpio-ep93xx.c @@ -51,15 +51,15 @@ static void ep93xx_gpio_update_int_params(unsigned port) { BUG_ON(port > 2); - __raw_writeb(0, EP93XX_GPIO_REG(int_en_register_offset[port])); + writeb_relaxed(0, EP93XX_GPIO_REG(int_en_register_offset[port])); - __raw_writeb(gpio_int_type2[port], + writeb_relaxed(gpio_int_type2[port], EP93XX_GPIO_REG(int_type2_register_offset[port])); - __raw_writeb(gpio_int_type1[port], + writeb_relaxed(gpio_int_type1[port], EP93XX_GPIO_REG(int_type1_register_offset[port])); - __raw_writeb(gpio_int_unmasked[port] & gpio_int_enabled[port], + writeb(gpio_int_unmasked[port] & gpio_int_enabled[port], EP93XX_GPIO_REG(int_en_register_offset[port])); } @@ -74,7 +74,7 @@ static void ep93xx_gpio_int_debounce(unsigned int irq, bool enable) else gpio_int_debounce[port] &= ~port_mask; - __raw_writeb(gpio_int_debounce[port], + writeb(gpio_int_debounce[port], EP93XX_GPIO_REG(int_debounce_register_offset[port])); } @@ -83,7 +83,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc) unsigned char status; int i; - status = __raw_readb(EP93XX_GPIO_A_INT_STATUS); + status = readb(EP93XX_GPIO_A_INT_STATUS); for (i = 0; i < 8; i++) { if (status & (1 << i)) { int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i; @@ -91,7 +91,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc) } } - status = __raw_readb(EP93XX_GPIO_B_INT_STATUS); + status = readb(EP93XX_GPIO_B_INT_STATUS); for (i = 0; i < 8; i++) { if (status & (1 << i)) { int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i; @@ -124,7 +124,7 @@ static void ep93xx_gpio_irq_ack(struct irq_data *d) ep93xx_gpio_update_int_params(port); } - __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); + writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); } static void ep93xx_gpio_irq_mask_ack(struct irq_data *d) @@ -139,7 +139,7 @@ static void ep93xx_gpio_irq_mask_ack(struct irq_data *d) gpio_int_unmasked[port] &= ~port_mask; ep93xx_gpio_update_int_params(port); - __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); + writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); } static void ep93xx_gpio_irq_mask(struct irq_data *d)