diff options
| -rw-r--r-- | sound/soc/codecs/lm4857.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/soc/codecs/lm4857.c b/sound/soc/codecs/lm4857.c index dac9165ea9ab..99ffc49aa779 100644 --- a/sound/soc/codecs/lm4857.c +++ b/sound/soc/codecs/lm4857.c | |||
| @@ -100,7 +100,7 @@ static const struct snd_soc_dapm_route lm4857_routes[] = { | |||
| 100 | { "EP", "Earpiece", "Mode" }, | 100 | { "EP", "Earpiece", "Mode" }, |
| 101 | }; | 101 | }; |
| 102 | 102 | ||
| 103 | static struct snd_soc_codec_driver soc_codec_dev_lm4857 = { | 103 | static struct snd_soc_component_driver lm4857_component_driver = { |
| 104 | .controls = lm4857_controls, | 104 | .controls = lm4857_controls, |
| 105 | .num_controls = ARRAY_SIZE(lm4857_controls), | 105 | .num_controls = ARRAY_SIZE(lm4857_controls), |
| 106 | .dapm_widgets = lm4857_dapm_widgets, | 106 | .dapm_widgets = lm4857_dapm_widgets, |
| @@ -129,13 +129,8 @@ static int lm4857_i2c_probe(struct i2c_client *i2c, | |||
| 129 | if (IS_ERR(regmap)) | 129 | if (IS_ERR(regmap)) |
| 130 | return PTR_ERR(regmap); | 130 | return PTR_ERR(regmap); |
| 131 | 131 | ||
| 132 | return snd_soc_register_codec(&i2c->dev, &soc_codec_dev_lm4857, NULL, 0); | 132 | return devm_snd_soc_register_component(&i2c->dev, |
| 133 | } | 133 | &lm4857_component_driver, NULL, 0); |
| 134 | |||
| 135 | static int lm4857_i2c_remove(struct i2c_client *i2c) | ||
| 136 | { | ||
| 137 | snd_soc_unregister_codec(&i2c->dev); | ||
| 138 | return 0; | ||
| 139 | } | 134 | } |
| 140 | 135 | ||
| 141 | static const struct i2c_device_id lm4857_i2c_id[] = { | 136 | static const struct i2c_device_id lm4857_i2c_id[] = { |
| @@ -150,7 +145,6 @@ static struct i2c_driver lm4857_i2c_driver = { | |||
| 150 | .owner = THIS_MODULE, | 145 | .owner = THIS_MODULE, |
| 151 | }, | 146 | }, |
| 152 | .probe = lm4857_i2c_probe, | 147 | .probe = lm4857_i2c_probe, |
| 153 | .remove = lm4857_i2c_remove, | ||
| 154 | .id_table = lm4857_i2c_id, | 148 | .id_table = lm4857_i2c_id, |
| 155 | }; | 149 | }; |
| 156 | 150 | ||
