]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
staging: omap-thermal: refactor temp_sensor_unmask_interrupts
authorEduardo Valentin <eduardo.valentin@ti.com>
Fri, 15 Mar 2013 13:00:19 +0000 (09:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 16:02:22 +0000 (09:02 -0700)
This change improves temp_sensor_unmask_interrupts by:
. renaming it to omap_bandgap_unmask_interrupts
. making it a void function, as there is nothing really to report an error.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/omap-thermal/omap-bandgap.c

index f86c104df9517f864cb5ac8db1cbe1dbec787248..26d36f361cc2e0b343b2c3d7ab5a678627e3014d 100644 (file)
@@ -338,8 +338,8 @@ exit:
 /***   Helper functions handling device Alert/Shutdown signals   ***/
 
 /* Talert masks. Call it only if HAS(TALERT) is set */
-static int temp_sensor_unmask_interrupts(struct omap_bandgap *bg_ptr, int id,
-                                        u32 t_hot, u32 t_cold)
+static void omap_bandgap_unmask_interrupts(struct omap_bandgap *bg_ptr, int id,
+                                          u32 t_hot, u32 t_cold)
 {
        struct temp_sensor_registers *tsr;
        u32 temp, reg_val;
@@ -360,8 +360,6 @@ static int temp_sensor_unmask_interrupts(struct omap_bandgap *bg_ptr, int id,
        else
                reg_val &= ~tsr->mask_cold_mask;
        omap_bandgap_writel(bg_ptr, reg_val, tsr->bgap_mask_ctrl);
-
-       return 0;
 }
 
 /* Talert Thot threshold. Call it only if HAS(TALERT) is set */
@@ -399,7 +397,9 @@ int temp_sensor_configure_thot(struct omap_bandgap *bg_ptr, int id, int t_hot)
                return -EIO;
        }
 
-       return temp_sensor_unmask_interrupts(bg_ptr, id, t_hot, cold);
+       omap_bandgap_unmask_interrupts(bg_ptr, id, t_hot, cold);
+
+       return 0;
 }
 
 /* Talert Tcold threshold. Call it only if HAS(TALERT) is set */
@@ -438,7 +438,9 @@ int temp_sensor_configure_tcold(struct omap_bandgap *bg_ptr, int id,
                return -EIO;
        }
 
-       return temp_sensor_unmask_interrupts(bg_ptr, id, hot, t_cold);
+       omap_bandgap_unmask_interrupts(bg_ptr, id, hot, t_cold);
+
+       return 0;
 }
 
 #define bandgap_is_valid(b)                                            \