From 830fafce06e6fc2e63e141799833f7c7a73cf62b Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 17 Oct 2023 15:36:10 -0500 Subject: 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 Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231017203612.2701060-1-robh@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/tps65910.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'drivers/mfd/tps65910.c') 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 #include #include -#include +#include 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); -- cgit v1.2.3