From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Subject: [PATCH 2/5] ata: acard-ahci: use the new port_{offset,length} members Date: Fri, 22 Apr 2016 16:32:38 +0200 Message-ID: <1461335561-18363-3-git-send-email-thomas.petazzoni@free-electrons.com> References: <1461335561-18363-1-git-send-email-thomas.petazzoni@free-electrons.com> Return-path: Received: from down.free-electrons.com ([37.187.137.238]:41733 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754374AbcDVOct (ORCPT ); Fri, 22 Apr 2016 10:32:49 -0400 In-Reply-To: <1461335561-18363-1-git-send-email-thomas.petazzoni@free-electrons.com> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Tejun Heo , Hans de Goede , devicetree@vger.kernel.org, Rob Herring , Ian Campbell , Pawel Moll , Mark Rutland , Kumar Gala Cc: linux-ide@vger.kernel.org, Nadav Haklai , Lior Amsalem , Hanna Hawa , Yehuda Yitschak , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Thomas Petazzoni Now that the ahci_host_priv structure contains port_offset and port_length members, this commit moves the acard-ahci driver to use them rather than hardcoded values. Signed-off-by: Thomas Petazzoni --- drivers/ata/acard-ahci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c index ed6a30c..54c8ae4 100644 --- a/drivers/ata/acard-ahci.c +++ b/drivers/ata/acard-ahci.c @@ -476,7 +476,8 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id ata_port_pbar_desc(ap, AHCI_PCI_BAR, -1, "abar"); ata_port_pbar_desc(ap, AHCI_PCI_BAR, - 0x100 + ap->port_no * 0x80, "port"); + hpriv->port_offset + + ap->port_no * hpriv->port_length, "port"); /* set initial link pm policy */ /* -- 2.6.4