From: Thomas Zimmermann Date: Sat, 15 Jul 2023 18:51:55 +0000 (+0200) Subject: fbdev: Remove FBINFO_FLAG_DEFAULT from kzalloc()'ed structs X-Git-Tag: v6.6.17~3937^2~21^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=252b7b147c7b17a4993f834456712621e849fa0e;p=platform%2Fkernel%2Flinux-rpi.git fbdev: Remove FBINFO_FLAG_DEFAULT from kzalloc()'ed structs The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by kzalloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v4: * clarify commit message (Geert, Dan) v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-14-tzimmermann@suse.de --- diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index e453382..24d89e6 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -461,7 +461,6 @@ static int clcdfb_register(struct clcd_fb *fb) } fb->fb.fbops = &clcdfb_ops; - fb->fb.flags = FBINFO_FLAG_DEFAULT; fb->fb.pseudo_palette = fb->cmap; strncpy(fb->fb.fix.id, clcd_name, sizeof(fb->fb.fix.id)); diff --git a/drivers/video/fbdev/matrox/matroxfb_crtc2.c b/drivers/video/fbdev/matrox/matroxfb_crtc2.c index 7655afa..372197c 100644 --- a/drivers/video/fbdev/matrox/matroxfb_crtc2.c +++ b/drivers/video/fbdev/matrox/matroxfb_crtc2.c @@ -603,9 +603,8 @@ static int matroxfb_dh_regit(const struct matrox_fb_info *minfo, void* oldcrtc2; m2info->fbcon.fbops = &matroxfb_dh_ops; - m2info->fbcon.flags = FBINFO_FLAG_DEFAULT; - m2info->fbcon.flags |= FBINFO_HWACCEL_XPAN | - FBINFO_HWACCEL_YPAN; + m2info->fbcon.flags = FBINFO_HWACCEL_XPAN | + FBINFO_HWACCEL_YPAN; m2info->fbcon.pseudo_palette = m2info->cmap; fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1);