@@ -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;