summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/aw88399.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/aw88399.c')
-rw-r--r--sound/soc/codecs/aw88399.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c
index 9fcb805bf971..4b90133e5ab4 100644
--- a/sound/soc/codecs/aw88399.c
+++ b/sound/soc/codecs/aw88399.c
@@ -8,9 +8,10 @@
//
#include <linux/crc32.h>
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/firmware.h>
-#include <linux/of_gpio.h>
+#include <linux/minmax.h>
#include <linux/regmap.h>
#include <sound/soc.h>
#include "aw88399.h"
@@ -462,7 +463,7 @@ static int aw_dev_set_vcalb(struct aw88399 *aw88399)
vcal_k * aw88399->vcalb_init_val;
break;
default:
- dev_err(aw_dev->dev, "%s: unsupport vsense\n", __func__);
+ dev_err(aw_dev->dev, "%s: unsupported vsense\n", __func__);
ret = -EINVAL;
break;
}
@@ -656,7 +657,7 @@ static int aw_dev_get_dsp_status(struct aw_device *aw_dev)
if (ret)
return ret;
if (!(reg_val & (~AW88399_WDT_CNT_MASK)))
- ret = -EPERM;
+ return -EPERM;
return 0;
}
@@ -872,11 +873,7 @@ static int aw_dev_dsp_update_container(struct aw_device *aw_dev,
goto error_operation;
for (i = 0; i < len; i += AW88399_MAX_RAM_WRITE_BYTE_SIZE) {
- if ((len - i) < AW88399_MAX_RAM_WRITE_BYTE_SIZE)
- tmp_len = len - i;
- else
- tmp_len = AW88399_MAX_RAM_WRITE_BYTE_SIZE;
-
+ tmp_len = min(len - i, AW88399_MAX_RAM_WRITE_BYTE_SIZE);
ret = regmap_raw_write(aw_dev->regmap, AW88399_DSPMDAT_REG,
&data[i], tmp_len);
if (ret)
@@ -1892,7 +1889,7 @@ static int aw88399_i2c_probe(struct i2c_client *i2c)
}
static const struct i2c_device_id aw88399_i2c_id[] = {
- { AW88399_I2C_NAME, 0 },
+ { AW88399_I2C_NAME },
{ }
};
MODULE_DEVICE_TABLE(i2c, aw88399_i2c_id);