aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/compress_offload.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-30 08:34:58 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-02 17:01:26 +0100
commit40a4b263854346fe7c7d1c3964c106296f690816 (patch)
tree409291460a651df9ef508f19667489a25f5df09e /sound/core/compress_offload.c
parentALSA: compress: Embed struct device (diff)
downloadlinux-dev-40a4b263854346fe7c7d1c3964c106296f690816.tar.xz
linux-dev-40a4b263854346fe7c7d1c3964c106296f690816.zip
ALSA: Simplify snd_device_register() variants
Now that all callers have been replaced with snd_device_register_for_dev(), let's drop the obsolete device registration code and concentrate only on the code handling struct device directly. That said, - remove the old snd_device_register(), - rename snd_device_register_for_dev() with snd_device_register(), - drop superfluous arguments from snd_device_register(), - change snd_unregister_device() to pass the device pointer directly Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/compress_offload.c')
-rw-r--r--sound/core/compress_offload.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index cb58c3f7f80c..b123c42e7dc8 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -871,10 +871,9 @@ static int snd_compress_dev_register(struct snd_device *device)
pr_debug("reg %s for device %s, direction %d\n", str, compr->name,
compr->direction);
/* register compressed device */
- ret = snd_register_device_for_dev(SNDRV_DEVICE_TYPE_COMPRESS,
- compr->card, compr->device,
- &snd_compr_file_ops, compr,
- &compr->dev, NULL, NULL);
+ ret = snd_register_device(SNDRV_DEVICE_TYPE_COMPRESS,
+ compr->card, compr->device,
+ &snd_compr_file_ops, compr, &compr->dev);
if (ret < 0) {
pr_err("snd_register_device failed\n %d", ret);
return ret;
@@ -888,8 +887,7 @@ static int snd_compress_dev_disconnect(struct snd_device *device)
struct snd_compr *compr;
compr = device->device_data;
- snd_unregister_device(SNDRV_DEVICE_TYPE_COMPRESS, compr->card,
- compr->device);
+ snd_unregister_device(&compr->dev);
return 0;
}