diff options
Diffstat (limited to 'drivers/ata/pata_ns87415.c')
| -rw-r--r-- | drivers/ata/pata_ns87415.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c index 16dc3a63a23d..c697219a61a2 100644 --- a/drivers/ata/pata_ns87415.c +++ b/drivers/ata/pata_ns87415.c @@ -1,5 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* - * pata_ns87415.c - NS87415 (non PARISC) PATA + * pata_ns87415.c - NS87415 (and PARISC SUPERIO 87560) PATA * * (C) 2005 Red Hat <alan@lxorguk.ukuu.org.uk> * @@ -15,7 +16,6 @@ * systems. This has its own special mountain of errata. * * TODO: - * Test PARISC SuperIO * Get someone to test on SPARC * Implement lazy pio/dma switching for better performance * 8bit shared timing. @@ -25,7 +25,6 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/pci.h> -#include <linux/init.h> #include <linux/blkdev.h> #include <linux/delay.h> #include <linux/device.h> @@ -114,7 +113,7 @@ static void ns87415_set_piomode(struct ata_port *ap, struct ata_device *adev) * ns87415_bmdma_setup - Set up DMA * @qc: Command block * - * Set up for bus masterng DMA. We have to do this ourselves + * Set up for bus mastering DMA. We have to do this ourselves * rather than use the helper due to a chip erratum */ @@ -175,7 +174,7 @@ static void ns87415_bmdma_stop(struct ata_queued_cmd *qc) * ns87415_irq_clear - Clear interrupt * @ap: Channel to clear * - * Erratum: Due to a chip bug regisers 02 and 0A bit 1 and 2 (the + * Erratum: Due to a chip bug registers 02 and 0A bit 1 and 2 (the * error bits) are reset by writing to register 00 or 08. */ @@ -261,12 +260,12 @@ static u8 ns87560_check_status(struct ata_port *ap) * LOCKING: * Inherited from caller. */ -void ns87560_tf_read(struct ata_port *ap, struct ata_taskfile *tf) +static void ns87560_tf_read(struct ata_port *ap, struct ata_taskfile *tf) { struct ata_ioports *ioaddr = &ap->ioaddr; - tf->command = ns87560_check_status(ap); - tf->feature = ioread8(ioaddr->error_addr); + tf->status = ns87560_check_status(ap); + tf->error = ioread8(ioaddr->error_addr); tf->nsect = ioread8(ioaddr->nsect_addr); tf->lbal = ioread8(ioaddr->lbal_addr); tf->lbam = ioread8(ioaddr->lbam_addr); @@ -321,7 +320,7 @@ static struct ata_port_operations ns87560_pata_ops = { }; #endif -static struct scsi_host_template ns87415_sht = { +static const struct scsi_host_template ns87415_sht = { ATA_BMDMA_SHT(DRV_NAME), }; @@ -386,7 +385,7 @@ static const struct pci_device_id ns87415_pci_tbl[] = { { } /* terminate list */ }; -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int ns87415_reinit_one(struct pci_dev *pdev) { struct ata_host *host = pci_get_drvdata(pdev); @@ -408,7 +407,7 @@ static struct pci_driver ns87415_pci_driver = { .id_table = ns87415_pci_tbl, .probe = ns87415_init_one, .remove = ata_pci_remove_one, -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP .suspend = ata_pci_device_suspend, .resume = ns87415_reinit_one, #endif |
