Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4604492rwl; Mon, 10 Apr 2023 13:56:02 -0700 (PDT) X-Google-Smtp-Source: AKy350ajOvLEMmFYlCnnUix7tNZMTALwQzEhiBG0XFhy0EBxQbS2NuHKF5JTki2a+oXNMbIzJMPq X-Received: by 2002:a17:906:39c3:b0:91f:17a5:b359 with SMTP id i3-20020a17090639c300b0091f17a5b359mr6254139eje.66.1681160162223; Mon, 10 Apr 2023 13:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681160162; cv=none; d=google.com; s=arc-20160816; b=xXQnV5iZjXwLHzo8qivC6OfLRjDOL0tNMh5Zw5AFrGUnwfKv58167Jf24fx8IaNbFb C86dxrnmhTq1mno35eF5yxjS3jqfh7b7wDvSuf0CxRuodXLaY3hCf7DkAaho7MKn6RzE 1YQwyeT86xfqjBfW0qSCjKLp5VEZby4ZVMta+lno5btlQj7Frw6+uLg7CcIFQJkzjrmv iSBP2bIGWIKgdgVIdkDbP4mhf2GzUqZTyMzhx4iWZFZQs2Yag4sG3CnTLvS1Eqm7qD91 tVJeo6lRGgNt/fbWAmmj3Ix3q4JNvubkZypCfMSPqEzGsLxLSaNjCReUfBdTMSGHrJ6e xLOQ== 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=jPfklvntaSAZNSstWZb9c9xIuh7wy5gv7laC1WOc6HM=; b=feY0/strRDpOTwJYbUFL7Wi8s+qpdEJVleSIYFLp0y51+h43AT+vgHFa4G5eii/GQP XSCmNSOpNn1Yfv3NXPdFCRI5qzXH6L/IV0cA7nwJkDs6N/aVSqr93KKMJ7HJ1LwSfE3S eIvnPi0M5umcIJx+YmiV2bjfkpOcznySS650Qf20IZggg/s+d4xM5w9XEqoErDtBYqbl ToPyEkPco8sOxaufb2lZ8UY/Pm3lTByJrrl20E+Jf92qNev6vQX4Os9L+cLVkNDeWF+2 MA5w5uQPSz9GeQ6sL//gFjpZ2EYsigceOMNQSo3BMxBWGehl4JnrLX6Rr7nQD8qnHgqa /PZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CNbSdHE8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ae7-20020a17090725c700b0094a8d262285si3121554ejc.519.2023.04.10.13.55.37; Mon, 10 Apr 2023 13:56: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=@linaro.org header.s=google header.b=CNbSdHE8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229883AbjDJUx4 (ORCPT + 99 others); Mon, 10 Apr 2023 16:53:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbjDJUxp (ORCPT ); Mon, 10 Apr 2023 16:53:45 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4B312114 for ; Mon, 10 Apr 2023 13:53:42 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id w21so5438189wra.4 for ; Mon, 10 Apr 2023 13:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681160021; x=1683752021; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jPfklvntaSAZNSstWZb9c9xIuh7wy5gv7laC1WOc6HM=; b=CNbSdHE8n1zV1HPzRdLK08lEvmMz/Kid8qJ/8adULTAra3QhdAdgSk4eHGV9zO7TmW oWjrs4f3ETu6O+96aPhnZ6Q61+FIGxTq7P2q1LMH6BuLH1tGqL7J5m8hL2EJwYcfVPmB 6L3TFCl3sAP7+8wmSXHvX8cyCl6JXV+DnepvXSz7J7ts3uSUoAbB7roDO477PeGjZBrq B6UhPUI7bSVGwpPMPNawVS5xr9xsTzHINTVbnfJfS+KYyCjmqQiqKMa7/B+XTVzindJW i0Ly4fqWapIN5RdJQ67GyRLwIeA+K2atzBMK38N3Fu6RJZJUsMNs+X50dxpI0knuK8pN hU1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681160021; x=1683752021; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jPfklvntaSAZNSstWZb9c9xIuh7wy5gv7laC1WOc6HM=; b=2YBPzWWz+CDxc751Mas52FM2ik8luHgXMLqDChLCHNoM0qIzhkZOI1O2IFkiZGQbLf uBYJvC1oYje/YdC2lI7feoXJPtBHj1YX4AsECESXxCUo6fee0GdnCtSORMeTsJfYBtYw PSH7ZGBoiKud0Uj1vBc3zKgDWrFPQprPRznfjUd7uWfLrlVPcbFppNWipO/GtjEOisTy r79Uw+7dKQ/+veCcmh0QmeA9CjWc+1Igjr60w3C8yPsU9D4ura5iGX0WR+Xew01faarL DzQeHIEQRCvHWMPzuoHhFjMqs9vxeM7sM1W3TvtwPxt/96j3ZoueFd3yNv9/eHLy9/S/ jvTQ== X-Gm-Message-State: AAQBX9eMGcqJfaiaPfrTqUGc1jWcE0HdAATVf4Ge+ovFtXsi5RjZj8ie nNt2pN0dM80y7AUUropjGBOHHRVI6mftw3MZs4k= X-Received: by 2002:adf:dec2:0:b0:2ca:175b:d850 with SMTP id i2-20020adfdec2000000b002ca175bd850mr5111363wrn.11.1681160021173; Mon, 10 Apr 2023 13:53:41 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:2611:592:3b9e:d2ae]) by smtp.gmail.com with ESMTPSA id e17-20020adffc51000000b002ef2e148d59sm11966789wrs.16.2023.04.10.13.53.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 13:53:40 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: rui.zhang@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Sujith Thomas , Amit Kucheria Subject: [PATCH v2 4/7] thermal/drivers/menlow: Use thermal_zone_device() Date: Mon, 10 Apr 2023 22:53:02 +0200 Message-Id: <20230410205305.1649678-5-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410205305.1649678-1-daniel.lezcano@linaro.org> References: <20230410205305.1649678-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 In order to get the device associated with the thermal zone, let's use the wrapper thermal_zone_device() instead of accessing directly the content of the thermal zone device structure. Signed-off-by: Daniel Lezcano --- drivers/thermal/intel/intel_menlow.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/intel/intel_menlow.c b/drivers/thermal/intel/intel_menlow.c index 5a6ad0552311..d720add918ff 100644 --- a/drivers/thermal/intel/intel_menlow.c +++ b/drivers/thermal/intel/intel_menlow.c @@ -422,7 +422,8 @@ static acpi_status intel_menlow_register_sensor(acpi_handle handle, u32 lvl, result = intel_menlow_add_one_attribute("aux0", 0644, aux0_show, aux0_store, - &thermal->device, handle); + thermal_zone_device(thermal), + handle); if (result) return AE_ERROR; @@ -436,7 +437,8 @@ static acpi_status intel_menlow_register_sensor(acpi_handle handle, u32 lvl, result = intel_menlow_add_one_attribute("aux1", 0644, aux1_show, aux1_store, - &thermal->device, handle); + thermal_zone_device(thermal), + handle); if (result) { intel_menlow_unregister_sensor(); return AE_ERROR; @@ -449,7 +451,8 @@ static acpi_status intel_menlow_register_sensor(acpi_handle handle, u32 lvl, result = intel_menlow_add_one_attribute("bios_enabled", 0444, bios_enabled_show, NULL, - &thermal->device, handle); + thermal_zone_device(thermal), + handle); if (result) { intel_menlow_unregister_sensor(); return AE_ERROR; -- 2.34.1