summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-08-16 19:02:52 +0300
committerTakashi Iwai <tiwai@suse.de>2023-08-17 10:24:33 +0300
commit01ed7f3535a2c59d27cb7e78cf62eb81d2bbf2ec (patch)
treee21adaa0ec90859771b763949ff3bf328f2d88cd
parent2419891e3ffdd50b17fb3aca49accc8e64b1f363 (diff)
downloadlinux-01ed7f3535a2c59d27cb7e78cf62eb81d2bbf2ec.tar.xz
ALSA: core: Drop snd_device_initialize()
Now all users of snd_device_intialize() are gone, let's drop it. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Tested-by: Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-10-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--include/sound/core.h1
-rw-r--r--sound/core/init.c23
2 files changed, 0 insertions, 24 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index f3f6b720a278..dfef0c9d4b9f 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -240,7 +240,6 @@ extern struct dentry *sound_debugfs_root;
void snd_request_card(int card);
int snd_device_alloc(struct device **dev_p, struct snd_card *card);
-void snd_device_initialize(struct device *dev, struct snd_card *card);
int snd_register_device(int type, struct snd_card *card, int dev,
const struct file_operations *f_ops,
diff --git a/sound/core/init.c b/sound/core/init.c
index a4de9f00d90f..d61bde1225f2 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -111,29 +111,6 @@ static int get_slot_from_bitmask(int mask, int (*check)(struct module *, int),
return mask; /* unchanged */
}
-/* the default release callback set in snd_device_initialize() below;
- * this is just NOP for now, as almost all jobs are already done in
- * dev_free callback of snd_device chain instead.
- */
-static void default_release(struct device *dev)
-{
-}
-
-/**
- * snd_device_initialize - Initialize struct device for sound devices
- * @dev: device to initialize
- * @card: card to assign, optional
- */
-void snd_device_initialize(struct device *dev, struct snd_card *card)
-{
- device_initialize(dev);
- if (card)
- dev->parent = &card->card_dev;
- dev->class = &sound_class;
- dev->release = default_release;
-}
-EXPORT_SYMBOL_GPL(snd_device_initialize);
-
/* the default release callback set in snd_device_alloc() */
static void default_release_alloc(struct device *dev)
{