Merge branch 'for-linus' into for-next
authorTakashi Iwai <tiwai@suse.de>
Mon, 17 Jun 2013 09:16:16 +0000 (11:16 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 17 Jun 2013 09:16:16 +0000 (11:16 +0200)
* for-linus:
  ALSA: hda - Add models for Dell headset jacks

103 files changed:
include/sound/core.h
include/sound/pcm.h
sound/arm/aaci.c
sound/arm/pxa2xx-ac97.c
sound/core/Kconfig
sound/core/init.c
sound/core/pcm_lib.c
sound/drivers/aloop.c
sound/drivers/dummy.c
sound/drivers/ml403-ac97cr.c
sound/drivers/mpu401/mpu401.c
sound/drivers/mtpav.c
sound/drivers/pcsp/pcsp.c
sound/drivers/serial-u16550.c
sound/drivers/virmidi.c
sound/isa/ad1848/ad1848.c
sound/isa/adlib.c
sound/isa/cmi8328.c
sound/isa/cmi8330.c
sound/isa/cs423x/cs4231.c
sound/isa/cs423x/cs4236.c
sound/isa/es1688/es1688.c
sound/isa/es18xx.c
sound/isa/galaxy/galaxy.c
sound/isa/gus/gusclassic.c
sound/isa/gus/gusextreme.c
sound/isa/gus/gusmax.c
sound/isa/gus/interwave.c
sound/isa/msnd/msnd_pinnacle.c
sound/isa/opl3sa2.c
sound/isa/opti9xx/miro.c
sound/isa/opti9xx/opti92x-ad1848.c
sound/isa/sb/jazz16.c
sound/isa/sb/sb16.c
sound/isa/sb/sb8.c
sound/isa/sc6000.c
sound/isa/sscape.c
sound/isa/wavefront/wavefront.c
sound/oss/kahlua.c
sound/parisc/harmony.c
sound/pci/ad1889.c
sound/pci/ali5451/ali5451.c
sound/pci/als300.c
sound/pci/als4000.c
sound/pci/asihpi/hpioctl.c
sound/pci/atiixp.c
sound/pci/atiixp_modem.c
sound/pci/au88x0/au88x0.c
sound/pci/aw2/aw2-alsa.c
sound/pci/azt3328.c
sound/pci/bt87x.c
sound/pci/ca0106/ca0106_main.c
sound/pci/cmipci.c
sound/pci/cs4281.c
sound/pci/cs46xx/cs46xx.c
sound/pci/cs5530.c
sound/pci/cs5535audio/cs5535audio.c
sound/pci/ctxfi/xfi.c
sound/pci/echoaudio/echoaudio.c
sound/pci/emu10k1/emu10k1.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/ens1370.c
sound/pci/es1938.c
sound/pci/es1968.c
sound/pci/fm801.c
sound/pci/hda/Kconfig
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.h
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/patch_via.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c
sound/pci/intel8x0.c
sound/pci/intel8x0m.c
sound/pci/korg1212/korg1212.c
sound/pci/lola/lola.c
sound/pci/lx6464es/lx6464es.c
sound/pci/maestro3.c
sound/pci/mixart/mixart.c
sound/pci/nm256/nm256.c
sound/pci/oxygen/oxygen_lib.c
sound/pci/pcxhr/pcxhr.c
sound/pci/riptide/riptide.c
sound/pci/rme32.c
sound/pci/rme96.c
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/hdspm.c
sound/pci/rme9652/rme9652.c
sound/pci/sis7019.c
sound/pci/sonicvibes.c
sound/pci/trident/trident.c
sound/pci/via82xx.c
sound/pci/via82xx_modem.c
sound/pci/vx222/vx222.c
sound/pci/ymfpci/ymfpci.c
sound/ppc/powermac.c
sound/sh/aica.c
sound/sh/sh_dac_audio.c
sound/sparc/dbri.c
sound/spi/at73c213.c
sound/usb/usx2y/usbusx2yaudio.c

index 5bfe513..c586617 100644 (file)
@@ -30,7 +30,7 @@
 
 /* number of supported soundcards */
 #ifdef CONFIG_SND_DYNAMIC_MINORS
-#define SNDRV_CARDS 32
+#define SNDRV_CARDS CONFIG_SND_MAX_CARDS
 #else
 #define SNDRV_CARDS 8          /* don't change - minor numbers */
 #endif
index b48792f..84b10f9 100644 (file)
@@ -384,7 +384,7 @@ struct snd_pcm_substream {
        unsigned int dma_buf_id;
        size_t dma_max;
        /* -- hardware operations -- */
-       struct snd_pcm_ops *ops;
+       const struct snd_pcm_ops *ops;
        /* -- runtime information -- */
        struct snd_pcm_runtime *runtime;
         /* -- timer section -- */
@@ -871,7 +871,8 @@ const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format);
 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames);
 snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsigned, int big_endian);
 
-void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, struct snd_pcm_ops *ops);
+void snd_pcm_set_ops(struct snd_pcm * pcm, int direction,
+                    const struct snd_pcm_ops *ops);
 void snd_pcm_set_sync(struct snd_pcm_substream *substream);
 int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream);
 int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
index aa5d803..1ca8dc2 100644 (file)
@@ -1076,8 +1076,6 @@ static int aaci_remove(struct amba_device *dev)
 {
        struct snd_card *card = amba_get_drvdata(dev);
 
-       amba_set_drvdata(dev, NULL);
-
        if (card) {
                struct aaci *aaci = card->private_data;
                writel(0, aaci->base + AACI_MAINCR);
index ec54be4..ce431e6 100644 (file)
@@ -230,7 +230,6 @@ static int pxa2xx_ac97_remove(struct platform_device *dev)
 
        if (card) {
                snd_card_free(card);
-               platform_set_drvdata(dev, NULL);
                pxa2xx_ac97_hw_remove(dev);
        }
 
index b413ed0..c0c2f57 100644 (file)
@@ -157,6 +157,15 @@ config SND_DYNAMIC_MINORS
 
          If you are unsure about this, say N here.
 
+config SND_MAX_CARDS
+       int "Max number of sound cards"
+       range 4 256
+       default 32
+       depends on SND_DYNAMIC_MINORS
+       help
+         Specify the max number of sound cards that can be assigned
+         on a single machine.
+
 config SND_SUPPORT_OLD_API
        bool "Support old ALSA API"
        default y
index 6ef0640..6b90871 100644 (file)
@@ -46,7 +46,8 @@ static LIST_HEAD(shutdown_files);
 
 static const struct file_operations snd_shutdown_f_ops;
 
-static unsigned int snd_cards_lock;    /* locked for registering/using */
+/* locked for registering/using */
+static DECLARE_BITMAP(snd_cards_lock, SNDRV_CARDS);
 struct snd_card *snd_cards[SNDRV_CARDS];
 EXPORT_SYMBOL(snd_cards);
 
@@ -167,29 +168,35 @@ int snd_card_create(int idx, const char *xid,
        err = 0;
        mutex_lock(&snd_card_mutex);
        if (idx < 0) {
-               for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++)
+               for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++) {
                        /* idx == -1 == 0xffff means: take any free slot */
-                       if (~snd_cards_lock & idx & 1<<idx2) {
+                       if (idx2 < sizeof(int) && !(idx & (1U << idx2)))
+                               continue;
+                       if (!test_bit(idx2, snd_cards_lock)) {
                                if (module_slot_match(module, idx2)) {
                                        idx = idx2;
                                        break;
                                }
                        }
+               }
        }
        if (idx < 0) {
-               for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++)
+               for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++) {
                        /* idx == -1 == 0xffff means: take any free slot */
-                       if (~snd_cards_lock & idx & 1<<idx2) {
+                       if (idx2 < sizeof(int) && !(idx & (1U << idx2)))
+                               continue;
+                       if (!test_bit(idx2, snd_cards_lock)) {
                                if (!slots[idx2] || !*slots[idx2]) {
                                        idx = idx2;
                                        break;
                                }
                        }
+               }
        }
        if (idx < 0)
                err = -ENODEV;
        else if (idx < snd_ecards_limit) {
-               if (snd_cards_lock & (1 << idx))
+               if (test_bit(idx, snd_cards_lock))
                        err = -EBUSY;   /* invalid */
        } else if (idx >= SNDRV_CARDS)
                err = -ENODEV;
@@ -199,7 +206,7 @@ int snd_card_create(int idx, const char *xid,
                         idx, snd_ecards_limit - 1, err);
                goto __error;
        }
-       snd_cards_lock |= 1 << idx;             /* lock it */
+       set_bit(idx, snd_cards_lock);           /* lock it */
        if (idx >= snd_ecards_limit)
                snd_ecards_limit = idx + 1; /* increase the limit */
        mutex_unlock(&snd_card_mutex);
@@ -249,7 +256,7 @@ int snd_card_locked(int card)
        int locked;
 
        mutex_lock(&snd_card_mutex);
-       locked = snd_cards_lock & (1 << card);
+       locked = test_bit(card, snd_cards_lock);
        mutex_unlock(&snd_card_mutex);
        return locked;
 }
@@ -361,7 +368,7 @@ int snd_card_disconnect(struct snd_card *card)
        /* phase 1: disable fops (user space) operations for ALSA API */
        mutex_lock(&snd_card_mutex);
        snd_cards[card->number] = NULL;
-       snd_cards_lock &= ~(1 << card->number);
+       clear_bit(card->number, snd_cards_lock);
        mutex_unlock(&snd_card_mutex);
        
        /* phase 2: replace file->f_op with special dummy operations */
@@ -549,7 +556,6 @@ static void snd_card_set_id_no_lock(struct snd_card *card, const char *src,
                                    const char *nid)
 {
        int len, loops;
-       bool with_suffix;
        bool is_default = false;
        char *id;
        
@@ -565,26 +571,23 @@ static void snd_card_set_id_no_lock(struct snd_card *card, const char *src,
                is_default = true;
        }
 
-       with_suffix = false;
+       len = strlen(id);
        for (loops = 0; loops < SNDRV_CARDS; loops++) {
+               char *spos;
+               char sfxstr[5]; /* "_012" */
+               int sfxlen;
+
                if (card_id_ok(card, id))
                        return; /* OK */
 
-               len = strlen(id);
-               if (!with_suffix) {
-                       /* add the "_X" suffix */
-                       char *spos = id + len;
-                       if (len >  sizeof(card->id) - 3)
-                               spos = id + sizeof(card->id) - 3;
-                       strcpy(spos, "_1");
-                       with_suffix = true;
-               } else {
-                       /* modify the existing suffix */
-                       if (id[len - 1] != '9')
-                               id[len - 1]++;
-                       else
-                               id[len - 1] = 'A';
-               }
+               /* Add _XYZ suffix */
+               sprintf(sfxstr, "_%X", loops + 1);
+               sfxlen = strlen(sfxstr);
+               if (len + sfxlen >= sizeof(card->id))
+                       spos = id + sizeof(card->id) - sfxlen - 1;
+               else
+                       spos = id + len;
+               strcpy(spos, sfxstr);
        }
        /* fallback to the default id */
        if (!is_default) {
index 41b3dfe..82bb029 100644 (file)
@@ -568,7 +568,8 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream)
  *
  * Sets the given PCM operators to the pcm instance.
  */
-void snd_pcm_set_ops(struct snd_pcm *pcm, int direction, struct snd_pcm_ops *ops)
+void snd_pcm_set_ops(struct snd_pcm *pcm, int direction,
+                    const struct snd_pcm_ops *ops)
 {
        struct snd_pcm_str *stream = &pcm->streams[direction];
        struct snd_pcm_substream *substream;
index 6f78de9..f758992 100644 (file)
@@ -1183,7 +1183,6 @@ static int loopback_probe(struct platform_device *devptr)
 static int loopback_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
-       platform_set_drvdata(devptr, NULL);
        return 0;
 }
 
index fd798f7..11048cc 100644 (file)
@@ -1129,7 +1129,6 @@ static int snd_dummy_probe(struct platform_device *devptr)
 static int snd_dummy_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
-       platform_set_drvdata(devptr, NULL);
        return 0;
 }
 
index 8125a7e..95ea4a1 100644 (file)
@@ -1325,7 +1325,6 @@ static int snd_ml403_ac97cr_probe(struct platform_device *pfdev)
 static int snd_ml403_ac97cr_remove(struct platform_device *pfdev)
 {
        snd_card_free(platform_get_drvdata(pfdev));
-       platform_set_drvdata(pfdev, NULL);
        return 0;
 }
 
index da1a29b..90a3a7b 100644 (file)
@@ -129,7 +129,6 @@ static int snd_mpu401_probe(struct platform_device *devptr)
 static int snd_mpu401_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
-       platform_set_drvdata(devptr, NULL);
        return 0;
 }
 
index 9f1815b..e5ec7eb 100644 (file)
@@ -749,7 +749,6 @@ static int snd_mtpav_probe(struct platform_device *dev)
 static int snd_mtpav_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
-       platform_set_drvdata(devptr, NULL);
        return 0;
 }
 
index 7a5fdb9..1c19cd7 100644 (file)
@@ -189,7 +189,6 @@ static int pcsp_remove(struct platform_device *dev)
        struct snd_pcsp *chip = platform_get_drvdata(dev);
        alsa_card_pcsp_exit(chip);
        pcspkr_input_remove(chip->input_dev);
-       platform_set_drvdata(dev, NULL);
        return 0;
 }
 
index 7425dd8..e0bf5e7 100644 (file)
@@ -985,7 +985,6 @@ static int snd_serial_probe(struct platform_device *devptr)
 static int snd_serial_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
-       platform_set_drvdata(devptr, NULL);
        return 0;
 }
 
index cc4be88..ace3879 100644 (file)
@@ -132,7 +132,6 @@ static int snd_virmidi_probe(struct platform_device *devptr)
 static int snd_virmidi_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
-       platform_set_drvdata(devptr, NULL);
        return 0;
 }
 
index c214ecf..e3f455b 100644 (file)
@@ -135,7 +135,6 @@ out:        snd_card_free(card);
 static int snd_ad1848_remove(struct device *dev, unsigned int n)
 {
        snd_card_free(dev_get_drvdata(dev));
-       dev_set_drvdata(dev, NULL);
        return 0;
 }
 
index d265455..3565921 100644 (file)
@@ -101,7 +101,6 @@ out:        snd_card_free(card);
 static int snd_adlib_remove(struct device *dev, unsigned int n)
 {
        snd_card_free(dev_get_drvdata(dev));
-       dev_set_drvdata(dev, NULL);
        return 0;
 }
 
index a7369fe..f84f073 100644 (file)
@@ -418,7 +418,6 @@ static int snd_cmi8328_remove(struct device *pdev, unsigned int dev)
        snd_cmi8328_cfg_write(cmi->port, CFG2, 0);
        snd_cmi8328_cfg_write(cmi->port, CFG3, 0);
        snd_card_free(card);
-       dev_set_drvdata(pdev, NULL);
        return 0;
 }
 
index c707c52..270b965 100644 (file)
@@ -651,7 +651,6 @@ static int snd_cmi8330_isa_remove(struct device *devptr,
                                  unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(devptr));
-       dev_set_drvdata(devptr, NULL);
        return 0;
 }
 
index aa7a5d8..ba9a74e 100644 (file)
@@ -151,7 +151,6 @@ out:        snd_card_free(card);
 static int snd_cs4231_remove(struct device *dev, unsigned int n)
 {
        snd_card_free(dev_get_drvdata(dev));
-       dev_set_drvdata(dev, NULL);
        return 0;
 }
 
index 252e9fb..69614ac 100644 (file)
@@ -504,7 +504,6 @@ static int snd_cs423x_isa_remove(struct device *pdev,
                                 unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(pdev));
-       dev_set_drvdata(pdev, NULL);
        return 0;
 }
 
@@ -600,7 +599,6 @@ static int snd_cs423x_pnpbios_detect(struct pnp_dev *pdev,
 static void snd_cs423x_pnp_remove(struct pnp_dev *pdev)
 {
        snd_card_free(pnp_get_drvdata(pdev));
-       pnp_set_drvdata(pdev, NULL);
 }
 
 #ifdef CONFIG_PM
index 102874a..cdcfb57 100644 (file)
@@ -213,7 +213,6 @@ out:
 static int snd_es1688_isa_remove(struct device *dev, unsigned int n)
 {
        snd_card_free(dev_get_drvdata(dev));
-       dev_set_drvdata(dev, NULL);
        return 0;
 }
 
index 24380ef..12978b8 100644 (file)
@@ -2235,7 +2235,6 @@ static int snd_es18xx_isa_remove(struct device *devptr,
                                 unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(devptr));
-       dev_set_drvdata(devptr, NULL);
        return 0;
 }
 
@@ -2305,7 +2304,6 @@ static int snd_audiodrive_pnp_detect(struct pnp_dev *pdev,
 static void snd_audiodrive_pnp_remove(struct pnp_dev *pdev)
 {
        snd_card_free(pnp_get_drvdata(pdev));
-       pnp_set_drvdata(pdev, NULL);
 }
 
 #ifdef CONFIG_PM
index 672184e..81244e7 100644 (file)
@@ -623,7 +623,6 @@ error:
 static int snd_galaxy_remove(struct device *dev, unsigned int n)
 {
        snd_card_free(dev_get_drvdata(dev));
-       dev_set_drvdata(dev, NULL);
        return 0;
 }
 
index 16bca4e..1adc1b9 100644 (file)
@@ -215,7 +215,6 @@ out:        snd_card_free(card);
 static int snd_gusclassic_remove(struct device *dev, unsigned int n)
 {
        snd_card_free(dev_get_drvdata(dev));
-       dev_set_drvdata(dev, NULL);
        return 0;
 }
 
index 0b9c242..38e1e32 100644 (file)
@@ -344,7 +344,6 @@ out:        snd_card_free(card);
 static int snd_gusextreme_remove(struct device *dev, unsigned int n)
 {
        snd_card_free(dev_get_drvdata(dev));
-       dev_set_drvdata(dev, NULL);
        return 0;
 }
 
index c309a5d..652d5d8 100644 (file)
@@ -357,7 +357,6 @@ static int snd_gusmax_probe(struct device *pdev, unsigned int dev)
 static int snd_gusmax_remove(struct device *devptr, unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(devptr));
-       dev_set_drvdata(devptr, NULL);
        return 0;
 }
 
index 78bc574..9942691 100644 (file)
@@ -849,7 +849,6 @@ static int snd_interwave_isa_probe(struct device *pdev,
 static int snd_interwave_isa_remove(struct device *devptr, unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(devptr));
-       dev_set_drvdata(devptr, NULL);
        return 0;
 }
 
index ddabb40..81aeb93 100644 (file)
@@ -1064,7 +1064,6 @@ cfg_error:
 static int snd_msnd_isa_remove(struct device *pdev, unsigned int dev)
 {
        snd_msnd_unload(dev_get_drvdata(pdev));
-       dev_set_drvdata(pdev, NULL);
        return 0;
 }
 
index 075777a..cc01c41 100644 (file)
@@ -757,7 +757,6 @@ static int snd_opl3sa2_pnp_detect(struct pnp_dev *pdev,
 static void snd_opl3sa2_pnp_remove(struct pnp_dev *pdev)
 {
        snd_card_free(pnp_get_drvdata(pdev));
-       pnp_set_drvdata(pdev, NULL);
 }
 
 #ifdef CONFIG_PM
@@ -900,7 +899,6 @@ static int snd_opl3sa2_isa_remove(struct device *devptr,
                                  unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(devptr));
-       dev_set_drvdata(devptr, NULL);
        return 0;
 }
 
index c3da1df..619753d 100644 (file)
@@ -1495,7 +1495,6 @@ static int snd_miro_isa_remove(struct device *devptr,
                               unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(devptr));
-       dev_set_drvdata(devptr, NULL);
        return 0;
 }
 
index b41ed86..103b333 100644 (file)
@@ -1035,7 +1035,6 @@ static int snd_opti9xx_isa_remove(struct device *devptr,
                                  unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(devptr));
-       dev_set_drvdata(devptr, NULL);
        return 0;
 }
 
index 4961da4..356a630 100644 (file)
@@ -345,7 +345,6 @@ static int snd_jazz16_remove(struct device *devptr, unsigned int dev)
 {
        struct snd_card *card = dev_get_drvdata(devptr);
 
-       dev_set_drvdata(devptr, NULL);
        snd_card_free(card);
        return 0;
 }
index 50dbec4..a413099 100644 (file)
@@ -566,7 +566,6 @@ static int snd_sb16_isa_probe(struct device *pdev, unsigned int dev)
 static int snd_sb16_isa_remove(struct device *pdev, unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(pdev));
-       dev_set_drvdata(pdev, NULL);
        return 0;
 }
 
index 237d964..a806ae9 100644 (file)
@@ -208,7 +208,6 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev)
 static int snd_sb8_remove(struct device *pdev, unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(pdev));
-       dev_set_drvdata(pdev, NULL);
        return 0;
 }
 
index 5376ebf..09d481b 100644 (file)
@@ -698,7 +698,6 @@ static int snd_sc6000_remove(struct device *devptr, unsigned int dev)
        release_region(port[dev], 0x10);
        release_region(mss_port[dev], 4);
 
-       dev_set_drvdata(devptr, NULL);
        snd_card_free(card);
        return 0;
 }
index 42a0097..57b3389 100644 (file)
@@ -1200,7 +1200,6 @@ _release_card:
 static int snd_sscape_remove(struct device *devptr, unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(devptr));
-       dev_set_drvdata(devptr, NULL);
        return 0;
 }
 
index fe5dd98..82dd769 100644 (file)
@@ -581,7 +581,6 @@ static int snd_wavefront_isa_remove(struct device *devptr,
                                    unsigned int dev)
 {
        snd_card_free(dev_get_drvdata(devptr));
-       dev_set_drvdata(devptr, NULL);
        return 0;
 }
 
index 2a44cc1..12be1fb 100644 (file)
@@ -178,7 +178,6 @@ static int probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        return 0;
 
 err_out_free:
-       pci_set_drvdata(pdev, NULL);
        kfree(hw_config);
        return 1;
 }
@@ -187,7 +186,6 @@ static void remove_one(struct pci_dev *pdev)
 {
        struct address_info *hw_config = pci_get_drvdata(pdev);
        sb_dsp_unload(hw_config, 0);
-       pci_set_drvdata(pdev, NULL);
        kfree(hw_config);
 }
 
index 0e66ba4..67f56a2 100644 (file)
@@ -902,8 +902,6 @@ snd_harmony_free(struct snd_harmony *h)
        if (h->iobase)
                iounmap(h->iobase);
 
-       parisc_set_drvdata(h->dev, NULL);
-
        kfree(h);
        return 0;
 }
@@ -1016,7 +1014,6 @@ static int
 snd_harmony_remove(struct parisc_device *padev)
 {
        snd_card_free(parisc_get_drvdata(padev));
-       parisc_set_drvdata(padev, NULL);
        return 0;
 }
 
index ad8a311..d2b9d61 100644 (file)
@@ -1046,7 +1046,6 @@ static void
 snd_ad1889_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static DEFINE_PCI_DEVICE_TABLE(snd_ad1889_ids) = {
index 53754f5..3dfa12b 100644 (file)
@@ -2298,7 +2298,6 @@ static int snd_ali_probe(struct pci_dev *pci,
 static void snd_ali_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver ali5451_driver = {
index 864c431..591efb6 100644 (file)
@@ -282,7 +282,6 @@ static void snd_als300_remove(struct pci_dev *pci)
 {
        snd_als300_dbgcallenter();
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
        snd_als300_dbgcallleave();
 }
 
index 61efda2..ffc821b 100644 (file)
@@ -984,7 +984,6 @@ out:
 static void snd_card_als4000_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 #ifdef CONFIG_PM_SLEEP
index ef5019f..7f02720 100644 (file)
@@ -445,7 +445,6 @@ void asihpi_adapter_remove(struct pci_dev *pci_dev)
        if (pa->p_buffer)
                vfree(pa->p_buffer);
 
-       pci_set_drvdata(pci_dev, NULL);
        if (1)
                dev_info(&pci_dev->dev,
                         "remove %04x:%04x,%04x:%04x,%04x, HPI index %d\n",
index 6e78c67..fe4c61b 100644 (file)
@@ -1714,7 +1714,6 @@ static int snd_atiixp_probe(struct pci_dev *pci,
 static void snd_atiixp_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver atiixp_driver = {
index d0bec7b..cf29b9a 100644 (file)
@@ -1334,7 +1334,6 @@ static int snd_atiixp_probe(struct pci_dev *pci,
 static void snd_atiixp_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver atiixp_modem_driver = {
index b157e1f..7059dd6 100644 (file)
@@ -371,7 +371,6 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 static void snd_vortex_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 // pci_driver definition
index 08e9a47..2925220 100644 (file)
@@ -392,7 +392,6 @@ static int snd_aw2_probe(struct pci_dev *pci,
 static void snd_aw2_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 /* open callback */
index 1204a0f..c8e1216 100644 (file)
@@ -2725,7 +2725,6 @@ snd_azf3328_remove(struct pci_dev *pci)
 {
        snd_azf3328_dbgcallenter();
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
        snd_azf3328_dbgcallleave();
 }
 
index 9febe55..1880203 100644 (file)
@@ -953,7 +953,6 @@ _error:
 static void snd_bt87x_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 /* default entries for all Bt87x cards - it's not exported */
index 1610a57..f4db558 100644 (file)
@@ -1896,7 +1896,6 @@ static int snd_ca0106_probe(struct pci_dev *pci,
 static void snd_ca0106_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 #ifdef CONFIG_PM_SLEEP
index c617435..2755ec5 100644 (file)
@@ -3317,7 +3317,6 @@ static int snd_cmipci_probe(struct pci_dev *pci,
 static void snd_cmipci_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 
index 6a86950..64659fa 100644 (file)
@@ -1971,7 +1971,6 @@ static int snd_cs4281_probe(struct pci_dev *pci,
 static void snd_cs4281_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 /*
index 6b0d8b5..b034983 100644 (file)
@@ -158,7 +158,6 @@ static int snd_card_cs46xx_probe(struct pci_dev *pci,
 static void snd_card_cs46xx_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver cs46xx_driver = {
index dace827..c6b82c8 100644 (file)
@@ -91,7 +91,6 @@ static int snd_cs5530_dev_free(struct snd_device *device)
 static void snd_cs5530_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static u8 snd_cs5530_mixer_read(unsigned long io, u8 reg)
index 7e4b13e..902bebd 100644 (file)
@@ -391,7 +391,6 @@ static void snd_cs5535audio_remove(struct pci_dev *pci)
 {
        olpc_quirks_cleanup();
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver cs5535audio_driver = {
index d01ffcb..d464ad2 100644 (file)
@@ -122,7 +122,6 @@ error:
 static void ct_card_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 #ifdef CONFIG_PM_SLEEP
index 760cbff..05cfe55 100644 (file)
@@ -2323,7 +2323,6 @@ static void snd_echo_remove(struct pci_dev *pci)
        chip = pci_get_drvdata(pci);
        if (chip)
                snd_card_free(chip->card);
-       pci_set_drvdata(pci, NULL);
 }
 
 
index 8c5010f..9e1bd0c 100644 (file)
@@ -202,7 +202,6 @@ static int snd_card_emu10k1_probe(struct pci_dev *pci,
 static void snd_card_emu10k1_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 
index cdff11d..56ad9d6 100644 (file)
@@ -1623,7 +1623,6 @@ static int snd_emu10k1x_probe(struct pci_dev *pci,
 static void snd_emu10k1x_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 // PCI IDs
index db2dc83..372f8ea 100644 (file)
@@ -2497,7 +2497,6 @@ static int snd_audiopci_probe(struct pci_dev *pci,
 static void snd_audiopci_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver ens137x_driver = {
index 8423403..9213fb3 100644 (file)
@@ -1881,7 +1881,6 @@ static int snd_es1938_probe(struct pci_dev *pci,
 static void snd_es1938_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver es1938_driver = {
index a1f32b5..5e2ec96 100644 (file)
@@ -564,6 +564,7 @@ struct es1968 {
 #ifdef CONFIG_SND_ES1968_RADIO
        struct v4l2_device v4l2_dev;
        struct snd_tea575x tea;
+       unsigned int tea575x_tuner;
 #endif
 };
 
@@ -2557,37 +2558,47 @@ static int snd_es1968_input_register(struct es1968 *chip)
                                bits 1=unmask write to given bit */
 #define IO_DIR         8      /* direction register offset from GPIO_DATA
                                bits 0/1=read/write direction */
-/* mask bits for GPIO lines */
-#define STR_DATA       0x0040 /* GPIO6 */
-#define STR_CLK                0x0080 /* GPIO7 */
-#define STR_WREN       0x0100 /* GPIO8 */
-#define STR_MOST       0x0200 /* GPIO9 */
+
+/* GPIO to TEA575x maps */
+struct snd_es1968_tea575x_gpio {
+       u8 data, clk, wren, most;
+       char *name;
+};
+
+static struct snd_es1968_tea575x_gpio snd_es1968_tea575x_gpios[] = {
+       { .data = 6, .clk = 7, .wren = 8, .most = 9, .name = "SF64-PCE2" },
+       { .data = 7, .clk = 8, .wren = 6, .most = 10, .name = "M56VAP" },
+};
+
+#define get_tea575x_gpio(chip) \
+       (&snd_es1968_tea575x_gpios[(chip)->tea575x_tuner])
+
 
 static void snd_es1968_tea575x_set_pins(struct snd_tea575x *tea, u8 pins)
 {
        struct es1968 *chip = tea->private_data;
-       unsigned long io = chip->io_port + GPIO_DATA;
+       struct snd_es1968_tea575x_gpio gpio = *get_tea575x_gpio(chip);
        u16 val = 0;
 
-       val |= (pins & TEA575X_DATA) ? STR_DATA : 0;
-       val |= (pins & TEA575X_CLK)  ? STR_CLK  : 0;
-       val |= (pins & TEA575X_WREN) ? STR_WREN : 0;
+       val |= (pins & TEA575X_DATA) ? (1 << gpio.data) : 0;
+       val |= (pins & TEA575X_CLK)  ? (1 << gpio.clk)  : 0;
+       val |= (pins & TEA575X_WREN) ? (1 << gpio.wren) : 0;
 
-       outw(val, io);
+       outw(val, chip->io_port + GPIO_DATA);
 }
 
 static u8 snd_es1968_tea575x_get_pins(struct snd_tea575x *tea)
 {
        struct es1968 *chip = tea->private_data;
-       unsigned long io = chip->io_port + GPIO_DATA;
-       u16 val = inw(io);
-       u8 ret;
+       struct snd_es1968_tea575x_gpio gpio = *get_tea575x_gpio(chip);
+       u16 val = inw(chip->io_port + GPIO_DATA);
+       u8 ret = 0;
 
-       ret = 0;
-       if (val & STR_DATA)
+       if (val & (1 << gpio.data))
                ret |= TEA575X_DATA;
-       if (val & STR_MOST)
+       if (val & (1 << gpio.most))
                ret |= TEA575X_MOST;
+
        return ret;
 }
 
@@ -2596,13 +2607,18 @@ static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool outpu
        struct es1968 *chip = tea->private_data;
        unsigned long io = chip->io_port + GPIO_DATA;
        u16 odir = inw(io + IO_DIR);
+       struct snd_es1968_tea575x_gpio gpio = *get_tea575x_gpio(chip);
 
        if (output) {
-               outw(~(STR_DATA | STR_CLK | STR_WREN), io + IO_MASK);
-               outw(odir | STR_DATA | STR_CLK | STR_WREN, io + IO_DIR);
+               outw(~((1 << gpio.data) | (1 << gpio.clk) | (1 << gpio.wren)),
+                       io + IO_MASK);
+               outw(odir | (1 << gpio.data) | (1 << gpio.clk) | (1 << gpio.wren),
+                       io + IO_DIR);
        } else {
-               outw(~(STR_CLK | STR_WREN | STR_DATA | STR_MOST), io + IO_MASK);
-               outw((odir & ~(STR_DATA | STR_MOST)) | STR_CLK | STR_WREN, io + IO_DIR);
+               outw(~((1 << gpio.clk) | (1 << gpio.wren) | (1 << gpio.data) | (1 << gpio.most)),
+                       io + IO_MASK);
+               outw((odir & ~((1 << gpio.data) | (1 << gpio.most)))
+                       | (1 << gpio.clk) | (1 << gpio.wren), io + IO_DIR);
        }
 }
 
@@ -2772,6 +2788,9 @@ static int snd_es1968_create(struct snd_card *card,
        snd_card_set_dev(card, &pci->dev);
 
 #ifdef CONFIG_SND_ES1968_RADIO
+       /* don't play with GPIOs on laptops */
+       if (chip->pci->subsystem_vendor != 0x125d)
+               goto no_radio;
        err = v4l2_device_register(&pci->dev, &chip->v4l2_dev);
        if (err < 0) {
                snd_es1968_free(chip);
@@ -2781,10 +2800,18 @@ static int snd_es1968_create(struct snd_card *card,
        chip->tea.private_data = chip;
        chip->tea.radio_nr = radio_nr;
        chip->tea.ops = &snd_es1968_tea_ops;
-       strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card));
        sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
-       if (!snd_tea575x_init(&chip->tea, THIS_MODULE))
-               printk(KERN_INFO "es1968: detected TEA575x radio\n");
+       for (i = 0; i < ARRAY_SIZE(snd_es1968_tea575x_gpios); i++) {
+               chip->tea575x_tuner = i;
+               if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) {
+                       snd_printk(KERN_INFO "es1968: detected TEA575x radio type %s\n",
+                                  get_tea575x_gpio(chip)->name);
+                       strlcpy(chip->tea.card, get_tea575x_gpio(chip)->name,
+                               sizeof(chip->tea.card));
+                       break;
+               }
+       }
+no_radio:
 #endif
 
        *chip_ret = chip;
@@ -2909,7 +2936,6 @@ static int snd_es1968_probe(struct pci_dev *pci,
 static void snd_es1968_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver es1968_driver = {
index 4f07fda..706c5b6 100644 (file)
@@ -1370,7 +1370,6 @@ static int snd_card_fm801_probe(struct pci_dev *pci,
 static void snd_card_fm801_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 #ifdef CONFIG_PM_SLEEP
index 80a7d44..0c5371a 100644 (file)
@@ -140,7 +140,6 @@ config SND_HDA_CODEC_VIA
 
 config SND_HDA_CODEC_HDMI
        bool "Build HDMI/DisplayPort HD-audio codec support"
-       select SND_DYNAMIC_MINORS
        default y
        help
          Say Y here to include HDMI and DisplayPort HD-audio codec
index 55108b5..35090b3 100644 (file)
@@ -185,20 +185,19 @@ EXPORT_SYMBOL_HDA(snd_hda_get_jack_type);
  * Compose a 32bit command word to be sent to the HD-audio controller
  */
 static inline unsigned int
-make_codec_cmd(struct hda_codec *codec, hda_nid_t nid, int direct,
+make_codec_cmd(struct hda_codec *codec, hda_nid_t nid, int flags,
               unsigned int verb, unsigned int parm)
 {
        u32 val;
 
-       if ((codec->addr & ~0xf) || (direct & ~1) || (nid & ~0x7f) ||
+       if ((codec->addr & ~0xf) || (nid & ~0x7f) ||
            (verb & ~0xfff) || (parm & ~0xffff)) {
-               printk(KERN_ERR "hda-codec: out of range cmd %x:%x:%x:%x:%x\n",
-                      codec->addr, direct, nid, verb, parm);
+               printk(KERN_ERR "hda-codec: out of range cmd %x:%x:%x:%x\n",
+                      codec->addr, nid, verb, parm);
                return ~0;
        }
 
        val = (u32)codec->addr << 28;
-       val |= (u32)direct << 27;
        val |= (u32)nid << 20;
        val |= verb << 8;
        val |= parm;
@@ -209,7 +208,7 @@ make_codec_cmd(struct hda_codec *codec, hda_nid_t nid, int direct,
  * Send and receive a verb
  */
 static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd,
-                          unsigned int *res)
+                          int flags, unsigned int *res)
 {
        struct hda_bus *bus = codec->bus;
        int err;
@@ -222,6 +221,8 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd,
  again:
        snd_hda_power_up(codec);
        mutex_lock(&bus->cmd_mutex);
+       if (flags & HDA_RW_NO_RESPONSE_FALLBACK)
+               bus->no_response_fallback = 1;
        for (;;) {
                trace_hda_send_cmd(codec, cmd);
                err = bus->ops.command(bus, cmd);
@@ -234,6 +235,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd,
                *res = bus->ops.get_response(bus, codec->addr);
                trace_hda_get_response(codec, *res);
        }
+       bus->no_response_fallback = 0;
        mutex_unlock(&bus->cmd_mutex);
        snd_hda_power_down(codec);
        if (!codec_in_pm(codec) && res && *res == -1 && bus->rirb_error) {
@@ -255,7 +257,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd,
  * snd_hda_codec_read - send a command and get the response
  * @codec: the HDA codec
  * @nid: NID to send the command
- * @direct: direct flag
+ * @flags: optional bit flags
  * @verb: the verb to send
  * @parm: the parameter for the verb
  *
@@ -264,12 +266,12 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd,
  * Returns the obtained response value, or -1 for an error.
  */
 unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid,
-                               int direct,
+                               int flags,
                                unsigned int verb, unsigned int parm)
 {
-       unsigned cmd = make_codec_cmd(codec, nid, direct, verb, parm);
+       unsigned cmd = make_codec_cmd(codec, nid, flags, verb, parm);
        unsigned int res;
-       if (codec_exec_verb(codec, cmd, &res))
+       if (codec_exec_verb(codec, cmd, flags, &res))
                return -1;
        return res;
 }
@@ -279,7 +281,7 @@ EXPORT_SYMBOL_HDA(snd_hda_codec_read);
  * snd_hda_codec_write - send a single command without waiting for response
  * @codec: the HDA codec
  * @nid: NID to send the command
- * @direct: direct flag
+ * @flags: optional bit flags
  * @verb: the verb to send
  * @parm: the parameter for the verb
  *
@@ -287,12 +289,12 @@ EXPORT_SYMBOL_HDA(snd_hda_codec_read);
  *
  * Returns 0 if successful, or a negative error code.
  */
-int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int direct,
-                        unsigned int verb, unsigned int parm)
+int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int flags,
+                       unsigned int verb, unsigned int parm)
 {
-       unsigned int cmd = make_codec_cmd(codec, nid, direct, verb, parm);
+       unsigned int cmd = make_codec_cmd(codec, nid, flags, verb, parm);
        unsigned int res;
-       return codec_exec_verb(codec, cmd,
+       return codec_exec_verb(codec, cmd, flags,
                               codec->bus->sync_write ? &res : NULL);
 }
 EXPORT_SYMBOL_HDA(snd_hda_codec_write);
@@ -3582,7 +3584,7 @@ EXPORT_SYMBOL_HDA(snd_hda_create_spdif_in_ctls);
  * snd_hda_codec_write_cache - send a single command with caching
  * @codec: the HDA codec
  * @nid: NID to send the command
- * @direct: direct flag
+ * @flags: optional bit flags
  * @verb: the verb to send
  * @parm: the parameter for the verb
  *
@@ -3591,7 +3593,7 @@ EXPORT_SYMBOL_HDA(snd_hda_create_spdif_in_ctls);
  * Returns 0 if successful, or a negative error code.
  */
 int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
-                             int direct, unsigned int verb, unsigned int parm)
+                             int flags, unsigned int verb, unsigned int parm)
 {
        int err;
        struct hda_cache_head *c;
@@ -3600,7 +3602,7 @@ int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
 
        cache_only = codec->cached_write;
        if (!cache_only) {
-               err = snd_hda_codec_write(codec, nid, direct, verb, parm);
+               err = snd_hda_codec_write(codec, nid, flags, verb, parm);
                if (err < 0)
                        return err;
        }
@@ -3624,7 +3626,7 @@ EXPORT_SYMBOL_HDA(snd_hda_codec_write_cache);
  * snd_hda_codec_update_cache - check cache and write the cmd only when needed
  * @codec: the HDA codec
  * @nid: NID to send the command
- * @direct: direct flag
+ * @flags: optional bit flags
  * @verb: the verb to send
  * @parm: the parameter for the verb
  *
@@ -3635,7 +3637,7 @@ EXPORT_SYMBOL_HDA(snd_hda_codec_write_cache);
  * Returns 0 if successful, or a negative error code.
  */
 int snd_hda_codec_update_cache(struct hda_codec *codec, hda_nid_t nid,
-                              int direct, unsigned int verb, unsigned int parm)
+                              int flags, unsigned int verb, unsigned int parm)
 {
        struct hda_cache_head *c;
        u32 key;
@@ -3651,7 +3653,7 @@ int snd_hda_codec_update_cache(struct hda_codec *codec, hda_nid_t nid,
                return 0;
        }
        mutex_unlock(&codec->bus->cmd_mutex);
-       return snd_hda_codec_write_cache(codec, nid, direct, verb, parm);
+       return snd_hda_codec_write_cache(codec, nid, flags, verb, parm);
 }
 EXPORT_SYMBOL_HDA(snd_hda_codec_update_cache);
 
@@ -3806,11 +3808,13 @@ static unsigned int hda_set_power_state(struct hda_codec *codec,
        hda_nid_t fg = codec->afg ? codec->afg : codec->mfg;
        int count;
        unsigned int state;
+       int flags = 0;
 
        /* this delay seems necessary to avoid click noise at power-down */
        if (power_state == AC_PWRST_D3) {
                /* transition time less than 10ms for power down */
                msleep(codec->epss ? 10 : 100);
+               flags = HDA_RW_NO_RESPONSE_FALLBACK;
        }
 
        /* repeat power states setting at most 10 times*/
@@ -3819,7 +3823,7 @@ static unsigned int hda_set_power_state(struct hda_codec *codec,
                        codec->patch_ops.set_power_state(codec, fg,
                                                         power_state);
                else {
-                       snd_hda_codec_read(codec, fg, 0,
+                       snd_hda_codec_read(codec, fg, flags,
                                           AC_VERB_SET_POWER_STATE,
                                           power_state);
                        snd_hda_codec_set_power_to_all(codec, fg, power_state);
@@ -4461,12 +4465,13 @@ const char *snd_hda_pcm_type_name[HDA_PCM_NTYPES] = {
 
 /*
  * get the empty PCM device number to assign
- *
- * note the max device number is limited by HDA_MAX_PCMS, currently 10
  */
-static int get_empty_pcm_device(struct hda_bus *bus, int type)
+static int get_empty_pcm_device(struct hda_bus *bus, unsigned int type)
 {
        /* audio device indices; not linear to keep compatibility */
+       /* assigned to static slots up to dev#10; if more needed, assign
+        * the later slot dynamically (when CONFIG_SND_DYNAMIC_MINORS=y)
+        */
        static int audio_idx[HDA_PCM_NTYPES][5] = {
                [HDA_PCM_TYPE_AUDIO] = { 0, 2, 4, 5, -1 },
                [HDA_PCM_TYPE_SPDIF] = { 1, -1 },
@@ -4480,18 +4485,28 @@ static int get_empty_pcm_device(struct hda_bus *bus, int type)
                return -EINVAL;
        }
 
-       for (i = 0; audio_idx[type][i] >= 0 ; i++)
+       for (i = 0; audio_idx[type][i] >= 0; i++) {
+#ifndef CONFIG_SND_DYNAMIC_MINORS
+               if (audio_idx[type][i] >= 8)
+                       break;
+#endif
                if (!test_and_set_bit(audio_idx[type][i], bus->pcm_dev_bits))
                        return audio_idx[type][i];
+       }
 
+#ifdef CONFIG_SND_DYNAMIC_MINORS
        /* non-fixed slots starting from 10 */
        for (i = 10; i < 32; i++) {
                if (!test_and_set_bit(i, bus->pcm_dev_bits))
                        return i;
        }
+#endif
 
        snd_printk(KERN_WARNING "Too many %s devices\n",
                snd_hda_pcm_type_name[type]);
+#ifndef CONFIG_SND_DYNAMIC_MINORS
+       snd_printk(KERN_WARNING "Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y\n");
+#endif
        return -EAGAIN;
 }
 
index c93f902..701c2e0 100644 (file)
@@ -679,6 +679,7 @@ struct hda_bus {
        unsigned int response_reset:1;  /* controller was reset */
        unsigned int in_reset:1;        /* during reset operation */
        unsigned int power_keep_link_on:1; /* don't power off HDA link */
+       unsigned int no_response_fallback:1; /* don't fallback at RIRB error */
 
        int primary_dig_out_type;       /* primary digital out PCM type */
 };
@@ -930,6 +931,8 @@ enum {
        HDA_INPUT, HDA_OUTPUT
 };
 
+/* snd_hda_codec_read/write optional flags */
+#define HDA_RW_NO_RESPONSE_FALLBACK    (1 << 0)
 
 /*
  * constructors
@@ -945,9 +948,9 @@ int snd_hda_codec_update_widgets(struct hda_codec *codec);
  * low level functions
  */
 unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid,
-                               int direct,
+                               int flags,
                                unsigned int verb, unsigned int parm);
-int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int direct,
+int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int flags,
                        unsigned int verb, unsigned int parm);
 #define snd_hda_param_read(codec, nid, param) \
        snd_hda_codec_read(codec, nid, 0, AC_VERB_PARAMETERS, param)
@@ -986,11 +989,11 @@ int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex);
 
 /* cached write */
 int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
-                             int direct, unsigned int verb, unsigned int parm);
+                             int flags, unsigned int verb, unsigned int parm);
 void snd_hda_sequence_write_cache(struct hda_codec *codec,
                                  const struct hda_verb *seq);
 int snd_hda_codec_update_cache(struct hda_codec *codec, hda_nid_t nid,
-                             int direct, unsigned int verb, unsigned int parm);
+                             int flags, unsigned int verb, unsigned int parm);
 void snd_hda_codec_resume_cache(struct hda_codec *codec);
 /* both for cmd & amp caches */
 void snd_hda_codec_flush_cache(struct hda_codec *codec);
index de18722..f089fa0 100644 (file)
@@ -942,6 +942,9 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
                }
        }
 
+       if (!bus->no_response_fallback)
+               return -1;
+
        if (!chip->polling_mode && chip->poll_count < 2) {
                snd_printdd(SFX "%s: azx_get_response timeout, "
                           "polling the codec once: last cmd=0x%08x\n",
@@ -3764,7 +3767,6 @@ static int azx_probe(struct pci_dev *pci,
 
 out_free:
        snd_card_free(card);
-       pci_set_drvdata(pci, NULL);
        return err;
 }
 
@@ -3834,7 +3836,6 @@ static void azx_remove(struct pci_dev *pci)
 
        if (card)
                snd_card_free(card);
-       pci_set_drvdata(pci, NULL);
 }
 
 /* PCI IDs */
@@ -3878,6 +3879,9 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
        /* Oaktrail */
        { PCI_DEVICE(0x8086, 0x080a),
          .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
+       /* BayTrail */
+       { PCI_DEVICE(0x8086, 0x0f04),
+         .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM },
        /* ICH */
        { PCI_DEVICE(0x8086, 0x2668),
          .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_OLD_SSYNC |
index 403010c..ad087ea 100644 (file)
@@ -3225,6 +3225,7 @@ enum {
        ALC271_FIXUP_HP_GATE_MIC_JACK,
        ALC269_FIXUP_ACER_AC700,
        ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
+       ALC269VB_FIXUP_ORDISSIMO_EVE2,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -3467,6 +3468,15 @@ static const struct hda_fixup alc269_fixups[] = {
                .type = HDA_FIXUP_FUNC,
                .v.func = alc269_fixup_limit_int_mic_boost,
        },
+       [ALC269VB_FIXUP_ORDISSIMO_EVE2] = {
+               .type = HDA_FIXUP_PINS,
+               .v.pins = (const struct hda_pintbl[]) {
+                       { 0x12, 0x99a3092f }, /* int-mic */
+                       { 0x18, 0x03a11d20 }, /* mic */
+                       { 0x19, 0x411111f0 }, /* Unused bogus pin */
+                       { }
+               },
+       },
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -3539,6 +3549,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
        SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
        SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
        SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
+       SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
 
 #if 0
        /* Below is a quirk table taken from the old code.
index 1d9d642..9b6cb27 100644 (file)
@@ -2233,6 +2233,10 @@ static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = {
                          "HP Folio", STAC_92HD83XXX_HP_MIC_LED),
        SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x1900,
                          "HP", STAC_92HD83XXX_HP_MIC_LED),
+       SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x2000,
+                         "HP", STAC_92HD83XXX_HP_MIC_LED),
+       SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x2100,
+                         "HP", STAC_92HD83XXX_HP_MIC_LED),
        SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3388,
                          "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
        SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3389,
index e524554..cf31b66 100644 (file)
@@ -480,14 +480,9 @@ static int via_suspend(struct hda_codec *codec)
        struct via_spec *spec = codec->spec;
        vt1708_stop_hp_work(codec);
 
-       if (spec->codec_type == VT1802) {
-               /* Fix pop noise on headphones */
-               int i;
-               for (i = 0; i < spec->gen.autocfg.hp_outs; i++)
-                       snd_hda_codec_write(codec, spec->gen.autocfg.hp_pins[i],
-                                           0, AC_VERB_SET_PIN_WIDGET_CONTROL,
-                                           0x00);
-       }
+       /* Fix pop noise on headphones */
+       if (spec->codec_type == VT1802)
+               snd_hda_shutup_pins(codec);
 
        return 0;
 }
index 806407a..28ec872 100644 (file)
@@ -2807,7 +2807,6 @@ static void snd_ice1712_remove(struct pci_dev *pci)
        if (ice->card_info && ice->card_info->chip_exit)
                ice->card_info->chip_exit(ice);
        snd_card_free(card);
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver ice1712_driver = {
index ce70e7f..5004717 100644 (file)
@@ -2800,7 +2800,6 @@ static void snd_vt1724_remove(struct pci_dev *pci)
        if (ice->card_info && ice->card_info->chip_exit)
                ice->card_info->chip_exit(ice);
        snd_card_free(card);
-       pci_set_drvdata(pci, NULL);
 }
 
 #ifdef CONFIG_PM_SLEEP
index b8fe405..59c8aae 100644 (file)
@@ -3364,7 +3364,6 @@ static int snd_intel8x0_probe(struct pci_dev *pci,
 static void snd_intel8x0_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver intel8x0_driver = {
index fea09e8..3573c11 100644 (file)
@@ -1328,7 +1328,6 @@ static int snd_intel8x0m_probe(struct pci_dev *pci,
 static void snd_intel8x0m_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver intel8x0m_driver = {
index 43b4228..9cf9829 100644 (file)
@@ -2473,7 +2473,6 @@ snd_korg1212_probe(struct pci_dev *pci,
 static void snd_korg1212_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver korg1212_driver = {
index 322b638..7307d97 100644 (file)
@@ -759,7 +759,6 @@ out_free:
 static void lola_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 /* PCI IDs */
index 298bc9b..3230e57 100644 (file)
@@ -1139,7 +1139,6 @@ out_free:
 static void snd_lx6464es_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 
index c76ac14..d541736 100644 (file)
@@ -2775,7 +2775,6 @@ snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 static void snd_m3_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver m3_driver = {
index 934dec9..1e0f6ee 100644 (file)
@@ -1377,7 +1377,6 @@ static int snd_mixart_probe(struct pci_dev *pci,
 static void snd_mixart_remove(struct pci_dev *pci)
 {
        snd_mixart_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver mixart_driver = {
index 6febedb..fe79fff 100644 (file)
@@ -1746,7 +1746,6 @@ static int snd_nm256_probe(struct pci_dev *pci,
 static void snd_nm256_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 
index 9562dc6..b0cb48a 100644 (file)
@@ -722,7 +722,6 @@ EXPORT_SYMBOL(oxygen_pci_probe);
 void oxygen_pci_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 EXPORT_SYMBOL(oxygen_pci_remove);
 
index b97384a..d379b28 100644 (file)
@@ -1691,7 +1691,6 @@ static int pcxhr_probe(struct pci_dev *pci,
 static void pcxhr_remove(struct pci_dev *pci)
 {
        pcxhr_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver pcxhr_driver = {
index 63c1c80..56cc891 100644 (file)
@@ -2066,7 +2066,6 @@ static void snd_riptide_joystick_remove(struct pci_dev *pci)
        if (gameport) {
                release_region(gameport->io, 8);
                gameport_unregister_port(gameport);
-               pci_set_drvdata(pci, NULL);
        }
 }
 #endif
@@ -2179,7 +2178,6 @@ snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 static void snd_card_riptide_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver driver = {
index 0ecd410..cc26346 100644 (file)
@@ -1981,7 +1981,6 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 static void snd_rme32_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver rme32_driver = {
index 5fb88ac..2a8ad9d 100644 (file)
@@ -2390,7 +2390,6 @@ snd_rme96_probe(struct pci_dev *pci,
 static void snd_rme96_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver rme96_driver = {
index 94084cd..4f255df 100644 (file)
@@ -5412,7 +5412,6 @@ static int snd_hdsp_probe(struct pci_dev *pci,
 static void snd_hdsp_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver hdsp_driver = {
index 9ea05e9..bd50193 100644 (file)
@@ -400,8 +400,8 @@ MODULE_SUPPORTED_DEVICE("{{RME HDSPM-MADI}}");
 
 #define HDSPM_wc_freq0 (1<<5)  /* input freq detected via autosync  */
 #define HDSPM_wc_freq1 (1<<6)  /* 001=32, 010==44.1, 011=48, */
-#define HDSPM_wc_freq2 (1<<7)  /* 100=64, 101=88.2, 110=96, */
-/* missing Bit   for               111=128, 1000=176.4, 1001=192 */
+#define HDSPM_wc_freq2 (1<<7)  /* 100=64, 101=88.2, 110=96, 111=128 */
+#define HDSPM_wc_freq3 0x800   /* 1000=176.4, 1001=192 */
 
 #define HDSPM_SyncRef0 0x10000  /* Sync Reference */
 #define HDSPM_SyncRef1 0x20000
@@ -412,13 +412,17 @@ MODULE_SUPPORTED_DEVICE("{{RME HDSPM-MADI}}");
 
 #define HDSPM_wc_valid (HDSPM_wcLock|HDSPM_wcSync)
 
-#define HDSPM_wcFreqMask  (HDSPM_wc_freq0|HDSPM_wc_freq1|HDSPM_wc_freq2)
+#define HDSPM_wcFreqMask  (HDSPM_wc_freq0|HDSPM_wc_freq1|HDSPM_wc_freq2|\
+                           HDSPM_wc_freq3)
 #define HDSPM_wcFreq32    (HDSPM_wc_freq0)
 #define HDSPM_wcFreq44_1  (HDSPM_wc_freq1)
 #define HDSPM_wcFreq48    (HDSPM_wc_freq0|HDSPM_wc_freq1)
 #define HDSPM_wcFreq64    (HDSPM_wc_freq2)
 #define HDSPM_wcFreq88_2  (HDSPM_wc_freq0|HDSPM_wc_freq2)
 #define HDSPM_wcFreq96    (HDSPM_wc_freq1|HDSPM_wc_freq2)
+#define HDSPM_wcFreq128   (HDSPM_wc_freq0|HDSPM_wc_freq1|HDSPM_wc_freq2)
+#define HDSPM_wcFreq176_4 (HDSPM_wc_freq3)
+#define HDSPM_wcFreq192   (HDSPM_wc_freq0|HDSPM_wc_freq3)
 
 #define HDSPM_status1_F_0 0x0400000
 #define HDSPM_status1_F_1 0x0800000
@@ -1087,6 +1091,26 @@ static int hdspm_round_frequency(int rate)
                return 48000;
 }
 
+/* QS and DS rates normally can not be detected
+ * automatically by the card. Only exception is MADI
+ * in 96k frame mode.
+ *
+ * So if we read SS values (32 .. 48k), check for
+ * user-provided DS/QS bits in the control register
+ * and multiply the base frequency accordingly.
+ */
+static int hdspm_rate_multiplier(struct hdspm *hdspm, int rate)
+{
+       if (rate <= 48000) {
+               if (hdspm->control_register & HDSPM_QuadSpeed)
+                       return rate * 4;
+               else if (hdspm->control_register &
+                               HDSPM_DoubleSpeed)
+                       return rate * 2;
+       };
+       return rate;
+}
+
 static int hdspm_tco_sync_check(struct hdspm *hdspm);
 static int hdspm_sync_in_sync_check(struct hdspm *hdspm);
 
@@ -1181,6 +1205,15 @@ static int hdspm_external_sample_rate(struct hdspm *hdspm)
                        case HDSPM_wcFreq96:
                                rate = 96000;
                                break;
+                       case HDSPM_wcFreq128:
+                               rate = 128000;
+                               break;
+                       case HDSPM_wcFreq176_4:
+                               rate = 176400;
+                               break;
+                       case HDSPM_wcFreq192:
+                               rate = 192000;
+                               break;
                        default:
                                rate = 0;
                                break;
@@ -1192,7 +1225,7 @@ static int hdspm_external_sample_rate(struct hdspm *hdspm)
                 */
                if (rate != 0 &&
                (status2 & HDSPM_SelSyncRefMask) == HDSPM_SelSyncRef_WORD)
-                       return rate;
+                       return hdspm_rate_multiplier(hdspm, rate);
 
                /* maybe a madi input (which is taken if sel sync is madi) */
                if (status & HDSPM_madiLock) {
@@ -1255,21 +1288,8 @@ static int hdspm_external_sample_rate(struct hdspm *hdspm)
                        }
                }
 
-               /* QS and DS rates normally can not be detected
-                * automatically by the card. Only exception is MADI
-                * in 96k frame mode.
-                *
-                * So if we read SS values (32 .. 48k), check for
-                * user-provided DS/QS bits in the control register
-                * and multiply the base frequency accordingly.
-                */
-               if (rate <= 48000) {
-                       if (hdspm->control_register & HDSPM_QuadSpeed)
-                               rate *= 4;
-                       else if (hdspm->control_register &
-                                       HDSPM_DoubleSpeed)
-                               rate *= 2;
-               }
+               rate = hdspm_rate_multiplier(hdspm, rate);
+
                break;
        }
 
@@ -6737,7 +6757,6 @@ static int snd_hdspm_probe(struct pci_dev *pci,
 static void snd_hdspm_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver hdspm_driver = {
index 773a67f..b96d9e1 100644 (file)
@@ -2628,7 +2628,6 @@ static int snd_rme9652_probe(struct pci_dev *pci,
 static void snd_rme9652_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver rme9652_driver = {
index 748e82d..e413b4e 100644 (file)
@@ -1482,7 +1482,6 @@ error_out:
 static void snd_sis7019_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver sis7019_driver = {
index a2e7686..2a46bf9 100644 (file)
@@ -1528,7 +1528,6 @@ static int snd_sonic_probe(struct pci_dev *pci,
 static void snd_sonic_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver sonicvibes_driver = {
index 1aefd62..b3b588b 100644 (file)
@@ -169,7 +169,6 @@ static int snd_trident_probe(struct pci_dev *pci,
 static void snd_trident_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver trident_driver = {
index d756a35..3c511d0 100644 (file)
@@ -2646,7 +2646,6 @@ static int snd_via82xx_probe(struct pci_dev *pci,
 static void snd_via82xx_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver via82xx_driver = {
index 4f5fd80..ca19028 100644 (file)
@@ -1227,7 +1227,6 @@ static int snd_via82xx_probe(struct pci_dev *pci,
 static void snd_via82xx_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver via82xx_modem_driver = {
index e2f1ab3..ab8a9b1 100644 (file)
@@ -254,7 +254,6 @@ static int snd_vx222_probe(struct pci_dev *pci,
 static void snd_vx222_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 #ifdef CONFIG_PM_SLEEP
index 01c4965..e8932b2 100644 (file)
@@ -347,7 +347,6 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci,
 static void snd_card_ymfpci_remove(struct pci_dev *pci)
 {
        snd_card_free(pci_get_drvdata(pci));
-       pci_set_drvdata(pci, NULL);
 }
 
 static struct pci_driver ymfpci_driver = {
index 09fc848..8abb521 100644 (file)
@@ -139,7 +139,6 @@ __error:
 static int snd_pmac_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
-       platform_set_drvdata(devptr, NULL);
        return 0;
 }
 
index e59a73a..78a3697 100644 (file)
@@ -598,7 +598,6 @@ static int snd_aica_remove(struct platform_device *devptr)
                return -ENODEV;
        snd_card_free(dreamcastcard->card);
        kfree(dreamcastcard);
-       platform_set_drvdata(devptr, NULL);
        return 0;
 }
 
index e68c4fc..7c9422c 100644 (file)
@@ -290,8 +290,6 @@ static int snd_sh_dac_pcm(struct snd_sh_dac *chip, int device)
 static int snd_sh_dac_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
-       platform_set_drvdata(devptr, NULL);
-
        return 0;
 }
 
index 75e6016..eee7afc 100644 (file)
@@ -2670,8 +2670,6 @@ static int dbri_remove(struct platform_device *op)
        snd_dbri_free(card->private_data);
        snd_card_free(card);
 
-       dev_set_drvdata(&op->dev, NULL);
-
        return 0;
 }
 
index a1a24b9..8e3d9a6 100644 (file)
@@ -1070,7 +1070,6 @@ out:
 
        ssc_free(chip->ssc);
        snd_card_free(card);
-       dev_set_drvdata(&spi->dev, NULL);
 
        return 0;
 }
index b376532..4967fe9 100644 (file)
@@ -695,9 +695,6 @@ static int usX2Y_rate_set(struct usX2Ydev *usX2Y, int rate)
                        ((char*)(usbdata + i))[1] = ra[i].c2;
                        usb_fill_bulk_urb(us->urb[i], usX2Y->dev, usb_sndbulkpipe(usX2Y->dev, 4),
                                          usbdata + i, 2, i_usX2Y_04Int, usX2Y);
-#ifdef OLD_USB
-                       us->urb[i]->transfer_flags = USB_QUEUE_BULK;
-#endif
                }
                us->submitted = 0;
                us->len =       NOOF_SETRATE_URBS;