Commit 97257528 authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarJaroslav Kysela <perex@perex.cz>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7449054a
...@@ -82,7 +82,6 @@ struct snd_info_entry { ...@@ -82,7 +82,6 @@ struct snd_info_entry {
struct snd_info_entry_ops *ops; struct snd_info_entry_ops *ops;
} c; } c;
struct snd_info_entry *parent; struct snd_info_entry *parent;
struct snd_card *card;
struct module *module; struct module *module;
void *private_data; void *private_data;
void (*private_free)(struct snd_info_entry *entry); void (*private_free)(struct snd_info_entry *entry);
......
...@@ -750,10 +750,8 @@ struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, ...@@ -750,10 +750,8 @@ struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card,
if (!parent) if (!parent)
parent = card->proc_root; parent = card->proc_root;
entry = snd_info_create_entry(name, parent); entry = snd_info_create_entry(name, parent);
if (entry) { if (entry)
entry->module = card->module; entry->module = card->module;
entry->card = card;
}
return entry; return entry;
} }
EXPORT_SYMBOL(snd_info_create_card_entry); EXPORT_SYMBOL(snd_info_create_card_entry);
......
...@@ -104,7 +104,9 @@ EXPORT_SYMBOL(snd_mixer_oss_notify_callback); ...@@ -104,7 +104,9 @@ EXPORT_SYMBOL(snd_mixer_oss_notify_callback);
static void snd_card_id_read(struct snd_info_entry *entry, static void snd_card_id_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer) 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) static int init_info_for_card(struct snd_card *card)
...@@ -116,7 +118,7 @@ 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"); dev_dbg(card->dev, "unable to create card entry\n");
return -ENOMEM; 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; card->proc_id = entry;
return snd_info_card_register(card); return snd_info_card_register(card);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment