diff options
-rw-r--r-- | drivers/mfd/mc13xxx-i2c.c | 6 | ||||
-rw-r--r-- | drivers/mfd/mc13xxx-spi.c | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/drivers/mfd/mc13xxx-i2c.c b/drivers/mfd/mc13xxx-i2c.c index 18d29f3ca67f..9d18dde3cd2a 100644 --- a/drivers/mfd/mc13xxx-i2c.c +++ b/drivers/mfd/mc13xxx-i2c.c | |||
@@ -53,16 +53,10 @@ static struct regmap_config mc13xxx_regmap_i2c_config = { | |||
53 | static int mc13xxx_i2c_probe(struct i2c_client *client, | 53 | static int mc13xxx_i2c_probe(struct i2c_client *client, |
54 | const struct i2c_device_id *id) | 54 | const struct i2c_device_id *id) |
55 | { | 55 | { |
56 | const struct of_device_id *of_id; | ||
57 | struct i2c_driver *idrv = to_i2c_driver(client->dev.driver); | ||
58 | struct mc13xxx *mc13xxx; | 56 | struct mc13xxx *mc13xxx; |
59 | struct mc13xxx_platform_data *pdata = dev_get_platdata(&client->dev); | 57 | struct mc13xxx_platform_data *pdata = dev_get_platdata(&client->dev); |
60 | int ret; | 58 | int ret; |
61 | 59 | ||
62 | of_id = of_match_device(mc13xxx_dt_ids, &client->dev); | ||
63 | if (of_id) | ||
64 | idrv->id_table = (const struct i2c_device_id*) of_id->data; | ||
65 | |||
66 | mc13xxx = devm_kzalloc(&client->dev, sizeof(*mc13xxx), GFP_KERNEL); | 60 | mc13xxx = devm_kzalloc(&client->dev, sizeof(*mc13xxx), GFP_KERNEL); |
67 | if (!mc13xxx) | 61 | if (!mc13xxx) |
68 | return -ENOMEM; | 62 | return -ENOMEM; |
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 = { | |||
119 | 119 | ||
120 | static int mc13xxx_spi_probe(struct spi_device *spi) | 120 | static int mc13xxx_spi_probe(struct spi_device *spi) |
121 | { | 121 | { |
122 | const struct of_device_id *of_id; | ||
123 | struct spi_driver *sdrv = to_spi_driver(spi->dev.driver); | ||
124 | struct mc13xxx *mc13xxx; | 122 | struct mc13xxx *mc13xxx; |
125 | struct mc13xxx_platform_data *pdata = dev_get_platdata(&spi->dev); | 123 | struct mc13xxx_platform_data *pdata = dev_get_platdata(&spi->dev); |
126 | int ret; | 124 | int ret; |
127 | 125 | ||
128 | of_id = of_match_device(mc13xxx_dt_ids, &spi->dev); | ||
129 | if (of_id) | ||
130 | sdrv->id_table = &mc13xxx_device_id[(enum mc13xxx_id) of_id->data]; | ||
131 | |||
132 | mc13xxx = devm_kzalloc(&spi->dev, sizeof(*mc13xxx), GFP_KERNEL); | 126 | mc13xxx = devm_kzalloc(&spi->dev, sizeof(*mc13xxx), GFP_KERNEL); |
133 | if (!mc13xxx) | 127 | if (!mc13xxx) |
134 | return -ENOMEM; | 128 | return -ENOMEM; |