summaryrefslogtreecommitdiff
path: root/drivers/net/can/cc770
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-10 17:41:07 +0900
committerMarc Kleine-Budde <mkl@pengutronix.de>2013-09-21 15:43:13 +0200
commite19f0305450a05076a236b62c11777c966d580a8 (patch)
tree6585cabced7a9e4997c07d9eebcf35906de9a85d /drivers/net/can/cc770
parent321165c3e703db177fb3324939fc6c3872d22fce (diff)
can: cc770: 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: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/cc770')
-rw-r--r--drivers/net/can/cc770/cc770_platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
index 034bdd816a60..ad76734b3ecc 100644
--- a/drivers/net/can/cc770/cc770_platform.c
+++ b/drivers/net/can/cc770/cc770_platform.c
@@ -152,7 +152,7 @@ static int cc770_get_platform_data(struct platform_device *pdev,
struct cc770_priv *priv)
{
- struct cc770_platform_data *pdata = pdev->dev.platform_data;
+ struct cc770_platform_data *pdata = dev_get_platdata(&pdev->dev);
priv->can.clock.freq = pdata->osc_freq;
if (priv->cpu_interface & CPUIF_DSC)
@@ -203,7 +203,7 @@ static int cc770_platform_probe(struct platform_device *pdev)
if (pdev->dev.of_node)
err = cc770_get_of_node_data(pdev, priv);
- else if (pdev->dev.platform_data)
+ else if (dev_get_platdata(&pdev->dev))
err = cc770_get_platform_data(pdev, priv);
else
err = -ENODEV;