summaryrefslogtreecommitdiff
path: root/include/sound/core.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-29 15:53:51 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-02 14:21:07 +0100
commit92b7952da8279189aad352efbf9f2e7001de9524 (patch)
tree9fbe989ba60bafdeeedae4592ffe6762d155becb /include/sound/core.h
parente36f014edff70fc02b3d3d79cead1d58f289332e (diff)
ALSA: Allow to pass the device object to snd_register_device*()
This is a preliminary patch for the further work on embedding struct device into each sound device instance. It changes snd_register_device*() helpers to receive the device object directly for skipping creating a device there. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/core.h')
-rw-r--r--include/sound/core.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index 1df3f2fe5350..39d14234961d 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -186,6 +186,7 @@ struct snd_minor {
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 */
@@ -206,12 +207,10 @@ extern struct class *sound_class;
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
@@ -236,8 +235,9 @@ static inline int snd_register_device(int type, struct snd_card *card, int dev,
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);