From patchwork Fri Nov 30 08:00:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 10705869 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42D3F1057 for ; Fri, 30 Nov 2018 08:01:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 334CB296DA for ; Fri, 30 Nov 2018 08:01:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 273A92F4D2; Fri, 30 Nov 2018 08:01:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF673296DA for ; Fri, 30 Nov 2018 08:01:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726648AbeK3TJf (ORCPT ); Fri, 30 Nov 2018 14:09:35 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35185 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727109AbeK3TJd (ORCPT ); Fri, 30 Nov 2018 14:09:33 -0500 Received: by mail-wm1-f66.google.com with SMTP id c126so4705690wmh.0 for ; Fri, 30 Nov 2018 00:01:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BULyaOacFd0d+m8z9WucrlU3IR4UOzS/+4lMifUgKf8=; b=BkcwvF6bmwP+b3m7YqvDHCbspSIkZHvy1WElrP/igiMnjI9tkcYwVqxQzmylnl/ctG EEh27BUlsfnPLSnMrN4ua5zN7r+h1VuWCyinCxuFWxhubjdn7b0cIwoGPmThA52dguHe FWbmvTiRMtFk/brObMH7jbGF6nH62qUZDjaJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BULyaOacFd0d+m8z9WucrlU3IR4UOzS/+4lMifUgKf8=; b=J7Ih8VO8WFIu4SaMFHyrow3Jk6MLd1GSjfSebSCNkm2YTjba7T2Bd/22idgycsHWoR x1PnQEoG1Ouat2p2n9AqXV+RT9oXp3jMyJkBjWY93bkTTebCIirYLwbmytPXpBlnDRNL edw+fGY8nu7BMDzLYlY3o8KZy0kXczObumLSb6fHSGLuTdA1stHxz6Ewg1+R2IoaBzRW as2IdXd1rhQDm5jQvX9+CSwiLqh9NlK621AqhMMe2GmymWe/jDQL0F/GAmic5Zz4OiZz F8oNWXqH9K+ERDcVk4/5IcR2BaPVsTCxghYXDF+A+dsGUoOYWL2DEy31C9MFeYLS/faG VuwA== X-Gm-Message-State: AA+aEWZcxbmHL3bsp7CWeqsMCDDW/lCXtoiruCP+rVaFVzmjfZ0NwbJf A8LINEr/UaW7C6Bu5YDEepbNxQ== X-Google-Smtp-Source: AFSGD/VqqYRmxInzPfxesU6ZVhqjEEZcGRWykhD5CsPf9WQ+NkwB8QZP93S+rruSyPzbqilnePMEOA== X-Received: by 2002:a1c:a84f:: with SMTP id r76mr4354622wme.16.1543564865598; Fri, 30 Nov 2018 00:01:05 -0800 (PST) Received: from localhost.localdomain (118.142.136.77.rev.sfr.net. [77.136.142.118]) by smtp.gmail.com with ESMTPSA id h16sm6212393wrb.62.2018.11.30.00.01.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 00:01:05 -0800 (PST) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: vincent.guittot@linaro.org, john.stultz@linaro.org, linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] thermal/drivers/hisi: Fix number of sensors on hi3660 Date: Fri, 30 Nov 2018 09:00:32 +0100 Message-Id: <1543564833-643-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543564833-643-1-git-send-email-daniel.lezcano@linaro.org> References: <1543564833-643-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Without this patch the thermal driver is broken on hi3660. The dual sensors support patchset was partially merged, unfortunately the dual thermal zones definition is not available in the DT yet, so when the driver tries to register all the sensors that fails. By reducing to 1 the number of sensors on the hi3660, we switch back to the previous functionnality. Fixes: 8c6c36846f11 (thermal/drivers/hisi: Add the dual clusters sensors for hi3660) Signed-off-by: Daniel Lezcano --- drivers/thermal/hisi_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 50f4d00..2d26ae8 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -424,7 +424,7 @@ static int hi3660_thermal_probe(struct hisi_thermal_data *data) struct platform_device *pdev = data->pdev; struct device *dev = &pdev->dev; - data->nr_sensors = 2; + data->nr_sensors = 1; data->sensor = devm_kzalloc(dev, sizeof(*data->sensor) * data->nr_sensors, GFP_KERNEL);