From 85c675d0d09a45a135bddd15d7b385f8758c32fb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 19:35:05 +0200 Subject: Adding upstream version 6.7.7. Signed-off-by: Daniel Baumann --- drivers/mfd/max14577.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'drivers/mfd/max14577.c') diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c index 1f4f500259..8f7472c760 100644 --- a/drivers/mfd/max14577.c +++ b/drivers/mfd/max14577.c @@ -9,9 +9,10 @@ // This driver is based on max8997.c #include +#include +#include #include #include -#include #include #include #include @@ -357,7 +358,6 @@ static void max77836_remove(struct max14577 *max14577) static int max14577_i2c_probe(struct i2c_client *i2c) { - const struct i2c_device_id *id = i2c_client_get_device_id(i2c); struct max14577 *max14577; struct max14577_platform_data *pdata = dev_get_platdata(&i2c->dev); struct device_node *np = i2c->dev.of_node; @@ -397,15 +397,7 @@ static int max14577_i2c_probe(struct i2c_client *i2c) return ret; } - if (np) { - const struct of_device_id *of_id; - - of_id = of_match_device(max14577_dt_match, &i2c->dev); - if (of_id) - max14577->dev_type = (uintptr_t)of_id->data; - } else { - max14577->dev_type = id->driver_data; - } + max14577->dev_type = (enum maxim_device_type)i2c_get_match_data(i2c); max14577_print_dev_type(max14577); -- cgit v1.2.3