From patchwork Thu Dec 11 06:08:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lu X-Patchwork-Id: 5474261 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A3E3F9F2E8 for ; Thu, 11 Dec 2014 06:08:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 510242017D for ; Thu, 11 Dec 2014 06:08:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BDE720121 for ; Thu, 11 Dec 2014 06:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758834AbaLKGIa (ORCPT ); Thu, 11 Dec 2014 01:08:30 -0500 Received: from mga11.intel.com ([192.55.52.93]:8109 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755578AbaLKGI3 (ORCPT ); Thu, 11 Dec 2014 01:08:29 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 10 Dec 2014 22:08:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,556,1413270000"; d="scan'208";a="645880998" Received: from aaronlu.sh.intel.com ([10.239.37.127]) by fmsmga002.fm.intel.com with ESMTP; 10 Dec 2014 22:08:21 -0800 Message-ID: <548934D0.8000502@intel.com> Date: Thu, 11 Dec 2014 14:08:16 +0800 From: Aaron Lu MIME-Version: 1.0 To: Zhang Rui , Olof Johansson CC: Daniel Vetter , Stephen Rothwell , linux-next , Linux-pm mailing list , Geert Uytterhoeven , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5] Thermal: introduce INT3406 thermal driver References: <54868CF6.6020505@intel.com> <20141211010226.GA26253@aaronlu.sh.intel.com> <1418265472.12435.68.camel@rzhang1-toshiba> In-Reply-To: <1418265472.12435.68.camel@rzhang1-toshiba> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 12/11/2014 10:37 AM, Zhang Rui wrote: > On Wed, 2014-12-10 at 18:15 -0800, Olof Johansson wrote: >> On Wed, Dec 10, 2014 at 5:02 PM, Aaron Lu wrote: >>> On Wed, Dec 10, 2014 at 11:53:25AM -0800, Olof Johansson wrote: >>>> Hi, >>>> >>>> [+daniel vetter] >>>> >>>> On Mon, Dec 8, 2014 at 9:47 PM, Aaron Lu wrote: >>>>> INT3406 ACPI device object resembles an ACPI video output device, but its >>>>> _BCM is said to be deprecated and should not be used. So we will make >>>>> use of the raw interface to do the actual cooling. Due to this, the >>>>> backlight core has some modifications. Also, to re-use some of the ACPI >>>>> video module's code, one function has been exported. >>>>> >>>>> Signed-off-by: Aaron Lu >>>>> Signed-off-by: Zhang Rui >>>>> --- >>>>> v5: >>>>> Add the missing file drivers/thermal/int340x_thermal/Kconfig >>>>> Remove the assignment of .owner field from the device_driver structure >>>> >>>> >>>> Did this patch show up in -next for the first time last night, or did >>>> some other change break this? >>>> >>>> It causes a panic in i915 when booting Minnowboard Max for me. >>> >>> Sorry for the trouble, I'm looking at this now. >>> Is there anything special about the Minnowboard Max? I'll try to >>> reproduce the issue here locally with a typical Intel desktop. >> >> Another good question is why the code showed up in -next today. Code >> going in for 3.19 is supposed to have been baking there already, and >> it's too early to stage anything for 3.20. >> >> Zhang? > > well, my Linux machine happened to be broken when I was in travel in Oct > and Nov, so that I got the 3.19 material prepared a little late. > Thus I just took some fixes and driver specific patches and plan to push > my pull request next week. > For this one, it had been pushed to linux-next for 3.18, but was dropped > because of some Kconfig problem. So I thought it was safe to include > this one for 3.19. > sorry for bring the trouble here. It's my bad. In the meantime, I think I have found the problem: If the system has a video output device that does not provide a correct _BCL, the error path from the newly added code doesn't properly set the error return value and that caused problem. The fix is simple: Please let me know if you want to take this one incremental patch or an update to the original one. Thanks, Aaron --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 5a41f89c4ce4..32880e6c8da4 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -721,7 +721,7 @@ int acpi_video_get_levels(struct acpi_device *device, int i, max_level = 0, count = 0, level_ac_battery = 0; union acpi_object *o; struct acpi_video_device_brightness *br = NULL; - int result = 0; + int result = -EINVAL; u32 value; if (!ACPI_SUCCESS(acpi_video_device_lcd_query_levels(device->handle, @@ -799,6 +799,7 @@ int acpi_video_get_levels(struct acpi_device *device, br->count = count; *dev_br = br; + result = 0; out: kfree(obj);