linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: David Brownell
	<dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Daniel Mack <daniel-rDUAYElUppE@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH 1/5] spi-imx: use platform_driver_probe as probe lives in .init.text
Date: Tue,  8 Dec 2009 22:14:06 +0100	[thread overview]
Message-ID: <1260306850-14945-1-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20091208211258.GA13706-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

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@pengutronix.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Sascha Hauer <s.hauer@pengutronix.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


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

  parent reply	other threads:[~2009-12-08 21:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 21:12 [PATCH 0/5] spi-imx: some updates Uwe Kleine-König
     [not found] ` <20091208211258.GA13706-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14   ` Uwe Kleine-König [this message]
     [not found]     ` <1260306850-14945-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14       ` [PATCH 2/5] spi-imx: correct check for platform_get_irq failing Uwe Kleine-König
     [not found]         ` <1260306850-14945-2-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14           ` [PATCH 3/5] spi-imx: use positive logic to distinguish cpu variants Uwe Kleine-König
     [not found]             ` <1260306850-14945-3-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14               ` [PATCH 4/5] spi-imx: Add mx25 support Uwe Kleine-König
     [not found]                 ` <1260306850-14945-4-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-12-08 21:14                   ` [PATCH 5/5] spi-imx: don't access struct device directly but use dev_get_platdata Uwe Kleine-König
2009-12-08 23:32   ` [PATCH 0/5] spi-imx: some updates Andrew Morton
2009-12-09  0:25     ` Grant Likely
     [not found]       ` <fa686aa40912081625y3750a7fegbac38926182e38c6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-09  0:35         ` Andrew Morton
2009-12-09  6:15           ` Grant Likely
2009-12-09  0:47       ` [spi-devel-general] " jassi brar
2009-12-09  1:50         ` Grant Likely

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=1260306850-14945-1-git-send-email-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=daniel-rDUAYElUppE@public.gmane.org \
    --cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --subject='Re: [PATCH 1/5] spi-imx: use platform_driver_probe as probe lives in .init.text' \
    /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

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).