Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ALSA] Remove xxx_t typedefs: SPARC AMD7930

Modules: SPARC AMD7930 driver

Remove xxx_t typedefs from the SPARC AMD7930 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
dcc94db7 af0fbfb5

+65 -65
+65 -65
sound/sparc/amd7930.c
··· 311 311 #define AMR_PP_PPCR2 0xC8 312 312 #define AMR_PP_PPCR3 0xC9 313 313 314 - typedef struct snd_amd7930 { 314 + struct snd_amd7930 { 315 315 spinlock_t lock; 316 316 void __iomem *regs; 317 317 u32 flags; ··· 320 320 321 321 struct amd7930_map map; 322 322 323 - snd_card_t *card; 324 - snd_pcm_t *pcm; 325 - snd_pcm_substream_t *playback_substream; 326 - snd_pcm_substream_t *capture_substream; 323 + struct snd_card *card; 324 + struct snd_pcm *pcm; 325 + struct snd_pcm_substream *playback_substream; 326 + struct snd_pcm_substream *capture_substream; 327 327 328 328 /* Playback/Capture buffer state. */ 329 329 unsigned char *p_orig, *p_cur; ··· 339 339 unsigned int irq; 340 340 unsigned int regs_size; 341 341 struct snd_amd7930 *next; 342 - } amd7930_t; 342 + }; 343 343 344 - static amd7930_t *amd7930_list; 344 + static struct snd_amd7930 *amd7930_list; 345 345 346 346 /* Idle the AMD7930 chip. The amd->lock is not held. */ 347 - static __inline__ void amd7930_idle(amd7930_t *amd) 347 + static __inline__ void amd7930_idle(struct snd_amd7930 *amd) 348 348 { 349 349 unsigned long flags; 350 350 ··· 355 355 } 356 356 357 357 /* Enable chip interrupts. The amd->lock is not held. */ 358 - static __inline__ void amd7930_enable_ints(amd7930_t *amd) 358 + static __inline__ void amd7930_enable_ints(struct snd_amd7930 *amd) 359 359 { 360 360 unsigned long flags; 361 361 ··· 366 366 } 367 367 368 368 /* Disable chip interrupts. The amd->lock is not held. */ 369 - static __inline__ void amd7930_disable_ints(amd7930_t *amd) 369 + static __inline__ void amd7930_disable_ints(struct snd_amd7930 *amd) 370 370 { 371 371 unsigned long flags; 372 372 ··· 379 379 /* Commit amd7930_map settings to the hardware. 380 380 * The amd->lock is held and local interrupts are disabled. 381 381 */ 382 - static void __amd7930_write_map(amd7930_t *amd) 382 + static void __amd7930_write_map(struct snd_amd7930 *amd) 383 383 { 384 384 struct amd7930_map *map = &amd->map; 385 385 ··· 473 473 /* Update amd7930_map settings and program them into the hardware. 474 474 * The amd->lock is held and local interrupts are disabled. 475 475 */ 476 - static void __amd7930_update_map(amd7930_t *amd) 476 + static void __amd7930_update_map(struct snd_amd7930 *amd) 477 477 { 478 478 struct amd7930_map *map = &amd->map; 479 479 int level; ··· 493 493 494 494 static irqreturn_t snd_amd7930_interrupt(int irq, void *dev_id, struct pt_regs *regs) 495 495 { 496 - amd7930_t *amd = dev_id; 496 + struct snd_amd7930 *amd = dev_id; 497 497 unsigned int elapsed; 498 498 u8 ir; 499 499 ··· 534 534 return IRQ_HANDLED; 535 535 } 536 536 537 - static int snd_amd7930_trigger(amd7930_t *amd, unsigned int flag, int cmd) 537 + static int snd_amd7930_trigger(struct snd_amd7930 *amd, unsigned int flag, int cmd) 538 538 { 539 539 unsigned long flags; 540 540 int result = 0; ··· 564 564 return result; 565 565 } 566 566 567 - static int snd_amd7930_playback_trigger(snd_pcm_substream_t * substream, 567 + static int snd_amd7930_playback_trigger(struct snd_pcm_substream *substream, 568 568 int cmd) 569 569 { 570 - amd7930_t *amd = snd_pcm_substream_chip(substream); 570 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 571 571 return snd_amd7930_trigger(amd, AMD7930_FLAG_PLAYBACK, cmd); 572 572 } 573 573 574 - static int snd_amd7930_capture_trigger(snd_pcm_substream_t * substream, 574 + static int snd_amd7930_capture_trigger(struct snd_pcm_substream *substream, 575 575 int cmd) 576 576 { 577 - amd7930_t *amd = snd_pcm_substream_chip(substream); 577 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 578 578 return snd_amd7930_trigger(amd, AMD7930_FLAG_CAPTURE, cmd); 579 579 } 580 580 581 - static int snd_amd7930_playback_prepare(snd_pcm_substream_t * substream) 581 + static int snd_amd7930_playback_prepare(struct snd_pcm_substream *substream) 582 582 { 583 - amd7930_t *amd = snd_pcm_substream_chip(substream); 584 - snd_pcm_runtime_t *runtime = substream->runtime; 583 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 584 + struct snd_pcm_runtime *runtime = substream->runtime; 585 585 unsigned int size = snd_pcm_lib_buffer_bytes(substream); 586 586 unsigned long flags; 587 587 u8 new_mmr1; ··· 610 610 return 0; 611 611 } 612 612 613 - static int snd_amd7930_capture_prepare(snd_pcm_substream_t * substream) 613 + static int snd_amd7930_capture_prepare(struct snd_pcm_substream *substream) 614 614 { 615 - amd7930_t *amd = snd_pcm_substream_chip(substream); 616 - snd_pcm_runtime_t *runtime = substream->runtime; 615 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 616 + struct snd_pcm_runtime *runtime = substream->runtime; 617 617 unsigned int size = snd_pcm_lib_buffer_bytes(substream); 618 618 unsigned long flags; 619 619 u8 new_mmr1; ··· 642 642 return 0; 643 643 } 644 644 645 - static snd_pcm_uframes_t snd_amd7930_playback_pointer(snd_pcm_substream_t * substream) 645 + static snd_pcm_uframes_t snd_amd7930_playback_pointer(struct snd_pcm_substream *substream) 646 646 { 647 - amd7930_t *amd = snd_pcm_substream_chip(substream); 647 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 648 648 size_t ptr; 649 649 650 650 if (!(amd->flags & AMD7930_FLAG_PLAYBACK)) ··· 653 653 return bytes_to_frames(substream->runtime, ptr); 654 654 } 655 655 656 - static snd_pcm_uframes_t snd_amd7930_capture_pointer(snd_pcm_substream_t * substream) 656 + static snd_pcm_uframes_t snd_amd7930_capture_pointer(struct snd_pcm_substream *substream) 657 657 { 658 - amd7930_t *amd = snd_pcm_substream_chip(substream); 658 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 659 659 size_t ptr; 660 660 661 661 if (!(amd->flags & AMD7930_FLAG_CAPTURE)) ··· 666 666 } 667 667 668 668 /* Playback and capture have identical properties. */ 669 - static snd_pcm_hardware_t snd_amd7930_pcm_hw = 669 + static struct snd_pcm_hardware snd_amd7930_pcm_hw = 670 670 { 671 671 .info = (SNDRV_PCM_INFO_MMAP | 672 672 SNDRV_PCM_INFO_MMAP_VALID | ··· 686 686 .periods_max = 1024, 687 687 }; 688 688 689 - static int snd_amd7930_playback_open(snd_pcm_substream_t * substream) 689 + static int snd_amd7930_playback_open(struct snd_pcm_substream *substream) 690 690 { 691 - amd7930_t *amd = snd_pcm_substream_chip(substream); 692 - snd_pcm_runtime_t *runtime = substream->runtime; 691 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 692 + struct snd_pcm_runtime *runtime = substream->runtime; 693 693 694 694 amd->playback_substream = substream; 695 695 runtime->hw = snd_amd7930_pcm_hw; 696 696 return 0; 697 697 } 698 698 699 - static int snd_amd7930_capture_open(snd_pcm_substream_t * substream) 699 + static int snd_amd7930_capture_open(struct snd_pcm_substream *substream) 700 700 { 701 - amd7930_t *amd = snd_pcm_substream_chip(substream); 702 - snd_pcm_runtime_t *runtime = substream->runtime; 701 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 702 + struct snd_pcm_runtime *runtime = substream->runtime; 703 703 704 704 amd->capture_substream = substream; 705 705 runtime->hw = snd_amd7930_pcm_hw; 706 706 return 0; 707 707 } 708 708 709 - static int snd_amd7930_playback_close(snd_pcm_substream_t * substream) 709 + static int snd_amd7930_playback_close(struct snd_pcm_substream *substream) 710 710 { 711 - amd7930_t *amd = snd_pcm_substream_chip(substream); 711 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 712 712 713 713 amd->playback_substream = NULL; 714 714 return 0; 715 715 } 716 716 717 - static int snd_amd7930_capture_close(snd_pcm_substream_t * substream) 717 + static int snd_amd7930_capture_close(struct snd_pcm_substream *substream) 718 718 { 719 - amd7930_t *amd = snd_pcm_substream_chip(substream); 719 + struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); 720 720 721 721 amd->capture_substream = NULL; 722 722 return 0; 723 723 } 724 724 725 - static int snd_amd7930_hw_params(snd_pcm_substream_t * substream, 726 - snd_pcm_hw_params_t * hw_params) 725 + static int snd_amd7930_hw_params(struct snd_pcm_substream *substream, 726 + struct snd_pcm_hw_params *hw_params) 727 727 { 728 728 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 729 729 } 730 730 731 - static int snd_amd7930_hw_free(snd_pcm_substream_t * substream) 731 + static int snd_amd7930_hw_free(struct snd_pcm_substream *substream) 732 732 { 733 733 return snd_pcm_lib_free_pages(substream); 734 734 } 735 735 736 - static snd_pcm_ops_t snd_amd7930_playback_ops = { 736 + static struct snd_pcm_ops snd_amd7930_playback_ops = { 737 737 .open = snd_amd7930_playback_open, 738 738 .close = snd_amd7930_playback_close, 739 739 .ioctl = snd_pcm_lib_ioctl, ··· 744 744 .pointer = snd_amd7930_playback_pointer, 745 745 }; 746 746 747 - static snd_pcm_ops_t snd_amd7930_capture_ops = { 747 + static struct snd_pcm_ops snd_amd7930_capture_ops = { 748 748 .open = snd_amd7930_capture_open, 749 749 .close = snd_amd7930_capture_close, 750 750 .ioctl = snd_pcm_lib_ioctl, ··· 755 755 .pointer = snd_amd7930_capture_pointer, 756 756 }; 757 757 758 - static int __init snd_amd7930_pcm(amd7930_t *amd) 758 + static int __init snd_amd7930_pcm(struct snd_amd7930 *amd) 759 759 { 760 - snd_pcm_t *pcm; 760 + struct snd_pcm *pcm; 761 761 int err; 762 762 763 763 if ((err = snd_pcm_new(amd->card, ··· 787 787 #define VOLUME_CAPTURE 1 788 788 #define VOLUME_PLAYBACK 2 789 789 790 - static int snd_amd7930_info_volume(snd_kcontrol_t *kctl, snd_ctl_elem_info_t *uinfo) 790 + static int snd_amd7930_info_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_info *uinfo) 791 791 { 792 792 int type = kctl->private_value; 793 793 ··· 804 804 return 0; 805 805 } 806 806 807 - static int snd_amd7930_get_volume(snd_kcontrol_t *kctl, snd_ctl_elem_value_t *ucontrol) 807 + static int snd_amd7930_get_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *ucontrol) 808 808 { 809 - amd7930_t *amd = snd_kcontrol_chip(kctl); 809 + struct snd_amd7930 *amd = snd_kcontrol_chip(kctl); 810 810 int type = kctl->private_value; 811 811 int *swval; 812 812 ··· 832 832 return 0; 833 833 } 834 834 835 - static int snd_amd7930_put_volume(snd_kcontrol_t *kctl, snd_ctl_elem_value_t *ucontrol) 835 + static int snd_amd7930_put_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *ucontrol) 836 836 { 837 - amd7930_t *amd = snd_kcontrol_chip(kctl); 837 + struct snd_amd7930 *amd = snd_kcontrol_chip(kctl); 838 838 unsigned long flags; 839 839 int type = kctl->private_value; 840 840 int *swval, change; ··· 870 870 return change; 871 871 } 872 872 873 - static snd_kcontrol_new_t amd7930_controls[] __initdata = { 873 + static struct snd_kcontrol_new amd7930_controls[] __initdata = { 874 874 { 875 875 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 876 876 .name = "Monitor Volume", ··· 900 900 }, 901 901 }; 902 902 903 - static int __init snd_amd7930_mixer(amd7930_t *amd) 903 + static int __init snd_amd7930_mixer(struct snd_amd7930 *amd) 904 904 { 905 - snd_card_t *card; 905 + struct snd_card *card; 906 906 int idx, err; 907 907 908 908 snd_assert(amd != NULL && amd->card != NULL, return -EINVAL); ··· 919 919 return 0; 920 920 } 921 921 922 - static int snd_amd7930_free(amd7930_t *amd) 922 + static int snd_amd7930_free(struct snd_amd7930 *amd) 923 923 { 924 924 amd7930_idle(amd); 925 925 ··· 934 934 return 0; 935 935 } 936 936 937 - static int snd_amd7930_dev_free(snd_device_t *device) 937 + static int snd_amd7930_dev_free(struct snd_device *device) 938 938 { 939 - amd7930_t *amd = device->device_data; 939 + struct snd_amd7930 *amd = device->device_data; 940 940 941 941 return snd_amd7930_free(amd); 942 942 } 943 943 944 - static snd_device_ops_t snd_amd7930_dev_ops = { 944 + static struct snd_device_ops snd_amd7930_dev_ops = { 945 945 .dev_free = snd_amd7930_dev_free, 946 946 }; 947 947 948 - static int __init snd_amd7930_create(snd_card_t *card, 948 + static int __init snd_amd7930_create(struct snd_card *card, 949 949 struct sbus_dev *sdev, 950 950 struct resource *rp, 951 951 unsigned int reg_size, 952 952 struct linux_prom_irqs *irq_prop, 953 953 int dev, 954 - amd7930_t **ramd) 954 + struct snd_amd7930 **ramd) 955 955 { 956 956 unsigned long flags; 957 - amd7930_t *amd; 957 + struct snd_amd7930 *amd; 958 958 int err; 959 959 960 960 *ramd = NULL; ··· 1023 1023 struct linux_prom_registers reg_prop; 1024 1024 struct linux_prom_irqs irq_prop; 1025 1025 struct resource res, *rp; 1026 - snd_card_t *card; 1027 - amd7930_t *amd; 1026 + struct snd_card *card; 1027 + struct snd_amd7930 *amd; 1028 1028 int err; 1029 1029 1030 1030 if (dev >= SNDRV_CARDS) ··· 1123 1123 1124 1124 static void __exit amd7930_exit(void) 1125 1125 { 1126 - amd7930_t *p = amd7930_list; 1126 + struct snd_amd7930 *p = amd7930_list; 1127 1127 1128 1128 while (p != NULL) { 1129 - amd7930_t *next = p->next; 1129 + struct snd_amd7930 *next = p->next; 1130 1130 1131 1131 snd_card_free(p->card); 1132 1132