Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2779448imw; Sun, 10 Jul 2022 15:18:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t/3O+IWcRGSwzRYKwqcK0VHz2xV/5KorTNMKiIlIRntp8WHNU42MbswbOl8DlzvGhVo+Ng X-Received: by 2002:a17:907:961c:b0:726:9f09:6b3c with SMTP id gb28-20020a170907961c00b007269f096b3cmr15532140ejc.711.1657491482394; Sun, 10 Jul 2022 15:18:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657491482; cv=none; d=google.com; s=arc-20160816; b=Ph8QBi14gJpuUz/539P4dOiFwoydEGxoYytVEwDhx+2quGqosmyABHH/VgGckVKJYT giu/pflOevYXIv9GCoaU1Jt0iaXGWUIb8hG+CyPfFFLwd27N+w9jldr3ejhRQs2qHWTA ahV22zkRLnPF5lIWrXlsmvaNczk86P0vnsv6cdYaRgWhDi7tXehbvdmf3KdpbLPgiBeS T1MkvAU86I3n4g5YfHT0qzgEg3Rg3s4JVVym96vsdp2AhyKZUHVO4MSqPWG6ABjcY+UB /dUjv7nkfYjsFuVc7kSilRSmFwXfGrZR2olOCi4CCo3vnvdNFccRJJRXd4N74pS0qn0Q GWhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=a7qU0l11XuBaUxJzhKqB0uFCFxpqtrqPIbLk2Bb/IBU=; b=HaYf/NO0q3p4EdimD3Y+pSOOnrFuiZe5pIZcFxZTeg4kiY53CHmNiwQSHSbr+r07Wj nwydrkKe2hMaPLPtmawyj4vdelnDwDsGawUl94wUD9QhsqLs07qPL9Gh/yY05SijsOOk loW1aV8vAbq4NMUH3yH2+ym1Rl6OtSn11rlGC4latmGm4ID3wtcyANdqFRiRt7vWbHi7 +20bhO9ABnt9rwwY4KDfTC55fM9Dkq/ALUSZ2EwfCz1ADKxQzKBbo4e0ohph22yMaagE a4xH6IeF98gjFZ9jdKZrbbv0bHaQkWBfzhJNKZoYIhbTjjqRxTW+2bsQQMlpFDPxNf+D t56g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linexp-org.20210112.gappssmtp.com header.s=20210112 header.b=bViLhf8e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a056402254600b0043ad5430053si2056003edb.448.2022.07.10.15.17.38; Sun, 10 Jul 2022 15:18:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linexp-org.20210112.gappssmtp.com header.s=20210112 header.b=bViLhf8e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbiGJV0A (ORCPT + 99 others); Sun, 10 Jul 2022 17:26:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbiGJVZY (ORCPT ); Sun, 10 Jul 2022 17:25:24 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A7BB14039 for ; Sun, 10 Jul 2022 14:25:10 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id f2so4761976wrr.6 for ; Sun, 10 Jul 2022 14:25:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linexp-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=a7qU0l11XuBaUxJzhKqB0uFCFxpqtrqPIbLk2Bb/IBU=; b=bViLhf8ekuUWaRy1driK478eBCats9Y5hHqzf3t8OuUIsIUJlRKiYgZCrGxQLMLqpc dSooLG6qwZTlKZ7bYeJbBVuG9Ro/m0yGY1VZUyXC1FnI1JvVNcd9yoEP+6LoZj+fSJ1u zkSflFutUDefFGp/TOZl+n71eitpTw93MUxamFSgMpgHJlGl14WuymrAYyZibHcMMlJK WGM29wuKfb1i7AV+1aD0oceriCGQu/w91N0xsc8uocJNovvMcsMf3qO+VNYGpJxtVm3h MfpufvYog+RHS0X0rsDQq1bWh2amnXqZWaEtCFKRLDut4dn8xUzp2esXsp7Q7u1bTGgY IrzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=a7qU0l11XuBaUxJzhKqB0uFCFxpqtrqPIbLk2Bb/IBU=; b=z62mHNqoe8w2u37Wfs6tpNujcDbYCZ1codocTgqRnpAQY5y1pvRPfVUnSBgYADh1gD ipBzFI0hkAPZsimc3EvakullH+5Ml3YgCgLBNBQdxv47z4KWNnFhQfSU5dCKlIJhTAHC vbpheZv9huvudIKAu7fkSj66hKVFhBrp70OdfFbQbuidks27nyCK6zeiDNUj5W9lMFdT PyXdNwPTb1K48KxaBrnemxcC0DGuFiBZPrkf81tfoeI7lRKQkn/giktGgJ7zT9LhgQTh 9qOMfd4ZWn0UG1MCeF/JquF3goPMCOwDj6VIaVRPYThZ+onaXhqdM/aodp/6r31cCCjL M/3Q== X-Gm-Message-State: AJIora8cKrYWLL855cOTA9EjTpWcOGvZn+A1yWUeBxpp37wJ5TITo0Dd DsSDzRvJ2ZCgaUY0WeSXNst+iQ== X-Received: by 2002:a5d:58ef:0:b0:21d:9fc8:302e with SMTP id f15-20020a5d58ef000000b0021d9fc8302emr4587256wrd.22.1657488310058; Sun, 10 Jul 2022 14:25:10 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:c7c0:6823:f3ce:2447]) by smtp.gmail.com with ESMTPSA id m19-20020a05600c3b1300b003a2dd0d21f0sm7142759wms.13.2022.07.10.14.25.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jul 2022 14:25:09 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: rui.zhang@intel.com, khilman@baylibre.com, abailon@baylibre.com, amitk@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-mediatek@lists.infradead.org (moderated list:ARM/Mediatek SoC support) Subject: [PATCH v1 20/33] thermal/drivers/mtk: Switch to new of API Date: Sun, 10 Jul 2022 23:24:10 +0200 Message-Id: <20220710212423.681301-21-daniel.lezcano@linexp.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220710212423.681301-1-daniel.lezcano@linexp.org> References: <20220710212423.681301-1-daniel.lezcano@linexp.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The thermal OF code has a new API allowing to migrate the OF initialization to a simpler approach. Use this new API. Signed-off-by: Daniel Lezcano --- drivers/thermal/mtk_thermal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c index ede94eadddda..1dfa6b058d9c 100644 --- a/drivers/thermal/mtk_thermal.c +++ b/drivers/thermal/mtk_thermal.c @@ -679,9 +679,9 @@ static int mtk_thermal_bank_temperature(struct mtk_thermal_bank *bank) return max; } -static int mtk_read_temp(void *data, int *temperature) +static int mtk_read_temp(struct thermal_zone_device *tz, int *temperature) { - struct mtk_thermal *mt = data; + struct mtk_thermal *mt = tz->devdata; int i; int tempmax = INT_MIN; @@ -700,7 +700,7 @@ static int mtk_read_temp(void *data, int *temperature) return 0; } -static const struct thermal_zone_of_device_ops mtk_thermal_ops = { +static struct thermal_zone_device_ops mtk_thermal_ops = { .get_temp = mtk_read_temp, }; @@ -1082,8 +1082,8 @@ static int mtk_thermal_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mt); - tzdev = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, mt, - &mtk_thermal_ops); + tzdev = devm_thermal_of_zone_register(&pdev->dev, 0, mt, + &mtk_thermal_ops); if (IS_ERR(tzdev)) { ret = PTR_ERR(tzdev); goto err_disable_clk_peri_therm; -- 2.25.1