Skip to content

Commit 1f4ea48

Browse files
Jose Javier Rodriguez BarbarinNicolas Schier
authored andcommitted
mcb: Add missing modpost build support
mcb bus is not prepared to autoload client drivers with the data defined on the drivers' MODULE_DEVICE_TABLE. modpost cannot access to mcb_table_id inside MODULE_DEVICE_TABLE so the data declared inside is ignored. Add modpost build support for accessing to the mcb_table_id coded on device drivers' MODULE_DEVICE_TABLE. Fixes: 3764e82 ("drivers: Introduce MEN Chameleon Bus") Reviewed-by: Jorge Sanjuan Garcia <[email protected]> Signed-off-by: Jose Javier Rodriguez Barbarin <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Nicolas Schier <[email protected]>
1 parent b08fc4d commit 1f4ea48

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

scripts/mod/devicetable-offsets.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ int main(void)
199199
DEVID(cpu_feature);
200200
DEVID_FIELD(cpu_feature, feature);
201201

202+
DEVID(mcb_device_id);
203+
DEVID_FIELD(mcb_device_id, device);
204+
202205
DEVID(mei_cl_device_id);
203206
DEVID_FIELD(mei_cl_device_id, name);
204207
DEVID_FIELD(mei_cl_device_id, uuid);

scripts/mod/file2alias.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,14 @@ static void do_cpu_entry(struct module *mod, void *symval)
11101110
module_alias_printf(mod, false, "cpu:type:*:feature:*%04X*", feature);
11111111
}
11121112

1113+
/* Looks like: mcb:16zN */
1114+
static void do_mcb_entry(struct module *mod, void *symval)
1115+
{
1116+
DEF_FIELD(symval, mcb_device_id, device);
1117+
1118+
module_alias_printf(mod, false, "mcb:16z%03d", device);
1119+
}
1120+
11131121
/* Looks like: mei:S:uuid:N:* */
11141122
static void do_mei_entry(struct module *mod, void *symval)
11151123
{
@@ -1444,6 +1452,7 @@ static const struct devtable devtable[] = {
14441452
{"mipscdmm", SIZE_mips_cdmm_device_id, do_mips_cdmm_entry},
14451453
{"x86cpu", SIZE_x86_cpu_id, do_x86cpu_entry},
14461454
{"cpu", SIZE_cpu_feature, do_cpu_entry},
1455+
{"mcb", SIZE_mcb_device_id, do_mcb_entry},
14471456
{"mei", SIZE_mei_cl_device_id, do_mei_entry},
14481457
{"rapidio", SIZE_rio_device_id, do_rio_entry},
14491458
{"ulpi", SIZE_ulpi_device_id, do_ulpi_entry},

0 commit comments

Comments
 (0)