From patchwork Thu Jan 5 18:03:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 639631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A1C6C54EBF for ; Thu, 5 Jan 2023 18:03:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235453AbjAESDw (ORCPT ); Thu, 5 Jan 2023 13:03:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235053AbjAESDt (ORCPT ); Thu, 5 Jan 2023 13:03:49 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4321C564D1; Thu, 5 Jan 2023 10:03:46 -0800 (PST) Received: from jupiter.universe (dyndsl-085-016-198-020.ewe-ip-backbone.de [85.16.198.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 425D86602CA6; Thu, 5 Jan 2023 18:03:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1672941825; bh=Eit57BSuLLiRFOU6myIJto2e9A9VEfM0WBizgrQT8yc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TCMwnIV2hWgSnZDyenJ47ozEXjmCBJyGuEY+enk/AaIe17xPaSIZBk2PFzjZCb6UN r2W1Z0qS5rNWgM/iWrV9AIe+oCXCxPOK+Yyf5ywoPBP4uezkq029c3fc4tm1C+zeRp GBN1LAuHmS0EIzBEpLaTkjEAoV1kQH87RcsVQRThLXY5+pIecALH1oY76CxqeebjhH UyTthQriDPZyhoNxW9tf9h3nrZrd49TBJYrtRdGI9ZT+zWSHG9mqepJFrsFqhUqe49 8nckB0mLM572zFZhZbBbOn4w9Tdkl7AZNdNgcrZdeSmrkb0Fffv/kpifSwEOSyY8QQ Y7lKf90bleAqw== Received: by jupiter.universe (Postfix, from userid 1000) id A39FE480118; Thu, 5 Jan 2023 19:03:42 +0100 (CET) From: Sebastian Reichel To: Heiko Stuebner , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Rob Herring , Krzysztof Kozlowski , linux-pm@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCHv3 1/7] thermal: rockchip: Simplify getting match data Date: Thu, 5 Jan 2023 19:03:34 +0100 Message-Id: <20230105180340.29140-2-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105180340.29140-1-sebastian.reichel@collabora.com> References: <20230105180340.29140-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org It's possible to directly get the match data in a generic way nowadays. Reviewed-by: Heiko Stuebner Signed-off-by: Sebastian Reichel --- drivers/thermal/rockchip_thermal.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 819e059cde71..8c52700d58e8 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -1353,16 +1353,11 @@ static int rockchip_thermal_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct rockchip_thermal_data *thermal; - const struct of_device_id *match; struct resource *res; int irq; int i; int error; - match = of_match_node(of_rockchip_thermal_match, np); - if (!match) - return -ENXIO; - irq = platform_get_irq(pdev, 0); if (irq < 0) return -EINVAL; @@ -1374,7 +1369,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev) thermal->pdev = pdev; - thermal->chip = (const struct rockchip_tsadc_chip *)match->data; + thermal->chip = device_get_match_data(&pdev->dev); if (!thermal->chip) return -EINVAL;