diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2014-09-29 12:25:57 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-10-06 11:43:34 -0400 |
commit | a6849b9fdbffd2492a848df942b39d23bd81ef27 (patch) | |
tree | 097c784127a46ccf49d5ede7b9d6279c513906a8 | |
parent | 36888e955c7c7ba8c66756fed60ac6e453fcbb5f (diff) |
AHCI: Pass SCSI host template as arg to ahci_host_activate()
This update is a prerequisite for consolidation of
AHCI host activation code within ahci_host_activate()
function.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org
-rw-r--r-- | drivers/ata/ahci.c | 10 | ||||
-rw-r--r-- | drivers/ata/ahci.h | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index f68a995ec3fd..fcda5b663030 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1230,8 +1230,7 @@ intx: | |||
1230 | * ahci_host_activate - start AHCI host, request IRQs and register it | 1230 | * ahci_host_activate - start AHCI host, request IRQs and register it |
1231 | * @host: target ATA host | 1231 | * @host: target ATA host |
1232 | * @irq: base IRQ number to request | 1232 | * @irq: base IRQ number to request |
1233 | * @irq_handler: irq_handler used when requesting IRQs | 1233 | * @sht: scsi_host_template to use when registering the host |
1234 | * @irq_flags: irq_flags used when requesting IRQs | ||
1235 | * | 1234 | * |
1236 | * Similar to ata_host_activate, but requests IRQs according to AHCI-1.1 | 1235 | * Similar to ata_host_activate, but requests IRQs according to AHCI-1.1 |
1237 | * when multiple MSIs were allocated. That is one MSI per port, starting | 1236 | * when multiple MSIs were allocated. That is one MSI per port, starting |
@@ -1243,7 +1242,8 @@ intx: | |||
1243 | * RETURNS: | 1242 | * RETURNS: |
1244 | * 0 on success, -errno otherwise. | 1243 | * 0 on success, -errno otherwise. |
1245 | */ | 1244 | */ |
1246 | int ahci_host_activate(struct ata_host *host, int irq) | 1245 | int ahci_host_activate(struct ata_host *host, int irq, |
1246 | struct scsi_host_template *sht) | ||
1247 | { | 1247 | { |
1248 | int i, rc; | 1248 | int i, rc; |
1249 | 1249 | ||
@@ -1271,7 +1271,7 @@ int ahci_host_activate(struct ata_host *host, int irq) | |||
1271 | for (i = 0; i < host->n_ports; i++) | 1271 | for (i = 0; i < host->n_ports; i++) |
1272 | ata_port_desc(host->ports[i], "irq %d", irq + i); | 1272 | ata_port_desc(host->ports[i], "irq %d", irq + i); |
1273 | 1273 | ||
1274 | rc = ata_host_register(host, &ahci_sht); | 1274 | rc = ata_host_register(host, sht); |
1275 | if (rc) | 1275 | if (rc) |
1276 | goto out_free_all_irqs; | 1276 | goto out_free_all_irqs; |
1277 | 1277 | ||
@@ -1488,7 +1488,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1488 | pci_set_master(pdev); | 1488 | pci_set_master(pdev); |
1489 | 1489 | ||
1490 | if (hpriv->flags & AHCI_HFLAG_MULTI_MSI) | 1490 | if (hpriv->flags & AHCI_HFLAG_MULTI_MSI) |
1491 | return ahci_host_activate(host, pdev->irq); | 1491 | return ahci_host_activate(host, pdev->irq, &ahci_sht); |
1492 | 1492 | ||
1493 | return ata_host_activate(host, pdev->irq, ahci_interrupt, IRQF_SHARED, | 1493 | return ata_host_activate(host, pdev->irq, ahci_interrupt, IRQF_SHARED, |
1494 | &ahci_sht); | 1494 | &ahci_sht); |
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index a074c7301504..31b4c44e3f71 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h | |||
@@ -392,7 +392,8 @@ irqreturn_t ahci_interrupt(int irq, void *dev_instance); | |||
392 | irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance); | 392 | irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance); |
393 | irqreturn_t ahci_thread_fn(int irq, void *dev_instance); | 393 | irqreturn_t ahci_thread_fn(int irq, void *dev_instance); |
394 | void ahci_print_info(struct ata_host *host, const char *scc_s); | 394 | void ahci_print_info(struct ata_host *host, const char *scc_s); |
395 | int ahci_host_activate(struct ata_host *host, int irq); | 395 | int ahci_host_activate(struct ata_host *host, int irq, |
396 | struct scsi_host_template *sht); | ||
396 | void ahci_error_handler(struct ata_port *ap); | 397 | void ahci_error_handler(struct ata_port *ap); |
397 | 398 | ||
398 | static inline void __iomem *__ahci_port_base(struct ata_host *host, | 399 | static inline void __iomem *__ahci_port_base(struct ata_host *host, |