From 2649ed0c0e2cce1a18daa780dec4b069699569c6 Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Wed, 16 May 2007 15:00:49 -0700 Subject: [PATCH] OMAP Backlight driver 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 Signed-off-by: Stefano Babic Signed-off-by: Tony Lindgren --- drivers/video/backlight/omap_bl.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/video/backlight/omap_bl.c b/drivers/video/backlight/omap_bl.c index 3b57b278487..a9532fdf07c 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 backlight_device *dev) { 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_device *pdev) 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_device *pdev) 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"); -- 2.41.1