thermal/drivers/rcar: Remove notification usage
[linux-2.6-microblaze.git] / drivers / thermal / rcar_thermal.c
index 787710b..b49f04d 100644 (file)
@@ -323,24 +323,6 @@ static int rcar_thermal_get_trip_temp(struct thermal_zone_device *zone,
        return 0;
 }
 
-static int rcar_thermal_notify(struct thermal_zone_device *zone,
-                              int trip, enum thermal_trip_type type)
-{
-       struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone);
-       struct device *dev = rcar_priv_to_dev(priv);
-
-       switch (type) {
-       case THERMAL_TRIP_CRITICAL:
-               /* FIXME */
-               dev_warn(dev, "Thermal reached to critical temperature\n");
-               break;
-       default:
-               break;
-       }
-
-       return 0;
-}
-
 static const struct thermal_zone_of_device_ops rcar_thermal_zone_of_ops = {
        .get_temp       = rcar_thermal_of_get_temp,
 };
@@ -349,7 +331,6 @@ static struct thermal_zone_device_ops rcar_thermal_zone_ops = {
        .get_temp       = rcar_thermal_get_temp,
        .get_trip_type  = rcar_thermal_get_trip_type,
        .get_trip_temp  = rcar_thermal_get_trip_temp,
-       .notify         = rcar_thermal_notify,
 };
 
 /*
@@ -409,16 +390,15 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data)
 {
        struct rcar_thermal_common *common = data;
        struct rcar_thermal_priv *priv;
-       unsigned long flags;
        u32 status, mask;
 
-       spin_lock_irqsave(&common->lock, flags);
+       spin_lock(&common->lock);
 
        mask    = rcar_thermal_common_read(common, INTMSK);
        status  = rcar_thermal_common_read(common, STR);
        rcar_thermal_common_write(common, STR, 0x000F0F0F & mask);
 
-       spin_unlock_irqrestore(&common->lock, flags);
+       spin_unlock(&common->lock);
 
        status = status & ~mask;
 
@@ -546,11 +526,11 @@ static int rcar_thermal_probe(struct platform_device *pdev)
                if (ret < 0)
                        goto error_unregister;
 
-               if (chip->use_of_thermal)
+               if (chip->use_of_thermal) {
                        priv->zone = devm_thermal_zone_of_sensor_register(
                                                dev, i, priv,
                                                &rcar_thermal_zone_of_ops);
-               else {
+               else {
                        priv->zone = thermal_zone_device_register(
                                                "rcar_thermal",
                                                1, 0, priv,