All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm8962: Convert to devm_input_allocate_device()
@ 2012-12-20 13:18 Mark Brown
  2013-04-24 13:50 ` Leon Romanovsky
  0 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2012-12-20 13:18 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8962.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 50b0983..1cee9b3 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3189,7 +3189,7 @@ static void wm8962_init_beep(struct snd_soc_codec *codec)
 	struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
-	wm8962->beep = input_allocate_device();
+	wm8962->beep = devm_input_allocate_device(codec->dev);
 	if (!wm8962->beep) {
 		dev_err(codec->dev, "Failed to allocate beep device\n");
 		return;
@@ -3210,7 +3210,6 @@ static void wm8962_init_beep(struct snd_soc_codec *codec)
 
 	ret = input_register_device(wm8962->beep);
 	if (ret != 0) {
-		input_free_device(wm8962->beep);
 		wm8962->beep = NULL;
 		dev_err(codec->dev, "Failed to register beep device\n");
 	}
@@ -3227,7 +3226,6 @@ static void wm8962_free_beep(struct snd_soc_codec *codec)
 	struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
 
 	device_remove_file(codec->dev, &dev_attr_beep);
-	input_unregister_device(wm8962->beep);
 	cancel_work_sync(&wm8962->beep_work);
 	wm8962->beep = NULL;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-04-29 20:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20 13:18 [PATCH] ASoC: wm8962: Convert to devm_input_allocate_device() Mark Brown
2013-04-24 13:50 ` Leon Romanovsky
2013-04-25 12:52   ` Mark Brown
2013-04-28  5:00     ` Leon Romanovsky
2013-04-28  9:47       ` Mark Brown
2013-04-28 18:32         ` Leon Romanovsky
2013-04-29 10:19           ` Mark Brown
2013-04-29 17:47             ` [alsa-devel] " Leon Romanovsky
2013-04-29 18:07               ` Dmitry Torokhov
2013-04-29 18:19                 ` Dmitry Torokhov
2013-04-29 18:52                   ` Leon Romanovsky
2013-04-29 20:01                     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.