]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
asoc: rt56xx: fix missing device_remove_file
authorShreshtha SAHU <ssahu@nvidia.com>
Wed, 17 Sep 2014 10:28:09 +0000 (15:58 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 19 Sep 2014 17:05:06 +0000 (10:05 -0700)
added missing device_remove_file during device remove
this resulted failure in modprobe of module

Bug 200038187
Bug 200037087

Change-Id: Ibbe8cf92162144d438f5b563bf6d2b9787acc04e
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/499745
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
sound/soc/codecs/rt5639.c
sound/soc/codecs/rt5640.c
sound/soc/codecs/rt5645.c

index 6aebb6463c29acc94444373ad14dfbb62fb4bcad..e9a5a4db3538943338a5afb2dfcd335b4eaed2b0 100644 (file)
@@ -3148,6 +3148,7 @@ static int rt5639_probe(struct snd_soc_codec *codec)
 static int rt5639_remove(struct snd_soc_codec *codec)
 {
        rt5639_set_bias_level(codec, SND_SOC_BIAS_OFF);
+       device_remove_file(codec->dev, &dev_attr_index_reg);
        return 0;
 }
 
index 30932cb20e50039ef4b822a1b15dc6cb0229a1b7..65d213b2dc5d0aeb4499df4bb34ecf313a5ff2e9 100644 (file)
@@ -2824,6 +2824,7 @@ static int rt5640_remove(struct snd_soc_codec *codec)
        CHECK_I2C_SHUTDOWN(rt5640, codec)
        rt5640_reset(codec);
        snd_soc_write(codec, RT5640_PWR_ANLG1, 0);
+       device_remove_file(codec->dev, &dev_attr_index_reg);
 
        mutex_unlock(&rt5640->lock);
        return 0;
index 689e7bd7f1f7035b55de25887ab17f22ab575ca9..0fde9c09c1c22c5d3f2b4f6ebfea02a42a0cc923 100644 (file)
@@ -3598,6 +3598,8 @@ static int rt5645_probe(struct snd_soc_codec *codec)
 static int rt5645_remove(struct snd_soc_codec *codec)
 {
        rt5645_set_bias_level(codec, SND_SOC_BIAS_OFF);
+       device_remove_file(codec->dev, &dev_attr_codec_reg);
+       device_remove_file(codec->dev, &dev_attr_index_reg);
        return 0;
 }