diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-05-26 15:47:01 +0300 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-06-02 12:51:17 +0300 |
commit | 8b201402ea027e44fbe66933a4912b647fd35e89 (patch) | |
tree | 1d30b3ea7bcf026292f48dc4e9c6d47995976ee4 /drivers/mfd | |
parent | fac61e6931d18929d9e69f4e0a48f5529c21f2e7 (diff) | |
download | linux-8b201402ea027e44fbe66933a4912b647fd35e89.tar.xz |
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@canonical.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/da9052-i2c.c | 9 |
1 files 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) { |