Loading drivers/acpi/asus_acpi.c +1 −1 Original line number Diff line number Diff line Loading @@ -1401,7 +1401,7 @@ static int __init asus_acpi_init(void) return result; } asus_backlight_device = backlight_device_register("asus", NULL, asus_backlight_device = backlight_device_register("asus",NULL,NULL, &asus_backlight_data); if (IS_ERR(asus_backlight_device)) { printk(KERN_ERR "Could not register asus backlight device\n"); Loading drivers/acpi/ibm_acpi.c +2 −3 Original line number Diff line number Diff line Loading @@ -1714,7 +1714,7 @@ static struct backlight_properties ibm_backlight_data = { static int brightness_init(void) { ibm_backlight_device = backlight_device_register("ibm", NULL, ibm_backlight_device = backlight_device_register("ibm", NULL, NULL, &ibm_backlight_data); if (IS_ERR(ibm_backlight_device)) { printk(IBM_ERR "Could not register backlight device\n"); Loading Loading @@ -2503,7 +2503,7 @@ static int __init setup_notify(struct ibm_struct *ibm) ibm->name, status); return -ENODEV; } ibm->notify_installed = 1; return 0; } Loading Loading @@ -2580,7 +2580,6 @@ static int __init ibm_init(struct ibm_struct *ibm) ret = setup_notify(ibm); if (ret < 0) return ret; ibm->notify_installed = 1; } return 0; Loading drivers/acpi/toshiba_acpi.c +2 −1 Original line number Diff line number Diff line Loading @@ -591,6 +591,7 @@ static int __init toshiba_acpi_init(void) } toshiba_backlight_device = backlight_device_register("toshiba",NULL, NULL, &toshiba_backlight_data); if (IS_ERR(toshiba_backlight_device)) { printk(KERN_ERR "Could not register toshiba backlight device\n"); Loading drivers/acpi/video.c +34 −7 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ * * Copyright (C) 2004 Luming Yu <luming.yu@intel.com> * Copyright (C) 2004 Bruno Ducrot <ducrot@poupinou.org> * Copyright (C) 2006 Thomas Tuttle <linux-kernel@ttuttle.net> * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Loading Loading @@ -47,11 +48,11 @@ #define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83 #define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84 #define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x82 #define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x83 #define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x84 #define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x85 #define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x86 #define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x85 #define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x86 #define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x87 #define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x88 #define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x89 #define ACPI_VIDEO_HEAD_INVALID (~0u - 1) #define ACPI_VIDEO_HEAD_END (~0u) Loading Loading @@ -1505,9 +1506,35 @@ static int acpi_video_get_next_level(struct acpi_video_device *device, u32 level_current, u32 event) { /*Fix me */ int min, max, min_above, max_below, i, l; max = max_below = 0; min = min_above = 255; for (i = 0; i < device->brightness->count; i++) { l = device->brightness->levels[i]; if (l < min) min = l; if (l > max) max = l; if (l < min_above && l > level_current) min_above = l; if (l > max_below && l < level_current) max_below = l; } switch (event) { case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: return (level_current < max) ? min_above : min; case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: return (level_current < max) ? min_above : max; case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: return (level_current > min) ? max_below : min; case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: return 0; default: return level_current; } } static void acpi_video_switch_brightness(struct acpi_video_device *device, int event) Loading drivers/misc/msi-laptop.c +2 −1 Original line number Diff line number Diff line Loading @@ -317,7 +317,8 @@ static int __init msi_init(void) /* Register backlight stuff */ msibl_device = backlight_device_register("msi-laptop-bl", NULL, &msibl_props); msibl_device = backlight_device_register("msi-laptop-bl", NULL, NULL, &msibl_props); if (IS_ERR(msibl_device)) return PTR_ERR(msibl_device); Loading Loading
drivers/acpi/asus_acpi.c +1 −1 Original line number Diff line number Diff line Loading @@ -1401,7 +1401,7 @@ static int __init asus_acpi_init(void) return result; } asus_backlight_device = backlight_device_register("asus", NULL, asus_backlight_device = backlight_device_register("asus",NULL,NULL, &asus_backlight_data); if (IS_ERR(asus_backlight_device)) { printk(KERN_ERR "Could not register asus backlight device\n"); Loading
drivers/acpi/ibm_acpi.c +2 −3 Original line number Diff line number Diff line Loading @@ -1714,7 +1714,7 @@ static struct backlight_properties ibm_backlight_data = { static int brightness_init(void) { ibm_backlight_device = backlight_device_register("ibm", NULL, ibm_backlight_device = backlight_device_register("ibm", NULL, NULL, &ibm_backlight_data); if (IS_ERR(ibm_backlight_device)) { printk(IBM_ERR "Could not register backlight device\n"); Loading Loading @@ -2503,7 +2503,7 @@ static int __init setup_notify(struct ibm_struct *ibm) ibm->name, status); return -ENODEV; } ibm->notify_installed = 1; return 0; } Loading Loading @@ -2580,7 +2580,6 @@ static int __init ibm_init(struct ibm_struct *ibm) ret = setup_notify(ibm); if (ret < 0) return ret; ibm->notify_installed = 1; } return 0; Loading
drivers/acpi/toshiba_acpi.c +2 −1 Original line number Diff line number Diff line Loading @@ -591,6 +591,7 @@ static int __init toshiba_acpi_init(void) } toshiba_backlight_device = backlight_device_register("toshiba",NULL, NULL, &toshiba_backlight_data); if (IS_ERR(toshiba_backlight_device)) { printk(KERN_ERR "Could not register toshiba backlight device\n"); Loading
drivers/acpi/video.c +34 −7 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ * * Copyright (C) 2004 Luming Yu <luming.yu@intel.com> * Copyright (C) 2004 Bruno Ducrot <ducrot@poupinou.org> * Copyright (C) 2006 Thomas Tuttle <linux-kernel@ttuttle.net> * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Loading Loading @@ -47,11 +48,11 @@ #define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83 #define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84 #define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x82 #define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x83 #define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x84 #define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x85 #define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x86 #define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x85 #define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x86 #define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x87 #define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x88 #define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x89 #define ACPI_VIDEO_HEAD_INVALID (~0u - 1) #define ACPI_VIDEO_HEAD_END (~0u) Loading Loading @@ -1505,9 +1506,35 @@ static int acpi_video_get_next_level(struct acpi_video_device *device, u32 level_current, u32 event) { /*Fix me */ int min, max, min_above, max_below, i, l; max = max_below = 0; min = min_above = 255; for (i = 0; i < device->brightness->count; i++) { l = device->brightness->levels[i]; if (l < min) min = l; if (l > max) max = l; if (l < min_above && l > level_current) min_above = l; if (l > max_below && l < level_current) max_below = l; } switch (event) { case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: return (level_current < max) ? min_above : min; case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: return (level_current < max) ? min_above : max; case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: return (level_current > min) ? max_below : min; case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: return 0; default: return level_current; } } static void acpi_video_switch_brightness(struct acpi_video_device *device, int event) Loading
drivers/misc/msi-laptop.c +2 −1 Original line number Diff line number Diff line Loading @@ -317,7 +317,8 @@ static int __init msi_init(void) /* Register backlight stuff */ msibl_device = backlight_device_register("msi-laptop-bl", NULL, &msibl_props); msibl_device = backlight_device_register("msi-laptop-bl", NULL, NULL, &msibl_props); if (IS_ERR(msibl_device)) return PTR_ERR(msibl_device); Loading