From 6304da8a91da8f09c3a649b70b49ed2090d41ade Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Sat, 15 Jul 2023 20:51:44 +0200 Subject: fbdev: Remove FBINFO_DEFAULT from static structs The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by a static declaration. 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-3-tzimmermann@suse.de --- drivers/video/fbdev/macfb.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/video/fbdev/macfb.c') diff --git a/drivers/video/fbdev/macfb.c b/drivers/video/fbdev/macfb.c index 44ff860a3f37..5ca208d992cc 100644 --- a/drivers/video/fbdev/macfb.c +++ b/drivers/video/fbdev/macfb.c @@ -876,7 +876,6 @@ static int __init macfb_init(void) fb_info.var = macfb_defined; fb_info.fix = macfb_fix; fb_info.pseudo_palette = pseudo_palette; - fb_info.flags = FBINFO_DEFAULT; err = fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0); if (err) -- cgit From 6ca44d64b04cee14bbc65a9e719f87924745c5d2 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 3 Aug 2023 20:35:47 +0200 Subject: fbdev/macfb: Use fbdev I/O helpers Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions. Select the correct modules with Kconfig's FB_IOMEM_HELPERS token. The macro and token set the currently selected values, so there is no functional change. v3: * use _IOMEM_ in commit message v2: * updated to use _IOMEM_ tokens Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-23-tzimmermann@suse.de --- drivers/video/fbdev/macfb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/video/fbdev/macfb.c') diff --git a/drivers/video/fbdev/macfb.c b/drivers/video/fbdev/macfb.c index 5ca208d992cc..887fffdccd24 100644 --- a/drivers/video/fbdev/macfb.c +++ b/drivers/video/fbdev/macfb.c @@ -498,10 +498,8 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green, static const struct fb_ops macfb_ops = { .owner = THIS_MODULE, + FB_DEFAULT_IOMEM_OPS, .fb_setcolreg = macfb_setcolreg, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, }; static void __init macfb_setup(char *options) -- cgit