From: Henrique de M. H. <hm...@hm...> - 2006-11-22 20:13:50
|
From: Henrique de Moraes Holschuh <hm...@hm...> This patch works around an annoying behaviour in the backlight class, th= at would reset the screen to brightness and power level 0 on module unload. Please refer to http://thread.gmane.org/gmane.linux.acpi.devel/19712 for details. Signed-off-by: Henrique de Moraes Holschuh <hm...@hm...> --- drivers/acpi/ibm_acpi.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index dab3fd1..4299f43 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c @@ -1732,6 +1732,13 @@ static int brightness_init(void) static void brightness_exit(void) { if (ibm_backlight_device) { + /* FIXME: can be removed when sanity returns to backlight_device_unreg= ister */ + if (likely(ibm_backlight_device->props)) { + down(&ibm_backlight_device->sem); + ibm_backlight_device->props->update_status =3D NULL; + up(&ibm_backlight_device->sem); + } + backlight_device_unregister(ibm_backlight_device); ibm_backlight_device =3D NULL; } |