Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

-24
-1
include/sound/core.h
··· 240 240 void snd_request_card(int card); 241 241 242 242 int snd_device_alloc(struct device **dev_p, struct snd_card *card); 243 - void snd_device_initialize(struct device *dev, struct snd_card *card); 244 243 245 244 int snd_register_device(int type, struct snd_card *card, int dev, 246 245 const struct file_operations *f_ops,
-23
sound/core/init.c
··· 111 111 return mask; /* unchanged */ 112 112 } 113 113 114 - /* the default release callback set in snd_device_initialize() below; 115 - * this is just NOP for now, as almost all jobs are already done in 116 - * dev_free callback of snd_device chain instead. 117 - */ 118 - static void default_release(struct device *dev) 119 - { 120 - } 121 - 122 - /** 123 - * snd_device_initialize - Initialize struct device for sound devices 124 - * @dev: device to initialize 125 - * @card: card to assign, optional 126 - */ 127 - void snd_device_initialize(struct device *dev, struct snd_card *card) 128 - { 129 - device_initialize(dev); 130 - if (card) 131 - dev->parent = &card->card_dev; 132 - dev->class = &sound_class; 133 - dev->release = default_release; 134 - } 135 - EXPORT_SYMBOL_GPL(snd_device_initialize); 136 - 137 114 /* the default release callback set in snd_device_alloc() */ 138 115 static void default_release_alloc(struct device *dev) 139 116 {