#ifdef CONFIG_OMNIBOOK_BACKLIGHT
backend_byte_read(io_op, (u8*) &omnibookbl_data.brightness);
omnibookbl_data.max_brightness = omnibook_max_brightness;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+ omnibook_backlight_device =
+ backlight_device_register(OMNIBOOK_MODULE_NAME, NULL, (void *)io_op, &omnibookbl_data);
+#else
omnibook_backlight_device =
backlight_device_register(OMNIBOOK_MODULE_NAME, (void *)io_op, &omnibookbl_data);
+#endif
if (IS_ERR(omnibook_backlight_device)) {
printk(O_ERR "Unable to register as backlight device.\n");
return -ENODEV;
*/
#ifdef OMNIBOOK_STANDALONE
-#if (defined (CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE)) && (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
+#if (defined (CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE)) && (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16))
#define CONFIG_OMNIBOOK_BACKLIGHT
#else
#undef CONFIG_OMNIBOOK_BACKLIGHT