From patchwork Tue Jul 2 17:06:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartley Sweeten X-Patchwork-Id: 2814011 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DC26C9F3C3 for ; Tue, 2 Jul 2013 17:06:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04A022014D for ; Tue, 2 Jul 2013 17:06:58 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2D202016C for ; Tue, 2 Jul 2013 17:06:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Uu42a-0003T2-9G; Tue, 02 Jul 2013 17:06:56 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Uu42Y-0003Sw-MO for spi-devel-general@lists.sourceforge.net; Tue, 02 Jul 2013 17:06:54 +0000 X-ACL-Warn: Received: from mail1.bemta7.messagelabs.com ([216.82.254.102]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1Uu42W-00021m-Rt for spi-devel-general@lists.sourceforge.net; Tue, 02 Jul 2013 17:06:54 +0000 Received: from [216.82.253.99:51767] by server-6.bemta-7.messagelabs.com id D9/CA-26192-7A803D15; Tue, 02 Jul 2013 17:06:47 +0000 X-Env-Sender: hartleys@visionengravers.com X-Msg-Ref: server-12.tower-160.messagelabs.com!1372784793!7176462!19 X-Originating-IP: [216.166.12.69] X-StarScan-Received: X-StarScan-Version: 6.9.9; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9447 invoked from network); 2 Jul 2013 17:06:46 -0000 Received: from out001.collaborationhost.net (HELO out001.collaborationhost.net) (216.166.12.69) by server-12.tower-160.messagelabs.com with RC4-SHA encrypted SMTP; 2 Jul 2013 17:06:46 -0000 Received: from etch.local (10.2.3.210) by smtp.collaborationhost.net (10.2.0.118) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 2 Jul 2013 12:06:41 -0500 From: H Hartley Sweeten To: Linux Kernel Subject: [PATCH v2 02/11] spi: spi-ep93xx: use read, write instead of __raw_* variants Date: Tue, 2 Jul 2013 10:06:26 -0700 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Disposition: inline Message-ID: <201307021006.26694.hartleys@visionengravers.com> X-Spam-Score: 0.0 (/) X-Headers-End: 1Uu42W-00021m-Rt Cc: Ryan Mallon , mika.westerberg@iki.fi, hsweeten@visionengravers.com, broonie@kernel.org, grant.likely@linaro.org, spi-devel-general@lists.sourceforge.net X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The memory resource used by this driver is ioremap()'d and the normal read,write calls can be used instead of the __raw_* variants. Also, remove the inline tag on the helper functions and let the compiler decide if they are inlined. Signed-off-by: H Hartley Sweeten Cc: Ryan Mallon Cc: Mika Westerberg Cc: Mark Brown Cc: Grant Likely Acked-by: Mika Westerberg --- drivers/spi/spi-ep93xx.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index 11e2b99..d7eccfc 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c @@ -158,28 +158,26 @@ struct ep93xx_spi_chip { /* converts bits per word to CR0.DSS value */ #define bits_per_word_to_dss(bpw) ((bpw) - 1) -static inline void -ep93xx_spi_write_u8(const struct ep93xx_spi *espi, u16 reg, u8 value) +static void ep93xx_spi_write_u8(const struct ep93xx_spi *espi, + u16 reg, u8 value) { - __raw_writeb(value, espi->regs_base + reg); + writeb(value, espi->regs_base + reg); } -static inline u8 -ep93xx_spi_read_u8(const struct ep93xx_spi *spi, u16 reg) +static u8 ep93xx_spi_read_u8(const struct ep93xx_spi *spi, u16 reg) { - return __raw_readb(spi->regs_base + reg); + return readb(spi->regs_base + reg); } -static inline void -ep93xx_spi_write_u16(const struct ep93xx_spi *espi, u16 reg, u16 value) +static void ep93xx_spi_write_u16(const struct ep93xx_spi *espi, + u16 reg, u16 value) { - __raw_writew(value, espi->regs_base + reg); + writew(value, espi->regs_base + reg); } -static inline u16 -ep93xx_spi_read_u16(const struct ep93xx_spi *spi, u16 reg) +static u16 ep93xx_spi_read_u16(const struct ep93xx_spi *spi, u16 reg) { - return __raw_readw(spi->regs_base + reg); + return readw(spi->regs_base + reg); } static int ep93xx_spi_enable(const struct ep93xx_spi *espi)