]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: chipidea: use dev_get_platdata()
authorJingoo Han <jg1.han@samsung.com>
Wed, 19 Feb 2014 05:41:42 +0000 (13:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Feb 2014 01:07:52 +0000 (17:07 -0800)
Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/core.c

index 75aaa9c3cc4a5ff8d14eac2a0c2aa6b2c93bcd92..47b4bd860b65ad8fa5c469eeca4cb087fec7cdae 100644 (file)
@@ -505,7 +505,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
        int             ret;
        enum usb_dr_mode dr_mode;
 
-       if (!dev->platform_data) {
+       if (!dev_get_platdata(dev)) {
                dev_err(dev, "platform data missing\n");
                return -ENODEV;
        }
@@ -522,7 +522,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
        }
 
        ci->dev = dev;
-       ci->platdata = dev->platform_data;
+       ci->platdata = dev_get_platdata(dev);
        ci->imx28_write_fix = !!(ci->platdata->flags &
                CI_HDRC_IMX28_WRITE_FIX);