lkml.org 
[lkml]   [2014]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2014-06-30 19:41    [W:0.028 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site