summaryrefslogtreecommitdiffstats
path: root/sound/core/init.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-05 16:10:00 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-06 18:11:58 +0100
commit9725752867cb158e076bcb6bc4bdb35d9710b1bd (patch)
tree9532aaa200b4d7b3edf5d636a9b8070fb209bff6 /sound/core/init.c
parentALSA: usb: Clean up with new procfs helpers (diff)
downloadlinux-9725752867cb158e076bcb6bc4bdb35d9710b1bd.tar.xz
linux-9725752867cb158e076bcb6bc4bdb35d9710b1bd.zip
ALSA: info: Drop unused snd_info_entry.card field
It's referred only in snd_card_id_read() which can receive the card object via private_data. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/init.c')
-rw-r--r--sound/core/init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/init.c b/sound/core/init.c
index 4849c611c0fe..5252a9ce13dc 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -104,7 +104,9 @@ EXPORT_SYMBOL(snd_mixer_oss_notify_callback);
static void snd_card_id_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
- snd_iprintf(buffer, "%s\n", entry->card->id);
+ struct snd_card *card = entry->private_data;
+
+ snd_iprintf(buffer, "%s\n", card->id);
}
static int init_info_for_card(struct snd_card *card)
@@ -116,7 +118,7 @@ static int init_info_for_card(struct snd_card *card)
dev_dbg(card->dev, "unable to create card entry\n");
return -ENOMEM;
}
- entry->c.text.read = snd_card_id_read;
+ snd_info_set_text_ops(entry, card, snd_card_id_read);
card->proc_id = entry;
return snd_info_card_register(card);