Commit a6e8509f2172a6ac764a82763fce64836a108a14
Committed by
Takashi Iwai
1 parent
5cd2ad81f9
ALSA: intel8x0m: add 'm' as "suffix" to static functions
Adding an 'm' will distinguish them from identical names in intel8x0.c. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Showing 1 changed file with 49 additions and 49 deletions Side-by-side Diff
sound/pci/intel8x0m.c
... | ... | @@ -341,9 +341,9 @@ |
341 | 341 | return -EBUSY; |
342 | 342 | } |
343 | 343 | |
344 | -static void snd_intel8x0_codec_write(struct snd_ac97 *ac97, | |
345 | - unsigned short reg, | |
346 | - unsigned short val) | |
344 | +static void snd_intel8x0m_codec_write(struct snd_ac97 *ac97, | |
345 | + unsigned short reg, | |
346 | + unsigned short val) | |
347 | 347 | { |
348 | 348 | struct intel8x0m *chip = ac97->private_data; |
349 | 349 | |
... | ... | @@ -354,8 +354,8 @@ |
354 | 354 | iaputword(chip, reg + ac97->num * 0x80, val); |
355 | 355 | } |
356 | 356 | |
357 | -static unsigned short snd_intel8x0_codec_read(struct snd_ac97 *ac97, | |
358 | - unsigned short reg) | |
357 | +static unsigned short snd_intel8x0m_codec_read(struct snd_ac97 *ac97, | |
358 | + unsigned short reg) | |
359 | 359 | { |
360 | 360 | struct intel8x0m *chip = ac97->private_data; |
361 | 361 | unsigned short res; |
... | ... | @@ -385,7 +385,7 @@ |
385 | 385 | /* |
386 | 386 | * DMA I/O |
387 | 387 | */ |
388 | -static void snd_intel8x0_setup_periods(struct intel8x0m *chip, struct ichdev *ichdev) | |
388 | +static void snd_intel8x0m_setup_periods(struct intel8x0m *chip, struct ichdev *ichdev) | |
389 | 389 | { |
390 | 390 | int idx; |
391 | 391 | u32 *bdbar = ichdev->bdbar; |
... | ... | @@ -437,7 +437,7 @@ |
437 | 437 | * Interrupt handler |
438 | 438 | */ |
439 | 439 | |
440 | -static inline void snd_intel8x0_update(struct intel8x0m *chip, struct ichdev *ichdev) | |
440 | +static inline void snd_intel8x0m_update(struct intel8x0m *chip, struct ichdev *ichdev) | |
441 | 441 | { |
442 | 442 | unsigned long port = ichdev->reg_offset; |
443 | 443 | int civ, i, step; |
... | ... | @@ -489,7 +489,7 @@ |
489 | 489 | iputbyte(chip, port + ichdev->roff_sr, ICH_FIFOE | ICH_BCIS | ICH_LVBCI); |
490 | 490 | } |
491 | 491 | |
492 | -static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id) | |
492 | +static irqreturn_t snd_intel8x0m_interrupt(int irq, void *dev_id) | |
493 | 493 | { |
494 | 494 | struct intel8x0m *chip = dev_id; |
495 | 495 | struct ichdev *ichdev; |
... | ... | @@ -512,7 +512,7 @@ |
512 | 512 | for (i = 0; i < chip->bdbars_count; i++) { |
513 | 513 | ichdev = &chip->ichd[i]; |
514 | 514 | if (status & ichdev->int_sta_mask) |
515 | - snd_intel8x0_update(chip, ichdev); | |
515 | + snd_intel8x0m_update(chip, ichdev); | |
516 | 516 | } |
517 | 517 | |
518 | 518 | /* ack them */ |
... | ... | @@ -526,7 +526,7 @@ |
526 | 526 | * PCM part |
527 | 527 | */ |
528 | 528 | |
529 | -static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |
529 | +static int snd_intel8x0m_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |
530 | 530 | { |
531 | 531 | struct intel8x0m *chip = snd_pcm_substream_chip(substream); |
532 | 532 | struct ichdev *ichdev = get_ichdev(substream); |
533 | 533 | |
534 | 534 | |
... | ... | @@ -561,18 +561,18 @@ |
561 | 561 | return 0; |
562 | 562 | } |
563 | 563 | |
564 | -static int snd_intel8x0_hw_params(struct snd_pcm_substream *substream, | |
564 | +static int snd_intel8x0m_hw_params(struct snd_pcm_substream *substream, | |
565 | 565 | struct snd_pcm_hw_params *hw_params) |
566 | 566 | { |
567 | 567 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); |
568 | 568 | } |
569 | 569 | |
570 | -static int snd_intel8x0_hw_free(struct snd_pcm_substream *substream) | |
570 | +static int snd_intel8x0m_hw_free(struct snd_pcm_substream *substream) | |
571 | 571 | { |
572 | 572 | return snd_pcm_lib_free_pages(substream); |
573 | 573 | } |
574 | 574 | |
575 | -static snd_pcm_uframes_t snd_intel8x0_pcm_pointer(struct snd_pcm_substream *substream) | |
575 | +static snd_pcm_uframes_t snd_intel8x0m_pcm_pointer(struct snd_pcm_substream *substream) | |
576 | 576 | { |
577 | 577 | struct intel8x0m *chip = snd_pcm_substream_chip(substream); |
578 | 578 | struct ichdev *ichdev = get_ichdev(substream); |
... | ... | @@ -600,7 +600,7 @@ |
600 | 600 | ichdev->fragsize = snd_pcm_lib_period_bytes(substream); |
601 | 601 | snd_ac97_write(ichdev->ac97, AC97_LINE1_RATE, runtime->rate); |
602 | 602 | snd_ac97_write(ichdev->ac97, AC97_LINE1_LEVEL, 0); |
603 | - snd_intel8x0_setup_periods(chip, ichdev); | |
603 | + snd_intel8x0m_setup_periods(chip, ichdev); | |
604 | 604 | return 0; |
605 | 605 | } |
606 | 606 | |
607 | 607 | |
608 | 608 | |
609 | 609 | |
... | ... | @@ -682,22 +682,22 @@ |
682 | 682 | .open = snd_intel8x0m_playback_open, |
683 | 683 | .close = snd_intel8x0m_playback_close, |
684 | 684 | .ioctl = snd_pcm_lib_ioctl, |
685 | - .hw_params = snd_intel8x0_hw_params, | |
686 | - .hw_free = snd_intel8x0_hw_free, | |
685 | + .hw_params = snd_intel8x0m_hw_params, | |
686 | + .hw_free = snd_intel8x0m_hw_free, | |
687 | 687 | .prepare = snd_intel8x0m_pcm_prepare, |
688 | - .trigger = snd_intel8x0_pcm_trigger, | |
689 | - .pointer = snd_intel8x0_pcm_pointer, | |
688 | + .trigger = snd_intel8x0m_pcm_trigger, | |
689 | + .pointer = snd_intel8x0m_pcm_pointer, | |
690 | 690 | }; |
691 | 691 | |
692 | 692 | static struct snd_pcm_ops snd_intel8x0m_capture_ops = { |
693 | 693 | .open = snd_intel8x0m_capture_open, |
694 | 694 | .close = snd_intel8x0m_capture_close, |
695 | 695 | .ioctl = snd_pcm_lib_ioctl, |
696 | - .hw_params = snd_intel8x0_hw_params, | |
697 | - .hw_free = snd_intel8x0_hw_free, | |
696 | + .hw_params = snd_intel8x0m_hw_params, | |
697 | + .hw_free = snd_intel8x0m_hw_free, | |
698 | 698 | .prepare = snd_intel8x0m_pcm_prepare, |
699 | - .trigger = snd_intel8x0_pcm_trigger, | |
700 | - .pointer = snd_intel8x0_pcm_pointer, | |
699 | + .trigger = snd_intel8x0m_pcm_trigger, | |
700 | + .pointer = snd_intel8x0m_pcm_pointer, | |
701 | 701 | }; |
702 | 702 | |
703 | 703 | |
... | ... | @@ -710,7 +710,7 @@ |
710 | 710 | int ac97_idx; |
711 | 711 | }; |
712 | 712 | |
713 | -static int __devinit snd_intel8x0_pcm1(struct intel8x0m *chip, int device, | |
713 | +static int __devinit snd_intel8x0m_pcm1(struct intel8x0m *chip, int device, | |
714 | 714 | struct ich_pcm_table *rec) |
715 | 715 | { |
716 | 716 | struct snd_pcm *pcm; |
... | ... | @@ -759,7 +759,7 @@ |
759 | 759 | }, |
760 | 760 | }; |
761 | 761 | |
762 | -static int __devinit snd_intel8x0_pcm(struct intel8x0m *chip) | |
762 | +static int __devinit snd_intel8x0m_pcm(struct intel8x0m *chip) | |
763 | 763 | { |
764 | 764 | int i, tblsize, device, err; |
765 | 765 | struct ich_pcm_table *tbl, *rec; |
... | ... | @@ -791,7 +791,7 @@ |
791 | 791 | if (! chip->ichd[rec->ac97_idx].ac97) |
792 | 792 | continue; |
793 | 793 | } |
794 | - err = snd_intel8x0_pcm1(chip, device, rec); | |
794 | + err = snd_intel8x0m_pcm1(chip, device, rec); | |
795 | 795 | if (err < 0) |
796 | 796 | return err; |
797 | 797 | device++; |
798 | 798 | |
799 | 799 | |
... | ... | @@ -806,20 +806,20 @@ |
806 | 806 | * Mixer part |
807 | 807 | */ |
808 | 808 | |
809 | -static void snd_intel8x0_mixer_free_ac97_bus(struct snd_ac97_bus *bus) | |
809 | +static void snd_intel8x0m_mixer_free_ac97_bus(struct snd_ac97_bus *bus) | |
810 | 810 | { |
811 | 811 | struct intel8x0m *chip = bus->private_data; |
812 | 812 | chip->ac97_bus = NULL; |
813 | 813 | } |
814 | 814 | |
815 | -static void snd_intel8x0_mixer_free_ac97(struct snd_ac97 *ac97) | |
815 | +static void snd_intel8x0m_mixer_free_ac97(struct snd_ac97 *ac97) | |
816 | 816 | { |
817 | 817 | struct intel8x0m *chip = ac97->private_data; |
818 | 818 | chip->ac97 = NULL; |
819 | 819 | } |
820 | 820 | |
821 | 821 | |
822 | -static int __devinit snd_intel8x0_mixer(struct intel8x0m *chip, int ac97_clock) | |
822 | +static int __devinit snd_intel8x0m_mixer(struct intel8x0m *chip, int ac97_clock) | |
823 | 823 | { |
824 | 824 | struct snd_ac97_bus *pbus; |
825 | 825 | struct snd_ac97_template ac97; |
826 | 826 | |
827 | 827 | |
... | ... | @@ -827,22 +827,22 @@ |
827 | 827 | int err; |
828 | 828 | unsigned int glob_sta = 0; |
829 | 829 | static struct snd_ac97_bus_ops ops = { |
830 | - .write = snd_intel8x0_codec_write, | |
831 | - .read = snd_intel8x0_codec_read, | |
830 | + .write = snd_intel8x0m_codec_write, | |
831 | + .read = snd_intel8x0m_codec_read, | |
832 | 832 | }; |
833 | 833 | |
834 | 834 | chip->in_ac97_init = 1; |
835 | 835 | |
836 | 836 | memset(&ac97, 0, sizeof(ac97)); |
837 | 837 | ac97.private_data = chip; |
838 | - ac97.private_free = snd_intel8x0_mixer_free_ac97; | |
838 | + ac97.private_free = snd_intel8x0m_mixer_free_ac97; | |
839 | 839 | ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE; |
840 | 840 | |
841 | 841 | glob_sta = igetdword(chip, ICHREG(GLOB_STA)); |
842 | 842 | |
843 | 843 | if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0) |
844 | 844 | goto __err; |
845 | - pbus->private_free = snd_intel8x0_mixer_free_ac97_bus; | |
845 | + pbus->private_free = snd_intel8x0m_mixer_free_ac97_bus; | |
846 | 846 | if (ac97_clock >= 8000 && ac97_clock <= 48000) |
847 | 847 | pbus->clock = ac97_clock; |
848 | 848 | chip->ac97_bus = pbus; |
... | ... | @@ -960,7 +960,7 @@ |
960 | 960 | return 0; |
961 | 961 | } |
962 | 962 | |
963 | -static int snd_intel8x0_chip_init(struct intel8x0m *chip, int probing) | |
963 | +static int snd_intel8x0m_chip_init(struct intel8x0m *chip, int probing) | |
964 | 964 | { |
965 | 965 | unsigned int i; |
966 | 966 | int err; |
... | ... | @@ -981,7 +981,7 @@ |
981 | 981 | return 0; |
982 | 982 | } |
983 | 983 | |
984 | -static int snd_intel8x0_free(struct intel8x0m *chip) | |
984 | +static int snd_intel8x0m_free(struct intel8x0m *chip) | |
985 | 985 | { |
986 | 986 | unsigned int i; |
987 | 987 | |
... | ... | @@ -1046,7 +1046,7 @@ |
1046 | 1046 | return -EIO; |
1047 | 1047 | } |
1048 | 1048 | pci_set_master(pci); |
1049 | - if (request_irq(pci->irq, snd_intel8x0_interrupt, | |
1049 | + if (request_irq(pci->irq, snd_intel8x0m_interrupt, | |
1050 | 1050 | IRQF_SHARED, card->shortname, chip)) { |
1051 | 1051 | printk(KERN_ERR "intel8x0m: unable to grab IRQ %d, " |
1052 | 1052 | "disabling device\n", pci->irq); |
... | ... | @@ -1054,7 +1054,7 @@ |
1054 | 1054 | return -EIO; |
1055 | 1055 | } |
1056 | 1056 | chip->irq = pci->irq; |
1057 | - snd_intel8x0_chip_init(chip, 0); | |
1057 | + snd_intel8x0m_chip_init(chip, 0); | |
1058 | 1058 | snd_ac97_resume(chip->ac97); |
1059 | 1059 | |
1060 | 1060 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
1061 | 1061 | |
... | ... | @@ -1095,10 +1095,10 @@ |
1095 | 1095 | #endif /* CONFIG_PROC_FS */ |
1096 | 1096 | |
1097 | 1097 | |
1098 | -static int snd_intel8x0_dev_free(struct snd_device *device) | |
1098 | +static int snd_intel8x0m_dev_free(struct snd_device *device) | |
1099 | 1099 | { |
1100 | 1100 | struct intel8x0m *chip = device->device_data; |
1101 | - return snd_intel8x0_free(chip); | |
1101 | + return snd_intel8x0m_free(chip); | |
1102 | 1102 | } |
1103 | 1103 | |
1104 | 1104 | struct ich_reg_info { |
... | ... | @@ -1117,7 +1117,7 @@ |
1117 | 1117 | unsigned int int_sta_masks; |
1118 | 1118 | struct ichdev *ichdev; |
1119 | 1119 | static struct snd_device_ops ops = { |
1120 | - .dev_free = snd_intel8x0_dev_free, | |
1120 | + .dev_free = snd_intel8x0m_dev_free, | |
1121 | 1121 | }; |
1122 | 1122 | static struct ich_reg_info intel_regs[2] = { |
1123 | 1123 | { ICH_MIINT, 0 }, |
... | ... | @@ -1159,7 +1159,7 @@ |
1159 | 1159 | chip->addr = pci_iomap(pci, 0, 0); |
1160 | 1160 | if (!chip->addr) { |
1161 | 1161 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); |
1162 | - snd_intel8x0_free(chip); | |
1162 | + snd_intel8x0m_free(chip); | |
1163 | 1163 | return -EIO; |
1164 | 1164 | } |
1165 | 1165 | if (pci_resource_flags(pci, 3) & IORESOURCE_MEM) /* ICH4 */ |
1166 | 1166 | |
1167 | 1167 | |
... | ... | @@ -1168,15 +1168,15 @@ |
1168 | 1168 | chip->bmaddr = pci_iomap(pci, 1, 0); |
1169 | 1169 | if (!chip->bmaddr) { |
1170 | 1170 | snd_printk(KERN_ERR "Controller space ioremap problem\n"); |
1171 | - snd_intel8x0_free(chip); | |
1171 | + snd_intel8x0m_free(chip); | |
1172 | 1172 | return -EIO; |
1173 | 1173 | } |
1174 | 1174 | |
1175 | 1175 | port_inited: |
1176 | - if (request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_SHARED, | |
1176 | + if (request_irq(pci->irq, snd_intel8x0m_interrupt, IRQF_SHARED, | |
1177 | 1177 | card->shortname, chip)) { |
1178 | 1178 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1179 | - snd_intel8x0_free(chip); | |
1179 | + snd_intel8x0m_free(chip); | |
1180 | 1180 | return -EBUSY; |
1181 | 1181 | } |
1182 | 1182 | chip->irq = pci->irq; |
... | ... | @@ -1211,7 +1211,7 @@ |
1211 | 1211 | if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), |
1212 | 1212 | chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, |
1213 | 1213 | &chip->bdbars) < 0) { |
1214 | - snd_intel8x0_free(chip); | |
1214 | + snd_intel8x0m_free(chip); | |
1215 | 1215 | return -ENOMEM; |
1216 | 1216 | } |
1217 | 1217 | /* tables must be aligned to 8 bytes here, but the kernel pages |
1218 | 1218 | |
... | ... | @@ -1226,13 +1226,13 @@ |
1226 | 1226 | chip->int_sta_reg = ICH_REG_GLOB_STA; |
1227 | 1227 | chip->int_sta_mask = int_sta_masks; |
1228 | 1228 | |
1229 | - if ((err = snd_intel8x0_chip_init(chip, 1)) < 0) { | |
1230 | - snd_intel8x0_free(chip); | |
1229 | + if ((err = snd_intel8x0m_chip_init(chip, 1)) < 0) { | |
1230 | + snd_intel8x0m_free(chip); | |
1231 | 1231 | return err; |
1232 | 1232 | } |
1233 | 1233 | |
1234 | 1234 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { |
1235 | - snd_intel8x0_free(chip); | |
1235 | + snd_intel8x0m_free(chip); | |
1236 | 1236 | return err; |
1237 | 1237 | } |
1238 | 1238 | |
1239 | 1239 | |
... | ... | @@ -1296,11 +1296,11 @@ |
1296 | 1296 | } |
1297 | 1297 | card->private_data = chip; |
1298 | 1298 | |
1299 | - if ((err = snd_intel8x0_mixer(chip, ac97_clock)) < 0) { | |
1299 | + if ((err = snd_intel8x0m_mixer(chip, ac97_clock)) < 0) { | |
1300 | 1300 | snd_card_free(card); |
1301 | 1301 | return err; |
1302 | 1302 | } |
1303 | - if ((err = snd_intel8x0_pcm(chip)) < 0) { | |
1303 | + if ((err = snd_intel8x0m_pcm(chip)) < 0) { | |
1304 | 1304 | snd_card_free(card); |
1305 | 1305 | return err; |
1306 | 1306 | } |