提交 0449410b 编写于 作者: S Sasha Levin 提交者: Tony Lindgren

ARM: OMAP1: use BUG_ON where possible

Just use BUG_ON() instead of constructions such as:

	if (...)
		BUG()

A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
@@
- if (e) BUG();
+ BUG_ON(e);
// </smpl>
Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 63d5fc0c
...@@ -307,8 +307,7 @@ static void __init omap_fsample_init(void) ...@@ -307,8 +307,7 @@ static void __init omap_fsample_init(void)
fsample_init_smc91x(); fsample_init_smc91x();
if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0) BUG_ON(gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0);
BUG();
gpio_direction_input(FSAMPLE_NAND_RB_GPIO_PIN); gpio_direction_input(FSAMPLE_NAND_RB_GPIO_PIN);
omap_cfg_reg(L3_1610_FLASH_CS2B_OE); omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
......
...@@ -411,8 +411,7 @@ static void __init h2_init(void) ...@@ -411,8 +411,7 @@ static void __init h2_init(void)
h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
h2_nand_resource.end += SZ_4K - 1; h2_nand_resource.end += SZ_4K - 1;
if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0) BUG_ON(gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0);
BUG();
gpio_direction_input(H2_NAND_RB_GPIO_PIN); gpio_direction_input(H2_NAND_RB_GPIO_PIN);
omap_cfg_reg(L3_1610_FLASH_CS2B_OE); omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
......
...@@ -406,8 +406,7 @@ static void __init h3_init(void) ...@@ -406,8 +406,7 @@ static void __init h3_init(void)
nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS; nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS;
nand_resource.end += SZ_4K - 1; nand_resource.end += SZ_4K - 1;
if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0) BUG_ON(gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0);
BUG();
gpio_direction_input(H3_NAND_RB_GPIO_PIN); gpio_direction_input(H3_NAND_RB_GPIO_PIN);
/* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */ /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
......
...@@ -275,8 +275,7 @@ static void __init omap_perseus2_init(void) ...@@ -275,8 +275,7 @@ static void __init omap_perseus2_init(void)
perseus2_init_smc91x(); perseus2_init_smc91x();
if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) BUG_ON(gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0);
BUG();
gpio_direction_input(P2_NAND_RB_GPIO_PIN); gpio_direction_input(P2_NAND_RB_GPIO_PIN);
omap_cfg_reg(L3_1610_FLASH_CS2B_OE); omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册