aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-11 06:06:34 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-11 06:06:34 -0500
commit1b4327dced27fdddc38b938e393f8e9dc7bd8f66 (patch)
treef8b7f881ef921cc4f8458b26f4a95e1184ab22de
parente790245eb3b437bb1d322cf3d5fbb603a138c9f7 (diff)
parente958f8b806c3953fcadce3929400638ae0dc796f (diff)
Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next
-rw-r--r--sound/soc/codecs/cs42l52.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 9811a5478c87..0f6f481cec09 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -1038,7 +1038,7 @@ static void cs42l52_init_beep(struct snd_soc_codec *codec)
1038 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); 1038 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec);
1039 int ret; 1039 int ret;
1040 1040
1041 cs42l52->beep = input_allocate_device(); 1041 cs42l52->beep = devm_input_allocate_device(codec->dev);
1042 if (!cs42l52->beep) { 1042 if (!cs42l52->beep) {
1043 dev_err(codec->dev, "Failed to allocate beep device\n"); 1043 dev_err(codec->dev, "Failed to allocate beep device\n");
1044 return; 1044 return;
@@ -1059,7 +1059,6 @@ static void cs42l52_init_beep(struct snd_soc_codec *codec)
1059 1059
1060 ret = input_register_device(cs42l52->beep); 1060 ret = input_register_device(cs42l52->beep);
1061 if (ret != 0) { 1061 if (ret != 0) {
1062 input_free_device(cs42l52->beep);
1063 cs42l52->beep = NULL; 1062 cs42l52->beep = NULL;
1064 dev_err(codec->dev, "Failed to register beep device\n"); 1063 dev_err(codec->dev, "Failed to register beep device\n");
1065 } 1064 }
@@ -1076,7 +1075,6 @@ static void cs42l52_free_beep(struct snd_soc_codec *codec)
1076 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); 1075 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec);
1077 1076
1078 device_remove_file(codec->dev, &dev_attr_beep); 1077 device_remove_file(codec->dev, &dev_attr_beep);
1079 input_unregister_device(cs42l52->beep);
1080 cancel_work_sync(&cs42l52->beep_work); 1078 cancel_work_sync(&cs42l52->beep_work);
1081 cs42l52->beep = NULL; 1079 cs42l52->beep = NULL;
1082 1080