summaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_inic162x.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-04-30 16:35:08 +0900
committerJeff Garzik <jgarzik@redhat.com>2008-05-06 11:40:52 -0400
commit36f674d9a65264d3826ca7300bed441e22a624b2 (patch)
tree17df5a889b9c9fed43f9d1fc0f2ef031b47879d3 /drivers/ata/sata_inic162x.c
parentc46938ccfe35a58a0873715ee4c26fc9eb8d87b3 (diff)
downloadop-kernel-dev-36f674d9a65264d3826ca7300bed441e22a624b2.zip
op-kernel-dev-36f674d9a65264d3826ca7300bed441e22a624b2.tar.gz
sata_inic162x: misc clean ups
* use larger indents for structure member definitions * kill unused variable @addr in inic_scr_write() * kill unnecessary flushes in inic_freeze/thaw() * kill buggy explicit kfree() on devres managed port private data This is in preparation of further inic162x updates. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_inic162x.c')
-rw-r--r--drivers/ata/sata_inic162x.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index d27bb9a..1f5d17e 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -99,13 +99,13 @@ enum {
};
struct inic_host_priv {
- u16 cached_hctl;
+ u16 cached_hctl;
};
struct inic_port_priv {
- u8 dfl_prdctl;
- u8 cached_prdctl;
- u8 cached_pirq_mask;
+ u8 dfl_prdctl;
+ u8 cached_prdctl;
+ u8 cached_pirq_mask;
};
static struct scsi_host_template inic_sht = {
@@ -185,12 +185,10 @@ static int inic_scr_read(struct ata_port *ap, unsigned sc_reg, u32 *val)
static int inic_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val)
{
void __iomem *scr_addr = ap->ioaddr.scr_addr;
- void __iomem *addr;
if (unlikely(sc_reg >= ARRAY_SIZE(scr_map)))
return -EINVAL;
- addr = scr_addr + scr_map[sc_reg] * 4;
writel(val, scr_addr + scr_map[sc_reg] * 4);
return 0;
}
@@ -367,8 +365,6 @@ static void inic_freeze(struct ata_port *ap)
ap->ops->sff_check_status(ap);
writeb(0xff, port_base + PORT_IRQ_STAT);
-
- readb(port_base + PORT_IRQ_STAT); /* flush */
}
static void inic_thaw(struct ata_port *ap)
@@ -379,8 +375,6 @@ static void inic_thaw(struct ata_port *ap)
writeb(0xff, port_base + PORT_IRQ_STAT);
__inic_set_pirq_mask(ap, PIRQ_MASK_OTHER);
-
- readb(port_base + PORT_IRQ_STAT); /* flush */
}
/*
@@ -506,10 +500,8 @@ static int inic_port_start(struct ata_port *ap)
/* Alloc resources */
rc = ata_port_start(ap);
- if (rc) {
- kfree(pp);
+ if (rc)
return rc;
- }
init_port(ap);
OpenPOWER on IntegriCloud