[PATCH 1/2] media: mei_csi: Fix driver modalias not matching device modalias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-92335fcf-3203-4472-af93-7b4453ac29da/modalias
mei::92335fcf-3203-4472-af93-7b4453ac29da:01:

modinfo mei_csi | grep alias
mei:vsc_csi:92335fcf-3203-4472-af93-7b4453ac29da:*:*

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_csi_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@xxxxxxxxxx>
---
 drivers/media/pci/intel/ivsc/mei_csi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c b/drivers/media/pci/intel/ivsc/mei_csi.c
index 00ba611e0f68..dab89b0f417e 100644
--- a/drivers/media/pci/intel/ivsc/mei_csi.c
+++ b/drivers/media/pci/intel/ivsc/mei_csi.c
@@ -804,7 +804,7 @@ static void mei_csi_remove(struct mei_cl_device *cldev)
 			     0xAF, 0x93, 0x7b, 0x44, 0x53, 0xAC, 0x29, 0xDA)
 
 static const struct mei_cl_device_id mei_csi_tbl[] = {
-	{ MEI_CSI_DRIVER_NAME, MEI_CSI_UUID, MEI_CL_VERSION_ANY },
+	{ .uuid = MEI_CSI_UUID, .version = MEI_CL_VERSION_ANY },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(mei, mei_csi_tbl);
-- 
2.41.0




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux