diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-09-04 12:13:29 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-09-04 12:13:29 -0400 |
commit | ee5f38a4459a453ba5d5bdacdcffdf408548338f (patch) | |
tree | 93fd60ab5725b1a30e0fafa118678366e54508c8 | |
parent | cc91ceaf3efd9a2364463b5f85d9f391f1ddaa9d (diff) | |
parent | 7051334672e54fae67e02d5d3296fb62b3343be7 (diff) |
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.
-rw-r--r-- | sound/soc/codecs/cs43130.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/soc/codecs/cs43130.c b/sound/soc/codecs/cs43130.c index 220e30199c5b..643e37fc218e 100644 --- a/sound/soc/codecs/cs43130.c +++ b/sound/soc/codecs/cs43130.c | |||
@@ -2079,6 +2079,10 @@ static void cs43130_imp_meas(struct work_struct *wk) | |||
2079 | case CS43131_CHIP_ID: | 2079 | case CS43131_CHIP_ID: |
2080 | hpload_seq = hpload_seq2; | 2080 | hpload_seq = hpload_seq2; |
2081 | seq_size = ARRAY_SIZE(hpload_seq2); | 2081 | seq_size = ARRAY_SIZE(hpload_seq2); |
2082 | break; | ||
2083 | default: | ||
2084 | WARN(1, "Invalid dev_id for meas: %d", cs43130->dev_id); | ||
2085 | return; | ||
2082 | } | 2086 | } |
2083 | 2087 | ||
2084 | i = 0; | 2088 | i = 0; |
@@ -2147,7 +2151,7 @@ static irqreturn_t cs43130_irq_thread(int irq, void *data) | |||
2147 | struct cs43130_private *cs43130 = (struct cs43130_private *)data; | 2151 | struct cs43130_private *cs43130 = (struct cs43130_private *)data; |
2148 | struct snd_soc_codec *codec = cs43130->codec; | 2152 | struct snd_soc_codec *codec = cs43130->codec; |
2149 | unsigned int stickies[CS43130_NUM_INT]; | 2153 | unsigned int stickies[CS43130_NUM_INT]; |
2150 | unsigned int irq_occurrance = 0; | 2154 | unsigned int irq_occurrence = 0; |
2151 | unsigned int masks[CS43130_NUM_INT]; | 2155 | unsigned int masks[CS43130_NUM_INT]; |
2152 | int i, j; | 2156 | int i, j; |
2153 | 2157 | ||
@@ -2161,12 +2165,12 @@ static irqreturn_t cs43130_irq_thread(int irq, void *data) | |||
2161 | for (i = 0; i < ARRAY_SIZE(stickies); i++) { | 2165 | for (i = 0; i < ARRAY_SIZE(stickies); i++) { |
2162 | stickies[i] = stickies[i] & (~masks[i]); | 2166 | stickies[i] = stickies[i] & (~masks[i]); |
2163 | for (j = 0; j < 8; j++) | 2167 | for (j = 0; j < 8; j++) |
2164 | irq_occurrance += (stickies[i] >> j) & 1; | 2168 | irq_occurrence += (stickies[i] >> j) & 1; |
2165 | } | 2169 | } |
2166 | dev_dbg(codec->dev, "number of interrupts occurred (%u)\n", | 2170 | dev_dbg(codec->dev, "number of interrupts occurred (%u)\n", |
2167 | irq_occurrance); | 2171 | irq_occurrence); |
2168 | 2172 | ||
2169 | if (!irq_occurrance) | 2173 | if (!irq_occurrence) |
2170 | return IRQ_NONE; | 2174 | return IRQ_NONE; |
2171 | 2175 | ||
2172 | if (stickies[0] & CS43130_XTAL_RDY_INT) { | 2176 | if (stickies[0] & CS43130_XTAL_RDY_INT) { |
@@ -2593,7 +2597,7 @@ static int cs43130_i2c_remove(struct i2c_client *client) | |||
2593 | return 0; | 2597 | return 0; |
2594 | } | 2598 | } |
2595 | 2599 | ||
2596 | static int cs43130_runtime_suspend(struct device *dev) | 2600 | static int __maybe_unused cs43130_runtime_suspend(struct device *dev) |
2597 | { | 2601 | { |
2598 | struct cs43130_private *cs43130 = dev_get_drvdata(dev); | 2602 | struct cs43130_private *cs43130 = dev_get_drvdata(dev); |
2599 | 2603 | ||
@@ -2612,7 +2616,7 @@ static int cs43130_runtime_suspend(struct device *dev) | |||
2612 | return 0; | 2616 | return 0; |
2613 | } | 2617 | } |
2614 | 2618 | ||
2615 | static int cs43130_runtime_resume(struct device *dev) | 2619 | static int __maybe_unused cs43130_runtime_resume(struct device *dev) |
2616 | { | 2620 | { |
2617 | struct cs43130_private *cs43130 = dev_get_drvdata(dev); | 2621 | struct cs43130_private *cs43130 = dev_get_drvdata(dev); |
2618 | int ret; | 2622 | int ret; |