Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp26493imn; Wed, 27 Jul 2022 14:10:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tetJrY/2xEV0UDOX9FcY8hN4PlidIyBchAVesA1oEsxjI5heJITo1AK9LidmIaBYVfCK2s X-Received: by 2002:a17:907:1611:b0:72b:53cd:ce2 with SMTP id hb17-20020a170907161100b0072b53cd0ce2mr19521623ejc.124.1658956212375; Wed, 27 Jul 2022 14:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658956212; cv=none; d=google.com; s=arc-20160816; b=RvObh/iGSu9cqhRaefNxDE5jSyXAmaaJ8hWDk2nNH18IR+ObY/tfyx481L5RCgEm/9 XQFi4ob2oNKjDBCxA6GenH5K8lnSyBBsiUOsLWoPHCh9T9xDmuH60xYewCDCjQmxj/iU SlrHj81VJud9Z6kfymR1egWINhoqyPqQA+K6IqDjOezDeqyj7B/8pk2XcN15B9GYPhrR HkZaaJHqlN54UBfUtO2CPZlip4R7BDc15bPTSWtHPJKOZdlWpkz9fqEr58qdo1QvSqyG tz3+uFWUx68mafoncIR2889Wongs4rXHEm7Jiw7lHT1RzxgqZiBlLnZoUou1s2lkJ0PE mXjQ== 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=CsU6ca+7WX/xVGECcsjSjS8CnQ/NXZV7RYxDyAjfgbo=; b=JrLcELDQ8xT0Kznncx0gm78MPdG37ZwTK5SGipJghr201s+8CymOcHh+xvUzvz80fq fEu6nmU3rDZSrn77BhW1S+4OjunGZJMQN1OTb17KhgELlSKigx5jbcTalKzEYA6U49L5 Cb9R3hvu9LwKu7W9NzchKlpORPIlFkQrV5hnHxnf2KrbYU5enR23rbXdeNOvCnDk7MrZ Xh6wSunvodhR/KoaiZXl6c3j5jmssTOU5b9xWGfIIKOjrxsTnFYG/rKE3RLvSm4Pv2fy GA7KCMXDOsKS7piNKoGoD541Now0FFyOz7hX5Xt4JkYAv7RfsftCbE+5aXssk+VEdm/v tBtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linexp-org.20210112.gappssmtp.com header.s=20210112 header.b=42mA11C3; 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 dd22-20020a1709069b9600b007120b53e117si6431737ejc.26.2022.07.27.14.09.47; Wed, 27 Jul 2022 14:10:12 -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=42mA11C3; 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 S234642AbiG0VEt (ORCPT + 99 others); Wed, 27 Jul 2022 17:04:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236210AbiG0VEA (ORCPT ); Wed, 27 Jul 2022 17:04:00 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8060B5F980 for ; Wed, 27 Jul 2022 14:03:56 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id b6so10788710wmq.5 for ; Wed, 27 Jul 2022 14:03:56 -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=CsU6ca+7WX/xVGECcsjSjS8CnQ/NXZV7RYxDyAjfgbo=; b=42mA11C3KugEdlssYgkXmp3aVYFcmXl5da1g1i+H0006svGvhYOBl+1OdKUP4GfGDL HQl5VNbrBcczKdDjg4FPqehUUAmZqWQyUNwS4qKoa2HcZkR5qWrErBtde/XoDoTv5OOt VcJv01a+S7nmvMxjsEUknPTBg4rs824hdmqaiwrpRnbvDbADE8l0TZ/RDEoFx+Fky2vA 2KeoaSi/NBXckkFvZ0a72yMiA1mEnpH7gaMxXlwO91gX0Haeo3avc3oE1dRKChBuj1oL wPGEjDTHdgN/Wcte1am11+1LbKHlLRwBKY7oc7snH4T4suZXlEY/o1m6GlcVEnkBD7Fq lP7A== 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=CsU6ca+7WX/xVGECcsjSjS8CnQ/NXZV7RYxDyAjfgbo=; b=hp3EodIu6UrMvu63FTfVWtMFxzs4IpPXsYfh8tVrfRMbBlaOAw54mXBUfVmT4nbBlQ sFTD5NbvR0CuT0aTaXgA6HLXIXdhNO5J3grSDU3U+3QpNdvhfCkH7zD3YqmoM9EEh4t0 VIII5Lec3p/APvPAFCZZJgjxQ8tvpER33JbJcDaD3Dsy56+xCarVUryCRgbamOhGEt2X vODUmw4mGx+kLjdn6zAuHSzgmcpuYj8ONvOngcXIUhzAhr/ATD9Bzc/9h/sAvmyky//j tnKi+tPe81/yEv03U+6xLBriztGC7wimOxHu/yY29cgvtFfm/Skgwc+Vwcp2DoZ/vKOX SyVw== X-Gm-Message-State: AJIora+yxrmwU30bhNU5ipTSsxPmtH+Q4SwSBuz+shX627BsaymTjiJl HTxKiiYrUOAUH9nJEl4m3a/giQ== X-Received: by 2002:a05:600c:34c2:b0:3a3:62d3:de5 with SMTP id d2-20020a05600c34c200b003a362d30de5mr4430418wmq.29.1658955836149; Wed, 27 Jul 2022 14:03:56 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:65a8:ebd8:4098:d9d0]) by smtp.gmail.com with ESMTPSA id h6-20020a05600c350600b003a38606385esm37908wmq.3.2022.07.27.14.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 14:03:55 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: rui.zhang@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, abailon@baylibre.com, lukasz.luba@arm.com, broonie@kernel.org, damien.lemoal@opensource.wdc.com, heiko@sntech.de, hayashi.kunihiko@socionext.com, mhiramat@kernel.org, talel@amazon.com, thierry.reding@gmail.com, digetx@gmail.com, jonathanh@nvidia.com, anarsoul@gmail.com, tiny.windzz@gmail.com, baolin.wang7@gmail.com, f.fainelli@gmail.com, bjorn.andersson@linaro.org, mcoquelin.stm32@gmail.com, glaroque@baylibre.com, miquel.raynal@bootlin.com, shawnguo@kernel.org, niklas.soderlund@ragnatech.se, matthias.bgg@gmail.com, j-keerthy@ti.com, Amit Kucheria Subject: [PATCH v3 19/32] thermal/drivers/qoriq: Switch to new of API Date: Wed, 27 Jul 2022 23:02:40 +0200 Message-Id: <20220727210253.3794069-20-daniel.lezcano@linexp.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220727210253.3794069-1-daniel.lezcano@linexp.org> References: <20220727210253.3794069-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 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. The ops are no longer device tree specific and are the generic ones provided by the core code. Convert the ops to the thermal_zone_device_ops format and use the new API to register the thermal zone with these generic ops. Signed-off-by: Daniel Lezcano --- drivers/thermal/qoriq_thermal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c index 73049f9bea25..d111e218f362 100644 --- a/drivers/thermal/qoriq_thermal.c +++ b/drivers/thermal/qoriq_thermal.c @@ -82,9 +82,9 @@ static struct qoriq_tmu_data *qoriq_sensor_to_data(struct qoriq_sensor *s) return container_of(s, struct qoriq_tmu_data, sensor[s->id]); } -static int tmu_get_temp(void *p, int *temp) +static int tmu_get_temp(struct thermal_zone_device *tz, int *temp) { - struct qoriq_sensor *qsensor = p; + struct qoriq_sensor *qsensor = tz->devdata; struct qoriq_tmu_data *qdata = qoriq_sensor_to_data(qsensor); u32 val; /* @@ -122,7 +122,7 @@ static int tmu_get_temp(void *p, int *temp) return 0; } -static const struct thermal_zone_of_device_ops tmu_tz_ops = { +static const struct thermal_zone_device_ops tmu_tz_ops = { .get_temp = tmu_get_temp, }; @@ -146,9 +146,9 @@ static int qoriq_tmu_register_tmu_zone(struct device *dev, sensor->id = id; - tzd = devm_thermal_zone_of_sensor_register(dev, id, - sensor, - &tmu_tz_ops); + tzd = devm_thermal_of_zone_register(dev, id, + sensor, + &tmu_tz_ops); ret = PTR_ERR_OR_ZERO(tzd); if (ret) { if (ret == -ENODEV) -- 2.25.1