usb: dwc3: use dev_get_platdata()
authorFelipe Balbi <balbi@ti.com>
Wed, 31 Jul 2013 06:21:25 +0000 (09:21 +0300)
committerFelipe Balbi <balbi@ti.com>
Wed, 31 Jul 2013 13:52:02 +0000 (16:52 +0300)
Use the wrapper function for retrieving the
platform_data instead of accessing dev->platform_data
directly.

While at that also make change 'node' initialization
to use the dev pointer.

Inspired-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.c

index da0a4b8b33ed86ac6471dc5fafa9fd789134683e..3ff6f0ad01df2d85b8a3c196855fc85fa39e0490 100644 (file)
@@ -350,11 +350,11 @@ static void dwc3_core_exit(struct dwc3 *dwc)
 
 static int dwc3_probe(struct platform_device *pdev)
 {
-       struct dwc3_platform_data *pdata = pdev->dev.platform_data;
-       struct device_node      *node = pdev->dev.of_node;
+       struct device           *dev = &pdev->dev;
+       struct dwc3_platform_data *pdata = dev_get_platdata(dev);
+       struct device_node      *node = dev->of_node;
        struct resource         *res;
        struct dwc3             *dwc;
-       struct device           *dev = &pdev->dev;
 
        int                     ret = -ENOMEM;