diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 11:34:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 11:34:02 -0500 |
commit | 08456d10a6bc208bafced4f7b4090abccfb594da (patch) | |
tree | 98988ac1081ef73779fdf5b8e100e8f88619e3b9 /include | |
parent | 701dfbc1cbdd42b814dd76a885c4b73f97011d08 (diff) | |
parent | 7d2aae1e88660cf09be913e9754e45189dc33412 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
[PATCH] ALSA: Fix sysfs breakage
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/core.h | 18 |
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 { | |||
132 | int shutdown; /* this card is going down */ | 132 | int shutdown; /* this card is going down */ |
133 | int free_on_last_close; /* free in context of file_release */ | 133 | int free_on_last_close; /* free in context of file_release */ |
134 | wait_queue_head_t shutdown_sleep; | 134 | wait_queue_head_t shutdown_sleep; |
135 | struct device *parent; | 135 | struct device *dev; /* device assigned to this card */ |
136 | struct device *dev; | 136 | #ifndef CONFIG_SYSFS_DEPRECATED |
137 | struct device *card_dev; /* cardX object for sysfs */ | ||
138 | #endif | ||
137 | 139 | ||
138 | #ifdef CONFIG_PM | 140 | #ifdef CONFIG_PM |
139 | unsigned int power_state; /* power state */ | 141 | unsigned int power_state; /* power state */ |
@@ -191,6 +193,16 @@ struct snd_minor { | |||
191 | struct device *dev; /* device for sysfs */ | 193 | struct device *dev; /* device for sysfs */ |
192 | }; | 194 | }; |
193 | 195 | ||
196 | /* return a device pointer linked to each sound device as a parent */ | ||
197 | static inline struct device *snd_card_get_device_link(struct snd_card *card) | ||
198 | { | ||
199 | #ifdef CONFIG_SYSFS_DEPRECATED | ||
200 | return card ? card->dev : NULL; | ||
201 | #else | ||
202 | return card ? card->card_dev : NULL; | ||
203 | #endif | ||
204 | } | ||
205 | |||
194 | /* sound.c */ | 206 | /* sound.c */ |
195 | 207 | ||
196 | extern int snd_major; | 208 | extern int snd_major; |
@@ -257,7 +269,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file); | |||
257 | int snd_card_file_remove(struct snd_card *card, struct file *file); | 269 | int snd_card_file_remove(struct snd_card *card, struct file *file); |
258 | 270 | ||
259 | #ifndef snd_card_set_dev | 271 | #ifndef snd_card_set_dev |
260 | #define snd_card_set_dev(card,devptr) ((card)->parent = (devptr)) | 272 | #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr)) |
261 | #endif | 273 | #endif |
262 | 274 | ||
263 | /* device.c */ | 275 | /* device.c */ |