summaryrefslogtreecommitdiff
path: root/drivers/mfd/lp87565.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/lp87565.c')
-rw-r--r--drivers/mfd/lp87565.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/mfd/lp87565.c b/drivers/mfd/lp87565.c
index a52ab76febb3..9488d3793c10 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>
@@ -43,11 +44,9 @@ static const struct of_device_id of_lp87565_match_table[] = {
};
MODULE_DEVICE_TABLE(of, of_lp87565_match_table);
-static int lp87565_probe(struct i2c_client *client,
- const struct i2c_device_id *ids)
+static int lp87565_probe(struct i2c_client *client)
{
struct lp87565 *lp87565;
- const struct of_device_id *of_id;
int ret;
unsigned int otpid;
@@ -90,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 = (enum lp87565_device_type)of_id->data;
+ lp87565->dev_type = (uintptr_t)i2c_get_match_data(client);
i2c_set_clientdata(client, lp87565);
@@ -110,8 +106,8 @@ static void lp87565_shutdown(struct i2c_client *client)
}
static const struct i2c_device_id lp87565_id_table[] = {
- { "lp87565-q1", 0 },
- { },
+ { "lp87565-q1" },
+ { }
};
MODULE_DEVICE_TABLE(i2c, lp87565_id_table);