Re: [PATCH] S390: Replace deprecated "__initcall" with equivalent "device_initcall".

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 May 2008, Heiko Carstens wrote:

> On Sun, May 11, 2008 at 04:48:04PM -0400, Robert P. J. Day wrote:
> > diff --git a/drivers/s390/sysinfo.c b/drivers/s390/sysinfo.c
> > index c3e4ab0..54ee3b5 100644
> > --- a/drivers/s390/sysinfo.c
> > +++ b/drivers/s390/sysinfo.c
> > @@ -269,7 +269,7 @@ static __init int create_proc_sysinfo(void)
> >  	return 0;
> >  }
> >
> > -__initcall(create_proc_sysinfo);
> > +device_initcall(create_proc_sysinfo);
>
> Since when and why is __initcall deprecated?

this goes back several years:

  http://www.cs.helsinki.fi/linux/linux-kernel/2002-23/1209.html

given the several levels of "init" calls these days, what used to be a
simple __initcall was redefined to represent device_initcall, as you
can see in <linux/init.h>:

#define core_initcall(fn)               __define_initcall("1",fn,1)
#define core_initcall_sync(fn)          __define_initcall("1s",fn,1s)
#define postcore_initcall(fn)           __define_initcall("2",fn,2)
#define postcore_initcall_sync(fn)      __define_initcall("2s",fn,2s)
#define arch_initcall(fn)               __define_initcall("3",fn,3)
#define arch_initcall_sync(fn)          __define_initcall("3s",fn,3s)
#define subsys_initcall(fn)             __define_initcall("4",fn,4)
#define subsys_initcall_sync(fn)        __define_initcall("4s",fn,4s)
#define fs_initcall(fn)                 __define_initcall("5",fn,5)
#define fs_initcall_sync(fn)            __define_initcall("5s",fn,5s)
#define rootfs_initcall(fn)             __define_initcall("rootfs",fn,rootfs)
#define device_initcall(fn)             __define_initcall("6",fn,6)
#define device_initcall_sync(fn)        __define_initcall("6s",fn,6s)
#define late_initcall(fn)               __define_initcall("7",fn,7)
#define late_initcall_sync(fn)          __define_initcall("7s",fn,7s)

#define __initcall(fn) device_initcall(fn)

  obviously, the effect will still be the same, but the initcall
ordering will be more obvious when using the newer device_initcall.

rday
--


========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux