aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-01-29 09:13:33 -0500
committerTakashi Iwai <tiwai@suse.de>2014-02-14 02:20:24 -0500
commit9ce5054363c6ec7e38d0c6c39bd116ec4f7d6480 (patch)
tree59373036dbcc458c5016a36af771ed05b0dde7be /sound
parent483eb0627683b840d8f74fc0bb75be9132e76cd2 (diff)
ALSA: Drop __bitwise and typedefs for snd_device attributes
Using __bitwise and typedefs for the attributes of snd_device struct isn't so useful, and rather it worsens the readability. Let's drop them and use the straightforward enum. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/aoa/aoa.h2
-rw-r--r--sound/aoa/core/alsa.c2
-rw-r--r--sound/core/device.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/sound/aoa/aoa.h b/sound/aoa/aoa.h
index e08789484e30..34c668f27798 100644
--- a/sound/aoa/aoa.h
+++ b/sound/aoa/aoa.h
@@ -116,7 +116,7 @@ struct aoa_card {
116 struct snd_card *alsa_card; 116 struct snd_card *alsa_card;
117}; 117};
118 118
119extern int aoa_snd_device_new(snd_device_type_t type, 119extern int aoa_snd_device_new(enum snd_device_type type,
120 void * device_data, struct snd_device_ops * ops); 120 void * device_data, struct snd_device_ops * ops);
121extern struct snd_card *aoa_get_card(void); 121extern struct snd_card *aoa_get_card(void);
122extern int aoa_snd_ctl_add(struct snd_kcontrol* control); 122extern int aoa_snd_ctl_add(struct snd_kcontrol* control);
diff --git a/sound/aoa/core/alsa.c b/sound/aoa/core/alsa.c
index 9913bf222073..4a7e4e6b746f 100644
--- a/sound/aoa/core/alsa.c
+++ b/sound/aoa/core/alsa.c
@@ -59,7 +59,7 @@ void aoa_alsa_cleanup(void)
59 } 59 }
60} 60}
61 61
62int aoa_snd_device_new(snd_device_type_t type, 62int aoa_snd_device_new(enum snd_device_type type,
63 void * device_data, struct snd_device_ops * ops) 63 void * device_data, struct snd_device_ops * ops)
64{ 64{
65 struct snd_card *card = aoa_get_card(); 65 struct snd_card *card = aoa_get_card();
diff --git a/sound/core/device.c b/sound/core/device.c
index ad9869dfa10c..856bfdc79cee 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -41,7 +41,7 @@
41 * 41 *
42 * Return: Zero if successful, or a negative error code on failure. 42 * Return: Zero if successful, or a negative error code on failure.
43 */ 43 */
44int snd_device_new(struct snd_card *card, snd_device_type_t type, 44int snd_device_new(struct snd_card *card, enum snd_device_type type,
45 void *device_data, struct snd_device_ops *ops) 45 void *device_data, struct snd_device_ops *ops)
46{ 46{
47 struct snd_device *dev; 47 struct snd_device *dev;
@@ -223,7 +223,7 @@ int snd_device_disconnect_all(struct snd_card *card)
223 * release all the devices on the card. 223 * release all the devices on the card.
224 * called from init.c 224 * called from init.c
225 */ 225 */
226int snd_device_free_all(struct snd_card *card, snd_device_cmd_t cmd) 226int snd_device_free_all(struct snd_card *card, enum snd_device_cmd cmd)
227{ 227{
228 struct snd_device *dev; 228 struct snd_device *dev;
229 int err; 229 int err;
@@ -231,11 +231,11 @@ int snd_device_free_all(struct snd_card *card, snd_device_cmd_t cmd)
231 231
232 if (snd_BUG_ON(!card)) 232 if (snd_BUG_ON(!card))
233 return -ENXIO; 233 return -ENXIO;
234 range_low = (__force unsigned int)cmd * SNDRV_DEV_TYPE_RANGE_SIZE; 234 range_low = (unsigned int)cmd * SNDRV_DEV_TYPE_RANGE_SIZE;
235 range_high = range_low + SNDRV_DEV_TYPE_RANGE_SIZE - 1; 235 range_high = range_low + SNDRV_DEV_TYPE_RANGE_SIZE - 1;
236 __again: 236 __again:
237 list_for_each_entry(dev, &card->devices, list) { 237 list_for_each_entry(dev, &card->devices, list) {
238 type = (__force unsigned int)dev->type; 238 type = (unsigned int)dev->type;
239 if (type >= range_low && type <= range_high) { 239 if (type >= range_low && type <= range_high) {
240 if ((err = snd_device_free(card, dev->device_data)) < 0) 240 if ((err = snd_device_free(card, dev->device_data)) < 0)
241 return err; 241 return err;