summaryrefslogtreecommitdiff
path: root/drivers/mfd/tps65910.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-10-17 15:36:10 -0500
committerLee Jones <lee@kernel.org>2023-11-01 10:02:17 +0000
commit830fafce06e6fc2e63e141799833f7c7a73cf62b (patch)
treed9b5f379a230da54e8a8b70c1095c2e65d72acbb /drivers/mfd/tps65910.c
parent15d71e678ec14ce26f7a271fef363e5c04ec24bf (diff)
mfd: Use device_get_match_data() in a bunch of drivers
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231017203612.2701060-1-robh@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/tps65910.c')
-rw-r--r--drivers/mfd/tps65910.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index 307d30da274b..8fb0384d5a8e 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -19,7 +19,7 @@
#include <linux/regmap.h>
#include <linux/mfd/tps65910.h>
#include <linux/of.h>
-#include <linux/of_device.h>
+#include <linux/property.h>
static const struct resource rtc_resources[] = {
{
@@ -374,16 +374,9 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
struct device_node *np = client->dev.of_node;
struct tps65910_board *board_info;
unsigned int prop;
- const struct of_device_id *match;
int ret;
- match = of_match_device(tps65910_of_match, &client->dev);
- if (!match) {
- dev_err(&client->dev, "Failed to find matching dt id\n");
- return NULL;
- }
-
- *chip_id = (unsigned long)match->data;
+ *chip_id = (unsigned long)device_get_match_data(&client->dev);
board_info = devm_kzalloc(&client->dev, sizeof(*board_info),
GFP_KERNEL);