Skip to contentSkip to conversation

fbdev: make fb_ops const

PATCH In review Bhumika Goyal 2 participants 5 messages Aug 10, 2017 – Aug 21, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover fbdev: make fb_ops const

Make these const.

Bhumika Goyal (2):
fbdev: matrox: make fb_ops const
fbdev: i810: make fb_ops const

 drivers/video/fbdev/i810/i810_main.c       | 2 +-
 drivers/video/fbdev/matrox/matroxfb_base.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 fbdev: matrox: make fb_ops const

Make fb_ops const as it is only used during a copy operation. Done using Coccinelle.

---
 drivers/video/fbdev/matrox/matroxfb_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/matrox/matroxfb_base.c +1 -1
index 00ea4e4..49ef48d 100644
@@ -1198,7 +1198,7 @@ static int matroxfb_blank(int blank, struct fb_info *info)
 	return 0;
 }
 
-static struct fb_ops matroxfb_ops = {
+static const struct fb_ops matroxfb_ops = {
 	.owner =	THIS_MODULE,
 	.fb_open =	matroxfb_open,
 	.fb_release =	matroxfb_release,
Signature · 1 line
1.9.1
#3 lore raw

PATCH 2/2 fbdev: i810: make fb_ops const

In reply to Bhumika Goyal

Make the structure const as it is only used during a copy operation. Done using Coccinelle.

---
 drivers/video/fbdev/i810/i810_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/i810/i810_main.c +1 -1
index f0a758a..d18f7b3 100644
@@ -1542,7 +1542,7 @@ static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
 	return 0;
 }
 
-static struct fb_ops i810fb_ops = {
+static const struct fb_ops i810fb_ops = {
 	.owner =             THIS_MODULE,
 	.fb_open =           i810fb_open,
 	.fb_release =        i810fb_release,
Signature · 1 line
1.9.1