]> err.no Git - linux-2.6/blobdiff - drivers/ide/pci/cs5530.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86
[linux-2.6] / drivers / ide / pci / cs5530.c
index c08416a1e73d3456d240c2675d3cb6d0813d9c39..547690395eee6e3b07bf0c597843ab3a1b0fc106 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/pci/cs5530.c              Version 0.76    Aug 3 2007
+ * linux/drivers/ide/pci/cs5530.c              Version 0.77    Sep 24 2007
  *
  * Copyright (C) 2000                  Andre Hedrick <andre@linux-ide.org>
  * Copyright (C) 2000                  Mark Lord <mlord@pobox.com>
@@ -117,8 +117,7 @@ static void cs5530_set_dma_mode(ide_drive_t *drive, const u8 mode)
                case XFER_MW_DMA_1:     timings = 0x00012121; break;
                case XFER_MW_DMA_2:     timings = 0x00002020; break;
                default:
-                       BUG();
-                       break;
+                       return;
        }
        basereg = CS5530_BASEREG(drive->hwif);
        reg = inl(basereg + 4);                 /* get drive0 config register */
@@ -146,7 +145,6 @@ static void cs5530_set_dma_mode(ide_drive_t *drive, const u8 mode)
 static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const char *name)
 {
        struct pci_dev *master_0 = NULL, *cs5530_0 = NULL;
-       unsigned long flags;
 
        if (pci_resource_start(dev, 4) == 0)
                return -EFAULT;
@@ -171,9 +169,6 @@ static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const ch
                goto out;
        }
 
-       spin_lock_irqsave(&ide_lock, flags);
-               /* all CPUs (there should only be one CPU with this chipset) */
-
        /*
         * Enable BusMaster and MemoryWriteAndInvalidate for the cs5530:
         * -->  OR 0x14 into 16-bit PCI COMMAND reg of function 0 of the cs5530
@@ -224,8 +219,6 @@ static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const ch
        pci_write_config_byte(master_0, 0x42, 0x00);
        pci_write_config_byte(master_0, 0x43, 0xc1);
 
-       spin_unlock_irqrestore(&ide_lock, flags);
-
 out:
        pci_dev_put(master_0);
        pci_dev_put(cs5530_0);
@@ -261,7 +254,7 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif)
        hwif->udma_filter = cs5530_udma_filter;
 }
 
-static struct ide_port_info cs5530_chipset __devinitdata = {
+static const struct ide_port_info cs5530_chipset __devinitdata = {
        .name           = "CS5530",
        .init_chipset   = init_chipset_cs5530,
        .init_hwif      = init_hwif_cs5530,