Commit ee5f38a4 authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-v4.14-cs43130' of...

Merge tag 'asoc-v4.14-cs43130' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for the CS43130 driver

A couple of warning fixes for the newly added CS43130 driver.
parents cc91ceaf 70513346
...@@ -2079,6 +2079,10 @@ static void cs43130_imp_meas(struct work_struct *wk) ...@@ -2079,6 +2079,10 @@ static void cs43130_imp_meas(struct work_struct *wk)
case CS43131_CHIP_ID: case CS43131_CHIP_ID:
hpload_seq = hpload_seq2; hpload_seq = hpload_seq2;
seq_size = ARRAY_SIZE(hpload_seq2); seq_size = ARRAY_SIZE(hpload_seq2);
break;
default:
WARN(1, "Invalid dev_id for meas: %d", cs43130->dev_id);
return;
} }
i = 0; i = 0;
...@@ -2147,7 +2151,7 @@ static irqreturn_t cs43130_irq_thread(int irq, void *data) ...@@ -2147,7 +2151,7 @@ static irqreturn_t cs43130_irq_thread(int irq, void *data)
struct cs43130_private *cs43130 = (struct cs43130_private *)data; struct cs43130_private *cs43130 = (struct cs43130_private *)data;
struct snd_soc_codec *codec = cs43130->codec; struct snd_soc_codec *codec = cs43130->codec;
unsigned int stickies[CS43130_NUM_INT]; unsigned int stickies[CS43130_NUM_INT];
unsigned int irq_occurrance = 0; unsigned int irq_occurrence = 0;
unsigned int masks[CS43130_NUM_INT]; unsigned int masks[CS43130_NUM_INT];
int i, j; int i, j;
...@@ -2161,12 +2165,12 @@ static irqreturn_t cs43130_irq_thread(int irq, void *data) ...@@ -2161,12 +2165,12 @@ static irqreturn_t cs43130_irq_thread(int irq, void *data)
for (i = 0; i < ARRAY_SIZE(stickies); i++) { for (i = 0; i < ARRAY_SIZE(stickies); i++) {
stickies[i] = stickies[i] & (~masks[i]); stickies[i] = stickies[i] & (~masks[i]);
for (j = 0; j < 8; j++) for (j = 0; j < 8; j++)
irq_occurrance += (stickies[i] >> j) & 1; irq_occurrence += (stickies[i] >> j) & 1;
} }
dev_dbg(codec->dev, "number of interrupts occurred (%u)\n", dev_dbg(codec->dev, "number of interrupts occurred (%u)\n",
irq_occurrance); irq_occurrence);
if (!irq_occurrance) if (!irq_occurrence)
return IRQ_NONE; return IRQ_NONE;
if (stickies[0] & CS43130_XTAL_RDY_INT) { if (stickies[0] & CS43130_XTAL_RDY_INT) {
...@@ -2593,7 +2597,7 @@ static int cs43130_i2c_remove(struct i2c_client *client) ...@@ -2593,7 +2597,7 @@ static int cs43130_i2c_remove(struct i2c_client *client)
return 0; return 0;
} }
static int cs43130_runtime_suspend(struct device *dev) static int __maybe_unused cs43130_runtime_suspend(struct device *dev)
{ {
struct cs43130_private *cs43130 = dev_get_drvdata(dev); struct cs43130_private *cs43130 = dev_get_drvdata(dev);
...@@ -2612,7 +2616,7 @@ static int cs43130_runtime_suspend(struct device *dev) ...@@ -2612,7 +2616,7 @@ static int cs43130_runtime_suspend(struct device *dev)
return 0; return 0;
} }
static int cs43130_runtime_resume(struct device *dev) static int __maybe_unused cs43130_runtime_resume(struct device *dev)
{ {
struct cs43130_private *cs43130 = dev_get_drvdata(dev); struct cs43130_private *cs43130 = dev_get_drvdata(dev);
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment