X-Git-Url: https://git.codelabs.ch/?p=muen%2Flinux.git;a=blobdiff_plain;f=drivers%2Fthermal%2Frcar_thermal.c;h=8014a207d8d9b1a97d45378cdf00d6b4730c1788;hp=78f932822d381c9dbc013aee618be56e533baaab;hb=0ef7791e2bfb2e10aa95dc492eab72074cef9942;hpb=befa93633193e5327e4045d1e5fa29114580fa5d;ds=sidebyside diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 78f932822d38..8014a207d8d9 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -112,6 +112,10 @@ static const struct of_device_id rcar_thermal_dt_ids[] = { .compatible = "renesas,rcar-gen2-thermal", .data = &rcar_gen2_thermal, }, + { + .compatible = "renesas,thermal-r8a77970", + .data = &rcar_gen3_thermal, + }, { .compatible = "renesas,thermal-r8a77995", .data = &rcar_gen3_thermal, @@ -434,8 +438,8 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data) rcar_thermal_for_each_priv(priv, common) { if (rcar_thermal_had_changed(priv, status)) { rcar_thermal_irq_disable(priv); - schedule_delayed_work(&priv->work, - msecs_to_jiffies(300)); + queue_delayed_work(system_freezable_wq, &priv->work, + msecs_to_jiffies(300)); } } @@ -453,6 +457,7 @@ static int rcar_thermal_remove(struct platform_device *pdev) rcar_thermal_for_each_priv(priv, common) { rcar_thermal_irq_disable(priv); + cancel_delayed_work_sync(&priv->work); if (priv->chip->use_of_thermal) thermal_remove_hwmon_sysfs(priv->zone); else @@ -492,7 +497,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) pm_runtime_get_sync(dev); for (i = 0; i < chip->nirqs; i++) { - irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); + irq = platform_get_resource(pdev, IORESOURCE_IRQ, i); if (!irq) continue; if (!common->base) {