aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt274.c
diff options
context:
space:
mode:
authorCezary Rojewski2022-06-09 15:35:31 +0200
committerMark Brown2022-06-10 13:32:16 +0100
commita43b4394bb35391b74486a788be6634ed91e221a (patch)
treeb970856b8caacd0f4b43477e7c9a269ec77b5b5c /sound/soc/codecs/rt274.c
parent142d456204cf4dabe18be59e043d806440f609d4 (diff)
ASoC: codecs: rt274: Always init jack_detect_work
Improves readability by making sure the work is always initialized. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20220609133541.3984886-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt274.c')
-rw-r--r--sound/soc/codecs/rt274.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c
index ab093bdb5552..a5615e94ec7d 100644
--- a/sound/soc/codecs/rt274.c
+++ b/sound/soc/codecs/rt274.c
@@ -980,14 +980,11 @@ static int rt274_probe(struct snd_soc_component *component)
struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component);
rt274->component = component;
+ INIT_DELAYED_WORK(&rt274->jack_detect_work, rt274_jack_detect_work);
- if (rt274->i2c->irq) {
- INIT_DELAYED_WORK(&rt274->jack_detect_work,
- rt274_jack_detect_work);
+ if (rt274->i2c->irq)
schedule_delayed_work(&rt274->jack_detect_work,
- msecs_to_jiffies(1250));
- }
-
+ msecs_to_jiffies(1250));
return 0;
}