Commit e823d948 authored by Kefeng Wang's avatar Kefeng Wang Committed by Greg Kroah-Hartman

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: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent afbdbd37
...@@ -168,8 +168,7 @@ static void dsps_mod_timer_optional(struct dsps_glue *glue) ...@@ -168,8 +168,7 @@ static void dsps_mod_timer_optional(struct dsps_glue *glue)
static void dsps_musb_enable(struct musb *musb) static void dsps_musb_enable(struct musb *musb)
{ {
struct device *dev = musb->controller; struct device *dev = musb->controller;
struct platform_device *pdev = to_platform_device(dev->parent); struct dsps_glue *glue = dev_get_drvdata(dev->parent);
struct dsps_glue *glue = platform_get_drvdata(pdev);
const struct dsps_musb_wrapper *wrp = glue->wrp; const struct dsps_musb_wrapper *wrp = glue->wrp;
void __iomem *reg_base = musb->ctrl_base; void __iomem *reg_base = musb->ctrl_base;
u32 epmask, coremask; u32 epmask, coremask;
...@@ -195,8 +194,7 @@ static void dsps_musb_enable(struct musb *musb) ...@@ -195,8 +194,7 @@ static void dsps_musb_enable(struct musb *musb)
static void dsps_musb_disable(struct musb *musb) static void dsps_musb_disable(struct musb *musb)
{ {
struct device *dev = musb->controller; struct device *dev = musb->controller;
struct platform_device *pdev = to_platform_device(dev->parent); struct dsps_glue *glue = dev_get_drvdata(dev->parent);
struct dsps_glue *glue = platform_get_drvdata(pdev);
const struct dsps_musb_wrapper *wrp = glue->wrp; const struct dsps_musb_wrapper *wrp = glue->wrp;
void __iomem *reg_base = musb->ctrl_base; void __iomem *reg_base = musb->ctrl_base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment