diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:35:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:39:31 +0000 |
commit | 85c675d0d09a45a135bddd15d7b385f8758c32fb (patch) | |
tree | 76267dbc9b9a130337be3640948fe397b04ac629 /drivers/regulator/da9121-regulator.c | |
parent | Adding upstream version 6.6.15. (diff) | |
download | linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.tar.xz linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.zip |
Adding upstream version 6.7.7.upstream/6.7.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/regulator/da9121-regulator.c')
-rw-r--r-- | drivers/regulator/da9121-regulator.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c index 80098035bb..b551a400bd 100644 --- a/drivers/regulator/da9121-regulator.c +++ b/drivers/regulator/da9121-regulator.c @@ -13,7 +13,7 @@ // // Copyright (C) 2020 Dialog Semiconductor -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/of_gpio.h> #include <linux/gpio/consumer.h> #include <linux/regulator/of_regulator.h> @@ -1117,17 +1117,6 @@ static const struct of_device_id da9121_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, da9121_dt_ids); -static inline int da9121_of_get_id(struct device *dev) -{ - const struct of_device_id *id = of_match_device(da9121_dt_ids, dev); - - if (!id) { - dev_err(dev, "%s: Failed\n", __func__); - return -EINVAL; - } - return (uintptr_t)id->data; -} - static int da9121_i2c_probe(struct i2c_client *i2c) { struct da9121 *chip; @@ -1141,7 +1130,7 @@ static int da9121_i2c_probe(struct i2c_client *i2c) } chip->pdata = i2c->dev.platform_data; - chip->subvariant_id = da9121_of_get_id(&i2c->dev); + chip->subvariant_id = (enum da9121_subvariant)i2c_get_match_data(i2c); ret = da9121_assign_chip_model(i2c, chip); if (ret < 0) |