Skip to content

Commit

Permalink
mfd: palmas: Make similar OF and ID table
Browse files Browse the repository at this point in the history
Make similar OF and ID table to extend support for ID match using
i2c_match_data(). Currently it works only for OF match tables as the
driver_data is wrong for ID match.

Signed-off-by: Biju Das <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
Biju Das authored and lag-linaro committed Nov 1, 2023
1 parent a17e0bc commit 9a41c31
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/mfd/palmas.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c)
palmas->dev = &i2c->dev;
palmas->irq = i2c->irq;

driver_data = device_get_match_data(&i2c->dev);
driver_data = i2c_get_match_data(i2c);
palmas->features = driver_data->features;

for (i = 0; i < PALMAS_NUM_CLIENTS; i++) {
Expand Down Expand Up @@ -699,10 +699,10 @@ static const struct of_device_id of_palmas_match_tbl[] = {
MODULE_DEVICE_TABLE(of, of_palmas_match_tbl);

static const struct i2c_device_id palmas_i2c_id[] = {
{ "palmas", },
{ "twl6035", },
{ "twl6037", },
{ "tps65913", },
{ "palmas", (kernel_ulong_t)&palmas_data },
{ "twl6035", (kernel_ulong_t)&palmas_data },
{ "twl6037", (kernel_ulong_t)&palmas_data },
{ "tps65913", (kernel_ulong_t)&palmas_data },
{ /* end */ }
};
MODULE_DEVICE_TABLE(i2c, palmas_i2c_id);
Expand Down

0 comments on commit 9a41c31

Please sign in to comment.