Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: palmas: Make similar OF and ID table

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 <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230831183153.63750-5-biju.das.jz@bp.renesas.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Biju Das and committed by
Lee Jones
9a41c31e a17e0bc6

+5 -5
+5 -5
drivers/mfd/palmas.c
··· 513 513 palmas->dev = &i2c->dev; 514 514 palmas->irq = i2c->irq; 515 515 516 - driver_data = device_get_match_data(&i2c->dev); 516 + driver_data = i2c_get_match_data(i2c); 517 517 palmas->features = driver_data->features; 518 518 519 519 for (i = 0; i < PALMAS_NUM_CLIENTS; i++) { ··· 699 699 MODULE_DEVICE_TABLE(of, of_palmas_match_tbl); 700 700 701 701 static const struct i2c_device_id palmas_i2c_id[] = { 702 - { "palmas", }, 703 - { "twl6035", }, 704 - { "twl6037", }, 705 - { "tps65913", }, 702 + { "palmas", (kernel_ulong_t)&palmas_data }, 703 + { "twl6035", (kernel_ulong_t)&palmas_data }, 704 + { "twl6037", (kernel_ulong_t)&palmas_data }, 705 + { "tps65913", (kernel_ulong_t)&palmas_data }, 706 706 { /* end */ } 707 707 }; 708 708 MODULE_DEVICE_TABLE(i2c, palmas_i2c_id);