diff options
Diffstat (limited to 'drivers/mfd/madera-i2c.c')
| -rw-r--r-- | drivers/mfd/madera-i2c.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/mfd/madera-i2c.c b/drivers/mfd/madera-i2c.c index 47e65d88feb0..0986e4a99f4a 100644 --- a/drivers/mfd/madera-i2c.c +++ b/drivers/mfd/madera-i2c.c @@ -10,7 +10,6 @@ #include <linux/i2c.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/regmap.h> #include <linux/mfd/madera/core.h> @@ -19,21 +18,14 @@ static int madera_i2c_probe(struct i2c_client *i2c) { - const struct i2c_device_id *id = i2c_client_get_device_id(i2c); struct madera *madera; const struct regmap_config *regmap_16bit_config = NULL; const struct regmap_config *regmap_32bit_config = NULL; - const void *of_data; unsigned long type; const char *name; int ret; - of_data = of_device_get_match_data(&i2c->dev); - if (of_data) - type = (unsigned long)of_data; - else - type = id->driver_data; - + type = (uintptr_t)i2c_get_match_data(i2c); switch (type) { case CS47L15: if (IS_ENABLED(CONFIG_MFD_CS47L15)) { @@ -139,7 +131,7 @@ static struct i2c_driver madera_i2c_driver = { .pm = &madera_pm_ops, .of_match_table = of_match_ptr(madera_of_match), }, - .probe_new = madera_i2c_probe, + .probe = madera_i2c_probe, .remove = madera_i2c_remove, .id_table = madera_i2c_id, }; |
