linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: 'Marc Kleine-Budde' <mkl@pengutronix.de>
Cc: 'Wolfgang Grandegger' <wg@grandegger.com>,
	linux-can@vger.kernel.org, 'Jingoo Han' <jg1.han@samsung.com>
Subject: [PATCH 3/9] can: cc770: use dev_get_platdata()
Date: Tue, 10 Sep 2013 17:41:07 +0900	[thread overview]
Message-ID: <004a01ceae01$7dfebd50$79fc37f0$%han@samsung.com> (raw)
In-Reply-To: <004701ceae01$4303dcd0$c90b9670$%han@samsung.com>

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>
---
 drivers/net/can/cc770/cc770_platform.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
index 034bdd8..ad76734 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;
-- 
1.7.10.4



  parent reply	other threads:[~2013-09-10  8:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10  8:39 [PATCH 0/9] can: use dev_get_platdata() Jingoo Han
2013-09-10  8:40 ` [PATCH 1/9] can: at91_can: " Jingoo Han
2013-09-10  8:40 ` [PATCH 2/9] can: bfin_can: " Jingoo Han
2013-09-10  8:41 ` Jingoo Han [this message]
2013-09-10  8:41 ` [PATCH 4/9] can: flexcan: " Jingoo Han
2013-09-10  8:41 ` [PATCH 5/9] can: janz-ican3: " Jingoo Han
2013-09-10  8:42 ` [PATCH 6/9] can: mcp251x: " Jingoo Han
2013-09-10  8:42 ` [PATCH 7/9] can: sja1000: " Jingoo Han
2013-09-10  8:42 ` [PATCH 8/9] can: softing: " Jingoo Han
2013-09-10  8:43 ` [PATCH 9/9] can: ti_hecc: " Jingoo Han
2013-09-10  9:02 ` [PATCH 0/9] can: " Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004a01ceae01$7dfebd50$79fc37f0$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).