Ignore:
Timestamp:
Mar 18, 2021, 8:57:36 PM (4 years ago)
Author:
David Azarewicz
Message:

Merge changes from Paul's uniaud32next branch.

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/pci/cs4281.c

    r598 r679  
     1// SPDX-License-Identifier: GPL-2.0-or-later
    12/*
    23 *  Driver for Cirrus Logic CS4281 based PCI soundcard
    34 *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>,
    4  *
    5  *
    6  *   This program is free software; you can redistribute it and/or modify
    7  *   it under the terms of the GNU General Public License as published by
    8  *   the Free Software Foundation; either version 2 of the License, or
    9  *   (at your option) any later version.
    10  *
    11  *   This program is distributed in the hope that it will be useful,
    12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  *   GNU General Public License for more details.
    15  *
    16  *   You should have received a copy of the GNU General Public License
    17  *   along with this program; if not, write to the Free Software
    18  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    19  *
    205 */
    216
    22 #include <asm/io.h>
     7#include <linux/io.h>
    238#include <linux/delay.h>
    249#include <linux/interrupt.h>
     
    2712#include <linux/slab.h>
    2813#include <linux/gameport.h>
    29 #include <linux/moduleparam.h>
     14#include <linux/module.h>
    3015#include <sound/core.h>
    3116#include <sound/control.h>
     
    3823
    3924
     25#ifdef TARGET_OS2
     26#define KBUILD_MODNAME "cs4281"
     27#endif
    4028MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
    4129MODULE_DESCRIPTION("Cirrus Logic CS4281");
     
    4533static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;      /* Index 0-MAX */
    4634static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;       /* ID for this card */
    47 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;      /* Enable switches */
    48 static int dual_codec[SNDRV_CARDS];     /* dual codec */
     35static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;     /* Enable switches */
     36static bool dual_codec[SNDRV_CARDS];    /* dual codec */
    4937
    5038module_param_array(index, int, NULL, 0444);
     
    487475        struct gameport *gameport;
    488476
    489 #ifdef CONFIG_PM
     477#ifdef CONFIG_PM_SLEEP
    490478        u32 suspend_regs[SUSPEND_REGISTERS];
    491479#endif
     
    495483static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id);
    496484
    497 static DEFINE_PCI_DEVICE_TABLE(snd_cs4281_ids) = {
     485static const struct pci_device_id snd_cs4281_ids[] = {
    498486        { PCI_VDEVICE(CIRRUS, 0x6005), 0, },    /* CS4281 */
    499487        { 0, }
     
    565553                }
    566554        }
    567         snd_printk(KERN_ERR "AC'97 write problem, reg = 0x%x, val = 0x%x\n", reg, val);
     555        dev_err(chip->card->dev,
     556                "AC'97 write problem, reg = 0x%x, val = 0x%x\n", reg, val);
    568557}
    569558
     
    625614        }
    626615
    627         snd_printk(KERN_ERR "AC'97 read problem (ACCTL_DCV), reg = 0x%x\n", reg);
     616        dev_err(chip->card->dev,
     617                "AC'97 read problem (ACCTL_DCV), reg = 0x%x\n", reg);
    628618        result = 0xffff;
    629619        goto __end;
     
    644634        }
    645635       
    646         snd_printk(KERN_ERR "AC'97 read problem (ACSTS_VSTS), reg = 0x%x\n", reg);
     636        dev_err(chip->card->dev,
     637                "AC'97 read problem (ACSTS_VSTS), reg = 0x%x\n", reg);
    647638        result = 0xffff;
    648639        goto __end;
     
    707698static unsigned int snd_cs4281_rate(unsigned int rate, unsigned int *real_rate)
    708699{
    709         unsigned int val = ~0;
     700        unsigned int val;
    710701       
    711702        if (real_rate)
     
    720711        case 48000:     return 0;
    721712        default:
    722                 goto __variable;
    723         }
    724       __variable:
     713                break;
     714        }
    725715        val = 1536000 / rate;
    726716        if (real_rate)
     
    794784}
    795785
    796 static int snd_cs4281_hw_params(struct snd_pcm_substream *substream,
    797                                 struct snd_pcm_hw_params *hw_params)
    798 {
    799         return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
    800 }
    801 
    802 static int snd_cs4281_hw_free(struct snd_pcm_substream *substream)
    803 {
    804         return snd_pcm_lib_free_pages(substream);
    805 }
    806 
    807786static int snd_cs4281_playback_prepare(struct snd_pcm_substream *substream)
    808787{
     
    836815
    837816        /*
    838         printk(KERN_DEBUG "DCC = 0x%x, buffer_size = 0x%x, jiffies = %li\n",
    839                snd_cs4281_peekBA0(chip, dma->regDCC), runtime->buffer_size,
     817        dev_dbg(chip->card->dev,
     818                "DCC = 0x%x, buffer_size = 0x%x, jiffies = %li\n",
     819                snd_cs4281_peekBA0(chip, dma->regDCC), runtime->buffer_size,
    840820               jiffies);
    841821        */
     
    844824}
    845825
    846 static struct snd_pcm_hardware snd_cs4281_playback =
     826static const struct snd_pcm_hardware snd_cs4281_playback =
    847827{
    848828        .info =                 SNDRV_PCM_INFO_MMAP |
     
    869849};
    870850
    871 static struct snd_pcm_hardware snd_cs4281_capture =
     851static const struct snd_pcm_hardware snd_cs4281_capture =
    872852{
    873853        .info =                 SNDRV_PCM_INFO_MMAP |
     
    948928}
    949929
    950 static struct snd_pcm_ops snd_cs4281_playback_ops = {
     930static const struct snd_pcm_ops snd_cs4281_playback_ops = {
    951931        .open =         snd_cs4281_playback_open,
    952932        .close =        snd_cs4281_playback_close,
    953         .ioctl =        snd_pcm_lib_ioctl,
    954         .hw_params =    snd_cs4281_hw_params,
    955         .hw_free =      snd_cs4281_hw_free,
    956933        .prepare =      snd_cs4281_playback_prepare,
    957934        .trigger =      snd_cs4281_trigger,
     
    959936};
    960937
    961 static struct snd_pcm_ops snd_cs4281_capture_ops = {
     938static const struct snd_pcm_ops snd_cs4281_capture_ops = {
    962939        .open =         snd_cs4281_capture_open,
    963940        .close =        snd_cs4281_capture_close,
    964         .ioctl =        snd_pcm_lib_ioctl,
    965         .hw_params =    snd_cs4281_hw_params,
    966         .hw_free =      snd_cs4281_hw_free,
    967941        .prepare =      snd_cs4281_capture_prepare,
    968942        .trigger =      snd_cs4281_trigger,
     
    970944};
    971945
    972 static int __devinit snd_cs4281_pcm(struct cs4281 * chip, int device,
    973                                     struct snd_pcm ** rpcm)
     946static int snd_cs4281_pcm(struct cs4281 *chip, int device)
    974947{
    975948        struct snd_pcm *pcm;
    976949        int err;
    977950
    978         if (rpcm)
    979                 *rpcm = NULL;
    980951        err = snd_pcm_new(chip->card, "CS4281", device, 1, 1, &pcm);
    981952        if (err < 0)
     
    990961        chip->pcm = pcm;
    991962
    992         snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
    993                                               snd_dma_pci_data(chip->pci), 64*1024, 512*1024);
    994 
    995         if (rpcm)
    996                 *rpcm = pcm;
     963        snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
     964                                       64*1024, 512*1024);
     965
    997966        return 0;
    998967}
     
    10571026static const DECLARE_TLV_DB_SCALE(db_scale_dsp, -4650, 150, 0);
    10581027
    1059 static struct snd_kcontrol_new snd_cs4281_fm_vol =
     1028static const struct snd_kcontrol_new snd_cs4281_fm_vol =
    10601029{
    10611030        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
     
    10681037};
    10691038
    1070 static struct snd_kcontrol_new snd_cs4281_pcm_vol =
     1039static const struct snd_kcontrol_new snd_cs4281_pcm_vol =
    10711040{
    10721041        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
     
    10941063}
    10951064
    1096 static int __devinit snd_cs4281_mixer(struct cs4281 * chip)
     1065static int snd_cs4281_mixer(struct cs4281 *chip)
    10971066{
    10981067        struct snd_card *card = chip->card;
    10991068        struct snd_ac97_template ac97;
    11001069        int err;
    1101         static struct snd_ac97_bus_ops ops = {
     1070        static const struct snd_ac97_bus_ops ops = {
    11021071                .write = snd_cs4281_ac97_write,
    11031072                .read = snd_cs4281_ac97_read,
     
    11641133}
    11651134
    1166 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA0 = {
     1135static const struct snd_info_entry_ops snd_cs4281_proc_ops_BA0 = {
    11671136        .read = snd_cs4281_BA0_read,
    11681137};
    11691138
    1170 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA1 = {
     1139static const struct snd_info_entry_ops snd_cs4281_proc_ops_BA1 = {
    11711140        .read = snd_cs4281_BA1_read,
    11721141};
    11731142
    1174 static void __devinit snd_cs4281_proc_init(struct cs4281 * chip)
     1143static void snd_cs4281_proc_init(struct cs4281 *chip)
    11751144{
    11761145        struct snd_info_entry *entry;
    11771146
    1178         if (! snd_card_proc_new(chip->card, "cs4281", &entry))
    1179                 snd_info_set_text_ops(entry, chip, snd_cs4281_proc_read);
     1147        snd_card_ro_proc_new(chip->card, "cs4281", chip, snd_cs4281_proc_read);
    11801148        if (! snd_card_proc_new(chip->card, "cs4281_BA0", &entry)) {
    11811149                entry->content = SNDRV_INFO_CONTENT_DATA;
     
    11961164 */
    11971165
    1198 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
     1166#if IS_REACHABLE(CONFIG_GAMEPORT)
    11991167
    12001168static void snd_cs4281_gameport_trigger(struct gameport *gameport)
     
    12601228}
    12611229
    1262 static int __devinit snd_cs4281_create_gameport(struct cs4281 *chip)
     1230static int snd_cs4281_create_gameport(struct cs4281 *chip)
    12631231{
    12641232        struct gameport *gp;
     
    12661234        chip->gameport = gp = gameport_allocate_port();
    12671235        if (!gp) {
    1268                 printk(KERN_ERR "cs4281: cannot allocate memory for gameport\n");
     1236                dev_err(chip->card->dev,
     1237                        "cannot allocate memory for gameport\n");
    12691238                return -ENOMEM;
    12701239        }
     
    12971266static inline int snd_cs4281_create_gameport(struct cs4281 *chip) { return -ENOSYS; }
    12981267static inline void snd_cs4281_free_gameport(struct cs4281 *chip) { }
    1299 #endif /* CONFIG_GAMEPORT || (MODULE && CONFIG_GAMEPORT_MODULE) */
     1268#endif /* IS_REACHABLE(CONFIG_GAMEPORT) */
    13001269
    13011270static int snd_cs4281_free(struct cs4281 *chip)
    13021271{
    13031272        snd_cs4281_free_gameport(chip);
    1304 
    1305         if (chip->irq >= 0)
    1306                 synchronize_irq(chip->irq);
    13071273
    13081274        /* Mask interrupts */
     
    13131279        snd_cs4281_pokeBA0(chip, BA0_SSPM, 0);
    13141280        /* PCI interface - D3 state */
    1315         pci_set_power_state(chip->pci, 3);
     1281        pci_set_power_state(chip->pci, PCI_D3hot);
    13161282
    13171283        if (chip->irq >= 0)
    13181284                free_irq(chip->irq, chip);
    1319         if (chip->ba0)
    1320                 iounmap(chip->ba0);
    1321         if (chip->ba1)
    1322                 iounmap(chip->ba1);
     1285        iounmap(chip->ba0);
     1286        iounmap(chip->ba1);
    13231287        pci_release_regions(chip->pci);
    13241288        pci_disable_device(chip->pci);
     
    13361300static int snd_cs4281_chip_init(struct cs4281 *chip); /* defined below */
    13371301
    1338 static int __devinit snd_cs4281_create(struct snd_card *card,
    1339                                        struct pci_dev *pci,
    1340                                        struct cs4281 ** rchip,
    1341                                        int dual_codec)
     1302static int snd_cs4281_create(struct snd_card *card,
     1303                             struct pci_dev *pci,
     1304                             struct cs4281 **rchip,
     1305                             int dual_codec)
    13421306{
    13431307        struct cs4281 *chip;
    13441308        unsigned int tmp;
    13451309        int err;
    1346         static struct snd_device_ops ops = {
     1310        static const struct snd_device_ops ops = {
    13471311                .dev_free =     snd_cs4281_dev_free,
    13481312        };
     
    13621326        pci_set_master(pci);
    13631327        if (dual_codec < 0 || dual_codec > 3) {
    1364                 snd_printk(KERN_ERR "invalid dual_codec option %d\n", dual_codec);
     1328                dev_err(card->dev, "invalid dual_codec option %d\n", dual_codec);
    13651329                dual_codec = 0;
    13661330        }
     
    13831347       
    13841348        if (request_irq(pci->irq, snd_cs4281_interrupt, IRQF_SHARED,
    1385                         "CS4281", chip)) {
    1386                 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
     1349                        KBUILD_MODNAME, chip)) {
     1350                dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
    13871351                snd_cs4281_free(chip);
    13881352                return -ENOMEM;
    13891353        }
    13901354        chip->irq = pci->irq;
     1355        card->sync_irq = chip->irq;
    13911356
    13921357        tmp = snd_cs4281_chip_init(chip);
     
    14021367
    14031368        snd_cs4281_proc_init(chip);
    1404 
    1405         snd_card_set_dev(card, &pci->dev);
    14061369
    14071370        *rchip = chip;
     
    14261389                tmp = snd_cs4281_peekBA0(chip, BA0_CFLR);
    14271390                if (tmp != BA0_CFLR_DEFAULT) {
    1428                         snd_printk(KERN_ERR "CFLR setup failed (0x%x)\n", tmp);
     1391                        dev_err(chip->card->dev,
     1392                                "CFLR setup failed (0x%x)\n", tmp);
    14291393                        return -EIO;
    14301394                }
     
    14371401       
    14381402        if ((tmp = snd_cs4281_peekBA0(chip, BA0_SERC1)) != (BA0_SERC1_SO1EN | BA0_SERC1_AC97)) {
    1439                 snd_printk(KERN_ERR "SERC1 AC'97 check failed (0x%x)\n", tmp);
     1403                dev_err(chip->card->dev,
     1404                        "SERC1 AC'97 check failed (0x%x)\n", tmp);
    14401405                return -EIO;
    14411406        }
    14421407        if ((tmp = snd_cs4281_peekBA0(chip, BA0_SERC2)) != (BA0_SERC2_SI1EN | BA0_SERC2_AC97)) {
    1443                 snd_printk(KERN_ERR "SERC2 AC'97 check failed (0x%x)\n", tmp);
     1408                dev_err(chip->card->dev,
     1409                        "SERC2 AC'97 check failed (0x%x)\n", tmp);
    14441410                return -EIO;
    14451411        }
     
    15031469        } while (time_after_eq(end_time, jiffies));
    15041470
    1505         snd_printk(KERN_ERR "DLLRDY not seen\n");
     1471        dev_err(chip->card->dev, "DLLRDY not seen\n");
    15061472        return -EIO;
    15071473
     
    15291495        } while (time_after_eq(end_time, jiffies));
    15301496
    1531         snd_printk(KERN_ERR "never read codec ready from AC'97 (0x%x)\n", snd_cs4281_peekBA0(chip, BA0_ACSTS));
     1497        dev_err(chip->card->dev,
     1498                "never read codec ready from AC'97 (0x%x)\n",
     1499                snd_cs4281_peekBA0(chip, BA0_ACSTS));
    15321500        return -EIO;
    15331501
     
    15401508                        schedule_timeout_uninterruptible(1);
    15411509                } while (time_after_eq(end_time, jiffies));
    1542                 snd_printk(KERN_INFO "secondary codec doesn't respond. disable it...\n");
     1510                dev_info(chip->card->dev,
     1511                         "secondary codec doesn't respond. disable it...\n");
    15431512                chip->dual_codec = 0;
    15441513        __codec2_ok: ;
     
    15701539        if (--retry_count > 0)
    15711540                goto __retry;
    1572         snd_printk(KERN_ERR "never read ISV3 and ISV4 from AC'97\n");
     1541        dev_err(chip->card->dev, "never read ISV3 and ISV4 from AC'97\n");
    15731542        return -EIO;
    15741543
     
    16331602                                        BA0_HISR_DMA(2) |
    16341603                                        BA0_HISR_DMA(3)));
    1635         synchronize_irq(chip->irq);
    16361604
    16371605        return 0;
     
    17661734}
    17671735
    1768 static struct snd_rawmidi_ops snd_cs4281_midi_output =
     1736static const struct snd_rawmidi_ops snd_cs4281_midi_output =
    17691737{
    17701738        .open =         snd_cs4281_midi_output_open,
     
    17731741};
    17741742
    1775 static struct snd_rawmidi_ops snd_cs4281_midi_input =
     1743static const struct snd_rawmidi_ops snd_cs4281_midi_input =
    17761744{
    17771745        .open =         snd_cs4281_midi_input_open,
     
    17801748};
    17811749
    1782 static int __devinit snd_cs4281_midi(struct cs4281 * chip, int device,
    1783                                      struct snd_rawmidi **rrawmidi)
     1750static int snd_cs4281_midi(struct cs4281 *chip, int device)
    17841751{
    17851752        struct snd_rawmidi *rmidi;
    17861753        int err;
    17871754
    1788         if (rrawmidi)
    1789                 *rrawmidi = NULL;
    17901755        if ((err = snd_rawmidi_new(chip->card, "CS4281", device, 1, 1, &rmidi)) < 0)
    17911756                return err;
     
    17961761        rmidi->private_data = chip;
    17971762        chip->rmidi = rmidi;
    1798         if (rrawmidi)
    1799                 *rrawmidi = rmidi;
    18001763        return 0;
    18011764}
     
    19021865}
    19031866
    1904 static int __devinit snd_cs4281_probe(struct pci_dev *pci,
    1905                                       const struct pci_device_id *pci_id)
     1867static int snd_cs4281_probe(struct pci_dev *pci,
     1868                            const struct pci_device_id *pci_id)
    19061869{
    19071870        static int dev;
     
    19181881        }
    19191882
    1920         err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
     1883        err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
     1884                           0, &card);
    19211885        if (err < 0)
    19221886                return err;
     
    19321896                return err;
    19331897        }
    1934         if ((err = snd_cs4281_pcm(chip, 0, NULL)) < 0) {
     1898        if ((err = snd_cs4281_pcm(chip, 0)) < 0) {
    19351899                snd_card_free(card);
    19361900                return err;
    19371901        }
    1938         if ((err = snd_cs4281_midi(chip, 0, NULL)) < 0) {
     1902        if ((err = snd_cs4281_midi(chip, 0)) < 0) {
    19391903                snd_card_free(card);
    19401904                return err;
     
    19691933}
    19701934
    1971 static void __devexit snd_cs4281_remove(struct pci_dev *pci)
     1935static void snd_cs4281_remove(struct pci_dev *pci)
    19721936{
    19731937        snd_card_free(pci_get_drvdata(pci));
    1974         pci_set_drvdata(pci, NULL);
    19751938}
    19761939
     
    19781941 * Power Management
    19791942 */
    1980 #ifdef CONFIG_PM
    1981 
    1982 static int saved_regs[SUSPEND_REGISTERS] = {
     1943#ifdef CONFIG_PM_SLEEP
     1944
     1945static const int saved_regs[SUSPEND_REGISTERS] = {
    19831946        BA0_JSCTL,
    19841947        BA0_GPIOR,
     
    19981961#define CLKCR1_CKRA                             0x00010000L
    19991962
    2000 static int cs4281_suspend(struct pci_dev *pci, pm_message_t state)
    2001 {
    2002         struct snd_card *card = pci_get_drvdata(pci);
     1963static int cs4281_suspend(struct device *dev)
     1964{
     1965        struct snd_card *card = dev_get_drvdata(dev);
    20031966        struct cs4281 *chip = card->private_data;
    20041967        u32 ulCLK;
     
    20061969
    20071970        snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
    2008         snd_pcm_suspend_all(chip->pcm);
    2009 
    20101971        snd_ac97_suspend(chip->ac97);
    20111972        snd_ac97_suspend(chip->ac97_secondary);
     
    20381999        ulCLK &= ~CLKCR1_CKRA;
    20392000        snd_cs4281_pokeBA0(chip, BA0_CLKCR1, ulCLK);
    2040 
    2041         pci_disable_device(pci);
    2042         pci_save_state(pci);
    2043         pci_set_power_state(pci, pci_choose_state(pci, state));
    2044         return 0;
    2045 }
    2046 
    2047 static int cs4281_resume(struct pci_dev *pci)
    2048 {
    2049         struct snd_card *card = pci_get_drvdata(pci);
     2001        return 0;
     2002}
     2003
     2004static int cs4281_resume(struct device *dev)
     2005{
     2006        struct snd_card *card = dev_get_drvdata(dev);
    20502007        struct cs4281 *chip = card->private_data;
    20512008        unsigned int i;
    20522009        u32 ulCLK;
    2053 
    2054         pci_set_power_state(pci, PCI_D0);
    2055         pci_restore_state(pci);
    2056         if (pci_enable_device(pci) < 0) {
    2057                 printk(KERN_ERR "cs4281: pci_enable_device failed, "
    2058                        "disabling device\n");
    2059                 snd_card_disconnect(card);
    2060                 return -EIO;
    2061         }
    2062         pci_set_master(pci);
    20632010
    20642011        ulCLK = snd_cs4281_peekBA0(chip, BA0_CLKCR1);
     
    20832030        return 0;
    20842031}
    2085 #endif /* CONFIG_PM */
    2086 
    2087 static struct pci_driver driver = {
    2088         .name = "CS4281",
     2032
     2033static SIMPLE_DEV_PM_OPS(cs4281_pm, cs4281_suspend, cs4281_resume);
     2034#define CS4281_PM_OPS   &cs4281_pm
     2035#else
     2036#define CS4281_PM_OPS   NULL
     2037#endif /* CONFIG_PM_SLEEP */
     2038
     2039static struct pci_driver cs4281_driver = {
     2040        .name = KBUILD_MODNAME,
    20892041        .id_table = snd_cs4281_ids,
    20902042        .probe = snd_cs4281_probe,
    2091         .remove = __devexit_p(snd_cs4281_remove),
    2092 #ifdef CONFIG_PM
    2093         .suspend = cs4281_suspend,
    2094         .resume = cs4281_resume,
    2095 #endif
     2043        .remove = snd_cs4281_remove,
     2044        .driver = {
     2045                .pm = CS4281_PM_OPS,
     2046        },
    20962047};
    20972048       
    2098 static int __init alsa_card_cs4281_init(void)
    2099 {
    2100         return pci_register_driver(&driver);
    2101 }
    2102 
    2103 static void __exit alsa_card_cs4281_exit(void)
    2104 {
    2105         pci_unregister_driver(&driver);
    2106 }
    2107 
    2108 module_init(alsa_card_cs4281_init)
    2109 module_exit(alsa_card_cs4281_exit)
     2049module_pci_driver(cs4281_driver);
Note: See TracChangeset for help on using the changeset viewer.