From patchwork Tue Sep 8 13:51:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Punit Agrawal X-Patchwork-Id: 53270 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id 7B11022B05 for ; Tue, 8 Sep 2015 13:50:11 +0000 (UTC) Received: by lbcjc2 with SMTP id jc2sf35754778lbc.0 for ; Tue, 08 Sep 2015 06:50:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=NfCg8knsW46+d0S62QyOtOVFuQo+yWUMgBMXLHI+Wr8=; b=FUKbe5jjCgdPdhDbVfEvBJq4lf5cyAY7CLGGDXvu4qNDAYE9MqiaobZ1f1ZlYhE9IM npY34cXQplyvpdWWo4ionM7HLzHhozEk3wzwe7dOK3I39LSrvCCzHu9ZNvM+c0ju9Qv/ dwzE713ICCrTH+p2ezG52Aw+D81V9uvBYXrji/e59H49HWDZ50RwYPtbOhkfRnlVEXwR gDfy5cYOXEwgwgXHpBjsLhyrER+DN63enxIRmfJ5n4ANYZXWCR80yHAb5mBgSxQpetAr meLm0aUw+09s8eaQkA3NGcbve1RVjPA7wORTnuWRJseQjyB/J2pWAzhfxGpXKET6HA7p 8kSg== X-Gm-Message-State: ALoCoQlZoOHUdMInO306ycGVBZBmBVPlU7PyOLyLgf5zqvhMvGdbHZKsIAHRqz0yhincCDJBZVBG X-Received: by 10.112.138.2 with SMTP id qm2mr6484766lbb.19.1441720210421; Tue, 08 Sep 2015 06:50:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.178.195 with SMTP id da3ls784132lac.79.gmail; Tue, 08 Sep 2015 06:50:10 -0700 (PDT) X-Received: by 10.112.55.33 with SMTP id o1mr22138381lbp.96.1441720210266; Tue, 08 Sep 2015 06:50:10 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id k7si3290998lbj.50.2015.09.08.06.50.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 06:50:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbcao8 with SMTP id ao8so53496132lbc.3 for ; Tue, 08 Sep 2015 06:50:10 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr22496175lbb.36.1441720210116; Tue, 08 Sep 2015 06:50:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp988562lbq; Tue, 8 Sep 2015 06:50:09 -0700 (PDT) X-Received: by 10.68.201.105 with SMTP id jz9mr58500888pbc.86.1441720209165; Tue, 08 Sep 2015 06:50:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jv8si5597240pbc.136.2015.09.08.06.50.08; Tue, 08 Sep 2015 06:50:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754708AbbIHNuH (ORCPT + 13 others); Tue, 8 Sep 2015 09:50:07 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.140]:59001 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754175AbbIHNuG (ORCPT ); Tue, 8 Sep 2015 09:50:06 -0400 Received: from e105922-lin.cambridge.arm.com (e105922-lin.cambridge.arm.com [10.2.135.144]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with SMTP id t88Dnv2j011149; Tue, 8 Sep 2015 14:49:57 +0100 Received: by e105922-lin.cambridge.arm.com (sSMTP sendmail emulation); Tue, 08 Sep 2015 14:51:24 +0100 From: Punit Agrawal To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux@roeck-us.net, Punit Agrawal Subject: [PATCH] thermal: Fix thermal_zone_of_sensor_register to match documentation Date: Tue, 8 Sep 2015 14:51:12 +0100 Message-Id: <1441720272-17338-1-git-send-email-punit.agrawal@arm.com> X-Mailer: git-send-email 2.5.0 Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: punit.agrawal@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , thermal_zone_of_sensor_register is documented as returning a pointer to either a valid thermal_zone_device on success, or a corresponding ERR_PTR() value. In contrast, the function returns NULL when THERMAL_OF is configured off. Fix this. Signed-off-by: Punit Agrawal Acked-by: Guenter Roeck Cc: Eduardo Valentin Cc: Zhang Rui Reviewed-by: Javi Merino --- Hi Eduardo, Rui, This patch has been on the list without any objection for sometime [0] now. Could you pick this up for the next rc please? Thanks, Punit [0] http://thread.gmane.org/gmane.linux.kernel/2011466/focus=2013175 include/linux/thermal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 037e9df..f344e51 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -364,7 +364,7 @@ static inline struct thermal_zone_device * thermal_zone_of_sensor_register(struct device *dev, int id, void *data, const struct thermal_zone_of_device_ops *ops) { - return NULL; + return ERR_PTR(-ENODEV); } static inline