int type; /* SNDRV_DEVICE_TYPE_XXX */
int card; /* card number */
int device; /* device number */
+ bool created;
const struct file_operations *f_ops; /* file operations */
void *private_data; /* private data for f_ops->open */
struct device *dev; /* device for sysfs */
void snd_request_card(int card);
-int snd_register_device_for_dev(int type, struct snd_card *card,
- int dev,
+int snd_register_device_for_dev(int type, struct snd_card *card, int dev,
const struct file_operations *f_ops,
- void *private_data,
- const char *name,
- struct device *device);
+ void *private_data, struct device *device,
+ struct device *parent, const char *name);
/**
* snd_register_device - Register the ALSA device file for the card
const char *name)
{
return snd_register_device_for_dev(type, card, dev, f_ops,
- private_data, name,
- snd_card_get_device_link(card));
+ private_data, NULL,
+ snd_card_get_device_link(card),
+ name);
}
int snd_unregister_device(int type, struct snd_card *card, int dev);