From patchwork Sun Sep 20 17:44:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrique de Moraes Holschuh X-Patchwork-Id: 48928 X-Patchwork-Delegate: mjg59@srcf.ucam.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8KHiw1N016065 for ; Sun, 20 Sep 2009 17:44:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755018AbZITRox (ORCPT ); Sun, 20 Sep 2009 13:44:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755070AbZITRox (ORCPT ); Sun, 20 Sep 2009 13:44:53 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:51338 "EHLO out1.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755004AbZITRox (ORCPT ); Sun, 20 Sep 2009 13:44:53 -0400 Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id A6D5370B2D; Sun, 20 Sep 2009 13:44:56 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 20 Sep 2009 13:44:56 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; s=smtpout; bh=Y7Jwbh3oFLxTNn4NKcaVOVSB5nY=; b=S5hkr75+rI8qzktH6VtE9/P8QIc/smajLQh/hLfcTFQ34mU4ZimrTMHFl609ppIkuIS24mwAWuR467PPFf/4wptGbFfbYQE7PexMIQrmQ9K8ZmSmjfXychPJeQllMthJxjyM/D+W0tkKBASTRGlwDrcewKddf6ly5/pt7i63n84= X-Sasl-enc: 19qPF0A8q7MMW/n56WVVUAqUomDmmdss2ItNEQho/ooP 1253468695 Received: from thorin.khazad-dum.debian.net (187-27-2-224.3g.claro.net.br [187.27.2.224]) by mail.messagingengine.com (Postfix) with ESMTPSA id D8709105EF; Sun, 20 Sep 2009 13:44:55 -0400 (EDT) Received: by thorin.khazad-dum.debian.net (Postfix, from userid 1000) id 367001E9277; Sun, 20 Sep 2009 14:44:50 -0300 (BRT) From: Henrique de Moraes Holschuh To: Matthew Garrett Cc: Richard Purdie , linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, Henrique de Moraes Holschuh , Matthew Garrett Subject: [PATCH 1/2] backlight: extend event support to also support poll() Date: Sun, 20 Sep 2009 14:44:47 -0300 Message-Id: <1253468688-4933-2-git-send-email-hmh@hmh.eng.br> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1253468688-4933-1-git-send-email-hmh@hmh.eng.br> References: <1253468688-4933-1-git-send-email-hmh@hmh.eng.br> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 Cc: Matthew Garrett Cc: Richard Purdie --- drivers/video/backlight/backlight.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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,