[PATCH v7 04/14] usb: chipidea: msm: add remove method

ABRAHAM, KISHON VIJAY kishon at ti.com
Mon Jun 25 09:18:06 EDT 2012


Hi,

On Mon, Jun 25, 2012 at 12:26 PM, Richard Zhao
<richard.zhao at freescale.com> wrote:
> From: Felipe Balbi <balbi at ti.com>
>
> allow this driver to be removed too.
>
> Signed-off-by: Felipe Balbi <balbi at ti.com>
> Signed-off-by: Alexander Shishkin <alexander.shishkin at linux.intel.com>
> ---
>  drivers/usb/chipidea/ci13xxx_msm.c |   20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/usb/chipidea/ci13xxx_msm.c b/drivers/usb/chipidea/ci13xxx_msm.c
> index 8d438b8..68512d4 100644
> --- a/drivers/usb/chipidea/ci13xxx_msm.c
> +++ b/drivers/usb/chipidea/ci13xxx_msm.c
> @@ -84,6 +84,8 @@ static int __devinit ci13xxx_msm_probe(struct platform_device *pdev)
>        if (ret)
>                goto put_platform;
>
> +       platform_set_drvdata(pdev, plat_ci);
> +
>        pm_runtime_no_callbacks(&pdev->dev);
>        pm_runtime_enable(&pdev->dev);
>
> @@ -95,16 +97,22 @@ put_platform:
>        return ret;
>  }
>
> +static int __devexit ci13xxx_msm_remove(struct platform_device *pdev)
> +{
> +       struct platform_device *plat_ci = platform_get_drvdata(pdev);

How about a pm_runtime_disable() here?

> +
> +       platform_device_unregister(plat_ci);
> +
> +       return 0;
> +}

Thanks
Kishon



More information about the linux-arm-kernel mailing list