[PATCH] usb: ohci: remove ep93xx bus glue platform driver

Alan Stern stern at rowland.harvard.edu
Tue Oct 15 10:48:59 EDT 2013


On Mon, 14 Oct 2013, H Hartley Sweeten wrote:

> Convert ep93xx to use the OHCI platform driver and remove the
> ohci-ep93xx bus glue driver.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> Cc: Alan Stern <stern at rowland.harvard.edu>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> Cc: Ryan Mallon <rmallon at gmail.com>

...

> @@ -297,22 +298,58 @@ static struct platform_device ep93xx_rtc_device = {
>  	.resource	= ep93xx_rtc_resource,
>  };
>  
> +/*************************************************************************
> + * EP93xx OHCI USB Host
> + *************************************************************************/
> +
> +static struct clk *ep93xx_ohci_host_clock;
> +
> +static int ep93xx_ohci_power_on(struct platform_device *pdev)
> +{
> +	if (!ep93xx_ohci_host_clock) {
> +		ep93xx_ohci_host_clock = devm_clk_get(&pdev->dev, NULL);
> +		if (IS_ERR(ep93xx_ohci_host_clock))
> +			return PTR_ERR(ep93xx_ohci_host_clock);
> +	}
> +
> +	clk_enable(ep93xx_ohci_host_clock);
> +
> +	return 0;
> +}
> +
> +static void ep93xx_ohci_power_off(struct platform_device *pdev)
> +{
> +	clk_disable(ep93xx_ohci_host_clock);
> +}
> +
> +static void ep93xx_ohci_power_suspend(struct platform_device *pdev)
> +{
> +	ep93xx_ohci_power_off(pdev);
> +}
> +
> +static struct usb_ohci_pdata ep93xx_ohci_pdata = {
> +	.power_on	= ep93xx_ohci_power_on,
> +	.power_off	= ep93xx_ohci_power_off,
> +	.power_suspend	= ep93xx_ohci_power_suspend,
> +};

You don't need to have a separate ep93xx_ohci_power_suspend() routine.  
Just initialize the method entry for .power_suspend to point to 
ep93xx_ohci_power_off.

Alan Stern




More information about the linux-arm-kernel mailing list