diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2019-04-30 09:59:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-30 17:55:08 +0200 |
commit | e823d948b7e53dc982c867ac4ce7877fc0418897 (patch) | |
tree | 9552df4befdf6341c8246289add64c8d45c7d99c | |
parent | afbdbd37600b127b37ad88223ed7255fdc9fee92 (diff) | |
download | linux-stable-e823d948b7e53dc982c867ac4ce7877fc0418897.tar.gz linux-stable-e823d948b7e53dc982c867ac4ce7877fc0418897.tar.bz2 linux-stable-e823d948b7e53dc982c867ac4ce7877fc0418897.zip |
usb: musb: dsps: Use dev_get_drvdata()
Using dev_get_drvdata directly.
Cc: Bin Liu <b-liu@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 403eb97915f8..327d4f7baaf7 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -168,8 +168,7 @@ static void dsps_mod_timer_optional(struct dsps_glue *glue) static void dsps_musb_enable(struct musb *musb) { struct device *dev = musb->controller; - struct platform_device *pdev = to_platform_device(dev->parent); - struct dsps_glue *glue = platform_get_drvdata(pdev); + struct dsps_glue *glue = dev_get_drvdata(dev->parent); const struct dsps_musb_wrapper *wrp = glue->wrp; void __iomem *reg_base = musb->ctrl_base; u32 epmask, coremask; @@ -195,8 +194,7 @@ static void dsps_musb_enable(struct musb *musb) static void dsps_musb_disable(struct musb *musb) { struct device *dev = musb->controller; - struct platform_device *pdev = to_platform_device(dev->parent); - struct dsps_glue *glue = platform_get_drvdata(pdev); + struct dsps_glue *glue = dev_get_drvdata(dev->parent); const struct dsps_musb_wrapper *wrp = glue->wrp; void __iomem *reg_base = musb->ctrl_base; |