fbdev: Remove FBINFO_DEFAULT from devm_kzalloc()'ed structs
authorThomas Zimmermann <tzimmermann@suse.de>
Sat, 15 Jul 2023 18:51:46 +0000 (20:51 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 24 Jul 2023 14:50:38 +0000 (16:50 +0200)
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags
has been allocated to zero by devm_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-5-tzimmermann@suse.de
drivers/video/fbdev/pxafb.c
drivers/video/fbdev/sa1100fb.c
drivers/video/fbdev/wm8505fb.c
drivers/video/fbdev/xilinxfb.c

index 2a8b1de..c8c4677 100644 (file)
@@ -1826,7 +1826,6 @@ static struct pxafb_info *pxafb_init_fbinfo(struct device *dev,
        fbi->fb.var.vmode       = FB_VMODE_NONINTERLACED;
 
        fbi->fb.fbops           = &pxafb_ops;
-       fbi->fb.flags           = FBINFO_DEFAULT;
        fbi->fb.node            = -1;
 
        addr = fbi;
index a2408bf..3d76ce1 100644 (file)
@@ -1089,7 +1089,6 @@ static struct sa1100fb_info *sa1100fb_init_fbinfo(struct device *dev)
        fbi->fb.var.vmode       = FB_VMODE_NONINTERLACED;
 
        fbi->fb.fbops           = &sa1100fb_ops;
-       fbi->fb.flags           = FBINFO_DEFAULT;
        fbi->fb.monspecs        = monspecs;
        fbi->fb.pseudo_palette  = fbi->pseudo_palette;
 
index 10a8b12..5833147 100644 (file)
@@ -285,8 +285,7 @@ static int wm8505fb_probe(struct platform_device *pdev)
        fbi->fb.fix.accel       = FB_ACCEL_NONE;
 
        fbi->fb.fbops           = &wm8505fb_ops;
-       fbi->fb.flags           = FBINFO_DEFAULT
-                               | FBINFO_HWACCEL_COPYAREA
+       fbi->fb.flags           = FBINFO_HWACCEL_COPYAREA
                                | FBINFO_HWACCEL_FILLRECT
                                | FBINFO_HWACCEL_XPAN
                                | FBINFO_HWACCEL_YPAN
index 2aa3a52..768a281 100644 (file)
@@ -324,7 +324,6 @@ static int xilinxfb_assign(struct platform_device *pdev,
        drvdata->info.fix.line_length = pdata->xvirt * BYTES_PER_PIXEL;
 
        drvdata->info.pseudo_palette = drvdata->pseudo_palette;
-       drvdata->info.flags = FBINFO_DEFAULT;
        drvdata->info.var = xilinx_fb_var;
        drvdata->info.var.height = pdata->screen_height_mm;
        drvdata->info.var.width = pdata->screen_width_mm;