Commit fcd67979d3808afbe357048d928470ef9b37cd4b
Committed by
Samuel Ortiz
1 parent
dab1547a01
Exists in
master
and in
20 other branches
w1: Use mfd_data instead of driver_data for dsw1wm.c
Use mfd_data for passing information from mfd drivers to mfd clients. The mfd_cell's driver_data field is being phased out. Clients that were using driver_data now access .mfd_data via mfd_get_data(). This changes ds1wm only; mfd drivers with other cells are not modified, with the exception of led_cell. The led_cell.driver_data line is dropped from htc-pasic3.c in this patch as well. It's not used in mainline (there's no leds-pasic3 platform driver), so it should be safe to take care of that here. Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Showing 3 changed files with 4 additions and 5 deletions Side-by-side Diff
drivers/mfd/asic3.c
drivers/mfd/htc-pasic3.c
... | ... | @@ -117,7 +117,7 @@ |
117 | 117 | .name = "ds1wm", |
118 | 118 | .enable = ds1wm_enable, |
119 | 119 | .disable = ds1wm_disable, |
120 | - .driver_data = &ds1wm_pdata, | |
120 | + .mfd_data = &ds1wm_pdata, | |
121 | 121 | .num_resources = 2, |
122 | 122 | .resources = ds1wm_resources, |
123 | 123 | }; |
... | ... | @@ -172,7 +172,6 @@ |
172 | 172 | } |
173 | 173 | |
174 | 174 | if (pdata && pdata->led_pdata) { |
175 | - led_cell.driver_data = pdata->led_pdata; | |
176 | 175 | ret = mfd_add_devices(&pdev->dev, pdev->id, &led_cell, 1, r, 0); |
177 | 176 | if (ret < 0) |
178 | 177 | dev_warn(dev, "failed to register LED device\n"); |
drivers/w1/masters/ds1wm.c
... | ... | @@ -216,7 +216,7 @@ |
216 | 216 | static void ds1wm_up(struct ds1wm_data *ds1wm_data) |
217 | 217 | { |
218 | 218 | int divisor; |
219 | - struct ds1wm_driver_data *plat = ds1wm_data->cell->driver_data; | |
219 | + struct ds1wm_driver_data *plat = mfd_get_data(ds1wm_data->pdev); | |
220 | 220 | |
221 | 221 | if (ds1wm_data->cell->enable) |
222 | 222 | ds1wm_data->cell->enable(ds1wm_data->pdev); |
... | ... | @@ -356,7 +356,7 @@ |
356 | 356 | ret = -ENOMEM; |
357 | 357 | goto err0; |
358 | 358 | } |
359 | - plat = cell->driver_data; | |
359 | + plat = mfd_get_data(pdev); | |
360 | 360 | |
361 | 361 | /* calculate bus shift from mem resource */ |
362 | 362 | ds1wm_data->bus_shift = resource_size(res) >> 3; |