lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201112202151.34062.jkrzyszt@tis.icnet.pl>
Date:	Tue, 20 Dec 2011 21:51:33 +0100
From:	Janusz Krzysztofik <jkrzyszt@....icnet.pl>
To:	alsa-devel@...a-project.org
Cc:	"Russell King - ARM Linux" <linux@....linux.org.uk>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Tony Lindgren <tony@...mide.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	linux-kernel@...r.kernel.org,
	Jarkko Nikula <jarkko.nikula@...mer.com>,
	linux-input@...r.kernel.org, linux-omap@...r.kernel.org,
	Liam Girdwood <lrg@...com>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [alsa-devel] [PATCH v2 1/7][RESEND] ARM: OMAP1: ams-delta: register latch	dependent devices later

On Tuesday 20 of December 2011 at 21:40:46, Russell King - ARM Linux wrote:
> On Tue, Dec 20, 2011 at 12:28:32AM +0100, Janusz Krzysztofik wrote:
> > diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c
> > index d4d08bd..56ffd7c 100644
> > --- a/drivers/input/serio/ams_delta_serio.c
> > +++ b/drivers/input/serio/ams_delta_serio.c
> > @@ -165,6 +165,9 @@ serio:
> >  	kfree(ams_delta_serio);
> >  	return err;
> >  }
> > +#ifndef MODULE
> > +late_initcall(ams_delta_serio_init);
> > +#else
> >  module_init(ams_delta_serio_init);
> >  
> >  static void __exit ams_delta_serio_exit(void)
> > @@ -175,3 +178,4 @@ static void __exit ams_delta_serio_exit(void)
> >  	gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
> >  }
> >  module_exit(ams_delta_serio_exit);
> > +#endif
> 
> It's worth noting:
> 
> #ifndef MODULE
> #define late_initcall(fn)               __define_initcall("7",fn,7)
> #else /* MODULE */
> #define late_initcall(fn)               module_init(fn)
> 
> So really, all these ifndefs aren't required.  Just change the module_init()
> to late_initcall().

Thanks, I'll follow your pattern. My reason for using those ifdefery was 
a comment still found in include/linux/init.h:

#else /* MODULE */

/* Don't use these in modules, but some people do... */
#define early_initcall(fn)              module_init(fn)
#define core_initcall(fn)               module_init(fn)
...
#define late_initcall(fn)               module_init(fn)

Thanks,
Janusz
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ