Commit 4437cd1e authored by Henrique de Moraes Holschuh's avatar Henrique de Moraes Holschuh Committed by Linus Torvalds
Browse files

[PATCH] backlight: do not power off backlight when unregistering

ACPI drivers like ibm-acpi are moving to the backlight sysfs
infrastructure.  During ibm-acpi testing, I have noticed that
backlight_device_unregister() sets the display brightness and power to

This causes the display to be dimmed on ibm-acpi module removal.  It will
affect all other ACPI drivers that are being converted to use the backlight
class, as well.  It also affects a number of framebuffer devices that are
used on desktops and laptops which might also not want such behaviour.

Since working around this behaviour requires undesireable hacks, Richard
Purdie decided that we would be better off reverting the changes in the
sysfs class, and adding the code to dim and power off the backlight device
to the drivers that want it.  This patch is my attempt to do so.

Patch against latest linux-2.6.git.  Changes untested, as I lack the
required hardware.  Still, they are trivial enough that, apart from typos,
there is little chance of getting them wrong.
Signed-off-by: default avatarHenrique de Moraes Holschuh <>
Acked-by: default avatarRichard Purdie <>
Acked-by: default avatarPavel Machek <>
Acked-by: default avatarJames Simmons <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 024cd7e0
......@@ -282,12 +282,6 @@ void backlight_device_unregister(struct backlight_device *bd)
if (likely(bd->props && bd->props->update_status)) {
bd->props->brightness = 0;
bd->props->power = 0;
bd->props = NULL;
......@@ -135,6 +135,10 @@ static int corgibl_probe(struct platform_device *pdev)
static int corgibl_remove(struct platform_device *dev)
corgibl_data.power = 0;
corgibl_data.brightness = 0;
printk("Corgi Backlight Driver Unloaded\n");
......@@ -117,6 +117,10 @@ static int __init hp680bl_probe(struct platform_device *dev)
static int hp680bl_remove(struct platform_device *dev)
hp680bl_data.brightness = 0;
hp680bl_data.power = 0;
return 0;
......@@ -200,6 +200,10 @@ static int locomolcd_remove(struct locomo_dev *dev)
unsigned long flags;
locomobl_data.brightness = 0;
locomobl_data.power = 0;
locomolcd_dev = NULL;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment