[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1406301210500.1550-100000@iolanthe.rowland.org>
Date: Mon, 30 Jun 2014 12:33:45 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Julia Lawall <julia.lawall@...6.fr>
cc: Himangi Saraogi <himangi774@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: host: ohci-tmio: Use managed interfaces for resource
allocation
On Mon, 30 Jun 2014, Julia Lawall wrote:
> > > @@ -215,30 +213,31 @@ static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)
> > >
> > > spin_lock_init(&tmio->lock);
> > >
> > > - tmio->ccr = ioremap(config->start, resource_size(config));
> > > + tmio->ccr = devm_ioremap(&dev->dev, config->start,
> > > + resource_size(config));
> >
> > You should use devm_ioremap_resource() rather than devm_ioremap().
>
> Even if there was no request_mem_region in the original code?
Hmmm, that does seem strange.
Looking at some of the other OHCI platform drivers, I see that one of
them (ohci-sa1111.c) calls request_mem_region without ioremap and two
of them (ohci-omap3.c, ohci-tmio.c) call ioremap without
request_mem_region. (ohci-ppc-of.c also calls request_mem_region
without ioremap, but for a totally different reason.)
In the case of ohci-sa1111 this appears to be a platform-specific
thing. Are the other two simply buggy?
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists