driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: gregkh@linuxfoundation.org
Cc: neil@brown.name, driverdev-devel@linuxdriverproject.org, gerg@kernel.org
Subject: [PATCH] staging: mt7621-pci: don't return if get gpio fails
Date: Thu, 19 Mar 2020 17:14:16 +0100	[thread overview]
Message-ID: <20200319161416.19033-1-sergio.paracuellos@gmail.com> (raw)

In some platforms gpio's are not used for reset but
for other purposes. Because of that when we try to
get them are valid gpio's but are already assigned
to do other function. To avoid those kind of problems
in those platforms just notice the fail in the kernel
but continue doing normal boot.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/mt7621-pci/pci-mt7621.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 2a01645162a5..d6fc8a08c9bd 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -363,10 +363,8 @@ static int mt7621_pcie_parse_port(struct mt7621_pcie *pcie,
 
 	port->gpio_rst = devm_gpiod_get_index_optional(dev, "reset", slot,
 						       GPIOD_OUT_LOW);
-	if (IS_ERR(port->gpio_rst)) {
-		dev_err(dev, "Failed to get GPIO for PCIe%d\n", slot);
-		return PTR_ERR(port->gpio_rst);
-	}
+	if (IS_ERR(port->gpio_rst))
+		dev_notice(dev, "Failed to get GPIO for PCIe%d\n", slot);
 
 	port->slot = slot;
 	port->pcie = pcie;
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

             reply	other threads:[~2020-03-19 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 16:14 Sergio Paracuellos [this message]
2020-03-20 14:30 ` [PATCH] staging: mt7621-pci: don't return if get gpio fails Greg Ungerer
2020-03-20 14:38   ` Sergio Paracuellos
2020-03-20 15:08     ` Greg Ungerer
2020-03-20 15:25       ` Sergio Paracuellos
2020-03-21  6:28         ` Greg Ungerer
2020-03-21  6:47           ` Sergio Paracuellos

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=20200319161416.19033-1-sergio.paracuellos@gmail.com \
    --to=sergio.paracuellos@gmail.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gerg@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=neil@brown.name \
    /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).