struct snd_info_entry_ops *ops;
} c;
struct snd_info_entry *parent;
- struct snd_card *card;
struct module *module;
void *private_data;
void (*private_free)(struct snd_info_entry *entry);
if (!parent)
parent = card->proc_root;
entry = snd_info_create_entry(name, parent);
- if (entry) {
+ if (entry)
entry->module = card->module;
- entry->card = card;
- }
return entry;
}
EXPORT_SYMBOL(snd_info_create_card_entry);
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)
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);