]> www.infradead.org Git - users/willy/linux.git/commitdiff
drm: Move struct drm_device.hose to legacy section
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 12 Jan 2021 08:10:35 +0000 (09:10 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 13 Jan 2021 13:22:37 +0000 (14:22 +0100)
The field is only relevant for legacy DRM drivers. Its only non-legacy
user in the DRM core is in drm_file.c. This code is now protected by
CONFIG_DRM_LEGACY. Radeon, the only driver that used the field, has been
changed to maintain it's own copy.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210112081035.6882-7-tzimmermann@suse.de
drivers/gpu/drm/drm_file.c
include/drm/drm_device.h

index 99403e49caf452b6ecee86776836d2f7886bfeb8..6b116bfd747c3ccd031d7805387a742634469cd7 100644 (file)
@@ -367,6 +367,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
        list_add(&priv->lhead, &dev->filelist);
        mutex_unlock(&dev->filelist_mutex);
 
+#ifdef CONFIG_DRM_LEGACY
 #ifdef __alpha__
        /*
         * Default the hose
@@ -386,6 +387,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
                                dev->hose = b->sysdata;
                }
        }
+#endif
 #endif
 
        return 0;
index 939904ae88fc3d8765fea638b430ec32782a0b28..d647223e8390872afc4951a609547fa50ef6406d 100644 (file)
@@ -282,10 +282,6 @@ struct drm_device {
        /** @pdev: PCI device structure */
        struct pci_dev *pdev;
 
-#ifdef __alpha__
-       /** @hose: PCI hose, only used on ALPHA platforms. */
-       struct pci_controller *hose;
-#endif
        /** @num_crtcs: Number of CRTCs on this device */
        unsigned int num_crtcs;
 
@@ -328,6 +324,11 @@ struct drm_device {
        /* List of devices per driver for stealth attach cleanup */
        struct list_head legacy_dev_list;
 
+#ifdef __alpha__
+       /** @hose: PCI hose, only used on ALPHA platforms. */
+       struct pci_controller *hose;
+#endif
+
        /* Context handle management - linked list of context handles */
        struct list_head ctxlist;