diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-08-05 13:31:20 +0530 |
---|---|---|
committer | Lokesh Pathak <lpathak@nvidia.com> | 2012-08-07 08:46:06 -0700 |
commit | 20f1a101e669063e050a26e722bbc292d389352a (patch) | |
tree | f24cadcebf3b680834130c3be69a3ad3a226e5af | |
parent | bb4dfdc63e617afe49eb727f70e6638d7e8759c2 (diff) |
mfd: tps80031: remove support for subdevs registration
The mfd sub devices should get added through the
mfd_add_devices() not through legacy style of
adding sub devices.
Change-Id: If275d41629d799f1e22d95fd442ebe7d3ace448e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/121137
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/board-enterprise-power.c | 3 | ||||
-rw-r--r-- | drivers/mfd/tps80031.c | 46 | ||||
-rw-r--r-- | include/linux/mfd/tps80031.h | 2 |
3 files changed, 0 insertions, 51 deletions
diff --git a/arch/arm/mach-tegra/board-enterprise-power.c b/arch/arm/mach-tegra/board-enterprise-power.c index cfcfe9e61ec5..f974c49c9f50 100644 --- a/arch/arm/mach-tegra/board-enterprise-power.c +++ b/arch/arm/mach-tegra/board-enterprise-power.c @@ -721,9 +721,6 @@ int __init enterprise_regulator_init(void) battery_gauge_data.battery_present = 0; } - tps_platform.num_subdevs = ARRAY_SIZE(tps80031_devs); - tps_platform.subdevs = tps80031_devs; - if (board_info.fab < BOARD_FAB_A03) { tps_platform.num_regulator_pdata = ARRAY_SIZE(tps80031_reg_pdata_a02); tps_platform.regulator_pdata = tps80031_reg_pdata_a02; diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c index 10ae059a3818..002b7d022d70 100644 --- a/drivers/mfd/tps80031.c +++ b/drivers/mfd/tps80031.c @@ -691,17 +691,6 @@ static void tps80031_gpio_init(struct tps80031 *tps80031, dev_warn(tps80031->dev, "GPIO registration failed: %d\n", ret); } -static int __remove_subdev(struct device *dev, void *unused) -{ - platform_device_unregister(to_platform_device(dev)); - return 0; -} - -static int tps80031_remove_subdevs(struct tps80031 *tps80031) -{ - return device_for_each_child(tps80031->dev, NULL, __remove_subdev); -} - static void tps80031_irq_lock(struct irq_data *data) { struct tps80031 *tps80031 = irq_data_get_irq_chip_data(data); @@ -1024,32 +1013,6 @@ static void tps80031_clk32k_init(struct tps80031 *tps80031, } } -static int __devinit tps80031_add_subdevs(struct tps80031 *tps80031, - struct tps80031_platform_data *pdata) -{ - struct tps80031_subdev_info *subdev; - struct platform_device *pdev; - int i, ret = 0; - - for (i = 0; i < pdata->num_subdevs; i++) { - subdev = &pdata->subdevs[i]; - - pdev = platform_device_alloc(subdev->name, subdev->id); - - pdev->dev.parent = tps80031->dev; - pdev->dev.platform_data = subdev->platform_data; - - ret = platform_device_add(pdev); - if (ret) - goto failed; - } - return 0; - -failed: - tps80031_remove_subdevs(tps80031); - return ret; -} - #ifdef CONFIG_DEBUG_FS #include <linux/debugfs.h> #include <linux/seq_file.h> @@ -1360,12 +1323,6 @@ static int __devinit tps80031_i2c_probe(struct i2c_client *client, goto fail_mfd_add; } - ret = tps80031_add_subdevs(tps80031, pdata); - if (ret) { - dev_err(&client->dev, "add devices failed: %d\n", ret); - goto fail_add_subdev; - } - tps80031_gpio_init(tps80031, pdata); tps80031_clk32k_init(tps80031, pdata); @@ -1381,9 +1338,6 @@ static int __devinit tps80031_i2c_probe(struct i2c_client *client, return 0; -fail_add_subdev: - mfd_remove_devices(tps80031->dev); - fail_mfd_add: if (client->irq) free_irq(client->irq, tps80031); diff --git a/include/linux/mfd/tps80031.h b/include/linux/mfd/tps80031.h index 573c8a5ee38c..2fa29e910ba2 100644 --- a/include/linux/mfd/tps80031.h +++ b/include/linux/mfd/tps80031.h @@ -190,8 +190,6 @@ struct tps80031_bg_platform_data { }; struct tps80031_platform_data { - int num_subdevs; - struct tps80031_subdev_info *subdevs; int gpio_base; int irq_base; struct tps80031_32kclock_plat_data *clk32k_pdata; |