[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210526124711.33223-4-krzysztof.kozlowski@canonical.com>
Date: Wed, 26 May 2021 08:47:01 -0400
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: Lee Jones <lee.jones@...aro.org>,
Support Opensource <support.opensource@...semi.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Tony Lindgren <tony@...mide.com>, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, linux-omap@...r.kernel.org,
patches@...nsource.cirrus.com
Cc: Adam Thomson <Adam.Thomson.Opensource@...semi.com>
Subject: [RESEND PATCH v2 03/13] 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 <krzysztof.kozlowski@...onical.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@...semi.com>
---
Changes since v1:
1. Add Ack
---
drivers/mfd/da9052-i2c.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c
index 8ebfc7bbe4e0..8de93db35f3a 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) {
--
2.27.0
Powered by blists - more mailing lists