]> err.no Git - linux-2.6/blobdiff - drivers/scsi/ata_piix.c
[SCSI] remove Scsi_Host_Template typedef
[linux-2.6] / drivers / scsi / ata_piix.c
index be021478f41628ddc53f95adf0150534ce937454..7fc8873de0b63f416e5796fcc040d5bae773a975 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/init.h>
 #include <linux/blkdev.h>
 #include <linux/delay.h>
+#include <linux/device.h>
 #include "scsi.h"
 #include <scsi/scsi_host.h>
 #include <linux/libata.h>
@@ -127,7 +128,7 @@ static struct pci_driver piix_pci_driver = {
        .remove                 = ata_pci_remove_one,
 };
 
-static Scsi_Host_Template piix_sht = {
+static struct scsi_host_template piix_sht = {
        .module                 = THIS_MODULE,
        .name                   = DRV_NAME,
        .ioctl                  = ata_scsi_ioctl,
@@ -621,18 +622,19 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        static int printed_version;
        struct ata_port_info *port_info[2];
-       unsigned int combined = 0, n_ports = 1;
+       unsigned int combined = 0;
        unsigned int pata_chan = 0, sata_chan = 0;
 
        if (!printed_version++)
-               printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
+               dev_printk(KERN_DEBUG, &pdev->dev,
+                          "version " DRV_VERSION "\n");
 
        /* no hotplugging support (FIXME) */
        if (!in_module_init)
                return -ENODEV;
 
        port_info[0] = &piix_port_info[ent->driver_data];
-       port_info[1] = NULL;
+       port_info[1] = &piix_port_info[ent->driver_data];
 
        if (port_info[0]->host_flags & PIIX_FLAG_AHCI) {
                u8 tmp;
@@ -670,12 +672,13 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
                port_info[sata_chan] = &piix_port_info[ent->driver_data];
                port_info[sata_chan]->host_flags |= ATA_FLAG_SLAVE_POSS;
                port_info[pata_chan] = &piix_port_info[ich5_pata];
-               n_ports++;
 
-               printk(KERN_WARNING DRV_NAME ": combined mode detected\n");
+               dev_printk(KERN_WARNING, &pdev->dev,
+                          "combined mode detected (p=%u, s=%u)\n",
+                          pata_chan, sata_chan);
        }
 
-       return ata_pci_init_one(pdev, port_info, n_ports);
+       return ata_pci_init_one(pdev, port_info, 2);
 }
 
 static int __init piix_init(void)