From: Alexander Beregalov Date: Sun, 12 Apr 2009 01:04:43 +0000 (+0400) Subject: ASoC: n810: replace BUG() with BUG_ON() X-Git-Tag: v2.6.31-rc1~363^2~29^2~124 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f4c1724f3437ac70d8330968379148c954ca34c7;p=karo-tx-linux.git ASoC: n810: replace BUG() with BUG_ON() Signed-off-by: Alexander Beregalov Signed-off-by: Mark Brown --- diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index a6d1178ce128..e54e1c2f5e63 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c @@ -383,10 +383,9 @@ static int __init n810_soc_init(void) clk_set_parent(sys_clkout2_src, func96m_clk); clk_set_rate(sys_clkout2, 12000000); - if (gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0) - BUG(); - if (gpio_request(N810_SPEAKER_AMP_GPIO, "spk_amp") < 0) - BUG(); + BUG_ON((gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0) || + (gpio_request(N810_SPEAKER_AMP_GPIO, "spk_amp") < 0)); + gpio_direction_output(N810_HEADSET_AMP_GPIO, 0); gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0);