backlight: extend event support to also support poll()
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 20 Sep 2009 17:44:47 +0000 (14:44 -0300)
committerRichard Purdie <rpurdie@linux.intel.com>
Sat, 26 Sep 2009 15:48:06 +0000 (16:48 +0100)
Extend the backlight event support to also allow the use of
poll()/select() on actual_brightness.

We already have the entire event hookup anyway, adding a single
function call in one line to get functionality like that is a really
good deal.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
drivers/video/backlight/backlight.c

index 6e1446ae7f52e07b1a83aef9778f5e9d0ab7eed4..6615ac7fa60a6124e31257a2ce1b09cf871ed719 100644 (file)
@@ -91,6 +91,7 @@ static void backlight_generate_event(struct backlight_device *bd,
        }
        envp[1] = NULL;
        kobject_uevent_env(&bd->dev.kobj, KOBJ_CHANGE, envp);
+       sysfs_notify(&bd->dev.kobj, NULL, "actual_brightness");
 }
 
 static ssize_t backlight_show_power(struct device *dev,