Commit be3471c5 authored by Marek Vasut's avatar Marek Vasut Committed by Stephen Boyd

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
's@.compatible = "idt,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'

Fixes: 9adddb01 ("clk: vc5: Add structure to describe particular chip features")
Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@mailbox.org>
Link: https://lore.kernel.org/r/20230507133906.15061-1-marek.vasut+renesas@mailbox.orgReviewed-by: default avatarLuca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent ac9a7868
...@@ -1271,14 +1271,14 @@ static const struct vc5_chip_info idt_5p49v6975_info = { ...@@ -1271,14 +1271,14 @@ static const struct vc5_chip_info idt_5p49v6975_info = {
}; };
static const struct i2c_device_id vc5_id[] = { static const struct i2c_device_id vc5_id[] = {
{ "5p49v5923", .driver_data = IDT_VC5_5P49V5923 }, { "5p49v5923", .driver_data = (kernel_ulong_t)&idt_5p49v5923_info },
{ "5p49v5925", .driver_data = IDT_VC5_5P49V5925 }, { "5p49v5925", .driver_data = (kernel_ulong_t)&idt_5p49v5925_info },
{ "5p49v5933", .driver_data = IDT_VC5_5P49V5933 }, { "5p49v5933", .driver_data = (kernel_ulong_t)&idt_5p49v5933_info },
{ "5p49v5935", .driver_data = IDT_VC5_5P49V5935 }, { "5p49v5935", .driver_data = (kernel_ulong_t)&idt_5p49v5935_info },
{ "5p49v60", .driver_data = IDT_VC6_5P49V60 }, { "5p49v60", .driver_data = (kernel_ulong_t)&idt_5p49v60_info },
{ "5p49v6901", .driver_data = IDT_VC6_5P49V6901 }, { "5p49v6901", .driver_data = (kernel_ulong_t)&idt_5p49v6901_info },
{ "5p49v6965", .driver_data = IDT_VC6_5P49V6965 }, { "5p49v6965", .driver_data = (kernel_ulong_t)&idt_5p49v6965_info },
{ "5p49v6975", .driver_data = IDT_VC6_5P49V6975 }, { "5p49v6975", .driver_data = (kernel_ulong_t)&idt_5p49v6975_info },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, vc5_id); MODULE_DEVICE_TABLE(i2c, vc5_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment