Message ID | 20231024101319.11878-3-hdegoede@redhat.com |
---|---|
State | New |
Headers | show |
Series | media: mei_csi/mei_ace: Fix driver modalias not matching device modalias | expand |
diff --git a/drivers/media/pci/intel/ivsc/mei_ace.c b/drivers/media/pci/intel/ivsc/mei_ace.c index a0491f307831..e0a4deb9dc16 100644 --- a/drivers/media/pci/intel/ivsc/mei_ace.c +++ b/drivers/media/pci/intel/ivsc/mei_ace.c @@ -554,7 +554,7 @@ static const struct dev_pm_ops mei_ace_pm_ops = { 0x9B, 0x78, 0x03, 0x61, 0x63, 0x5E, 0x24, 0x47) static const struct mei_cl_device_id mei_ace_tbl[] = { - { MEI_ACE_DRIVER_NAME, MEI_ACE_UUID, MEI_CL_VERSION_ANY }, + { .uuid = MEI_ACE_UUID, .version = MEI_CL_VERSION_ANY }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(mei, mei_ace_tbl);
The name field of struct mei_cl_device_id is only intended for use with NFC devices where different devices share the same GUID, see drivers/misc/mei/bus-fixup.c which sets the name field to "microread" or "pn544". For all other mei devices the name field is unset and specifying it in the drivers mei_cl_device_id MODULE_DEVICE_TABLE() leads to the driver not properly being autoloaded by modprobe since it causes the module's alias to not match: cat .../spi-INTC1094:00-5db76cf6-0a68-4ed6-9b78-0361635e2447/modalias mei::5db76cf6-0a68-4ed6-9b78-0361635e2447:01: modinfo mei_ace | grep alias mei:vsc_ace:5db76cf6-0a68-4ed6-9b78-0361635e2447:*:* Things still work when manually loading the module because mei_cl_device_find() only matches the name when the *device* has a name set, so setting it in the id_table of the driver does not matter. Drop setting the name in mei_ace_tbl[] so that modprobe will properly autoload the module. This makes the mei_cl_device_id use identical to all the other non NFC mei drivers: drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c drivers/misc/mei/hdcp/mei_hdcp.c drivers/misc/mei/pxp/mei_pxp.c drivers/watchdog/mei_wdt.c Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/media/pci/intel/ivsc/mei_ace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)