summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2012-08-05 13:31:20 +0530
committerLokesh Pathak <lpathak@nvidia.com>2012-08-07 08:46:06 -0700
commit20f1a101e669063e050a26e722bbc292d389352a (patch)
treef24cadcebf3b680834130c3be69a3ad3a226e5af /drivers
parentbb4dfdc63e617afe49eb727f70e6638d7e8759c2 (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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/tps80031.c46
1 files changed, 0 insertions, 46 deletions
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);