]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
omap: fix a gpmc nand problem
authorstanley.miao <stanley.miao@windriver.com>
Tue, 20 Apr 2010 06:33:30 +0000 (06:33 +0000)
committerTony Lindgren <tony@atomide.com>
Fri, 23 Apr 2010 22:35:11 +0000 (15:35 -0700)
If gpmc_t isn't given, we don't need to set timing for gpmc, or it will cause
a Oops.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/gpmc-nand.c

index 64d74f05abbe8ff011a2325407d911d2f8607dee..e57fb29ff855b484e5339abfbb563259c7390140 100644 (file)
@@ -39,6 +39,9 @@ static int omap2_nand_gpmc_retime(void)
        struct gpmc_timings t;
        int err;
 
+       if (!gpmc_nand_data->gpmc_t)
+               return 0;
+
        memset(&t, 0, sizeof(t));
        t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk);
        t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on);