diff options
author | Jingoo Han <jg1.han@samsung.com> | 2014-02-19 00:41:42 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-24 20:07:52 -0500 |
commit | fad56745a641750745d85f59d5cc640a1a4c1719 (patch) | |
tree | 03980fc164e0cda63519a97516677ec6b8dedcf3 /drivers/usb/chipidea | |
parent | 64fc06c40e01aa8129f5bc4c51567b5e205126b0 (diff) |
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 <peter.chen@freescale.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
505 | int ret; | 505 | int ret; |
506 | enum usb_dr_mode dr_mode; | 506 | enum usb_dr_mode dr_mode; |
507 | 507 | ||
508 | if (!dev->platform_data) { | 508 | if (!dev_get_platdata(dev)) { |
509 | dev_err(dev, "platform data missing\n"); | 509 | dev_err(dev, "platform data missing\n"); |
510 | return -ENODEV; | 510 | return -ENODEV; |
511 | } | 511 | } |
@@ -522,7 +522,7 @@ static int ci_hdrc_probe(struct platform_device *pdev) | |||
522 | } | 522 | } |
523 | 523 | ||
524 | ci->dev = dev; | 524 | ci->dev = dev; |
525 | ci->platdata = dev->platform_data; | 525 | ci->platdata = dev_get_platdata(dev); |
526 | ci->imx28_write_fix = !!(ci->platdata->flags & | 526 | ci->imx28_write_fix = !!(ci->platdata->flags & |
527 | CI_HDRC_IMX28_WRITE_FIX); | 527 | CI_HDRC_IMX28_WRITE_FIX); |
528 | 528 | ||