Skip to content

Commit 252b7b1

Browse files
committed
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 <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: Helge Deller <deller@gmx.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-14-tzimmermann@suse.de
1 parent cdeb052 commit 252b7b1

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/video/fbdev/amba-clcd.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ static int clcdfb_register(struct clcd_fb *fb)
461461
}
462462

463463
fb->fb.fbops = &clcdfb_ops;
464-
fb->fb.flags = FBINFO_FLAG_DEFAULT;
465464
fb->fb.pseudo_palette = fb->cmap;
466465

467466
strncpy(fb->fb.fix.id, clcd_name, sizeof(fb->fb.fix.id));

drivers/video/fbdev/matrox/matroxfb_crtc2.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,8 @@ static int matroxfb_dh_regit(const struct matrox_fb_info *minfo,
603603
void* oldcrtc2;
604604

605605
m2info->fbcon.fbops = &matroxfb_dh_ops;
606-
m2info->fbcon.flags = FBINFO_FLAG_DEFAULT;
607-
m2info->fbcon.flags |= FBINFO_HWACCEL_XPAN |
608-
FBINFO_HWACCEL_YPAN;
606+
m2info->fbcon.flags = FBINFO_HWACCEL_XPAN |
607+
FBINFO_HWACCEL_YPAN;
609608
m2info->fbcon.pseudo_palette = m2info->cmap;
610609
fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1);
611610

0 commit comments

Comments
 (0)