Skip to content

Commit 897c44f

Browse files
solbjorngregkh
authored andcommitted
virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial
rproc_serial_id_table lacks an exposure to module devicetable, so when remoteproc firmware requests VIRTIO_ID_RPROC_SERIAL, no uevent is generated and no module autoloading occurs. Add missing MODULE_DEVICE_TABLE() annotation and move the existing one for VIRTIO_ID_CONSOLE right to the table itself. Fixes: 1b63704 ("virtio_console: Add support for remoteproc serial") Cc: <[email protected]> # v3.8+ Signed-off-by: Alexander Lobakin <[email protected]> Reviewed-by: Amit Shah <[email protected]> Link: https://lore.kernel.org/r/x7C_CbeJtoGMy258nwAXASYz3xgFMFpyzmUvOyZzRnQrgWCREBjaqBOpAUS7ol4NnZYvSVwmTsCG0Ohyfvta-ygw6HMHcoeKK0C3QFiAO_Q=@pm.me Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e78e1fd commit 897c44f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/char/virtio_console.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2116,6 +2116,7 @@ static struct virtio_device_id id_table[] = {
21162116
{ VIRTIO_ID_CONSOLE, VIRTIO_DEV_ANY_ID },
21172117
{ 0 },
21182118
};
2119+
MODULE_DEVICE_TABLE(virtio, id_table);
21192120

21202121
static unsigned int features[] = {
21212122
VIRTIO_CONSOLE_F_SIZE,
@@ -2128,6 +2129,7 @@ static struct virtio_device_id rproc_serial_id_table[] = {
21282129
#endif
21292130
{ 0 },
21302131
};
2132+
MODULE_DEVICE_TABLE(virtio, rproc_serial_id_table);
21312133

21322134
static unsigned int rproc_serial_features[] = {
21332135
};
@@ -2280,6 +2282,5 @@ static void __exit fini(void)
22802282
module_init(init);
22812283
module_exit(fini);
22822284

2283-
MODULE_DEVICE_TABLE(virtio, id_table);
22842285
MODULE_DESCRIPTION("Virtio console driver");
22852286
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)