[PATCH] [HACK] drm: omapdrm: field override

From: Arnd Bergmann
Date: Tue Nov 15 2016 - 08:10:37 EST


../drivers/gpu/drm/omapdrm/omap_fbdev.c:96:20: error: initialized field overwritten [-Werror=override-init]
.fb_pan_display = omap_fbdev_pan_display,
^~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/omapdrm/omap_fbdev.c:96:20: note: (near initialization for 'omap_fb_ops.fb_pan_display')

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index 2a839956dae6..d953186142d1 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -80,6 +80,8 @@ static int omap_fbdev_pan_display(struct fb_var_screeninfo *var,
return drm_fb_helper_pan_display(var, fbi);
}

+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverride-init"
static struct fb_ops omap_fb_ops = {
.owner = THIS_MODULE,
DRM_FB_HELPER_DEFAULT_OPS,
@@ -95,6 +97,7 @@ static struct fb_ops omap_fb_ops = {

.fb_pan_display = omap_fbdev_pan_display,
};
+#pragma GCC diagnostic pop

static int omap_fbdev_create(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)