From patchwork Mon Jul 13 02:33:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 35312 X-Patchwork-Delegate: lenb@kernel.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 n6D2Wi58004603 for ; Mon, 13 Jul 2009 02:32:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752099AbZGMCcn (ORCPT ); Sun, 12 Jul 2009 22:32:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752169AbZGMCcn (ORCPT ); Sun, 12 Jul 2009 22:32:43 -0400 Received: from mga02.intel.com ([134.134.136.20]:29145 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099AbZGMCcn (ORCPT ); Sun, 12 Jul 2009 22:32:43 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 12 Jul 2009 19:22:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.42,388,1243839600"; d="scan'208";a="532203780" Received: from rzhang-dt.sh.intel.com (HELO [10.239.36.94]) ([10.239.36.94]) by orsmga001.jf.intel.com with ESMTP; 12 Jul 2009 19:32:15 -0700 Subject: [PATCH] ACPI video: no warning message if "acpi_backlight=vendor" is used From: Zhang Rui To: Len Brown Cc: linux-acpi , "Zhang, Rui" Date: Mon, 13 Jul 2009 10:33:24 +0800 Message-Id: <1247452404.15520.202.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 AML code always sends notifications to ACPI video device, even if we disable the ACPI backlight control by using boot option "acpi_backlight=vendor". In this case we should not print any warning message. http://bugzilla.kernel.org/show_bug.cgi?id=13671#c14 Sigend-off-by: Zhang Rui --- drivers/acpi/video.c | 4 ++++ 1 file changed, 4 insertions(+) -- 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/acpi/video.c =================================================================== --- linux-2.6.orig/drivers/acpi/video.c +++ linux-2.6/drivers/acpi/video.c @@ -1948,6 +1948,10 @@ acpi_video_switch_brightness(struct acpi unsigned long long level_current, level_next; int result = -EINVAL; + /* no warning message if acpi_backlight=vendor is used */ + if (!acpi_video_backlight_support()) + return 0; + if (!device->brightness) goto out;