aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/pvpanic
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2021-06-29 09:22:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-21 14:57:58 +0200
commit28b6a003bcdfa1fc4603b9185b247ecca7af9bef (patch)
tree5483c6d368bffa7d0c79106973e7fec8077cf872 /drivers/misc/pvpanic
parent8990f96a012f42543005b07d9e482694192e9309 (diff)
downloadlinux-28b6a003bcdfa1fc4603b9185b247ecca7af9bef.tar.gz
misc/pvpanic-pci: Allow automatic loading
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>
Diffstat (limited to 'drivers/misc/pvpanic')
-rw-r--r--drivers/misc/pvpanic/pvpanic-pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/pvpanic/pvpanic-pci.c b/drivers/misc/pvpanic/pvpanic-pci.c
index a43c401017ae2b..741116b3d9958e 100644
--- a/drivers/misc/pvpanic/pvpanic-pci.c
+++ b/drivers/misc/pvpanic/pvpanic-pci.c
@@ -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);