summaryrefslogtreecommitdiff
path: root/sound/spi/at73c213.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/spi/at73c213.c')
-rw-r--r--sound/spi/at73c213.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c
index 1e8765d75d8f..8f6929ced2c8 100644
--- a/sound/spi/at73c213.c
+++ b/sound/spi/at73c213.c
@@ -726,12 +726,8 @@ static int snd_at73c213_mixer(struct snd_at73c213 *chip)
return 0;
cleanup:
- for (idx = 1; idx < ARRAY_SIZE(snd_at73c213_controls) + 1; idx++) {
- struct snd_kcontrol *kctl;
- kctl = snd_ctl_find_numid(card, idx);
- if (kctl)
- snd_ctl_remove(card, kctl);
- }
+ for (idx = 1; idx < ARRAY_SIZE(snd_at73c213_controls) + 1; idx++)
+ snd_ctl_remove(card, snd_ctl_find_numid(card, idx));
return errval;
}
@@ -1076,8 +1072,6 @@ out:
snd_card_free(card);
}
-#ifdef CONFIG_PM_SLEEP
-
static int snd_at73c213_suspend(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
@@ -1109,18 +1103,13 @@ static int snd_at73c213_resume(struct device *dev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(at73c213_pm_ops, snd_at73c213_suspend,
+static DEFINE_SIMPLE_DEV_PM_OPS(at73c213_pm_ops, snd_at73c213_suspend,
snd_at73c213_resume);
-#define AT73C213_PM_OPS (&at73c213_pm_ops)
-
-#else
-#define AT73C213_PM_OPS NULL
-#endif
static struct spi_driver at73c213_driver = {
.driver = {
.name = "at73c213",
- .pm = AT73C213_PM_OPS,
+ .pm = &at73c213_pm_ops,
},
.probe = snd_at73c213_probe,
.remove = snd_at73c213_remove,