X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fata%2Fpata_cmd640.c;h=43d198f909680f926464e1583e650166c193b435;hb=444ad82bc3eaa554be40d22dc248e58aeefd54d9;hp=2105985a80135faadbb8b1df84083408a9068ebe;hpb=ded1504dfa0083661fdd1a0a5f021cb7313ffe04;p=linux-2.6 diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c index 2105985a80..43d198f909 100644 --- a/drivers/ata/pata_cmd640.c +++ b/drivers/ata/pata_cmd640.c @@ -107,7 +107,7 @@ static void cmd640_set_piomode(struct ata_port *ap, struct ata_device *adev) pci_write_config_byte(pdev, arttim + 1, (t.active << 4) | t.recover); } else { /* Save the shared timings for channel, they will be loaded - by qc_issue_prot. Reloading the setup time is expensive + by qc_issue_prot. Reloading the setup time is expensive so we keep a merged one loaded */ pci_read_config_byte(pdev, ARTIM23, ®); reg &= 0x3F; @@ -153,7 +153,7 @@ static int cmd640_port_start(struct ata_port *ap) struct pci_dev *pdev = to_pci_dev(ap->host->dev); struct cmd640_reg *timing; - int ret = ata_port_start(ap); + int ret = ata_sff_port_start(ap); if (ret < 0) return ret; @@ -181,14 +181,9 @@ static struct scsi_host_template cmd640_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 cmd640_port_ops = { - .port_disable = ata_port_disable, .set_piomode = cmd640_set_piomode, .mode_filter = ata_pci_default_filter, .tf_load = ata_tf_load, @@ -217,7 +212,6 @@ static struct ata_port_operations cmd640_port_ops = { .irq_handler = ata_interrupt, .irq_clear = ata_bmdma_irq_clear, .irq_on = ata_irq_on, - .irq_ack = ata_irq_ack, .port_start = cmd640_port_start, }; @@ -235,7 +229,7 @@ static void cmd640_hardware_init(struct pci_dev *pdev) pci_write_config_byte(pdev, CMDTIM, 0); /* 512 byte bursts (sector) */ pci_write_config_byte(pdev, BRST, 0x40); - /* + /* * A reporter a long time ago * Had problems with the data fifo * So don't run the risk @@ -253,17 +247,16 @@ static void cmd640_hardware_init(struct pci_dev *pdev) static int cmd640_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 = &cmd640_sht, - .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, + .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, .port_ops = &cmd640_port_ops }; - - static struct ata_port_info *port_info[2] = { &info, &info }; + const struct ata_port_info *ppi[] = { &info, NULL }; cmd640_hardware_init(pdev); - return ata_pci_init_one(pdev, port_info, 2); + return ata_pci_init_one(pdev, ppi); } static int cmd640_reinit_one(struct pci_dev *pdev)