[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1260306850-14945-1-git-send-email-u.kleine-koenig@pengutronix.de>
Date: Tue, 8 Dec 2009 22:14:06 +0100
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: spi-devel-general@...ts.sourceforge.net
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Daniel Mack <daniel@...aq.de>,
David Brownell <dbrownell@...rs.sourceforge.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Sascha Hauer <s.hauer@...gutronix.de>
Subject: [PATCH 1/5] spi-imx: use platform_driver_probe as probe lives in .init.text
Using platform_driver_register with a probe function defined using
__init is wrong.
This fixes an oops after:
cd /sys/bus/platform/drivers/spi_imx
echo -n spi_imx.0 > unbind
echo -n spi_imx.0 > bind
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: David Brownell <dbrownell@...rs.sourceforge.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Sascha Hauer <s.hauer@...gutronix.de>
---
drivers/spi/spi_imx.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index 1b17f44..c83ca05 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -666,13 +666,12 @@ static struct platform_driver spi_imx_driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
},
- .probe = spi_imx_probe,
.remove = __exit_p(spi_imx_remove),
};
static int __init spi_imx_init(void)
{
- return platform_driver_register(&spi_imx_driver);
+ return platform_driver_probe(&spi_imx_driver, spi_imx_probe);
}
static void __exit spi_imx_exit(void)
--
1.6.5.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