summaryrefslogtreecommitdiff
path: root/include/sound/core.h
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-31 11:24:00 -0600
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-31 11:24:00 -0600
commit30716e07ef511ec7525c07eb1e8060ba8943c2a2 (patch)
treeeb6a47cae63d3587fa773cc5a16781eaa2c7810b /include/sound/core.h
parent03c79cc56e4497cbd09d74a73c1bd0d1d9a8a16c (diff)
parentf56df2f4db6e4af87fb8e941cff69f4501a111df (diff)
downloadlinux-30716e07ef511ec7525c07eb1e8060ba8943c2a2.tar.gz
linux-30716e07ef511ec7525c07eb1e8060ba8943c2a2.tar.xz
Merge branch 'linus'
Diffstat (limited to 'include/sound/core.h')
-rw-r--r--include/sound/core.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index a994bea09cd6..521f036cce99 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -132,8 +132,10 @@ struct snd_card {
int shutdown; /* this card is going down */
int free_on_last_close; /* free in context of file_release */
wait_queue_head_t shutdown_sleep;
- struct device *parent;
- struct device *dev;
+ struct device *dev; /* device assigned to this card */
+#ifndef CONFIG_SYSFS_DEPRECATED
+ struct device *card_dev; /* cardX object for sysfs */
+#endif
#ifdef CONFIG_PM
unsigned int power_state; /* power state */
@@ -191,6 +193,16 @@ struct snd_minor {
struct device *dev; /* device for sysfs */
};
+/* return a device pointer linked to each sound device as a parent */
+static inline struct device *snd_card_get_device_link(struct snd_card *card)
+{
+#ifdef CONFIG_SYSFS_DEPRECATED
+ return card ? card->dev : NULL;
+#else
+ return card ? card->card_dev : NULL;
+#endif
+}
+
/* sound.c */
extern int snd_major;
@@ -257,7 +269,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file);
int snd_card_file_remove(struct snd_card *card, struct file *file);
#ifndef snd_card_set_dev
-#define snd_card_set_dev(card,devptr) ((card)->parent = (devptr))
+#define snd_card_set_dev(card,devptr) ((card)->dev = (devptr))
#endif
/* device.c */