Skip to contentSkip to conversation

ab3100: mfd_cell is now implicitly available to drivers

PATCH In review Andres Salomon 1 participant 1 message Feb 12, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/17 ab3100: mfd_cell is now implicitly available to drivers

The cell's platform_data is now accessed with a helper function; change clients to use that, and remove the now-unused data_size.

---
 drivers/mfd/ab3100-core.c  |    4 +---
 drivers/regulator/ab3100.c |    2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/mfd/ab3100-core.c +1 -3
index 4193af5..b44c3d9 100644
@@ -949,10 +949,8 @@ static int __devinit ab3100_probe(struct i2c_client *client,
 		goto exit_no_ops;
 
 	/* Set up and register the platform devices. */
-	for (i = 0; i < ARRAY_SIZE(ab3100_devs); i++) {
+	for (i = 0; i < ARRAY_SIZE(ab3100_devs); i++)
 		ab3100_devs[i].platform_data = ab3100_plf_data;
-		ab3100_devs[i].data_size = sizeof(struct ab3100_platform_data);
-	}
 
 	err = mfd_add_devices(&client->dev, 0, ab3100_devs,
 		ARRAY_SIZE(ab3100_devs), NULL, 0);
drivers/regulator/ab3100.c +1 -1
index ed6feaf..c204f6b 100644
@@ -576,7 +576,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
 
 static int __devinit ab3100_regulators_probe(struct platform_device *pdev)
 {
-	struct ab3100_platform_data *plfdata = pdev->dev.platform_data;
+	struct ab3100_platform_data *plfdata = mfd_get_data(pdev);
 	int err = 0;
 	u8 data;
 	int i;
Signature · 1 line
1.7.2.3