Unverified Commit 1f4ea483 authored by Jose Javier Rodriguez Barbarin's avatar Jose Javier Rodriguez Barbarin Committed by Nicolas Schier
Browse files

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: 3764e82e ("drivers: Introduce MEN Chameleon Bus")
Reviewed-by: default avatarJorge Sanjuan Garcia <dev-jorge.sanjuangarcia@duagon.com>
Signed-off-by: default avatarJose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
Acked-by: default avatarNathan Chancellor <nathan@kernel.org>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/20251202084200.10410-1-dev-josejavier.rodriguez@duagon.com


Signed-off-by: default avatarNicolas Schier <nsc@kernel.org>
parent b08fc4d0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -199,6 +199,9 @@ int main(void)
	DEVID(cpu_feature);
	DEVID_FIELD(cpu_feature, feature);

	DEVID(mcb_device_id);
	DEVID_FIELD(mcb_device_id, device);

	DEVID(mei_cl_device_id);
	DEVID_FIELD(mei_cl_device_id, name);
	DEVID_FIELD(mei_cl_device_id, uuid);
+9 −0
Original line number Diff line number Diff line
@@ -1110,6 +1110,14 @@ static void do_cpu_entry(struct module *mod, void *symval)
	module_alias_printf(mod, false, "cpu:type:*:feature:*%04X*", feature);
}

/* Looks like: mcb:16zN */
static void do_mcb_entry(struct module *mod, void *symval)
{
	DEF_FIELD(symval, mcb_device_id, device);

	module_alias_printf(mod, false, "mcb:16z%03d", device);
}

/* Looks like: mei:S:uuid:N:* */
static void do_mei_entry(struct module *mod, void *symval)
{
@@ -1444,6 +1452,7 @@ static const struct devtable devtable[] = {
	{"mipscdmm", SIZE_mips_cdmm_device_id, do_mips_cdmm_entry},
	{"x86cpu", SIZE_x86_cpu_id, do_x86cpu_entry},
	{"cpu", SIZE_cpu_feature, do_cpu_entry},
	{"mcb", SIZE_mcb_device_id, do_mcb_entry},
	{"mei", SIZE_mei_cl_device_id, do_mei_entry},
	{"rapidio", SIZE_rio_device_id, do_rio_entry},
	{"ulpi", SIZE_ulpi_device_id, do_ulpi_entry},