diff options
author | Andres Salomon <dilinger@queued.net> | 2011-02-17 22:07:10 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-03-23 05:41:50 -0400 |
commit | 6a54ac2149ab5b8972bb4f77bd42b43dbeabb56f (patch) | |
tree | a9a26ba9630e8a341d80c12821b97369a44716b8 /drivers | |
parent | fe891a008f3310be47786e87c158edebdb71e265 (diff) |
mfd: mfd_cell is now implicitly available to jz4740 drivers
No need to explicitly set the cell's platform_data/data_size.
Modify clients to use mfd_get_cell helper function instead of
accessing platform_data directly.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/jz4740-hwmon.c | 2 | ||||
-rw-r--r-- | drivers/mfd/jz4740-adc.c | 4 | ||||
-rw-r--r-- | drivers/power/jz4740-battery.c | 2 |
3 files changed, 2 insertions, 6 deletions
diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c index 1c8b3d9e2051..40f106d95afe 100644 --- a/drivers/hwmon/jz4740-hwmon.c +++ b/drivers/hwmon/jz4740-hwmon.c | |||
@@ -112,7 +112,7 @@ static int __devinit jz4740_hwmon_probe(struct platform_device *pdev) | |||
112 | return -ENOMEM; | 112 | return -ENOMEM; |
113 | } | 113 | } |
114 | 114 | ||
115 | hwmon->cell = pdev->dev.platform_data; | 115 | hwmon->cell = mfd_get_cell(pdev); |
116 | 116 | ||
117 | hwmon->irq = platform_get_irq(pdev, 0); | 117 | hwmon->irq = platform_get_irq(pdev, 0); |
118 | if (hwmon->irq < 0) { | 118 | if (hwmon->irq < 0) { |
diff --git a/drivers/mfd/jz4740-adc.c b/drivers/mfd/jz4740-adc.c index 0cc59795f600..aa518b9beaf5 100644 --- a/drivers/mfd/jz4740-adc.c +++ b/drivers/mfd/jz4740-adc.c | |||
@@ -232,8 +232,6 @@ const struct mfd_cell jz4740_adc_cells[] = { | |||
232 | .name = "jz4740-hwmon", | 232 | .name = "jz4740-hwmon", |
233 | .num_resources = ARRAY_SIZE(jz4740_hwmon_resources), | 233 | .num_resources = ARRAY_SIZE(jz4740_hwmon_resources), |
234 | .resources = jz4740_hwmon_resources, | 234 | .resources = jz4740_hwmon_resources, |
235 | .platform_data = (void *)&jz4740_adc_cells[0], | ||
236 | .data_size = sizeof(struct mfd_cell), | ||
237 | 235 | ||
238 | .enable = jz4740_adc_cell_enable, | 236 | .enable = jz4740_adc_cell_enable, |
239 | .disable = jz4740_adc_cell_disable, | 237 | .disable = jz4740_adc_cell_disable, |
@@ -243,8 +241,6 @@ const struct mfd_cell jz4740_adc_cells[] = { | |||
243 | .name = "jz4740-battery", | 241 | .name = "jz4740-battery", |
244 | .num_resources = ARRAY_SIZE(jz4740_battery_resources), | 242 | .num_resources = ARRAY_SIZE(jz4740_battery_resources), |
245 | .resources = jz4740_battery_resources, | 243 | .resources = jz4740_battery_resources, |
246 | .platform_data = (void *)&jz4740_adc_cells[1], | ||
247 | .data_size = sizeof(struct mfd_cell), | ||
248 | 244 | ||
249 | .enable = jz4740_adc_cell_enable, | 245 | .enable = jz4740_adc_cell_enable, |
250 | .disable = jz4740_adc_cell_disable, | 246 | .disable = jz4740_adc_cell_disable, |
diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c index 02414db6a94c..0938650a466c 100644 --- a/drivers/power/jz4740-battery.c +++ b/drivers/power/jz4740-battery.c | |||
@@ -258,7 +258,7 @@ static int __devinit jz_battery_probe(struct platform_device *pdev) | |||
258 | return -ENOMEM; | 258 | return -ENOMEM; |
259 | } | 259 | } |
260 | 260 | ||
261 | jz_battery->cell = pdev->dev.platform_data; | 261 | jz_battery->cell = mfd_get_cell(pdev); |
262 | 262 | ||
263 | jz_battery->irq = platform_get_irq(pdev, 0); | 263 | jz_battery->irq = platform_get_irq(pdev, 0); |
264 | if (jz_battery->irq < 0) { | 264 | if (jz_battery->irq < 0) { |