From: Ezequiel Garcia Date: Tue, 12 Feb 2013 19:22:19 +0000 (-0300) Subject: ARM: omap2: gpmc: Fix gpmc_cs_reserved() return value X-Git-Tag: v3.10-rc1~102^2~19^2^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae9d908abc9e9d858a619faaf4d6647bdf3cb21f;p=profile%2Fivi%2Fkernel-x86-ivi.git ARM: omap2: gpmc: Fix gpmc_cs_reserved() return value Currently gpmc_cs_reserved() return value is somewhat inconsistent, returning a negative value on an error condition, a positive value if the chip select is reserved and zero if it's available. Fix this by returning a boolean value as the function name suggests: * true if the chip select is reserved, * false if it's available Suggested-by: Felipe Balbi Signed-off-by: Ezequiel Garcia Reviewed-by: Jon Hunter Signed-off-by: Jon Hunter --- diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 27dd2c8..7c122bb 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -452,10 +452,10 @@ static int gpmc_cs_set_reserved(int cs, int reserved) return 0; } -static int gpmc_cs_reserved(int cs) +static bool gpmc_cs_reserved(int cs) { if (cs > GPMC_CS_NUM) - return -ENODEV; + return true; return gpmc_cs_map & (1 << cs); }