linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jonas.gorski@gmail.com (Jonas Gorski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] bcm63xx_enet: do not rely on probe order
Date: Sun,  1 Oct 2017 13:02:17 +0200	[thread overview]
Message-ID: <20171001110220.27668-4-jonas.gorski@gmail.com> (raw)
In-Reply-To: <20171001110220.27668-1-jonas.gorski@gmail.com>

Do not rely on the shared device being probed before the enet(sw)
devices. This makes it easier to eventually move out the shared
device as a dma controller driver (what it should be).

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 drivers/net/ethernet/broadcom/bcm63xx_enet.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index a1e1e12e187a..8caf6abab3a6 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1722,10 +1722,8 @@ static int bcm_enet_probe(struct platform_device *pdev)
 	const char *clk_name;
 	int i, ret;
 
-	/* stop if shared driver failed, assume driver->probe will be
-	 * called in the same order we register devices (correct ?) */
 	if (!bcm_enet_shared_base[0])
-		return -ENODEV;
+		return -EPROBE_DEFER;
 
 	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 	res_irq_rx = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
@@ -2696,11 +2694,8 @@ static int bcm_enetsw_probe(struct platform_device *pdev)
 	struct resource *res_mem;
 	int ret, irq_rx, irq_tx;
 
-	/* stop if shared driver failed, assume driver->probe will be
-	 * called in the same order we register devices (correct ?)
-	 */
 	if (!bcm_enet_shared_base[0])
-		return -ENODEV;
+		return -EPROBE_DEFER;
 
 	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	irq_rx = platform_get_irq(pdev, 0);
-- 
2.13.2

  parent reply	other threads:[~2017-10-01 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-01 11:02 [PATCH 0/6] bcm63xx_enet: small fixes and cleanups Jonas Gorski
2017-10-01 11:02 ` [PATCH 1/6] bcm63xx_enet: correct clock usage Jonas Gorski
2017-10-01 11:02 ` [PATCH 2/6] bcm63xx_enet: do not write to random DMA channel on BCM6345 Jonas Gorski
2017-10-01 11:02 ` Jonas Gorski [this message]
2017-10-01 11:02 ` [PATCH 4/6] bcm63xx_enet: use managed functions for clock/ioremap Jonas Gorski
2017-10-01 11:02 ` [PATCH 5/6] bcm63xx_enet: drop unneeded NULL phy_clk check Jonas Gorski
2017-10-01 11:02 ` [PATCH 6/6] bcm63xx_enet: remove unneeded include Jonas Gorski
2017-10-02  6:06 ` [PATCH 0/6] bcm63xx_enet: small fixes and cleanups David Miller

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=20171001110220.27668-4-jonas.gorski@gmail.com \
    --to=jonas.gorski@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).