lkml.org 
[lkml]   [2015]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/14] init: deps: annotate various initcalls
Date
This is a large patch, NOT meant for merging into mainline.

It's meant to give a quick start in order to evaluate the feature
of using dependencies to order and parallelize the Linux kernels init.

Because I obviously don't know all details of all subsystems I had to
touch, many dependencies might be missing or wrong, should be handled
with care and should be reviewed by the maintainers of the respective
subsystem.

That means this all these changes are the result of a quick & dirty scan
of the respective sources, done to quickly get a usable base of
dependencies in order to test and check out if and how the concept works.

Be aware that I've done these changes based on my custom kernel configs
and eleminating initcalls (grep __initcall System.map) used in my custom
kernels. That means it's very likely that you will need to annotated more
initcalls and add more dependencies for your kernel (configuration) in
order to not end up with a crash at boot.

As this patch is not meant for mainline, please address comments regarding
formalism like long lines or C++ comments to a bureaucrat of your choice
or /dev/null, but, please, not me.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
---
arch/arm/common/edma.c | 3 +--
arch/arm/crypto/aes-ce-glue.c | 7 ++++++-
arch/arm/crypto/aes_glue.c | 7 ++++++-
arch/arm/crypto/aesbs-glue.c | 7 ++++++-
arch/arm/crypto/sha1_glue.c | 6 +++++-
arch/arm/crypto/sha1_neon_glue.c | 7 ++++++-
arch/arm/kernel/dma.c | 2 +-
arch/arm/kernel/setup.c | 10 +++++++++-
arch/arm/kernel/swp_emulate.c | 7 ++++++-
arch/arm/mach-imx/gpc.c | 2 +-
arch/arm/mach-imx/mmdc.c | 2 +-
arch/arm/mach-omap2/i2c.c | 9 ++++++++-
arch/arm/mm/alignment.c | 7 ++++++-
arch/arm/mm/dma-mapping.c | 16 ++++++++++++++--
arch/arm/plat-omap/dmtimer.c | 8 +++++++-
arch/x86/crypto/aes_glue.c | 7 ++++++-
arch/x86/kernel/acpi/boot.c | 8 +++++++-
arch/x86/kernel/acpi/cstate.c | 2 +-
arch/x86/kernel/apm_32.c | 8 +++++++-
arch/x86/kernel/cpu/mcheck/mce.c | 17 +++++++++++++++--
arch/x86/kernel/cpu/mcheck/therm_throt.c | 8 +++++++-
arch/x86/kernel/cpu/microcode/core.c | 8 +++++++-
arch/x86/kernel/hpet.c | 2 +-
arch/x86/kernel/pci-dma.c | 14 +++++++++++++-
arch/x86/kernel/pmc_atom.c | 7 ++++++-
arch/x86/kernel/reboot.c | 8 +++++++-
arch/x86/kernel/rtc.c | 10 +++++++++-
arch/x86/kernel/setup.c | 2 +-
arch/x86/kernel/tsc.c | 16 ++++++++++++++--
arch/x86/pci/i386.c | 8 +++++++-
arch/x86/pci/init.c | 9 ++++++++-
arch/x86/pci/legacy.c | 12 +++++++++++-
block/bio.c | 8 +++++++-
block/blk-integrity.c | 8 +++++++-
block/blk-ioc.c | 3 ++-
block/blk-iopoll.c | 2 +-
block/blk-mq.c | 12 +++++++++++-
block/blk-settings.c | 2 +-
block/blk-softirq.c | 2 +-
block/bsg.c | 7 ++++++-
block/cfq-iosched.c | 2 +-
block/deadline-iosched.c | 2 +-
block/genhd.c | 15 +++++++++++++--
block/noop-iosched.c | 7 ++++++-
block/scsi_ioctl.c | 8 +++++++-
crypto/aes_generic.c | 7 ++++++-
crypto/algapi.c | 2 +-
crypto/algboss.c | 2 +-
crypto/asymmetric_keys/asymmetric_type.c | 2 +-
crypto/asymmetric_keys/x509_public_key.c | 7 ++++++-
crypto/authenc.c | 2 +-
crypto/authencesn.c | 2 +-
crypto/cbc.c | 7 ++++++-
crypto/chainiv.c | 7 ++++++-
crypto/crc32c_generic.c | 7 ++++++-
crypto/crct10dif_generic.c | 7 ++++++-
crypto/cryptd.c | 7 ++++++-
crypto/crypto_user.c | 7 ++++++-
crypto/crypto_wq.c | 7 ++++++-
crypto/deflate.c | 7 ++++++-
crypto/des_generic.c | 7 ++++++-
crypto/ecb.c | 2 +-
crypto/eseqiv.c | 2 +-
crypto/hmac.c | 2 +-
crypto/lzo.c | 7 ++++++-
crypto/mcryptd.c | 7 ++++++-
crypto/md5.c | 7 ++++++-
crypto/michael_mic.c | 6 +++++-
crypto/sha1_generic.c | 7 ++++++-
crypto/sha256_generic.c | 7 ++++++-
crypto/sha512_generic.c | 7 ++++++-
crypto/xor.c | 2 +-
drivers/acpi/ac.c | 11 ++++++++++-
drivers/acpi/battery.c | 8 +++++++-
drivers/acpi/bus.c | 10 +++++++++-
drivers/acpi/button.c | 8 +++++++-
drivers/acpi/event.c | 10 +++++++++-
drivers/acpi/fan.c | 9 ++++++++-
drivers/acpi/osl.c | 7 ++++++-
drivers/acpi/processor_driver.c | 8 +++++++-
drivers/acpi/sbs.c | 10 +++++++++-
drivers/acpi/sbshc.c | 8 +++++++-
drivers/acpi/thermal.c | 10 +++++++++-
drivers/ata/ahci_imx.c | 8 +++++++-
drivers/ata/ahci_platform.c | 8 +++++++-
drivers/ata/ata_generic.c | 11 ++++++++++-
drivers/ata/ata_piix.c | 11 ++++++++++-
drivers/ata/libata-core.c | 7 ++++++-
drivers/ata/pata_acpi.c | 11 ++++++++++-
drivers/ata/pata_amd.c | 11 ++++++++++-
drivers/ata/pata_jmicron.c | 11 ++++++++++-
drivers/ata/pata_mpiix.c | 11 ++++++++++-
drivers/ata/pata_oldpiix.c | 11 ++++++++++-
drivers/ata/pata_sch.c | 11 ++++++++++-
drivers/ata/pata_sis.c | 11 ++++++++++-
drivers/base/firmware_class.c | 7 ++++++-
drivers/block/loop.c | 7 ++++++-
drivers/bus/imx-weim.c | 2 +-
drivers/bus/omap-ocp2scp.c | 2 +-
drivers/bus/omap_l3_noc.c | 2 +-
drivers/bus/omap_l3_smx.c | 2 +-
drivers/char/agp/backend.c | 8 ++++++--
drivers/char/genrtc.c | 6 +++++-
drivers/char/hpet.c | 10 +++++++++-
drivers/char/hw_random/core.c | 7 ++++++-
drivers/char/hw_random/omap-rng.c | 10 ++++++++--
drivers/char/hw_random/omap3-rom-rng.c | 7 ++++++-
drivers/char/misc.c | 2 +-
drivers/char/nvram.c | 7 ++++++-
drivers/char/rtc.c | 8 +++++++-
drivers/clocksource/acpi_pm.c | 9 ++++++++-
drivers/connector/cn_proc.c | 7 ++++++-
drivers/connector/connector.c | 7 ++++++-
drivers/cpufreq/acpi-cpufreq.c | 8 +++++++-
drivers/cpufreq/cpufreq.c | 2 +-
drivers/cpufreq/cpufreq_conservative.c | 9 +++++++--
drivers/cpufreq/cpufreq_ondemand.c | 9 +++++++--
drivers/cpufreq/cpufreq_performance.c | 7 ++++++-
drivers/cpufreq/cpufreq_powersave.c | 9 +++++++--
drivers/cpufreq/cpufreq_stats.c | 7 ++++++-
drivers/cpufreq/imx6q-cpufreq.c | 8 +++++++-
drivers/cpufreq/kirkwood-cpufreq.c | 7 ++++++-
drivers/cpufreq/omap-cpufreq.c | 8 +++++++-
drivers/cpuidle/cpuidle-arm.c | 9 +++++++--
drivers/cpuidle/cpuidle-kirkwood.c | 7 ++++++-
drivers/cpuidle/cpuidle.c | 2 +-
drivers/crypto/marvell/cesa.c | 8 +++++++-
drivers/crypto/mv_cesa.c | 7 ++++++-
drivers/crypto/omap-aes.c | 7 ++++++-
drivers/crypto/omap-sham.c | 8 +++++++-
drivers/dma/cppi41.c | 8 +++++++-
drivers/dma/dmaengine.c | 8 +++++++-
drivers/dma/imx-sdma.c | 8 +++++++-
drivers/dma/mv_xor.c | 9 ++++++++-
drivers/dma/mxs-dma.c | 9 ++++++++-
drivers/dma/omap-dma.c | 9 ++++++++-
drivers/firmware/dmi_scan.c | 8 +++++++-
drivers/gpio/gpio-generic.c | 2 +-
drivers/gpio/gpio-mvebu.c | 2 +-
drivers/gpio/gpio-mxc.c | 2 +-
drivers/gpio/gpio-omap.c | 8 +++++++-
drivers/gpio/gpio-tps65910.c | 2 +-
drivers/gpio/gpio-twl4030.c | 2 +-
drivers/gpio/gpiolib.c | 8 +++++++-
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 ++++++++++-
drivers/gpu/drm/drm_drv.c | 13 ++++++++++++-
drivers/gpu/drm/drm_fb_helper.c | 7 ++++++-
drivers/gpu/drm/drm_mipi_dsi.c | 13 +++++++++++++
drivers/gpu/drm/i915/i915_drv.c | 7 ++++++-
drivers/gpu/drm/radeon/radeon_drv.c | 11 ++++++++++-
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 7 ++++++-
drivers/gpu/drm/ttm/ttm_module.c | 7 ++++++-
drivers/gpu/vga/vgaarb.c | 12 +++++++++++-
drivers/hid/uhid.c | 7 ++++++-
drivers/hwmon/hwmon.c | 8 +++++++-
drivers/hwspinlock/omap_hwspinlock.c | 8 +++++++-
drivers/i2c/busses/i2c-gpio.c | 8 +++++++-
drivers/i2c/busses/i2c-imx.c | 8 +++++++-
drivers/i2c/busses/i2c-mv64xxx.c | 7 ++++++-
drivers/i2c/busses/i2c-omap.c | 9 ++++++++-
drivers/i2c/busses/i2c-tiny-usb.c | 8 +++++++-
drivers/i2c/i2c-core.c | 2 +-
drivers/i2c/i2c-dev.c | 7 ++++++-
drivers/iio/adc/ti_am335x_adc.c | 2 +-
drivers/input/evdev.c | 7 ++++++-
drivers/input/input.c | 2 +-
drivers/input/joydev.c | 7 ++++++-
drivers/input/keyboard/atkbd.c | 9 ++++++++-
drivers/input/keyboard/gpio_keys.c | 7 ++++++-
drivers/input/misc/twl4030-pwrbutton.c | 9 ++++++++-
drivers/input/misc/uinput.c | 8 +++++++-
drivers/input/mousedev.c | 8 +++++++-
drivers/input/serio/i8042.c | 10 +++++++++-
drivers/input/serio/serio.c | 2 +-
drivers/input/serio/serio_raw.c | 8 +++++++-
drivers/input/serio/serport.c | 7 ++++++-
drivers/iommu/amd_iommu_v2.c | 7 ++++++-
drivers/iommu/intel_irq_remapping.c | 12 +++++++++++-
drivers/iommu/iommu-sysfs.c | 8 +++++++-
drivers/iommu/iommu.c | 2 +-
drivers/iommu/omap-iommu.c | 9 ++++++++-
drivers/leds/led-class.c | 2 +-
drivers/leds/leds-gpio.c | 7 ++++++-
drivers/leds/leds-regulator.c | 7 ++++++-
drivers/leds/trigger/ledtrig-heartbeat.c | 7 ++++++-
drivers/mailbox/omap-mailbox.c | 2 +-
drivers/md/md.c | 7 ++++++-
drivers/md/raid5.c | 5 +++++
drivers/media/i2c/ir-kbd-i2c.c | 7 ++++++-
drivers/memory/omap-gpmc.c | 2 +-
drivers/mfd/omap-usb-host.c | 2 +-
drivers/mfd/omap-usb-tll.c | 2 +-
drivers/mfd/ti_am335x_tscadc.c | 2 +-
drivers/mfd/tps65217.c | 10 +++++++++-
drivers/mfd/tps65910.c | 9 ++++++++-
drivers/mfd/twl-core.c | 8 +++++++-
drivers/mfd/twl4030-audio.c | 7 ++++++-
drivers/mfd/twl4030-power.c | 7 ++++++-
drivers/misc/eeprom/at24.c | 8 +++++++-
drivers/misc/sram.c | 2 ++
drivers/mmc/card/block.c | 7 ++++++-
drivers/mmc/core/core.c | 7 ++++++-
drivers/mmc/host/mxs-mmc.c | 7 ++++++-
drivers/mmc/host/omap.c | 7 ++++++-
drivers/mmc/host/omap_hsmmc.c | 7 ++++++-
drivers/mmc/host/sdhci-esdhc-imx.c | 7 ++++++-
drivers/mmc/host/sdhci.c | 7 ++++++-
drivers/mtd/mtdcore.c | 7 ++++++-
drivers/mtd/nand/omap2.c | 8 +++++++-
drivers/mtd/nand/omap_elm.c | 2 +-
drivers/mtd/nand/orion_nand.c | 8 +++++++-
drivers/mtd/ofpart.c | 2 +-
drivers/net/ethernet/freescale/fec_main.c | 9 ++++++++-
drivers/net/ethernet/intel/e1000/e1000_main.c | 10 +++++++++-
drivers/net/ethernet/marvell/mv643xx_eth.c | 11 ++++++++++-
drivers/net/ethernet/marvell/mvmdio.c | 7 ++++++-
drivers/net/ethernet/realtek/r8169.c | 10 +++++++++-
drivers/net/ethernet/ti/cpsw-phy-sel.c | 7 ++++++-
drivers/net/ethernet/ti/cpsw.c | 10 +++++++++-
drivers/net/ethernet/ti/davinci_mdio.c | 9 ++++++++-
drivers/net/irda/nsc-ircc.c | 7 ++++++-
drivers/net/irda/smsc-ircc2.c | 6 +++++-
drivers/net/phy/lxt.c | 7 ++++++-
drivers/net/phy/phy_device.c | 2 +-
drivers/net/phy/realtek.c | 7 ++++++-
drivers/net/phy/smsc.c | 7 ++++++-
drivers/pci/hotplug/pci_hotplug_core.c | 11 ++++++++++-
drivers/pci/pci-acpi.c | 8 +++++++-
drivers/pci/pci-driver.c | 8 +++++++-
drivers/pci/pci-stub.c | 10 +++++++++-
drivers/pci/probe.c | 2 +-
drivers/pci/proc.c | 11 ++++++++++-
drivers/pci/quirks.c | 9 ++++++++-
drivers/pci/slot.c | 8 +++++++-
drivers/phy/phy-core.c | 2 +-
drivers/phy/phy-mvebu-sata.c | 8 +++++++-
drivers/phy/phy-twl4030-usb.c | 8 +++++++-
drivers/pinctrl/freescale/pinctrl-imx6q.c | 2 +-
drivers/pinctrl/mvebu/pinctrl-kirkwood.c | 2 +-
drivers/pinctrl/pinctrl-single.c | 2 +-
drivers/platform/x86/asus-wmi.c | 13 ++++++++++++-
drivers/platform/x86/eeepc-wmi.c | 8 +++++++-
drivers/platform/x86/wmi.c | 7 ++++++-
drivers/pnp/core.c | 2 +-
drivers/pnp/pnpacpi/core.c | 8 +++++++-
drivers/pnp/system.c | 7 ++++++-
drivers/power/power_supply_core.c | 2 +-
drivers/power/reset/gpio-poweroff.c | 2 +-
drivers/power/reset/imx-snvs-poweroff.c | 2 +-
drivers/power/twl4030_charger.c | 2 +-
drivers/pwm/core.c | 7 ++++++-
drivers/pwm/pwm-imx.c | 2 +-
drivers/pwm/pwm-tiecap.c | 2 +-
drivers/pwm/pwm-tiehrpwm.c | 2 +-
drivers/pwm/pwm-tipwmss.c | 2 +-
drivers/regulator/anatop-regulator.c | 9 ++++++++-
drivers/regulator/core.c | 7 ++++++-
drivers/regulator/fixed.c | 9 ++++++++-
drivers/regulator/tps65023-regulator.c | 9 ++++++++-
drivers/regulator/tps65910-regulator.c | 8 +++++++-
drivers/regulator/twl-regulator.c | 10 ++++++++--
drivers/remoteproc/remoteproc_core.c | 8 +++++++-
drivers/remoteproc/wkup_m3_rproc.c | 7 ++++++-
drivers/rtc/class.c | 2 +-
drivers/rtc/rtc-cmos.c | 9 ++++++++-
drivers/rtc/rtc-ds1307.c | 7 ++++++-
drivers/rtc/rtc-hid-sensor-time.c | 8 +++++++-
drivers/rtc/rtc-mxc.c | 7 ++++++-
drivers/rtc/rtc-omap.c | 7 ++++++-
drivers/rtc/rtc-snvs.c | 8 +++++++-
drivers/rtc/rtc-twl.c | 7 ++++++-
drivers/scsi/scsi.c | 8 +++++++-
drivers/scsi/sd.c | 8 +++++++-
drivers/spi/spi-imx.c | 2 +-
drivers/spi/spi-omap2-mcspi.c | 2 +-
drivers/thermal/thermal_core.c | 8 +++++++-
drivers/tty/pty.c | 8 +++++++-
drivers/tty/serial/8250/8250_core.c | 9 ++++++++-
drivers/tty/serial/8250/8250_omap.c | 8 +++++++-
drivers/tty/serial/8250/8250_pci.c | 11 ++++++++++-
drivers/tty/serial/fsl_lpuart.c | 7 ++++++-
drivers/tty/serial/imx.c | 7 ++++++-
drivers/tty/serial/of_serial.c | 7 ++++++-
drivers/tty/serial/omap-serial.c | 7 ++++++-
drivers/tty/sysrq.c | 8 +++++++-
drivers/tty/tty_io.c | 2 +-
drivers/uio/uio_pdrv_genirq.c | 2 +-
drivers/usb/core/usb.c | 11 ++++++++++-
drivers/usb/host/ehci-hcd.c | 8 +++++++-
drivers/usb/host/ehci-omap.c | 8 +++++++-
drivers/usb/host/ehci-orion.c | 8 +++++++-
drivers/usb/host/ehci-pci.c | 12 +++++++++++-
drivers/usb/host/ohci-hcd.c | 9 ++++++++-
drivers/usb/host/ohci-omap3.c | 8 +++++++-
drivers/usb/host/uhci-hcd.c | 8 +++++++-
drivers/usb/musb/musb_core.c | 2 +-
drivers/usb/musb/musb_dsps.c | 2 +-
drivers/usb/musb/omap2430.c | 2 +-
drivers/usb/phy/phy-am335x-control.c | 2 +-
drivers/usb/phy/phy-am335x.c | 2 +-
drivers/usb/phy/phy-generic.c | 2 +-
drivers/usb/phy/phy-gpio-vbus-usb.c | 2 +-
drivers/usb/phy/phy-mxs-usb.c | 2 +-
drivers/usb/storage/cypress_atacb.c | 7 ++++++-
drivers/usb/storage/usb.c | 8 +++++++-
drivers/video/backlight/backlight.c | 8 +++++++-
drivers/video/backlight/lcd.c | 7 ++++++-
drivers/video/backlight/platform_lcd.c | 8 +++++++-
drivers/video/backlight/pwm_bl.c | 7 ++++++-
drivers/video/backlight/tps65217_bl.c | 8 +++++++-
drivers/video/console/fbcon.c | 8 +++++++-
drivers/video/fbdev/core/fbmem.c | 4 ++--
drivers/video/fbdev/omap2/vrfb.c | 7 ++++++-
drivers/watchdog/iTCO_wdt.c | 7 ++++++-
drivers/watchdog/imx2_wdt.c | 7 ++++++-
drivers/watchdog/it87_wdt.c | 7 ++++++-
drivers/watchdog/omap_wdt.c | 7 ++++++-
drivers/watchdog/softdog.c | 7 ++++++-
drivers/watchdog/twl4030_wdt.c | 7 ++++++-
drivers/watchdog/watchdog_core.c | 7 ++++++-
fs/anon_inodes.c | 3 +--
fs/binfmt_elf.c | 2 +-
fs/binfmt_misc.c | 2 +-
fs/binfmt_script.c | 2 +-
fs/btrfs/super.c | 14 +++++++++++++-
fs/compat_binfmt_elf.c | 2 +-
fs/debugfs/inode.c | 3 ++-
fs/eventpoll.c | 2 +-
fs/ext4/super.c | 10 +++++++++-
fs/fat/inode.c | 2 +-
fs/fat/namei_msdos.c | 7 ++++++-
fs/fat/namei_vfat.c | 7 ++++++-
fs/filesystems.c | 2 +-
fs/fuse/inode.c | 7 ++++++-
fs/jbd2/journal.c | 2 +-
fs/lockd/svc.c | 8 +++++++-
fs/mbcache.c | 2 +-
fs/nfs/blocklayout/blocklayout.c | 11 ++++++++++-
fs/nfs/filelayout/filelayout.c | 11 ++++++++++-
fs/nfs/flexfilelayout/flexfilelayout.c | 11 ++++++++++-
fs/nfs/inode.c | 10 +++++++++-
fs/nfs/nfs2super.c | 10 +++++++++-
fs/nfs/nfs3super.c | 10 +++++++++-
fs/nfs_common/grace.c | 8 +++++++-
fs/nfsd/nfsctl.c | 12 +++++++++++-
fs/pipe.c | 2 +-
fs/proc/cmdline.c | 2 +-
fs/proc/consoles.c | 2 +-
fs/proc/cpuinfo.c | 2 +-
fs/proc/devices.c | 2 +-
fs/proc/interrupts.c | 2 +-
fs/proc/kcore.c | 2 +-
fs/proc/kmsg.c | 2 +-
fs/proc/loadavg.c | 2 +-
fs/proc/meminfo.c | 2 +-
fs/proc/page.c | 2 +-
fs/proc/softirqs.c | 2 +-
fs/proc/stat.c | 2 +-
fs/proc/uptime.c | 2 +-
fs/proc/version.c | 2 +-
fs/ubifs/super.c | 11 ++++++++++-
ipc/ipc_sysctl.c | 7 ++++++-
ipc/mqueue.c | 7 ++++++-
ipc/util.c | 8 +++++++-
kernel/configs.c | 2 +-
kernel/dma.c | 2 +-
kernel/futex.c | 2 +-
kernel/module.c | 2 +-
kernel/power/hibernate.c | 7 ++++++-
kernel/power/main.c | 7 ++++++-
kernel/power/poweroff.c | 2 +-
kernel/power/user.c | 7 ++++++-
kernel/sched/stats.c | 2 +-
kernel/system_keyring.c | 15 +++++++++++++--
kernel/time/clocksource.c | 9 +++++++--
kernel/workqueue.c | 2 +-
lib/crc-t10dif.c | 2 +-
lib/crc32.c | 2 +-
lib/kobject_uevent.c | 6 +++++-
lib/libcrc32c.c | 7 ++++++-
lib/raid6/algos.c | 2 +-
mm/backing-dev.c | 17 +++++++++++++++--
mm/swapfile.c | 2 +-
mm/vmalloc.c | 2 +-
net/bluetooth/af_bluetooth.c | 7 ++++++-
net/core/dev.c | 8 +++++++-
net/core/fib_rules.c | 8 +++++++-
net/core/neighbour.c | 6 +++++-
net/core/net_namespace.c | 2 +-
net/core/netpoll.c | 8 +++++++-
net/core/sock.c | 4 ++--
net/core/sysctl_net_core.c | 7 ++++++-
net/ethernet/eth.c | 7 ++++++-
net/ipv4/af_inet.c | 25 +++++++++++++++++++++++--
net/ipv4/netfilter.c | 2 +-
net/ipv6/af_inet6.c | 18 +++++++++++++++++-
net/ipv6/ip6_offload.c | 7 ++++++-
net/netlink/af_netlink.c | 8 +++++++-
net/netlink/genetlink.c | 7 ++++++-
net/packet/af_packet.c | 8 +++++++-
net/rfkill/core.c | 8 +++++++-
net/rfkill/rfkill-gpio.c | 7 ++++++-
net/sched/sch_api.c | 7 ++++++-
net/socket.c | 7 ++++++-
net/sunrpc/auth_gss/auth_gss.c | 7 ++++++-
net/sunrpc/auth_gss/gss_krb5_mech.c | 9 ++++++++-
net/sunrpc/sunrpc_syms.c | 8 +++++++-
net/unix/af_unix.c | 8 +++++++-
net/wireless/core.c | 10 +++++++++-
net/wireless/wext-core.c | 7 ++++++-
net/xfrm/xfrm_user.c | 8 +++++++-
security/keys/proc.c | 2 +-
sound/drivers/mpu401/mpu401.c | 8 +++++++-
sound/drivers/mpu401/mpu401_uart.c | 2 +-
sound/soc/codecs/hdmi.c | 7 ++++++-
sound/soc/codecs/twl4030.c | 7 ++++++-
sound/soc/fsl/imx-audmux.c | 9 ++++++++-
sound/soc/omap/omap-hdmi-audio.c | 7 ++++++-
sound/soc/omap/omap-mcbsp.c | 7 ++++++-
sound/soc/omap/omap-twl4030.c | 9 ++++++++-
sound/soc/soc-core.c | 8 +++++++-
421 files changed, 2340 insertions(+), 437 deletions(-)

diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 873dbfc..d5d2459 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -1872,5 +1872,4 @@ static int __init edma_init(void)
{
return platform_driver_probe(&edma_driver, edma_probe);
}
-arch_initcall(edma_init);
-
+annotated_initcall_drv(arch, edma_init, drvid_edma, NULL, edma_driver.driver);
diff --git a/arch/arm/crypto/aes-ce-glue.c b/arch/arm/crypto/aes-ce-glue.c
index b445a5d..d9bcb89 100644
--- a/arch/arm/crypto/aes-ce-glue.c
+++ b/arch/arm/crypto/aes-ce-glue.c
@@ -520,5 +520,10 @@ static void __exit aes_exit(void)
crypto_unregister_algs(aes_algs, ARRAY_SIZE(aes_algs));
}

-module_init(aes_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(aes_init, drvid_aes_ce_arm, dependencies);
module_exit(aes_exit);
diff --git a/arch/arm/crypto/aes_glue.c b/arch/arm/crypto/aes_glue.c
index 0409b8f..c814fe5 100644
--- a/arch/arm/crypto/aes_glue.c
+++ b/arch/arm/crypto/aes_glue.c
@@ -88,7 +88,12 @@ static void __exit aes_fini(void)
crypto_unregister_alg(&aes_alg);
}

-module_init(aes_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(aes_init, drvid_aes_arm, dependencies);
module_exit(aes_fini);

MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm (ASM)");
diff --git a/arch/arm/crypto/aesbs-glue.c b/arch/arm/crypto/aesbs-glue.c
index 6d68529..d3de8d5 100644
--- a/arch/arm/crypto/aesbs-glue.c
+++ b/arch/arm/crypto/aesbs-glue.c
@@ -429,7 +429,12 @@ static void __exit aesbs_mod_exit(void)
crypto_unregister_algs(aesbs_algs, ARRAY_SIZE(aesbs_algs));
}

-module_init(aesbs_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(aesbs_mod_init, drvid_aesbs, dependencies);
module_exit(aesbs_mod_exit);

MODULE_DESCRIPTION("Bit sliced AES in CBC/CTR/XTS modes using NEON");
diff --git a/arch/arm/crypto/sha1_glue.c b/arch/arm/crypto/sha1_glue.c
index 6fc73bf..db3370a 100644
--- a/arch/arm/crypto/sha1_glue.c
+++ b/arch/arm/crypto/sha1_glue.c
@@ -85,8 +85,12 @@ static void __exit sha1_mod_fini(void)
crypto_unregister_shash(&alg);
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};

-module_init(sha1_mod_init);
+annotated_module_init(sha1_mod_init, drvid_sha1_mod, dependencies);
module_exit(sha1_mod_fini);

MODULE_LICENSE("GPL");
diff --git a/arch/arm/crypto/sha1_neon_glue.c b/arch/arm/crypto/sha1_neon_glue.c
index 4e22f12..deb0714 100644
--- a/arch/arm/crypto/sha1_neon_glue.c
+++ b/arch/arm/crypto/sha1_neon_glue.c
@@ -102,7 +102,12 @@ static void __exit sha1_neon_mod_fini(void)
crypto_unregister_shash(&alg);
}

-module_init(sha1_neon_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(sha1_neon_mod_init, drvid_sha1_neon, dependencies);
module_exit(sha1_neon_mod_fini);

MODULE_LICENSE("GPL");
diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c
index e651c4d..e441091 100644
--- a/arch/arm/kernel/dma.c
+++ b/arch/arm/kernel/dma.c
@@ -294,5 +294,5 @@ static int __init proc_dma_init(void)
return 0;
}

-__initcall(proc_dma_init);
+annotated_initcall(device, proc_dma_init, drvid_proc_dma_arm, NULL);
#endif
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 36c18b7..5edb36f 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -838,6 +838,14 @@ static int __init customize_machine(void)
#endif
return 0;
}
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sram, // needed on imx
+ drvid_pm,
+ 0
+};
+
+//annotated_initcall(arch, customize_machine, drvid_customize_machine, dependencies);
arch_initcall(customize_machine);

static int __init init_machine_late(void)
@@ -1033,7 +1041,7 @@ static int __init proc_cpu_init(void)
return -ENOMEM;
return 0;
}
-fs_initcall(proc_cpu_init);
+annotated_initcall(fs, proc_cpu_init, drvid_proc_cpu, NULL);
#endif

static const char *hwcap_str[] = {
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c
index 1361756..5bfcc5e 100644
--- a/arch/arm/kernel/swp_emulate.c
+++ b/arch/arm/kernel/swp_emulate.c
@@ -266,4 +266,9 @@ static int __init swp_emulation_init(void)
return 0;
}

-late_initcall(swp_emulation_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_proc_cpu,
+ 0
+};
+
+annotated_initcall(late, swp_emulation_init, drvid_swp_emulation, dependencies);
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index 8c4467f..2f1ce25 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -468,4 +468,4 @@ static int __init imx_pgc_init(void)
{
return platform_driver_register(&imx_gpc_driver);
}
-subsys_initcall(imx_pgc_init);
+annotated_initcall_drv(subsys, imx_pgc_init, drvid_imx_gpc, NULL, imx_gpc_driver.driver);
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index db9621c..ac193cc6 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -87,4 +87,4 @@ static int __init imx_mmdc_init(void)
{
return platform_driver_register(&imx_mmdc_driver);
}
-postcore_initcall(imx_mmdc_init);
+annotated_initcall_drv(postcore, imx_mmdc_init, drvid_imx_mmdc, NULL, imx_mmdc_driver.driver);
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index b9d8e47..183d515 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -188,4 +188,11 @@ static int __init omap_i2c_cmdline(void)
{
return omap_register_i2c_bus_cmdline();
}
-omap_subsys_initcall(omap_i2c_cmdline);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ 0
+};
+
+annotated_omap_initcall(subsys, omap_i2c_cmdline, drvid_omap_i2c_cmdline, dependencies);
+//omap_subsys_initcall(omap_i2c_cmdline);
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 9769f1e..bbae986 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -1005,4 +1005,9 @@ static int __init alignment_init(void)
return 0;
}

-fs_initcall(alignment_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_proc_cpu,
+ 0
+};
+
+annotated_initcall(fs, alignment_init, drvid_alignment, dependencies);
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index cba12f3..0d7f32c 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -392,7 +392,13 @@ out:
/*
* CMA is activated by core_initcall, so we must be called after it.
*/
-postcore_initcall(atomic_pool_init);
+/*
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ //drvid_cma, // TODO
+ 0
+};
+*/
+annotated_initcall(postcore, atomic_pool_init, drvid_atomic_pool, NULL);

struct dma_contig_early_reserve {
phys_addr_t base;
@@ -1029,7 +1035,13 @@ static int __init dma_debug_do_init(void)
dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
return 0;
}
-fs_initcall(dma_debug_do_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_atomic_pool,
+ 0
+};
+
+annotated_initcall(fs, dma_debug_do_init, drvid_dma_debug, dependencies);

#ifdef CONFIG_ARM_DMA_USE_IOMMU

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 8ca94d3..d96fd61 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -957,7 +957,13 @@ static struct platform_driver omap_dm_timer_driver = {
};

early_platform_init("earlytimer", &omap_dm_timer_driver);
-module_platform_driver(omap_dm_timer_driver);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ 0
+};
+
+annotated_module_platform_driver(omap_dm_timer_driver, drvid_omap_dm_timer, dependencies);

MODULE_DESCRIPTION("OMAP Dual-Mode Timer Driver");
MODULE_LICENSE("GPL");
diff --git a/arch/x86/crypto/aes_glue.c b/arch/x86/crypto/aes_glue.c
index e26984f..bf45e7e 100644
--- a/arch/x86/crypto/aes_glue.c
+++ b/arch/x86/crypto/aes_glue.c
@@ -61,7 +61,12 @@ static void __exit aes_fini(void)
crypto_unregister_alg(&aes_alg);
}

-module_init(aes_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(aes_init, drvid_aes_x86, dependencies);
module_exit(aes_fini);

MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm, asm optimized");
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 9393896..d59b740 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -911,7 +911,13 @@ static __init int hpet_insert_resource(void)
return insert_resource(&iomem_resource, hpet_res);
}

-late_initcall(hpet_insert_resource);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_hpet_late,
+ drvid_hpet,
+ 0
+};
+
+annotated_initcall(late, hpet_insert_resource, drvid_hpet_insert_resource, dependencies);

#else
#define acpi_parse_hpet NULL
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
index 4b28159..280a041 100644
--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -179,5 +179,5 @@ static void __exit ffh_cstate_exit(void)
cpu_cstate_entry = NULL;
}

-arch_initcall(ffh_cstate_init);
+annotated_initcall(arch, ffh_cstate_init, drvid_ffh_cstate, NULL);
__exitcall(ffh_cstate_exit);
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 927ec92..db7c293 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -2416,7 +2416,13 @@ static void __exit apm_exit(void)
}
}

-module_init(apm_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ drvid_dmi,
+ 0
+};
+
+annotated_module_init(apm_init, drvid_apm, dependencies);
module_exit(apm_exit);

MODULE_AUTHOR("Stephen Rothwell");
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index df919ff..528d52f3 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -2529,7 +2529,13 @@ err_out:

return err;
}
-device_initcall_sync(mcheck_init_device);
+
+static const unsigned dependencies0[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};
+
+annotated_initcall_sync(device, mcheck_init_device, drvid_mcheck, dependencies0);

/*
* Old style boot options parsing. Only for compatibility.
@@ -2591,5 +2597,12 @@ static int __init mcheck_debugfs_init(void)

return 0;
}
-late_initcall(mcheck_debugfs_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_mcheck,
+ drvid_debugfs,
+ 0
+};
+
+annotated_initcall(late, mcheck_debugfs_init, drvid_mcheck_debugfs, dependencies);
#endif
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 1af51b1..7851594 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -325,7 +325,13 @@ static __init int thermal_throttle_init_device(void)

return 0;
}
-device_initcall(thermal_throttle_init_device);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_thermal,
+ 0
+};
+
+annotated_initcall(device, thermal_throttle_init_device, drvid_thermal_throttle, dependencies);

#endif /* CONFIG_SYSFS */

diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 6236a54..32a1653 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -561,7 +561,13 @@ static int __init microcode_init(void)
return error;

}
-module_init(microcode_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};
+
+annotated_module_init(microcode_init, drvid_microcode, dependencies);

static void __exit microcode_exit(void)
{
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 10757d0..187007d 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -922,7 +922,7 @@ static __init int hpet_late_init(void)

return 0;
}
-fs_initcall(hpet_late_init);
+annotated_initcall(fs, hpet_late_init, drvid_hpet_late, NULL);

void hpet_disable(void)
{
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 353972c..0502482 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -311,8 +311,20 @@ static int __init pci_iommu_init(void)

return 0;
}
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ //drvid_iommu,
+ drvid_iommu_dev,
+ //drvid_amd_iommu_v2,
+ 0
+};
+
/* Must execute after PCI subsystem */
-rootfs_initcall(pci_iommu_init);
+annotated_initcall(rootfs, pci_iommu_init, drvid_pci_iommu, dependencies);

#ifdef CONFIG_PCI
/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
diff --git a/arch/x86/kernel/pmc_atom.c b/arch/x86/kernel/pmc_atom.c
index d66a4fe..2902e1d 100644
--- a/arch/x86/kernel/pmc_atom.c
+++ b/arch/x86/kernel/pmc_atom.c
@@ -363,7 +363,12 @@ static int __init pmc_atom_init(void)
return -ENODEV;
}

-module_init(pmc_atom_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_module_init(pmc_atom_init, drvid_pmc_atom, dependencies);
/* no module_exit, this driver shouldn't be unloaded */

MODULE_AUTHOR("Aubrey Li <aubrey.li@linux.intel.com>");
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 86db4bc..eceb029 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -434,7 +434,13 @@ static int __init reboot_init(void)

return 0;
}
-core_initcall(reboot_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_dmi,
+ 0
+};
+
+annotated_initcall(core, reboot_init, drvid_reboot, dependencies);

static inline void kb_wait(void)
{
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index cd96852..b28811c 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -206,4 +206,12 @@ static __init int add_rtc_cmos(void)

return 0;
}
-device_initcall(add_rtc_cmos);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rtc,
+ drvid_pnp_system,
+ drvid_pnpacpi, // optional
+ 0
+};
+
+annotated_initcall(device, add_rtc_cmos, drvid_rtc_cmos_x86, dependencies);
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 80f874b..5f21f5b 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1288,4 +1288,4 @@ static int __init register_kernel_offset_dumper(void)
&kernel_offset_notifier);
return 0;
}
-__initcall(register_kernel_offset_dumper);
+annotated_initcall(device, register_kernel_offset_dumper, drvid_kernel_offset_dumper, NULL);
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 7437b41..7702c7b 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -950,7 +950,12 @@ static int __init cpufreq_tsc(void)
return 0;
}

-core_initcall(cpufreq_tsc);
+static const unsigned dependencies0[] __initconst __maybe_unused = {
+ drvid_cpufreq,
+ 0
+};
+
+annotated_initcall(core, cpufreq_tsc, drvid_cpufreq_tsc, dependencies0);

#endif /* CONFIG_CPU_FREQ */

@@ -1166,7 +1171,14 @@ static int __init init_tsc_clocksource(void)
* We use device_initcall here, to ensure we run after the hpet
* is fully initialized, which may occur at fs_initcall time.
*/
-device_initcall(init_tsc_clocksource);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_clocksource_done_booting,
+ drvid_hpet,
+ 0
+};
+
+annotated_initcall(device, init_tsc_clocksource, drvid_tsc_clocksource, dependencies);

void __init tsc_init(void)
{
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 0a9f2ca..1b93058 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -365,11 +365,17 @@ static int __init pcibios_assign_resources(void)
return 0;
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_subsys,
+ drvid_pnpacpi,
+ 0
+};
+
/**
* called in fs_initcall (one below subsys_initcall),
* give a chance for motherboard reserve resources
*/
-fs_initcall(pcibios_assign_resources);
+annotated_initcall(fs, pcibios_assign_resources, drvid_pcibios_assign_resources, dependencies);

void pcibios_resource_survey_bus(struct pci_bus *bus)
{
diff --git a/arch/x86/pci/init.c b/arch/x86/pci/init.c
index adb62aa..9045ec9 100644
--- a/arch/x86/pci/init.c
+++ b/arch/x86/pci/init.c
@@ -41,4 +41,11 @@ static __init int pci_arch_init(void)

return 0;
}
-arch_initcall(pci_arch_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_acpi, // optional
+ drvid_pci_driver,
+ 0
+};
+
+annotated_initcall(arch, pci_arch_init, drvid_pci_arch, dependencies);
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index 5b662c0..937edaa 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -69,4 +69,14 @@ int __init pci_subsys_init(void)

return 0;
}
-subsys_initcall(pci_subsys_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ //drvid_pci_acpi,
+ drvid_pci_arch,
+ drvid_pci_slot, // optional
+ drvid_acpi, // optional
+ drvid_dmi,
+ 0
+};
+
+annotated_initcall(subsys, pci_subsys_init, drvid_pci_subsys, dependencies);
diff --git a/block/bio.c b/block/bio.c
index d6e5ba3..3796515 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -2108,4 +2108,10 @@ static int __init init_bio(void)

return 0;
}
-subsys_initcall(init_bio);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_bdi,
+ 0
+};
+
+annotated_initcall(subsys, init_bio, drvid_bio, dependencies);
diff --git a/block/blk-integrity.c b/block/blk-integrity.c
index f548b64..b55e89a 100644
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -378,7 +378,13 @@ static int __init blk_dev_integrity_init(void)
0, SLAB_PANIC, NULL);
return 0;
}
-subsys_initcall(blk_dev_integrity_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_blk_mq,
+ 0
+};
+
+annotated_initcall(subsys, blk_dev_integrity_init, drvid_blk_dev_integrity, dependencies);

static void blk_integrity_release(struct kobject *kobj)
{
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 1a27f45..cd1e0d2 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -404,4 +404,5 @@ static int __init blk_ioc_init(void)
sizeof(struct io_context), 0, SLAB_PANIC, NULL);
return 0;
}
-subsys_initcall(blk_ioc_init);
+
+annotated_initcall(subsys, blk_ioc_init, drvid_blk_ioc, NULL);
diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c
index 0736729..1d93c51 100644
--- a/block/blk-iopoll.c
+++ b/block/blk-iopoll.c
@@ -221,4 +221,4 @@ static __init int blk_iopoll_setup(void)
register_hotcpu_notifier(&blk_iopoll_cpu_notifier);
return 0;
}
-subsys_initcall(blk_iopoll_setup);
+annotated_initcall(subsys, blk_iopoll_setup, drvid_blk_iopoll, NULL);
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 176262e..65b54a5 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2307,4 +2307,14 @@ static int __init blk_mq_init(void)

return 0;
}
-subsys_initcall(blk_mq_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_bio,
+ drvid_blk_ioc,
+ drvid_blk_iopoll,
+ drvid_blk_settings,
+ drvid_blk_softirq,
+ 0
+};
+
+annotated_initcall(subsys, blk_mq_init, drvid_blk_mq, dependencies);
diff --git a/block/blk-settings.c b/block/blk-settings.c
index e0057d0..547e782 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -858,4 +858,4 @@ static int __init blk_settings_init(void)
blk_max_pfn = max_pfn - 1;
return 0;
}
-subsys_initcall(blk_settings_init);
+annotated_initcall(subsys, blk_settings_init, drvid_blk_settings, NULL);
diff --git a/block/blk-softirq.c b/block/blk-softirq.c
index 53b1737..4947d5b 100644
--- a/block/blk-softirq.c
+++ b/block/blk-softirq.c
@@ -183,4 +183,4 @@ static __init int blk_softirq_init(void)
register_hotcpu_notifier(&blk_cpu_notifier);
return 0;
}
-subsys_initcall(blk_softirq_init);
+annotated_initcall(subsys, blk_softirq_init, drvid_blk_softirq, NULL);
diff --git a/block/bsg.c b/block/bsg.c
index d214e92..17dac4a 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -1094,4 +1094,9 @@ MODULE_AUTHOR("Jens Axboe");
MODULE_DESCRIPTION(BSG_DESCRIPTION);
MODULE_LICENSE("GPL");

-device_initcall(bsg_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_blk_scsi_ioctl,
+ 0
+};
+
+annotated_initcall(device, bsg_init, drvid_bsg, dependencies);
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index c62bb2e..f92d45b 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -4746,7 +4746,7 @@ static void __exit cfq_exit(void)
kmem_cache_destroy(cfq_pool);
}

-module_init(cfq_init);
+annotated_module_init(cfq_init, drvid_cfq_iosched, NULL);
module_exit(cfq_exit);

MODULE_AUTHOR("Jens Axboe");
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index a753df2..5331a16 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -468,7 +468,7 @@ static void __exit deadline_exit(void)
elv_unregister(&iosched_deadline);
}

-module_init(deadline_init);
+annotated_module_init(deadline_init, drvid_deadline_iosched, NULL);
module_exit(deadline_exit);

MODULE_AUTHOR("Jens Axboe");
diff --git a/block/genhd.c b/block/genhd.c
index 59a1395..842017f 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -916,7 +916,12 @@ static int __init genhd_device_init(void)
return 0;
}

-subsys_initcall(genhd_device_init);
+static const unsigned dependencies0[] __initconst __maybe_unused = {
+ drvid_bdi,
+ 0
+};
+
+annotated_initcall(subsys, genhd_device_init, drvid_genhd, dependencies0);

static ssize_t disk_range_show(struct device *dev,
struct device_attribute *attr, char *buf)
@@ -1213,7 +1218,13 @@ static int __init proc_genhd_init(void)
proc_create("partitions", 0, NULL, &proc_partitions_operations);
return 0;
}
-module_init(proc_genhd_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_genhd,
+ 0
+};
+
+annotated_module_init(proc_genhd_init, drvid_proc_genhd, dependencies);
#endif /* CONFIG_PROC_FS */

dev_t blk_lookup_devt(const char *name, int partno)
diff --git a/block/noop-iosched.c b/block/noop-iosched.c
index 3de89d4..71cd484 100644
--- a/block/noop-iosched.c
+++ b/block/noop-iosched.c
@@ -115,7 +115,12 @@ static void __exit noop_exit(void)
elv_unregister(&elevator_noop);
}

-module_init(noop_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_blk_mq,
+ 0
+};
+
+annotated_initcall_sync(fs, noop_init, drvid_noop, NULL);
module_exit(noop_exit);


diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index dda653c..bdaf98c 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -745,4 +745,10 @@ static int __init blk_scsi_ioctl_init(void)
blk_set_cmd_filter_defaults(&blk_default_cmd_filter);
return 0;
}
-fs_initcall(blk_scsi_ioctl_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_blk_mq,
+ 0
+};
+
+annotated_initcall(fs, blk_scsi_ioctl_init, drvid_blk_scsi_ioctl, dependencies);
diff --git a/crypto/aes_generic.c b/crypto/aes_generic.c
index 3dd1011..133609e 100644
--- a/crypto/aes_generic.c
+++ b/crypto/aes_generic.c
@@ -1469,7 +1469,12 @@ static void __exit aes_fini(void)
crypto_unregister_alg(&aes_alg);
}

-module_init(aes_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(aes_init, drvid_aes_generic, dependencies);
module_exit(aes_fini);

MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm");
diff --git a/crypto/algapi.c b/crypto/algapi.c
index 3c079b7..0e204a2 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -996,7 +996,7 @@ static void __exit crypto_algapi_exit(void)
crypto_exit_proc();
}

-module_init(crypto_algapi_init);
+annotated_module_init(crypto_algapi_init, drvid_crypto_algapi, NULL);
module_exit(crypto_algapi_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/algboss.c b/crypto/algboss.c
index 76fc0b2..d250d6f 100644
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -301,7 +301,7 @@ static void __exit cryptomgr_exit(void)
BUG_ON(err);
}

-subsys_initcall(cryptomgr_init);
+annotated_initcall(subsys, cryptomgr_init, drvid_cryptomgr, NULL);
module_exit(cryptomgr_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c
index b0e4ed2..2c486b0 100644
--- a/crypto/asymmetric_keys/asymmetric_type.c
+++ b/crypto/asymmetric_keys/asymmetric_type.c
@@ -410,5 +410,5 @@ static void __exit asymmetric_key_cleanup(void)
unregister_key_type(&key_type_asymmetric);
}

-module_init(asymmetric_key_init);
+annotated_module_init(asymmetric_key_init, drvid_asymmetric_key, NULL);
module_exit(asymmetric_key_cleanup);
diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c
index 24f17e6..48db7b9 100644
--- a/crypto/asymmetric_keys/x509_public_key.c
+++ b/crypto/asymmetric_keys/x509_public_key.c
@@ -370,7 +370,12 @@ static void __exit x509_key_exit(void)
unregister_asymmetric_key_parser(&x509_key_parser);
}

-module_init(x509_key_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_asymmetric_key,
+ 0
+};
+
+annotated_module_init(x509_key_init, drvid_x509, dependencies);
module_exit(x509_key_exit);

MODULE_DESCRIPTION("X.509 certificate parser");
diff --git a/crypto/authenc.c b/crypto/authenc.c
index 3e85229..4ea9d69 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -717,7 +717,7 @@ static void __exit crypto_authenc_module_exit(void)
crypto_unregister_template(&crypto_authenc_tmpl);
}

-module_init(crypto_authenc_module_init);
+annotated_module_init(crypto_authenc_module_init, drvid_authenc, NULL);
module_exit(crypto_authenc_module_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/authencesn.c b/crypto/authencesn.c
index b8efe36..b14ce83 100644
--- a/crypto/authencesn.c
+++ b/crypto/authencesn.c
@@ -789,7 +789,7 @@ static void __exit crypto_authenc_esn_module_exit(void)
crypto_unregister_template(&crypto_authenc_esn_tmpl);
}

-module_init(crypto_authenc_esn_module_init);
+annotated_module_init(crypto_authenc_esn_module_init, drvid_authencesn, NULL);
module_exit(crypto_authenc_esn_module_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/cbc.c b/crypto/cbc.c
index 780ee27..6400d2e 100644
--- a/crypto/cbc.c
+++ b/crypto/cbc.c
@@ -284,7 +284,12 @@ static void __exit crypto_cbc_module_exit(void)
crypto_unregister_template(&crypto_cbc_tmpl);
}

-module_init(crypto_cbc_module_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(crypto_cbc_module_init, drvid_cbc, dependencies);
module_exit(crypto_cbc_module_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/chainiv.c b/crypto/chainiv.c
index b434001..74e63922 100644
--- a/crypto/chainiv.c
+++ b/crypto/chainiv.c
@@ -309,7 +309,12 @@ static void chainiv_module_exit(void)
crypto_unregister_template(&chainiv_tmpl);
}

-module_init(chainiv_module_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_crypto_wq,
+ 0
+};
+
+annotated_module_init(chainiv_module_init, drvid_chainiv, dependencies);
module_exit(chainiv_module_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/crc32c_generic.c b/crypto/crc32c_generic.c
index 06f1b60..e5474da 100644
--- a/crypto/crc32c_generic.c
+++ b/crypto/crc32c_generic.c
@@ -164,7 +164,12 @@ static void __exit crc32c_mod_fini(void)
crypto_unregister_shash(&alg);
}

-module_init(crc32c_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(crc32c_mod_init, drvid_crc32c, dependencies);
module_exit(crc32c_mod_fini);

MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>");
diff --git a/crypto/crct10dif_generic.c b/crypto/crct10dif_generic.c
index c1229614..0f8b5be 100644
--- a/crypto/crct10dif_generic.c
+++ b/crypto/crct10dif_generic.c
@@ -118,7 +118,12 @@ static void __exit crct10dif_mod_fini(void)
crypto_unregister_shash(&alg);
}

-module_init(crct10dif_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(crct10dif_mod_init, drvid_crct10dif, dependencies);
module_exit(crct10dif_mod_fini);

MODULE_AUTHOR("Tim Chen <tim.c.chen@linux.intel.com>");
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index 22ba81f..da7969a 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -1010,7 +1010,12 @@ static void __exit cryptd_exit(void)
crypto_unregister_template(&cryptd_tmpl);
}

-subsys_initcall(cryptd_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_crypto_wq,
+ 0
+};
+
+annotated_initcall(subsys, cryptd_init, drvid_cryptd, dependencies);
module_exit(cryptd_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 08ea286..6ffc6d4 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -580,7 +580,12 @@ static void __exit crypto_user_exit(void)
netlink_kernel_release(crypto_nlsk);
}

-module_init(crypto_user_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_netlink,
+ 0
+};
+
+annotated_module_init(crypto_user_init, drvid_crypto_user, dependencies);
module_exit(crypto_user_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Steffen Klassert <steffen.klassert@secunet.com>");
diff --git a/crypto/crypto_wq.c b/crypto/crypto_wq.c
index 2f1b8d1..59738f0 100644
--- a/crypto/crypto_wq.c
+++ b/crypto/crypto_wq.c
@@ -33,7 +33,12 @@ static void __exit crypto_wq_exit(void)
destroy_workqueue(kcrypto_wq);
}

-subsys_initcall(crypto_wq_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_wq_sysfs,
+ 0
+};
+
+annotated_initcall(subsys, crypto_wq_init, drvid_crypto_wq, dependencies);
module_exit(crypto_wq_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/deflate.c b/crypto/deflate.c
index 95d8d37..cca5124 100644
--- a/crypto/deflate.c
+++ b/crypto/deflate.c
@@ -216,7 +216,12 @@ static void __exit deflate_mod_fini(void)
crypto_unregister_alg(&alg);
}

-module_init(deflate_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(deflate_mod_init, drvid_deflate, dependencies);
module_exit(deflate_mod_fini);

MODULE_LICENSE("GPL");
diff --git a/crypto/des_generic.c b/crypto/des_generic.c
index a717205..73ba888 100644
--- a/crypto/des_generic.c
+++ b/crypto/des_generic.c
@@ -993,7 +993,12 @@ static void __exit des_generic_mod_fini(void)
crypto_unregister_algs(des_algs, ARRAY_SIZE(des_algs));
}

-module_init(des_generic_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(des_generic_mod_init, drvid_des_generic, dependencies);
module_exit(des_generic_mod_fini);

MODULE_LICENSE("GPL");
diff --git a/crypto/ecb.c b/crypto/ecb.c
index 12011af..816418a 100644
--- a/crypto/ecb.c
+++ b/crypto/ecb.c
@@ -180,7 +180,7 @@ static void __exit crypto_ecb_module_exit(void)
crypto_unregister_template(&crypto_ecb_tmpl);
}

-module_init(crypto_ecb_module_init);
+annotated_module_init(crypto_ecb_module_init, drvid_ecb, NULL);
module_exit(crypto_ecb_module_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/eseqiv.c b/crypto/eseqiv.c
index 16dda72..a84c0e8 100644
--- a/crypto/eseqiv.c
+++ b/crypto/eseqiv.c
@@ -234,7 +234,7 @@ static void __exit eseqiv_module_exit(void)
crypto_unregister_template(&eseqiv_tmpl);
}

-module_init(eseqiv_module_init);
+annotated_module_init(eseqiv_module_init, drvid_eseqiv, NULL);
module_exit(eseqiv_module_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/hmac.c b/crypto/hmac.c
index 72e38c0..d41d507 100644
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -263,7 +263,7 @@ static void __exit hmac_module_exit(void)
crypto_unregister_template(&hmac_tmpl);
}

-module_init(hmac_module_init);
+annotated_initcall_sync(fs, hmac_module_init, drvid_hmac, NULL);
module_exit(hmac_module_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/lzo.c b/crypto/lzo.c
index 4b3e925..f19fdc3 100644
--- a/crypto/lzo.c
+++ b/crypto/lzo.c
@@ -102,7 +102,12 @@ static void __exit lzo_mod_fini(void)
crypto_unregister_alg(&alg);
}

-module_init(lzo_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(lzo_mod_init, drvid_lzo, dependencies);
module_exit(lzo_mod_fini);

MODULE_LICENSE("GPL");
diff --git a/crypto/mcryptd.c b/crypto/mcryptd.c
index fe5b495a..f90fa28 100644
--- a/crypto/mcryptd.c
+++ b/crypto/mcryptd.c
@@ -719,7 +719,12 @@ static void __exit mcryptd_exit(void)
free_percpu(mcryptd_flist);
}

-subsys_initcall(mcryptd_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_crypto_wq,
+ 0
+};
+
+annotated_initcall(subsys, mcryptd_init, drvid_mcryptd, dependencies);
module_exit(mcryptd_exit);

MODULE_LICENSE("GPL");
diff --git a/crypto/md5.c b/crypto/md5.c
index 33d17e9..2c4583d 100644
--- a/crypto/md5.c
+++ b/crypto/md5.c
@@ -163,7 +163,12 @@ static void __exit md5_mod_fini(void)
crypto_unregister_shash(&alg);
}

-module_init(md5_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(md5_mod_init, drvid_md5, dependencies);
module_exit(md5_mod_fini);

MODULE_LICENSE("GPL");
diff --git a/crypto/michael_mic.c b/crypto/michael_mic.c
index 46195e0..94a6a86 100644
--- a/crypto/michael_mic.c
+++ b/crypto/michael_mic.c
@@ -177,8 +177,12 @@ static void __exit michael_mic_exit(void)
crypto_unregister_shash(&alg);
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};

-module_init(michael_mic_init);
+annotated_module_init(michael_mic_init, drvid_michael_mic, dependencies);
module_exit(michael_mic_exit);

MODULE_LICENSE("GPL v2");
diff --git a/crypto/sha1_generic.c b/crypto/sha1_generic.c
index 39e3acc..47b19f9 100644
--- a/crypto/sha1_generic.c
+++ b/crypto/sha1_generic.c
@@ -85,7 +85,12 @@ static void __exit sha1_generic_mod_fini(void)
crypto_unregister_shash(&alg);
}

-module_init(sha1_generic_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_initcall_sync(fs, sha1_generic_mod_init, drvid_sha1_generic, dependencies);
module_exit(sha1_generic_mod_fini);

MODULE_LICENSE("GPL");
diff --git a/crypto/sha256_generic.c b/crypto/sha256_generic.c
index 7843116..0eda295 100644
--- a/crypto/sha256_generic.c
+++ b/crypto/sha256_generic.c
@@ -285,7 +285,12 @@ static void __exit sha256_generic_mod_fini(void)
crypto_unregister_shashes(sha256_algs, ARRAY_SIZE(sha256_algs));
}

-module_init(sha256_generic_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(sha256_generic_mod_init, drvid_sha256_generic, dependencies);
module_exit(sha256_generic_mod_fini);

MODULE_LICENSE("GPL");
diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
index eba965d..491a903 100644
--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -201,7 +201,12 @@ static void __exit sha512_generic_mod_fini(void)
crypto_unregister_shashes(sha512_algs, ARRAY_SIZE(sha512_algs));
}

-module_init(sha512_generic_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_init(sha512_generic_mod_init, drvid_sha512_generic, dependencies);
module_exit(sha512_generic_mod_fini);

MODULE_LICENSE("GPL");
diff --git a/crypto/xor.c b/crypto/xor.c
index 35d6b3a..54ebe35 100644
--- a/crypto/xor.c
+++ b/crypto/xor.c
@@ -165,5 +165,5 @@ static __exit void xor_exit(void) { }
MODULE_LICENSE("GPL");

/* when built-in xor.o must initialize before drivers/md/md.o */
-core_initcall(calibrate_xor_blocks);
+annotated_initcall(core, calibrate_xor_blocks, drvid_xor, NULL);
module_exit(xor_exit);
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 9b5354a..64d2352 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -458,5 +458,14 @@ static void __exit acpi_ac_exit(void)
acpi_unlock_ac_dir(acpi_ac_dir);
#endif
}
-module_init(acpi_ac_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_pm,
+ drvid_power_supply_class,
+ drvid_dmi,
+ 0
+};
+
+annotated_module_init(acpi_ac_init, drvid_acpi_ac, dependencies);
module_exit(acpi_ac_exit);
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index b3628cc..57ddb97 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -1327,5 +1327,11 @@ static void __exit acpi_battery_exit(void)
#endif
}

-module_init(acpi_battery_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_pm,
+ 0
+};
+
+annotated_module_init(acpi_battery_init, drvid_acpi_battery, dependencies);
module_exit(acpi_battery_exit);
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 513e7230e..acd4d2e 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -703,4 +703,12 @@ static int __init acpi_init(void)
return 0;
}

-subsys_initcall(acpi_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_slot, // optional
+ drvid_pci_arch, // x86
+ drvid_debugfs,
+ 0
+};
+
+annotated_initcall(subsys, acpi_init, drvid_acpi, dependencies);
+//subsys_initcall(acpi_init);
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 6d5d183..0b8372f 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -450,4 +450,10 @@ static int acpi_button_remove(struct acpi_device *device)
return 0;
}

-module_acpi_driver(acpi_button_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_input,
+ 0
+};
+
+annotated_module_acpi_driver(acpi_button_driver, drvid_acpi_button, dependencies);
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index e24ea4e..84e3ab1 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -180,4 +180,12 @@ static int __init acpi_event_init(void)
return 0;
}

-fs_initcall(acpi_event_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_acpi_wmi,
+ drvid_pci_subsys,
+ drvid_netlink,
+ 0
+};
+
+annotated_initcall(fs, acpi_event_init, drvid_acpi_event, dependencies);
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index bea0bba..e2e7a25 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -418,4 +418,11 @@ static int acpi_fan_resume(struct device *dev)
}
#endif

-module_platform_driver(acpi_fan_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_pm,
+ drvid_thermal,
+ 0
+};
+
+annotated_module_platform_driver(acpi_fan_driver, drvid_acpi_fan, dependencies);
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 3b8963f..3f7d526 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -214,7 +214,12 @@ static int __init acpi_reserve_resources(void)

return 0;
}
-fs_initcall_sync(acpi_reserve_resources);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi_event,
+ 0
+};
+
+annotated_initcall_sync(fs, acpi_reserve_resources, drvid_acpi_reserve_resources, dependencies);

void acpi_os_printf(const char *fmt, ...)
{
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index d9f7158..ec960ab 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -301,7 +301,13 @@ static void __exit acpi_processor_driver_exit(void)
driver_unregister(&acpi_processor_driver);
}

-module_init(acpi_processor_driver_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_cpufreq,
+ 0
+};
+
+annotated_module_init(acpi_processor_driver_init, drvid_acpi_processor_driver, dependencies);
module_exit(acpi_processor_driver_exit);

MODULE_ALIAS("processor");
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 01504c8..584c97c 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -769,5 +769,13 @@ static void __exit acpi_sbs_exit(void)
return;
}

-module_init(acpi_sbs_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_dmi,
+ drvid_pm,
+ drvid_power_supply_class,
+ 0
+};
+
+annotated_module_init(acpi_sbs_init, drvid_acpi_sbs, dependencies);
module_exit(acpi_sbs_exit);
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index bf034f8..a70278c 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -331,7 +331,13 @@ static int acpi_smbus_hc_remove(struct acpi_device *device)
return 0;
}

-module_acpi_driver(acpi_smb_hc_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_dmi,
+ 0
+};
+
+annotated_module_acpi_driver(acpi_smb_hc_driver, drvid_acpi_smb_hc, dependencies);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Alexey Starikovskiy");
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 6d4e44e..658f290 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -1284,5 +1284,13 @@ static void __exit acpi_thermal_exit(void)
return;
}

-module_init(acpi_thermal_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_dmi,
+ drvid_pm,
+ drvid_thermal,
+ 0
+};
+
+annotated_module_init(acpi_thermal_init, drvid_acpi_thermal, dependencies);
module_exit(acpi_thermal_exit);
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 3f3a7db..a93f864 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -686,7 +686,13 @@ static struct platform_driver imx_ahci_driver = {
.pm = &ahci_imx_pm_ops,
},
};
-module_platform_driver(imx_ahci_driver);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ahci,
+ 0
+};
+
+annotated_module_platform_driver(imx_ahci_driver, drvid_ahci_imx, dependencies);

MODULE_DESCRIPTION("Freescale i.MX AHCI SATA platform driver");
MODULE_AUTHOR("Richard Zhu <Hong-Xing.Zhu@freescale.com>");
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 1befb11..b790d7b 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -97,7 +97,13 @@ static struct platform_driver ahci_driver = {
.pm = &ahci_pm_ops,
},
};
-module_platform_driver(ahci_driver);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ 0
+};
+
+annotated_module_platform_driver(ahci_driver, drvid_ahci, dependencies);

MODULE_DESCRIPTION("AHCI SATA platform driver");
MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 9ff545c..ba0d693 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -247,7 +247,16 @@ static struct pci_driver ata_generic_pci_driver = {
#endif
};

-module_pci_driver(ata_generic_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_pci_driver(ata_generic_pci_driver, drvid_ata_generic, dependencies);

MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("low-level driver for generic ATA");
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index ffbe625..132de06 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1801,5 +1801,14 @@ static void __exit piix_exit(void)
pci_unregister_driver(&piix_pci_driver);
}

-module_init(piix_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_init(piix_init, drvid_ata_piix, dependencies);
module_exit(piix_exit);
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 790e0de..8107fd9 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6665,7 +6665,12 @@ static void __exit ata_exit(void)
kfree(ata_force_tbl);
}

-subsys_initcall(ata_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_scsi_mod,
+ 0
+};
+
+annotated_initcall(subsys, ata_init, drvid_ata, dependencies);
module_exit(ata_exit);

static DEFINE_RATELIMIT_STATE(ratelimit, HZ / 5, 1);
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
index b70fce2..77c9691 100644
--- a/drivers/ata/pata_acpi.c
+++ b/drivers/ata/pata_acpi.c
@@ -271,7 +271,16 @@ static struct pci_driver pacpi_pci_driver = {
#endif
};

-module_pci_driver(pacpi_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_pci_driver(pacpi_pci_driver, drvid_pata_acpi, dependencies);

MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("SCSI low-level driver for ATA in ACPI mode");
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 8d4d959..a95b886 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -631,7 +631,16 @@ static struct pci_driver amd_pci_driver = {
#endif
};

-module_pci_driver(amd_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_pci_driver(amd_pci_driver, drvid_pata_amd, dependencies);

MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("low-level driver for AMD and Nvidia PATA IDE");
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index 4d1a5d2..d9469e4 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -163,7 +163,16 @@ static struct pci_driver jmicron_pci_driver = {
#endif
};

-module_pci_driver(jmicron_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_pci_driver(jmicron_pci_driver, drvid_pata_jmicron, dependencies);

MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("SCSI low-level driver for Jmicron PATA ports");
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c
index 202b4d6..7fe0b0a 100644
--- a/drivers/ata/pata_mpiix.c
+++ b/drivers/ata/pata_mpiix.c
@@ -229,7 +229,16 @@ static struct pci_driver mpiix_pci_driver = {
#endif
};

-module_pci_driver(mpiix_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_pci_driver(mpiix_pci_driver, drvid_pata_mpiix, dependencies);

MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("low-level driver for Intel MPIIX");
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c
index b9bf78b..b07e680 100644
--- a/drivers/ata/pata_oldpiix.c
+++ b/drivers/ata/pata_oldpiix.c
@@ -264,7 +264,16 @@ static struct pci_driver oldpiix_pci_driver = {
#endif
};

-module_pci_driver(oldpiix_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_pci_driver(oldpiix_pci_driver, drvid_pata_oldpiix, dependencies);

MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("SCSI low-level driver for early PIIX series controllers");
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c
index b920c34..99b4d0c 100644
--- a/drivers/ata/pata_sch.c
+++ b/drivers/ata/pata_sch.c
@@ -177,4 +177,13 @@ static int sch_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return ata_pci_bmdma_init_one(pdev, ppi, &sch_sht, NULL, 0);
}

-module_pci_driver(sch_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_pci_driver(sch_pci_driver, drvid_pata_sch, dependencies);
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 626f989..f75c5be 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -905,7 +905,16 @@ static struct pci_driver sis_pci_driver = {
#endif
};

-module_pci_driver(sis_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ata,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_pci_driver(sis_pci_driver, drvid_pata_sis, dependencies);

MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("SCSI low-level driver for SiS ATA");
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 894bda1..ce00543 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1723,5 +1723,10 @@ static void __exit firmware_class_exit(void)
#endif
}

-fs_initcall(firmware_class_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ 0
+};
+
+annotated_initcall(fs, firmware_class_init, drvid_firmware_class, dependencies);
module_exit(firmware_class_exit);
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f7a4c9d..0d6cc1a 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1877,7 +1877,12 @@ static void __exit loop_exit(void)
misc_deregister(&loop_misc);
}

-module_init(loop_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_genhd,
+ 0
+};
+
+annotated_module_init(loop_init, drvid_loop, dependencies);
module_exit(loop_exit);

#ifndef MODULE
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index e98d15e..5047477 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -210,7 +210,7 @@ static struct platform_driver weim_driver = {
.of_match_table = weim_id_table,
},
};
-module_platform_driver_probe(weim_driver, weim_probe);
+annotated_module_platform_driver_probe(weim_driver, weim_probe, drvid_imx_weim, NULL);

MODULE_AUTHOR("Freescale Semiconductor Inc.");
MODULE_DESCRIPTION("i.MX EIM Controller Driver");
diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c
index 9f18569..9e17e9d 100644
--- a/drivers/bus/omap-ocp2scp.c
+++ b/drivers/bus/omap-ocp2scp.c
@@ -115,7 +115,7 @@ static struct platform_driver omap_ocp2scp_driver = {
},
};

-module_platform_driver(omap_ocp2scp_driver);
+annotated_module_platform_driver(omap_ocp2scp_driver, drvid_omap_ocp2scp, NULL);

MODULE_ALIAS("platform: omap-ocp2scp");
MODULE_AUTHOR("Texas Instruments Inc.");
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index 5012e3a..88f60a6 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -368,7 +368,7 @@ static int __init omap_l3_init(void)
{
return platform_driver_register(&omap_l3_driver);
}
-postcore_initcall_sync(omap_l3_init);
+annotated_initcall_drv_sync(postcore, omap_l3_init, drvid_omap_l3_noc, NULL, omap_l3_driver.driver);

static void __exit omap_l3_exit(void)
{
diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c
index 360a5c0..87c4426 100644
--- a/drivers/bus/omap_l3_smx.c
+++ b/drivers/bus/omap_l3_smx.c
@@ -302,7 +302,7 @@ static int __init omap3_l3_init(void)
{
return platform_driver_register(&omap3_l3_driver);
}
-postcore_initcall_sync(omap3_l3_init);
+annotated_initcall_drv_sync(postcore, omap3_l3_init, drvid_omap_l3_smx, NULL, omap3_l3_driver.driver);

static void __exit omap3_l3_exit(void)
{
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index 38ffb28..dc019f4 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -361,6 +361,10 @@ MODULE_DESCRIPTION("AGP GART driver");
MODULE_LICENSE("GPL and additional rights");
MODULE_ALIAS_MISCDEV(AGPGART_MINOR);

-module_init(agp_init);
-module_exit(agp_exit);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};

+annotated_module_init(agp_init, drvid_agpgart, dependencies);
+module_exit(agp_exit);
diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c
index 4f94375..ba52f03 100644
--- a/drivers/char/genrtc.c
+++ b/drivers/char/genrtc.c
@@ -530,8 +530,12 @@ static void __exit rtc_generic_exit(void)
misc_deregister(&rtc_gen_dev);
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};

-module_init(rtc_generic_init);
+annotated_module_init(rtc_generic_init, drvid_genrtc, dependencies);
module_exit(rtc_generic_exit);

MODULE_AUTHOR("Richard Zidlicky");
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 5c0baa9..0be167f 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -1098,7 +1098,15 @@ static void __exit hpet_exit(void)
return;
}

-module_init(hpet_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_hpet_late,
+ drvid_misc,
+ drvid_acpi,
+ drvid_acpi_reserve_resources,
+ 0
+};
+
+annotated_module_init(hpet_init, drvid_hpet, dependencies);
module_exit(hpet_exit);
MODULE_AUTHOR("Bob Picco <Robert.Picco@hp.com>");
MODULE_LICENSE("GPL");
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 5643b65..052a464 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -583,7 +583,12 @@ static void __exit hwrng_modexit(void)
unregister_miscdev();
}

-module_init(hwrng_modinit);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};
+
+annotated_module_init(hwrng_modinit, drvid_hwrng, dependencies);
module_exit(hwrng_modexit);

MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver");
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 8a1432e..fd05cb5 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -453,8 +453,14 @@ static struct platform_driver omap_rng_driver = {
.probe = omap_rng_probe,
.remove = omap_rng_remove,
};
-
-module_platform_driver(omap_rng_driver);
+/*
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_hwrng,
+ 0
+};
+*/
+//module_platform_driver_deps(omap_rng_driver, drvid_omap_rng, dependencies);
+annotated_module_platform_driver(omap_rng_driver, drvid_omap_rng, NULL);
MODULE_ALIAS("platform:omap_rng");
MODULE_AUTHOR("Deepak Saxena (and others)");
MODULE_LICENSE("GPL");
diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index a405cdc..397f3fe 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -131,7 +131,12 @@ static struct platform_driver omap3_rom_rng_driver = {
.remove = omap3_rom_rng_remove,
};

-module_platform_driver(omap3_rom_rng_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_hwrng,
+ 0
+};
+
+annotated_module_platform_driver(omap3_rom_rng_driver, drvid_omap3_rom_rng, dependencies);

MODULE_ALIAS("platform:omap3-rom-rng");
MODULE_AUTHOR("Juha Yrjola");
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index fdb0f9b..1f736a6 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -303,4 +303,4 @@ fail_remove:
remove_proc_entry("misc", NULL);
return err;
}
-subsys_initcall(misc_init);
+annotated_initcall(subsys, misc_init, drvid_misc, NULL);
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 9df78e2..26e40d6 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -473,7 +473,12 @@ static void __exit nvram_cleanup_module(void)
misc_deregister(&nvram_dev);
}

-module_init(nvram_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};
+
+annotated_module_init(nvram_init, drvid_nvram, dependencies);
module_exit(nvram_cleanup_module);

/*
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index 3525996..f75676f 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -1155,7 +1155,13 @@ static void __exit rtc_exit(void)
#endif /* CONFIG_SPARC32 */
}

-module_init(rtc_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ drvid_hpet,
+ 0
+};
+
+annotated_module_init(rtc_init, drvid_char_rtc, dependencies);
module_exit(rtc_exit);

#ifdef RTC_IRQ
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index 6eab889..1601d84 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -222,10 +222,17 @@ static int __init init_acpi_pm_clocksource(void)
PMTMR_TICKS_PER_SEC);
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_clocksource_done_booting,
+ drvid_pci_quirks, // is that what is meant with PCI fixups?
+ 0
+};
+
/* We use fs_initcall because we want the PCI fixups to have run
* but we still need to load before device_initcall
*/
-fs_initcall(init_acpi_pm_clocksource);
+annotated_initcall(fs, init_acpi_pm_clocksource, drvid_acpi_pm_clocksource, dependencies);

/*
* Allow an override of the IOPort. Stupid BIOSes do not tell us about
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c
index 15d06fc..778ad1f 100644
--- a/drivers/connector/cn_proc.c
+++ b/drivers/connector/cn_proc.c
@@ -390,4 +390,9 @@ static int __init cn_proc_init(void)
return 0;
}

-module_init(cn_proc_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cn,
+ 0
+};
+
+annotated_module_init(cn_proc_init, drvid_cn_proc, dependencies);
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 30f5228..b08321f 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -318,5 +318,10 @@ static void cn_fini(void)
netlink_kernel_release(dev->nls);
}

-subsys_initcall(cn_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_netlink,
+ 0
+};
+
+annotated_initcall(subsys, cn_init, drvid_cn, dependencies);
module_exit(cn_fini);
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 0136dfc..ac897f6 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -992,7 +992,13 @@ MODULE_PARM_DESC(acpi_pstate_strict,
"value 0 or non-zero. non-zero -> strict ACPI checks are "
"performed during frequency changes.");

-late_initcall(acpi_cpufreq_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ drvid_cpufreq,
+ 0
+};
+
+annotated_initcall(late, acpi_cpufreq_init, drvid_acpi_cpufreq, dependencies);
module_exit(acpi_cpufreq_exit);

static const struct x86_cpu_id acpi_cpufreq_ids[] = {
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 7a3c30c..4026d51 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2626,4 +2626,4 @@ static int __init cpufreq_core_init(void)

return 0;
}
-core_initcall(cpufreq_core_init);
+annotated_initcall(core, cpufreq_core_init, drvid_cpufreq, NULL);
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index c86a10c..9a4c5fb 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -404,9 +404,14 @@ MODULE_DESCRIPTION("'cpufreq_conservative' - A dynamic cpufreq governor for "
"optimised for use in a battery environment");
MODULE_LICENSE("GPL");

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpufreq,
+ 0
+};
+
#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
-fs_initcall(cpufreq_gov_dbs_init);
+annotated_initcall(fs, cpufreq_gov_dbs_init, drvid_cpufreq_gov_dbs, dependencies);
#else
-module_init(cpufreq_gov_dbs_init);
+annotated_module_init(cpufreq_gov_dbs_init, drvid_cpufreq_gov_dbs, dependencies);
#endif
module_exit(cpufreq_gov_dbs_exit);
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 3c1e10f..822ac2c 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -623,9 +623,14 @@ MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for "
"Low Latency Frequency Transition capable processors");
MODULE_LICENSE("GPL");

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpufreq,
+ 0
+};
+
#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND
-fs_initcall(cpufreq_gov_dbs_init);
+annotated_initcall(fs, cpufreq_gov_dbs_init, drvid_cpufreq_ondemand, dependencies);
#else
-module_init(cpufreq_gov_dbs_init);
+annotated_module_init(cpufreq_gov_dbs_init, drvid_cpufreq_ondemand, dependencies);
#endif
module_exit(cpufreq_gov_dbs_exit);
diff --git a/drivers/cpufreq/cpufreq_performance.c b/drivers/cpufreq/cpufreq_performance.c
index cf117de..821d71a 100644
--- a/drivers/cpufreq/cpufreq_performance.c
+++ b/drivers/cpufreq/cpufreq_performance.c
@@ -56,5 +56,10 @@ MODULE_AUTHOR("Dominik Brodowski <linux@brodo.de>");
MODULE_DESCRIPTION("CPUfreq policy governor 'performance'");
MODULE_LICENSE("GPL");

-fs_initcall(cpufreq_gov_performance_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpufreq,
+ 0
+};
+
+annotated_initcall(fs, cpufreq_gov_performance_init, drvid_cpufreq_gov_performance, dependencies);
module_exit(cpufreq_gov_performance_exit);
diff --git a/drivers/cpufreq/cpufreq_powersave.c b/drivers/cpufreq/cpufreq_powersave.c
index e3b874c..09f8c04 100644
--- a/drivers/cpufreq/cpufreq_powersave.c
+++ b/drivers/cpufreq/cpufreq_powersave.c
@@ -56,9 +56,14 @@ MODULE_AUTHOR("Dominik Brodowski <linux@brodo.de>");
MODULE_DESCRIPTION("CPUfreq policy governor 'powersave'");
MODULE_LICENSE("GPL");

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpufreq,
+ 0
+};
+
#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE
-fs_initcall(cpufreq_gov_powersave_init);
+annotated_initcall(fs, cpufreq_gov_powersave_init, drvid_cpufreq_powersave, dependencies);
#else
-module_init(cpufreq_gov_powersave_init);
+annotated_module_init(cpufreq_gov_powersave_init, drvid_cpufreq_powersave, dependencies);
#endif
module_exit(cpufreq_gov_powersave_exit);
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 5e370a3..0b90ed1 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -353,5 +353,10 @@ MODULE_AUTHOR("Zou Nan hai <nanhai.zou@intel.com>");
MODULE_DESCRIPTION("Export cpufreq stats via sysfs");
MODULE_LICENSE("GPL");

-module_init(cpufreq_stats_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpufreq,
+ 0
+};
+
+annotated_module_init(cpufreq_stats_init, drvid_cpufreq_stats, dependencies);
module_exit(cpufreq_stats_exit);
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 380a90d..635c2cb 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -361,7 +361,13 @@ static struct platform_driver imx6q_cpufreq_platdrv = {
.probe = imx6q_cpufreq_probe,
.remove = imx6q_cpufreq_remove,
};
-module_platform_driver(imx6q_cpufreq_platdrv);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpufreq,
+ 0
+};
+
+annotated_module_platform_driver(imx6q_cpufreq_platdrv, drvid_imx6q_cpufreq, dependencies);

MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>");
MODULE_DESCRIPTION("Freescale i.MX6Q cpufreq driver");
diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index be42f10..1e23348 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -186,7 +186,12 @@ static struct platform_driver kirkwood_cpufreq_platform_driver = {
},
};

-module_platform_driver(kirkwood_cpufreq_platform_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpufreq,
+ 0
+};
+
+annotated_module_platform_driver(kirkwood_cpufreq_platform_driver, drvid_kirkwood_cpufreq, dependencies);

MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch");
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index e3866e0..9a6df7d 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -199,7 +199,13 @@ static struct platform_driver omap_cpufreq_platdrv = {
.probe = omap_cpufreq_probe,
.remove = omap_cpufreq_remove,
};
-module_platform_driver(omap_cpufreq_platdrv);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpufreq,
+ 0
+};
+
+annotated_module_platform_driver(omap_cpufreq_platdrv, drvid_omap_cpufreq, dependencies);

MODULE_DESCRIPTION("cpufreq driver for OMAP SoCs");
MODULE_LICENSE("GPL");
diff --git a/drivers/cpuidle/cpuidle-arm.c b/drivers/cpuidle/cpuidle-arm.c
index 545069d..a8161b5 100644
--- a/drivers/cpuidle/cpuidle-arm.c
+++ b/drivers/cpuidle/cpuidle-arm.c
@@ -18,7 +18,6 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/slab.h>
-
#include <asm/cpuidle.h>

#include "dt_idle_states.h"
@@ -160,4 +159,10 @@ out_fail:

return ret;
}
-device_initcall(arm_idle_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpuidle,
+ 0
+};
+
+annotated_module_init(arm_idle_init, drvid_cpuidle_arm, dependencies);
diff --git a/drivers/cpuidle/cpuidle-kirkwood.c b/drivers/cpuidle/cpuidle-kirkwood.c
index d23d8f4..154e844 100644
--- a/drivers/cpuidle/cpuidle-kirkwood.c
+++ b/drivers/cpuidle/cpuidle-kirkwood.c
@@ -79,7 +79,12 @@ static struct platform_driver kirkwood_cpuidle_driver = {
},
};

-module_platform_driver(kirkwood_cpuidle_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cpuidle,
+ 0
+};
+
+annotated_module_platform_driver(kirkwood_cpuidle_driver, drvid_kirkwood_cpuidle, dependencies);

MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");
MODULE_DESCRIPTION("Kirkwood cpu idle driver");
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 48b7228..65dd8dd 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -655,4 +655,4 @@ static int __init cpuidle_init(void)
}

module_param(off, int, 0444);
-core_initcall(cpuidle_init);
+annotated_initcall(core, cpuidle_init, drvid_cpuidle, NULL);
diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c
index 1c6f98d..b563279 100644
--- a/drivers/crypto/marvell/cesa.c
+++ b/drivers/crypto/marvell/cesa.c
@@ -538,7 +538,13 @@ static struct platform_driver marvell_cesa = {
.of_match_table = mv_cesa_of_match_table,
},
};
-module_platform_driver(marvell_cesa);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_platform_driver(marvell_cesa, drvid_marvell_cesa, dependencies);

MODULE_ALIAS("platform:mv_crypto");
MODULE_AUTHOR("Boris Brezillon <boris.brezillon@free-electrons.com>");
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index e6b658f..b708064 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -1213,7 +1213,12 @@ static struct platform_driver marvell_crypto = {
};
MODULE_ALIAS("platform:mv_crypto");

-module_platform_driver(marvell_crypto);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_platform_driver(marvell_crypto, drvid_mv_crypto, dependencies);

MODULE_AUTHOR("Sebastian Andrzej Siewior <sebastian@breakpoint.cc>");
MODULE_DESCRIPTION("Support for Marvell's cryptographic engine");
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index 9a28b7e..86e143b 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -1327,7 +1327,12 @@ static struct platform_driver omap_aes_driver = {
},
};

-module_platform_driver(omap_aes_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_platform_driver(omap_aes_driver, drvid_omap_aes, dependencies);

MODULE_DESCRIPTION("OMAP AES hw acceleration support.");
MODULE_LICENSE("GPL v2");
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index b2024c95..21446c9 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -2057,7 +2057,13 @@ static struct platform_driver omap_sham_driver = {
},
};

-module_platform_driver(omap_sham_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ drvid_cryptomgr,
+ 0
+};
+
+annotated_module_platform_driver(omap_sham_driver, drvid_omap_sham, dependencies);

MODULE_DESCRIPTION("OMAP SHA1/MD5 hw acceleration support.");
MODULE_LICENSE("GPL v2");
diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
index ceedafb..832433f 100644
--- a/drivers/dma/cppi41.c
+++ b/drivers/dma/cppi41.c
@@ -1079,6 +1079,12 @@ static struct platform_driver cpp41_dma_driver = {
},
};

-module_platform_driver(cpp41_dma_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_dma_bus,
+ drvid_pm,
+ 0
+};
+
+annotated_module_platform_driver(cpp41_dma_driver, drvid_cpp41_dma, dependencies);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Sebastian Andrzej Siewior <bigeasy@linutronix.de>");
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 3ff284c..d4f7e42 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -347,6 +347,7 @@ static int __init dma_channel_table_init(void)
return err;
}
arch_initcall(dma_channel_table_init);
+//annotated_initcall(arch, dma_channel_table_init, drvid_dma_channel_table, NULL);

/**
* dma_find_channel - find a channel to carry out the operation
@@ -1199,6 +1200,11 @@ static int __init dma_bus_init(void)
return err;
return class_register(&dma_devclass);
}
-arch_initcall(dma_bus_init);

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_dma_channel_table,
+ 0
+};

+arch_initcall(dma_bus_init);
+//annotated_initcall(arch, dma_bus_init, drvid_dma_bus, dependencies);
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 77b6aab..63966e4 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1650,7 +1650,13 @@ static struct platform_driver sdma_driver = {
.probe = sdma_probe,
};

-module_platform_driver(sdma_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_dma_bus,
+ drvid_firmware_class,
+ 0
+};
+
+annotated_module_platform_driver(sdma_driver, drvid_imx_sdma, dependencies);

MODULE_AUTHOR("Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>");
MODULE_DESCRIPTION("i.MX SDMA driver");
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index f1325f6..8cf8df2 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1295,7 +1295,14 @@ static int __init mv_xor_init(void)
{
return platform_driver_register(&mv_xor_driver);
}
-module_init(mv_xor_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_dma_bus,
+ 0
+};
+
+annotated_module_init_drv(mv_xor_init, drvid_mv_xor, dependencies,
+ mv_xor_driver.driver);

/* it's currently unsafe to unload this module */
#if 0
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index 60de352..4b8bd8e 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -884,4 +884,11 @@ static int __init mxs_dma_module_init(void)
{
return platform_driver_probe(&mxs_dma_driver, mxs_dma_probe);
}
-subsys_initcall(mxs_dma_module_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_dma_bus,
+ 0
+};
+
+annotated_initcall_drv(subsys, mxs_dma_module_init, drvid_mxs_dma, dependencies,
+ mxs_dma_driver.driver);
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
index 249445c..ed87cbf 100644
--- a/drivers/dma/omap-dma.c
+++ b/drivers/dma/omap-dma.c
@@ -1285,7 +1285,14 @@ static int omap_dma_init(void)
{
return platform_driver_register(&omap_dma_driver);
}
-subsys_initcall(omap_dma_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_dma_bus,
+ 0
+};
+
+annotated_initcall_drv(subsys, omap_dma_init, drvid_omap_dma, dependencies,
+ omap_dma_driver.driver);

static void __exit omap_dma_exit(void)
{
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index ac1ce4a..e36c998 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -714,7 +714,13 @@ static int __init dmi_init(void)

return ret;
}
-subsys_initcall(dmi_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_firmware_class,
+ 0
+};
+
+annotated_initcall(subsys, dmi_init, drvid_dmi, dependencies);

/**
* dmi_set_dump_stack_arch_desc - set arch description for dump_stack()
diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index 9bda372..21cb251 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -670,7 +670,7 @@ static struct platform_driver bgpio_driver = {
.remove = bgpio_pdev_remove,
};

-module_platform_driver(bgpio_driver);
+annotated_module_platform_driver(bgpio_driver, drvid_bgpio, NULL);

#endif /* CONFIG_GPIO_GENERIC_PLATFORM */

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 1a54205..ce04ba5 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -860,4 +860,4 @@ static struct platform_driver mvebu_gpio_driver = {
.suspend = mvebu_gpio_suspend,
.resume = mvebu_gpio_resume,
};
-module_platform_driver(mvebu_gpio_driver);
+annotated_module_platform_driver(mvebu_gpio_driver, drvid_mvebu_gpio, NULL);
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index ec1eb1b..62505cd 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -506,7 +506,7 @@ static int __init gpio_mxc_init(void)
{
return platform_driver_register(&mxc_gpio_driver);
}
-postcore_initcall(gpio_mxc_init);
+annotated_initcall_drv(postcore, gpio_mxc_init, drvid_mxc_gpio, NULL, mxc_gpio_driver.driver);

MODULE_AUTHOR("Freescale Semiconductor, "
"Daniel Mack <danielncaiaq.de>, "
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 61a731f..723ad33 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1642,7 +1642,13 @@ static int __init omap_gpio_drv_reg(void)
{
return platform_driver_register(&omap_gpio_driver);
}
-postcore_initcall(omap_gpio_drv_reg);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ 0
+};
+
+annotated_initcall_drv(postcore, omap_gpio_drv_reg, drvid_omap_gpio, dependencies, omap_gpio_driver.driver);

static void __exit omap_gpio_exit(void)
{
diff --git a/drivers/gpio/gpio-tps65910.c b/drivers/gpio/gpio-tps65910.c
index 88f1f5f..973897b 100644
--- a/drivers/gpio/gpio-tps65910.c
+++ b/drivers/gpio/gpio-tps65910.c
@@ -205,7 +205,7 @@ static int __init tps65910_gpio_init(void)
{
return platform_driver_register(&tps65910_gpio_driver);
}
-subsys_initcall(tps65910_gpio_init);
+annotated_initcall_drv(subsys, tps65910_gpio_init, drvid_tps65910_gpio, NULL, tps65910_gpio_driver.driver);

static void __exit tps65910_gpio_exit(void)
{
diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c
index 9e1dbb9..717fa18 100644
--- a/drivers/gpio/gpio-twl4030.c
+++ b/drivers/gpio/gpio-twl4030.c
@@ -615,7 +615,7 @@ static int __init gpio_twl4030_init(void)
{
return platform_driver_register(&gpio_twl4030_driver);
}
-subsys_initcall(gpio_twl4030_init);
+annotated_initcall_drv(subsys, gpio_twl4030_init, drvid_gpio_twl4030, NULL, gpio_twl4030_driver.driver);

static void __exit gpio_twl4030_exit(void)
{
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index bf4bd1d..738545f 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2386,6 +2386,12 @@ static int __init gpiolib_debugfs_init(void)
NULL, NULL, &gpiolib_operations);
return 0;
}
-subsys_initcall(gpiolib_debugfs_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_initcall(subsys, gpiolib_debugfs_init, drvid_gpiolib_debugfs, dependencies);

#endif /* DEBUG_FS */
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 56da962..e43d69f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -537,7 +537,16 @@ static void __exit amdgpu_exit(void)
amdgpu_unregister_atpx_handler();
}

-module_init(amdgpu_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_drm,
+ drvid_pm,
+ drvid_firmware_class,
+ drvid_ttm,
+ drvid_hwmon,
+ 0
+};
+
+annotated_module_init(amdgpu_init, drvid_amdgpu, dependencies);
module_exit(amdgpu_exit);

MODULE_AUTHOR(DRIVER_AUTHOR);
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index b7bf4ce..552f0c0 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -894,5 +894,16 @@ static void __exit drm_core_exit(void)
idr_destroy(&drm_minors_idr);
}

-module_init(drm_core_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ drvid_i2c,
+ drvid_agpgart,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_init(drm_core_init, drvid_drm, dependencies);
module_exit(drm_core_exit);
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index cac4229..c3091de 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1834,5 +1834,10 @@ static int __init drm_fb_helper_modinit(void)
return 0;
}

-module_init(drm_fb_helper_modinit);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_drm,
+ 0
+};
+
+annotated_module_init(drm_fb_helper_modinit, drvid_drm_fb_helper, dependencies);
#endif
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 2d5ca8ee..d399abf 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -926,6 +926,19 @@ static int __init mipi_dsi_bus_init(void)
{
return bus_register(&mipi_dsi_bus_type);
}
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+// drvid_acpi,
+// drvid_pci_acpi,
+// drvid_pci_driver,
+/*
+ drvid_pci_quirks,
+ drvid_pci_slot,
+*/
+ 0
+};
+
+//annotated_initcall(postcore, mipi_dsi_bus_init, drvid_mipi_dsi_bus, dependencies);
postcore_initcall(mipi_dsi_bus_init);

MODULE_AUTHOR("Andrzej Hajda <a.hajda@samsung.com>");
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 603146e..73c8b88 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1776,7 +1776,12 @@ static void __exit i915_exit(void)
drm_pci_exit(&driver, &i915_pci_driver);
}

-module_init(i915_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_drm,
+ 0
+};
+
+annotated_module_init(i915_init, drvid_i915, dependencies);
module_exit(i915_exit);

MODULE_AUTHOR("Tungsten Graphics, Inc.");
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 5751446..ce21f32 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -680,7 +680,16 @@ static void __exit radeon_exit(void)
radeon_unregister_atpx_handler();
}

-module_init(radeon_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_drm,
+ drvid_pm,
+ drvid_firmware_class,
+ drvid_ttm,
+ drvid_hwmon,
+ 0
+};
+
+annotated_module_init(radeon_init, drvid_radeon, dependencies);
module_exit(radeon_exit);

MODULE_AUTHOR(DRIVER_AUTHOR);
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 0f283a3..c02b793 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -715,7 +715,12 @@ static void __exit tilcdc_drm_fini(void)
tilcdc_tfp410_fini();
}

-module_init(tilcdc_drm_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_drm,
+ 0
+};
+
+annotated_module_init_drv(tilcdc_drm_init, drvid_tilcdc, dependencies, tilcdc_platform_driver.driver);
module_exit(tilcdc_drm_fini);

MODULE_AUTHOR("Rob Clark <robdclark@gmail.com");
diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c
index 66fc639..14ca449 100644
--- a/drivers/gpu/drm/ttm/ttm_module.c
+++ b/drivers/gpu/drm/ttm/ttm_module.c
@@ -94,7 +94,12 @@ static void __exit ttm_exit(void)
wait_event(exit_q, atomic_read(&device_released) == 1);
}

-module_init(ttm_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_drm,
+ 0
+};
+
+annotated_module_init(ttm_init, drvid_ttm, dependencies);
module_exit(ttm_exit);

MODULE_AUTHOR("Thomas Hellstrom, Jerome Glisse");
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index 7bcbf86..8a78f60 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -1354,4 +1354,14 @@ static int __init vga_arb_device_init(void)
}
return rc;
}
-subsys_initcall(vga_arb_device_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_initcall(subsys, vga_arb_device_init, drvid_vga_arb, dependencies);
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
index e094c57..6b64eb5 100644
--- a/drivers/hid/uhid.c
+++ b/drivers/hid/uhid.c
@@ -775,7 +775,12 @@ static void __exit uhid_exit(void)
misc_deregister(&uhid_misc);
}

-module_init(uhid_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};
+
+annotated_module_init(uhid_init, drvid_uhid, dependencies);
module_exit(uhid_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Herrmann <dh.herrmann@gmail.com>");
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index a26c385..f4d14d3 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -278,7 +278,13 @@ static void __exit hwmon_exit(void)
class_unregister(&hwmon_class);
}

-subsys_initcall(hwmon_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_arch, // x86
+ drvid_pci_driver,
+ 0
+};
+
+annotated_initcall(subsys, hwmon_init, drvid_hwmon, dependencies);
module_exit(hwmon_exit);

MODULE_AUTHOR("Mark M. Hoffman <mhoffman@lightlink.com>");
diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c
index ad2f8ca..b91d5ac 100644
--- a/drivers/hwspinlock/omap_hwspinlock.c
+++ b/drivers/hwspinlock/omap_hwspinlock.c
@@ -196,8 +196,14 @@ static int __init omap_hwspinlock_init(void)
{
return platform_driver_register(&omap_hwspinlock_driver);
}
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ 0
+};
+
/* board init code might need to reserve hwspinlocks for predefined purposes */
-postcore_initcall(omap_hwspinlock_init);
+annotated_initcall_drv(postcore, omap_hwspinlock_init, drvid_omap_hwspinlock, dependencies, omap_hwspinlock_driver.driver);

static void __exit omap_hwspinlock_exit(void)
{
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 34cfc0e..aef6448 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -276,7 +276,13 @@ static int __init i2c_gpio_init(void)

return ret;
}
-subsys_initcall(i2c_gpio_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ 0
+};
+
+annotated_initcall_drv(subsys, i2c_gpio_init, drvid_i2c_gpio, dependencies, i2c_gpio_driver.driver);

static void __exit i2c_gpio_exit(void)
{
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 785aa67..7501824 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1110,7 +1110,13 @@ static int __init i2c_adap_imx_init(void)
{
return platform_driver_register(&i2c_imx_driver);
}
-subsys_initcall(i2c_adap_imx_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ 0
+};
+
+annotated_initcall_drv(subsys, i2c_adap_imx_init, drvid_i2c_imx, dependencies, i2c_imx_driver.driver);

static void __exit i2c_adap_imx_exit(void)
{
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 30059c1..fe8ed85 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -996,7 +996,12 @@ static struct platform_driver mv64xxx_i2c_driver = {
},
};

-module_platform_driver(mv64xxx_i2c_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ 0
+};
+
+annotated_module_platform_driver(mv64xxx_i2c_driver, drvid_i2c_mv64xxx, dependencies);

MODULE_AUTHOR("Mark A. Greer <mgreer@mvista.com>");
MODULE_DESCRIPTION("Marvell mv64xxx host bridge i2c ctlr driver");
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index fc9bf7f..a5c548d 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1541,7 +1541,14 @@ omap_i2c_init_driver(void)
{
return platform_driver_register(&omap_i2c_driver);
}
-subsys_initcall(omap_i2c_init_driver);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ drvid_pm,
+ 0
+};
+
+annotated_initcall_drv(subsys, omap_i2c_init_driver, drvid_i2c_omap, dependencies, omap_i2c_driver.driver);

static void __exit omap_i2c_exit_driver(void)
{
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c
index 0ed77ee..74f4cb7 100644
--- a/drivers/i2c/busses/i2c-tiny-usb.c
+++ b/drivers/i2c/busses/i2c-tiny-usb.c
@@ -281,7 +281,13 @@ static struct usb_driver i2c_tiny_usb_driver = {
.id_table = i2c_tiny_usb_table,
};

-module_usb_driver(i2c_tiny_usb_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ drvid_usb,
+ 0
+};
+
+annotated_module_usb_driver(i2c_tiny_usb_driver, drvid_tiny_usb, dependencies);

/* ----- end of usb layer ------------------------------------------------ */

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index c83e4d1..ba34c1e 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1963,7 +1963,7 @@ static void __exit i2c_exit(void)
/* We must initialize early, because some subsystems register i2c drivers
* in subsys_initcall() code, but are linked (and initialized) before i2c.
*/
-postcore_initcall(i2c_init);
+annotated_initcall(postcore, i2c_init, drvid_i2c, NULL);
module_exit(i2c_exit);

/* ----------------------------------------------------
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index 71c7a39..59f9b2f 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -666,5 +666,10 @@ MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and "
MODULE_DESCRIPTION("I2C /dev entries driver");
MODULE_LICENSE("GPL");

-module_init(i2c_dev_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ 0
+};
+
+annotated_module_init(i2c_dev_init, drvid_i2c_dev, dependencies);
module_exit(i2c_dev_exit);
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index 942320e..3ef673e 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -591,7 +591,7 @@ static struct platform_driver tiadc_driver = {
.probe = tiadc_probe,
.remove = tiadc_remove,
};
-module_platform_driver(tiadc_driver);
+annotated_module_platform_driver(tiadc_driver, drvid_tiadc, NULL);

MODULE_DESCRIPTION("TI ADC controller driver");
MODULE_AUTHOR("Rachna Patil <rachna@ti.com>");
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 08d4964..caacbdd 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -1245,7 +1245,12 @@ static void __exit evdev_exit(void)
input_unregister_handler(&evdev_handler);
}

-module_init(evdev_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_input,
+ 0
+};
+
+annotated_module_init(evdev_init, drvid_evdev, dependencies);
module_exit(evdev_exit);

MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 78d2499..6053db9 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -2431,5 +2431,5 @@ static void __exit input_exit(void)
class_unregister(&input_class);
}

-subsys_initcall(input_init);
+annotated_initcall(subsys, input_init, drvid_input, NULL);
module_exit(input_exit);
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 1d247bc..5d6cc5a 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -1013,5 +1013,10 @@ static void __exit joydev_exit(void)
input_unregister_handler(&joydev_handler);
}

-module_init(joydev_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_input,
+ 0
+};
+
+annotated_module_init(joydev_init, drvid_joydev, dependencies);
module_exit(joydev_exit);
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index ec876b5..50d2e33 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -1817,5 +1817,12 @@ static void __exit atkbd_exit(void)
serio_unregister_driver(&atkbd_drv);
}

-module_init(atkbd_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_dmi,
+ drvid_input,
+ drvid_serio,
+ 0
+};
+
+annotated_module_init(atkbd_init, drvid_atkbd, dependencies);
module_exit(atkbd_exit);
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index ddf4045..2b01094 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -855,7 +855,12 @@ static void __exit gpio_keys_exit(void)
platform_driver_unregister(&gpio_keys_device_driver);
}

-late_initcall(gpio_keys_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_input,
+ 0
+};
+
+annotated_initcall_drv(late, gpio_keys_init, drvid_gpio_keys, dependencies, gpio_keys_device_driver.driver);
module_exit(gpio_keys_exit);

MODULE_LICENSE("GPL");
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index 603fc2f..8a0f484 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -106,7 +106,14 @@ static struct platform_driver twl4030_pwrbutton_driver = {
.of_match_table = of_match_ptr(twl4030_pwrbutton_dt_match_table),
},
};
-module_platform_driver(twl4030_pwrbutton_driver);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_twl_core,
+ drvid_input,
+ 0
+};
+
+annotated_module_platform_driver(twl4030_pwrbutton_driver, drvid_twl4030_pwrbutton, dependencies);

MODULE_ALIAS("platform:twl4030_pwrbutton");
MODULE_DESCRIPTION("Triton2 Power Button");
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 421e29e..098332a 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -939,5 +939,11 @@ MODULE_DESCRIPTION("User level driver support for input subsystem");
MODULE_LICENSE("GPL");
MODULE_VERSION("0.3");

-module_init(uinput_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_input,
+ drvid_misc,
+ 0
+};
+
+annotated_module_init(uinput_init, drvid_uinput, dependencies);
module_exit(uinput_exit);
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index b604564..a5d02cb 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -1124,5 +1124,11 @@ static void __exit mousedev_exit(void)
mousedev_destroy(mousedev_mix);
}

-module_init(mousedev_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_input,
+ drvid_misc,
+ 0
+};
+
+annotated_module_init(mousedev_init, drvid_mousedev, dependencies);
module_exit(mousedev_exit);
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index cb5ece7..9c74afb 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1546,5 +1546,13 @@ static void __exit i8042_exit(void)
panic_blink = NULL;
}

-module_init(i8042_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ //drvid_pnp,
+ drvid_pnp_system,
+ drvid_pnpacpi,
+ drvid_serio,
+ 0
+};
+
+annotated_module_init(i8042_init, drvid_i8042, dependencies);
module_exit(i8042_exit);
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index a05a517..92fae98 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -1054,5 +1054,5 @@ static void __exit serio_exit(void)
cancel_work_sync(&serio_event_work);
}

-subsys_initcall(serio_init);
+annotated_initcall(subsys, serio_init, drvid_serio, NULL);
module_exit(serio_exit);
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c
index 71ef5d6..76e5213 100644
--- a/drivers/input/serio/serio_raw.c
+++ b/drivers/input/serio/serio_raw.c
@@ -441,4 +441,10 @@ static struct serio_driver serio_raw_drv = {
.manual_bind = true,
};

-module_serio_driver(serio_raw_drv);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_serio,
+ drvid_misc,
+ 0
+};
+
+annotated_module_serio_driver(serio_raw_drv, drvid_serio_raw, dependencies);
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
index 9c927d3..7b6217e 100644
--- a/drivers/input/serio/serport.c
+++ b/drivers/input/serio/serport.c
@@ -296,5 +296,10 @@ static void __exit serport_exit(void)
tty_unregister_ldisc(N_MOUSE);
}

-module_init(serport_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_serio,
+ 0
+};
+
+annotated_module_init(serport_init, drvid_serport, dependencies);
module_exit(serport_exit);
diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c
index f7b875b..6868cea 100644
--- a/drivers/iommu/amd_iommu_v2.c
+++ b/drivers/iommu/amd_iommu_v2.c
@@ -984,5 +984,10 @@ static void __exit amd_iommu_v2_exit(void)
destroy_workqueue(iommu_wq);
}

-module_init(amd_iommu_v2_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_iommu_dev,
+ 0
+};
+
+annotated_module_init(amd_iommu_v2_init, drvid_amd_iommu_v2, dependencies);
module_exit(amd_iommu_v2_exit);
diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index f15692a..8960235 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -942,7 +942,17 @@ static int __init ir_dev_scope_init(void)

return ret;
}
-rootfs_initcall(ir_dev_scope_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_iommu_dev,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_initcall(rootfs, ir_dev_scope_init, drvid_ir_dev_scope, dependencies);

static void disable_irq_remapping(void)
{
diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c
index 39b2d91..1795473 100644
--- a/drivers/iommu/iommu-sysfs.c
+++ b/drivers/iommu/iommu-sysfs.c
@@ -47,7 +47,13 @@ static int __init iommu_dev_init(void)
{
return class_register(&iommu_class);
}
-postcore_initcall(iommu_dev_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_iommu,
+ 0
+};
+
+annotated_initcall(postcore, iommu_dev_init, drvid_iommu_dev, dependencies);

/*
* Create an IOMMU device and return a pointer to it. IOMMU specific
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index f286090..5c833cb 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -1468,7 +1468,7 @@ static int __init iommu_init(void)

return 0;
}
-core_initcall(iommu_init);
+annotated_initcall(core, iommu_init, drvid_iommu, NULL);

int iommu_domain_get_attr(struct iommu_domain *domain,
enum iommu_attr attr, void *data)
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index a22c33d..cdefba6 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1405,8 +1405,15 @@ static int __init omap_iommu_init(void)

return platform_driver_register(&omap_iommu_driver);
}
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_iommu_dev,
+ drvid_debugfs,
+ 0
+};
+
/* must be ready before omap3isp is probed */
-subsys_initcall(omap_iommu_init);
+annotated_initcall_drv(subsys, omap_iommu_init, drvid_omap_iommu, dependencies, omap_iommu_driver.driver);

static void __exit omap_iommu_exit(void)
{
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index beabfbc..99368a7 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -399,7 +399,7 @@ static void __exit leds_exit(void)
class_destroy(leds_class);
}

-subsys_initcall(leds_init);
+annotated_initcall(subsys, leds_init, drvid_leds, NULL);
module_exit(leds_exit);

MODULE_AUTHOR("John Lenz, Richard Purdie");
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index af1876a..5f4f816 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -300,7 +300,12 @@ static struct platform_driver gpio_led_driver = {
},
};

-module_platform_driver(gpio_led_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_leds,
+ 0
+};
+
+annotated_module_platform_driver(gpio_led_driver, drvid_gpio_led, dependencies);

MODULE_AUTHOR("Raphael Assenat <raph@8d.com>, Trent Piepho <tpiepho@freescale.com>");
MODULE_DESCRIPTION("GPIO LED driver");
diff --git a/drivers/leds/leds-regulator.c b/drivers/leds/leds-regulator.c
index ffc2139..960110a 100644
--- a/drivers/leds/leds-regulator.c
+++ b/drivers/leds/leds-regulator.c
@@ -218,7 +218,12 @@ static struct platform_driver regulator_led_driver = {
.remove = regulator_led_remove,
};

-module_platform_driver(regulator_led_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_leds,
+ 0
+};
+
+annotated_module_platform_driver(regulator_led_driver, drvid_leds_regulator, dependencies);

MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>");
MODULE_DESCRIPTION("Regulator driven LED driver");
diff --git a/drivers/leds/trigger/ledtrig-heartbeat.c b/drivers/leds/trigger/ledtrig-heartbeat.c
index fea6871..81c1076 100644
--- a/drivers/leds/trigger/ledtrig-heartbeat.c
+++ b/drivers/leds/trigger/ledtrig-heartbeat.c
@@ -153,7 +153,12 @@ static void __exit heartbeat_trig_exit(void)
led_trigger_unregister(&heartbeat_led_trigger);
}

-module_init(heartbeat_trig_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_leds,
+ 0
+};
+
+annotated_module_init(heartbeat_trig_init, drvid_ledtrig_heartbeat, dependencies);
module_exit(heartbeat_trig_exit);

MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>");
diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
index a3dbfd9..e3b110a 100644
--- a/drivers/mailbox/omap-mailbox.c
+++ b/drivers/mailbox/omap-mailbox.c
@@ -883,7 +883,7 @@ static int __init omap_mbox_init(void)

return platform_driver_register(&omap_mbox_driver);
}
-subsys_initcall(omap_mbox_init);
+annotated_initcall_drv(subsys, omap_mbox_init, drvid_omap_mbox, NULL, omap_mbox_driver.driver);

static void __exit omap_mbox_exit(void)
{
diff --git a/drivers/md/md.c b/drivers/md/md.c
index e25f00f..f7479bd 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -9037,7 +9037,12 @@ static __exit void md_exit(void)
destroy_workqueue(md_wq);
}

-subsys_initcall(md_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_xor,
+ 0
+};
+
+annotated_initcall(subsys, md_init, drvid_md, dependencies);
module_exit(md_exit)

static int get_ro(char *buffer, struct kernel_param *kp)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index f757023..6fbdbd0 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -7851,6 +7851,11 @@ static void raid5_exit(void)
destroy_workqueue(raid5_wq);
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_wq_sysfs,
+ 0
+};
+
module_init(raid5_init);
module_exit(raid5_exit);
MODULE_LICENSE("GPL");
diff --git a/drivers/media/i2c/ir-kbd-i2c.c b/drivers/media/i2c/ir-kbd-i2c.c
index 175a761..3f27442 100644
--- a/drivers/media/i2c/ir-kbd-i2c.c
+++ b/drivers/media/i2c/ir-kbd-i2c.c
@@ -488,7 +488,12 @@ static struct i2c_driver ir_kbd_driver = {
.id_table = ir_kbd_id,
};

-module_i2c_driver(ir_kbd_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ 0
+};
+
+annotated_module_i2c_driver(ir_kbd_driver, drvid_ir_kbd_i2c, dependencies);

/* ----------------------------------------------------------------------- */

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 9426276..9b32f93 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2217,7 +2217,7 @@ static __exit void gpmc_exit(void)

}

-postcore_initcall(gpmc_init);
+annotated_initcall_drv(postcore, gpmc_init, drvid_omap_gpmc, NULL, gpmc_driver.driver);
module_exit(gpmc_exit);

static irqreturn_t gpmc_handle_irq(int irq, void *dev)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 1d924d1..0ee78b8 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -896,7 +896,7 @@ static int __init omap_usbhs_drvinit(void)
* This usbhs core driver should be initialized after
* usb tll driver
*/
-fs_initcall_sync(omap_usbhs_drvinit);
+annotated_initcall_drv_sync(fs, omap_usbhs_drvinit, drvid_usbhs_omap, NULL, usbhs_omap_driver.driver);

static void __exit omap_usbhs_drvexit(void)
{
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index b7b3e8e..5221a90 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -475,7 +475,7 @@ static int __init omap_usbtll_drvinit(void)
* The usbtll driver should be initialized before
* the usbhs core driver probe function is called.
*/
-fs_initcall(omap_usbtll_drvinit);
+annotated_initcall_drv(fs, omap_usbtll_drvinit, drvid_omap_usbtll, NULL, usbtll_omap_driver.driver);

static void __exit omap_usbtll_drvexit(void)
{
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index e4e4b22..f8857b0 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -373,7 +373,7 @@ static struct platform_driver ti_tscadc_driver = {

};

-module_platform_driver(ti_tscadc_driver);
+annotated_module_platform_driver(ti_tscadc_driver, drvid_ti_tscadc, NULL);

MODULE_DESCRIPTION("TI touchscreen / ADC MFD controller driver");
MODULE_AUTHOR("Rachna Patil <rachna@ti.com>");
diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 7d1cfc1..d1665ee 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -260,7 +260,15 @@ static int __init tps65217_init(void)
{
return i2c_add_driver(&tps65217_driver);
}
-subsys_initcall(tps65217_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ drvid_input,
+ drvid_regulator,
+ 0
+};
+
+annotated_initcall_drv(subsys, tps65217_init, drvid_tps65217, dependencies, tps65217_driver.driver);

static void __exit tps65217_exit(void)
{
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index 7612d89..36f2723 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -557,7 +557,14 @@ static int __init tps65910_i2c_init(void)
return i2c_add_driver(&tps65910_i2c_driver);
}
/* init early so consumer devices can complete system boot */
-subsys_initcall(tps65910_i2c_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ drvid_tps65910,
+ 0
+};
+
+annotated_initcall_drv(subsys, tps65910_i2c_init, drvid_tps65910_i2c, dependencies, tps65910_i2c_driver.driver);

static void __exit tps65910_i2c_exit(void)
{
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 489674a..17228dd 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1271,7 +1271,13 @@ static struct i2c_driver twl_driver = {
.remove = twl_remove,
};

-module_i2c_driver(twl_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ drvid_gpio_twl4030,
+ 0
+};
+
+annotated_module_i2c_driver(twl_driver, drvid_twl_core, dependencies);

MODULE_AUTHOR("Texas Instruments, Inc.");
MODULE_DESCRIPTION("I2C Core interface for TWL");
diff --git a/drivers/mfd/twl4030-audio.c b/drivers/mfd/twl4030-audio.c
index 0a16064..882c2ef 100644
--- a/drivers/mfd/twl4030-audio.c
+++ b/drivers/mfd/twl4030-audio.c
@@ -290,7 +290,12 @@ static struct platform_driver twl4030_audio_driver = {
.remove = twl4030_audio_remove,
};

-module_platform_driver(twl4030_audio_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_twl_core,
+ 0
+};
+
+annotated_module_platform_driver(twl4030_audio_driver, drvid_twl4030_audio, dependencies);

MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>");
MODULE_DESCRIPTION("TWL4030 audio block MFD driver");
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 04b5398..97d9592 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -970,7 +970,12 @@ static struct platform_driver twl4030_power_driver = {
.remove = twl4030_power_remove,
};

-module_platform_driver(twl4030_power_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_twl_core,
+ 0
+};
+
+annotated_module_platform_driver(twl4030_power_driver, drvid_twl4030_power, dependencies);

MODULE_AUTHOR("Nokia Corporation");
MODULE_AUTHOR("Texas Instruments, Inc.");
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 6ded3dc..367abcd 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -703,7 +703,13 @@ static int __init at24_init(void)
io_limit = rounddown_pow_of_two(io_limit);
return i2c_add_driver(&at24_driver);
}
-module_init(at24_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_i2c,
+ 0
+};
+
+annotated_module_init_drv(at24_init, drvid_at24, dependencies, at24_driver.driver);

static void __exit at24_exit(void)
{
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index 15c33cc..26c6ffe 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -243,4 +243,6 @@ static int __init sram_init(void)
return platform_driver_register(&sram_driver);
}

+//annotated_initcall_drv(postcore, sram_init, drvid_sram, NULL, sram_driver.driver);
+// Needed by the initcall customize_machine
postcore_initcall(sram_init);
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index a1b820f..f4beb2c 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -2608,7 +2608,12 @@ static void __exit mmc_blk_exit(void)
unregister_blkdev(MMC_BLOCK_MAJOR, "mmc");
}

-module_init(mmc_blk_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_mmc,
+ 0
+};
+
+annotated_module_init(mmc_blk_init, drvid_mmcblk, dependencies);
module_exit(mmc_blk_exit);

MODULE_LICENSE("GPL");
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 9e3fdbd..f6472b6 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2829,7 +2829,12 @@ static void __exit mmc_exit(void)
destroy_workqueue(workqueue);
}

-subsys_initcall(mmc_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_initcall(subsys, mmc_init, drvid_mmc, dependencies);
module_exit(mmc_exit);

MODULE_LICENSE("GPL");
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index d839147..2449792 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -737,7 +737,12 @@ static struct platform_driver mxs_mmc_driver = {
},
};

-module_platform_driver(mxs_mmc_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_mmc,
+ 0
+};
+
+annotated_module_platform_driver(mxs_mmc_driver, drvid_mxs_mmc, dependencies);

MODULE_DESCRIPTION("FREESCALE MXS MMC peripheral");
MODULE_AUTHOR("Freescale Semiconductor");
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 68dd6c7..70c364c 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1498,7 +1498,12 @@ static struct platform_driver mmc_omap_driver = {
},
};

-module_platform_driver(mmc_omap_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_mmc,
+ 0
+};
+
+annotated_module_platform_driver(mmc_omap_driver, drvid_mmc_omap, dependencies);
MODULE_DESCRIPTION("OMAP Multimedia Card driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" DRIVER_NAME);
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 4d12032..759a642 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2301,7 +2301,12 @@ static struct platform_driver omap_hsmmc_driver = {
},
};

-module_platform_driver(omap_hsmmc_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_mmc,
+ 0
+};
+
+annotated_module_platform_driver(omap_hsmmc_driver, drvid_omap_hsmmc, dependencies);
MODULE_DESCRIPTION("OMAP High Speed Multimedia Card driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" DRIVER_NAME);
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index c6b9f64..0131369 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1202,7 +1202,12 @@ static struct platform_driver sdhci_esdhc_imx_driver = {
.remove = sdhci_esdhc_imx_remove,
};

-module_platform_driver(sdhci_esdhc_imx_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sdhci,
+ 0
+};
+
+annotated_module_platform_driver(sdhci_esdhc_imx_driver, drvid_sdhci_esdhc_imx, dependencies);

MODULE_DESCRIPTION("SDHCI driver for Freescale i.MX eSDHC");
MODULE_AUTHOR("Wolfram Sang <kernel@pengutronix.de>");
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index b0c915a..4693783 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3482,7 +3482,12 @@ static void __exit sdhci_drv_exit(void)
{
}

-module_init(sdhci_drv_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_mmc,
+ 0
+};
+
+annotated_module_init(sdhci_drv_init, drvid_sdhci, dependencies);
module_exit(sdhci_drv_exit);

module_param(debug_quirks, uint, 0444);
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 8bbbb75..b30a47d 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -1303,7 +1303,12 @@ static void __exit cleanup_mtd(void)
bdi_destroy(&mtd_bdi);
}

-module_init(init_mtd);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_bdi,
+ 0
+};
+
+annotated_initcall_sync(fs, init_mtd, drvid_mtd, dependencies);
module_exit(cleanup_mtd);

MODULE_LICENSE("GPL");
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 60fa899..9a7e62f 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -2079,7 +2079,13 @@ static struct platform_driver omap_nand_driver = {
},
};

-module_platform_driver(omap_nand_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_mtd,
+ drvid_ofpart,
+ 0
+};
+
+annotated_module_platform_driver(omap_nand_driver, drvid_omap2_nand, dependencies);

MODULE_ALIAS("platform:" DRIVER_NAME);
MODULE_LICENSE("GPL");
diff --git a/drivers/mtd/nand/omap_elm.c b/drivers/mtd/nand/omap_elm.c
index 376bfe1..0311687 100644
--- a/drivers/mtd/nand/omap_elm.c
+++ b/drivers/mtd/nand/omap_elm.c
@@ -570,7 +570,7 @@ static struct platform_driver elm_driver = {
.remove = elm_remove,
};

-module_platform_driver(elm_driver);
+annotated_module_platform_driver(elm_driver, drvid_omap_elm, NULL);

MODULE_DESCRIPTION("ELM driver for BCH error correction");
MODULE_AUTHOR("Texas Instruments");
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index c3c6d30..754c1d4 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -211,7 +211,13 @@ static struct platform_driver orion_nand_driver = {
},
};

-module_platform_driver_probe(orion_nand_driver, orion_nand_probe);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_mtd,
+ drvid_ofpart,
+ 0
+};
+
+annotated_module_platform_driver_probe(orion_nand_driver, orion_nand_probe, drvid_orion_nand, dependencies);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Tzachi Perelstein");
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index aa26c32..334ddb5 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -184,7 +184,7 @@ static void __exit ofpart_parser_exit(void)
deregister_mtd_parser(&ofoldpart_parser);
}

-module_init(ofpart_parser_init);
+annotated_initcall_sync(fs, ofpart_parser_init, drvid_ofpart, NULL);
module_exit(ofpart_parser_exit);

MODULE_LICENSE("GPL");
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index de63266d..a020c39 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3645,7 +3645,14 @@ static struct platform_driver fec_driver = {
.remove = fec_drv_remove,
};

-module_platform_driver(fec_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ drvid_phy_net,
+ drvid_net_dev,
+ 0
+};
+
+annotated_module_platform_driver(fec_driver, drvid_fec, dependencies);

MODULE_ALIAS("platform:"DRIVER_NAME);
MODULE_LICENSE("GPL");
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 74dc150..a39b125 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -264,7 +264,15 @@ static int __init e1000_init_module(void)
return ret;
}

-module_init(e1000_init_module);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ drvid_phy_net,
+ drvid_net_dev,
+ drvid_pci_driver,
+ 0
+};
+
+annotated_module_init(e1000_init_module, drvid_e1000, dependencies);

/**
* e1000_exit_module - Driver Exit Cleanup Routine
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index d52639b..0da9130 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -3239,7 +3239,16 @@ static int __init mv643xx_eth_init_module(void)

return rc;
}
-module_init(mv643xx_eth_init_module);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_phy_net,
+ drvid_net_dev,
+ 0
+};
+
+annotated_module_init_drv(mv643xx_eth_init_module,
+ drvid_mv643xx_eth, dependencies,
+ mv643xx_eth_shared_driver.driver);

static void __exit mv643xx_eth_cleanup_module(void)
{
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index fc2fb25..66ec955 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -293,7 +293,12 @@ static struct platform_driver orion_mdio_driver = {
},
};

-module_platform_driver(orion_mdio_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_phy_net,
+ 0
+};
+
+annotated_module_platform_driver(orion_mdio_driver, drvid_orion_mdio, dependencies);

MODULE_DESCRIPTION("Marvell MDIO interface driver");
MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index f790f61..aa23a03 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -8372,4 +8372,12 @@ static struct pci_driver rtl8169_pci_driver = {
.driver.pm = RTL8169_PM_OPS,
};

-module_pci_driver(rtl8169_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ drvid_phy_net,
+ drvid_net_dev,
+ drvid_pci_driver,
+ 0
+};
+
+annotated_module_pci_driver(rtl8169_pci_driver, drvid_r8169, dependencies);
diff --git a/drivers/net/ethernet/ti/cpsw-phy-sel.c b/drivers/net/ethernet/ti/cpsw-phy-sel.c
index 0ea78326..a6c44fe 100644
--- a/drivers/net/ethernet/ti/cpsw-phy-sel.c
+++ b/drivers/net/ethernet/ti/cpsw-phy-sel.c
@@ -215,6 +215,11 @@ static struct platform_driver cpsw_phy_sel_driver = {
},
};

-module_platform_driver(cpsw_phy_sel_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_phy_net,
+ 0
+};
+
+annotated_module_platform_driver(cpsw_phy_sel_driver, drvid_cpsw_phy_sel, dependencies);
MODULE_AUTHOR("Mugunthan V N <mugunthanvnm@ti.com>");
MODULE_LICENSE("GPL v2");
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index d155bf2..c393b90 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2524,7 +2524,15 @@ static int __init cpsw_init(void)
{
return platform_driver_register(&cpsw_driver);
}
-late_initcall(cpsw_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ drvid_cpsw_phy_sel,
+ drvid_net_dev,
+ 0
+};
+
+annotated_initcall_drv(late, cpsw_init, drvid_cpsw, dependencies, cpsw_driver.driver);

static void __exit cpsw_exit(void)
{
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index c00084d..f02215b 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -493,7 +493,14 @@ static int __init davinci_mdio_init(void)
{
return platform_driver_register(&davinci_mdio_driver);
}
-device_initcall(davinci_mdio_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ drvid_phy_net,
+ 0
+};
+
+annotated_initcall_drv(device, davinci_mdio_init, drvid_davinci_mdio, NULL, davinci_mdio_driver.driver);

static void __exit davinci_mdio_exit(void)
{
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index dc0dbd8..f6bb325 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -2404,6 +2404,11 @@ MODULE_PARM_DESC(dma, "DMA channels");
module_param(dongle_id, int, 0);
MODULE_PARM_DESC(dongle_id, "Type-id of used dongle");

-module_init(nsc_ircc_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pnp,
+ 0
+};
+
+annotated_module_init(nsc_ircc_init, drvid_nsc_ircc, dependencies);
module_exit(nsc_ircc_cleanup);

diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index b455ffe..6b07303 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -3021,6 +3021,10 @@ static int smsc_ircc_probe_transceiver_toshiba_sat1800(int fir_base)
return 0;
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pnp,
+ 0
+};

-module_init(smsc_ircc_init);
+annotated_module_init(smsc_ircc_init, drvid_smsc_ircc, dependencies);
module_exit(smsc_ircc_cleanup);
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
index a3a5a70..707a495 100644
--- a/drivers/net/phy/lxt.c
+++ b/drivers/net/phy/lxt.c
@@ -312,7 +312,12 @@ static struct phy_driver lxt97x_driver[] = {
.driver = { .owner = THIS_MODULE,},
} };

-module_phy_driver(lxt97x_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_phy_net,
+ 0
+};
+
+annotated_module_phy_driver(lxt97x_driver, drvid_phy_lxt, dependencies);

static struct mdio_device_id __maybe_unused lxt_tbl[] = {
{ 0x78100000, 0xfffffff0 },
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 55f0178..882df3c 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1411,5 +1411,5 @@ static void __exit phy_exit(void)
mdio_bus_exit();
}

-subsys_initcall(phy_init);
+annotated_initcall(subsys, phy_init, drvid_phy_net, NULL);
module_exit(phy_exit);
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 4535361..2444524 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -166,7 +166,12 @@ static struct phy_driver realtek_drvs[] = {
},
};

-module_phy_driver(realtek_drvs);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_phy_net,
+ 0
+};
+
+annotated_module_phy_driver(realtek_drvs, drvid_phy_realtek, dependencies);

static struct mdio_device_id __maybe_unused realtek_tbl[] = {
{ 0x001cc912, 0x001fffff },
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 70b0895..04735b2 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -257,7 +257,12 @@ static struct phy_driver smsc_phy_driver[] = {
.driver = { .owner = THIS_MODULE, }
} };

-module_phy_driver(smsc_phy_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_phy_net,
+ 0
+};
+
+annotated_module_phy_driver(smsc_phy_driver, drvid_phy_smsc, dependencies);

MODULE_DESCRIPTION("SMSC PHY driver");
MODULE_AUTHOR("Herbert Valerio Riedel");
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
index 56d8486..7609d79 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -545,7 +545,16 @@ static void __exit pci_hotplug_exit(void)
cpci_hotplug_exit();
}

-module_init(pci_hotplug_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ drvid_pci_slot,
+ 0
+};
+
+annotated_module_init(pci_hotplug_init, drvid_pci_hotplug, dependencies);
module_exit(pci_hotplug_exit);

MODULE_AUTHOR(DRIVER_AUTHOR);
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 314a625..d1aadca 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -713,4 +713,10 @@ static int __init acpi_pci_init(void)

return 0;
}
-arch_initcall(acpi_pci_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_driver,
+ 0
+};
+
+annotated_initcall(arch, acpi_pci_init, drvid_pci_acpi, dependencies);
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 3cb2210..a1c1f7a 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -1412,4 +1412,10 @@ static int __init pci_driver_init(void)
{
return bus_register(&pci_bus_type);
}
-postcore_initcall(pci_driver_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pcibus_class,
+ 0
+};
+
+annotated_initcall(postcore, pci_driver_init, drvid_pci_driver, dependencies);
diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c
index 886fb35..e90584e 100644
--- a/drivers/pci/pci-stub.c
+++ b/drivers/pci/pci-stub.c
@@ -90,7 +90,15 @@ static void __exit pci_stub_exit(void)
pci_unregister_driver(&stub_driver);
}

-module_init(pci_stub_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_init(pci_stub_init, drvid_pci_stub, dependencies);
module_exit(pci_stub_exit);

MODULE_LICENSE("GPL");
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index f6ae0d0..1400762 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -104,7 +104,7 @@ static int __init pcibus_class_init(void)
{
return class_register(&pcibus_class);
}
-postcore_initcall(pcibus_class_init);
+annotated_initcall(postcore, pcibus_class_init, drvid_pcibus_class, NULL);

static u64 pci_size(u64 base, u64 maxbase, u64 mask)
{
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 3f155e7..53140ef 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -443,4 +443,13 @@ static int __init pci_proc_init(void)

return 0;
}
-device_initcall(pci_proc_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_initcall(device, pci_proc_init, drvid_pci_proc, dependencies);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index dbd1385..c1a4325 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3343,7 +3343,14 @@ static int __init pci_apply_final_quirks(void)
return 0;
}

-fs_initcall_sync(pci_apply_final_quirks);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi,
+ 0
+};
+
+annotated_initcall_sync(fs, pci_apply_final_quirks, drvid_pci_quirks, dependencies);

/*
* Followings are device-specific reset methods which can be used to
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index 396c200..0bca701 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -394,4 +394,10 @@ static int pci_slot_init(void)
return 0;
}

-subsys_initcall(pci_slot_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pci_arch, // x86
+ drvid_pci_driver,
+ 0
+};
+
+annotated_initcall(subsys, pci_slot_init, drvid_pci_slot, dependencies);
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index fc48fac..d482079 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -930,7 +930,7 @@ static int __init phy_core_init(void)

return 0;
}
-module_init(phy_core_init);
+annotated_module_init(phy_core_init, drvid_phy, NULL);

static void __exit phy_core_exit(void)
{
diff --git a/drivers/phy/phy-mvebu-sata.c b/drivers/phy/phy-mvebu-sata.c
index 03b94f9..4a79693 100644
--- a/drivers/phy/phy-mvebu-sata.c
+++ b/drivers/phy/phy-mvebu-sata.c
@@ -131,7 +131,13 @@ static struct platform_driver phy_mvebu_sata_driver = {
.of_match_table = phy_mvebu_sata_of_match,
}
};
-module_platform_driver(phy_mvebu_sata_driver);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_phy,
+ 0
+};
+
+annotated_module_platform_driver(phy_mvebu_sata_driver, drvid_phy_mvebu_sata, dependencies);

MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");
MODULE_DESCRIPTION("Marvell MVEBU SATA PHY driver");
diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 3a707dd..18c44e7 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -801,7 +801,13 @@ static int __init twl4030_usb_init(void)
{
return platform_driver_register(&twl4030_usb_driver);
}
-subsys_initcall(twl4030_usb_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_phy,
+ 0
+};
+
+annotated_initcall_drv(subsys, twl4030_usb_init, drvid_twl4030_usb, NULL, twl4030_usb_driver.driver);

static void __exit twl4030_usb_exit(void)
{
diff --git a/drivers/pinctrl/freescale/pinctrl-imx6q.c b/drivers/pinctrl/freescale/pinctrl-imx6q.c
index 4d1fcb8..b93996b 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx6q.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx6q.c
@@ -489,7 +489,7 @@ static int __init imx6q_pinctrl_init(void)
{
return platform_driver_register(&imx6q_pinctrl_driver);
}
-arch_initcall(imx6q_pinctrl_init);
+annotated_initcall_drv(arch, imx6q_pinctrl_init, drvid_imx6q_pinctrl, NULL, imx6q_pinctrl_driver.driver);

static void __exit imx6q_pinctrl_exit(void)
{
diff --git a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
index 0f07dc5..72da5f5 100644
--- a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
+++ b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
@@ -495,7 +495,7 @@ static struct platform_driver kirkwood_pinctrl_driver = {
.remove = kirkwood_pinctrl_remove,
};

-module_platform_driver(kirkwood_pinctrl_driver);
+annotated_module_platform_driver(kirkwood_pinctrl_driver, drvid_kirkwood_pinctrl, NULL);

MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>");
MODULE_DESCRIPTION("Marvell Kirkwood pinctrl driver");
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 0b8d480..f450e29 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -2026,7 +2026,7 @@ static struct platform_driver pcs_driver = {
#endif
};

-module_platform_driver(pcs_driver);
+annotated_module_platform_driver(pcs_driver, drvid_pcs, NULL);

MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver");
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index efbc3f0..9f99208 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2275,5 +2275,16 @@ static void __exit asus_wmi_exit(void)
pr_info("ASUS WMI generic driver unloaded\n");
}

-module_init(asus_wmi_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi_wmi,
+ drvid_debugfs,
+ drvid_input,
+ drvid_leds,
+ drvid_rfkill,
+ drvid_backlight_class,
+ drvid_hwmon,
+ 0
+};
+
+annotated_module_init(asus_wmi_init, drvid_asus_wmi, dependencies);
module_exit(asus_wmi_exit);
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index 14fd2ec..0fb1baa 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -274,5 +274,11 @@ static void __exit eeepc_wmi_exit(void)
asus_wmi_unregister_driver(&asus_wmi_driver);
}

-module_init(eeepc_wmi_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_asus_wmi,
+ drvid_dmi,
+ 0
+};
+
+annotated_module_init(eeepc_wmi_init, drvid_eeepc_wmi, dependencies);
module_exit(eeepc_wmi_exit);
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index aac4757..fb6550d 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -965,5 +965,10 @@ static void __exit acpi_wmi_exit(void)
pr_info("Mapper unloaded\n");
}

-subsys_initcall(acpi_wmi_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_acpi,
+ 0
+};
+
+annotated_initcall(subsys, acpi_wmi_init, drvid_acpi_wmi, dependencies);
module_exit(acpi_wmi_exit);
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index b54620e..aa3b972 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -243,7 +243,7 @@ static int __init pnp_init(void)
return bus_register(&pnp_bus_type);
}

-subsys_initcall(pnp_init);
+annotated_initcall(subsys, pnp_init, drvid_pnp, NULL);

int pnp_debug;

diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 5153d1d..0bb6709e 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -324,7 +324,13 @@ static int __init pnpacpi_init(void)
return 0;
}

-fs_initcall(pnpacpi_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pnp,
+ drvid_acpi,
+ 0
+};
+
+annotated_initcall(fs, pnpacpi_init, drvid_pnpacpi, dependencies);

static int __init pnpacpi_setup(char *str)
{
diff --git a/drivers/pnp/system.c b/drivers/pnp/system.c
index 49c1720..6f7100d 100644
--- a/drivers/pnp/system.c
+++ b/drivers/pnp/system.c
@@ -109,4 +109,9 @@ static int __init pnp_system_init(void)
* Reserve motherboard resources after PCI claim BARs,
* but before PCI assign resources for uninitialized PCI devices
*/
-fs_initcall(pnp_system_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pnp,
+ 0
+};
+
+annotated_initcall(fs, pnp_system_init, drvid_pnp_system, dependencies);
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index 869284c..58891cc 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -970,7 +970,7 @@ static void __exit power_supply_class_exit(void)
class_destroy(power_supply_class);
}

-subsys_initcall(power_supply_class_init);
+annotated_initcall(subsys, power_supply_class_init, drvid_power_supply_class, NULL);
module_exit(power_supply_class_exit);

MODULE_DESCRIPTION("Universal power supply monitor class");
diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c
index be3d81f..e8419c3 100644
--- a/drivers/power/reset/gpio-poweroff.c
+++ b/drivers/power/reset/gpio-poweroff.c
@@ -94,7 +94,7 @@ static struct platform_driver gpio_poweroff_driver = {
},
};

-module_platform_driver(gpio_poweroff_driver);
+annotated_module_platform_driver(gpio_poweroff_driver, drvid_poweroff_gpio, NULL);

MODULE_AUTHOR("Jamie Lentin <jm@lentin.co.uk>");
MODULE_DESCRIPTION("GPIO poweroff driver");
diff --git a/drivers/power/reset/imx-snvs-poweroff.c b/drivers/power/reset/imx-snvs-poweroff.c
index ad6ce50..a5b908c 100644
--- a/drivers/power/reset/imx-snvs-poweroff.c
+++ b/drivers/power/reset/imx-snvs-poweroff.c
@@ -63,4 +63,4 @@ static int __init imx_poweroff_init(void)
{
return platform_driver_register(&imx_poweroff_driver);
}
-device_initcall(imx_poweroff_init);
+annotated_initcall_drv(device, imx_poweroff_init, drvid_imx_poweroff, NULL, imx_poweroff_driver.driver);
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index 022b891..6e837dd 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -727,7 +727,7 @@ static struct platform_driver twl4030_bci_driver = {
.remove = __exit_p(twl4030_bci_remove),
};

-module_platform_driver_probe(twl4030_bci_driver, twl4030_bci_probe);
+annotated_module_platform_driver_probe(twl4030_bci_driver, twl4030_bci_probe, drvid_twl4030_bci, NULL);

MODULE_AUTHOR("Gražvydas Ignotas");
MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver");
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 3a7769f..4d1a57a 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -925,5 +925,10 @@ static int __init pwm_debugfs_init(void)
return 0;
}

-subsys_initcall(pwm_debugfs_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_initcall(subsys, pwm_debugfs_init, drvid_pwm_debugfs, dependencies);
#endif /* CONFIG_DEBUG_FS */
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 66d6f0c..a45833d 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -342,7 +342,7 @@ static struct platform_driver imx_pwm_driver = {
.remove = imx_pwm_remove,
};

-module_platform_driver(imx_pwm_driver);
+annotated_module_platform_driver(imx_pwm_driver, drvid_imx_pwm, NULL);

MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
index e557bef..d10f652 100644
--- a/drivers/pwm/pwm-tiecap.c
+++ b/drivers/pwm/pwm-tiecap.c
@@ -338,7 +338,7 @@ static struct platform_driver ecap_pwm_driver = {
.remove = ecap_pwm_remove,
};

-module_platform_driver(ecap_pwm_driver);
+annotated_module_platform_driver(ecap_pwm_driver, drvid_ecap_pwm, NULL);

MODULE_DESCRIPTION("ECAP PWM driver");
MODULE_AUTHOR("Texas Instruments");
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 694b3cf..86c5614 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -606,7 +606,7 @@ static struct platform_driver ehrpwm_pwm_driver = {
.remove = ehrpwm_pwm_remove,
};

-module_platform_driver(ehrpwm_pwm_driver);
+annotated_module_platform_driver(ehrpwm_pwm_driver, drvid_ehrpwm_pwm, NULL);

MODULE_DESCRIPTION("EHRPWM PWM driver");
MODULE_AUTHOR("Texas Instruments");
diff --git a/drivers/pwm/pwm-tipwmss.c b/drivers/pwm/pwm-tipwmss.c
index 5cf65a1..8f7c8e4 100644
--- a/drivers/pwm/pwm-tipwmss.c
+++ b/drivers/pwm/pwm-tipwmss.c
@@ -126,7 +126,7 @@ static struct platform_driver pwmss_driver = {
.remove = pwmss_remove,
};

-module_platform_driver(pwmss_driver);
+annotated_module_platform_driver(pwmss_driver, drvid_pwmss, NULL);

MODULE_DESCRIPTION("PWM Subsystem driver");
MODULE_AUTHOR("Texas Instruments");
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 738adfa..53fbdc7 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -331,7 +331,14 @@ static int __init anatop_regulator_init(void)
{
return platform_driver_register(&anatop_regulator_driver);
}
-postcore_initcall(anatop_regulator_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_regulator,
+ 0
+};
+
+annotated_initcall_drv(postcore, anatop_regulator_init,
+ drvid_anatop_regulator, dependencies, anatop_regulator_driver.driver);

static void __exit anatop_regulator_exit(void)
{
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 78387a6..f87acb7 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -4144,8 +4144,13 @@ static int __init regulator_init(void)
return ret;
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
/* init early to allow our consumers to complete system booting */
-core_initcall(regulator_init);
+annotated_initcall(core, regulator_init, drvid_regulator, dependencies);

static int __init regulator_init_complete(void)
{
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index ff62d69..a47bb3b 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -221,7 +221,14 @@ static int __init regulator_fixed_voltage_init(void)
{
return platform_driver_register(&regulator_fixed_voltage_driver);
}
-subsys_initcall(regulator_fixed_voltage_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_regulator,
+ 0
+};
+
+annotated_initcall_drv(subsys, regulator_fixed_voltage_init,
+ drvid_regulator_fixed_voltage, dependencies, regulator_fixed_voltage_driver.driver);

static void __exit regulator_fixed_voltage_exit(void)
{
diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index b941e56..4050d3b 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -420,7 +420,14 @@ static int __init tps_65023_init(void)
{
return i2c_add_driver(&tps_65023_i2c_driver);
}
-subsys_initcall(tps_65023_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_regulator,
+ drvid_i2c,
+ 0
+};
+
+annotated_initcall_drv(subsys, tps_65023_init, drvid_tps_65023, dependencies, tps_65023_i2c_driver.driver);

static void __exit tps_65023_cleanup(void)
{
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index fb991ec..704d7ad 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -1255,7 +1255,13 @@ static int __init tps65910_init(void)
{
return platform_driver_register(&tps65910_driver);
}
-subsys_initcall(tps65910_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_regulator,
+ 0
+};
+
+annotated_initcall_drv(subsys, tps65910_init, drvid_tps65910, dependencies, tps65910_driver.driver);

static void __exit tps65910_cleanup(void)
{
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 955a6fb..a1e29dc 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -22,7 +22,6 @@
#include <linux/regulator/of_regulator.h>
#include <linux/i2c/twl.h>

-
/*
* The TWL4030/TW5030/TPS659x0/TWL6030 family chips include power management, a
* USB OTG transceiver, an RTC, ADC, PWM, and lots more. Some versions
@@ -1229,7 +1228,14 @@ static int __init twlreg_init(void)
{
return platform_driver_register(&twlreg_driver);
}
-subsys_initcall(twlreg_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_regulator,
+ drvid_twl_core,
+ 0
+};
+
+annotated_initcall_drv(subsys, twlreg_init, drvid_twlreg, dependencies, twlreg_driver.driver);

static void __exit twlreg_exit(void)
{
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 8b3130f..d39d985 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1474,7 +1474,13 @@ static int __init remoteproc_init(void)

return 0;
}
-module_init(remoteproc_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_module_init(remoteproc_init, drvid_remoteproc, dependencies);

static void __exit remoteproc_exit(void)
{
diff --git a/drivers/remoteproc/wkup_m3_rproc.c b/drivers/remoteproc/wkup_m3_rproc.c
index edf8181..d79a627 100644
--- a/drivers/remoteproc/wkup_m3_rproc.c
+++ b/drivers/remoteproc/wkup_m3_rproc.c
@@ -250,7 +250,12 @@ static struct platform_driver wkup_m3_rproc_driver = {
},
};

-module_platform_driver(wkup_m3_rproc_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_module_platform_driver(wkup_m3_rproc_driver, drvid_wkup_m3_rproc, dependencies);

MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("TI Wakeup M3 remote processor control driver");
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index ea2a315..a440043 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -374,7 +374,7 @@ static void __exit rtc_exit(void)
ida_destroy(&rtc_ida);
}

-subsys_initcall(rtc_init);
+annotated_initcall(subsys, rtc_init, drvid_rtc, NULL);
module_exit(rtc_exit);

MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index a82556a..2ea84bc 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -1254,7 +1254,14 @@ static int __init cmos_init(void)
#endif
return retval;
}
-module_init(cmos_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rtc,
+ drvid_pnp,
+ 0
+};
+
+annotated_module_init(cmos_init, drvid_rtc_cmos, dependencies);

static void __exit cmos_exit(void)
{
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 6e76de1..71b3866 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1252,7 +1252,12 @@ static struct i2c_driver ds1307_driver = {
.id_table = ds1307_id,
};

-module_i2c_driver(ds1307_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rtc,
+ 0
+};
+
+annotated_module_i2c_driver(ds1307_driver, drvid_rtc_ds1307, dependencies);

MODULE_DESCRIPTION("RTC driver for DS1307 and similar chips");
MODULE_LICENSE("GPL");
diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c
index c398f74..c5d3279 100644
--- a/drivers/rtc/rtc-hid-sensor-time.c
+++ b/drivers/rtc/rtc-hid-sensor-time.c
@@ -335,7 +335,13 @@ static struct platform_driver hid_time_platform_driver = {
.probe = hid_time_probe,
.remove = hid_time_remove,
};
-module_platform_driver(hid_time_platform_driver);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rtc,
+ 0
+};
+
+annotated_module_platform_driver(hid_time_platform_driver, drvid_rtc_hid_sensor_time, dependencies);

MODULE_DESCRIPTION("HID Sensor Time");
MODULE_AUTHOR("Alexander Holler <holler@ahsoftware.de>");
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index 5fc292c..dab9556 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -480,7 +480,12 @@ static struct platform_driver mxc_rtc_driver = {
.remove = mxc_rtc_remove,
};

-module_platform_driver(mxc_rtc_driver)
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rtc,
+ 0
+};
+
+annotated_module_platform_driver(mxc_rtc_driver, drvid_rtc_mxc, dependencies)

MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
MODULE_DESCRIPTION("RTC driver for Freescale MXC");
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 8b6355f..a325588 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -767,7 +767,12 @@ static struct platform_driver omap_rtc_driver = {
.id_table = omap_rtc_id_table,
};

-module_platform_driver(omap_rtc_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rtc,
+ 0
+};
+
+annotated_module_platform_driver(omap_rtc_driver, drvid_rtc_omap, dependencies);

MODULE_ALIAS("platform:omap_rtc");
MODULE_AUTHOR("George G. Davis (and others)");
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index d87a85c..be6183c 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -384,7 +384,13 @@ static struct platform_driver snvs_rtc_driver = {
},
.probe = snvs_rtc_probe,
};
-module_platform_driver(snvs_rtc_driver);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rtc,
+ 0
+};
+
+annotated_module_platform_driver(snvs_rtc_driver, drvid_rtc_snvs, dependencies);

MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_DESCRIPTION("Freescale SNVS RTC Driver");
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 2dc787d..499fbb9 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -615,7 +615,12 @@ static struct platform_driver twl4030rtc_driver = {
},
};

-module_platform_driver(twl4030rtc_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rtc,
+ 0
+};
+
+annotated_module_platform_driver(twl4030rtc_driver, drvid_rtc_twl, dependencies);

MODULE_AUTHOR("Texas Instruments, MontaVista Software");
MODULE_LICENSE("GPL");
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 207d6a7..c88dd19 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1222,5 +1222,11 @@ static void __exit exit_scsi(void)
async_unregister_domain(&scsi_sd_probe_domain);
}

-subsys_initcall(init_scsi);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_bsg,
+ drvid_netlink,
+ 0
+};
+
+annotated_initcall(subsys, init_scsi, drvid_scsi_mod, dependencies);
module_exit(exit_scsi);
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index a20da8c..628d8ed 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3274,7 +3274,13 @@ static void __exit exit_sd(void)
}
}

-module_init(init_sd);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_scsi_mod,
+ drvid_genhd,
+ 0
+};
+
+annotated_module_init(init_sd, drvid_sd_mod, dependencies);
module_exit(exit_sd);

static void sd_print_sense_hdr(struct scsi_disk *sdkp,
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index f9deb84..38f28b0 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -1242,7 +1242,7 @@ static struct platform_driver spi_imx_driver = {
.probe = spi_imx_probe,
.remove = spi_imx_remove,
};
-module_platform_driver(spi_imx_driver);
+annotated_module_platform_driver(spi_imx_driver, drvid_spi_imx, NULL);

MODULE_DESCRIPTION("SPI Master Controller driver");
MODULE_AUTHOR("Sascha Hauer, Pengutronix");
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 3d09e0b..9322f63 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1529,5 +1529,5 @@ static struct platform_driver omap2_mcspi_driver = {
.remove = omap2_mcspi_remove,
};

-module_platform_driver(omap2_mcspi_driver);
+annotated_module_platform_driver(omap2_mcspi_driver, drvid_omap2_mcspi, NULL);
MODULE_LICENSE("GPL");
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 4ca211b..03f2caf 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -2141,5 +2141,11 @@ static void __exit thermal_exit(void)
mutex_destroy(&thermal_governor_lock);
}

-fs_initcall(thermal_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_netlink,
+ drvid_hwmon,
+ 0
+};
+
+annotated_initcall(fs, thermal_init, drvid_thermal, dependencies);
module_exit(thermal_exit);
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 4d5e840..b28a16a 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -869,4 +869,10 @@ static int __init pty_init(void)
unix98_pty_init();
return 0;
}
-module_init(pty_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_tty,
+ 0
+};
+
+annotated_module_init(pty_init, drvid_pty, dependencies);
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 37fff12..dbfa632 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -4012,7 +4012,14 @@ static void __exit serial8250_exit(void)
#endif
}

-module_init(serial8250_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pnp,
+ drvid_tty,
+ 0
+};
+
+/* Must be initialized before other dependent serial drivers */
+annotated_initcall_sync(fs, serial8250_init, drvid_serial, dependencies);
module_exit(serial8250_exit);

EXPORT_SYMBOL(serial8250_suspend_port);
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index b470df1..7064370 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1396,7 +1396,13 @@ static struct platform_driver omap8250_platform_driver = {
.probe = omap8250_probe,
.remove = omap8250_remove,
};
-module_platform_driver(omap8250_platform_driver);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_serial,
+ 0
+};
+
+annotated_module_platform_driver(omap8250_platform_driver, drvid_omap8250, dependencies);

MODULE_AUTHOR("Sebastian Andrzej Siewior");
MODULE_DESCRIPTION("OMAP 8250 Driver");
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 46ddce4..0642ae6 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -5794,7 +5794,16 @@ static struct pci_driver serial_pci_driver = {
.err_handler = &serial8250_err_handler,
};

-module_pci_driver(serial_pci_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_serial,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_pci_driver(serial_pci_driver, drvid_serial_pci, dependencies);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module");
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 08ce76f..3f87146 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1937,7 +1937,12 @@ static void __exit lpuart_serial_exit(void)
uart_unregister_driver(&lpuart_reg);
}

-module_init(lpuart_serial_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_tty,
+ 0
+};
+
+annotated_module_init_drv(lpuart_serial_init, drvid_lpuart, dependencies, lpuart_driver.driver);
module_exit(lpuart_serial_exit);

MODULE_DESCRIPTION("Freescale lpuart serial port driver");
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 54fdc78..fa45969 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2024,7 +2024,12 @@ static void __exit imx_serial_exit(void)
uart_unregister_driver(&imx_reg);
}

-module_init(imx_serial_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_tty,
+ 0
+};
+
+annotated_module_init_drv(imx_serial_init, drvid_imx_uart, dependencies, serial_imx_driver.driver);
module_exit(imx_serial_exit);

MODULE_AUTHOR("Sascha Hauer");
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index 6823df9..f935496 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -360,7 +360,12 @@ static struct platform_driver of_platform_serial_driver = {
.remove = of_platform_serial_remove,
};

-module_platform_driver(of_platform_serial_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_serial,
+ 0
+};
+
+annotated_module_platform_driver(of_platform_serial_driver, drvid_of_serial, dependencies);

MODULE_AUTHOR("Arnd Bergmann <arnd@arndb.de>");
MODULE_LICENSE("GPL");
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 7a2172b..7a05a17 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -1889,7 +1889,12 @@ static void __exit serial_omap_exit(void)
uart_unregister_driver(&serial_omap_reg);
}

-module_init(serial_omap_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_tty,
+ 0
+};
+
+annotated_module_init_drv(serial_omap_init, drvid_omap_serial, dependencies, serial_omap_driver.driver);
module_exit(serial_omap_exit);

MODULE_DESCRIPTION("OMAP High Speed UART driver");
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index b5b4278..0240b12 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -1112,4 +1112,10 @@ static int __init sysrq_init(void)

return 0;
}
-module_init(sysrq_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_input,
+ 0
+};
+
+annotated_module_init(sysrq_init, drvid_sysrq, dependencies);
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 57fc6ee..a0ce493 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -3547,7 +3547,7 @@ static int __init tty_class_init(void)
return 0;
}

-postcore_initcall(tty_class_init);
+annotated_initcall(postcore, tty_class_init, drvid_tty, NULL);

/* 3/2004 jmc: why do these devices exist? */
static struct cdev tty_cdev, console_cdev;
diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index f598ecd..70f41a2 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -271,7 +271,7 @@ static struct platform_driver uio_pdrv_genirq = {
},
};

-module_platform_driver(uio_pdrv_genirq);
+annotated_module_platform_driver(uio_pdrv_genirq, drvid_uio_pdrv_genirq, NULL);

MODULE_AUTHOR("Magnus Damm");
MODULE_DESCRIPTION("Userspace I/O platform driver with generic IRQ handling");
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 8d5b2f4..fd531e9 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -1116,6 +1116,15 @@ static void __exit usb_exit(void)
usb_debugfs_cleanup();
}

-subsys_initcall(usb_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_initcall(subsys, usb_init, drvid_usb, dependencies);
module_exit(usb_exit);
MODULE_LICENSE("GPL");
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index c63d82c..b818b35 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1372,7 +1372,13 @@ err_debug:
clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
return retval;
}
-module_init(ehci_hcd_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_usb,
+ 0
+};
+
+annotated_module_init(ehci_hcd_init, drvid_ehci_hcd, dependencies);

static void __exit ehci_hcd_cleanup(void)
{
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index a24720b..c056cfe 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -310,7 +310,13 @@ static int __init ehci_omap_init(void)
ehci_init_driver(&ehci_omap_hc_driver, &ehci_omap_overrides);
return platform_driver_register(&ehci_hcd_omap_driver);
}
-module_init(ehci_omap_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ehci_hcd,
+ 0
+};
+
+annotated_module_init_drv(ehci_omap_init, drvid_ehci_omap, dependencies, ehci_hcd_omap_driver.driver);

static void __exit ehci_omap_cleanup(void)
{
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index bfcbb9a..e622aec 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -333,7 +333,13 @@ static int __init ehci_orion_init(void)
ehci_init_driver(&ehci_orion_hc_driver, &orion_overrides);
return platform_driver_register(&ehci_orion_driver);
}
-module_init(ehci_orion_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ehci_hcd,
+ 0
+};
+
+annotated_module_init_drv(ehci_orion_init, drvid_ehci_orion, dependencies, ehci_orion_driver.driver);

static void __exit ehci_orion_cleanup(void)
{
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 2a5d2fd..63d20fc 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -421,7 +421,17 @@ static int __init ehci_pci_init(void)

return pci_register_driver(&ehci_pci_driver);
}
-module_init(ehci_pci_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ehci_hcd,
+ drvid_pci_subsys,
+ drvid_pcibios_assign_resources,
+ drvid_pnpacpi, // optional
+ drvid_pci_quirks, // optional
+ 0
+};
+
+annotated_module_init_drv(ehci_pci_init, drvid_ehci_pci, dependencies, ehci_pci_driver.driver);

static void __exit ehci_pci_cleanup(void)
{
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 760cb57..8867277 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1353,7 +1353,14 @@ static int __init ohci_hcd_mod_init(void)
clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
return retval;
}
-module_init(ohci_hcd_mod_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_usb,
+ drvid_ehci_hcd,
+ 0
+};
+
+annotated_module_init(ohci_hcd_mod_init, drvid_ohci_hci, dependencies);

static void __exit ohci_hcd_mod_exit(void)
{
diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c
index ec15aeb..7bf96f2 100644
--- a/drivers/usb/host/ohci-omap3.c
+++ b/drivers/usb/host/ohci-omap3.c
@@ -197,7 +197,13 @@ static int __init ohci_omap3_init(void)
ohci_init_driver(&ohci_omap3_hc_driver, NULL);
return platform_driver_register(&ohci_hcd_omap3_driver);
}
-module_init(ohci_omap3_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ohci_hcd,
+ 0
+};
+
+annotated_module_init_drv(ohci_omap3_init, drvid_ohci_omap3, dependencies, ohci_hcd_omap3_driver.driver);

static void __exit ohci_omap3_cleanup(void)
{
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index a7de8e8..5576bee 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -937,7 +937,13 @@ static void __exit uhci_hcd_cleanup(void)
clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
}

-module_init(uhci_hcd_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_usb,
+ drvid_ehci_hcd,
+ 0
+};
+
+annotated_module_init(uhci_hcd_init, drvid_uhci_hcd, dependencies);
module_exit(uhci_hcd_cleanup);

MODULE_AUTHOR(DRIVER_AUTHOR);
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 514a6cd..42262ae 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2563,4 +2563,4 @@ static struct platform_driver musb_driver = {
.shutdown = musb_shutdown,
};

-module_platform_driver(musb_driver);
+annotated_module_platform_driver(musb_driver, drvid_musb_hdrc, NULL);
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 1334a3d..895609f 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -939,4 +939,4 @@ MODULE_AUTHOR("Ravi B <ravibabu@ti.com>");
MODULE_AUTHOR("Ajay Kumar Gupta <ajay.gupta@ti.com>");
MODULE_LICENSE("GPL v2");

-module_platform_driver(dsps_usbss_driver);
+annotated_module_platform_driver(dsps_usbss_driver, drvid_musb_dsps, NULL);
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 70f2b8a..9ab0b5f 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -725,7 +725,7 @@ static int __init omap2430_init(void)
{
return platform_driver_register(&omap2430_driver);
}
-subsys_initcall(omap2430_init);
+annotated_initcall_drv(subsys, omap2430_init, drvid_omap2430, NULL, omap2430_driver.driver);

static void __exit omap2430_exit(void)
{
diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c
index 7b3035f..3b69884 100644
--- a/drivers/usb/phy/phy-am335x-control.c
+++ b/drivers/usb/phy/phy-am335x-control.c
@@ -180,5 +180,5 @@ static struct platform_driver am335x_control_driver = {
},
};

-module_platform_driver(am335x_control_driver);
+annotated_module_platform_driver(am335x_control_driver, drvid_am335x_control, NULL);
MODULE_LICENSE("GPL v2");
diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c
index 90b67a4..82d23b8 100644
--- a/drivers/usb/phy/phy-am335x.c
+++ b/drivers/usb/phy/phy-am335x.c
@@ -142,5 +142,5 @@ static struct platform_driver am335x_phy_driver = {
},
};

-module_platform_driver(am335x_phy_driver);
+annotated_module_platform_driver(am335x_phy_driver, drvid_am335x_phy, NULL);
MODULE_LICENSE("GPL v2");
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index deee68e..eff0216 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -360,7 +360,7 @@ static int __init usb_phy_generic_init(void)
{
return platform_driver_register(&usb_phy_generic_driver);
}
-subsys_initcall(usb_phy_generic_init);
+annotated_initcall_drv(subsys, usb_phy_generic_init, drvid_usb_phy_generic, NULL, usb_phy_generic_driver.driver);

static void __exit usb_phy_generic_exit(void)
{
diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c
index f66120d..6695128 100644
--- a/drivers/usb/phy/phy-gpio-vbus-usb.c
+++ b/drivers/usb/phy/phy-gpio-vbus-usb.c
@@ -390,7 +390,7 @@ static struct platform_driver gpio_vbus_driver = {
.remove = gpio_vbus_remove,
};

-module_platform_driver(gpio_vbus_driver);
+annotated_module_platform_driver(gpio_vbus_driver, drvid_gpio_vbus, NULL);

MODULE_DESCRIPTION("simple GPIO controlled OTG transceiver driver");
MODULE_AUTHOR("Philipp Zabel");
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index 3fcc048..39d91b1 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -577,7 +577,7 @@ static int __init mxs_phy_module_init(void)
{
return platform_driver_register(&mxs_phy_driver);
}
-postcore_initcall(mxs_phy_module_init);
+annotated_initcall_drv(postcore, mxs_phy_module_init, drvid_mxs_phy, NULL, mxs_phy_driver.driver);

static void __exit mxs_phy_module_exit(void)
{
diff --git a/drivers/usb/storage/cypress_atacb.c b/drivers/usb/storage/cypress_atacb.c
index c80d3de..59ea823 100644
--- a/drivers/usb/storage/cypress_atacb.c
+++ b/drivers/usb/storage/cypress_atacb.c
@@ -290,4 +290,9 @@ static struct usb_driver cypress_driver = {
.no_dynamic_id = 1,
};

-module_usb_stor_driver(cypress_driver, cypress_host_template, DRV_NAME);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_usb_storage,
+ 0
+};
+
+annotated_module_usb_stor_driver(cypress_driver, cypress_host_template, DRV_NAME, drvid_ums_cypress, dependencies);
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 43576ed..f0da741 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -1143,4 +1143,10 @@ static struct usb_driver usb_storage_driver = {
.soft_unbind = 1,
};

-module_usb_stor_driver(usb_storage_driver, usb_stor_host_template, DRV_NAME);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_usb,
+ drvid_scsi_mod,
+ 0
+};
+
+annotated_module_usb_stor_driver(usb_storage_driver, usb_stor_host_template, DRV_NAME, drvid_usb_storage, dependencies);
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index bddc8b1..4bdebfe 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -589,11 +589,17 @@ static int __init backlight_class_init(void)
return 0;
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ drvid_fbmem,
+ 0
+};
+
/*
* if this is compiled into the kernel, we need to ensure that the
* class is registered before users of the class try to register lcd's
*/
-postcore_initcall(backlight_class_init);
+annotated_initcall(postcore, backlight_class_init, drvid_backlight_class, dependencies);
module_exit(backlight_class_exit);

MODULE_LICENSE("GPL");
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index 7de847d..f254fa2 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -352,11 +352,16 @@ static int __init lcd_class_init(void)
return 0;
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_fbmem,
+ 0
+};
+
/*
* if this is compiled into the kernel, we need to ensure that the
* class is registered before users of the class try to register lcd's
*/
-postcore_initcall(lcd_class_init);
+annotated_initcall(postcore, lcd_class_init, drvid_lcd_class, dependencies);
module_exit(lcd_class_exit);

MODULE_LICENSE("GPL");
diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
index 872a3bf..acafe15 100644
--- a/drivers/video/backlight/platform_lcd.c
+++ b/drivers/video/backlight/platform_lcd.c
@@ -154,7 +154,13 @@ static struct platform_driver platform_lcd_driver = {
.probe = platform_lcd_probe,
};

-module_platform_driver(platform_lcd_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_backlight_class,
+ drvid_lcd_class,
+ 0
+};
+
+annotated_module_platform_driver(platform_lcd_driver, drvid_platform_lcd, dependencies);

MODULE_AUTHOR("Ben Dooks <ben-linux@fluff.org>");
MODULE_LICENSE("GPL v2");
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index eff379b..5134fee 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -403,7 +403,12 @@ static struct platform_driver pwm_backlight_driver = {
.shutdown = pwm_backlight_shutdown,
};

-module_platform_driver(pwm_backlight_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_backlight_class,
+ 0
+};
+
+annotated_module_platform_driver(pwm_backlight_driver, drvid_pwm_backlight, dependencies);

MODULE_DESCRIPTION("PWM based Backlight Driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c
index 61d72bf..3a46b41 100644
--- a/drivers/video/backlight/tps65217_bl.c
+++ b/drivers/video/backlight/tps65217_bl.c
@@ -327,7 +327,13 @@ static struct platform_driver tps65217_bl_driver = {
},
};

-module_platform_driver(tps65217_bl_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_backlight_class,
+ drvid_tps65217,
+ 0
+};
+
+annotated_module_platform_driver(tps65217_bl_driver, drvid_tps65217_bl, dependencies);

MODULE_DESCRIPTION("TPS65217 Backlight driver");
MODULE_LICENSE("GPL v2");
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 1aaf893..40b1ec7 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -3622,7 +3622,13 @@ static int __init fb_console_init(void)
return 0;
}

-fs_initcall(fb_console_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_fbmem,
+ drvid_crc32test,
+ 0
+};
+
+annotated_initcall(fs, fb_console_init, drvid_fb_console, dependencies);

#ifdef MODULE

diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 0705d88..eeed0ab 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1860,7 +1860,7 @@ fbmem_init(void)
}

#ifdef MODULE
-module_init(fbmem_init);
+annotated_module_init(fbmem_init, drvid_fbmem, NULL);
static void __exit
fbmem_exit(void)
{
@@ -1873,7 +1873,7 @@ module_exit(fbmem_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Framebuffer base");
#else
-subsys_initcall(fbmem_init);
+annotated_initcall(subsys, fbmem_init, drvid_fbmem, NULL);
#endif

int fb_new_modelist(struct fb_info *info)
diff --git a/drivers/video/fbdev/omap2/vrfb.c b/drivers/video/fbdev/omap2/vrfb.c
index f346b02..e2d5916 100644
--- a/drivers/video/fbdev/omap2/vrfb.c
+++ b/drivers/video/fbdev/omap2/vrfb.c
@@ -392,7 +392,12 @@ static struct platform_driver vrfb_driver = {
.remove = __exit_p(vrfb_remove),
};

-module_platform_driver_probe(vrfb_driver, vrfb_probe);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_fbmem,
+ 0
+};
+
+annotated_module_platform_driver_probe(vrfb_driver, vrfb_probe, drvid_omapvrfb, dependencies);

MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
MODULE_DESCRIPTION("OMAP VRFB");
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 3c3fd41..b683458 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -650,7 +650,12 @@ static void __exit iTCO_wdt_cleanup_module(void)
pr_info("Watchdog Module Unloaded\n");
}

-module_init(iTCO_wdt_init_module);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_watchdog,
+ 0
+};
+
+annotated_module_init(iTCO_wdt_init_module, drvid_iTCO_wdt, dependencies);
module_exit(iTCO_wdt_cleanup_module);

MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>");
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 0bb1a1d..77ba64f 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -422,7 +422,12 @@ static struct platform_driver imx2_wdt_driver = {
},
};

-module_platform_driver_probe(imx2_wdt_driver, imx2_wdt_probe);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_watchdog,
+ 0
+};
+
+annotated_module_platform_driver_probe(imx2_wdt_driver, imx2_wdt_probe, drvid_imx2_wdt, dependencies);

MODULE_AUTHOR("Wolfram Sang");
MODULE_DESCRIPTION("Watchdog driver for IMX2 and later");
diff --git a/drivers/watchdog/it87_wdt.c b/drivers/watchdog/it87_wdt.c
index e54839b..969195b 100644
--- a/drivers/watchdog/it87_wdt.c
+++ b/drivers/watchdog/it87_wdt.c
@@ -789,7 +789,12 @@ static void __exit it87_wdt_exit(void)
release_region(base, 8);
}

-module_init(it87_wdt_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_watchdog,
+ 0
+};
+
+annotated_module_init(it87_wdt_init, drvid_it87_wdt, dependencies);
module_exit(it87_wdt_exit);

MODULE_AUTHOR("Oliver Schuster");
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index de911c7..bd724af 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -372,7 +372,12 @@ static struct platform_driver omap_wdt_driver = {
},
};

-module_platform_driver(omap_wdt_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_watchdog,
+ 0
+};
+
+annotated_module_platform_driver(omap_wdt_driver, drvid_omap_wdt, dependencies);

MODULE_AUTHOR("George G. Davis");
MODULE_LICENSE("GPL");
diff --git a/drivers/watchdog/softdog.c b/drivers/watchdog/softdog.c
index 0dc5e323d..949eec3 100644
--- a/drivers/watchdog/softdog.c
+++ b/drivers/watchdog/softdog.c
@@ -200,7 +200,12 @@ static void __exit watchdog_exit(void)
unregister_reboot_notifier(&softdog_notifier);
}

-module_init(watchdog_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_watchdog,
+ 0
+};
+
+annotated_module_init(watchdog_init, drvid_softdog, dependencies);
module_exit(watchdog_exit);

MODULE_AUTHOR("Alan Cox");
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c
index 2c1db6f..224073e 100644
--- a/drivers/watchdog/twl4030_wdt.c
+++ b/drivers/watchdog/twl4030_wdt.c
@@ -145,7 +145,12 @@ static struct platform_driver twl4030_wdt_driver = {
},
};

-module_platform_driver(twl4030_wdt_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_watchdog,
+ 0
+};
+
+annotated_module_platform_driver(twl4030_wdt_driver, drvid_twl4030_wdt, dependencies);

MODULE_AUTHOR("Nokia Corporation");
MODULE_LICENSE("GPL");
diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
index 1a80594..5697f1f 100644
--- a/drivers/watchdog/watchdog_core.c
+++ b/drivers/watchdog/watchdog_core.c
@@ -299,7 +299,12 @@ static void __exit watchdog_exit(void)
ida_destroy(&watchdog_ida);
}

-subsys_initcall_sync(watchdog_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};
+
+annotated_initcall_sync(subsys, watchdog_init, drvid_watchdog, dependencies);
module_exit(watchdog_exit);

MODULE_AUTHOR("Alan Cox <alan@lxorguk.ukuu.org.uk>");
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
index 80ef38c..cbafa5e 100644
--- a/fs/anon_inodes.c
+++ b/fs/anon_inodes.c
@@ -175,5 +175,4 @@ static int __init anon_inode_init(void)
return 0;
}

-fs_initcall(anon_inode_init);
-
+annotated_initcall(fs, anon_inode_init, drvid_anon_inode, NULL);
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 6b65996..2dec793 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -2321,6 +2321,6 @@ static void __exit exit_elf_binfmt(void)
unregister_binfmt(&elf_format);
}

-core_initcall(init_elf_binfmt);
+annotated_initcall(core, init_elf_binfmt, drvid_binfmt_elf, NULL);
module_exit(exit_elf_binfmt);
MODULE_LICENSE("GPL");
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 78f005f..3ea6bce 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -830,6 +830,6 @@ static void __exit exit_misc_binfmt(void)
unregister_filesystem(&bm_fs_type);
}

-core_initcall(init_misc_binfmt);
+annotated_initcall(core, init_misc_binfmt, drvid_binfmt_misc, NULL);
module_exit(exit_misc_binfmt);
MODULE_LICENSE("GPL");
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c
index afdf4e3..3a1799b 100644
--- a/fs/binfmt_script.c
+++ b/fs/binfmt_script.c
@@ -124,6 +124,6 @@ static void __exit exit_script_binfmt(void)
unregister_binfmt(&script_format);
}

-core_initcall(init_script_binfmt);
+annotated_initcall(core, init_script_binfmt, drvid_binfmt_script, NULL);
module_exit(exit_script_binfmt);
MODULE_LICENSE("GPL");
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index cd7ef34..ec730ab 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2325,7 +2325,19 @@ static void __exit exit_btrfs_fs(void)
btrfs_hash_exit();
}

-late_initcall(init_btrfs_fs);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_xor,
+ drvid_raid6_pq,
+ drvid_libcrc32c, /* according to commit 60efa5 */
+ drvid_misc,
+ drvid_debugfs,
+ drvid_alignment, // needed on ARM
+ drvid_bdi,
+ drvid_bio,
+ 0
+};
+
+annotated_initcall(late, init_btrfs_fs, drvid_btrfs, dependencies);
module_exit(exit_btrfs_fs)

MODULE_LICENSE("GPL");
diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c
index 4d24d17..f9fb006 100644
--- a/fs/compat_binfmt_elf.c
+++ b/fs/compat_binfmt_elf.c
@@ -138,7 +138,7 @@ static void cputime_to_compat_timeval(const cputime_t cputime,
#define elf_format compat_elf_format
#define init_elf_binfmt init_compat_elf_binfmt
#define exit_elf_binfmt exit_compat_elf_binfmt
-
+#define drvid_binfmt_elf drvid_binfmt_elf_compat
/*
* We share all the actual code with the native (64-bit) version.
*/
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index c711be8..26f417d 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -727,5 +727,6 @@ static int __init debugfs_init(void)

return retval;
}
-core_initcall(debugfs_init);
+
+annotated_initcall(core, debugfs_init, drvid_debugfs, NULL);

diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 1e009ca..f00e9e9 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -2130,4 +2130,4 @@ static int __init eventpoll_init(void)

return 0;
}
-fs_initcall(eventpoll_init);
+annotated_initcall(fs, eventpoll_init, drvid_eventpoll, NULL);
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a5e8c74..165b75c 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5721,5 +5721,13 @@ static void __exit ext4_exit_fs(void)
MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
MODULE_DESCRIPTION("Fourth Extended Filesystem");
MODULE_LICENSE("GPL");
-module_init(ext4_init_fs)
+
+/* Taken from modules.dep */
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_mbcache,
+ drvid_jbd2,
+ 0
+};
+
+annotated_module_init(ext4_init_fs, drvid_ext4, dependencies);
module_exit(ext4_exit_fs)
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 509411d..f1ade65 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1845,7 +1845,7 @@ static void __exit exit_fat_fs(void)
fat_destroy_inodecache();
}

-module_init(init_fat_fs)
+annotated_module_init(init_fat_fs, drvid_fat, NULL);
module_exit(exit_fat_fs)

MODULE_LICENSE("GPL");
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c
index b7e2b33..d505bc4 100644
--- a/fs/fat/namei_msdos.c
+++ b/fs/fat/namei_msdos.c
@@ -680,5 +680,10 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Werner Almesberger");
MODULE_DESCRIPTION("MS-DOS filesystem support");

-module_init(init_msdos_fs)
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_fat,
+ 0
+};
+
+annotated_module_init(init_msdos_fs, drvid_msdos, dependencies);
module_exit(exit_msdos_fs)
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index 7092584..025c4d8 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -1085,5 +1085,10 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("VFAT filesystem support");
MODULE_AUTHOR("Gordon Chaffee");

-module_init(init_vfat_fs)
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_fat,
+ 0
+};
+
+annotated_module_init(init_vfat_fs, drvid_vfat, dependencies);
module_exit(exit_vfat_fs)
diff --git a/fs/filesystems.c b/fs/filesystems.c
index 5797d45..78c0773 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -253,7 +253,7 @@ static int __init proc_filesystems_init(void)
proc_create("filesystems", 0, NULL, &filesystems_proc_fops);
return 0;
}
-module_init(proc_filesystems_init);
+annotated_module_init(proc_filesystems_init, drvid_proc_filesystems, NULL);
#endif

static struct file_system_type *__get_fs_type(const char *name, int len)
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 2913db2..2dd5372 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1372,5 +1372,10 @@ static void __exit fuse_exit(void)
fuse_dev_cleanup();
}

-module_init(fuse_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_bdi,
+ 0
+};
+
+annotated_module_init(fuse_init, drvid_fuse, dependencies);
module_exit(fuse_exit);
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 2721513..493ec69 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2682,6 +2682,6 @@ static void __exit journal_exit(void)
}

MODULE_LICENSE("GPL");
-module_init(journal_init);
+annotated_module_init(journal_init, drvid_jbd2, NULL);
module_exit(journal_exit);

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 55505cb..483fd26 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -647,7 +647,13 @@ static void __exit exit_nlm(void)
#endif
}

-module_init(init_nlm);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_grace,
+ drvid_sunrpc,
+ 0
+};
+
+annotated_module_init(init_nlm, drvid_lockd, dependencies);
module_exit(exit_nlm);

/*
diff --git a/fs/mbcache.c b/fs/mbcache.c
index 187477d..9b3db3f 100644
--- a/fs/mbcache.c
+++ b/fs/mbcache.c
@@ -853,6 +853,6 @@ static void __exit exit_mbcache(void)
unregister_shrinker(&mb_cache_shrinker);
}

-module_init(init_mbcache)
+annotated_module_init(init_mbcache, drvid_mbcache, NULL);
module_exit(exit_mbcache)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index d2554fe..1128ad3 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -924,5 +924,14 @@ static void __exit nfs4blocklayout_exit(void)

MODULE_ALIAS("nfs-layouttype4-3");

-module_init(nfs4blocklayout_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_nfsv4,
+ drvid_nfs,
+ drvid_lockd,
+ drvid_grace,
+ drvid_sunrpc,
+ 0
+};
+
+annotated_module_init(nfs4blocklayout_init, drvid_blocklayoutdriver, dependencies);
module_exit(nfs4blocklayout_exit);
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index b34f2e2..f8adc58 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -1159,5 +1159,14 @@ static void __exit nfs4filelayout_exit(void)

MODULE_ALIAS("nfs-layouttype4-1");

-module_init(nfs4filelayout_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_nfsv4,
+ drvid_nfs,
+ drvid_lockd,
+ drvid_grace,
+ drvid_sunrpc,
+ 0
+};
+
+annotated_module_init(nfs4filelayout_init, drvid_nfs_layout_nfsv41_files, dependencies);
module_exit(nfs4filelayout_exit);
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 14e3b1e..b066483 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1978,5 +1978,14 @@ MODULE_ALIAS("nfs-layouttype4-4");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("The NFSv4 flexfile layout driver");

-module_init(nfs4flexfilelayout_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_nfsv4,
+ drvid_nfs,
+ drvid_lockd,
+ drvid_grace,
+ drvid_sunrpc,
+ 0
+};
+
+annotated_module_init(nfs4flexfilelayout_init, drvid_flexfilelayout, dependencies);
module_exit(nfs4flexfilelayout_exit);
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 4afbe13..7c19fdc 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -2060,5 +2060,13 @@ MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
MODULE_LICENSE("GPL");
module_param(enable_ino64, bool, 0644);

-module_init(init_nfs_fs)
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_lockd,
+ drvid_grace,
+ drvid_sunrpc,
+ drvid_bdi,
+ 0
+};
+
+annotated_module_init(init_nfs_fs, drvid_nfs, dependencies);
module_exit(exit_nfs_fs)
diff --git a/fs/nfs/nfs2super.c b/fs/nfs/nfs2super.c
index 0a9782c..a35d4a8 100644
--- a/fs/nfs/nfs2super.c
+++ b/fs/nfs/nfs2super.c
@@ -27,5 +27,13 @@ static void __exit exit_nfs_v2(void)

MODULE_LICENSE("GPL");

-module_init(init_nfs_v2);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_nfs,
+ drvid_lockd,
+ drvid_grace,
+ drvid_sunrpc,
+ 0
+};
+
+annotated_module_init(init_nfs_v2, drvid_nfsv2, dependencies);
module_exit(exit_nfs_v2);
diff --git a/fs/nfs/nfs3super.c b/fs/nfs/nfs3super.c
index 5c4394e..9cd3189 100644
--- a/fs/nfs/nfs3super.c
+++ b/fs/nfs/nfs3super.c
@@ -31,5 +31,13 @@ static void __exit exit_nfs_v3(void)

MODULE_LICENSE("GPL");

-module_init(init_nfs_v3);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_nfs,
+ drvid_lockd,
+ drvid_grace,
+ drvid_sunrpc,
+ 0
+};
+
+annotated_module_init(init_nfs_v3, drvid_nfsv3, dependencies);
module_exit(exit_nfs_v3);
diff --git a/fs/nfs_common/grace.c b/fs/nfs_common/grace.c
index ae6e58e..89f060b 100644
--- a/fs/nfs_common/grace.c
+++ b/fs/nfs_common/grace.c
@@ -109,5 +109,11 @@ exit_grace(void)

MODULE_AUTHOR("Jeff Layton <jlayton@primarydata.com>");
MODULE_LICENSE("GPL");
-module_init(init_grace)
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_net_ns,
+ 0
+};
+
+annotated_module_init(init_grace, drvid_grace, dependencies);
module_exit(exit_grace)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 9690cb4..48de652 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1314,5 +1314,15 @@ static void __exit exit_nfsd(void)

MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
MODULE_LICENSE("GPL");
-module_init(init_nfsd)
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_auth_rpcgss,
+ drvid_lockd,
+ drvid_grace,
+ drvid_sunrpc,
+ drvid_debugfs,
+ 0
+};
+
+annotated_module_init(init_nfsd, drvid_nfsd, dependencies);
module_exit(exit_nfsd)
diff --git a/fs/pipe.c b/fs/pipe.c
index 8865f79..70ae621 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1122,4 +1122,4 @@ static int __init init_pipe_fs(void)
return err;
}

-fs_initcall(init_pipe_fs);
+annotated_initcall(fs, init_pipe_fs, drvid_pipe_fs, NULL);
diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c
index cbd82df..bd7390a 100644
--- a/fs/proc/cmdline.c
+++ b/fs/proc/cmdline.c
@@ -26,4 +26,4 @@ static int __init proc_cmdline_init(void)
proc_create("cmdline", 0, NULL, &cmdline_proc_fops);
return 0;
}
-fs_initcall(proc_cmdline_init);
+annotated_initcall(fs, proc_cmdline_init, drvid_proc_cmdline, NULL);
diff --git a/fs/proc/consoles.c b/fs/proc/consoles.c
index 290ba85..f1fca53 100644
--- a/fs/proc/consoles.c
+++ b/fs/proc/consoles.c
@@ -109,4 +109,4 @@ static int __init proc_consoles_init(void)
proc_create("consoles", 0, NULL, &proc_consoles_operations);
return 0;
}
-fs_initcall(proc_consoles_init);
+annotated_initcall(fs, proc_consoles_init, drvid_proc_consoles, NULL);
diff --git a/fs/proc/cpuinfo.c b/fs/proc/cpuinfo.c
index 06f4d31..56a201d 100644
--- a/fs/proc/cpuinfo.c
+++ b/fs/proc/cpuinfo.c
@@ -21,4 +21,4 @@ static int __init proc_cpuinfo_init(void)
proc_create("cpuinfo", 0, NULL, &proc_cpuinfo_operations);
return 0;
}
-fs_initcall(proc_cpuinfo_init);
+annotated_initcall(fs, proc_cpuinfo_init, drvid_proc_cpuinfo, NULL);
diff --git a/fs/proc/devices.c b/fs/proc/devices.c
index 50493ed..a1e8653 100644
--- a/fs/proc/devices.c
+++ b/fs/proc/devices.c
@@ -67,4 +67,4 @@ static int __init proc_devices_init(void)
proc_create("devices", 0, NULL, &proc_devinfo_operations);
return 0;
}
-fs_initcall(proc_devices_init);
+annotated_initcall(fs, proc_devices_init, drvid_proc_devices, NULL);
diff --git a/fs/proc/interrupts.c b/fs/proc/interrupts.c
index a352d57..8b1f61c 100644
--- a/fs/proc/interrupts.c
+++ b/fs/proc/interrupts.c
@@ -50,4 +50,4 @@ static int __init proc_interrupts_init(void)
proc_create("interrupts", 0, NULL, &proc_interrupts_operations);
return 0;
}
-fs_initcall(proc_interrupts_init);
+annotated_initcall(fs, proc_interrupts_init, drvid_proc_interrupts, NULL);
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 92e6726..51c4728 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -641,4 +641,4 @@ static int __init proc_kcore_init(void)

return 0;
}
-fs_initcall(proc_kcore_init);
+annotated_initcall(fs, proc_kcore_init, drvid_proc_kcore, NULL);
diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c
index 05f8dcd..d2c5699 100644
--- a/fs/proc/kmsg.c
+++ b/fs/proc/kmsg.c
@@ -61,4 +61,4 @@ static int __init proc_kmsg_init(void)
proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations);
return 0;
}
-fs_initcall(proc_kmsg_init);
+annotated_initcall(fs, proc_kmsg_init, drvid_proc_kmsg, NULL);
diff --git a/fs/proc/loadavg.c b/fs/proc/loadavg.c
index aec66e6..767b34b 100644
--- a/fs/proc/loadavg.c
+++ b/fs/proc/loadavg.c
@@ -42,4 +42,4 @@ static int __init proc_loadavg_init(void)
proc_create("loadavg", 0, NULL, &loadavg_proc_fops);
return 0;
}
-fs_initcall(proc_loadavg_init);
+annotated_initcall(fs, proc_loadavg_init, drvid_proc_loadavg, NULL);
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index d3ebf2e..0981b0f 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -231,4 +231,4 @@ static int __init proc_meminfo_init(void)
proc_create("meminfo", 0, NULL, &meminfo_proc_fops);
return 0;
}
-fs_initcall(proc_meminfo_init);
+annotated_initcall(fs, proc_meminfo_init, drvid_proc_meminfo, NULL);
diff --git a/fs/proc/page.c b/fs/proc/page.c
index 7eee2d8..9d15bfe 100644
--- a/fs/proc/page.c
+++ b/fs/proc/page.c
@@ -231,4 +231,4 @@ static int __init proc_page_init(void)
proc_create("kpageflags", S_IRUSR, NULL, &proc_kpageflags_operations);
return 0;
}
-fs_initcall(proc_page_init);
+annotated_initcall(fs, proc_page_init, drvid_proc_page, NULL);
diff --git a/fs/proc/softirqs.c b/fs/proc/softirqs.c
index ad8a77f..543c1bf 100644
--- a/fs/proc/softirqs.c
+++ b/fs/proc/softirqs.c
@@ -41,4 +41,4 @@ static int __init proc_softirqs_init(void)
proc_create("softirqs", 0, NULL, &proc_softirqs_operations);
return 0;
}
-fs_initcall(proc_softirqs_init);
+annotated_initcall(fs, proc_softirqs_init, drvid_proc_softirqs, NULL);
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index 510413eb..adb734f 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -203,4 +203,4 @@ static int __init proc_stat_init(void)
proc_create("stat", 0, NULL, &proc_stat_operations);
return 0;
}
-fs_initcall(proc_stat_init);
+annotated_initcall(fs, proc_stat_init, drvid_proc_stat, NULL);
diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
index 33de567..16c0eed 100644
--- a/fs/proc/uptime.c
+++ b/fs/proc/uptime.c
@@ -49,4 +49,4 @@ static int __init proc_uptime_init(void)
proc_create("uptime", 0, NULL, &uptime_proc_fops);
return 0;
}
-fs_initcall(proc_uptime_init);
+annotated_initcall(fs, proc_uptime_init, drvid_proc_uptime, NULL);
diff --git a/fs/proc/version.c b/fs/proc/version.c
index d2154eb..511e41a 100644
--- a/fs/proc/version.c
+++ b/fs/proc/version.c
@@ -31,4 +31,4 @@ static int __init proc_version_init(void)
proc_create("version", 0, NULL, &version_proc_fops);
return 0;
}
-fs_initcall(proc_version_init);
+annotated_initcall(fs, proc_version_init, drvid_proc_version, NULL);
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 9547a278..6333034 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2276,8 +2276,17 @@ out_slab:
kmem_cache_destroy(ubifs_inode_slab);
return err;
}
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ drvid_bdi,
+ drvid_deflate,
+ drvid_lzo,
+ 0
+};
+
/* late_initcall to let compressors initialize first */
-late_initcall(ubifs_init);
+annotated_initcall(late, ubifs_init, drvid_ubifs, dependencies);

static void __exit ubifs_exit(void)
{
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 8ad93c2..163613c 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -221,4 +221,9 @@ static int __init ipc_sysctl_init(void)
return 0;
}

-device_initcall(ipc_sysctl_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_ipc,
+ 0
+};
+
+annotated_initcall(device, ipc_sysctl_init, drvid_ipc_sysctl, dependencies);
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 161a180..07deffb 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -1466,4 +1466,9 @@ out_sysctl:
return error;
}

-device_initcall(init_mqueue_fs);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_proc_filesystems,
+ 0
+};
+
+annotated_initcall(device, init_mqueue_fs, drvid_mqueue_fs, dependencies);
diff --git a/ipc/util.c b/ipc/util.c
index be42300..81e449a 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -88,7 +88,13 @@ static int __init ipc_init(void)
shm_init();
return 0;
}
-device_initcall(ipc_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_proc_filesystems,
+ 0
+};
+
+annotated_initcall(device, ipc_init, drvid_ipc, dependencies);

/**
* ipc_init_ids - initialise ipc identifiers
diff --git a/kernel/configs.c b/kernel/configs.c
index c18b1f1..44d6b624 100644
--- a/kernel/configs.c
+++ b/kernel/configs.c
@@ -89,7 +89,7 @@ static void __exit ikconfig_cleanup(void)
remove_proc_entry("config.gz", NULL);
}

-module_init(ikconfig_init);
+annotated_module_init(ikconfig_init, drvid_configs, NULL);
module_exit(ikconfig_cleanup);

#endif /* CONFIG_IKCONFIG_PROC */
diff --git a/kernel/dma.c b/kernel/dma.c
index 6c6262f..2cf2469 100644
--- a/kernel/dma.c
+++ b/kernel/dma.c
@@ -152,7 +152,7 @@ static int __init proc_dma_init(void)
return 0;
}

-__initcall(proc_dma_init);
+annotated_initcall(device, proc_dma_init, drvid_proc_dma, NULL);
#endif

EXPORT_SYMBOL(request_dma);
diff --git a/kernel/futex.c b/kernel/futex.c
index c4a182f..da9f48a 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -3074,4 +3074,4 @@ static int __init futex_init(void)

return 0;
}
-__initcall(futex_init);
+annotated_initcall(device, futex_init, drvid_futex, NULL);
diff --git a/kernel/module.c b/kernel/module.c
index b86b7bf..68f0b50 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3943,7 +3943,7 @@ static int __init proc_modules_init(void)
proc_create("modules", 0, NULL, &proc_modules_operations);
return 0;
}
-module_init(proc_modules_init);
+annotated_module_init(proc_modules_init, drvid_proc_modules, NULL);
#endif

/* Given an address, look for it in the module exception tables. */
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 690f78f..ed70e63 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -1087,7 +1087,12 @@ static int __init pm_disk_init(void)
return sysfs_create_group(power_kobj, &attr_group);
}

-core_initcall(pm_disk_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pm,
+ 0
+};
+
+annotated_initcall(core, pm_disk_init, drvid_pm_disk, dependencies);


static int __init resume_setup(char *str)
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 63d395b..08765ac 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -643,4 +643,9 @@ static int __init pm_init(void)
return pm_autosleep_init();
}

-core_initcall(pm_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_initcall(core, pm_init, drvid_pm, dependencies);
diff --git a/kernel/power/poweroff.c b/kernel/power/poweroff.c
index 7ef6866..d075c44 100644
--- a/kernel/power/poweroff.c
+++ b/kernel/power/poweroff.c
@@ -43,4 +43,4 @@ static int __init pm_sysrq_init(void)
return 0;
}

-subsys_initcall(pm_sysrq_init);
+annotated_initcall(subsys, pm_sysrq_init, drvid_pm_sysrq, NULL);
diff --git a/kernel/power/user.c b/kernel/power/user.c
index 526e891..21943cc 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -475,4 +475,9 @@ static int __init snapshot_device_init(void)
return misc_register(&snapshot_device);
};

-device_initcall(snapshot_device_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};
+
+annotated_initcall(device, snapshot_device_init, drvid_snapshot_device, dependencies);
diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
index 87e2c9f..3350d7e 100644
--- a/kernel/sched/stats.c
+++ b/kernel/sched/stats.c
@@ -135,4 +135,4 @@ static int __init proc_schedstat_init(void)
proc_create("schedstat", 0, NULL, &proc_schedstat_operations);
return 0;
}
-subsys_initcall(proc_schedstat_init);
+annotated_initcall(subsys, proc_schedstat_init, drvid_proc_schedstat, NULL);
diff --git a/kernel/system_keyring.c b/kernel/system_keyring.c
index 875f64e..5ff5510 100644
--- a/kernel/system_keyring.c
+++ b/kernel/system_keyring.c
@@ -47,7 +47,7 @@ static __init int system_trusted_keyring_init(void)
/*
* Must be initialised before we try and load the keys into the keyring.
*/
-device_initcall(system_trusted_keyring_init);
+annotated_initcall(device, system_trusted_keyring_init, drvid_system_trusted_keyring_init, NULL);

/*
* Load the compiled-in list of X.509 certificates.
@@ -103,4 +103,15 @@ dodgy_cert:
pr_err("Problem parsing in-kernel X.509 certificate list\n");
return 0;
}
-late_initcall(load_system_certificate_list);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_system_trusted_keyring_init,
+ drvid_x509,
+ drvid_sha1_generic,
+ drvid_sha256_generic,
+ drvid_sha512_generic,
+ drvid_crypto_algapi,
+ 0
+};
+
+annotated_initcall(late, load_system_certificate_list, drvid_load_system_certificate_list, dependencies);
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 841b72f..7da6b96 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -630,7 +630,7 @@ static int __init clocksource_done_booting(void)
mutex_unlock(&clocksource_mutex);
return 0;
}
-fs_initcall(clocksource_done_booting);
+annotated_initcall(fs, clocksource_done_booting, drvid_clocksource_done_booting, NULL);

/*
* Enqueue the clocksource sorted by rating
@@ -979,7 +979,12 @@ static int __init init_clocksource_sysfs(void)
return error;
}

-device_initcall(init_clocksource_sysfs);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_clocksource_done_booting,
+ 0
+};
+
+annotated_initcall(device, init_clocksource_sysfs, drvid_clocksource_sysfs, dependencies);
#endif /* CONFIG_SYSFS */

/**
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a413acb..0c39fce 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5070,7 +5070,7 @@ static int __init wq_sysfs_init(void)

return device_create_file(wq_subsys.dev_root, &wq_sysfs_cpumask_attr);
}
-core_initcall(wq_sysfs_init);
+annotated_initcall(core, wq_sysfs_init, drvid_wq_sysfs, NULL);

static void wq_device_release(struct device *dev)
{
diff --git a/lib/crc-t10dif.c b/lib/crc-t10dif.c
index 1ad33e5..07aa046a 100644
--- a/lib/crc-t10dif.c
+++ b/lib/crc-t10dif.c
@@ -62,7 +62,7 @@ static void __exit crc_t10dif_mod_fini(void)
crypto_free_shash(crct10dif_tfm);
}

-module_init(crc_t10dif_mod_init);
+annotated_module_init(crc_t10dif_mod_init, drvid_crc_t10dif_mod, NULL);
module_exit(crc_t10dif_mod_fini);

MODULE_DESCRIPTION("T10 DIF CRC calculation");
diff --git a/lib/crc32.c b/lib/crc32.c
index 9a907d4..61f358f 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -1169,6 +1169,6 @@ static void __exit crc32_exit(void)
{
}

-module_init(crc32test_init);
+annotated_module_init(crc32test_init, drvid_crc32test, NULL);
module_exit(crc32_exit);
#endif /* CONFIG_CRC32_SELFTEST */
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index f6c2c1e..d8c4f51 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -466,6 +466,10 @@ static int __init kobject_uevent_init(void)
return register_pernet_subsys(&uevent_net_ops);
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_netlink_proto,
+ 0
+};

-postcore_initcall(kobject_uevent_init);
+annotated_initcall(postcore, kobject_uevent_init, drvid_kobject_uevent, dependencies);
#endif
diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c
index 6a08ce7..717cf16 100644
--- a/lib/libcrc32c.c
+++ b/lib/libcrc32c.c
@@ -68,7 +68,12 @@ static void __exit libcrc32c_mod_fini(void)
crypto_free_shash(tfm);
}

-module_init(libcrc32c_mod_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_crc32c,
+ 0
+};
+
+annotated_module_init(libcrc32c_mod_init, drvid_libcrc32c, dependencies);
module_exit(libcrc32c_mod_fini);

MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>");
diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c
index 975c6e0..3eac3f5 100644
--- a/lib/raid6/algos.c
+++ b/lib/raid6/algos.c
@@ -244,7 +244,7 @@ static void raid6_exit(void)
do { } while (0);
}

-subsys_initcall(raid6_select_algo);
+annotated_initcall(subsys, raid6_select_algo, drvid_raid6_pq, NULL);
module_exit(raid6_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("RAID6 Q-syndrome calculations");
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index dac5bf5..94bba65 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -239,7 +239,13 @@ static __init int bdi_class_init(void)
bdi_debug_init();
return 0;
}
-postcore_initcall(bdi_class_init);
+
+static const unsigned dependencies0[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_initcall(postcore, bdi_class_init, drvid_bdi_class, dependencies0);

static int __init default_bdi_init(void)
{
@@ -254,7 +260,14 @@ static int __init default_bdi_init(void)

return err;
}
-subsys_initcall(default_bdi_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_bdi_class,
+ drvid_wq_sysfs,
+ 0
+};
+
+annotated_initcall(subsys, default_bdi_init, drvid_bdi, dependencies);

/*
* This function is used when the first inode for this wb is marked dirty. It
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 41e4581..984c246 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -2077,7 +2077,7 @@ static int __init procswaps_init(void)
proc_create("swaps", 0, NULL, &proc_swaps_operations);
return 0;
}
-__initcall(procswaps_init);
+annotated_initcall(device, procswaps_init, drvid_procswaps, NULL);
#endif /* CONFIG_PROC_FS */

#ifdef MAX_SWAPFILES_CHECK
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 2faaa29..9061475 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2686,7 +2686,7 @@ static int __init proc_vmalloc_init(void)
proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations);
return 0;
}
-module_init(proc_vmalloc_init);
+annotated_module_init(proc_vmalloc_init, drvid_proc_vmalloc, NULL);

void get_vmalloc_info(struct vmalloc_info *vmi)
{
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 70f9d94..7f05a28 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -785,7 +785,12 @@ static void __exit bt_exit(void)
debugfs_remove_recursive(bt_debugfs);
}

-subsys_initcall(bt_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rfkill,
+ 0
+};
+
+annotated_initcall(subsys, bt_init, drvid_bt, dependencies);
module_exit(bt_exit);

MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
diff --git a/net/core/dev.c b/net/core/dev.c
index a8e4dd4..79808ef 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7645,4 +7645,10 @@ out:
return rc;
}

-subsys_initcall(net_dev_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sock,
+ drvid_netlink,
+ 0
+};
+
+annotated_initcall(subsys, net_dev_init, drvid_net_dev, dependencies);
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 0ad144f..cc02b4c 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -800,4 +800,10 @@ fail:
return err;
}

-subsys_initcall(fib_rules_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_netlink,
+ drvid_net_dev,
+ 0
+};
+
+annotated_initcall(subsys, fib_rules_init, drvid_fib_rules, dependencies);
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 84195da..34e8991 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -3171,5 +3171,9 @@ static int __init neigh_init(void)
return 0;
}

-subsys_initcall(neigh_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_net_dev,
+ 0
+};

+annotated_initcall(subsys, neigh_init, drvid_neigh, dependencies);
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 2c2eb1b..b4223d2 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -765,7 +765,7 @@ static int __init net_ns_init(void)
return 0;
}

-pure_initcall(net_ns_init);
+annotated_initcall(pure, net_ns_init, drvid_net_ns, NULL);

#ifdef CONFIG_NET_NS
static int __register_pernet_operations(struct list_head *list,
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index c126a87..eca91c2 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -775,7 +775,13 @@ static int __init netpoll_init(void)
skb_queue_head_init(&skb_pool);
return 0;
}
-core_initcall(netpoll_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sock,
+ 0
+};
+
+annotated_initcall(core, netpoll_init, drvid_netpoll, dependencies);

static void rcu_cleanup_netpoll_info(struct rcu_head *rcu_head)
{
diff --git a/net/core/sock.c b/net/core/sock.c
index 193901d..a9bf288 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2684,7 +2684,7 @@ static __init int net_inuse_init(void)
return 0;
}

-core_initcall(net_inuse_init);
+annotated_initcall(core, net_inuse_init, drvid_net_inuse, NULL);
#else
static DEFINE_PER_CPU(struct prot_inuse, prot_inuse);

@@ -2974,6 +2974,6 @@ static int __init proto_init(void)
return register_pernet_subsys(&proto_net_ops);
}

-subsys_initcall(proto_init);
+annotated_initcall(subsys, proto_init, drvid_proto, NULL);

#endif /* PROC_FS */
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 95b6139..42b22cb 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -461,4 +461,9 @@ static __init int sysctl_core_init(void)
return register_pernet_subsys(&sysctl_core_ops);
}

-fs_initcall(sysctl_core_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sock,
+ 0
+};
+
+annotated_initcall(fs, sysctl_core_init, drvid_sysctl_core, dependencies);
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 77e0f0e..b6e0656 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -484,4 +484,9 @@ static int __init eth_offload_init(void)
return 0;
}

-fs_initcall(eth_offload_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_net_dev,
+ 0
+};
+
+annotated_initcall(fs, eth_offload_init, drvid_eth_offload, dependencies);
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 9532ee8..0a7673b 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1662,7 +1662,12 @@ static int __init ipv4_offload_init(void)
return 0;
}

-fs_initcall(ipv4_offload_init);
+static const unsigned dependencies0[] __initconst __maybe_unused = {
+ drvid_inet,
+ 0
+};
+
+annotated_initcall(fs, ipv4_offload_init, drvid_ipv4_offload, dependencies0);

static struct packet_type ip_packet_type __read_mostly = {
.type = cpu_to_be16(ETH_P_IP),
@@ -1792,7 +1797,23 @@ out_unregister_tcp_proto:
goto out;
}

-fs_initcall(inet_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_net_dev,
+ drvid_proto,
+ drvid_netlink, // optional
+ drvid_fib_rules, // optional
+ drvid_xfrm_user,
+ drvid_hmac,
+ drvid_md5,
+ drvid_sha1_generic,
+ drvid_cbc,
+ drvid_des_generic,
+ drvid_authenc,
+ drvid_authencesn,
+ 0
+};
+
+annotated_initcall(fs, inet_init, drvid_inet, dependencies);

/* ------------------------------------------------------------------------ */

diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c
index 61eafc9..918dcc8 100644
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -197,4 +197,4 @@ static int __init ipv4_netfilter_init(void)
{
return nf_register_afinfo(&nf_ip_afinfo);
}
-subsys_initcall(ipv4_netfilter_init);
+annotated_initcall(subsys, ipv4_netfilter_init, drvid_ipv4_netfilter, NULL);
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 7de52b6..9f04016 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -1027,6 +1027,22 @@ out_unregister_tcp_proto:
proto_unregister(&tcpv6_prot);
goto out;
}
-module_init(inet6_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sock,
+ drvid_proto,
+ drvid_neigh,
+ drvid_xfrm_user,
+ drvid_hmac,
+ drvid_md5,
+ drvid_sha1_generic,
+ drvid_cbc,
+ drvid_des_generic,
+ drvid_authenc,
+ drvid_authencesn,
+ 0
+};
+
+annotated_module_init(inet6_init, drvid_inet6, dependencies);

MODULE_ALIAS_NETPROTO(PF_INET6);
diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c
index 08b6204..323c6b6 100644
--- a/net/ipv6/ip6_offload.c
+++ b/net/ipv6/ip6_offload.c
@@ -312,4 +312,9 @@ static int __init ipv6_offload_init(void)
return 0;
}

-fs_initcall(ipv6_offload_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_inet,
+ 0
+};
+
+annotated_initcall(fs, ipv6_offload_init, drvid_ipv6_offload, dependencies);
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 0857f72..e2215a8 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -3302,4 +3302,10 @@ panic:
panic("netlink_init: Cannot allocate nl_table\n");
}

-core_initcall(netlink_proto_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sock,
+ drvid_proto,
+ 0
+};
+
+annotated_initcall(core, netlink_proto_init, drvid_netlink_proto, dependencies);
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 2ed5f96..21d4a1a 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -1095,7 +1095,12 @@ problem:
panic("GENL: Cannot register controller: %d\n", err);
}

-subsys_initcall(genl_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_netlink_proto,
+ 0
+};
+
+annotated_initcall(subsys, genl_init, drvid_netlink, dependencies);

static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group,
gfp_t flags)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 7851b12..b43fca3 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -4283,7 +4283,13 @@ out:
return rc;
}

-module_init(packet_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_proto,
+ drvid_net_dev,
+ 0
+};
+
+annotated_module_init(packet_init, drvid_packet, dependencies);
module_exit(packet_exit);
MODULE_LICENSE("GPL");
MODULE_ALIAS_NETPROTO(PF_PACKET);
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index f12149a..f7418bc 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -1288,7 +1288,13 @@ static int __init rfkill_init(void)
out:
return error;
}
-subsys_initcall(rfkill_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_misc,
+ 0
+};
+
+annotated_initcall(subsys, rfkill_init, drvid_rfkill, dependencies);

static void __exit rfkill_exit(void)
{
diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
index d5d58d9..9f65edc 100644
--- a/net/rfkill/rfkill-gpio.c
+++ b/net/rfkill/rfkill-gpio.c
@@ -184,7 +184,12 @@ static struct platform_driver rfkill_gpio_driver = {
},
};

-module_platform_driver(rfkill_gpio_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rfkill,
+ 0
+};
+
+annotated_module_platform_driver(rfkill_gpio_driver, drvid_rfkill_gpio, dependencies);

MODULE_DESCRIPTION("gpio rfkill");
MODULE_AUTHOR("NVIDIA");
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index f06aa01..b73dd1c 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1958,4 +1958,9 @@ static int __init pktsched_init(void)
return 0;
}

-subsys_initcall(pktsched_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_netlink_proto,
+ 0
+};
+
+annotated_initcall(subsys, pktsched_init, drvid_pktsched, dependencies);
diff --git a/net/socket.c b/net/socket.c
index 9963a0b..f5442d6 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2532,7 +2532,12 @@ out_fs:
goto out;
}

-core_initcall(sock_init); /* early initcall */
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_net_ns,
+ 0
+};
+
+annotated_initcall(core, sock_init, drvid_sock, dependencies); /* early initcall */

#ifdef CONFIG_PROC_FS
void socket_seq_show(struct seq_file *seq)
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index dace13d..07e6343 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -2093,5 +2093,10 @@ MODULE_PARM_DESC(key_expire_timeo, "Time (in seconds) at the end of a "
"credential keys lifetime where the NFS layer cleans up "
"prior to key expiration");

-module_init(init_rpcsec_gss)
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sunrpc,
+ 0
+};
+
+annotated_module_init(init_rpcsec_gss, drvid_auth_rpcgss, dependencies);
module_exit(exit_rpcsec_gss)
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
index 28db442..9331c42 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -784,5 +784,12 @@ static void __exit cleanup_kerberos_module(void)
}

MODULE_LICENSE("GPL");
-module_init(init_kerberos_module);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sunrpc,
+ drvid_auth_rpcgss,
+ 0
+};
+
+annotated_module_init(init_kerberos_module, drvid_rpcsec_gss_krb5, dependencies);
module_exit(cleanup_kerberos_module);
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index ee5d3d2..9add018 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -132,5 +132,11 @@ cleanup_sunrpc(void)
rcu_barrier(); /* Wait for completion of call_rcu()'s */
}
MODULE_LICENSE("GPL");
-fs_initcall(init_sunrpc); /* Ensure we're initialised before nfs */
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_initcall(fs, init_sunrpc, drvid_sunrpc, dependencies); /* Ensure we're initialised before nfs */
module_exit(cleanup_sunrpc);
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 03ee4d3..cb2bec2 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2663,11 +2663,17 @@ static void __exit af_unix_exit(void)
unregister_pernet_subsys(&unix_net_ops);
}

+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_sock,
+ drvid_proto,
+ 0
+};
+
/* Earlier than device_initcall() so that other drivers invoking
request_module() don't end up in a loop when modprobe tries
to use a UNIX socket. But later than subsys_initcall() because
we depend on stuff initialised there */
-fs_initcall(af_unix_init);
+annotated_initcall(fs, af_unix_init, drvid_af_unix, dependencies);
module_exit(af_unix_exit);

MODULE_LICENSE("GPL");
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 2a0bbd2..b5f18f6 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1209,7 +1209,15 @@ out_fail_sysfs:
out_fail_pernet:
return err;
}
-subsys_initcall(cfg80211_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_rfkill,
+ drvid_debugfs,
+ drvid_net_dev,
+ 0
+};
+
+annotated_initcall(subsys, cfg80211_init, drvid_cfg80211, dependencies);

static void __exit cfg80211_exit(void)
{
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
index c8717c1..64dff84 100644
--- a/net/wireless/wext-core.c
+++ b/net/wireless/wext-core.c
@@ -363,7 +363,12 @@ static int __init wireless_nlevent_init(void)
return register_pernet_subsys(&wext_pernet_ops);
}

-subsys_initcall(wireless_nlevent_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_netlink,
+ 0
+};
+
+annotated_initcall(subsys, wireless_nlevent_init, drvid_wireless_nlevent, dependencies);

/* Process events generated by the wireless layer or the driver. */
static void wireless_nlevent_process(struct work_struct *work)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index bd16c6c..6b0662e 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -3161,7 +3161,13 @@ static void __exit xfrm_user_exit(void)
unregister_pernet_subsys(&xfrm_user_net_ops);
}

-module_init(xfrm_user_init);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_netlink,
+ drvid_deflate,
+ 0
+};
+
+annotated_module_init(xfrm_user_init, drvid_xfrm_user, dependencies);
module_exit(xfrm_user_exit);
MODULE_LICENSE("GPL");
MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_XFRM);
diff --git a/security/keys/proc.c b/security/keys/proc.c
index f0611a6..e323948 100644
--- a/security/keys/proc.c
+++ b/security/keys/proc.c
@@ -76,7 +76,7 @@ static int __init key_proc_init(void)
return 0;
}

-__initcall(key_proc_init);
+annotated_initcall(device, key_proc_init, drvid_key_proc, NULL);

/*
* Implement "/proc/keys" to provide a list of the keys on the system that
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index fed7e7e..5ab73a6 100644
--- a/sound/drivers/mpu401/mpu401.c
+++ b/sound/drivers/mpu401/mpu401.c
@@ -283,5 +283,11 @@ static void __exit alsa_card_mpu401_exit(void)
snd_mpu401_unregister_all();
}

-module_init(alsa_card_mpu401_init)
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_pnp,
+ drvid_snd_mpu401_uart,
+ 0
+};
+
+annotated_module_init(alsa_card_mpu401_init, drvid_snd_mpu401, dependencies)
module_exit(alsa_card_mpu401_exit)
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
index 776596b..a66e9c5 100644
--- a/sound/drivers/mpu401/mpu401_uart.c
+++ b/sound/drivers/mpu401/mpu401_uart.c
@@ -630,5 +630,5 @@ static void __exit alsa_mpu401_uart_exit(void)
{
}

-module_init(alsa_mpu401_uart_init)
+annotated_module_init(alsa_mpu401_uart_init, drvid_snd_mpu401_uart, NULL);
module_exit(alsa_mpu401_uart_exit)
diff --git a/sound/soc/codecs/hdmi.c b/sound/soc/codecs/hdmi.c
index bd42ad3..fa725d5 100644
--- a/sound/soc/codecs/hdmi.c
+++ b/sound/soc/codecs/hdmi.c
@@ -101,7 +101,12 @@ static struct platform_driver hdmi_codec_driver = {
.remove = hdmi_codec_remove,
};

-module_platform_driver(hdmi_codec_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_snd_soc,
+ 0
+};
+
+annotated_module_platform_driver(hdmi_codec_driver, drvid_hdmi_audio_codec, dependencies);

MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>");
MODULE_DESCRIPTION("ASoC generic HDMI codec driver");
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 90f5f04..e48847e 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -2233,7 +2233,12 @@ static struct platform_driver twl4030_codec_driver = {
},
};

-module_platform_driver(twl4030_codec_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_snd_soc,
+ 0
+};
+
+annotated_module_platform_driver(twl4030_codec_driver, drvid_twl4030_codec, dependencies);

MODULE_DESCRIPTION("ASoC TWL4030 codec driver");
MODULE_AUTHOR("Steve Sakoman");
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index fc57da3..b46000e 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -364,7 +364,14 @@ static int __init imx_audmux_init(void)
{
return platform_driver_register(&imx_audmux_driver);
}
-subsys_initcall(imx_audmux_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_snd_soc,
+ drvid_debugfs,
+ 0
+};
+
+annotated_initcall_drv(subsys, imx_audmux_init, drvid_imx_audmux, dependencies, imx_audmux_driver.driver);

static void __exit imx_audmux_exit(void)
{
diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c
index aeef25c..56ba4bd 100644
--- a/sound/soc/omap/omap-hdmi-audio.c
+++ b/sound/soc/omap/omap-hdmi-audio.c
@@ -401,7 +401,12 @@ static struct platform_driver hdmi_audio_driver = {
.remove = omap_hdmi_audio_remove,
};

-module_platform_driver(hdmi_audio_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_snd_soc,
+ 0
+};
+
+annotated_module_platform_driver(hdmi_audio_driver, drvid_omap_hdmi, dependencies);

MODULE_AUTHOR("Jyri Sarha <jsarha@ti.com>");
MODULE_DESCRIPTION("OMAP HDMI Audio Driver");
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index fd99d89..37ed8f9 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -849,7 +849,12 @@ static struct platform_driver asoc_mcbsp_driver = {
.remove = asoc_mcbsp_remove,
};

-module_platform_driver(asoc_mcbsp_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_module_platform_driver(asoc_mcbsp_driver, drvid_omap_mcbsp, dependencies);

MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>");
MODULE_DESCRIPTION("OMAP I2S SoC Interface");
diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c
index 7431314..1a4a486 100644
--- a/sound/soc/omap/omap-twl4030.c
+++ b/sound/soc/omap/omap-twl4030.c
@@ -358,7 +358,14 @@ static struct platform_driver omap_twl4030_driver = {
.probe = omap_twl4030_probe,
};

-module_platform_driver(omap_twl4030_driver);
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_snd_soc,
+ drvid_twl_core,
+ drvid_twl4030_codec,
+ 0
+};
+
+annotated_module_platform_driver(omap_twl4030_driver, drvid_omap_twl4030, dependencies);

MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>");
MODULE_DESCRIPTION("ALSA SoC for TI SoC based boards with twl4030 codec");
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0e1e69c..95dcff6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3623,7 +3623,13 @@ static int __init snd_soc_init(void)

return platform_driver_register(&soc_driver);
}
-module_init(snd_soc_init);
+
+static const unsigned dependencies[] __initconst __maybe_unused = {
+ drvid_debugfs,
+ 0
+};
+
+annotated_module_init(snd_soc_init, drvid_snd_soc, dependencies);

static void __exit snd_soc_exit(void)
{
--
2.1.0


\
 
 \ /
  Last update: 2015-10-17 19:41    [W:0.382 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site