Commit f1d2427c authored by Sebastian Reichel's avatar Sebastian Reichel Committed by Daniel Lezcano

thermal/drivers/rockchip: Simplify getting match data

It's possible to directly get the match data in a generic
way nowadays.
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230308112253.15659-2-sebastian.reichel@collabora.com
parent 75f74a90
...@@ -1350,15 +1350,10 @@ static int rockchip_thermal_probe(struct platform_device *pdev) ...@@ -1350,15 +1350,10 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
{ {
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
struct rockchip_thermal_data *thermal; struct rockchip_thermal_data *thermal;
const struct of_device_id *match;
int irq; int irq;
int i; int i;
int error; int error;
match = of_match_node(of_rockchip_thermal_match, np);
if (!match)
return -ENXIO;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) if (irq < 0)
return -EINVAL; return -EINVAL;
...@@ -1370,7 +1365,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev) ...@@ -1370,7 +1365,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
thermal->pdev = pdev; thermal->pdev = pdev;
thermal->chip = (const struct rockchip_tsadc_chip *)match->data; thermal->chip = device_get_match_data(&pdev->dev);
if (!thermal->chip) if (!thermal->chip)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment