From: Jingoo Han Date: Wed, 19 Feb 2014 05:41:42 +0000 (+0800) Subject: usb: chipidea: use dev_get_platdata() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fad56745a641750745d85f59d5cc640a1a4c1719;p=linux-beck.git usb: chipidea: use dev_get_platdata() 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 Signed-off-by: Jingoo Han Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 75aaa9c3cc4a..47b4bd860b65 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -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);