ahci: Get rid of pci_dev argument in ahci_port_init()
To make the function bus-independand we have to get rid of "struct pci_dev *", so let's pass just "struct devce *". Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
3303040d8b
commit
97cfbfe600
|
@ -1654,7 +1654,7 @@ static ssize_t ahci_activity_show(struct ata_device *dev, char *buf)
|
||||||
return sprintf(buf, "%d\n", emp->blink_policy);
|
return sprintf(buf, "%d\n", emp->blink_policy);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ahci_port_init(struct pci_dev *pdev, struct ata_port *ap,
|
static void ahci_port_init(struct device *dev, struct ata_port *ap,
|
||||||
int port_no, void __iomem *mmio,
|
int port_no, void __iomem *mmio,
|
||||||
void __iomem *port_mmio)
|
void __iomem *port_mmio)
|
||||||
{
|
{
|
||||||
|
@ -1665,8 +1665,7 @@ static void ahci_port_init(struct pci_dev *pdev, struct ata_port *ap,
|
||||||
/* make sure port is not active */
|
/* make sure port is not active */
|
||||||
rc = ahci_deinit_port(ap, &emsg);
|
rc = ahci_deinit_port(ap, &emsg);
|
||||||
if (rc)
|
if (rc)
|
||||||
dev_printk(KERN_WARNING, &pdev->dev,
|
dev_warn(dev, "%s (%d)\n", emsg, rc);
|
||||||
"%s (%d)\n", emsg, rc);
|
|
||||||
|
|
||||||
/* clear SError */
|
/* clear SError */
|
||||||
tmp = readl(port_mmio + PORT_SCR_ERR);
|
tmp = readl(port_mmio + PORT_SCR_ERR);
|
||||||
|
@ -1715,7 +1714,7 @@ static void ahci_init_controller(struct ata_host *host)
|
||||||
if (ata_port_is_dummy(ap))
|
if (ata_port_is_dummy(ap))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ahci_port_init(pdev, ap, i, mmio, port_mmio);
|
ahci_port_init(host->dev, ap, i, mmio, port_mmio);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = readl(mmio + HOST_CTL);
|
tmp = readl(mmio + HOST_CTL);
|
||||||
|
|
Loading…
Reference in New Issue