From: Krzysztof Kozlowski Date: Wed, 26 May 2021 12:47:01 +0000 (-0400) Subject: mfd: da9052: Simplify getting of_device_id match data X-Git-Tag: v5.15~794^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b201402ea027e44fbe66933a4912b647fd35e89;p=platform%2Fkernel%2Flinux-starfive.git mfd: da9052: Simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Acked-by: Adam Thomson Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c index 8ebfc7b..8de93db 100644 --- a/drivers/mfd/da9052-i2c.c +++ b/drivers/mfd/da9052-i2c.c @@ -155,13 +155,8 @@ static int da9052_i2c_probe(struct i2c_client *client, return ret; #ifdef CONFIG_OF - if (!id) { - struct device_node *np = client->dev.of_node; - const struct of_device_id *deviceid; - - deviceid = of_match_node(dialog_dt_ids, np); - id = deviceid->data; - } + if (!id) + id = of_device_get_match_data(&client->dev); #endif if (!id) {