summaryrefslogtreecommitdiff
path: root/drivers/mfd/mc13xxx-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/mc13xxx-i2c.c')
-rw-r--r--drivers/mfd/mc13xxx-i2c.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/mfd/mc13xxx-i2c.c b/drivers/mfd/mc13xxx-i2c.c
index 65b4dd8e5afb..6bc0e755ba34 100644
--- a/drivers/mfd/mc13xxx-i2c.c
+++ b/drivers/mfd/mc13xxx-i2c.c
@@ -11,7 +11,6 @@
#include <linux/mfd/mc13xxx.h>
#include <linux/of.h>
#include <linux/of_device.h>
-#include <linux/of_gpio.h>
#include <linux/i2c.h>
#include <linux/err.h>
@@ -52,8 +51,7 @@ static const struct regmap_config mc13xxx_regmap_i2c_config = {
.cache_type = REGCACHE_NONE,
};
-static int mc13xxx_i2c_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int mc13xxx_i2c_probe(struct i2c_client *client)
{
struct mc13xxx *mc13xxx;
int ret;
@@ -74,20 +72,14 @@ static int mc13xxx_i2c_probe(struct i2c_client *client,
return ret;
}
- if (client->dev.of_node) {
- const struct of_device_id *of_id =
- of_match_device(mc13xxx_dt_ids, &client->dev);
- mc13xxx->variant = of_id->data;
- } else {
- mc13xxx->variant = (void *)id->driver_data;
- }
+ mc13xxx->variant = i2c_get_match_data(client);
return mc13xxx_common_init(&client->dev);
}
-static int mc13xxx_i2c_remove(struct i2c_client *client)
+static void mc13xxx_i2c_remove(struct i2c_client *client)
{
- return mc13xxx_common_exit(&client->dev);
+ mc13xxx_common_exit(&client->dev);
}
static struct i2c_driver mc13xxx_i2c_driver = {