Skip to contentSkip to conversation

fix compilation of omap1_bl

PATCH New Olof Johansson 1 participant 1 message Dec 25, 2009

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

PATCH 1/1 fix compilation of omap1_bl

9905a43b2d563e6f89e4c63c4278ada03f2ebb14 broke omap1_bl, since it assigns the check_fb function based on platform data information:

drivers/video/backlight/omap1_bl.c: In function 'omapbl_probe':
drivers/video/backlight/omap1_bl.c:142: error: assignment of read-only variable 'omapbl_ops'

De-constify the function pointer (and the struct).

drivers/video/backlight/omap1_bl.c +1 -1
index 409ca96..8693e5f 100644
@@ -125,7 +125,7 @@ static int omapbl_get_intensity(struct backlight_device *dev)
 	return bl->current_intensity;
 }
 
-static const struct backlight_ops omapbl_ops = {
+static struct backlight_ops omapbl_ops = {
 	.get_brightness = omapbl_get_intensity,
 	.update_status  = omapbl_update_status,
 };
include/linux/backlight.h +1 -1
index 8c4f884..76c4d65 100644
@@ -47,7 +47,7 @@ struct backlight_ops {
 	int (* const get_brightness)(struct backlight_device *);
 	/* Check if given framebuffer device is the one bound to this backlight;
 	   return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */
-	int (* const check_fb)(struct fb_info *);
+	int (*check_fb)(struct fb_info *);
 };
 
 /* This structure defines all the properties of a backlight */