Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755352AbaF3Qds (ORCPT ); Mon, 30 Jun 2014 12:33:48 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:40810 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754188AbaF3Qdq (ORCPT ); Mon, 30 Jun 2014 12:33:46 -0400 Date: Mon, 30 Jun 2014 12:33:45 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Julia Lawall cc: Himangi Saraogi , Greg Kroah-Hartman , , Subject: Re: [PATCH] usb: host: ohci-tmio: Use managed interfaces for resource allocation In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/