summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/max14577.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:57 +0000
commitdc50eab76b709d68175a358d6e23a5a3890764d3 (patch)
treec754d0390db060af0213ff994f0ac310e4cfd6e9 /drivers/mfd/max14577.c
parentAdding debian version 6.6.15-2. (diff)
downloadlinux-dc50eab76b709d68175a358d6e23a5a3890764d3.tar.xz
linux-dc50eab76b709d68175a358d6e23a5a3890764d3.zip
Merging upstream version 6.7.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/mfd/max14577.c')
-rw-r--r--drivers/mfd/max14577.c14
1 files changed, 3 insertions, 11 deletions
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 <linux/err.h>
+#include <linux/i2c.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/interrupt.h>
-#include <linux/of_device.h>
#include <linux/mfd/core.h>
#include <linux/mfd/max14577.h>
#include <linux/mfd/max14577-private.h>
@@ -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);