diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-08-06 08:50:01 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-08-06 10:42:40 -0400 |
commit | 68a9edd18c62953db476142c06cb65326aeb0b31 (patch) | |
tree | 4cef079d12b91458b7124c372d7db2034db763d1 /sound/oss | |
parent | 80e7bbac48c440c32cc00870bf91ecf27a6de443 (diff) |
sound: oss: Remove typedefs wanc_info and wavnc_port_info
The Linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedefs for wanc_info and
wavnc_port_info.
A simplified version of the Coccinelle semantic patch that finds the case is:
@tn@
identifier i;
type td;
@@
-typedef
struct i { ... }
-td
;
@@
type tn.td;
identifier tn.i;
@@
-td
+ struct i
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/oss')
-rw-r--r-- | sound/oss/waveartist.c | 157 |
1 files changed, 89 insertions, 68 deletions
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c index 672af8b56542..b36ea47527e8 100644 --- a/sound/oss/waveartist.c +++ b/sound/oss/waveartist.c | |||
@@ -92,7 +92,7 @@ static unsigned short levels[SOUND_MIXER_NRDEVICES] = { | |||
92 | 0x0000 /* Monitor */ | 92 | 0x0000 /* Monitor */ |
93 | }; | 93 | }; |
94 | 94 | ||
95 | typedef struct { | 95 | struct wavnc_info { |
96 | struct address_info hw; /* hardware */ | 96 | struct address_info hw; /* hardware */ |
97 | char *chip_name; | 97 | char *chip_name; |
98 | 98 | ||
@@ -119,7 +119,7 @@ typedef struct { | |||
119 | unsigned int line_mute_state :1;/* set by ioctl or autoselect */ | 119 | unsigned int line_mute_state :1;/* set by ioctl or autoselect */ |
120 | unsigned int use_slider :1;/* use slider setting for o/p vol */ | 120 | unsigned int use_slider :1;/* use slider setting for o/p vol */ |
121 | #endif | 121 | #endif |
122 | } wavnc_info; | 122 | }; |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * This is the implementation specific mixer information. | 125 | * This is the implementation specific mixer information. |
@@ -129,29 +129,30 @@ struct waveartist_mixer_info { | |||
129 | unsigned int recording_devs; /* Recordable devies */ | 129 | unsigned int recording_devs; /* Recordable devies */ |
130 | unsigned int stereo_devs; /* Stereo devices */ | 130 | unsigned int stereo_devs; /* Stereo devices */ |
131 | 131 | ||
132 | unsigned int (*select_input)(wavnc_info *, unsigned int, | 132 | unsigned int (*select_input)(struct wavnc_info *, unsigned int, |
133 | unsigned char *, unsigned char *); | 133 | unsigned char *, unsigned char *); |
134 | int (*decode_mixer)(wavnc_info *, int, | 134 | int (*decode_mixer)(struct wavnc_info *, int, |
135 | unsigned char, unsigned char); | 135 | unsigned char, unsigned char); |
136 | int (*get_mixer)(wavnc_info *, int); | 136 | int (*get_mixer)(struct wavnc_info *, int); |
137 | }; | 137 | }; |
138 | 138 | ||
139 | typedef struct wavnc_port_info { | 139 | struct wavnc_port_info { |
140 | int open_mode; | 140 | int open_mode; |
141 | int speed; | 141 | int speed; |
142 | int channels; | 142 | int channels; |
143 | int audio_format; | 143 | int audio_format; |
144 | } wavnc_port_info; | 144 | }; |
145 | 145 | ||
146 | static int nr_waveartist_devs; | 146 | static int nr_waveartist_devs; |
147 | static wavnc_info adev_info[MAX_AUDIO_DEV]; | 147 | static struct wavnc_info adev_info[MAX_AUDIO_DEV]; |
148 | static DEFINE_SPINLOCK(waveartist_lock); | 148 | static DEFINE_SPINLOCK(waveartist_lock); |
149 | 149 | ||
150 | #ifndef CONFIG_ARCH_NETWINDER | 150 | #ifndef CONFIG_ARCH_NETWINDER |
151 | #define machine_is_netwinder() 0 | 151 | #define machine_is_netwinder() 0 |
152 | #else | 152 | #else |
153 | static struct timer_list vnc_timer; | 153 | static struct timer_list vnc_timer; |
154 | static void vnc_configure_mixer(wavnc_info *devc, unsigned int input_mask); | 154 | static void vnc_configure_mixer(struct wavnc_info *devc, |
155 | unsigned int input_mask); | ||
155 | static int vnc_private_ioctl(int dev, unsigned int cmd, int __user *arg); | 156 | static int vnc_private_ioctl(int dev, unsigned int cmd, int __user *arg); |
156 | static void vnc_slider_tick(unsigned long data); | 157 | static void vnc_slider_tick(unsigned long data); |
157 | #endif | 158 | #endif |
@@ -169,7 +170,7 @@ waveartist_set_ctlr(struct address_info *hw, unsigned char clear, unsigned char | |||
169 | /* Toggle IRQ acknowledge line | 170 | /* Toggle IRQ acknowledge line |
170 | */ | 171 | */ |
171 | static inline void | 172 | static inline void |
172 | waveartist_iack(wavnc_info *devc) | 173 | waveartist_iack(struct wavnc_info *devc) |
173 | { | 174 | { |
174 | unsigned int ctlr_port = devc->hw.io_base + CTLR; | 175 | unsigned int ctlr_port = devc->hw.io_base + CTLR; |
175 | int old_ctlr; | 176 | int old_ctlr; |
@@ -188,7 +189,7 @@ waveartist_sleep(int timeout_ms) | |||
188 | } | 189 | } |
189 | 190 | ||
190 | static int | 191 | static int |
191 | waveartist_reset(wavnc_info *devc) | 192 | waveartist_reset(struct wavnc_info *devc) |
192 | { | 193 | { |
193 | struct address_info *hw = &devc->hw; | 194 | struct address_info *hw = &devc->hw; |
194 | unsigned int timeout, res = -1; | 195 | unsigned int timeout, res = -1; |
@@ -223,7 +224,7 @@ waveartist_reset(wavnc_info *devc) | |||
223 | * and can send or receive multiple words. | 224 | * and can send or receive multiple words. |
224 | */ | 225 | */ |
225 | static int | 226 | static int |
226 | waveartist_cmd(wavnc_info *devc, | 227 | waveartist_cmd(struct wavnc_info *devc, |
227 | int nr_cmd, unsigned int *cmd, | 228 | int nr_cmd, unsigned int *cmd, |
228 | int nr_resp, unsigned int *resp) | 229 | int nr_resp, unsigned int *resp) |
229 | { | 230 | { |
@@ -299,7 +300,7 @@ waveartist_cmd(wavnc_info *devc, | |||
299 | * Send one command word | 300 | * Send one command word |
300 | */ | 301 | */ |
301 | static inline int | 302 | static inline int |
302 | waveartist_cmd1(wavnc_info *devc, unsigned int cmd) | 303 | waveartist_cmd1(struct wavnc_info *devc, unsigned int cmd) |
303 | { | 304 | { |
304 | return waveartist_cmd(devc, 1, &cmd, 0, NULL); | 305 | return waveartist_cmd(devc, 1, &cmd, 0, NULL); |
305 | } | 306 | } |
@@ -308,7 +309,7 @@ waveartist_cmd1(wavnc_info *devc, unsigned int cmd) | |||
308 | * Send one command, receive one word | 309 | * Send one command, receive one word |
309 | */ | 310 | */ |
310 | static inline unsigned int | 311 | static inline unsigned int |
311 | waveartist_cmd1_r(wavnc_info *devc, unsigned int cmd) | 312 | waveartist_cmd1_r(struct wavnc_info *devc, unsigned int cmd) |
312 | { | 313 | { |
313 | unsigned int ret; | 314 | unsigned int ret; |
314 | 315 | ||
@@ -322,7 +323,7 @@ waveartist_cmd1_r(wavnc_info *devc, unsigned int cmd) | |||
322 | * word (and throw it away) | 323 | * word (and throw it away) |
323 | */ | 324 | */ |
324 | static inline int | 325 | static inline int |
325 | waveartist_cmd2(wavnc_info *devc, unsigned int cmd, unsigned int arg) | 326 | waveartist_cmd2(struct wavnc_info *devc, unsigned int cmd, unsigned int arg) |
326 | { | 327 | { |
327 | unsigned int vals[2]; | 328 | unsigned int vals[2]; |
328 | 329 | ||
@@ -336,7 +337,7 @@ waveartist_cmd2(wavnc_info *devc, unsigned int cmd, unsigned int arg) | |||
336 | * Send a triple command | 337 | * Send a triple command |
337 | */ | 338 | */ |
338 | static inline int | 339 | static inline int |
339 | waveartist_cmd3(wavnc_info *devc, unsigned int cmd, | 340 | waveartist_cmd3(struct wavnc_info *devc, unsigned int cmd, |
340 | unsigned int arg1, unsigned int arg2) | 341 | unsigned int arg1, unsigned int arg2) |
341 | { | 342 | { |
342 | unsigned int vals[3]; | 343 | unsigned int vals[3]; |
@@ -349,7 +350,7 @@ waveartist_cmd3(wavnc_info *devc, unsigned int cmd, | |||
349 | } | 350 | } |
350 | 351 | ||
351 | static int | 352 | static int |
352 | waveartist_getrev(wavnc_info *devc, char *rev) | 353 | waveartist_getrev(struct wavnc_info *devc, char *rev) |
353 | { | 354 | { |
354 | unsigned int temp[2]; | 355 | unsigned int temp[2]; |
355 | unsigned int cmd = WACMD_GETREV; | 356 | unsigned int cmd = WACMD_GETREV; |
@@ -371,15 +372,15 @@ static void waveartist_trigger(int dev, int state); | |||
371 | static int | 372 | static int |
372 | waveartist_open(int dev, int mode) | 373 | waveartist_open(int dev, int mode) |
373 | { | 374 | { |
374 | wavnc_info *devc; | 375 | struct wavnc_info *devc; |
375 | wavnc_port_info *portc; | 376 | struct wavnc_port_info *portc; |
376 | unsigned long flags; | 377 | unsigned long flags; |
377 | 378 | ||
378 | if (dev < 0 || dev >= num_audiodevs) | 379 | if (dev < 0 || dev >= num_audiodevs) |
379 | return -ENXIO; | 380 | return -ENXIO; |
380 | 381 | ||
381 | devc = (wavnc_info *) audio_devs[dev]->devc; | 382 | devc = (struct wavnc_info *) audio_devs[dev]->devc; |
382 | portc = (wavnc_port_info *) audio_devs[dev]->portc; | 383 | portc = (struct wavnc_port_info *) audio_devs[dev]->portc; |
383 | 384 | ||
384 | spin_lock_irqsave(&waveartist_lock, flags); | 385 | spin_lock_irqsave(&waveartist_lock, flags); |
385 | if (portc->open_mode || (devc->open_mode & mode)) { | 386 | if (portc->open_mode || (devc->open_mode & mode)) { |
@@ -404,8 +405,10 @@ waveartist_open(int dev, int mode) | |||
404 | static void | 405 | static void |
405 | waveartist_close(int dev) | 406 | waveartist_close(int dev) |
406 | { | 407 | { |
407 | wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; | 408 | struct wavnc_info *devc = (struct wavnc_info *) |
408 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 409 | audio_devs[dev]->devc; |
410 | struct wavnc_port_info *portc = (struct wavnc_port_info *) | ||
411 | audio_devs[dev]->portc; | ||
409 | unsigned long flags; | 412 | unsigned long flags; |
410 | 413 | ||
411 | spin_lock_irqsave(&waveartist_lock, flags); | 414 | spin_lock_irqsave(&waveartist_lock, flags); |
@@ -422,8 +425,10 @@ waveartist_close(int dev) | |||
422 | static void | 425 | static void |
423 | waveartist_output_block(int dev, unsigned long buf, int __count, int intrflag) | 426 | waveartist_output_block(int dev, unsigned long buf, int __count, int intrflag) |
424 | { | 427 | { |
425 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 428 | struct wavnc_port_info *portc = (struct wavnc_port_info *) |
426 | wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; | 429 | audio_devs[dev]->portc; |
430 | struct wavnc_info *devc = (struct wavnc_info *) | ||
431 | audio_devs[dev]->devc; | ||
427 | unsigned long flags; | 432 | unsigned long flags; |
428 | unsigned int count = __count; | 433 | unsigned int count = __count; |
429 | 434 | ||
@@ -467,8 +472,10 @@ waveartist_output_block(int dev, unsigned long buf, int __count, int intrflag) | |||
467 | static void | 472 | static void |
468 | waveartist_start_input(int dev, unsigned long buf, int __count, int intrflag) | 473 | waveartist_start_input(int dev, unsigned long buf, int __count, int intrflag) |
469 | { | 474 | { |
470 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 475 | struct wavnc_port_info *portc = (struct wavnc_port_info *) |
471 | wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; | 476 | audio_devs[dev]->portc; |
477 | struct wavnc_info *devc = (struct wavnc_info *) | ||
478 | audio_devs[dev]->devc; | ||
472 | unsigned long flags; | 479 | unsigned long flags; |
473 | unsigned int count = __count; | 480 | unsigned int count = __count; |
474 | 481 | ||
@@ -514,7 +521,7 @@ waveartist_ioctl(int dev, unsigned int cmd, void __user * arg) | |||
514 | } | 521 | } |
515 | 522 | ||
516 | static unsigned int | 523 | static unsigned int |
517 | waveartist_get_speed(wavnc_port_info *portc) | 524 | waveartist_get_speed(struct wavnc_port_info *portc) |
518 | { | 525 | { |
519 | unsigned int speed; | 526 | unsigned int speed; |
520 | 527 | ||
@@ -542,7 +549,7 @@ waveartist_get_speed(wavnc_port_info *portc) | |||
542 | } | 549 | } |
543 | 550 | ||
544 | static unsigned int | 551 | static unsigned int |
545 | waveartist_get_bits(wavnc_port_info *portc) | 552 | waveartist_get_bits(struct wavnc_port_info *portc) |
546 | { | 553 | { |
547 | unsigned int bits; | 554 | unsigned int bits; |
548 | 555 | ||
@@ -560,8 +567,10 @@ static int | |||
560 | waveartist_prepare_for_input(int dev, int bsize, int bcount) | 567 | waveartist_prepare_for_input(int dev, int bsize, int bcount) |
561 | { | 568 | { |
562 | unsigned long flags; | 569 | unsigned long flags; |
563 | wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; | 570 | struct wavnc_info *devc = (struct wavnc_info *) |
564 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 571 | audio_devs[dev]->devc; |
572 | struct wavnc_port_info *portc = (struct wavnc_port_info *) | ||
573 | audio_devs[dev]->portc; | ||
565 | unsigned int speed, bits; | 574 | unsigned int speed, bits; |
566 | 575 | ||
567 | if (devc->audio_mode) | 576 | if (devc->audio_mode) |
@@ -615,8 +624,10 @@ static int | |||
615 | waveartist_prepare_for_output(int dev, int bsize, int bcount) | 624 | waveartist_prepare_for_output(int dev, int bsize, int bcount) |
616 | { | 625 | { |
617 | unsigned long flags; | 626 | unsigned long flags; |
618 | wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; | 627 | struct wavnc_info *devc = (struct wavnc_info *) |
619 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 628 | audio_devs[dev]->devc; |
629 | struct wavnc_port_info *portc = (struct wavnc_port_info *) | ||
630 | audio_devs[dev]->portc; | ||
620 | unsigned int speed, bits; | 631 | unsigned int speed, bits; |
621 | 632 | ||
622 | /* | 633 | /* |
@@ -660,8 +671,9 @@ waveartist_prepare_for_output(int dev, int bsize, int bcount) | |||
660 | static void | 671 | static void |
661 | waveartist_halt(int dev) | 672 | waveartist_halt(int dev) |
662 | { | 673 | { |
663 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 674 | struct wavnc_port_info *portc = (struct wavnc_port_info *) |
664 | wavnc_info *devc; | 675 | audio_devs[dev]->portc; |
676 | struct wavnc_info *devc; | ||
665 | 677 | ||
666 | if (portc->open_mode & OPEN_WRITE) | 678 | if (portc->open_mode & OPEN_WRITE) |
667 | waveartist_halt_output(dev); | 679 | waveartist_halt_output(dev); |
@@ -669,14 +681,15 @@ waveartist_halt(int dev) | |||
669 | if (portc->open_mode & OPEN_READ) | 681 | if (portc->open_mode & OPEN_READ) |
670 | waveartist_halt_input(dev); | 682 | waveartist_halt_input(dev); |
671 | 683 | ||
672 | devc = (wavnc_info *) audio_devs[dev]->devc; | 684 | devc = (struct wavnc_info *) audio_devs[dev]->devc; |
673 | devc->audio_mode = 0; | 685 | devc->audio_mode = 0; |
674 | } | 686 | } |
675 | 687 | ||
676 | static void | 688 | static void |
677 | waveartist_halt_input(int dev) | 689 | waveartist_halt_input(int dev) |
678 | { | 690 | { |
679 | wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; | 691 | struct wavnc_info *devc = (struct wavnc_info *) |
692 | audio_devs[dev]->devc; | ||
680 | unsigned long flags; | 693 | unsigned long flags; |
681 | 694 | ||
682 | spin_lock_irqsave(&waveartist_lock, flags); | 695 | spin_lock_irqsave(&waveartist_lock, flags); |
@@ -703,7 +716,8 @@ waveartist_halt_input(int dev) | |||
703 | static void | 716 | static void |
704 | waveartist_halt_output(int dev) | 717 | waveartist_halt_output(int dev) |
705 | { | 718 | { |
706 | wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; | 719 | struct wavnc_info *devc = (struct wavnc_info *) |
720 | audio_devs[dev]->devc; | ||
707 | unsigned long flags; | 721 | unsigned long flags; |
708 | 722 | ||
709 | spin_lock_irqsave(&waveartist_lock, flags); | 723 | spin_lock_irqsave(&waveartist_lock, flags); |
@@ -727,8 +741,10 @@ waveartist_halt_output(int dev) | |||
727 | static void | 741 | static void |
728 | waveartist_trigger(int dev, int state) | 742 | waveartist_trigger(int dev, int state) |
729 | { | 743 | { |
730 | wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; | 744 | struct wavnc_info *devc = (struct wavnc_info *) |
731 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 745 | audio_devs[dev]->devc; |
746 | struct wavnc_port_info *portc = (struct wavnc_port_info *) | ||
747 | audio_devs[dev]->portc; | ||
732 | unsigned long flags; | 748 | unsigned long flags; |
733 | 749 | ||
734 | if (debug_flg & DEBUG_TRIGGER) { | 750 | if (debug_flg & DEBUG_TRIGGER) { |
@@ -764,7 +780,8 @@ waveartist_trigger(int dev, int state) | |||
764 | static int | 780 | static int |
765 | waveartist_set_speed(int dev, int arg) | 781 | waveartist_set_speed(int dev, int arg) |
766 | { | 782 | { |
767 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 783 | struct wavnc_port_info *portc = (struct wavnc_port_info *) |
784 | audio_devs[dev]->portc; | ||
768 | 785 | ||
769 | if (arg <= 0) | 786 | if (arg <= 0) |
770 | return portc->speed; | 787 | return portc->speed; |
@@ -782,7 +799,8 @@ waveartist_set_speed(int dev, int arg) | |||
782 | static short | 799 | static short |
783 | waveartist_set_channels(int dev, short arg) | 800 | waveartist_set_channels(int dev, short arg) |
784 | { | 801 | { |
785 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 802 | struct wavnc_port_info *portc = (struct wavnc_port_info *) |
803 | audio_devs[dev]->portc; | ||
786 | 804 | ||
787 | if (arg != 1 && arg != 2) | 805 | if (arg != 1 && arg != 2) |
788 | return portc->channels; | 806 | return portc->channels; |
@@ -794,7 +812,8 @@ waveartist_set_channels(int dev, short arg) | |||
794 | static unsigned int | 812 | static unsigned int |
795 | waveartist_set_bits(int dev, unsigned int arg) | 813 | waveartist_set_bits(int dev, unsigned int arg) |
796 | { | 814 | { |
797 | wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; | 815 | struct wavnc_port_info *portc = (struct wavnc_port_info *) |
816 | audio_devs[dev]->portc; | ||
798 | 817 | ||
799 | if (arg == 0) | 818 | if (arg == 0) |
800 | return portc->audio_format; | 819 | return portc->audio_format; |
@@ -829,7 +848,7 @@ static struct audio_driver waveartist_audio_driver = { | |||
829 | static irqreturn_t | 848 | static irqreturn_t |
830 | waveartist_intr(int irq, void *dev_id) | 849 | waveartist_intr(int irq, void *dev_id) |
831 | { | 850 | { |
832 | wavnc_info *devc = dev_id; | 851 | struct wavnc_info *devc = dev_id; |
833 | int irqstatus, status; | 852 | int irqstatus, status; |
834 | 853 | ||
835 | spin_lock(&waveartist_lock); | 854 | spin_lock(&waveartist_lock); |
@@ -912,7 +931,7 @@ static const struct mix_ent mix_devs[SOUND_MIXER_NRDEVICES] = { | |||
912 | }; | 931 | }; |
913 | 932 | ||
914 | static void | 933 | static void |
915 | waveartist_mixer_update(wavnc_info *devc, int whichDev) | 934 | waveartist_mixer_update(struct wavnc_info *devc, int whichDev) |
916 | { | 935 | { |
917 | unsigned int lev_left, lev_right; | 936 | unsigned int lev_left, lev_right; |
918 | 937 | ||
@@ -973,7 +992,8 @@ waveartist_mixer_update(wavnc_info *devc, int whichDev) | |||
973 | * relevant *_select_input function has done that for us. | 992 | * relevant *_select_input function has done that for us. |
974 | */ | 993 | */ |
975 | static void | 994 | static void |
976 | waveartist_set_adc_mux(wavnc_info *devc, char left_dev, char right_dev) | 995 | waveartist_set_adc_mux(struct wavnc_info *devc, char left_dev, |
996 | char right_dev) | ||
977 | { | 997 | { |
978 | unsigned int reg_08, reg_09; | 998 | unsigned int reg_08, reg_09; |
979 | 999 | ||
@@ -996,7 +1016,7 @@ waveartist_set_adc_mux(wavnc_info *devc, char left_dev, char right_dev) | |||
996 | * SOUND_MASK_MIC Mic Microphone | 1016 | * SOUND_MASK_MIC Mic Microphone |
997 | */ | 1017 | */ |
998 | static unsigned int | 1018 | static unsigned int |
999 | waveartist_select_input(wavnc_info *devc, unsigned int recmask, | 1019 | waveartist_select_input(struct wavnc_info *devc, unsigned int recmask, |
1000 | unsigned char *dev_l, unsigned char *dev_r) | 1020 | unsigned char *dev_l, unsigned char *dev_r) |
1001 | { | 1021 | { |
1002 | unsigned int recdev = ADC_MUX_NONE; | 1022 | unsigned int recdev = ADC_MUX_NONE; |
@@ -1024,7 +1044,8 @@ waveartist_select_input(wavnc_info *devc, unsigned int recmask, | |||
1024 | } | 1044 | } |
1025 | 1045 | ||
1026 | static int | 1046 | static int |
1027 | waveartist_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l, | 1047 | waveartist_decode_mixer(struct wavnc_info *devc, int dev, |
1048 | unsigned char lev_l, | ||
1028 | unsigned char lev_r) | 1049 | unsigned char lev_r) |
1029 | { | 1050 | { |
1030 | switch (dev) { | 1051 | switch (dev) { |
@@ -1050,7 +1071,7 @@ waveartist_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l, | |||
1050 | return dev; | 1071 | return dev; |
1051 | } | 1072 | } |
1052 | 1073 | ||
1053 | static int waveartist_get_mixer(wavnc_info *devc, int dev) | 1074 | static int waveartist_get_mixer(struct wavnc_info *devc, int dev) |
1054 | { | 1075 | { |
1055 | return devc->levels[dev]; | 1076 | return devc->levels[dev]; |
1056 | } | 1077 | } |
@@ -1068,7 +1089,7 @@ static const struct waveartist_mixer_info waveartist_mixer = { | |||
1068 | }; | 1089 | }; |
1069 | 1090 | ||
1070 | static void | 1091 | static void |
1071 | waveartist_set_recmask(wavnc_info *devc, unsigned int recmask) | 1092 | waveartist_set_recmask(struct wavnc_info *devc, unsigned int recmask) |
1072 | { | 1093 | { |
1073 | unsigned char dev_l, dev_r; | 1094 | unsigned char dev_l, dev_r; |
1074 | 1095 | ||
@@ -1092,7 +1113,7 @@ waveartist_set_recmask(wavnc_info *devc, unsigned int recmask) | |||
1092 | } | 1113 | } |
1093 | 1114 | ||
1094 | static int | 1115 | static int |
1095 | waveartist_set_mixer(wavnc_info *devc, int dev, unsigned int level) | 1116 | waveartist_set_mixer(struct wavnc_info *devc, int dev, unsigned int level) |
1096 | { | 1117 | { |
1097 | unsigned int lev_left = level & 0x00ff; | 1118 | unsigned int lev_left = level & 0x00ff; |
1098 | unsigned int lev_right = (level & 0xff00) >> 8; | 1119 | unsigned int lev_right = (level & 0xff00) >> 8; |
@@ -1120,7 +1141,7 @@ waveartist_set_mixer(wavnc_info *devc, int dev, unsigned int level) | |||
1120 | static int | 1141 | static int |
1121 | waveartist_mixer_ioctl(int dev, unsigned int cmd, void __user * arg) | 1142 | waveartist_mixer_ioctl(int dev, unsigned int cmd, void __user * arg) |
1122 | { | 1143 | { |
1123 | wavnc_info *devc = (wavnc_info *)audio_devs[dev]->devc; | 1144 | struct wavnc_info *devc = (struct wavnc_info *)audio_devs[dev]->devc; |
1124 | int ret = 0, val, nr; | 1145 | int ret = 0, val, nr; |
1125 | 1146 | ||
1126 | /* | 1147 | /* |
@@ -1204,7 +1225,7 @@ static struct mixer_operations waveartist_mixer_operations = | |||
1204 | }; | 1225 | }; |
1205 | 1226 | ||
1206 | static void | 1227 | static void |
1207 | waveartist_mixer_reset(wavnc_info *devc) | 1228 | waveartist_mixer_reset(struct wavnc_info *devc) |
1208 | { | 1229 | { |
1209 | int i; | 1230 | int i; |
1210 | 1231 | ||
@@ -1241,9 +1262,9 @@ waveartist_mixer_reset(wavnc_info *devc) | |||
1241 | waveartist_mixer_update(devc, i); | 1262 | waveartist_mixer_update(devc, i); |
1242 | } | 1263 | } |
1243 | 1264 | ||
1244 | static int __init waveartist_init(wavnc_info *devc) | 1265 | static int __init waveartist_init(struct wavnc_info *devc) |
1245 | { | 1266 | { |
1246 | wavnc_port_info *portc; | 1267 | struct wavnc_port_info *portc; |
1247 | char rev[3], dev_name[64]; | 1268 | char rev[3], dev_name[64]; |
1248 | int my_dev; | 1269 | int my_dev; |
1249 | 1270 | ||
@@ -1261,7 +1282,7 @@ static int __init waveartist_init(wavnc_info *devc) | |||
1261 | conf_printf2(dev_name, devc->hw.io_base, devc->hw.irq, | 1282 | conf_printf2(dev_name, devc->hw.io_base, devc->hw.irq, |
1262 | devc->hw.dma, devc->hw.dma2); | 1283 | devc->hw.dma, devc->hw.dma2); |
1263 | 1284 | ||
1264 | portc = kzalloc(sizeof(wavnc_port_info), GFP_KERNEL); | 1285 | portc = kzalloc(sizeof(struct wavnc_port_info), GFP_KERNEL); |
1265 | if (portc == NULL) | 1286 | if (portc == NULL) |
1266 | goto nomem; | 1287 | goto nomem; |
1267 | 1288 | ||
@@ -1330,7 +1351,7 @@ nomem: | |||
1330 | 1351 | ||
1331 | static int __init probe_waveartist(struct address_info *hw_config) | 1352 | static int __init probe_waveartist(struct address_info *hw_config) |
1332 | { | 1353 | { |
1333 | wavnc_info *devc = &adev_info[nr_waveartist_devs]; | 1354 | struct wavnc_info *devc = &adev_info[nr_waveartist_devs]; |
1334 | 1355 | ||
1335 | if (nr_waveartist_devs >= MAX_AUDIO_DEV) { | 1356 | if (nr_waveartist_devs >= MAX_AUDIO_DEV) { |
1336 | printk(KERN_WARNING "waveartist: too many audio devices\n"); | 1357 | printk(KERN_WARNING "waveartist: too many audio devices\n"); |
@@ -1367,7 +1388,7 @@ static int __init probe_waveartist(struct address_info *hw_config) | |||
1367 | static void __init | 1388 | static void __init |
1368 | attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *mix) | 1389 | attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *mix) |
1369 | { | 1390 | { |
1370 | wavnc_info *devc = &adev_info[nr_waveartist_devs]; | 1391 | struct wavnc_info *devc = &adev_info[nr_waveartist_devs]; |
1371 | 1392 | ||
1372 | /* | 1393 | /* |
1373 | * NOTE! If irq < 0, there is another driver which has allocated the | 1394 | * NOTE! If irq < 0, there is another driver which has allocated the |
@@ -1410,7 +1431,7 @@ attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *m | |||
1410 | 1431 | ||
1411 | static void __exit unload_waveartist(struct address_info *hw) | 1432 | static void __exit unload_waveartist(struct address_info *hw) |
1412 | { | 1433 | { |
1413 | wavnc_info *devc = NULL; | 1434 | struct wavnc_info *devc = NULL; |
1414 | int i; | 1435 | int i; |
1415 | 1436 | ||
1416 | for (i = 0; i < nr_waveartist_devs; i++) | 1437 | for (i = 0; i < nr_waveartist_devs; i++) |
@@ -1478,7 +1499,7 @@ static void __exit unload_waveartist(struct address_info *hw) | |||
1478 | #define VNC_DISABLE_AUTOSWITCH 0x80 | 1499 | #define VNC_DISABLE_AUTOSWITCH 0x80 |
1479 | 1500 | ||
1480 | static inline void | 1501 | static inline void |
1481 | vnc_mute_spkr(wavnc_info *devc) | 1502 | vnc_mute_spkr(struct wavnc_info *devc) |
1482 | { | 1503 | { |
1483 | unsigned long flags; | 1504 | unsigned long flags; |
1484 | 1505 | ||
@@ -1488,7 +1509,7 @@ vnc_mute_spkr(wavnc_info *devc) | |||
1488 | } | 1509 | } |
1489 | 1510 | ||
1490 | static void | 1511 | static void |
1491 | vnc_mute_lout(wavnc_info *devc) | 1512 | vnc_mute_lout(struct wavnc_info *devc) |
1492 | { | 1513 | { |
1493 | unsigned int left, right; | 1514 | unsigned int left, right; |
1494 | 1515 | ||
@@ -1507,7 +1528,7 @@ vnc_mute_lout(wavnc_info *devc) | |||
1507 | } | 1528 | } |
1508 | 1529 | ||
1509 | static int | 1530 | static int |
1510 | vnc_volume_slider(wavnc_info *devc) | 1531 | vnc_volume_slider(struct wavnc_info *devc) |
1511 | { | 1532 | { |
1512 | static signed int old_slider_volume; | 1533 | static signed int old_slider_volume; |
1513 | unsigned long flags; | 1534 | unsigned long flags; |
@@ -1567,7 +1588,7 @@ vnc_volume_slider(wavnc_info *devc) | |||
1567 | * SOUND_MASK_MIC Right Mic Builtin microphone | 1588 | * SOUND_MASK_MIC Right Mic Builtin microphone |
1568 | */ | 1589 | */ |
1569 | static unsigned int | 1590 | static unsigned int |
1570 | netwinder_select_input(wavnc_info *devc, unsigned int recmask, | 1591 | netwinder_select_input(struct wavnc_info *devc, unsigned int recmask, |
1571 | unsigned char *dev_l, unsigned char *dev_r) | 1592 | unsigned char *dev_l, unsigned char *dev_r) |
1572 | { | 1593 | { |
1573 | unsigned int recdev_l = ADC_MUX_NONE, recdev_r = ADC_MUX_NONE; | 1594 | unsigned int recdev_l = ADC_MUX_NONE, recdev_r = ADC_MUX_NONE; |
@@ -1604,7 +1625,7 @@ netwinder_select_input(wavnc_info *devc, unsigned int recmask, | |||
1604 | } | 1625 | } |
1605 | 1626 | ||
1606 | static int | 1627 | static int |
1607 | netwinder_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l, | 1628 | netwinder_decode_mixer(struct wavnc_info *devc, int dev, unsigned char lev_l, |
1608 | unsigned char lev_r) | 1629 | unsigned char lev_r) |
1609 | { | 1630 | { |
1610 | switch (dev) { | 1631 | switch (dev) { |
@@ -1643,7 +1664,7 @@ netwinder_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l, | |||
1643 | return dev; | 1664 | return dev; |
1644 | } | 1665 | } |
1645 | 1666 | ||
1646 | static int netwinder_get_mixer(wavnc_info *devc, int dev) | 1667 | static int netwinder_get_mixer(struct wavnc_info *devc, int dev) |
1647 | { | 1668 | { |
1648 | int levels; | 1669 | int levels; |
1649 | 1670 | ||
@@ -1703,7 +1724,7 @@ static const struct waveartist_mixer_info netwinder_mixer = { | |||
1703 | }; | 1724 | }; |
1704 | 1725 | ||
1705 | static void | 1726 | static void |
1706 | vnc_configure_mixer(wavnc_info *devc, unsigned int recmask) | 1727 | vnc_configure_mixer(struct wavnc_info *devc, unsigned int recmask) |
1707 | { | 1728 | { |
1708 | if (!devc->no_autoselect) { | 1729 | if (!devc->no_autoselect) { |
1709 | if (devc->handset_detect) { | 1730 | if (devc->handset_detect) { |
@@ -1729,7 +1750,7 @@ vnc_configure_mixer(wavnc_info *devc, unsigned int recmask) | |||
1729 | } | 1750 | } |
1730 | 1751 | ||
1731 | static int | 1752 | static int |
1732 | vnc_slider(wavnc_info *devc) | 1753 | vnc_slider(struct wavnc_info *devc) |
1733 | { | 1754 | { |
1734 | signed int slider_volume; | 1755 | signed int slider_volume; |
1735 | unsigned int temp, old_hs, old_td; | 1756 | unsigned int temp, old_hs, old_td; |
@@ -1795,7 +1816,7 @@ vnc_slider_tick(unsigned long data) | |||
1795 | static int | 1816 | static int |
1796 | vnc_private_ioctl(int dev, unsigned int cmd, int __user * arg) | 1817 | vnc_private_ioctl(int dev, unsigned int cmd, int __user * arg) |
1797 | { | 1818 | { |
1798 | wavnc_info *devc = (wavnc_info *)audio_devs[dev]->devc; | 1819 | struct wavnc_info *devc = (struct wavnc_info *)audio_devs[dev]->devc; |
1799 | int val; | 1820 | int val; |
1800 | 1821 | ||
1801 | switch (cmd) { | 1822 | switch (cmd) { |