Changeset 615 for GPL/branches/uniaud32-next/alsa-kernel/pci/maestro3.c
- Timestamp:
- Jan 1, 2021, 5:31:48 AM (5 years ago)
- Location:
- GPL/branches/uniaud32-next
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/alsa-kernel/pci/maestro3.c
r612 r615 1 // SPDX-License-Identifier: GPL-2.0-or-later 1 2 /* 2 3 * Driver for ESS Maestro3/Allegro (ES1988) soundcards. … … 7 8 * OSS/Free by Zach Brown. Many thanks to Zach! 8 9 * 9 * This program is free software; you can redistribute it and/or modify10 * it under the terms of the GNU General Public License as published by11 * the Free Software Foundation; either version 2 of the License, or12 * (at your option) any later version.13 *14 * This program is distributed in the hope that it will be useful,15 * but WITHOUT ANY WARRANTY; without even the implied warranty of16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17 * GNU General Public License for more details.18 *19 * You should have received a copy of the GNU General Public License20 * along with this program; if not, write to the Free Software21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA22 *23 *24 10 * ChangeLog: 25 11 * Aug. 27, 2001 26 12 * - Fixed deadlock on capture 27 13 * - Added Canyon3D-2 support by Rob Riggs <rob@pangalactic.org> 28 *29 14 */ 30 15 … … 35 20 #endif 36 21 37 #include < asm/io.h>22 #include <linux/io.h> 38 23 #include <linux/delay.h> 39 24 #include <linux/interrupt.h> … … 68 53 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 69 54 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 70 static intenable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* all enabled */55 static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* all enabled */ 71 56 #ifndef TARGET_OS2 72 static intexternal_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};57 static bool external_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; 73 58 static int amp_gpio[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1}; 74 59 #else … … 369 354 #define DSP2HOST_REQ_TIMER 0x04 370 355 371 /* AC97 registers */372 /* XXX fix this crap up */373 /*#define AC97_RESET 0x00*/374 375 #define AC97_VOL_MUTE_B 0x8000376 #define AC97_VOL_M 0x1F377 #define AC97_LEFT_VOL_S 8378 379 #define AC97_MASTER_VOL 0x02380 #define AC97_LINE_LEVEL_VOL 0x04381 #define AC97_MASTER_MONO_VOL 0x06382 #define AC97_PC_BEEP_VOL 0x0A383 #define AC97_PC_BEEP_VOL_M 0x0F384 #define AC97_SROUND_MASTER_VOL 0x38385 #define AC97_PC_BEEP_VOL_S 1386 387 /*#define AC97_PHONE_VOL 0x0C388 #define AC97_MIC_VOL 0x0E*/389 #define AC97_MIC_20DB_ENABLE 0x40390 391 /*#define AC97_LINEIN_VOL 0x10392 #define AC97_CD_VOL 0x12393 #define AC97_VIDEO_VOL 0x14394 #define AC97_AUX_VOL 0x16*/395 #define AC97_PCM_OUT_VOL 0x18396 /*#define AC97_RECORD_SELECT 0x1A*/397 #define AC97_RECORD_MIC 0x00398 #define AC97_RECORD_CD 0x01399 #define AC97_RECORD_VIDEO 0x02400 #define AC97_RECORD_AUX 0x03401 #define AC97_RECORD_MONO_MUX 0x02402 #define AC97_RECORD_DIGITAL 0x03403 #define AC97_RECORD_LINE 0x04404 #define AC97_RECORD_STEREO 0x05405 #define AC97_RECORD_MONO 0x06406 #define AC97_RECORD_PHONE 0x07407 408 /*#define AC97_RECORD_GAIN 0x1C*/409 #define AC97_RECORD_VOL_M 0x0F410 411 /*#define AC97_GENERAL_PURPOSE 0x20*/412 #define AC97_POWER_DOWN_CTRL 0x26413 #define AC97_ADC_READY 0x0001414 #define AC97_DAC_READY 0x0002415 #define AC97_ANALOG_READY 0x0004416 #define AC97_VREF_ON 0x0008417 #define AC97_PR0 0x0100418 #define AC97_PR1 0x0200419 #define AC97_PR2 0x0400420 #define AC97_PR3 0x0800421 #define AC97_PR4 0x1000422 423 #define AC97_RESERVED1 0x28424 425 #define AC97_VENDOR_TEST 0x5A426 427 #define AC97_CLOCK_DELAY 0x5C428 #define AC97_LINEOUT_MUX_SEL 0x0001429 #define AC97_MONO_MUX_SEL 0x0002430 #define AC97_CLOCK_DELAY_SEL 0x1F431 #define AC97_DAC_CDS_SHIFT 6432 #define AC97_ADC_CDS_SHIFT 11433 434 #define AC97_MULTI_CHANNEL_SEL 0x74435 436 /*#define AC97_VENDOR_ID1 0x7C437 #define AC97_VENDOR_ID2 0x7E*/438 439 356 /* 440 357 * ASSP control regs … … 865 782 unsigned int in_suspend; 866 783 867 #ifdef CONFIG_PM 784 #ifdef CONFIG_PM_SLEEP 868 785 u16 *suspend_mem; 869 786 #endif … … 876 793 * pci ids 877 794 */ 878 static DEFINE_PCI_DEVICE_TABLE(snd_m3_ids)= {795 static const struct pci_device_id snd_m3_ids[] = { 879 796 {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO_1, PCI_ANY_ID, PCI_ANY_ID, 880 797 PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, … … 898 815 MODULE_DEVICE_TABLE(pci, snd_m3_ids); 899 816 900 static struct snd_pci_quirk m3_amp_quirk_list[] __devinitdata= {817 static struct snd_pci_quirk m3_amp_quirk_list[] = { 901 818 SND_PCI_QUIRK(0x0E11, 0x0094, "Compaq Evo N600c", 0x0c), 902 819 SND_PCI_QUIRK(0x10f7, 0x833e, "Panasonic CF-28", 0x0d), … … 907 824 }; 908 825 909 static struct snd_pci_quirk m3_irda_quirk_list[] __devinitdata= {826 static struct snd_pci_quirk m3_irda_quirk_list[] = { 910 827 SND_PCI_QUIRK(0x1028, 0x00b0, "Dell Inspiron 4000", 1), 911 828 SND_PCI_QUIRK(0x1028, 0x00a4, "Dell Inspiron 8000", 1), … … 915 832 916 833 /* hardware volume quirks */ 917 static struct snd_pci_quirk m3_hv_quirk_list[] __devinitdata= {834 static struct snd_pci_quirk m3_hv_quirk_list[] = { 918 835 /* Allegro chips */ 919 836 SND_PCI_QUIRK(0x0E11, 0x002E, NULL, HV_CTRL_ENABLE | HV_BUTTON_FROM_GD), … … 993 910 994 911 /* HP Omnibook quirks */ 995 static struct snd_pci_quirk m3_omnibook_quirk_list[] __devinitdata= {912 static struct snd_pci_quirk m3_omnibook_quirk_list[] = { 996 913 SND_PCI_QUIRK_ID(0x103c, 0x0010), /* HP OmniBook 6000 */ 997 914 SND_PCI_QUIRK_ID(0x103c, 0x0011), /* HP OmniBook 500 */ … … 1479 1396 s->buffer_addr = substream->runtime->dma_addr; 1480 1397 if (s->buffer_addr & 0x3) { 1481 snd_printk(KERN_ERR"oh my, not aligned\n");1398 dev_err(substream->pcm->card->dev, "oh my, not aligned\n"); 1482 1399 s->buffer_addr = s->buffer_addr & ~0x3; 1483 1400 } … … 1757 1674 */ 1758 1675 1759 static struct snd_pcm_hardware snd_m3_playback =1676 static const struct snd_pcm_hardware snd_m3_playback = 1760 1677 { 1761 1678 .info = (SNDRV_PCM_INFO_MMAP | … … 1778 1695 }; 1779 1696 1780 static struct snd_pcm_hardware snd_m3_capture =1697 static const struct snd_pcm_hardware snd_m3_capture = 1781 1698 { 1782 1699 .info = (SNDRV_PCM_INFO_MMAP | … … 1910 1827 */ 1911 1828 1912 static struct snd_pcm_ops snd_m3_playback_ops = {1829 static const struct snd_pcm_ops snd_m3_playback_ops = { 1913 1830 .open = snd_m3_playback_open, 1914 1831 .close = snd_m3_playback_close, … … 1921 1838 }; 1922 1839 1923 static struct snd_pcm_ops snd_m3_capture_ops = {1840 static const struct snd_pcm_ops snd_m3_capture_ops = { 1924 1841 .open = snd_m3_capture_open, 1925 1842 .close = snd_m3_capture_close, … … 1932 1849 }; 1933 1850 1934 static int __devinit1851 static int 1935 1852 snd_m3_pcm(struct snd_m3 * chip, int device) 1936 1853 { … … 1976 1893 } while (i-- > 0); 1977 1894 1978 snd_printk(KERN_ERR"ac97 serial bus busy\n");1895 dev_err(chip->card->dev, "ac97 serial bus busy\n"); 1979 1896 return 1; 1980 1897 } … … 2005 1922 snd_m3_outw(chip, val, CODEC_DATA); 2006 1923 snd_m3_outb(chip, reg & 0x7f, CODEC_COMMAND); 2007 } 2008 2009 2010 static void snd_m3_remote_codec_config(int io, int isremote) 2011 { 1924 /* 1925 * Workaround for buggy ES1988 integrated AC'97 codec. It remains silent 1926 * until the MASTER volume or mute is touched (alsactl restore does not 1927 * work). 1928 */ 1929 if (ac97->id == 0x45838308 && reg == AC97_MASTER) { 1930 snd_m3_ac97_wait(chip); 1931 snd_m3_outw(chip, val, CODEC_DATA); 1932 snd_m3_outb(chip, reg & 0x7f, CODEC_COMMAND); 1933 } 1934 } 1935 1936 1937 static void snd_m3_remote_codec_config(struct snd_m3 *chip, int isremote) 1938 { 1939 int io = chip->iobase; 1940 u16 tmp; 1941 2012 1942 isremote = isremote ? 1 : 0; 2013 1943 2014 outw((inw(io + RING_BUS_CTRL_B) & ~SECOND_CODEC_ID_MASK) | isremote, 2015 io + RING_BUS_CTRL_B); 1944 tmp = inw(io + RING_BUS_CTRL_B) & ~SECOND_CODEC_ID_MASK; 1945 /* enable dock on Dell Latitude C810 */ 1946 if (chip->pci->subsystem_vendor == 0x1028 && 1947 chip->pci->subsystem_device == 0x00e5) 1948 tmp |= M3I_DOCK_ENABLE; 1949 outw(tmp | isremote, io + RING_BUS_CTRL_B); 2016 1950 outw((inw(io + SDO_OUT_DEST_CTRL) & ~COMMAND_ADDR_OUT) | isremote, 2017 1951 io + SDO_OUT_DEST_CTRL); … … 2065 1999 dir |= 0x10; /* assuming pci bus master? */ 2066 2000 2067 snd_m3_remote_codec_config( io, 0);2001 snd_m3_remote_codec_config(chip, 0); 2068 2002 2069 2003 outw(IO_SRAM_ENABLE, io + RING_BUS_CTRL_A); … … 2091 2025 delay2 += 100; 2092 2026 2093 snd_printd("maestro3: retrying codec reset with delays of %d and %d ms\n", 2027 dev_dbg(chip->card->dev, 2028 "retrying codec reset with delays of %d and %d ms\n", 2094 2029 delay1, delay2); 2095 2030 } … … 2107 2042 } 2108 2043 2109 static int __devinitsnd_m3_mixer(struct snd_m3 *chip)2044 static int snd_m3_mixer(struct snd_m3 *chip) 2110 2045 { 2111 2046 struct snd_ac97_bus *pbus; … … 2161 2096 { 2162 2097 unsigned int i; 2163 const u16 *data;2098 const __le16 *data; 2164 2099 2165 2100 /* zero kernel data */ … … 2179 2114 2180 2115 /* write kernel into code memory.. */ 2181 data = (const u16 *)chip->assp_kernel_image->data;2116 data = (const __le16 *)chip->assp_kernel_image->data; 2182 2117 for (i = 0 ; i * 2 < chip->assp_kernel_image->size; i++) { 2183 2118 snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE, … … 2192 2127 * need vectors, so we won't bother with them.. 2193 2128 */ 2194 data = (const u16 *)chip->assp_minisrc_image->data;2129 data = (const __le16 *)chip->assp_minisrc_image->data; 2195 2130 for (i = 0; i * 2 < chip->assp_minisrc_image->size; i++) { 2196 2131 snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE, … … 2249 2184 2250 2185 2251 static int __devinitsnd_m3_assp_client_init(struct snd_m3 *chip, struct m3_dma *s, int index)2186 static int snd_m3_assp_client_init(struct snd_m3 *chip, struct m3_dma *s, int index) 2252 2187 { 2253 2188 int data_bytes = 2 * ( MINISRC_TMP_BUFFER_SIZE / 2 + … … 2270 2205 2271 2206 if ((address + (data_bytes/2)) >= 0x1c00) { 2272 snd_printk(KERN_ERR "no memory for %d bytes at ind %d (addr 0x%x)\n", 2207 dev_err(chip->card->dev, 2208 "no memory for %d bytes at ind %d (addr 0x%x)\n", 2273 2209 data_bytes, index, address); 2274 2210 return -ENOMEM; … … 2444 2380 } 2445 2381 2446 #ifdef CONFIG_PM 2382 #ifdef CONFIG_PM_SLEEP 2447 2383 vfree(chip->suspend_mem); 2448 2384 #endif … … 2466 2402 * APM support 2467 2403 */ 2468 #ifdef CONFIG_PM 2469 static int m3_suspend(struct pci_dev *pci, pm_message_t state)2470 { 2471 struct snd_card *card = pci_get_drvdata(pci);2404 #ifdef CONFIG_PM_SLEEP 2405 static int m3_suspend(struct device *dev) 2406 { 2407 struct snd_card *card = dev_get_drvdata(dev); 2472 2408 struct snd_m3 *chip = card->private_data; 2473 2409 int i, dsp_index; … … 2479 2415 cancel_work_sync(&chip->hwvol_work); 2480 2416 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2481 snd_pcm_suspend_all(chip->pcm);2482 2417 snd_ac97_suspend(chip->ac97); 2483 2418 … … 2494 2429 chip->suspend_mem[dsp_index++] = 2495 2430 snd_m3_assp_read(chip, MEMTYPE_INTERNAL_DATA, i); 2496 2497 pci_disable_device(pci);2498 pci_save_state(pci);2499 pci_set_power_state(pci, pci_choose_state(pci, state));2500 2431 return 0; 2501 2432 } 2502 2433 2503 static int m3_resume(struct pci_dev *pci)2504 { 2505 struct snd_card *card = pci_get_drvdata(pci);2434 static int m3_resume(struct device *dev) 2435 { 2436 struct snd_card *card = dev_get_drvdata(dev); 2506 2437 struct snd_m3 *chip = card->private_data; 2507 2438 int i, dsp_index; … … 2509 2440 if (chip->suspend_mem == NULL) 2510 2441 return 0; 2511 2512 pci_set_power_state(pci, PCI_D0);2513 pci_restore_state(pci);2514 if (pci_enable_device(pci) < 0) {2515 printk(KERN_ERR "maestor3: pci_enable_device failed, "2516 "disabling device\n");2517 snd_card_disconnect(card);2518 return -EIO;2519 }2520 pci_set_master(pci);2521 2442 2522 2443 /* first lets just bring everything back. .*/ … … 2554 2475 return 0; 2555 2476 } 2556 #endif /* CONFIG_PM */ 2477 2478 static SIMPLE_DEV_PM_OPS(m3_pm, m3_suspend, m3_resume); 2479 #define M3_PM_OPS &m3_pm 2480 #else 2481 #define M3_PM_OPS NULL 2482 #endif /* CONFIG_PM_SLEEP */ 2557 2483 2558 2484 #ifdef CONFIG_SND_MAESTRO3_INPUT 2559 static int __devinitsnd_m3_input_register(struct snd_m3 *chip)2485 static int snd_m3_input_register(struct snd_m3 *chip) 2560 2486 { 2561 2487 struct input_dev *input_dev; … … 2601 2527 } 2602 2528 2603 static int __devinit2529 static int 2604 2530 snd_m3_create(struct snd_card *card, struct pci_dev *pci, 2605 2531 int enable_amp, … … 2620 2546 2621 2547 /* check, if we can restrict PCI DMA transfers to 28 bits */ 2622 if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || 2623 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { 2624 snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n"); 2548 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(28)) < 0 || 2549 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(28)) < 0) { 2550 dev_err(card->dev, 2551 "architecture does not support 28bit PCI busmaster DMA\n"); 2625 2552 pci_disable_device(pci); 2626 2553 return -ENXIO; … … 2656 2583 if (quirk) { 2657 2584 #ifndef TARGET_OS2 2658 snd_printdd(KERN_INFO "maestro3: set amp-gpio "2659 "for '%s'\n", quirk->name);2585 dev_info(card->dev, "set amp-gpio for '%s'\n", 2586 snd_pci_quirk_name(quirk)); 2660 2587 #endif 2661 2588 chip->amp_gpio = quirk->value; … … 2669 2596 if (quirk) { 2670 2597 #ifndef TARGET_OS2 2671 snd_printdd(KERN_INFO "maestro3: enabled irda workaround "2672 "for '%s'\n", quirk->name);2598 dev_info(card->dev, "enabled irda workaround for '%s'\n", 2599 snd_pci_quirk_name(quirk)); 2673 2600 #endif 2674 2601 chip->irda_workaround = 1; … … 2691 2618 err = request_firmware(&chip->assp_kernel_image, 2692 2619 "ess/maestro3_assp_kernel.fw", &pci->dev); 2693 if (err < 0) { 2694 snd_m3_free(chip); 2695 return err; 2696 } 2620 if (err < 0) 2621 goto free_chip; 2697 2622 2698 2623 err = request_firmware(&chip->assp_minisrc_image, 2699 2624 "ess/maestro3_assp_minisrc.fw", &pci->dev); 2700 if (err < 0) { 2701 snd_m3_free(chip); 2702 return err; 2703 } 2704 2705 if ((err = pci_request_regions(pci, card->driver)) < 0) { 2706 snd_m3_free(chip); 2707 return err; 2708 } 2625 if (err < 0) 2626 goto free_chip; 2627 2628 err = pci_request_regions(pci, card->driver); 2629 if (err < 0) 2630 goto free_chip; 2631 2709 2632 chip->iobase = pci_resource_start(pci, 0); 2710 2633 … … 2723 2646 if (request_irq(pci->irq, snd_m3_interrupt, IRQF_SHARED, 2724 2647 KBUILD_MODNAME, chip)) { 2725 snd_printk(KERN_ERR"unable to grab IRQ %d\n", pci->irq);2726 snd_m3_free(chip);2727 return -ENOMEM;2648 dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); 2649 err = -ENOMEM; 2650 goto free_chip; 2728 2651 } 2729 2652 chip->irq = pci->irq; 2730 2653 2731 #ifdef CONFIG_PM 2654 #ifdef CONFIG_PM_SLEEP 2655 #ifndef TARGET_OS2 2656 chip->suspend_mem = 2657 vmalloc(array_size(sizeof(u16), 2658 REV_B_CODE_MEMORY_LENGTH + 2659 REV_B_DATA_MEMORY_LENGTH)); 2660 #else 2732 2661 chip->suspend_mem = vmalloc(sizeof(u16) * (REV_B_CODE_MEMORY_LENGTH + REV_B_DATA_MEMORY_LENGTH)); 2662 #endif 2733 2663 if (chip->suspend_mem == NULL) 2734 snd_printk(KERN_WARNING"can't allocate apm buffer\n");2664 dev_warn(card->dev, "can't allocate apm buffer\n"); 2735 2665 #endif 2736 2666 2737 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { 2738 snd_m3_free(chip); 2739 return err; 2740 } 2667 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); 2668 if (err < 0) 2669 goto free_chip; 2741 2670 2742 2671 if ((err = snd_m3_mixer(chip)) < 0) … … 2756 2685 err = snd_m3_input_register(chip); 2757 2686 if (err) 2758 snd_printk(KERN_WARNING "Input device registration " 2759 "failed with error %i", err); 2687 dev_warn(card->dev, 2688 "Input device registration failed with error %i", 2689 err); 2760 2690 } 2761 2691 #endif … … 2764 2694 snd_m3_assp_continue(chip); 2765 2695 2766 snd_card_set_dev(card, &pci->dev);2767 2768 2696 *chip_ret = chip; 2769 2697 2770 2698 return 0; 2699 2700 free_chip: 2701 snd_m3_free(chip); 2702 return err; 2771 2703 } 2772 2704 2773 2705 /* 2774 2706 */ 2775 static int __devinit2707 static int 2776 2708 snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) 2777 2709 { … … 2793 2725 } 2794 2726 2795 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); 2727 err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, 2728 0, &card); 2796 2729 if (err < 0) 2797 2730 return err; … … 2811 2744 } 2812 2745 2813 if ((err = snd_m3_create(card, pci, 2814 external_amp[dev], 2815 amp_gpio[dev], 2816 &chip)) < 0) { 2817 snd_card_free(card); 2818 return err; 2819 } 2746 err = snd_m3_create(card, pci, external_amp[dev], amp_gpio[dev], &chip); 2747 if (err < 0) 2748 goto free_card; 2749 2820 2750 card->private_data = chip; 2821 2751 … … 2824 2754 card->shortname, chip->iobase, chip->irq); 2825 2755 2826 if ((err = snd_card_register(card)) < 0) { 2827 snd_card_free(card); 2828 return err; 2829 } 2756 err = snd_card_register(card); 2757 if (err < 0) 2758 goto free_card; 2830 2759 2831 2760 #if 0 /* TODO: not supported yet */ … … 2836 2765 -1, &chip->rmidi); 2837 2766 if (err < 0) 2838 printk(KERN_WARNING "maestro3:no MIDI support.\n");2767 dev_warn(card->dev, "no MIDI support.\n"); 2839 2768 #endif 2840 2769 … … 2842 2771 dev++; 2843 2772 return 0; 2844 } 2845 2846 static void __devexit snd_m3_remove(struct pci_dev *pci) 2773 2774 free_card: 2775 snd_card_free(card); 2776 return err; 2777 } 2778 2779 static void snd_m3_remove(struct pci_dev *pci) 2847 2780 { 2848 2781 snd_card_free(pci_get_drvdata(pci)); 2849 pci_set_drvdata(pci, NULL); 2850 } 2851 2852 static struct pci_driver driver = { 2782 } 2783 2784 static struct pci_driver m3_driver = { 2853 2785 .name = KBUILD_MODNAME, 2854 2786 .id_table = snd_m3_ids, 2855 2787 .probe = snd_m3_probe, 2856 .remove = __devexit_p(snd_m3_remove), 2857 #ifdef CONFIG_PM 2858 .suspend = m3_suspend, 2859 .resume = m3_resume, 2860 #endif 2788 .remove = snd_m3_remove, 2789 .driver = { 2790 .pm = M3_PM_OPS, 2791 }, 2861 2792 }; 2862 2793 2863 static int __init alsa_card_m3_init(void) 2864 { 2865 return pci_register_driver(&driver); 2866 } 2867 2868 static void __exit alsa_card_m3_exit(void) 2869 { 2870 pci_unregister_driver(&driver); 2871 } 2872 2873 module_init(alsa_card_m3_init) 2874 module_exit(alsa_card_m3_exit) 2794 module_pci_driver(m3_driver);
Note:
See TracChangeset
for help on using the changeset viewer.