Skip to content

Commit be3471c

Browse files
Marek Vasutbebarino
authored andcommitted
clk: vc5: Fix .driver_data content in i2c_device_id
The .driver_data content in i2c_device_id table must match the .data content in of_device_id table, else device_get_match_data() would return bogus value on i2c_device_id match. Align the two tables. The i2c_device_id table is now converted from of_device_id using '[email protected] = "idt,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@' Fixes: 9adddb0 ("clk: vc5: Add structure to describe particular chip features") Signed-off-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Luca Ceresoli <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent ac9a786 commit be3471c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/clk/clk-versaclock5.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,14 +1271,14 @@ static const struct vc5_chip_info idt_5p49v6975_info = {
12711271
};
12721272

12731273
static const struct i2c_device_id vc5_id[] = {
1274-
{ "5p49v5923", .driver_data = IDT_VC5_5P49V5923 },
1275-
{ "5p49v5925", .driver_data = IDT_VC5_5P49V5925 },
1276-
{ "5p49v5933", .driver_data = IDT_VC5_5P49V5933 },
1277-
{ "5p49v5935", .driver_data = IDT_VC5_5P49V5935 },
1278-
{ "5p49v60", .driver_data = IDT_VC6_5P49V60 },
1279-
{ "5p49v6901", .driver_data = IDT_VC6_5P49V6901 },
1280-
{ "5p49v6965", .driver_data = IDT_VC6_5P49V6965 },
1281-
{ "5p49v6975", .driver_data = IDT_VC6_5P49V6975 },
1274+
{ "5p49v5923", .driver_data = (kernel_ulong_t)&idt_5p49v5923_info },
1275+
{ "5p49v5925", .driver_data = (kernel_ulong_t)&idt_5p49v5925_info },
1276+
{ "5p49v5933", .driver_data = (kernel_ulong_t)&idt_5p49v5933_info },
1277+
{ "5p49v5935", .driver_data = (kernel_ulong_t)&idt_5p49v5935_info },
1278+
{ "5p49v60", .driver_data = (kernel_ulong_t)&idt_5p49v60_info },
1279+
{ "5p49v6901", .driver_data = (kernel_ulong_t)&idt_5p49v6901_info },
1280+
{ "5p49v6965", .driver_data = (kernel_ulong_t)&idt_5p49v6965_info },
1281+
{ "5p49v6975", .driver_data = (kernel_ulong_t)&idt_5p49v6975_info },
12821282
{ }
12831283
};
12841284
MODULE_DEVICE_TABLE(i2c, vc5_id);

0 commit comments

Comments
 (0)