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>
This commit is contained in:
parent
afbdbd3760
commit
e823d948b7
@ -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)
|
|||||||
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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user