projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d103337
)
hwmon: (tmp513) Simplify probe()
author
Biju Das
<biju.das.jz@bp.renesas.com>
Thu, 24 Aug 2023 20:44:55 +0000
(21:44 +0100)
committer
Guenter Roeck
<linux@roeck-us.net>
Fri, 25 Aug 2023 14:43:10 +0000
(07:43 -0700)
Simpilfy probe() by replacing device_get_match_data() and id lookup for
retrieving match data by i2c_get_match_data().
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link:
https://lore.kernel.org/r/20230824204456.401580-3-biju.das.jz@bp.renesas.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/tmp513.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/tmp513.c
b/drivers/hwmon/tmp513.c
index
8ee6e02
..
9a180b1
100644
(file)
--- a/
drivers/hwmon/tmp513.c
+++ b/
drivers/hwmon/tmp513.c
@@
-720,10
+720,7
@@
static int tmp51x_probe(struct i2c_client *client)
if (!data)
return -ENOMEM;
- if (client->dev.of_node)
- data->id = (uintptr_t)device_get_match_data(&client->dev);
- else
- data->id = i2c_match_id(tmp51x_id, client)->driver_data;
+ data->id = (uintptr_t)i2c_get_match_data(client);
ret = tmp51x_configure(dev, data);
if (ret < 0) {