[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1428492040-5581-7-git-send-email-sudipm.mukherjee@gmail.com>
Date: Wed, 8 Apr 2015 16:50:32 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jean Delvare <jdelvare@...e.de>,
Wolfram Sang <wsa@...-dreams.de>,
Rodolfo Giometti <giometti@...eenne.com>,
"James E.J. Bottomley" <JBottomley@...allels.com>,
Mark Brown <broonie@...nel.org>,
Willy Tarreau <willy@...a-x.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>
Cc: linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
netdev@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-spi@...r.kernel.org, devel@...verdev.osuosl.org,
alsa-devel@...a-project.org,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH 06/14] spi: butterfly: return proper error values from attach
now that we are monitoring the return value from attach, make the
required changes to return proper value from its attach function.
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---
drivers/spi/spi-butterfly.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index 9a95862..7df16c8 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -190,7 +190,7 @@ static struct flash_platform_data flash = {
/* REVISIT remove this ugly global and its "only one" limitation */
static struct butterfly *butterfly;
-static void butterfly_attach(struct parport *p)
+static int butterfly_attach(struct parport *p)
{
struct pardevice *pd;
int status;
@@ -199,7 +199,7 @@ static void butterfly_attach(struct parport *p)
struct device *dev = p->physport->dev;
if (butterfly || !dev)
- return;
+ return -ENODEV;
/* REVISIT: this just _assumes_ a butterfly is there ... no probe,
* and no way to be selective about what it binds to.
@@ -287,7 +287,7 @@ static void butterfly_attach(struct parport *p)
pr_info("%s: AVR Butterfly\n", p->name);
butterfly = pp;
- return;
+ return 0;
clean2:
/* turn off VCC */
@@ -300,6 +300,7 @@ clean0:
(void) spi_master_put(pp->bitbang.master);
done:
pr_debug("%s: butterfly probe, fail %d\n", p->name, status);
+ return status;
}
static void butterfly_detach(struct parport *p)
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists