RE: [PATCH v1 4/4] drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays

From: Michael Kelley

Date: Thu Jul 02 2026 - 12:50:36 EST


From: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx> Sent: Wednesday, July 1, 2026 10:05 AM
>
> It matches the usual coding style to have the MODULE_DEVICE_TABLE macro
> directly after the respective arrays.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
> ---
> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> index e3f41336a831..6a28048f687b 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> @@ -52,6 +52,7 @@ static const struct pci_device_id hv_drm_pci_tbl[] = {
> },
> { /* end of list */ }
> };
> +MODULE_DEVICE_TABLE(pci, hv_drm_pci_tbl);
>
> /*
> * PCI stub to support gen1 VM.
> @@ -219,6 +220,7 @@ static const struct hv_vmbus_device_id hv_drm_vmbus_tbl[] = {
> {HV_SYNTHVID_GUID},
> {}
> };
> +MODULE_DEVICE_TABLE(vmbus, hv_drm_vmbus_tbl);
>
> static struct hv_driver hv_drm_hv_driver = {
> .name = KBUILD_MODNAME,
> @@ -260,8 +262,6 @@ static void __exit hv_drm_exit(void)
> module_init(hv_drm_init);
> module_exit(hv_drm_exit);
>
> -MODULE_DEVICE_TABLE(pci, hv_drm_pci_tbl);
> -MODULE_DEVICE_TABLE(vmbus, hv_drm_vmbus_tbl);
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Deepak Rawat <drawat.floss@xxxxxxxxx>");
> MODULE_DESCRIPTION("DRM driver for Hyper-V synthetic video device");
> --
> 2.55.0.11.g153666a7d9bb
>

Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx>