diff mbox

[1/2] backlight: extend event support to also support poll()

Message ID 1253468688-4933-2-git-send-email-hmh@hmh.eng.br (mailing list archive)
State Accepted
Delegated to: Matthew Garrett
Headers show

Commit Message

Henrique de Moraes Holschuh Sept. 20, 2009, 5:44 p.m. UTC
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>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
---
 drivers/video/backlight/backlight.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 01efb2d..4d15dfe 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -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,