Skip to content

Commit 8a4675e

Browse files
committed
fbdev: Remove FBINFO_FLAG_DEFAULT from framebuffer_alloc()'ed structs
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). 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: Jaya Kumar <jayalk@intworks.biz> Cc: Helge Deller <deller@gmx.de> Cc: Peter Jones <pjones@redhat.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Pengutronix Kernel Team <kernel@pengutronix.de> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Fabio Estevam <festevam@gmail.com> Cc: NXP Linux Team <linux-imx@nxp.com> Cc: Maik Broemme <mbroemme@libmpq.org> Cc: Jingoo Han <jingoohan1@gmail.com> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: Michal Januszewski <spock@gentoo.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-15-tzimmermann@suse.de
1 parent 252b7b1 commit 8a4675e

24 files changed

Lines changed: 10 additions & 29 deletions

drivers/video/fbdev/arcfb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,6 @@ static int arcfb_probe(struct platform_device *dev)
546546
par->c2io_addr = c2io_addr;
547547
par->cslut[0] = 0x00;
548548
par->cslut[1] = 0x06;
549-
info->flags = FBINFO_FLAG_DEFAULT;
550549
spin_lock_init(&par->lock);
551550
if (irq) {
552551
par->irq = irq;

drivers/video/fbdev/aty/aty128fb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,6 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)
19271927

19281928
/* fill in info */
19291929
info->fbops = &aty128fb_ops;
1930-
info->flags = FBINFO_FLAG_DEFAULT;
19311930

19321931
par->lcd_on = default_lcd_on;
19331932
par->crt_on = default_crt_on;

drivers/video/fbdev/broadsheetfb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ static int broadsheetfb_probe(struct platform_device *dev)
10691069

10701070
mutex_init(&par->io_lock);
10711071

1072-
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
1072+
info->flags = FBINFO_VIRTFB;
10731073

10741074
info->fbdefio = &broadsheetfb_defio;
10751075
fb_deferred_io_init(info);

drivers/video/fbdev/da8xx-fb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,6 @@ static int fb_probe(struct platform_device *device)
14631463
da8xx_fb_var.bits_per_pixel = lcd_cfg->bpp;
14641464

14651465
/* Initialize fbinfo */
1466-
da8xx_fb_info->flags = FBINFO_FLAG_DEFAULT;
14671466
da8xx_fb_info->fix = da8xx_fb_fix;
14681467
da8xx_fb_info->var = da8xx_fb_var;
14691468
da8xx_fb_info->fbops = &da8xx_fb_ops;

drivers/video/fbdev/efifb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,6 @@ static int efifb_probe(struct platform_device *dev)
555555
info->fbops = &efifb_ops;
556556
info->var = efifb_defined;
557557
info->fix = efifb_fix;
558-
info->flags = FBINFO_FLAG_DEFAULT;
559558

560559
orientation = drm_get_panel_orientation_quirk(efifb_defined.xres,
561560
efifb_defined.yres);

drivers/video/fbdev/goldfishfb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ static int goldfish_fb_probe(struct platform_device *pdev)
212212
height = readl(fb->reg_base + FB_GET_HEIGHT);
213213

214214
fb->fb.fbops = &goldfish_fb_ops;
215-
fb->fb.flags = FBINFO_FLAG_DEFAULT;
216215
fb->fb.pseudo_palette = fb->cmap;
217216
fb->fb.fix.type = FB_TYPE_PACKED_PIXELS;
218217
fb->fb.fix.visual = FB_VISUAL_TRUECOLOR;

drivers/video/fbdev/gxt4500.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,7 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
690690
#endif
691691

692692
info->fbops = &gxt4500_ops;
693-
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_HWACCEL_XPAN |
694-
FBINFO_HWACCEL_YPAN;
693+
info->flags = FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN;
695694

696695
err = fb_alloc_cmap(&info->cmap, 256, 0);
697696
if (err) {

drivers/video/fbdev/hecubafb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static int hecubafb_probe(struct platform_device *dev)
189189
par->send_command = apollo_send_command;
190190
par->send_data = apollo_send_data;
191191

192-
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
192+
info->flags = FBINFO_VIRTFB;
193193

194194
info->fbdefio = &hecubafb_defio;
195195
fb_deferred_io_init(info);

drivers/video/fbdev/imxfb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,7 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)
698698
info->var.vmode = FB_VMODE_NONINTERLACED;
699699

700700
info->fbops = &imxfb_ops;
701-
info->flags = FBINFO_FLAG_DEFAULT |
702-
FBINFO_READS_FAST;
701+
info->flags = FBINFO_READS_FAST;
703702

704703
np = pdev->dev.of_node;
705704
info->var.grayscale = of_property_read_bool(np,

drivers/video/fbdev/intelfb/intelfbdrv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,6 @@ static int intelfb_set_fbinfo(struct intelfb_info *dinfo)
10981098

10991099
DBG_MSG("intelfb_set_fbinfo\n");
11001100

1101-
info->flags = FBINFO_FLAG_DEFAULT;
11021101
info->fbops = &intel_fb_ops;
11031102
info->pseudo_palette = dinfo->pseudo_palette;
11041103

0 commit comments

Comments
 (0)