Skip to contentSkip to conversation

+ w1-ds1wm-use-dev_get_platdata.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Sep 13, 2013 W1 dallas's 1-wire bus

lore
Share & tools
lore
#0 lore raw

Subject: + w1-ds1wm-use-dev_get_platdata.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 13 Sep 2013 16:01:16 -0700

The patch titled
Subject: drivers/w1/masters/ds1wm.cuse dev_get_platdata()
has been added to the -mm tree. Its filename is
w1-ds1wm-use-dev_get_platdata.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/w1-ds1wm-use-dev_get_platdata.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/w1-ds1wm-use-dev_get_platdata.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Jingoo Han <[email protected]>
Subject: drivers/w1/masters/ds1wm.cuse 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.

---

 drivers/w1/masters/ds1wm.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/w1/masters/ds1wm.c renamed from drivers/w1/masters/ds1wm.c~w1-ds1wm-use-dev_get_platdata +6 -6
diff -puN drivers/w1/masters/ds1wm.c~w1-ds1wm-use-dev_get_platdata drivers/w1/masters/ds1wm.c
@@ -255,17 +255,17 @@ static int ds1wm_find_divisor(int gclk)
 static void ds1wm_up(struct ds1wm_data *ds1wm_data)
 {
 	int divisor;
-	struct ds1wm_driver_data *plat = ds1wm_data->pdev->dev.platform_data;
+	struct device *dev = &ds1wm_data->pdev->dev;
+	struct ds1wm_driver_data *plat = dev_get_platdata(dev);
 
 	if (ds1wm_data->cell->enable)
 		ds1wm_data->cell->enable(ds1wm_data->pdev);
 
 	divisor = ds1wm_find_divisor(plat->clock_rate);
-	dev_dbg(&ds1wm_data->pdev->dev,
-		"found divisor 0x%x for clock %d\n", divisor, plat->clock_rate);
+	dev_dbg(dev, "found divisor 0x%x for clock %d\n",
+		divisor, plat->clock_rate);
 	if (divisor == 0) {
-		dev_err(&ds1wm_data->pdev->dev,
-			"no suitable divisor for %dHz clock\n",
+		dev_err(dev, "no suitable divisor for %dHz clock\n",
 			plat->clock_rate);
 		return;
 	}
@@ -481,7 +481,7 @@ static int ds1wm_probe(struct platform_d
 	ds1wm_data->cell = mfd_get_cell(pdev);
 	if (!ds1wm_data->cell)
 		return -ENODEV;
-	plat = pdev->dev.platform_data;
+	plat = dev_get_platdata(&pdev->dev);
 	if (!plat)
 		return -ENODEV;
 

_

Patches currently in -mm which might be from [email protected] are

origin.patch
linux-next.patch
w1-w1-gpio-use-dev_get_platdata.patch
w1-ds1wm-use-dev_get_platdata.patch