diff options
Diffstat (limited to '')
-rw-r--r-- | drivers/mfd/lp87565.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mfd/lp87565.c b/drivers/mfd/lp87565.c index 1b7f834991..08c62ddfb4 100644 --- a/drivers/mfd/lp87565.c +++ b/drivers/mfd/lp87565.c @@ -6,10 +6,11 @@ */ #include <linux/gpio/consumer.h> +#include <linux/i2c.h> #include <linux/interrupt.h> #include <linux/mfd/core.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of_device.h> #include <linux/regmap.h> #include <linux/mfd/lp87565.h> @@ -46,7 +47,6 @@ MODULE_DEVICE_TABLE(of, of_lp87565_match_table); static int lp87565_probe(struct i2c_client *client) { struct lp87565 *lp87565; - const struct of_device_id *of_id; int ret; unsigned int otpid; @@ -89,10 +89,7 @@ static int lp87565_probe(struct i2c_client *client) } lp87565->rev = otpid & LP87565_OTP_REV_OTP_ID; - - of_id = of_match_device(of_lp87565_match_table, &client->dev); - if (of_id) - lp87565->dev_type = (uintptr_t)of_id->data; + lp87565->dev_type = (uintptr_t)i2c_get_match_data(client); i2c_set_clientdata(client, lp87565); |