]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/clock.c
[ARM] omap: fix lots of 'Using plain integer as NULL pointer'
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / clock.c
index 5d9faa68d2ecdb7eb5c32b1915ec4b02120a374e..90ae0ef37d66f5c1138d9cb95790ee363dcd528b 100644 (file)
@@ -1,4 +1,3 @@
-//kernel/linux-omap-fsample/arch/arm/mach-omap1/clock.c#2 - edit change 3808 (text)
 /*
  *  linux/arch/arm/mach-omap1/clock.c
  *
 #include <asm/io.h>
 #include <asm/mach-types.h>
 
-#include <asm/arch/cpu.h>
-#include <asm/arch/usb.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/sram.h>
+#include <mach/cpu.h>
+#include <mach/usb.h>
+#include <mach/clock.h>
+#include <mach/sram.h>
 
 #include "clock.h"
 
@@ -202,7 +201,7 @@ static int calc_dsor_exp(struct clk *clk, unsigned long rate)
                return -EINVAL;
 
        parent = clk->parent;
-       if (unlikely(parent == 0))
+       if (unlikely(parent == NULL))
                return -EIO;
 
        realrate = parent->rate;
@@ -500,7 +499,7 @@ static int omap1_clk_enable_generic(struct clk *clk)
        if (clk->flags & ALWAYS_ENABLED)
                return 0;
 
-       if (unlikely(clk->enable_reg == 0)) {
+       if (unlikely(clk->enable_reg == NULL)) {
                printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
                       clk->name);
                return -EINVAL;
@@ -536,7 +535,7 @@ static void omap1_clk_disable_generic(struct clk *clk)
        __u16 regval16;
        __u32 regval32;
 
-       if (clk->enable_reg == 0)
+       if (clk->enable_reg == NULL)
                return;
 
        if (clk->flags & ENABLE_REG_32BIT) {
@@ -578,7 +577,7 @@ static long omap1_clk_round_rate(struct clk *clk, unsigned long rate)
                return clk->parent->rate / (1 << dsor_exp);
        }
 
-       if(clk->round_rate != 0)
+       if (clk->round_rate != NULL)
                return clk->round_rate(clk, rate);
 
        return clk->rate;
@@ -626,7 +625,7 @@ static void __init omap1_clk_disable_unused(struct clk *clk)
 
        /* Clocks in the DSP domain need api_ck. Just assume bootloader
         * has not enabled any DSP clocks */
-       if ((u32)clk->enable_reg == DSP_IDLECT2) {
+       if (clk->enable_reg == DSP_IDLECT2) {
                printk(KERN_INFO "Skipping reset check for DSP domain "
                       "clock \"%s\"\n", clk->name);
                return;
@@ -650,9 +649,9 @@ static void __init omap1_clk_disable_unused(struct clk *clk)
 
        /* FIXME: This clock seems to be necessary but no-one
         * has asked for its activation. */
-       if (clk == &tc2_ck              // FIX: pm.c (SRAM), CCP, Camera
-           || clk == &ck_dpll1out.clk  // FIX: SoSSI, SSR
-           || clk == &arm_gpio_ck      // FIX: GPIO code for 1510
+       if (clk == &tc2_ck              /* FIX: pm.c (SRAM), CCP, Camera */
+           || clk == &ck_dpll1out.clk  /* FIX: SoSSI, SSR */
+           || clk == &arm_gpio_ck      /* FIX: GPIO code for 1510 */
                ) {
                printk(KERN_INFO "FIXME: Clock \"%s\" seems unused\n",
                       clk->name);