Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751953Ab2KPNvG (ORCPT ); Fri, 16 Nov 2012 08:51:06 -0500 Received: from 5.mo3.mail-out.ovh.net ([87.98.178.36]:34671 "EHLO mo3.mail-out.ovh.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751833Ab2KPNvE (ORCPT ); Fri, 16 Nov 2012 08:51:04 -0500 Date: Fri, 16 Nov 2012 14:49:01 +0100 From: Jean-Christophe PLAGNIOL-VILLARD To: Wenyou Yang Cc: linux-arm-kernel@lists.infradead.org, wim@iguana.be, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, nicolas.ferre@atmel.com, JM.Lin@atmel.com X-Ovh-Mailout: 178.32.228.3 (mo3.mail-out.ovh.net) Subject: Re: [PATCH 03/11] watchdog/at91sam9_wdt: change the wdt_read and wdt_write macro to the inline function Message-ID: <20121116134901.GH4398@game.jcrosoft.org> References: <1352877369-19740-1-git-send-email-wenyou.yang@atmel.com> <1352877369-19740-4-git-send-email-wenyou.yang@atmel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1352877369-19740-4-git-send-email-wenyou.yang@atmel.com> X-PGP-Key: http://uboot.jcrosoft.org/plagnioj.asc X-PGP-key-fingerprint: 6309 2BBA 16C8 3A07 1772 CC24 DEFC FFA3 279C CE7C User-Agent: Mutt/1.5.20 (2009-06-14) X-Ovh-Tracer-Id: 4955085490714946437 X-Ovh-Remote: 213.251.161.87 (ns32433.ovh.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehgedrtdelucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfhrhhomheplfgvrghnqdevhhhrihhsthhophhhvgcurffntefipffkqffnqdggkffnnfettfffuceophhlrghgnhhiohhjsehjtghrohhsohhfthdrtghomheqnecujfgurhepfffhvffukfhfgggtuggjfgesthdttfdttdervd X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehgedrtdelucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfhrhhomheplfgvrghnqdevhhhrihhsthhophhhvgcurffntefipffkqffnqdggkffnnfettfffuceophhlrghgnhhiohhjsehjtghrohhsohhfthdrtghomheqnecujfgurhepfffhvffukfhfgggtuggjfgesthdttfdttdervd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1551 Lines: 46 On 15:16 Wed 14 Nov , Wenyou Yang wrote: > Signed-off-by: Wenyou Yang > --- > drivers/watchdog/at91sam9_wdt.c | 28 ++++++++++++++++++---------- > 1 file changed, 18 insertions(+), 10 deletions(-) > > diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c > index 31c914a..98e7d5a 100644 > --- a/drivers/watchdog/at91sam9_wdt.c > +++ b/drivers/watchdog/at91sam9_wdt.c > @@ -34,11 +34,6 @@ > > #define DRV_NAME "AT91SAM9 Watchdog" > > -#define wdt_read(field) \ > - __raw_readl(at91wdt_private.base + field) > -#define wdt_write(field, val) \ > - __raw_writel((val), at91wdt_private.base + field) > - > /* AT91SAM9 watchdog runs a 12bit counter @ 256Hz, > * use this to convert a watchdog > * value from/to milliseconds. > @@ -75,13 +70,24 @@ struct at91wdt_drvdata { > > /* ......................................................................... */ > > +static inline unsigned int wdt_read(struct at91wdt_drvdata *driver_data, > + unsigned int field) > +{ > + return __raw_readl(driver_data->base + field); > +} > + > +static inline void wdt_write(struct at91wdt_drvdata *driver_data, > + unsigned int field, unsigned int val) > +{ > + __raw_writel((val), driver_data->base + field); > +} use relaxed version Best Regrds, J. -- 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/