diff options
Diffstat (limited to 'sound/soc/codecs/wm2000.c')
-rw-r--r-- | sound/soc/codecs/wm2000.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index 8ae5027..7fefd76 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -137,8 +137,7 @@ static int wm2000_power_up(struct i2c_client *i2c, int analogue) unsigned long rate; int ret; - if (WARN_ON(wm2000->anc_mode != ANC_OFF)) - return -EINVAL; + BUG_ON(wm2000->anc_mode != ANC_OFF); dev_dbg(&i2c->dev, "Beginning power up\n"); @@ -278,8 +277,7 @@ static int wm2000_enter_bypass(struct i2c_client *i2c, int analogue) { struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); - if (WARN_ON(wm2000->anc_mode != ANC_ACTIVE)) - return -EINVAL; + BUG_ON(wm2000->anc_mode != ANC_ACTIVE); if (analogue) { wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, @@ -317,8 +315,7 @@ static int wm2000_exit_bypass(struct i2c_client *i2c, int analogue) { struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); - if (WARN_ON(wm2000->anc_mode != ANC_BYPASS)) - return -EINVAL; + BUG_ON(wm2000->anc_mode != ANC_BYPASS); wm2000_write(i2c, WM2000_REG_SYS_CTL1, 0); @@ -352,8 +349,7 @@ static int wm2000_enter_standby(struct i2c_client *i2c, int analogue) { struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); - if (WARN_ON(wm2000->anc_mode != ANC_ACTIVE)) - return -EINVAL; + BUG_ON(wm2000->anc_mode != ANC_ACTIVE); if (analogue) { wm2000_write(i2c, WM2000_REG_ANA_VMID_PD_TIME, 248 / 4); @@ -396,8 +392,7 @@ static int wm2000_exit_standby(struct i2c_client *i2c, int analogue) { struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); - if (WARN_ON(wm2000->anc_mode != ANC_STANDBY)) - return -EINVAL; + BUG_ON(wm2000->anc_mode != ANC_STANDBY); wm2000_write(i2c, WM2000_REG_SYS_CTL1, 0); |