mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 15:18:15 +00:00
usb: chipidea: msm: add remove method
allow this driver to be removed too. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
17d2fcc393
commit
6bf83594e3
1 changed files with 16 additions and 7 deletions
|
@ -84,6 +84,8 @@ static int __devinit ci13xxx_msm_probe(struct platform_device *pdev)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto put_platform;
|
goto put_platform;
|
||||||
|
|
||||||
|
platform_set_drvdata(pdev, plat_ci);
|
||||||
|
|
||||||
pm_runtime_no_callbacks(&pdev->dev);
|
pm_runtime_no_callbacks(&pdev->dev);
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
|
||||||
|
@ -95,16 +97,23 @@ put_platform:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int __devexit ci13xxx_msm_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct platform_device *plat_ci = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
platform_device_unregister(plat_ci);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static struct platform_driver ci13xxx_msm_driver = {
|
static struct platform_driver ci13xxx_msm_driver = {
|
||||||
.probe = ci13xxx_msm_probe,
|
.probe = ci13xxx_msm_probe,
|
||||||
|
.remove = __devexit_p(ci13xxx_msm_remove),
|
||||||
.driver = { .name = "msm_hsusb", },
|
.driver = { .name = "msm_hsusb", },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module_platform_driver(ci13xxx_msm_driver);
|
||||||
|
|
||||||
MODULE_ALIAS("platform:msm_hsusb");
|
MODULE_ALIAS("platform:msm_hsusb");
|
||||||
|
|
||||||
static int __init ci13xxx_msm_init(void)
|
|
||||||
{
|
|
||||||
return platform_driver_register(&ci13xxx_msm_driver);
|
|
||||||
}
|
|
||||||
module_init(ci13xxx_msm_init);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL v2");
|
MODULE_LICENSE("GPL v2");
|
||||||
|
|
Loading…
Add table
Reference in a new issue