aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/rt274.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/rt274.c')
-rw-r--r--sound/soc/codecs/rt274.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c
index 70cf17c0aa99..6e7843484250 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;
}
@@ -996,6 +993,7 @@ static void rt274_remove(struct snd_soc_component *component)
struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component);
cancel_delayed_work_sync(&rt274->jack_detect_work);
+ rt274->component = NULL;
}
#ifdef CONFIG_PM
@@ -1056,7 +1054,7 @@ static struct snd_soc_dai_driver rt274_dai[] = {
.formats = RT274_FORMATS,
},
.ops = &rt274_aif_dai_ops,
- .symmetric_rates = 1,
+ .symmetric_rate = 1,
},
};
@@ -1075,7 +1073,6 @@ static const struct snd_soc_component_driver soc_component_dev_rt274 = {
.num_dapm_routes = ARRAY_SIZE(rt274_dapm_routes),
.use_pmdown_time = 1,
.endianness = 1,
- .non_legacy_dai_naming = 1,
};
static const struct regmap_config rt274_regmap = {
@@ -1114,8 +1111,7 @@ static const struct acpi_device_id rt274_acpi_match[] = {
MODULE_DEVICE_TABLE(acpi, rt274_acpi_match);
#endif
-static int rt274_i2c_probe(struct i2c_client *i2c,
- const struct i2c_device_id *id)
+static int rt274_i2c_probe(struct i2c_client *i2c)
{
struct rt274_priv *rt274;
@@ -1196,7 +1192,7 @@ static int rt274_i2c_probe(struct i2c_client *i2c,
IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "rt274", rt274);
if (ret != 0) {
dev_err(&i2c->dev,
- "Failed to reguest IRQ: %d\n", ret);
+ "Failed to request IRQ: %d\n", ret);
return ret;
}
}
@@ -1208,14 +1204,12 @@ static int rt274_i2c_probe(struct i2c_client *i2c,
return ret;
}
-static int rt274_i2c_remove(struct i2c_client *i2c)
+static void rt274_i2c_remove(struct i2c_client *i2c)
{
struct rt274_priv *rt274 = i2c_get_clientdata(i2c);
if (i2c->irq)
free_irq(i2c->irq, rt274);
-
- return 0;
}