- patches.apparmor/remove_suid_new_case_in_2.6.22.diff: Merge fix.
[linux-flexiantxendom0-3.2.10.git] / drivers / ata / pata_cs5530.c
index db63e80..848f030 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/dmi.h>
 
 #define DRV_NAME       "pata_cs5530"
-#define DRV_VERSION    "0.7.2"
+#define DRV_VERSION    "0.7.3"
 
 static void __iomem *cs5530_port_base(struct ata_port *ap)
 {
@@ -160,18 +160,6 @@ static unsigned int cs5530_qc_issue_prot(struct ata_queued_cmd *qc)
        return ata_qc_issue_prot(qc);
 }
 
-static int cs5530_pre_reset(struct ata_port *ap)
-{
-       ap->cbl = ATA_CBL_PATA40;
-       return ata_std_prereset(ap);
-}
-
-static void cs5530_error_handler(struct ata_port *ap)
-{
-       return ata_bmdma_drive_eh(ap, cs5530_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-
 static struct scsi_host_template cs5530_sht = {
        .module                 = THIS_MODULE,
        .name                   = DRV_NAME,
@@ -188,10 +176,6 @@ static struct scsi_host_template cs5530_sht = {
        .slave_configure        = ata_scsi_slave_config,
        .slave_destroy          = ata_scsi_slave_destroy,
        .bios_param             = ata_std_bios_param,
-#ifdef CONFIG_PM
-       .resume                 = ata_scsi_device_resume,
-       .suspend                = ata_scsi_device_suspend,
-#endif
 };
 
 static struct ata_port_operations cs5530_port_ops = {
@@ -213,8 +197,9 @@ static struct ata_port_operations cs5530_port_ops = {
 
        .freeze         = ata_bmdma_freeze,
        .thaw           = ata_bmdma_thaw,
-       .error_handler  = cs5530_error_handler,
+       .error_handler  = ata_bmdma_error_handler,
        .post_internal_cmd = ata_bmdma_post_internal_cmd,
+       .cable_detect   = ata_cable_40wire,
 
        .qc_prep        = ata_qc_prep,
        .qc_issue       = cs5530_qc_issue_prot,
@@ -350,7 +335,7 @@ fail_put:
 
 static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
-       static struct ata_port_info info = {
+       static const struct ata_port_info info = {
                .sht = &cs5530_sht,
                .flags = ATA_FLAG_SLAVE_POSS|ATA_FLAG_SRST,
                .pio_mask = 0x1f,
@@ -359,23 +344,23 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
                .port_ops = &cs5530_port_ops
        };
        /* The docking connector doesn't do UDMA, and it seems not MWDMA */
-       static struct ata_port_info info_palmax_secondary = {
+       static const struct ata_port_info info_palmax_secondary = {
                .sht = &cs5530_sht,
                .flags = ATA_FLAG_SLAVE_POSS|ATA_FLAG_SRST,
                .pio_mask = 0x1f,
                .port_ops = &cs5530_port_ops
        };
-       static struct ata_port_info *port_info[2] = { &info, &info };
+       const struct ata_port_info *ppi[] = { &info, NULL };
 
        /* Chip initialisation */
        if (cs5530_init_chip())
                return -ENODEV;
 
        if (cs5530_is_palmax())
-               port_info[1] = &info_palmax_secondary;
+               ppi[1] = &info_palmax_secondary;
 
        /* Now kick off ATA set up */
-       return ata_pci_init_one(pdev, port_info, 2);
+       return ata_pci_init_one(pdev, ppi);
 }
 
 #ifdef CONFIG_PM