From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH 28/28] Blackfin SPI: init early Date: Mon, 18 Oct 2010 00:12:11 -0600 Message-ID: <20101018061211.GC19399@angua.secretlab.ca> References: <1287356381-31495-1-git-send-email-vapier@gentoo.org> <1287356381-31495-29-git-send-email-vapier@gentoo.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, David Brownell , Michael Hennerich , uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org To: Mike Frysinger Return-path: Content-Disposition: inline In-Reply-To: <1287356381-31495-29-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: uclinux-dist-devel-bounces-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org Errors-To: uclinux-dist-devel-bounces-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org List-Id: linux-spi.vger.kernel.org On Sun, Oct 17, 2010 at 06:59:41PM -0400, Mike Frysinger wrote: > From: Michael Hennerich > > Some systems using this bus sometimes have very basic devices on them > such as regulators. So we need to be loaded even earlier in case the > devices are used before userspace is loaded. Therefore register in > subsys_initcall(). This shouldn't have anything to do with userspace since regardless of the initcall, all of this setup should be complete before userspace starts. Rather I expect it has to do with an earlier initcall wanting to have the spi bus up earlier than module_initcall. The description of this patch seems wrong. On that note, this is something that needs to be revisited. Needing to play these kind of games highlights a failure of the device model, or the way that it is being used. (The patch is okay; but it does highlight some ugliness in the current kernel) g. > > Signed-off-by: Michael Hennerich > Signed-off-by: Mike Frysinger > --- > drivers/spi/spi_bfin5xx.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c > index bd18214..d17ab37 100644 > --- a/drivers/spi/spi_bfin5xx.c > +++ b/drivers/spi/spi_bfin5xx.c > @@ -1466,7 +1466,7 @@ static int __init bfin_spi_init(void) > { > return platform_driver_probe(&bfin_spi_driver, bfin_spi_probe); > } > -module_init(bfin_spi_init); > +subsys_initcall(bfin_spi_init); > > static void __exit bfin_spi_exit(void) > { > -- > 1.7.3.1 >