[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <649EF91064D35D40B9C93A225BF4167461310F9D@NWD2MBX7.ad.analog.com>
Date: Fri, 6 Feb 2015 06:54:52 +0000
From: "Wu, Aaron" <Aaron.Wu@...log.com>
To: Marc Kleine-Budde <mkl@...gutronix.de>,
"wg@...ndegger.com" <wg@...ndegger.com>,
"linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-devel <linux-devel@...log.com>
Subject: RE: [PATCH V5 2/3] bfin_can: rewrite the driver into common style
with MMU
Hi Marc,
Thanks for your quick review and comments, I've made 3 changes accordingly in V6. Patches have passed function verification on blackfin board and scripts/checkpach.pl with 0 error/warning.
Best regards,
Aaron
> -----Original Message-----
> From: Marc Kleine-Budde [mailto:mkl@...gutronix.de]
> Sent: 2015年2月5日 19:06
> To: Wu, Aaron; wg@...ndegger.com; linux-can@...r.kernel.org; linux-
> kernel@...r.kernel.org; linux-devel
> Subject: Re: [PATCH V5 2/3] bfin_can: rewrite the driver into common style with
> MMU
>
> On 02/05/2015 11:44 AM, Aaron Wu wrote:
> > Rewrite the blackfin CAN driver into more common style in three ways:
> > part 1/3: rewrite blackfin style of read/write into common
> > readw/writew part 2/3: introduce ioremap to be compitable with MMU
> > enabled arch part 3/3: merge the header file from the blackfin arch
> > dependent location to driver code directly, note the original copy of
> > more completed bfin_can.h in arch depentdent location is reserved for
> > reg test purpose
> >
> > V5 changes: merge contents of header file into drivere code in patch
> > 3/3
> > V4 changes: remove unused variable in patch 2/3
> > V3 changes: remove redundant cast in patch 2/3
> > V2 changes: split patch into two parts
> > V1 changes: rewrite code into common style
> >
> > Signed-off-by: Aaron Wu <Aaron.wu@...log.com>
> > ---
> > drivers/net/can/bfin_can.c | 22 ++++++++--------------
> > 1 file changed, 8 insertions(+), 14 deletions(-)
> >
> > diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c
> > index 0a5eff4..0209c14 100644
> > --- a/drivers/net/can/bfin_can.c
> > +++ b/drivers/net/can/bfin_can.c
> > @@ -551,16 +551,10 @@ static int bfin_can_probe(struct platform_device
> *pdev)
> > goto exit;
> > }
> >
> > - if (!request_mem_region(res_mem->start, resource_size(res_mem),
> > - dev_name(&pdev->dev))) {
> > - err = -EBUSY;
> > - goto exit;
> > - }
> > -
> > /* request peripheral pins */
> > err = peripheral_request_list(pdata, dev_name(&pdev->dev));
> > if (err)
> > - goto exit_mem_release;
> > + goto exit;
> >
> > dev = alloc_bfin_candev();
> > if (!dev) {
> > @@ -569,7 +563,13 @@ static int bfin_can_probe(struct platform_device
> *pdev)
> > }
> >
> > priv = netdev_priv(dev);
> > - priv->membase = (void __iomem *)res_mem->start;
> > +
> > + priv->membase = devm_ioremap_resource(&pdev->dev, res_mem);
> > + if (IS_ERR(priv->membase)) {
> > + dev_err(&pdev->dev, "Cannot map IO\n");
>
> devm_ioremap_resource() already prints an error message.
>
> Marc
> --
> Pengutronix e.K. | Marc Kleine-Budde |
> Industrial Linux Solutions | Phone: +49-231-2826-924 |
> Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
> Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Powered by blists - more mailing lists