We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d92df6f commit 9aab92bCopy full SHA for 9aab92b
drivers/mfd/mc13xxx-i2c.c
@@ -53,7 +53,6 @@ static const struct regmap_config mc13xxx_regmap_i2c_config = {
53
54
static int mc13xxx_i2c_probe(struct i2c_client *client)
55
{
56
- const struct i2c_device_id *id = i2c_client_get_device_id(client);
57
struct mc13xxx *mc13xxx;
58
int ret;
59
@@ -73,13 +72,7 @@ static int mc13xxx_i2c_probe(struct i2c_client *client)
73
72
return ret;
74
}
75
76
- if (client->dev.of_node) {
77
- const struct of_device_id *of_id =
78
- of_match_device(mc13xxx_dt_ids, &client->dev);
79
- mc13xxx->variant = of_id->data;
80
- } else {
81
- mc13xxx->variant = (void *)id->driver_data;
82
- }
+ mc13xxx->variant = i2c_get_match_data(client);
83
84
return mc13xxx_common_init(&client->dev);
85
0 commit comments