linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Zhu <richard.zhu@freescale.com>
To: <linux-pci@vger.kernel.org>
Cc: <shawn.guo@freescale.com>, <festevam@gmail.com>,
	<l.stach@pengutronix.de>, <tharvey@gateworks.com>,
	Richard Zhu <richard.zhu@freescale.com>
Subject: [PATCH v6 02/13] PCI: designware: Set func type of host init to int
Date: Thu, 16 Oct 2014 15:52:32 +0800	[thread overview]
Message-ID: <1413445963-24706-3-git-send-email-richard.zhu@freescale.com> (raw)
In-Reply-To: <1413445963-24706-1-git-send-email-richard.zhu@freescale.com>

host init maybe failed, change the func type of host_init
defined in struct pci_host_ops from void to int.

Signed-off-by: Richard Zhu <richard.zhu@freescale.com>
---
 drivers/pci/host/pcie-designware.c | 7 +++++--
 drivers/pci/host/pcie-designware.h | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index b1f82ff..1a2b477 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -578,8 +578,11 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
 		}
 	}
 
-	if (pp->ops->host_init)
-		pp->ops->host_init(pp);
+	if (pp->ops->host_init) {
+		ret = pp->ops->host_init(pp);
+		if (ret < 0)
+			return ret;
+	}
 
 	dw_pcie_wr_own_conf(pp, PCI_BASE_ADDRESS_0, 4, 0);
 
diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
index b0bfed0..57ab11d 100644
--- a/drivers/pci/host/pcie-designware.h
+++ b/drivers/pci/host/pcie-designware.h
@@ -72,7 +72,7 @@ struct pcie_host_ops {
 	int (*wr_other_conf)(struct pcie_port *pp, struct pci_bus *bus,
 			unsigned int devfn, int where, int size, u32 val);
 	int (*link_up)(struct pcie_port *pp);
-	void (*host_init)(struct pcie_port *pp);
+	int (*host_init)(struct pcie_port *pp);
 	void (*msi_set_irq)(struct pcie_port *pp, int irq);
 	void (*msi_clear_irq)(struct pcie_port *pp, int irq);
 	u32 (*get_msi_data)(struct pcie_port *pp);
-- 
1.9.1


  parent reply	other threads:[~2014-10-16  8:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16  7:52 [PATCH v6]PCI: imx6: enable pcie on imx6sx sdb and imx6qdl sabreauto Richard Zhu
2014-10-16  7:52 ` [PATCH v6 01/13] PCI: designware: Refine setup_rc and add msi data restore Richard Zhu
2014-10-16 10:36   ` Lucas Stach
2014-10-20  5:23     ` Hong-Xing.Zhu
2014-10-16  7:52 ` Richard Zhu [this message]
2014-10-16 10:39   ` [PATCH v6 02/13] PCI: designware: Set func type of host init to int Lucas Stach
2014-10-20  5:21     ` Hong-Xing.Zhu
2014-10-16  7:52 ` [PATCH v6 03/13] PCI: dra7xx: Change the func type of host init Richard Zhu
2014-10-16  7:52 ` [PATCH v6 04/13] PCI: exynos: " Richard Zhu
2014-10-16  7:52 ` [PATCH v6 05/13] PCI: spear: " Richard Zhu
2014-10-16  7:52 ` [PATCH v6 06/13] PCI: designware: Fix one potential assignment error of cfg start Richard Zhu
2014-10-16  7:52 ` [PATCH v6 07/13] ARM: imx6sx: Add imx6sx pcie related gpr bits definitions Richard Zhu
2014-10-16  7:52 ` [PATCH v6 08/13] PCI: imx6: Wait the clocks to stabilize after ref_en Richard Zhu
2014-10-16  7:52 ` [PATCH v6 09/13] PCI: imx6: Add imx6sx pcie support Richard Zhu
2014-10-16 10:54   ` Lucas Stach
2014-10-17  2:11     ` Hong-Xing.Zhu
2014-10-16  7:52 ` [PATCH v6 10/13] ARM: imx6qdl: Enable pcie on imx6qdl sabreauto Richard Zhu
2014-10-16  7:52 ` [PATCH v6 11/13] ARM: imx6: Update dts and binding for imx6sx pcie Richard Zhu
2014-10-16  7:52 ` [PATCH v6 12/13] ARM: imx6sx: Add syscon into gpc dts Richard Zhu
2014-10-16  7:52 ` [PATCH v6 13/13] ARM: imx6sx: Enable pcie on imx6sx sdb board Richard Zhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413445963-24706-3-git-send-email-richard.zhu@freescale.com \
    --to=richard.zhu@freescale.com \
    --cc=festevam@gmail.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-pci@vger.kernel.org \
    --cc=shawn.guo@freescale.com \
    --cc=tharvey@gateworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).