Re: [PATCH 02/17] usb: isp1760: Move removal cleanup code to isp1760-hcd.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 06, 2014 at 06:54:50PM +0300, Laurent Pinchart wrote:
> The removal cleanup code is duplicated between the different bus glues.
> Move it to a central location.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> ---
>  drivers/usb/host/isp1760-hcd.c | 15 ++++++++
>  drivers/usb/host/isp1760-hcd.h |  2 ++
>  drivers/usb/host/isp1760-if.c  | 80 ++++++++++++------------------------------
>  3 files changed, 39 insertions(+), 58 deletions(-)
> 
> diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
> index 51a0ae9..281de5e 100644
> --- a/drivers/usb/host/isp1760-hcd.c
> +++ b/drivers/usb/host/isp1760-hcd.c
> @@ -2263,6 +2263,21 @@ err_put:
>  	 return ERR_PTR(ret);
>  }
>  
> +void isp1760_unregister(struct device *dev)
> +{
> +	struct usb_hcd *hcd = dev_get_drvdata(dev);
> +	struct isp1760_hcd *priv = hcd_to_priv(hcd);
> +
> +	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
> +
> +	usb_remove_hcd(hcd);

IIRC usb_remove_hcd() still accesses iomem, it might be better to keep
the order as it was and only release_mem_region() after
iounmap().

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux