summaryrefslogtreecommitdiff
path: root/drivers/mfd/mc13xxx-spi.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2012-07-16 15:40:17 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-07-16 15:40:17 +0200
commit8b8495532c6ba85221b0f9757e1581b52ed66c9a (patch)
treebf221b7aac59b435b7e895ed51bb7cff81ddd640 /drivers/mfd/mc13xxx-spi.c
parentc600040f0d1fecbbe4582c00d99d8f5c4ffd0390 (diff)
mfd: Drop modifying mc13xxx driver's id_table in probe
This was introduced in commit 876989d (mfd: Add device tree probe support for mc13xxx) for spi and later while introducing support for i2c copied to the i2c driver. Modifying driver details is very strange, for example probing an mc13892 device (instantiated via dt) removes the driver's ability to handle (traditionally probed) mc13783 devices in this case. I'm not aware of any problems that make this hack necessary and if there were some, they'd have to be fixed in the spi/i2c core, not in a driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/mc13xxx-spi.c')
-rw-r--r--drivers/mfd/mc13xxx-spi.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c
index 35636261da6c..0bdb43a0aff0 100644
--- a/drivers/mfd/mc13xxx-spi.c
+++ b/drivers/mfd/mc13xxx-spi.c
@@ -119,16 +119,10 @@ static struct regmap_bus regmap_mc13xxx_bus = {
static int mc13xxx_spi_probe(struct spi_device *spi)
{
- const struct of_device_id *of_id;
- struct spi_driver *sdrv = to_spi_driver(spi->dev.driver);
struct mc13xxx *mc13xxx;
struct mc13xxx_platform_data *pdata = dev_get_platdata(&spi->dev);
int ret;
- of_id = of_match_device(mc13xxx_dt_ids, &spi->dev);
- if (of_id)
- sdrv->id_table = &mc13xxx_device_id[(enum mc13xxx_id) of_id->data];
-
mc13xxx = devm_kzalloc(&spi->dev, sizeof(*mc13xxx), GFP_KERNEL);
if (!mc13xxx)
return -ENOMEM;