* [PATCH] OMAP Backlight driver
@ 2007-05-16 15:28 stefano babic
2007-05-16 17:56 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: stefano babic @ 2007-05-16 15:28 UTC (permalink / raw)
To: linux-omap-open-source
Hi all,
in the actual repository the video backlight API is already updated to the new
one in kernel 2.6.22-rc1 (include/linux/backlight.h).
Some drivers are updated,too.
However, the backlight driver for Omap (drivers/video/backlight/omap_bl.c) ist
not yet updated to the new API and for this reason cannot be compiled.
I changed the file according to the new interface :
diff --git a/drivers/video/backlight/omap_bl.c
b/drivers/video/backlight/omap_bl.c
index 3b57b27..a9532fd 100644
--- a/drivers/video/backlight/omap_bl.c
+++ b/drivers/video/backlight/omap_bl.c
@@ -109,34 +109,34 @@ static int omapbl_update_status(struct b
{
struct omap_backlight *bl = class_get_devdata(&dev->class_dev);
- if (bl->current_intensity != dev->props->brightness) {
- if (dev->props->brightness < 0)
+ if (bl->current_intensity != dev->props.brightness) {
+ if (dev->props.brightness < 0)
return -EPERM; /* Leave current_intensity untouched */
if (bl->powermode == FB_BLANK_UNBLANK)
- omapbl_send_intensity(dev->props->brightness);
- bl->current_intensity = dev->props->brightness;
+ omapbl_send_intensity(dev->props.brightness);
+ bl->current_intensity = dev->props.brightness;
}
- if (dev->props->fb_blank != bl->powermode)
- omapbl_set_power(dev, dev->props->fb_blank);
+ if (dev->props.fb_blank != bl->powermode)
+ omapbl_set_power(dev, dev->props.fb_blank);
return 0;
}
+
static int omapbl_get_intensity(struct backlight_device *dev)
{
struct omap_backlight *bl = class_get_devdata(&dev->class_dev);
return bl->current_intensity;
}
-static struct backlight_properties omapbl_data = {
- .owner = THIS_MODULE,
- .get_brightness = omapbl_get_intensity,
- .update_status = omapbl_update_status,
- .max_brightness = OMAPBL_MAX_INTENSITY,
+static struct backlight_ops omapbl_ops = {
+ .get_brightness = omapbl_get_intensity,
+ .update_status = omapbl_update_status,
};
+
static int omapbl_probe(struct platform_device *pdev)
{
struct backlight_device *dev;
@@ -146,14 +146,14 @@ static int omapbl_probe(struct platform_
if (!pdata)
return -ENXIO;
- omapbl_data.check_fb = pdata->check_fb;
+ omapbl_ops.check_fb = pdata->check_fb;
bl = kzalloc(sizeof(struct omap_backlight), GFP_KERNEL);
if (unlikely(!bl))
return -ENOMEM;
dev = backlight_device_register("omap-bl", &pdev->dev,
- bl, &omapbl_data);
+ bl, &omapbl_ops);
if (IS_ERR(dev)) {
kfree(bl);
return PTR_ERR(dev);
@@ -169,8 +169,8 @@ static int omapbl_probe(struct platform_
omap_cfg_reg(PWL); /* Conflicts with UART3 */
- omapbl_data.fb_blank = FB_BLANK_UNBLANK;
- omapbl_data.brightness = pdata->default_intensity;
+ dev->props.fb_blank = FB_BLANK_UNBLANK;
+ dev->props.brightness = pdata->default_intensity;
omapbl_update_status(dev);
printk(KERN_INFO "OMAP LCD backlight initialised\n");
Regards,
stefano b.
--
stefano <stefano.babic@babic.homelinux.org>
GPG Key: 0x55814DDE
Fingerprint 4E85 2A66 4CBA 497A 2A7B D3BF 5973 F216 5581 4DDE
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] OMAP Backlight driver
2007-05-16 15:28 [PATCH] OMAP Backlight driver stefano babic
@ 2007-05-16 17:56 ` Tony Lindgren
2007-05-16 19:38 ` stefano babic
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2007-05-16 17:56 UTC (permalink / raw)
To: stefano babic; +Cc: linux-omap-open-source
Hi,
* stefano babic <stefano.babic@babic.homelinux.org> [070516 08:30]:
> Hi all,
>
> in the actual repository the video backlight API is already updated to the new
> one in kernel 2.6.22-rc1 (include/linux/backlight.h).
> Some drivers are updated,too.
> However, the backlight driver for Omap (drivers/video/backlight/omap_bl.c) ist
> not yet updated to the new API and for this reason cannot be compiled.
>
> I changed the file according to the new interface :
Great, can you please reply with your Signed-off-by so I can apply this
to linux-omap tree?
Regards,
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] OMAP Backlight driver
2007-05-16 17:56 ` Tony Lindgren
@ 2007-05-16 19:38 ` stefano babic
2007-05-16 22:01 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: stefano babic @ 2007-05-16 19:38 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap-open-source
On Wednesday 16 May 2007 19:56, Tony Lindgren wrote:
> Great, can you please reply with your Signed-off-by so I can apply this
> to linux-omap tree?
Sorry Tony, I forgot it in the previous mail:
Signed-off-by: Stefano Babic <stefano.babic@babic.homelinux.org>
Regards,
stefano
--
stefano <stefano.babic@babic.homelinux.org>
GPG Key: 0x55814DDE
Fingerprint 4E85 2A66 4CBA 497A 2A7B D3BF 5973 F216 5581 4DDE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] OMAP Backlight driver
2007-05-16 19:38 ` stefano babic
@ 2007-05-16 22:01 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2007-05-16 22:01 UTC (permalink / raw)
To: stefano babic; +Cc: linux-omap-open-source
* stefano babic <stefano.babic@babic.homelinux.org> [070516 12:40]:
> On Wednesday 16 May 2007 19:56, Tony Lindgren wrote:
> > Great, can you please reply with your Signed-off-by so I can apply this
> > to linux-omap tree?
>
> Sorry Tony, I forgot it in the previous mail:
>
> Signed-off-by: Stefano Babic <stefano.babic@babic.homelinux.org>
Thanks, pushing today.
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-05-16 22:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-16 15:28 [PATCH] OMAP Backlight driver stefano babic
2007-05-16 17:56 ` Tony Lindgren
2007-05-16 19:38 ` stefano babic
2007-05-16 22:01 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox