diff options
author | Henrik Kretzschmar <henne@nachtwindheim.de> | 2005-06-29 13:30:42 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-07-28 06:09:44 -0400 |
commit | a3352f01ea2d38b0d5b7b63de754e94b9aba0390 (patch) | |
tree | d923f1fa601f181b620f5613b922bdc3368df5b7 /sound | |
parent | 7a318a70a42057692f191ff49c289cd3e27e21f5 (diff) |
[ALSA] Fix two typos and changes on snd_assert()
ALSA Core
Both typos were in the kerneldocs.
I splitted the snd_assert() calls in one-expression-per-call for better
debugging.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/device.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/core/device.c b/sound/core/device.c index 18c71f913d2a..ca00ad7740c9 100644 --- a/sound/core/device.c +++ b/sound/core/device.c | |||
@@ -28,7 +28,7 @@ | |||
28 | /** | 28 | /** |
29 | * snd_device_new - create an ALSA device component | 29 | * snd_device_new - create an ALSA device component |
30 | * @card: the card instance | 30 | * @card: the card instance |
31 | * @type: the device type, SNDRV_DEV_TYPE_XXX | 31 | * @type: the device type, SNDRV_DEV_XXX |
32 | * @device_data: the data pointer of this device | 32 | * @device_data: the data pointer of this device |
33 | * @ops: the operator table | 33 | * @ops: the operator table |
34 | * | 34 | * |
@@ -46,7 +46,9 @@ int snd_device_new(snd_card_t *card, snd_device_type_t type, | |||
46 | { | 46 | { |
47 | snd_device_t *dev; | 47 | snd_device_t *dev; |
48 | 48 | ||
49 | snd_assert(card != NULL && device_data != NULL && ops != NULL, return -ENXIO); | 49 | snd_assert(card != NULL, return -ENXIO); |
50 | snd_assert(device_data != NULL, return -ENXIO); | ||
51 | snd_assert(ops != NULL, return -ENXIO); | ||
50 | dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); | 52 | dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); |
51 | if (dev == NULL) | 53 | if (dev == NULL) |
52 | return -ENOMEM; | 54 | return -ENOMEM; |
@@ -102,7 +104,7 @@ int snd_device_free(snd_card_t *card, void *device_data) | |||
102 | } | 104 | } |
103 | 105 | ||
104 | /** | 106 | /** |
105 | * snd_device_free - disconnect the device | 107 | * snd_device_disconnect - disconnect the device |
106 | * @card: the card instance | 108 | * @card: the card instance |
107 | * @device_data: the data pointer to disconnect | 109 | * @device_data: the data pointer to disconnect |
108 | * | 110 | * |
@@ -118,7 +120,7 @@ int snd_device_disconnect(snd_card_t *card, void *device_data) | |||
118 | { | 120 | { |
119 | struct list_head *list; | 121 | struct list_head *list; |
120 | snd_device_t *dev; | 122 | snd_device_t *dev; |
121 | 123 | ||
122 | snd_assert(card != NULL, return -ENXIO); | 124 | snd_assert(card != NULL, return -ENXIO); |
123 | snd_assert(device_data != NULL, return -ENXIO); | 125 | snd_assert(device_data != NULL, return -ENXIO); |
124 | list_for_each(list, &card->devices) { | 126 | list_for_each(list, &card->devices) { |
@@ -154,8 +156,9 @@ int snd_device_register(snd_card_t *card, void *device_data) | |||
154 | struct list_head *list; | 156 | struct list_head *list; |
155 | snd_device_t *dev; | 157 | snd_device_t *dev; |
156 | int err; | 158 | int err; |
157 | 159 | ||
158 | snd_assert(card != NULL && device_data != NULL, return -ENXIO); | 160 | snd_assert(card != NULL, return -ENXIO); |
161 | snd_assert(device_data != NULL, return -ENXIO); | ||
159 | list_for_each(list, &card->devices) { | 162 | list_for_each(list, &card->devices) { |
160 | dev = snd_device(list); | 163 | dev = snd_device(list); |
161 | if (dev->device_data != device_data) | 164 | if (dev->device_data != device_data) |