]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/thermal/imx_thermal.c
staging: dgnc: remove explicit cast
[karo-tx-linux.git] / drivers / thermal / imx_thermal.c
index e473548b5d289d7dda47bdd8c423209fc1ab245f..fb648a45754eeff4177b0257b657ed59c4fe7a10 100644 (file)
@@ -246,7 +246,7 @@ static int imx_set_mode(struct thermal_zone_device *tz,
        }
 
        data->mode = mode;
-       thermal_zone_device_update(tz);
+       thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
 
        return 0;
 }
@@ -457,7 +457,7 @@ static irqreturn_t imx_thermal_alarm_irq_thread(int irq, void *dev)
        dev_dbg(&data->tz->device, "THERMAL ALARM: T > %d\n",
                data->alarm_temp / 1000);
 
-       thermal_zone_device_update(data->tz);
+       thermal_zone_device_update(data->tz, THERMAL_EVENT_UNSPECIFIED);
 
        return IRQ_HANDLED;
 }
@@ -489,6 +489,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
        data->tempmon = map;
 
        data->socdata = of_device_get_match_data(&pdev->dev);
+       if (!data->socdata) {
+               dev_err(&pdev->dev, "no device match found\n");
+               return -ENODEV;
+       }
 
        /* make sure the IRQ flag is clear before enabling irq on i.MX6SX */
        if (data->socdata->version == TEMPMON_IMX6SX) {