]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-probe.c
hwmon: (lm85) Don't write back cached values
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-probe.c
index 655ec7ef568afbf2930ec27b3e2217a1eadc488a..26e68b65b7cf554c09869f65eba2e8940489238e 100644 (file)
@@ -646,8 +646,6 @@ static int ide_register_port(ide_hwif_t *hwif)
                goto out;
        }
 
-       get_device(&hwif->gendev);
-
        hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev,
                                              MKDEV(0, 0), hwif, hwif->name);
        if (IS_ERR(hwif->portdev)) {
@@ -1220,16 +1218,12 @@ static void drive_release_dev (struct device *dev)
        complete(&drive->gendev_rel_comp);
 }
 
-#ifndef ide_default_irq
-#define ide_default_irq(irq) 0
-#endif
-
 static int hwif_init(ide_hwif_t *hwif)
 {
        int old_irq;
 
        if (!hwif->irq) {
-               hwif->irq = ide_default_irq(hwif->io_ports.data_addr);
+               hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
                if (!hwif->irq) {
                        printk("%s: DISABLED, NO IRQ\n", hwif->name);
                        return 0;
@@ -1259,7 +1253,7 @@ static int hwif_init(ide_hwif_t *hwif)
         *      It failed to initialise. Find the default IRQ for 
         *      this port and try that.
         */
-       hwif->irq = ide_default_irq(hwif->io_ports.data_addr);
+       hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
        if (!hwif->irq) {
                printk("%s: Disabled unable to get IRQ %d.\n",
                        hwif->name, old_irq);
@@ -1333,8 +1327,7 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
 static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
                          const struct ide_port_info *d)
 {
-       if (d->chipset != ide_etrax100)
-               hwif->channel = port;
+       hwif->channel = port;
 
        if (d->chipset)
                hwif->chipset = d->chipset;
@@ -1519,7 +1512,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
                        continue;
                }
 
-               if (d->chipset != ide_etrax100 && (i & 1) && mate) {
+               if ((i & 1) && mate) {
                        hwif->mate = mate;
                        mate->mate = hwif;
                }
@@ -1665,6 +1658,7 @@ static void ide_legacy_init_one(u8 *idx, hw_regs_t *hw, u8 port_no,
 
        ide_std_init_ports(hw, base, ctl);
        hw->irq = irq;
+       hw->chipset = d->chipset;
 
        hwif = ide_find_port_slot(d);
        if (hwif) {