usb: musb: no need to access platform_device
authorFelipe Balbi <balbi@ti.com>
Mon, 27 Jun 2011 12:57:12 +0000 (15:57 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Jul 2011 21:31:15 +0000 (14:31 -0700)
dev_get_drvdata() is exactly the same as
platform_get_drvdata(). Drop that useless
access to the platform device.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_core.c

index e2ab4521985583b275810c9032f11a496a2e6357..c6ab321416bf552520adaee97216e39f4767322e 100644 (file)
@@ -2286,9 +2286,8 @@ static void musb_restore_context(struct musb *musb)
 
 static int musb_suspend(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
+       struct musb     *musb = dev_to_musb(dev);
        unsigned long   flags;
-       struct musb     *musb = dev_to_musb(&pdev->dev);
 
        spin_lock_irqsave(&musb->lock, flags);
 
@@ -2310,8 +2309,7 @@ static int musb_suspend(struct device *dev)
 
 static int musb_resume_noirq(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct musb     *musb = dev_to_musb(&pdev->dev);
+       struct musb     *musb = dev_to_musb(dev);
 
        musb_restore_context(musb);
 
This page took 0.027445 seconds and 5 git commands to generate.