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

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: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: NJon Hunter <jon-hunter@ti.com>
Signed-off-by: NJon Hunter <jon-hunter@ti.com>
上级 7ab91596
......@@ -441,22 +441,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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册