提交 ae9d908a 编写于 作者: E Ezequiel Garcia 提交者: Jon Hunter

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: NFelipe Balbi <balbi@ti.com>
Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: NJon Hunter <jon-hunter@ti.com>
Signed-off-by: NJon Hunter <jon-hunter@ti.com>
上级 7b095098
...@@ -452,10 +452,10 @@ static int gpmc_cs_set_reserved(int cs, int reserved) ...@@ -452,10 +452,10 @@ static int gpmc_cs_set_reserved(int cs, int reserved)
return 0; return 0;
} }
static int gpmc_cs_reserved(int cs) static bool gpmc_cs_reserved(int cs)
{ {
if (cs > GPMC_CS_NUM) if (cs > GPMC_CS_NUM)
return -ENODEV; return true;
return gpmc_cs_map & (1 << cs); return gpmc_cs_map & (1 << cs);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册