]> err.no Git - linux-2.6/blobdiff - sound/oss/trident.c
udf: fix coding style
[linux-2.6] / sound / oss / trident.c
index 2e3e78e1bf67d3b487ea94035e56279d47193600..6959ee1bd17f46cf41965fb295361c410370fd13 100644 (file)
@@ -2935,7 +2935,7 @@ trident_ac97_set(struct ac97_codec *codec, u8 reg, u16 val)
        do {
                if ((inw(TRID_REG(card, address)) & busy) == 0)
                        break;
-       } while (count--);
+       } while (--count);
 
        data |= (mask | (reg & AC97_REG_ADDR));
 
@@ -2996,7 +2996,7 @@ trident_ac97_get(struct ac97_codec *codec, u8 reg)
                data = inl(TRID_REG(card, address));
                if ((data & busy) == 0)
                        break;
-       } while (count--);
+       } while (--count);
        spin_unlock_irqrestore(&card->lock, flags);
 
        if (count == 0) {
@@ -4454,9 +4454,9 @@ trident_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_id)
 
                /* Add H/W Volume Control By Matt Wu Jul. 06, 2001 */
                card->hwvolctl = 0;
-               pci_dev_m1533 = pci_find_device(PCI_VENDOR_ID_AL,
-                                               PCI_DEVICE_ID_AL_M1533,
-                                               pci_dev_m1533);
+               pci_dev_m1533 = pci_get_device(PCI_VENDOR_ID_AL,
+                                              PCI_DEVICE_ID_AL_M1533,
+                                              pci_dev_m1533);
                rc = -ENODEV;
                if (pci_dev_m1533 == NULL)
                        goto out_proc_fs;
@@ -4470,6 +4470,8 @@ trident_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_id)
                        bits &= 0xbf;   /*clear bit 6 */
                        pci_write_config_byte(pci_dev_m1533, 0x7b, bits);
                }
+               pci_dev_put(pci_dev_m1533);
+
        } else if (card->pci_id == PCI_DEVICE_ID_INTERG_5050) {
                card->alloc_pcm_channel = cyber_alloc_pcm_channel;
                card->alloc_rec_pcm_channel = cyber_alloc_pcm_channel;