diff options
Diffstat (limited to 'patches/linux-3.8.13/0477-ARM-omap2-gpmc-Remove-redundant-chip-select-out-of-r.patch')
-rw-r--r-- | patches/linux-3.8.13/0477-ARM-omap2-gpmc-Remove-redundant-chip-select-out-of-r.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/patches/linux-3.8.13/0477-ARM-omap2-gpmc-Remove-redundant-chip-select-out-of-r.patch b/patches/linux-3.8.13/0477-ARM-omap2-gpmc-Remove-redundant-chip-select-out-of-r.patch new file mode 100644 index 0000000..bc5d614 --- /dev/null +++ b/patches/linux-3.8.13/0477-ARM-omap2-gpmc-Remove-redundant-chip-select-out-of-r.patch @@ -0,0 +1,44 @@ +From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> +Date: Tue, 12 Feb 2013 16:22:24 -0300 +Subject: [PATCH] ARM: omap2: gpmc: Remove redundant chip select out of range + check + +This check is done before the call to gpmc_cs_reserved() and +gpmc_cs_set_reserved() and it's redundant to do it again in each +function. This simplifies the code a bit. + +Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> +Reviewed-by: Jon Hunter <jon-hunter@ti.com> +Signed-off-by: Jon Hunter <jon-hunter@ti.com> +--- + arch/arm/mach-omap2/gpmc.c | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c +index 83430a2..901dacd 100644 +--- a/arch/arm/mach-omap2/gpmc.c ++++ b/arch/arm/mach-omap2/gpmc.c +@@ -434,22 +434,14 @@ static int gpmc_cs_mem_enabled(int cs) + return l & GPMC_CONFIG7_CSVALID; + } + +-static int gpmc_cs_set_reserved(int cs, int reserved) ++static void gpmc_cs_set_reserved(int cs, int reserved) + { +- if (cs > GPMC_CS_NUM) +- return -ENODEV; +- + gpmc_cs_map &= ~(1 << cs); + gpmc_cs_map |= (reserved ? 1 : 0) << cs; +- +- return 0; + } + + static bool gpmc_cs_reserved(int cs) + { +- if (cs > GPMC_CS_NUM) +- return true; +- + return gpmc_cs_map & (1 << cs); + } + |