drm/cirrus: drop mode_info.mode_config_initialized
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 2 Apr 2019 09:04:59 +0000 (11:04 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 2 Apr 2019 20:45:38 +0000 (22:45 +0200)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20190402090459.12126-3-kraxel@redhat.com
drivers/gpu/drm/cirrus/cirrus_drv.h
drivers/gpu/drm/cirrus/cirrus_mode.c

index 91570973925768b0123d0eb8872ab049b0d11ea5..828b150cdb20657fc8185c6a41cc990486b16766 100644 (file)
@@ -101,7 +101,6 @@ struct cirrus_crtc {
 
 struct cirrus_fbdev;
 struct cirrus_mode_info {
-       bool                            mode_config_initialized;
        struct cirrus_crtc              *crtc;
        /* pointer to fbdev info structure */
        struct cirrus_fbdev             *gfbdev;
index 32ce2c1040b45ced9a59462caf6ad74c04857074..b109cd71426fa37e3554d6bd2bb219af44784c15 100644 (file)
@@ -575,7 +575,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev)
        int ret;
 
        drm_mode_config_init(cdev->dev);
-       cdev->mode_info.mode_config_initialized = true;
 
        cdev->dev->mode_config.max_width = CIRRUS_MAX_FB_WIDTH;
        cdev->dev->mode_config.max_height = CIRRUS_MAX_FB_HEIGHT;
@@ -613,10 +612,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev)
 void cirrus_modeset_fini(struct cirrus_device *cdev)
 {
        cirrus_fbdev_fini(cdev);
-
-       if (cdev->mode_info.mode_config_initialized) {
-               drm_helper_force_disable_all(cdev->dev);
-               drm_mode_config_cleanup(cdev->dev);
-               cdev->mode_info.mode_config_initialized = false;
-       }
+       drm_helper_force_disable_all(cdev->dev);
+       drm_mode_config_cleanup(cdev->dev);
 }