From patchwork Fri Aug 28 12:56:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 44486 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 n7SD3j1q008656 for ; Fri, 28 Aug 2009 13:03:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750799AbZH1NDp (ORCPT ); Fri, 28 Aug 2009 09:03:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751114AbZH1NDp (ORCPT ); Fri, 28 Aug 2009 09:03:45 -0400 Received: from smtp22.services.sfr.fr ([93.17.128.11]:60848 "EHLO smtp22.services.sfr.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006AbZH1NDk (ORCPT ); Fri, 28 Aug 2009 09:03:40 -0400 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2206.sfr.fr (SMTP Server) with ESMTP id 1763170000A4; Fri, 28 Aug 2009 14:57:48 +0200 (CEST) Received: from localhost.localdomain (224.96.81-79.rev.gaoland.net [79.81.96.224]) by msfrf2206.sfr.fr (SMTP Server) with ESMTP id 9E77C700008E; Fri, 28 Aug 2009 14:57:47 +0200 (CEST) X-SFR-UUID: 20090828125747649.9E77C700008E@msfrf2206.sfr.fr From: Corentin Chary To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, alan-jenkins@tuffmail.co.uk, Corentin Chary Subject: [PATCH 18/24] asus-laptop: set maximum led brightness Date: Fri, 28 Aug 2009 14:56:49 +0200 Message-Id: <1251464215-6540-19-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.6.4 In-Reply-To: <1251464215-6540-18-git-send-email-corentincj@iksaif.net> References: <1251464215-6540-1-git-send-email-corentincj@iksaif.net> <1251464215-6540-2-git-send-email-corentincj@iksaif.net> <1251464215-6540-3-git-send-email-corentincj@iksaif.net> <1251464215-6540-4-git-send-email-corentincj@iksaif.net> <1251464215-6540-5-git-send-email-corentincj@iksaif.net> <1251464215-6540-6-git-send-email-corentincj@iksaif.net> <1251464215-6540-7-git-send-email-corentincj@iksaif.net> <1251464215-6540-8-git-send-email-corentincj@iksaif.net> <1251464215-6540-9-git-send-email-corentincj@iksaif.net> <1251464215-6540-10-git-send-email-corentincj@iksaif.net> <1251464215-6540-11-git-send-email-corentincj@iksaif.net> <1251464215-6540-12-git-send-email-corentincj@iksaif.net> <1251464215-6540-13-git-send-email-corentincj@iksaif.net> <1251464215-6540-14-git-send-email-corentincj@iksaif.net> <1251464215-6540-15-git-send-email-corentincj@iksaif.net> <1251464215-6540-16-git-send-email-corentincj@iksaif.net> <1251464215-6540-17-git-send-email-corentincj@iksaif.net> <1251464215-6540-18-git-send-email-corentincj@iksaif.net> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Set the right maximum brightness which is one, because they can only be on or off. Signed-off-by: Corentin Chary --- drivers/platform/x86/asus-laptop.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 410e545..652902e 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -243,7 +243,7 @@ static struct backlight_ops asusbl_ops = { * potentially bad time, such as a timer interrupt. */ static struct workqueue_struct *led_workqueue; -#define ASUS_LED(object, ledname) \ +#define ASUS_LED(object, ledname, max) \ static void object##_led_set(struct led_classdev *led_cdev, \ enum led_brightness value); \ static enum led_brightness object##_led_get( \ @@ -255,13 +255,14 @@ static struct workqueue_struct *led_workqueue; .name = "asus::" ledname, \ .brightness_set = object##_led_set, \ .brightness_get = object##_led_get, \ + .max_brightness = max \ } -ASUS_LED(mled, "mail"); -ASUS_LED(tled, "touchpad"); -ASUS_LED(rled, "record"); -ASUS_LED(pled, "phone"); -ASUS_LED(gled, "gaming"); +ASUS_LED(mled, "mail", 1); +ASUS_LED(tled, "touchpad", 1); +ASUS_LED(rled, "record", 1); +ASUS_LED(pled, "phone", 1); +ASUS_LED(gled, "gaming", 1); struct key_entry { char type;