[PATCH v1] virtio-pci: Drop inclusion of <linux/mod_devicetable.h>
From: Uwe Kleine-König (The Capable Hub)
Date: Mon Jul 06 2026 - 12:27:10 EST
Among the different device id structures <linux/virtio_pci_legacy.h>
only uses struct virtio_device_id. Include <linux/device-id/virtio.h>
instead of <linux/mod_devicetable.h> to provide that which is more
lightweight and doesn't introduce that many dependencies.
The users of <linux/virtio_pci_legacy.h> also don't rely on this header
to provide the full plethora of definitions. (There are only
drivers/vdpa/alibaba/eni_vdpa.c and drivers/virtio/virtio_pci_common.c
using pci_device_id and these include <linux/pci.h> which is enough to
get it.)
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
Hello,
note that <linux/device-id/virtio.h> only exists since v7.2-rc2, so make
sure your base is new enough when applying this patch.
Best regards
Uwe
include/linux/virtio_pci_legacy.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/virtio_pci_legacy.h b/include/linux/virtio_pci_legacy.h
index a8dc757d0367..96a9523e985d 100644
--- a/include/linux/virtio_pci_legacy.h
+++ b/include/linux/virtio_pci_legacy.h
@@ -2,7 +2,7 @@
#ifndef _LINUX_VIRTIO_PCI_LEGACY_H
#define _LINUX_VIRTIO_PCI_LEGACY_H
-#include "linux/mod_devicetable.h"
+#include <linux/device-id/virtio.h>
#include <linux/pci.h>
#include <linux/virtio_pci.h>
base-commit: 8cdeaa50eae8dad34885515f62559ee83e7e8dda
--
2.55.0.11.g153666a7d9bb