Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2751583imw; Sun, 10 Jul 2022 14:27:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ta0SkOoYaMMlS7XIUkcKTnpaRFkcFapC0ivzhCIhNa1mzKTAe2g7gRJMYSorr+phkU9BCj X-Received: by 2002:a17:906:8a70:b0:72b:132b:1720 with SMTP id hy16-20020a1709068a7000b0072b132b1720mr15314855ejc.41.1657488475440; Sun, 10 Jul 2022 14:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657488475; cv=none; d=google.com; s=arc-20160816; b=Rq/sKTTqTWalOkRMbtQEy/U/8UFtblL2MA5zwjedQOngHXwj5dlBVTt1TyNmONycxU s8gyFnIGsiQ/1NQW6EPtHeQMZBT+xGIV9EpRVQJ3PyoJc5EhoM74yATAp46J26pkP9Mv 1cpdPVZ3fZOJFe/y81p/2tRVXKX9rgF3AkkCPK4sICoircuz6LBVLC+0BDpobXwGZrbI siGwvMg6KoHky8re4XFiYxPDOlJZ1XwH8TF/FUCCpahsQl8gMJ8jcxsk6t1Ecn7i4lbH wdBIiyTj7+zPY10m4bGbgYKJvPiLpPgwKLhZWMZZOWJ29RtALcuseyEHIum8GakEG0be aTOw== 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=XKrmrf+cSxdde7+ZUymVasY3n7CrcY/HjZWqjqekd2E=; b=S9UE5PoIOJVVV9Qa4fljlib3w1szH4B58fRoEIDO+nQBEgmm8lwfER6OP9reOroNlV erg6VlbxzFBQKr77SpBHp4gGObybRbZXCfHevLAzNRVka/m0bq8A/S0siaRlOTAKU41C FM8cWu21NL0GRVmqz4o8kKI/BLHDNgLq2sh8TstJQskVC9T+ze4ZzTJNRy+1rhrme9AH ofjc/H+2P3uoU8nM3VGAZdyDZ6mcJCecKRd0KseVfj1LBQ0pxK8sS39pgADmmr3k1amM 6rxXT/01KIajwmLOnyNTya7w+hTetKsV3ULWRPTT+MfXkdN6Km89/yXNswrY8zotYEnG kwpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linexp-org.20210112.gappssmtp.com header.s=20210112 header.b="Q6/0d8Vj"; 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 w20-20020a056402269400b0043a9e920c24si9483747edd.3.2022.07.10.14.27.31; Sun, 10 Jul 2022 14:27:55 -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="Q6/0d8Vj"; 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 S229674AbiGJVZP (ORCPT + 99 others); Sun, 10 Jul 2022 17:25:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbiGJVZH (ORCPT ); Sun, 10 Jul 2022 17:25:07 -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 48EDA1570C for ; Sun, 10 Jul 2022 14:24:51 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id f2so4761460wrr.6 for ; Sun, 10 Jul 2022 14:24:51 -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=XKrmrf+cSxdde7+ZUymVasY3n7CrcY/HjZWqjqekd2E=; b=Q6/0d8VjALBuFP6Yp6/DDTv9I6sAEW6VuNJ0HRWOdbHFQXEGVkKwEqGlyKySV7oKc0 zl9TgSS9dbQcAYqB5k9Qdc/MfOMbMV2wwJ6QehNTZv3ldzlg8dXldph6QRO0zqz9aAfu i8chWAUnWBSdBF8uVesQPWD8uDEJ4LcwFTxGHxBIZto03XxX6YqBUeS3SudWdspoFqOg gUMVqKEiza42aro7/7QSsT/ptwxZHZuNoP2d14R7J+6o4zaIrW4b5XGzJZ8vj6W0nvYu rw2FZyhy0mR8MvGud5WQVAUr5yrl1lXYKHyfitjIe4v2vcC6z0utO16kLSHFagt31w1H PZGw== 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=XKrmrf+cSxdde7+ZUymVasY3n7CrcY/HjZWqjqekd2E=; b=Hg/w1n/0WTF7sE9tsrirlKt1XH8NQDERNIkEeIxgfgjQrXm6zBmq6At4NC4tbrwJoa Lmsob9vJpc2/35rI0XIDjk7H2Y/MiCFX+KGYSuPlkaWmiGsJV6cSi5HQp3XT74OsF3JR sV02j6XJ000d3lXxloHE5N2CD3BKAH1drfEhEfFP2dGMhOwKGBpP7yuYhDJwNcB+4XQF qONC1coxnOQKSoJwrPhWbPC3DklxkoSpUMOpqU2cLRuklisaVq9R4I4+Xwe0k9A7wq/v o5A/ernpJb2ZYLA5gO6x84sltAAeMkWX0qh2BfW3PTqFzDE7iAkUuDgrmIuCIWL0orpP /yDQ== X-Gm-Message-State: AJIora/FH5o3qoYQHSq3gH4iAAvjXU648TW9m0JiOiMgzPOtJ/XDM++j nEOBzH+Gu2tgOsAOk8v9clf9Sw== X-Received: by 2002:adf:d4c4:0:b0:21d:6c8f:4da3 with SMTP id w4-20020adfd4c4000000b0021d6c8f4da3mr14085345wrk.325.1657488291458; Sun, 10 Jul 2022 14:24:51 -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.24.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jul 2022 14:24:51 -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, Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Allwinner sunXi SoC support), linux-sunxi@lists.linux.dev (open list:ARM/Allwinner sunXi SoC support) Subject: [PATCH v1 08/33] thermal/drivers/sun8i: Switch to new of API Date: Sun, 10 Jul 2022 23:23:58 +0200 Message-Id: <20220710212423.681301-9-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/sun8i_thermal.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index d9cd23cbb671..d4e04c2c5135 100644 --- a/drivers/thermal/sun8i_thermal.c +++ b/drivers/thermal/sun8i_thermal.c @@ -108,9 +108,9 @@ static int sun50i_h5_calc_temp(struct ths_device *tmdev, return -1590 * reg / 10 + 276000; } -static int sun8i_ths_get_temp(void *data, int *temp) +static int sun8i_ths_get_temp(struct thermal_zone_device *tz, int *temp) { - struct tsensor *s = data; + struct tsensor *s = tz->devdata; struct ths_device *tmdev = s->tmdev; int val = 0; @@ -135,7 +135,7 @@ static int sun8i_ths_get_temp(void *data, int *temp) return 0; } -static const struct thermal_zone_of_device_ops ths_ops = { +static struct thermal_zone_device_ops ths_ops = { .get_temp = sun8i_ths_get_temp, }; @@ -468,10 +468,10 @@ static int sun8i_ths_register(struct ths_device *tmdev) tmdev->sensor[i].tmdev = tmdev; tmdev->sensor[i].id = i; tmdev->sensor[i].tzd = - devm_thermal_zone_of_sensor_register(tmdev->dev, - i, - &tmdev->sensor[i], - &ths_ops); + devm_thermal_of_zone_register(tmdev->dev, + i, + &tmdev->sensor[i], + &ths_ops); if (IS_ERR(tmdev->sensor[i].tzd)) return PTR_ERR(tmdev->sensor[i].tzd); -- 2.25.1