Commit e19f0305 authored by Jingoo Han's avatar Jingoo Han Committed by Marc Kleine-Budde

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 321165c3
...@@ -152,7 +152,7 @@ static int cc770_get_platform_data(struct platform_device *pdev, ...@@ -152,7 +152,7 @@ static int cc770_get_platform_data(struct platform_device *pdev,
struct cc770_priv *priv) 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; priv->can.clock.freq = pdata->osc_freq;
if (priv->cpu_interface & CPUIF_DSC) if (priv->cpu_interface & CPUIF_DSC)
...@@ -203,7 +203,7 @@ static int cc770_platform_probe(struct platform_device *pdev) ...@@ -203,7 +203,7 @@ static int cc770_platform_probe(struct platform_device *pdev)
if (pdev->dev.of_node) if (pdev->dev.of_node)
err = cc770_get_of_node_data(pdev, priv); 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); err = cc770_get_platform_data(pdev, priv);
else else
err = -ENODEV; err = -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment