]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
misc/pvpanic-pci: Allow automatic loading
authorEric Auger <eric.auger@redhat.com>
Tue, 29 Jun 2021 07:22:14 +0000 (09:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 12:57:58 +0000 (14:57 +0200)
The virtual machine monitor (QEMU) exposes the pvpanic-pci
device to the guest. On guest side the module exists but
currently isn't loaded automatically. So the driver fails
to be probed and does not its job of handling guest panic
events.

Instead of requiring manual modprobe, let's include a device
database using the MODULE_DEVICE_TABLE macro and let the
module auto-load when the guest gets exposed with such a
pvpanic-pci device.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20210629072214.901004-1-eric.auger@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/pvpanic/pvpanic-pci.c

index a43c401017ae2b3404fb890fd8b0b819a9f1ddf8..741116b3d9958ef3d5c062c83e33643b49022337 100644 (file)
@@ -108,4 +108,6 @@ static struct pci_driver pvpanic_pci_driver = {
        },
 };
 
+MODULE_DEVICE_TABLE(pci, pvpanic_pci_id_tbl);
+
 module_pci_driver(pvpanic_pci_driver);