From patchwork Thu Jan 8 06:32:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Rui X-Patchwork-Id: 1309 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 n086R8YE006165 for ; Wed, 7 Jan 2009 22:27:29 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751489AbZAHGbG (ORCPT ); Thu, 8 Jan 2009 01:31:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751599AbZAHGbG (ORCPT ); Thu, 8 Jan 2009 01:31:06 -0500 Received: from mga01.intel.com ([192.55.52.88]:32316 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751489AbZAHGbF (ORCPT ); Thu, 8 Jan 2009 01:31:05 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 07 Jan 2009 22:21:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.37,231,1231142400"; d="scan'208";a="420624748" Received: from rzhang-dt.sh.intel.com (HELO [10.239.36.160]) ([10.239.36.160]) by fmsmga002.fm.intel.com with ESMTP; 07 Jan 2009 22:26:01 -0800 Subject: [RESEND PATCH 1/2] backlight: always update the brightness when poking "brightness" From: Zhang Rui To: rpurdie@rpsys.net Cc: linux-acpi , Len Brown , Matthew Garrett , "Zhang, Rui" Date: Thu, 08 Jan 2009 14:32:20 +0800 Message-Id: <1231396340.20746.80.camel@rzhang-dt> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org bd->props.brightness doesn't reflect the actual backlight level. Always invoke backlight_update_status when users want to change the backlight. For setups where brightness change is an expensive operation, this could be done in the driver rather than the core. http://bugzilla.kernel.org/show_bug.cgi?id=12249 Signed-off-by: Zhang Rui --- drivers/video/backlight/backlight.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/video/backlight/backlight.c =================================================================== --- linux-2.6.orig/drivers/video/backlight/backlight.c +++ linux-2.6/drivers/video/backlight/backlight.c @@ -134,10 +134,8 @@ static ssize_t backlight_store_brightnes else { pr_debug("backlight: set brightness to %d\n", brightness); - if (bd->props.brightness != brightness) { - bd->props.brightness = brightness; - backlight_update_status(bd); - } + bd->props.brightness = brightness; + backlight_update_status(bd); rc = count; } }