summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2023-03-08 12:22:47 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2023-04-07 10:31:32 +0200
commitf1d2427cb458fd8ecb709c27f43088d6e250a7aa (patch)
tree2c14c6aff760a29c31f983fa12e73993138ab061 /drivers
parent75f74a907164eaeb1bd5334b01504a84b2b63bf5 (diff)
thermal/drivers/rockchip: Simplify getting match data
It's possible to directly get the match data in a generic way nowadays. Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230308112253.15659-2-sebastian.reichel@collabora.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/thermal/rockchip_thermal.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index bb254bdff043..68e8541e8aa6 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -1350,15 +1350,10 @@ 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;
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;
@@ -1370,7 +1365,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;