Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: Use mfd cell platform_data for tps6105x cells platform bits

With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform data back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the
sub drivers MFD agnostic. This is mostly needed for non MFD aware
sub drivers.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

+4 -3
+2 -1
drivers/mfd/tps6105x.c
··· 183 183 /* Set up and register the platform devices. */ 184 184 for (i = 0; i < ARRAY_SIZE(tps6105x_cells); i++) { 185 185 /* One state holder for all drivers, this is simple */ 186 - tps6105x_cells[i].mfd_data = tps6105x; 186 + tps6105x_cells[i].platform_data = tps6105x; 187 + tps6105x_cells[i].pdata_size = sizeof(*tps6105x); 187 188 } 188 189 189 190 ret = mfd_add_devices(&client->dev, 0, tps6105x_cells,
+2 -2
drivers/regulator/tps6105x-regulator.c
··· 137 137 */ 138 138 static int __devinit tps6105x_regulator_probe(struct platform_device *pdev) 139 139 { 140 - struct tps6105x *tps6105x = mfd_get_data(pdev); 140 + struct tps6105x *tps6105x = dev_get_platdata(&pdev->dev); 141 141 struct tps6105x_platform_data *pdata = tps6105x->pdata; 142 142 int ret; 143 143 ··· 164 164 165 165 static int __devexit tps6105x_regulator_remove(struct platform_device *pdev) 166 166 { 167 - struct tps6105x *tps6105x = platform_get_drvdata(pdev); 167 + struct tps6105x *tps6105x = dev_get_platdata(&pdev->dev); 168 168 regulator_unregister(tps6105x->regulator); 169 169 return 0; 170 170 }