Skip to content

Commit ee5f38a

Browse files
committed
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.
2 parents cc91cea + 7051334 commit ee5f38a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

sound/soc/codecs/cs43130.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,10 @@ static void cs43130_imp_meas(struct work_struct *wk)
20792079
case CS43131_CHIP_ID:
20802080
hpload_seq = hpload_seq2;
20812081
seq_size = ARRAY_SIZE(hpload_seq2);
2082+
break;
2083+
default:
2084+
WARN(1, "Invalid dev_id for meas: %d", cs43130->dev_id);
2085+
return;
20822086
}
20832087

20842088
i = 0;
@@ -2147,7 +2151,7 @@ static irqreturn_t cs43130_irq_thread(int irq, void *data)
21472151
struct cs43130_private *cs43130 = (struct cs43130_private *)data;
21482152
struct snd_soc_codec *codec = cs43130->codec;
21492153
unsigned int stickies[CS43130_NUM_INT];
2150-
unsigned int irq_occurrance = 0;
2154+
unsigned int irq_occurrence = 0;
21512155
unsigned int masks[CS43130_NUM_INT];
21522156
int i, j;
21532157

@@ -2161,12 +2165,12 @@ static irqreturn_t cs43130_irq_thread(int irq, void *data)
21612165
for (i = 0; i < ARRAY_SIZE(stickies); i++) {
21622166
stickies[i] = stickies[i] & (~masks[i]);
21632167
for (j = 0; j < 8; j++)
2164-
irq_occurrance += (stickies[i] >> j) & 1;
2168+
irq_occurrence += (stickies[i] >> j) & 1;
21652169
}
21662170
dev_dbg(codec->dev, "number of interrupts occurred (%u)\n",
2167-
irq_occurrance);
2171+
irq_occurrence);
21682172

2169-
if (!irq_occurrance)
2173+
if (!irq_occurrence)
21702174
return IRQ_NONE;
21712175

21722176
if (stickies[0] & CS43130_XTAL_RDY_INT) {
@@ -2593,7 +2597,7 @@ static int cs43130_i2c_remove(struct i2c_client *client)
25932597
return 0;
25942598
}
25952599

2596-
static int cs43130_runtime_suspend(struct device *dev)
2600+
static int __maybe_unused cs43130_runtime_suspend(struct device *dev)
25972601
{
25982602
struct cs43130_private *cs43130 = dev_get_drvdata(dev);
25992603

@@ -2612,7 +2616,7 @@ static int cs43130_runtime_suspend(struct device *dev)
26122616
return 0;
26132617
}
26142618

2615-
static int cs43130_runtime_resume(struct device *dev)
2619+
static int __maybe_unused cs43130_runtime_resume(struct device *dev)
26162620
{
26172621
struct cs43130_private *cs43130 = dev_get_drvdata(dev);
26182622
int ret;

0 commit comments

Comments
 (0)