]> err.no Git - linux-2.6/blobdiff - drivers/ide/pci/hpt34x.c
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
[linux-2.6] / drivers / ide / pci / hpt34x.c
index 7f6abc68c0bbc1d7b3490ec9691dbb79f8afcb39..84c36c117194cb731e24e2ea60ee7b67e2df5681 100644 (file)
@@ -1,7 +1,6 @@
 /*
- * linux/drivers/ide/pci/hpt34x.c              Version 0.40    Sept 10, 2002
- *
  * Copyright (C) 1998-2000     Andre Hedrick <andre@linux-ide.org>
+ *
  * May be copied or modified under the terms of the GNU General Public License
  *
  *
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
-#include <linux/delay.h>
-#include <linux/timer.h>
-#include <linux/mm.h>
 #include <linux/ioport.h>
-#include <linux/blkdev.h>
 #include <linux/hdreg.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/ide.h>
 
-#include <asm/io.h>
-#include <asm/irq.h>
-
 #define HPT343_DEBUG_DRIVE_INFO                0
 
 static void hpt34x_set_mode(ide_drive_t *drive, const u8 speed)
@@ -123,11 +115,10 @@ static unsigned int __devinit init_chipset_hpt34x(struct pci_dev *dev, const cha
        return dev->irq;
 }
 
-static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
-{
-       hwif->set_pio_mode = &hpt34x_set_pio_mode;
-       hwif->set_dma_mode = &hpt34x_set_mode;
-}
+static const struct ide_port_ops hpt34x_port_ops = {
+       .set_pio_mode           = hpt34x_set_pio_mode,
+       .set_dma_mode           = hpt34x_set_mode,
+};
 
 #define IDE_HFLAGS_HPT34X \
        (IDE_HFLAG_NO_ATAPI_DMA | \
@@ -139,16 +130,14 @@ static const struct ide_port_info hpt34x_chipsets[] __devinitdata = {
        { /* 0 */
                .name           = "HPT343",
                .init_chipset   = init_chipset_hpt34x,
-               .init_hwif      = init_hwif_hpt34x,
-               .extra          = 16,
-               .host_flags     = IDE_HFLAGS_HPT34X,
+               .port_ops       = &hpt34x_port_ops,
+               .host_flags     = IDE_HFLAGS_HPT34X | IDE_HFLAG_NON_BOOTABLE,
                .pio_mask       = ATA_PIO5,
        },
        { /* 1 */
                .name           = "HPT345",
                .init_chipset   = init_chipset_hpt34x,
-               .init_hwif      = init_hwif_hpt34x,
-               .extra          = 16,
+               .port_ops       = &hpt34x_port_ops,
                .host_flags     = IDE_HFLAGS_HPT34X | IDE_HFLAG_OFF_BOARD,
                .pio_mask       = ATA_PIO5,
 #ifdef CONFIG_HPT34X_AUTODMA