--- h4000_lcd.c.orig Thu Jun 3 18:07:19 2004 +++ h4000_lcd.c Thu Jun 3 18:40:40 2004 @@ -34,19 +34,19 @@ #include #include #include -#include <../drivers/video/pxafb.h> +#include #include #include #include #include +#include #include -#include "asic2_base.h" #include "asic3_base.h" -extern struct platform_device h3900_asic2, h3900_asic3; +extern struct platform_device h4000_asic3; /* On screen enable, we get @@ -88,8 +88,7 @@ static int h4000_backlight_set_power (struct backlight_device *bl, int on) { - printk("%s: backlight o%s\n", __FUNCTION__, - on ? "n" : "ff",GAFR0_U); + printk("%s: backlight o%s\n", __FUNCTION__, on ? "n" : "ff"); if (on) { // also CKEN[0] = 1 turns on PWM clock, mabey do that here too. GAFR0_U |= 0x2; @@ -140,22 +139,16 @@ LCCR3_PCP | /*PCD */ 0x8) }; -static void *h4000_get_mach_info(struct lcd_device *lm) -{ - return (void *)&h4000_fb_info; -} - -static struct lcd_device h4000_lcd_device = { - .name = "pxafb", - .get_mach_info = h4000_get_mach_info, +static struct lcd_properties h4000_lcd_properties = { + .owner = THIS_MODULE, .set_power = h4000_lcd_set_power, .get_power = h4000_lcd_get_power, .set_enable = h4000_lcd_set_enable, - .get_enable = h4000_lcd_get_enable, + .get_enable = h4000_lcd_get_enable, }; -static struct backlight_device h4000_backlight_device = { - .name = "pxafb", +static struct backlight_properties h4000_backlight_properties = { + .owner = THIS_MODULE, .set_power = h4000_backlight_set_power, .get_power = h4000_backlight_get_power, }; @@ -168,19 +161,19 @@ if (! machine_is_h4000 ()) return -ENODEV; - rc = lcd_device_register(&h4000_lcd_device); + rc = lcd_device_register("pxafb", (void*)&h4000_fb_info, &h4000_lcd_properties); if (rc) - return rc; - rc = backlight_device_register(&h4000_backlight_device); - + return rc; + rc = backlight_device_register("pxafb", NULL, &h4000_backlight_properties); + return rc; } static void h4000_lcd_exit (void) { - lcd_device_unregister (&h4000_lcd_device); - backlight_device_unregister (&h4000_backlight_device); + lcd_device_unregister("pxafb"); + backlight_device_unregister("pxafb"); } module_init (h4000_lcd_init);