From: Olof Johansson <olof@lixom.net>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: linux-kernel@vger.kernel.org, tony@atomide.com,
Emese Revfy <re.emese@gmail.com>
Subject: [PATCH] [REGRESSION] fix compilation of omap1_bl
Date: Fri, 25 Dec 2009 17:49:58 -0600 [thread overview]
Message-ID: <20091225234958.GA20440@lixom.net> (raw)
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).
Signed-off-by: Olof Johansson <olof@lixom.net>
diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c
index 409ca96..8693e5f 100644
--- a/drivers/video/backlight/omap1_bl.c
+++ b/drivers/video/backlight/omap1_bl.c
@@ -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,
};
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index 8c4f884..76c4d65 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -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 */
reply other threads:[~2009-12-25 23:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091225234958.GA20440@lixom.net \
--to=olof@lixom.net \
--cc=linux-kernel@vger.kernel.org \
--cc=re.emese@gmail.com \
--cc=rpurdie@rpsys.net \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®