diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2013-06-05 10:13:47 -0400 |
---|---|---|
committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2013-06-12 11:58:59 -0400 |
commit | a9bce1b03c2199e66d36cda8aac675338bc074a7 (patch) | |
tree | 1f02ee8522388834c2a31de21dd8b7b38409f457 /drivers/mfd/ti_am335x_tscadc.c | |
parent | d683b96b072dc4680fc74964eca77e6a23d1fa6e (diff) |
mfd: input: iio: ti_am335x_adc: use one structure for ti_tscadc_dev
The mfd driver creates platform data for the child devices and it is the
ti_tscadc_dev struct. This struct is copied for the two devices.
The copy of the structure makes a common lock in this structure a little
less usefull. Therefore the platform data is not a pointer to the
structure and the same structure is used.
While doing the change I noticed that the suspend/resume code assumes
the wrong pointer for ti_tscadc_dev and this has been fixed as well.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'drivers/mfd/ti_am335x_tscadc.c')
-rw-r--r-- | drivers/mfd/ti_am335x_tscadc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index e9f3fb510b44..772ea2adb539 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c | |||
@@ -176,14 +176,14 @@ static int ti_tscadc_probe(struct platform_device *pdev) | |||
176 | /* TSC Cell */ | 176 | /* TSC Cell */ |
177 | cell = &tscadc->cells[TSC_CELL]; | 177 | cell = &tscadc->cells[TSC_CELL]; |
178 | cell->name = "tsc"; | 178 | cell->name = "tsc"; |
179 | cell->platform_data = tscadc; | 179 | cell->platform_data = &tscadc; |
180 | cell->pdata_size = sizeof(*tscadc); | 180 | cell->pdata_size = sizeof(tscadc); |
181 | 181 | ||
182 | /* ADC Cell */ | 182 | /* ADC Cell */ |
183 | cell = &tscadc->cells[ADC_CELL]; | 183 | cell = &tscadc->cells[ADC_CELL]; |
184 | cell->name = "tiadc"; | 184 | cell->name = "tiadc"; |
185 | cell->platform_data = tscadc; | 185 | cell->platform_data = &tscadc; |
186 | cell->pdata_size = sizeof(*tscadc); | 186 | cell->pdata_size = sizeof(tscadc); |
187 | 187 | ||
188 | err = mfd_add_devices(&pdev->dev, pdev->id, tscadc->cells, | 188 | err = mfd_add_devices(&pdev->dev, pdev->id, tscadc->cells, |
189 | TSCADC_CELLS, NULL, 0, NULL); | 189 | TSCADC_CELLS, NULL, 0, NULL); |