aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-10 11:41:54 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-10 11:41:54 -0500
commitc18ab0bac4c377b22e03f9cd4efafa1316b76552 (patch)
tree57049641755e7e01d6da9a902ac662a28b688b0b
parent065380f0880dd651eb405430745926dc4747b759 (diff)
parent49a170bcf28af5ef372cdbed7750ba8d4162bb0e (diff)
Merge tag 'asoc-fix-3.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.8 Nothing terribly exciting here except for the DOUBLE_RANGE fix which just hadn't worked before, nobody noticed due to lack of use.
-rw-r--r--Documentation/DocBook/media/v4l/driver.xml6
-rw-r--r--Documentation/PCI/pci-iov-howto.txt6
-rw-r--r--Documentation/PCI/pci.txt20
-rw-r--r--Documentation/acpi/enumeration.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/imx23-clock.txt5
-rw-r--r--Documentation/devicetree/bindings/clock/imx25-clock.txt4
-rw-r--r--Documentation/devicetree/bindings/clock/imx28-clock.txt5
-rw-r--r--Documentation/devicetree/bindings/clock/imx6q-clock.txt4
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-poweroff.txt20
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt47
-rw-r--r--Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt10
-rw-r--r--Documentation/i2c/instantiating-devices2
-rw-r--r--Documentation/networking/ip-sysctl.txt16
-rw-r--r--Documentation/power/runtime_pm.txt9
-rw-r--r--Documentation/rpmsg.txt4
-rw-r--r--Documentation/spi/spi-summary4
-rw-r--r--Documentation/sysctl/kernel.txt32
-rw-r--r--Documentation/video4linux/v4l2-framework.txt3
-rw-r--r--Documentation/zh_CN/video4linux/v4l2-framework.txt3
-rw-r--r--MAINTAINERS218
-rw-r--r--Makefile2
-rw-r--r--arch/alpha/include/asm/parport.h4
-rw-r--r--arch/alpha/kernel/pci.c12
-rw-r--r--arch/alpha/kernel/smp.c6
-rw-r--r--arch/alpha/kernel/sys_titan.c2
-rw-r--r--arch/arm/Kconfig7
-rw-r--r--arch/arm/boot/dts/armada-370-xp.dtsi6
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78230.dtsi9
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78260.dtsi8
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78460.dtsi8
-rw-r--r--arch/arm/boot/dts/armada-xp.dtsi14
-rw-r--r--arch/arm/boot/dts/dbx5x0.dtsi4
-rw-r--r--arch/arm/boot/dts/dove.dtsi1
-rw-r--r--arch/arm/boot/dts/ecx-2000.dts4
-rw-r--r--arch/arm/boot/dts/exynos4210-smdkv310.dts2
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi2
-rw-r--r--arch/arm/boot/dts/exynos5440-ssdk5440.dts2
-rw-r--r--arch/arm/boot/dts/highbank.dts20
-rw-r--r--arch/arm/boot/dts/imx23-olinuxino.dts8
-rw-r--r--arch/arm/boot/dts/imx31-bug.dts2
-rw-r--r--arch/arm/boot/dts/imx53.dtsi2
-rw-r--r--arch/arm/boot/dts/kirkwood-6282.dtsi1
-rw-r--r--arch/arm/boot/dts/kirkwood-topkick.dts17
-rw-r--r--arch/arm/boot/dts/kirkwood.dtsi1
-rw-r--r--arch/arm/boot/dts/twl4030.dtsi4
-rw-r--r--arch/arm/common/sa1111.c5
-rw-r--r--arch/arm/common/scoop.c6
-rw-r--r--arch/arm/common/vic.c9
-rw-r--r--arch/arm/configs/multi_v7_defconfig1
-rw-r--r--arch/arm/configs/mvebu_defconfig4
-rw-r--r--arch/arm/configs/omap2plus_defconfig5
-rw-r--r--arch/arm/kernel/bios32.c18
-rw-r--r--arch/arm/kernel/etm.c4
-rw-r--r--arch/arm/kernel/perf_event_cpu.c10
-rw-r--r--arch/arm/kernel/perf_event_v6.c4
-rw-r--r--arch/arm/kernel/perf_event_v7.c12
-rw-r--r--arch/arm/kernel/perf_event_xscale.c4
-rw-r--r--arch/arm/mach-davinci/board-dm646x-evm.c2
-rw-r--r--arch/arm/mach-davinci/cdce949.c4
-rw-r--r--arch/arm/mach-dove/pcie.c2
-rw-r--r--arch/arm/mach-exynos/Kconfig2
-rw-r--r--arch/arm/mach-exynos/common.c7
-rw-r--r--arch/arm/mach-highbank/highbank.c2
-rw-r--r--arch/arm/mach-highbank/hotplug.c2
-rw-r--r--arch/arm/mach-highbank/platsmp.c12
-rw-r--r--arch/arm/mach-highbank/pm.c19
-rw-r--r--arch/arm/mach-highbank/sysregs.h23
-rw-r--r--arch/arm/mach-highbank/system.c4
-rw-r--r--arch/arm/mach-imx/Kconfig2
-rw-r--r--arch/arm/mach-imx/cpufreq.c2
-rw-r--r--arch/arm/mach-imx/mmdc.c2
-rw-r--r--arch/arm/mach-iop13xx/pci.c2
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c4
-rw-r--r--arch/arm/mach-kirkwood/board-usi_topkick.c4
-rw-r--r--arch/arm/mach-kirkwood/pcie.c2
-rw-r--r--arch/arm/mach-ks8695/board-acs5k.c2
-rw-r--r--arch/arm/mach-mmp/sram.c4
-rw-r--r--arch/arm/mach-msm/proc_comm.c2
-rw-r--r--arch/arm/mach-msm/smd.c2
-rw-r--r--arch/arm/mach-mv78xx0/pcie.c2
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c1
-rw-r--r--arch/arm/mach-nomadik/include/mach/irqs.h78
-rw-r--r--arch/arm/mach-omap1/Makefile2
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c2
-rw-r--r--arch/arm/mach-omap1/fb.c80
-rw-r--r--arch/arm/mach-omap1/mailbox.c6
-rw-r--r--arch/arm/mach-omap1/usb.c8
-rw-r--r--arch/arm/mach-omap2/Makefile2
-rw-r--r--arch/arm/mach-omap2/cclock3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/control.h2
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c3
-rw-r--r--arch/arm/mach-omap2/drm.c1
-rw-r--r--arch/arm/mach-omap2/dss-common.c3
-rw-r--r--arch/arm/mach-omap2/fb.c (renamed from arch/arm/plat-omap/fb.c)50
-rw-r--r--arch/arm/mach-omap2/gpmc.c12
-rw-r--r--arch/arm/mach-omap2/mailbox.c6
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_data.c6
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c1
-rw-r--r--arch/arm/mach-omap2/omap_twl.c8
-rw-r--r--arch/arm/mach-omap2/pmu.c2
-rw-r--r--arch/arm/mach-omap2/prm2xxx.c91
-rw-r--r--arch/arm/mach-omap2/prm2xxx_3xxx.c22
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c31
-rw-r--r--arch/arm/mach-omap2/prm44xx.c6
-rw-r--r--arch/arm/mach-omap2/prm44xx.h4
-rw-r--r--arch/arm/mach-orion5x/pci.c2
-rw-r--r--arch/arm/mach-prima2/pm.c2
-rw-r--r--arch/arm/mach-prima2/rtciobrg.c2
-rw-r--r--arch/arm/mach-pxa/corgi_pm.c2
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa27x.h3
-rw-r--r--arch/arm/mach-pxa/pxa27x.c4
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c4
-rw-r--r--arch/arm/mach-pxa/spitz_pm.c2
-rw-r--r--arch/arm/mach-pxa/tosa-bt.c4
-rw-r--r--arch/arm/mach-s3c24xx/h1940-bluetooth.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris-dvs.c6
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410-module.c6
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c68
-rw-r--r--arch/arm/mach-sa1100/jornada720_ssp.c2
-rw-r--r--arch/arm/mach-sa1100/neponset.c8
-rw-r--r--arch/arm/mach-sunxi/sunxi.c4
-rw-r--r--arch/arm/mach-tegra/pcie.c6
-rw-r--r--arch/arm/mach-tegra/tegra2_emc.c6
-rw-r--r--arch/arm/mach-u300/dummyspichip.c6
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c3
-rw-r--r--arch/arm/mach-versatile/include/mach/irqs.h6
-rw-r--r--arch/arm/mach-vexpress/Kconfig1
-rw-r--r--arch/arm/mm/cache-l2x0.c34
-rw-r--r--arch/arm/mm/proc-v7.S4
-rw-r--r--arch/arm/plat-omap/Makefile2
-rw-r--r--arch/arm/plat-omap/counter_32k.c2
-rw-r--r--arch/arm/plat-omap/dma.c6
-rw-r--r--arch/arm/plat-omap/dmtimer.c19
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h4
-rw-r--r--arch/arm/plat-omap/sram.c2
-rw-r--r--arch/arm/plat-pxa/ssp.c6
-rw-r--r--arch/arm/plat-samsung/adc.c4
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h2
-rw-r--r--arch/arm64/Kconfig6
-rw-r--r--arch/arm64/include/asm/compat.h1
-rw-r--r--arch/arm64/kernel/perf_event.c2
-rw-r--r--arch/avr32/lib/delay.c2
-rw-r--r--arch/blackfin/mach-common/dpmc.c6
-rw-r--r--arch/cris/arch-v32/drivers/pci/bios.c2
-rw-r--r--arch/cris/arch-v32/kernel/smp.c2
-rw-r--r--arch/frv/kernel/setup.c2
-rw-r--r--arch/frv/mb93090-mb00/pci-vdk.c6
-rw-r--r--arch/ia64/include/asm/acpi.h2
-rw-r--r--arch/ia64/include/asm/iosapic.h11
-rw-r--r--arch/ia64/include/asm/parport.h5
-rw-r--r--arch/ia64/include/asm/smp.h2
-rw-r--r--arch/ia64/include/asm/unistd.h2
-rw-r--r--arch/ia64/include/uapi/asm/unistd.h1
-rw-r--r--arch/ia64/kernel/acpi.c6
-rw-r--r--arch/ia64/kernel/entry.S1
-rw-r--r--arch/ia64/kernel/iosapic.c19
-rw-r--r--arch/ia64/kernel/smpboot.c11
-rw-r--r--arch/ia64/kernel/time.c3
-rw-r--r--arch/ia64/mm/init.c5
-rw-r--r--arch/ia64/mm/tlb.c3
-rw-r--r--arch/ia64/pci/fixup.c2
-rw-r--r--arch/ia64/pci/pci.c31
-rw-r--r--arch/ia64/sn/kernel/io_common.c3
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c2
-rw-r--r--arch/ia64/xen/irq_xen.c5
-rw-r--r--arch/m32r/kernel/smpboot.c2
-rw-r--r--arch/m68k/emu/nfeth.c2
-rw-r--r--arch/m68k/include/asm/parport.h4
-rw-r--r--arch/m68k/kernel/pcibios.c4
-rw-r--r--arch/microblaze/configs/mmu_defconfig52
-rw-r--r--arch/microblaze/configs/nommu_defconfig73
-rw-r--r--arch/microblaze/include/asm/highmem.h2
-rw-r--r--arch/microblaze/include/asm/uaccess.h2
-rw-r--r--arch/microblaze/include/asm/unistd.h2
-rw-r--r--arch/microblaze/include/uapi/asm/unistd.h3
-rw-r--r--arch/microblaze/kernel/syscall_table.S1
-rw-r--r--arch/microblaze/pci/pci-common.c39
-rw-r--r--arch/mips/Kconfig4
-rw-r--r--arch/mips/alchemy/common/time.c25
-rw-r--r--arch/mips/cavium-octeon/serial.c2
-rw-r--r--arch/mips/include/asm/page.h9
-rw-r--r--arch/mips/include/asm/pci.h4
-rw-r--r--arch/mips/include/asm/thread_info.h9
-rw-r--r--arch/mips/include/uapi/asm/unistd.h15
-rw-r--r--arch/mips/kernel/asm-offsets.c3
-rw-r--r--arch/mips/kernel/genex.S5
-rw-r--r--arch/mips/kernel/head.S1
-rw-r--r--arch/mips/kernel/octeon_switch.S1
-rw-r--r--arch/mips/kernel/perf_event_mipsxx.c38
-rw-r--r--arch/mips/kernel/r2300_switch.S1
-rw-r--r--arch/mips/kernel/r4k_switch.S1
-rw-r--r--arch/mips/kernel/relocate_kernel.S3
-rw-r--r--arch/mips/kernel/scall32-o32.S1
-rw-r--r--arch/mips/kernel/scall64-64.S1
-rw-r--r--arch/mips/kernel/scall64-n32.S1
-rw-r--r--arch/mips/kernel/scall64-o32.S1
-rw-r--r--arch/mips/kernel/smp.c2
-rw-r--r--arch/mips/kernel/vmlinux.lds.S3
-rw-r--r--arch/mips/lantiq/xway/dma.c2
-rw-r--r--arch/mips/lantiq/xway/gptu.c2
-rw-r--r--arch/mips/lantiq/xway/xrx200_phy_fw.c2
-rw-r--r--arch/mips/mm/ioremap.c6
-rw-r--r--arch/mips/mm/tlbex-fault.S1
-rw-r--r--arch/mips/mm/tlbex.c16
-rw-r--r--arch/mips/mti-sead3/sead3-i2c-drv.c6
-rw-r--r--arch/mips/mti-sead3/sead3-pic32-i2c-drv.c8
-rw-r--r--arch/mips/pci/fixup-cobalt.c8
-rw-r--r--arch/mips/pci/fixup-emma2rh.c4
-rw-r--r--arch/mips/pci/fixup-fuloong2e.c12
-rw-r--r--arch/mips/pci/fixup-lemote2f.c12
-rw-r--r--arch/mips/pci/fixup-malta.c10
-rw-r--r--arch/mips/pci/fixup-rc32434.c6
-rw-r--r--arch/mips/pci/fixup-sb1250.c6
-rw-r--r--arch/mips/pci/ops-bcm63xx.c2
-rw-r--r--arch/mips/pci/ops-tx4927.c6
-rw-r--r--arch/mips/pci/pci-alchemy.c2
-rw-r--r--arch/mips/pci/pci-ip27.c4
-rw-r--r--arch/mips/pci/pci-lantiq.c4
-rw-r--r--arch/mips/pci/pci.c9
-rw-r--r--arch/mips/power/hibernate.S3
-rw-r--r--arch/mips/sni/setup.c2
-rw-r--r--arch/mips/txx9/generic/pci.c11
-rw-r--r--arch/mn10300/kernel/smp.c4
-rw-r--r--arch/mn10300/unit-asb2305/pci.c6
-rw-r--r--arch/openrisc/lib/delay.c2
-rw-r--r--arch/parisc/include/asm/parport.h2
-rw-r--r--arch/parisc/kernel/hardware.c7
-rw-r--r--arch/powerpc/include/asm/eeh.h6
-rw-r--r--arch/powerpc/include/asm/io-workarounds.h4
-rw-r--r--arch/powerpc/include/asm/parport.h2
-rw-r--r--arch/powerpc/include/asm/smp.h4
-rw-r--r--arch/powerpc/include/asm/vio.h2
-rw-r--r--arch/powerpc/kernel/io-workarounds.c9
-rw-r--r--arch/powerpc/kernel/isa-bridge.c12
-rw-r--r--arch/powerpc/kernel/of_platform.c2
-rw-r--r--arch/powerpc/kernel/pci-common.c28
-rw-r--r--arch/powerpc/kernel/pci_32.c2
-rw-r--r--arch/powerpc/kernel/pci_64.c6
-rw-r--r--arch/powerpc/kernel/pci_dn.c4
-rw-r--r--arch/powerpc/kernel/pci_of_scan.c12
-rw-r--r--arch/powerpc/kernel/rtas_pci.c4
-rw-r--r--arch/powerpc/kernel/smp-tbsync.c8
-rw-r--r--arch/powerpc/kernel/smp.c8
-rw-r--r--arch/powerpc/kernel/time.c5
-rw-r--r--arch/powerpc/kernel/vio.c4
-rw-r--r--arch/powerpc/mm/tlb_hash64.c4
-rw-r--r--arch/powerpc/platforms/40x/ppc40x_simple.c3
-rw-r--r--arch/powerpc/platforms/44x/currituck.c2
-rw-r--r--arch/powerpc/platforms/44x/virtex_ml510.c2
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpt.c6
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c8
-rw-r--r--arch/powerpc/platforms/82xx/ep8248e.c2
-rw-r--r--arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c9
-rw-r--r--arch/powerpc/platforms/85xx/corenet_ds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c2
-rw-r--r--arch/powerpc/platforms/85xx/tqm85xx.c2
-rw-r--r--arch/powerpc/platforms/86xx/gef_ppc9a.c2
-rw-r--r--arch/powerpc/platforms/86xx/gef_sbc310.c2
-rw-r--r--arch/powerpc/platforms/86xx/gef_sbc610.c2
-rw-r--r--arch/powerpc/platforms/cell/setup.c2
-rw-r--r--arch/powerpc/platforms/cell/smp.c6
-rw-r--r--arch/powerpc/platforms/chrp/pci.c2
-rw-r--r--arch/powerpc/platforms/chrp/smp.c4
-rw-r--r--arch/powerpc/platforms/fsl_uli1575.c20
-rw-r--r--arch/powerpc/platforms/maple/pci.c4
-rw-r--r--arch/powerpc/platforms/pasemi/gpio_mdio.c2
-rw-r--r--arch/powerpc/platforms/pasemi/pasemi.h4
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c4
-rw-r--r--arch/powerpc/platforms/powermac/pci.c6
-rw-r--r--arch/powerpc/platforms/powermac/smp.c8
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c48
-rw-r--r--arch/powerpc/platforms/powernv/pci-p5ioc2.c4
-rw-r--r--arch/powerpc/platforms/powernv/pci.c11
-rw-r--r--arch/powerpc/platforms/powernv/smp.c2
-rw-r--r--arch/powerpc/platforms/ps3/repository.c2
-rw-r--r--arch/powerpc/platforms/pseries/eeh_dev.c4
-rw-r--r--arch/powerpc/platforms/pseries/eeh_pe.c2
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c2
-rw-r--r--arch/powerpc/platforms/pseries/smp.c6
-rw-r--r--arch/powerpc/platforms/wsp/scom_smp.c3
-rw-r--r--arch/powerpc/platforms/wsp/smp.c4
-rw-r--r--arch/powerpc/platforms/wsp/wsp.h2
-rw-r--r--arch/powerpc/platforms/wsp/wsp_pci.c2
-rw-r--r--arch/powerpc/sysdev/bestcomm/bestcomm.c7
-rw-r--r--arch/powerpc/sysdev/fsl_85xx_l2ctlr.c6
-rw-r--r--arch/powerpc/sysdev/fsl_ifc.c4
-rw-r--r--arch/powerpc/sysdev/fsl_lbc.c6
-rw-r--r--arch/powerpc/sysdev/fsl_msi.c7
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c4
-rw-r--r--arch/powerpc/sysdev/fsl_rio.c2
-rw-r--r--arch/powerpc/sysdev/mpic.c2
-rw-r--r--arch/powerpc/sysdev/mpic_msgr.c2
-rw-r--r--arch/powerpc/sysdev/mv64x60_pci.c2
-rw-r--r--arch/powerpc/sysdev/ppc4xx_msi.c2
-rw-r--r--arch/s390/kernel/smp.c7
-rw-r--r--arch/s390/pci/pci.c2
-rw-r--r--arch/score/mm/cache.c2
-rw-r--r--arch/sh/drivers/pci/fixups-dreamcast.c2
-rw-r--r--arch/sh/drivers/pci/pci.c6
-rw-r--r--arch/sh/drivers/pci/pcie-sh7786.c2
-rw-r--r--arch/sparc/include/asm/parport.h6
-rw-r--r--arch/sparc/include/asm/timer_64.h2
-rw-r--r--arch/sparc/kernel/apc.c4
-rw-r--r--arch/sparc/kernel/auxio_64.c2
-rw-r--r--arch/sparc/kernel/central.c6
-rw-r--r--arch/sparc/kernel/chmc.c34
-rw-r--r--arch/sparc/kernel/ds.c5
-rw-r--r--arch/sparc/kernel/ldc.c2
-rw-r--r--arch/sparc/kernel/leon_pci.c2
-rw-r--r--arch/sparc/kernel/leon_pci_grpci2.c2
-rw-r--r--arch/sparc/kernel/pci.c33
-rw-r--r--arch/sparc/kernel/pci_fire.c6
-rw-r--r--arch/sparc/kernel/pci_psycho.c11
-rw-r--r--arch/sparc/kernel/pci_sabre.c8
-rw-r--r--arch/sparc/kernel/pci_schizo.c15
-rw-r--r--arch/sparc/kernel/pci_sun4v.c15
-rw-r--r--arch/sparc/kernel/pcic.c5
-rw-r--r--arch/sparc/kernel/pmc.c2
-rw-r--r--arch/sparc/kernel/power.c4
-rw-r--r--arch/sparc/kernel/smp_64.c4
-rw-r--r--arch/sparc/kernel/time_32.c2
-rw-r--r--arch/sparc/kernel/time_64.c10
-rw-r--r--arch/sparc/mm/init_64.c6
-rw-r--r--arch/tile/include/asm/pci.h2
-rw-r--r--arch/tile/kernel/pci.c23
-rw-r--r--arch/tile/kernel/pci_gx.c33
-rw-r--r--arch/unicore32/kernel/pci.c2
-rw-r--r--arch/x86/include/asm/parport.h4
-rw-r--r--arch/x86/include/asm/pci_x86.h7
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_uncore.c6
-rw-r--r--arch/x86/kernel/pci-dma.c2
-rw-r--r--arch/x86/kernel/quirks.c4
-rw-r--r--arch/x86/lib/delay.c2
-rw-r--r--arch/x86/pci/acpi.c11
-rw-r--r--arch/x86/pci/bus_numa.c4
-rw-r--r--arch/x86/pci/common.c29
-rw-r--r--arch/x86/pci/fixup.c30
-rw-r--r--arch/x86/pci/legacy.c4
-rw-r--r--arch/x86/pci/mmconfig-shared.c21
-rw-r--r--arch/x86/pci/mmconfig_32.c2
-rw-r--r--arch/x86/pci/mmconfig_64.c4
-rw-r--r--arch/x86/pci/mrst.c6
-rw-r--r--arch/x86/pci/numaq_32.c2
-rw-r--r--arch/x86/pci/pcbios.c4
-rw-r--r--arch/x86/platform/mrst/mrst.c2
-rw-r--r--arch/x86/platform/olpc/olpc-xo1-pm.c8
-rw-r--r--arch/x86/platform/olpc/olpc-xo1-sci.c18
-rw-r--r--arch/x86/platform/scx200/scx200_32.c6
-rw-r--r--drivers/acpi/acpi_memhotplug.c18
-rw-r--r--drivers/acpi/acpica/Makefile2
-rw-r--r--drivers/acpi/acpica/utclib.c749
-rw-r--r--drivers/acpi/apei/erst-dbg.c11
-rw-r--r--drivers/acpi/device_pm.c3
-rw-r--r--drivers/acpi/glue.c9
-rw-r--r--drivers/acpi/power.c11
-rw-r--r--drivers/acpi/scan.c2
-rw-r--r--drivers/amba/bus.c4
-rw-r--r--drivers/amba/tegra-ahb.c4
-rw-r--r--drivers/ata/ahci_platform.c2
-rw-r--r--drivers/ata/ata_piix.c17
-rw-r--r--drivers/ata/pata_arasan_cf.c6
-rw-r--r--drivers/ata/pata_at91.c6
-rw-r--r--drivers/ata/pata_bf54x.c6
-rw-r--r--drivers/ata/pata_cs5520.c2
-rw-r--r--drivers/ata/pata_ep93xx.c6
-rw-r--r--drivers/ata/pata_icside.c21
-rw-r--r--drivers/ata/pata_imx.c6
-rw-r--r--drivers/ata/pata_ixp4xx_cf.c2
-rw-r--r--drivers/ata/pata_macio.c33
-rw-r--r--drivers/ata/pata_mpc52xx.c10
-rw-r--r--drivers/ata/pata_octeon_cf.c2
-rw-r--r--drivers/ata/pata_of_platform.c2
-rw-r--r--drivers/ata/pata_palmld.c6
-rw-r--r--drivers/ata/pata_pdc2027x.c3
-rw-r--r--drivers/ata/pata_platform.c11
-rw-r--r--drivers/ata/pata_pxa.c6
-rw-r--r--drivers/ata/pata_rb532_cf.c6
-rw-r--r--drivers/ata/pata_rdc.c3
-rw-r--r--drivers/ata/pata_sch.c3
-rw-r--r--drivers/ata/pata_sil680.c3
-rw-r--r--drivers/ata/sata_highbank.c2
-rw-r--r--drivers/ata/sata_mv.c8
-rw-r--r--drivers/ata/sata_vsc.c7
-rw-r--r--drivers/atm/ambassador.c53
-rw-r--r--drivers/atm/eni.c18
-rw-r--r--drivers/atm/firestream.c32
-rw-r--r--drivers/atm/fore200e.c70
-rw-r--r--drivers/atm/he.c36
-rw-r--r--drivers/atm/horizon.c12
-rw-r--r--drivers/atm/idt77252.c16
-rw-r--r--drivers/atm/iphase.c11
-rw-r--r--drivers/atm/lanai.c28
-rw-r--r--drivers/atm/nicstar.c18
-rw-r--r--drivers/atm/solos-pci.c4
-rw-r--r--drivers/atm/zatm.c31
-rw-r--r--drivers/auxdisplay/cfag12864bfb.c10
-rw-r--r--drivers/base/power/main.c9
-rw-r--r--drivers/base/power/qos.c10
-rw-r--r--drivers/bcma/Kconfig3
-rw-r--r--drivers/bcma/bcma_private.h6
-rw-r--r--drivers/bcma/driver_chipcommon_sflash.c2
-rw-r--r--drivers/bcma/driver_gmac_cmn.c2
-rw-r--r--drivers/bcma/driver_pci.c4
-rw-r--r--drivers/bcma/driver_pci_host.c13
-rw-r--r--drivers/bcma/host_pci.c8
-rw-r--r--drivers/bcma/main.c2
-rw-r--r--drivers/block/cciss.c90
-rw-r--r--drivers/block/cpqarray.c16
-rw-r--r--drivers/block/nvme.c17
-rw-r--r--drivers/block/ps3disk.c2
-rw-r--r--drivers/block/ps3vram.c4
-rw-r--r--drivers/block/sunvdc.c9
-rw-r--r--drivers/block/swim.c11
-rw-r--r--drivers/block/swim3.c3
-rw-r--r--drivers/block/umem.c3
-rw-r--r--drivers/block/virtio_blk.c13
-rw-r--r--drivers/block/xsysace.c19
-rw-r--r--drivers/bus/omap-ocp2scp.c6
-rw-r--r--drivers/bus/omap_l3_noc.c6
-rw-r--r--drivers/cdrom/gdrom.c18
-rw-r--r--drivers/char/agp/ali-agp.c3
-rw-r--r--drivers/char/agp/amd-k7-agp.c4
-rw-r--r--drivers/char/agp/amd64-agp.c15
-rw-r--r--drivers/char/agp/ati-agp.c3
-rw-r--r--drivers/char/agp/efficeon-agp.c4
-rw-r--r--drivers/char/agp/i460-agp.c6
-rw-r--r--drivers/char/agp/intel-agp.c6
-rw-r--r--drivers/char/agp/nvidia-agp.c4
-rw-r--r--drivers/char/agp/sgi-agp.c2
-rw-r--r--drivers/char/agp/sis-agp.c5
-rw-r--r--drivers/char/agp/sworks-agp.c4
-rw-r--r--drivers/char/agp/uninorth-agp.c4
-rw-r--r--drivers/char/agp/via-agp.c3
-rw-r--r--drivers/char/hw_random/atmel-rng.c2
-rw-r--r--drivers/char/hw_random/bcm63xx-rng.c4
-rw-r--r--drivers/char/hw_random/exynos-rng.c4
-rw-r--r--drivers/char/hw_random/n2-drv.c6
-rw-r--r--drivers/char/hw_random/octeon-rng.c2
-rw-r--r--drivers/char/hw_random/omap-rng.c2
-rw-r--r--drivers/char/hw_random/pasemi-rng.c2
-rw-r--r--drivers/char/hw_random/picoxcell-rng.c2
-rw-r--r--drivers/char/hw_random/ppc4xx-rng.c2
-rw-r--r--drivers/char/hw_random/timeriomem-rng.c4
-rw-r--r--drivers/char/hw_random/virtio-rng.c2
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c6
-rw-r--r--drivers/char/virtio_console.c6
-rw-r--r--drivers/clk/clk-twl6040.c6
-rw-r--r--drivers/clk/mvebu/clk-gating-ctrl.c2
-rw-r--r--drivers/clk/ux500/abx500-clk.c2
-rw-r--r--drivers/clocksource/acpi_pm.c6
-rw-r--r--drivers/clocksource/em_sti.c8
-rw-r--r--drivers/clocksource/sh_cmt.c6
-rw-r--r--drivers/clocksource/sh_mtu2.c6
-rw-r--r--drivers/clocksource/sh_tmu.c6
-rw-r--r--drivers/connector/connector.c4
-rw-r--r--drivers/cpufreq/Kconfig5
-rw-r--r--drivers/cpufreq/Makefile5
-rw-r--r--drivers/cpufreq/cpufreq_stats.c11
-rw-r--r--drivers/cpufreq/longhaul.c10
-rw-r--r--drivers/cpuidle/coupled.c2
-rw-r--r--drivers/cpuidle/cpuidle.c2
-rw-r--r--drivers/cpuidle/driver.c8
-rw-r--r--drivers/cpuidle/governors/menu.c2
-rw-r--r--drivers/crypto/atmel-aes.c6
-rw-r--r--drivers/crypto/atmel-sha.c6
-rw-r--r--drivers/crypto/atmel-tdes.c6
-rw-r--r--drivers/crypto/bfin_crc.c6
-rw-r--r--drivers/crypto/caam/ctrl.c2
-rw-r--r--drivers/crypto/geode-aes.c8
-rw-r--r--drivers/crypto/hifn_795x.c6
-rw-r--r--drivers/crypto/mv_cesa.c2
-rw-r--r--drivers/crypto/n2_core.c46
-rw-r--r--drivers/crypto/nx/nx.c7
-rw-r--r--drivers/crypto/omap-sham.c4
-rw-r--r--drivers/crypto/picoxcell_crypto.c6
-rw-r--r--drivers/crypto/tegra-aes.c6
-rw-r--r--drivers/devfreq/exynos4_bus.c6
-rw-r--r--drivers/dma/dw_dmac.c2
-rw-r--r--drivers/dma/edma.c2
-rw-r--r--drivers/dma/intel_mid_dma.c2
-rw-r--r--drivers/dma/ioat/dca.c9
-rw-r--r--drivers/dma/ioat/dma.c12
-rw-r--r--drivers/dma/ioat/dma.h13
-rw-r--r--drivers/dma/ioat/dma_v2.c2
-rw-r--r--drivers/dma/ioat/dma_v2.h8
-rw-r--r--drivers/dma/ioat/dma_v3.c8
-rw-r--r--drivers/dma/ioat/pci.c9
-rw-r--r--drivers/dma/iop-adma.c2
-rw-r--r--drivers/dma/mmp_pdma.c2
-rw-r--r--drivers/dma/mmp_tdma.c2
-rw-r--r--drivers/dma/mpc512x_dma.c2
-rw-r--r--drivers/dma/mv_xor.c9
-rw-r--r--drivers/dma/pch_dma.c2
-rw-r--r--drivers/dma/pl330.c2
-rw-r--r--drivers/dma/ppc4xx/adma.c4
-rw-r--r--drivers/dma/sa11x0-dma.c2
-rw-r--r--drivers/dma/sh/shdma.c2
-rw-r--r--drivers/dma/sirf-dma.c2
-rw-r--r--drivers/dma/tegra20-apb-dma.c6
-rw-r--r--drivers/dma/timb_dma.c2
-rw-r--r--drivers/edac/Kconfig8
-rw-r--r--drivers/edac/amd64_edac.c8
-rw-r--r--drivers/edac/amd76x_edac.c8
-rw-r--r--drivers/edac/cell_edac.c8
-rw-r--r--drivers/edac/cpc925_edac.c2
-rw-r--r--drivers/edac/e752x_edac.c7
-rw-r--r--drivers/edac/e7xxx_edac.c7
-rw-r--r--drivers/edac/edac_mc_sysfs.c19
-rw-r--r--drivers/edac/highbank_l2_edac.c2
-rw-r--r--drivers/edac/highbank_mc_edac.c6
-rw-r--r--drivers/edac/i3000_edac.c7
-rw-r--r--drivers/edac/i3200_edac.c7
-rw-r--r--drivers/edac/i5000_edac.c7
-rw-r--r--drivers/edac/i5100_edac.c24
-rw-r--r--drivers/edac/i5400_edac.c7
-rw-r--r--drivers/edac/i7300_edac.c9
-rw-r--r--drivers/edac/i7core_edac.c7
-rw-r--r--drivers/edac/i82443bxgx_edac.c8
-rw-r--r--drivers/edac/i82860_edac.c8
-rw-r--r--drivers/edac/i82875p_edac.c8
-rw-r--r--drivers/edac/i82975x_edac.c8
-rw-r--r--drivers/edac/mpc85xx_edac.c8
-rw-r--r--drivers/edac/mv64x60_edac.c10
-rw-r--r--drivers/edac/octeon_edac-l2c.c2
-rw-r--r--drivers/edac/octeon_edac-lmc.c2
-rw-r--r--drivers/edac/octeon_edac-pc.c2
-rw-r--r--drivers/edac/octeon_edac-pci.c2
-rw-r--r--drivers/edac/pasemi_edac.c8
-rw-r--r--drivers/edac/ppc4xx_edac.c27
-rw-r--r--drivers/edac/r82600_edac.c8
-rw-r--r--drivers/edac/sb_edac.c7
-rw-r--r--drivers/edac/tile_edac.c8
-rw-r--r--drivers/edac/x38_edac.c7
-rw-r--r--drivers/firmware/dcdbas.c6
-rw-r--r--drivers/gpio/gpio-da9055.c8
-rw-r--r--drivers/gpio/gpio-ts5500.c6
-rw-r--r--drivers/gpio/gpio-viperboard.c6
-rw-r--r--drivers/gpu/drm/ast/ast_drv.c3
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_drv.c4
-rw-r--r--drivers/gpu/drm/drm_mm.c41
-rw-r--r--drivers/gpu/drm/exynos/exynos_ddc.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_buf.c79
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_buf.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_connector.c22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_connector.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_core.c22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c52
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.h23
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_dmabuf.c29
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_dmabuf.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c24
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_encoder.c22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_encoder.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fb.c22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fb.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fbdev.c44
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fbdev.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimc.c130
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimc.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c38
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_g2d.c6
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gem.c22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gem.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gsc.c62
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gsc.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_hdmi.c6
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_hdmi.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_iommu.c22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_iommu.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.c28
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.h26
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_rotator.c34
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_rotator.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_vidi.c36
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_vidi.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c8
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.h22
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmiphy.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_mixer.c45
-rw-r--r--drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c4
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c3
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c3
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h8
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c77
-rw-r--r--drivers/gpu/drm/i915/i915_gem_dmabuf.c7
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c2
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c12
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h4
-rw-r--r--drivers/gpu/drm/i915/intel_display.c23
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c160
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c76
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h1
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_drv.c3
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc5
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h17
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc10
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h147
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc13
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h157
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c11
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h1
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/nve0.c3
-rw-r--r--drivers/gpu/drm/nouveau/core/include/subdev/bios.h1
-rw-r--r--drivers/gpu/drm/nouveau/core/include/subdev/bios/gpio.h8
-rw-r--r--drivers/gpu/drm/nouveau/core/include/subdev/bios/init.h1
-rw-r--r--drivers/gpu/drm/nouveau/core/include/subdev/gpio.h2
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/bios/base.c5
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c128
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/bios/init.c65
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/device/nve0.c28
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/gpio/base.c9
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c9
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/gpio/nvd0.c9
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/mxm/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_pm.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_prime.c1
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c86
-rw-r--r--drivers/gpu/drm/radeon/evergreen_cs.c30
-rw-r--r--drivers/gpu/drm/radeon/evergreend.h14
-rw-r--r--drivers/gpu/drm/radeon/ni.c106
-rw-r--r--drivers/gpu/drm/radeon/nid.h3
-rw-r--r--drivers/gpu/drm/radeon/r600.c99
-rw-r--r--drivers/gpu/drm/radeon/r600_cs.c60
-rw-r--r--drivers/gpu/drm/radeon/radeon.h8
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.h4
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c51
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c10
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c45
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c13
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c7
-rw-r--r--drivers/gpu/drm/radeon/radeon_fence.c49
-rw-r--r--drivers/gpu/drm/radeon/radeon_i2c.c10
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h5
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c15
-rw-r--r--drivers/gpu/drm/radeon/radeon_prime.c1
-rw-r--r--drivers/gpu/drm/radeon/radeon_ring.c24
-rw-r--r--drivers/gpu/drm/radeon/rv770.c74
-rw-r--r--drivers/gpu/drm/radeon/si.c78
-rw-r--r--drivers/gpu/drm/radeon/sid.h18
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_drv.c10
-rw-r--r--drivers/gpu/drm/tegra/dc.c11
-rw-r--r--drivers/gpu/drm/tegra/drm.h18
-rw-r--r--drivers/gpu/drm/tegra/hdmi.c25
-rw-r--r--drivers/gpu/drm/tegra/host1x.c2
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c4
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c12
-rw-r--r--drivers/hsi/clients/hsi_char.c8
-rw-r--r--drivers/hwmon/emc6w201.c2
-rw-r--r--drivers/hwmon/lm73.c16
-rw-r--r--drivers/hwmon/vexpress.c4
-rw-r--r--drivers/i2c/busses/i2c-ali1535.c8
-rw-r--r--drivers/i2c/busses/i2c-ali1563.c10
-rw-r--r--drivers/i2c/busses/i2c-ali15x3.c8
-rw-r--r--drivers/i2c/busses/i2c-amd756.c7
-rw-r--r--drivers/i2c/busses/i2c-amd8111.c7
-rw-r--r--drivers/i2c/busses/i2c-at91.c14
-rw-r--r--drivers/i2c/busses/i2c-au1550.c6
-rw-r--r--drivers/i2c/busses/i2c-cpm.c8
-rw-r--r--drivers/i2c/busses/i2c-designware-pcidrv.c6
-rw-r--r--drivers/i2c/busses/i2c-designware-platdrv.c6
-rw-r--r--drivers/i2c/busses/i2c-eg20t.c6
-rw-r--r--drivers/i2c/busses/i2c-elektor.c8
-rw-r--r--drivers/i2c/busses/i2c-gpio.c8
-rw-r--r--drivers/i2c/busses/i2c-highlander.c6
-rw-r--r--drivers/i2c/busses/i2c-hydra.c6
-rw-r--r--drivers/i2c/busses/i2c-i801.c28
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c8
-rw-r--r--drivers/i2c/busses/i2c-intel-mid.c6
-rw-r--r--drivers/i2c/busses/i2c-isch.c6
-rw-r--r--drivers/i2c/busses/i2c-mpc.c38
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c18
-rw-r--r--drivers/i2c/busses/i2c-mxs.c6
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c12
-rw-r--r--drivers/i2c/busses/i2c-nuc900.c6
-rw-r--r--drivers/i2c/busses/i2c-ocores.c6
-rw-r--r--drivers/i2c/busses/i2c-octeon.c10
-rw-r--r--drivers/i2c/busses/i2c-omap.c6
-rw-r--r--drivers/i2c/busses/i2c-parport-light.c6
-rw-r--r--drivers/i2c/busses/i2c-pasemi.c6
-rw-r--r--drivers/i2c/busses/i2c-pca-isa.c8
-rw-r--r--drivers/i2c/busses/i2c-pca-platform.c6
-rw-r--r--drivers/i2c/busses/i2c-piix4.c32
-rw-r--r--drivers/i2c/busses/i2c-pmcmsp.c6
-rw-r--r--drivers/i2c/busses/i2c-pnx.c6
-rw-r--r--drivers/i2c/busses/i2c-powermac.c16
-rw-r--r--drivers/i2c/busses/i2c-puv3.c6
-rw-r--r--drivers/i2c/busses/i2c-pxa-pci.c6
-rw-r--r--drivers/i2c/busses/i2c-rcar.c6
-rw-r--r--drivers/i2c/busses/i2c-s6000.c8
-rw-r--r--drivers/i2c/busses/i2c-sh7760.c8
-rw-r--r--drivers/i2c/busses/i2c-sh_mobile.c2
-rw-r--r--drivers/i2c/busses/i2c-sirf.c8
-rw-r--r--drivers/i2c/busses/i2c-sis5595.c4
-rw-r--r--drivers/i2c/busses/i2c-sis630.c8
-rw-r--r--drivers/i2c/busses/i2c-sis96x.c6
-rw-r--r--drivers/i2c/busses/i2c-tegra.c8
-rw-r--r--drivers/i2c/busses/i2c-via.c6
-rw-r--r--drivers/i2c/busses/i2c-viapro.c4
-rw-r--r--drivers/i2c/busses/i2c-viperboard.c6
-rw-r--r--drivers/i2c/busses/i2c-xiic.c8
-rw-r--r--drivers/i2c/busses/i2c-xlr.c6
-rw-r--r--drivers/i2c/busses/scx200_acb.c16
-rw-r--r--drivers/i2c/muxes/i2c-mux-gpio.c14
-rw-r--r--drivers/i2c/muxes/i2c-mux-pinctrl.c8
-rw-r--r--drivers/ide/aec62xx.c8
-rw-r--r--drivers/ide/alim15x3.c10
-rw-r--r--drivers/ide/amd74xx.c4
-rw-r--r--drivers/ide/atiixp.c4
-rw-r--r--drivers/ide/cmd64x.c4
-rw-r--r--drivers/ide/cs5520.c4
-rw-r--r--drivers/ide/cs5530.c6
-rw-r--r--drivers/ide/cs5535.c5
-rw-r--r--drivers/ide/cy82c693.c11
-rw-r--r--drivers/ide/delkin_cb.c5
-rw-r--r--drivers/ide/hpt366.c42
-rw-r--r--drivers/ide/icside.c15
-rw-r--r--drivers/ide/ide-pci-generic.c4
-rw-r--r--drivers/ide/ide_platform.c14
-rw-r--r--drivers/ide/it8172.c5
-rw-r--r--drivers/ide/it8213.c4
-rw-r--r--drivers/ide/it821x.c10
-rw-r--r--drivers/ide/jmicron.c4
-rw-r--r--drivers/ide/ns87415.c8
-rw-r--r--drivers/ide/opti621.c4
-rw-r--r--drivers/ide/palm_bk3710.c7
-rw-r--r--drivers/ide/pdc202xx_new.c10
-rw-r--r--drivers/ide/pdc202xx_old.c8
-rw-r--r--drivers/ide/piix.c8
-rw-r--r--drivers/ide/pmac.c16
-rw-r--r--drivers/ide/rapide.c7
-rw-r--r--drivers/ide/rz1000.c6
-rw-r--r--drivers/ide/sc1200.c4
-rw-r--r--drivers/ide/scc_pata.c20
-rw-r--r--drivers/ide/serverworks.c4
-rw-r--r--drivers/ide/sgiioc4.c13
-rw-r--r--drivers/ide/siimage.c13
-rw-r--r--drivers/ide/sis5513.c10
-rw-r--r--drivers/ide/sl82c105.c4
-rw-r--r--drivers/ide/slc90e66.c5
-rw-r--r--drivers/ide/tc86c001.c12
-rw-r--r--drivers/ide/triflex.c5
-rw-r--r--drivers/ide/trm290.c6
-rw-r--r--drivers/ide/via82cxxx.c8
-rw-r--r--drivers/idle/intel_idle.c2
-rw-r--r--drivers/iio/accel/hid-sensor-accel-3d.c4
-rw-r--r--drivers/iio/adc/ad7266.c8
-rw-r--r--drivers/iio/adc/ad7298.c6
-rw-r--r--drivers/iio/adc/ad7476.c6
-rw-r--r--drivers/iio/adc/ad7791.c10
-rw-r--r--drivers/iio/adc/ad7887.c6
-rw-r--r--drivers/iio/adc/at91_adc.c6
-rw-r--r--drivers/iio/adc/lp8788_adc.c6
-rw-r--r--drivers/iio/adc/max1363.c10
-rw-r--r--drivers/iio/adc/ti_am335x_adc.c6
-rw-r--r--drivers/iio/adc/viperboard_adc.c6
-rw-r--r--drivers/iio/amplifiers/ad8366.c6
-rw-r--r--drivers/iio/dac/ad5064.c18
-rw-r--r--drivers/iio/dac/ad5360.c8
-rw-r--r--drivers/iio/dac/ad5380.c22
-rw-r--r--drivers/iio/dac/ad5421.c6
-rw-r--r--drivers/iio/dac/ad5446.c18
-rw-r--r--drivers/iio/dac/ad5449.c6
-rw-r--r--drivers/iio/dac/ad5504.c6
-rw-r--r--drivers/iio/dac/ad5624r_spi.c6
-rw-r--r--drivers/iio/dac/ad5686.c6
-rw-r--r--drivers/iio/dac/ad5755.c16
-rw-r--r--drivers/iio/dac/ad5764.c6
-rw-r--r--drivers/iio/dac/ad5791.c6
-rw-r--r--drivers/iio/dac/max517.c6
-rw-r--r--drivers/iio/dac/mcp4725.c8
-rw-r--r--drivers/iio/frequency/ad9523.c6
-rw-r--r--drivers/iio/frequency/adf4350.c6
-rw-r--r--drivers/iio/gyro/hid-sensor-gyro-3d.c4
-rw-r--r--drivers/iio/light/adjd_s311.c8
-rw-r--r--drivers/iio/light/hid-sensor-als.c4
-rw-r--r--drivers/iio/light/lm3533-als.c19
-rw-r--r--drivers/iio/light/vcnl4000.c8
-rw-r--r--drivers/iio/magnetometer/hid-sensor-magn-3d.c4
-rw-r--r--drivers/infiniband/hw/amso1100/c2.c7
-rw-r--r--drivers/infiniband/hw/amso1100/c2.h8
-rw-r--r--drivers/infiniband/hw/amso1100/c2_pd.c4
-rw-r--r--drivers/infiniband/hw/amso1100/c2_qp.c4
-rw-r--r--drivers/infiniband/hw/amso1100/c2_rnic.c4
-rw-r--r--drivers/infiniband/hw/ehca/ehca_main.c6
-rw-r--r--drivers/infiniband/hw/ipath/ipath_driver.c12
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c9
-rw-r--r--drivers/infiniband/hw/nes/nes.c6
-rw-r--r--drivers/infiniband/hw/qib/qib_init.c12
-rw-r--r--drivers/input/keyboard/gpio_keys.c13
-rw-r--r--drivers/input/keyboard/gpio_keys_polled.c13
-rw-r--r--drivers/input/keyboard/tca8418_keypad.c2
-rw-r--r--drivers/input/mouse/sentelic.c2
-rw-r--r--drivers/iommu/intel-iommu.c4
-rw-r--r--drivers/iommu/omap-iommu.c6
-rw-r--r--drivers/iommu/tegra-gart.c4
-rw-r--r--drivers/iommu/tegra-smmu.c4
-rw-r--r--drivers/isdn/hardware/avm/b1pci.c8
-rw-r--r--drivers/isdn/hardware/avm/c4.c3
-rw-r--r--drivers/isdn/hardware/avm/t1pci.c3
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c9
-rw-r--r--drivers/isdn/hardware/mISDN/avmfritz.c10
-rw-r--r--drivers/isdn/hardware/mISDN/hfcmulti.c6
-rw-r--r--drivers/isdn/hardware/mISDN/hfcpci.c6
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNinfineon.c16
-rw-r--r--drivers/isdn/hardware/mISDN/netjet.c10
-rw-r--r--drivers/isdn/hardware/mISDN/speedfax.c14
-rw-r--r--drivers/isdn/hardware/mISDN/w6692.c6
-rw-r--r--drivers/isdn/hisax/amd7930_fn.c3
-rw-r--r--drivers/isdn/hisax/asuscom.c9
-rw-r--r--drivers/isdn/hisax/avm_a1.c3
-rw-r--r--drivers/isdn/hisax/avm_a1p.c2
-rw-r--r--drivers/isdn/hisax/avm_pci.c17
-rw-r--r--drivers/isdn/hisax/avma1_cs.c12
-rw-r--r--drivers/isdn/hisax/bkm_a4t.c16
-rw-r--r--drivers/isdn/hisax/bkm_a8.c18
-rw-r--r--drivers/isdn/hisax/config.c26
-rw-r--r--drivers/isdn/hisax/diva.c31
-rw-r--r--drivers/isdn/hisax/elsa.c31
-rw-r--r--drivers/isdn/hisax/elsa_cs.c12
-rw-r--r--drivers/isdn/hisax/enternow_pci.c14
-rw-r--r--drivers/isdn/hisax/gazel.c11
-rw-r--r--drivers/isdn/hisax/hfc4s8s_l1.c16
-rw-r--r--drivers/isdn/hisax/hfc_pci.c4
-rw-r--r--drivers/isdn/hisax/hfc_sx.c9
-rw-r--r--drivers/isdn/hisax/hfcscard.c9
-rw-r--r--drivers/isdn/hisax/hisax_fcpcipnp.c22
-rw-r--r--drivers/isdn/hisax/icc.c3
-rw-r--r--drivers/isdn/hisax/isac.c7
-rw-r--r--drivers/isdn/hisax/isurf.c5
-rw-r--r--drivers/isdn/hisax/ix1_micro.c9
-rw-r--r--drivers/isdn/hisax/mic.c3
-rw-r--r--drivers/isdn/hisax/niccy.c6
-rw-r--r--drivers/isdn/hisax/nj_s.c14
-rw-r--r--drivers/isdn/hisax/nj_u.c14
-rw-r--r--drivers/isdn/hisax/s0box.c3
-rw-r--r--drivers/isdn/hisax/saphir.c3
-rw-r--r--drivers/isdn/hisax/sedlbauer.c23
-rw-r--r--drivers/isdn/hisax/sedlbauer_cs.c12
-rw-r--r--drivers/isdn/hisax/sportster.c6
-rw-r--r--drivers/isdn/hisax/teleint.c3
-rw-r--r--drivers/isdn/hisax/teles0.c3
-rw-r--r--drivers/isdn/hisax/teles3.c9
-rw-r--r--drivers/isdn/hisax/teles_cs.c12
-rw-r--r--drivers/isdn/hisax/telespci.c5
-rw-r--r--drivers/isdn/hisax/w6692.c5
-rw-r--r--drivers/isdn/hysdn/hysdn_init.c8
-rw-r--r--drivers/isdn/mISDN/core.c4
-rw-r--r--drivers/leds/leds-gpio.c5
-rw-r--r--drivers/macintosh/macio_asic.c6
-rw-r--r--drivers/macintosh/mediabay.c3
-rw-r--r--drivers/macintosh/rack-meter.c12
-rw-r--r--drivers/macintosh/windfarm_ad7417_sensor.c18
-rw-r--r--drivers/macintosh/windfarm_fcu_controls.c21
-rw-r--r--drivers/macintosh/windfarm_pm112.c4
-rw-r--r--drivers/macintosh/windfarm_pm121.c4
-rw-r--r--drivers/macintosh/windfarm_pm72.c2
-rw-r--r--drivers/macintosh/windfarm_pm81.c4
-rw-r--r--drivers/macintosh/windfarm_pm91.c4
-rw-r--r--drivers/macintosh/windfarm_rm31.c2
-rw-r--r--drivers/media/i2c/adv7180.c8
-rw-r--r--drivers/media/i2c/adv7183.c2
-rw-r--r--drivers/media/i2c/as3645a.c10
-rw-r--r--drivers/media/i2c/m5mols/m5mols_core.c8
-rw-r--r--drivers/media/i2c/vs6624.c6
-rw-r--r--drivers/media/mmc/siano/smssdio.c4
-rw-r--r--drivers/media/pci/bt8xx/bt878.c11
-rw-r--r--drivers/media/pci/bt8xx/bttv-cards.c34
-rw-r--r--drivers/media/pci/bt8xx/bttv-driver.c9
-rw-r--r--drivers/media/pci/bt8xx/bttv-i2c.c6
-rw-r--r--drivers/media/pci/bt8xx/bttv-input.c4
-rw-r--r--drivers/media/pci/bt8xx/dvb-bt8xx.c7
-rw-r--r--drivers/media/pci/cx18/cx18-driver.c14
-rw-r--r--drivers/media/pci/cx23885/cx23885-core.c8
-rw-r--r--drivers/media/pci/cx25821/cx25821-core.c8
-rw-r--r--drivers/media/pci/cx88/cx88-alsa.c19
-rw-r--r--drivers/media/pci/cx88/cx88-mpeg.c8
-rw-r--r--drivers/media/pci/cx88/cx88-video.c8
-rw-r--r--drivers/media/pci/ddbridge/ddbridge-core.c9
-rw-r--r--drivers/media/pci/dm1105/dm1105.c20
-rw-r--r--drivers/media/pci/ivtv/ivtv-driver.c9
-rw-r--r--drivers/media/pci/mantis/hopper_cards.c9
-rw-r--r--drivers/media/pci/mantis/mantis_cards.c9
-rw-r--r--drivers/media/pci/mantis/mantis_dvb.c4
-rw-r--r--drivers/media/pci/mantis/mantis_i2c.c2
-rw-r--r--drivers/media/pci/mantis/mantis_pci.c2
-rw-r--r--drivers/media/pci/meye/meye.c7
-rw-r--r--drivers/media/pci/ngene/ngene-cards.c4
-rw-r--r--drivers/media/pci/ngene/ngene-core.c5
-rw-r--r--drivers/media/pci/ngene/ngene.h5
-rw-r--r--drivers/media/pci/pluto2/pluto2.c25
-rw-r--r--drivers/media/pci/pt1/pt1.c7
-rw-r--r--drivers/media/pci/saa7134/saa7134-core.c10
-rw-r--r--drivers/media/pci/saa7134/saa7134.h2
-rw-r--r--drivers/media/pci/saa7164/saa7164-core.c8
-rw-r--r--drivers/media/pci/sta2x11/sta2x11_vip.c8
-rw-r--r--drivers/media/pci/ttpci/av7110.c8
-rw-r--r--drivers/media/pci/ttpci/av7110_ir.c4
-rw-r--r--drivers/media/pci/zoran/zoran_card.c20
-rw-r--r--drivers/media/pci/zoran/zoran_driver.c2
-rw-r--r--drivers/media/platform/blackfin/bfin_capture.c6
-rw-r--r--drivers/media/platform/coda.c4
-rw-r--r--drivers/media/platform/davinci/dm355_ccdc.c4
-rw-r--r--drivers/media/platform/davinci/dm644x_ccdc.c4
-rw-r--r--drivers/media/platform/davinci/isif.c4
-rw-r--r--drivers/media/platform/davinci/vpbe.c2
-rw-r--r--drivers/media/platform/davinci/vpbe_display.c15
-rw-r--r--drivers/media/platform/davinci/vpfe_capture.c6
-rw-r--r--drivers/media/platform/davinci/vpif.c6
-rw-r--r--drivers/media/platform/davinci/vpss.c6
-rw-r--r--drivers/media/platform/exynos-gsc/gsc-core.c4
-rw-r--r--drivers/media/platform/fsl-viu.c6
-rw-r--r--drivers/media/platform/omap24xxcam.c2
-rw-r--r--drivers/media/platform/omap3isp/isp.c8
-rw-r--r--drivers/media/platform/s3c-camif/camif-core.c4
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-core.c4
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-lite.c6
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-mdevice.c4
-rw-r--r--drivers/media/platform/s5p-fimc/mipi-csis.c6
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc.c4
-rw-r--r--drivers/media/platform/s5p-tv/hdmi_drv.c6
-rw-r--r--drivers/media/platform/s5p-tv/hdmiphy_drv.c8
-rw-r--r--drivers/media/platform/s5p-tv/mixer.h2
-rw-r--r--drivers/media/platform/s5p-tv/mixer_drv.c18
-rw-r--r--drivers/media/platform/s5p-tv/mixer_video.c4
-rw-r--r--drivers/media/platform/s5p-tv/sdo_drv.c6
-rw-r--r--drivers/media/platform/s5p-tv/sii9234_drv.c8
-rw-r--r--drivers/media/platform/sh_vou.c6
-rw-r--r--drivers/media/platform/soc_camera/atmel-isi.c6
-rw-r--r--drivers/media/platform/soc_camera/mx2_camera.c8
-rw-r--r--drivers/media/platform/soc_camera/mx3_camera.c6
-rw-r--r--drivers/media/platform/soc_camera/pxa_camera.c6
-rw-r--r--drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c6
-rw-r--r--drivers/media/platform/soc_camera/sh_mobile_csi2.c6
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c6
-rw-r--r--drivers/media/platform/timblogiw.c12
-rw-r--r--drivers/media/platform/via-camera.c6
-rw-r--r--drivers/media/radio/radio-maxiradio.c7
-rw-r--r--drivers/media/radio/radio-sf16fmi.c2
-rw-r--r--drivers/media/radio/radio-sf16fmr2.c19
-rw-r--r--drivers/media/radio/radio-tea5764.c8
-rw-r--r--drivers/media/radio/radio-timb.c6
-rw-r--r--drivers/media/radio/radio-wl1273.c4
-rw-r--r--drivers/media/radio/saa7706h.c8
-rw-r--r--drivers/media/radio/si470x/radio-si470x-i2c.c8
-rw-r--r--drivers/media/radio/tef6862.c8
-rw-r--r--drivers/media/rc/ene_ir.c2
-rw-r--r--drivers/media/rc/fintek-cir.c4
-rw-r--r--drivers/media/rc/gpio-ir-recv.c6
-rw-r--r--drivers/media/rc/iguanair.c8
-rw-r--r--drivers/media/rc/imon.c8
-rw-r--r--drivers/media/rc/ir-rx51.c2
-rw-r--r--drivers/media/rc/ite-cir.c4
-rw-r--r--drivers/media/rc/mceusb.c8
-rw-r--r--drivers/media/rc/nuvoton-cir.c4
-rw-r--r--drivers/media/rc/redrat3.c8
-rw-r--r--drivers/media/rc/streamzap.c4
-rw-r--r--drivers/media/rc/ttusbir.c8
-rw-r--r--drivers/media/rc/winbond-cir.c6
-rw-r--r--drivers/media/usb/gspca/spca506.c3
-rw-r--r--drivers/media/usb/siano/smsusb.c2
-rw-r--r--drivers/media/usb/usbvision/usbvision-video.c10
-rw-r--r--drivers/media/usb/uvc/uvc_ctrl.c19
-rw-r--r--drivers/media/usb/uvc/uvc_v4l2.c12
-rw-r--r--drivers/memory/tegra20-mc.c4
-rw-r--r--drivers/memory/tegra30-mc.c4
-rw-r--r--drivers/message/fusion/mptfc.c7
-rw-r--r--drivers/message/fusion/mptsas.c4
-rw-r--r--drivers/message/fusion/mptspi.c2
-rw-r--r--drivers/message/i2o/pci.c11
-rw-r--r--drivers/mfd/max8997.c2
-rw-r--r--drivers/mfd/retu-mfd.c5
-rw-r--r--drivers/mfd/rtsx_pcr.c8
-rw-r--r--drivers/mfd/sta2x11-mfd.c8
-rw-r--r--drivers/mfd/stmpe.c15
-rw-r--r--drivers/mfd/ti_am335x_tscadc.c6
-rw-r--r--drivers/mfd/tps80031.c11
-rw-r--r--drivers/mfd/twl6040.c8
-rw-r--r--drivers/mfd/vexpress-sysreg.c2
-rw-r--r--drivers/mmc/host/dw_mmc-pci.c2
-rw-r--r--drivers/mmc/host/dw_mmc-pltfm.c2
-rw-r--r--drivers/mmc/host/sdhci-acpi.c6
-rw-r--r--drivers/mmc/host/wmt-sdmmc.c4
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c10
-rw-r--r--drivers/mtd/devices/spear_smi.c4
-rw-r--r--drivers/mtd/maps/esb2rom.c2
-rw-r--r--drivers/mtd/maps/intel_vr_nor.c3
-rw-r--r--drivers/mtd/maps/pci.c6
-rw-r--r--drivers/mtd/maps/physmap_of.c2
-rw-r--r--drivers/mtd/maps/pismo.c15
-rw-r--r--drivers/mtd/maps/scb2_flash.c10
-rw-r--r--drivers/mtd/nand/atmel_nand.c6
-rw-r--r--drivers/mtd/nand/bcm47xxnflash/main.c4
-rw-r--r--drivers/mtd/nand/fsl_upm.c4
-rw-r--r--drivers/mtd/nand/fsmc_nand.c4
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-nand.c7
-rw-r--r--drivers/mtd/nand/jz4740_nand.c3
-rw-r--r--drivers/net/ethernet/marvell/mvmdio.c6
-rw-r--r--drivers/net/ethernet/marvell/mvneta.c19
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c35
-rw-r--r--drivers/net/ethernet/ti/cpts.c3
-rw-r--r--drivers/net/ethernet/ti/cpts.h1
-rw-r--r--drivers/net/tun.c24
-rw-r--r--drivers/net/usb/qmi_wwan.c1
-rw-r--r--drivers/net/vxlan.c7
-rw-r--r--drivers/net/wireless/ath/ath9k/Kconfig5
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_hw.c2
-rw-r--r--drivers/net/wireless/ath/carl9170/fw.c6
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c5
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/debug.h1
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c4
-rw-r--r--drivers/net/wireless/p54/p54usb.c4
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c6
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192ce/trx.c11
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/trx.c10
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192se/trx.c13
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/sw.c2
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/trx.c10
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c8
-rw-r--r--drivers/net/xen-netfront.c27
-rw-r--r--drivers/nfc/pn544/i2c.c8
-rw-r--r--drivers/parisc/dino.c2
-rw-r--r--drivers/parisc/lba_pci.c2
-rw-r--r--drivers/parport/parport_gsc.c23
-rw-r--r--drivers/parport/parport_pc.c55
-rw-r--r--drivers/parport/parport_serial.c21
-rw-r--r--drivers/parport/parport_sunbpp.c6
-rw-r--r--drivers/pci/pci-sysfs.c85
-rw-r--r--drivers/pci/pcie/portdrv_pci.c20
-rw-r--r--drivers/pci/quirks.c7
-rw-r--r--drivers/pinctrl/core.c2
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-370.c8
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-xp.c8
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-dove.c15
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-kirkwood.c8
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-mvebu.c11
-rw-r--r--drivers/pinctrl/pinctrl-at91.c39
-rw-r--r--drivers/pinctrl/pinctrl-bcm2835.c2
-rw-r--r--drivers/pinctrl/pinctrl-exynos5440.c2
-rw-r--r--drivers/pinctrl/pinctrl-imx.c19
-rw-r--r--drivers/pinctrl/pinctrl-imx23.c2
-rw-r--r--drivers/pinctrl/pinctrl-imx28.c2
-rw-r--r--drivers/pinctrl/pinctrl-imx35.c2
-rw-r--r--drivers/pinctrl/pinctrl-imx51.c2
-rw-r--r--drivers/pinctrl/pinctrl-imx53.c4
-rw-r--r--drivers/pinctrl/pinctrl-imx6q.c2
-rw-r--r--drivers/pinctrl/pinctrl-mmp2.c2
-rw-r--r--drivers/pinctrl/pinctrl-mxs.c14
-rw-r--r--drivers/pinctrl/pinctrl-nomadik-db8500.c3
-rw-r--r--drivers/pinctrl/pinctrl-nomadik-db8540.c3
-rw-r--r--drivers/pinctrl/pinctrl-nomadik-stn8815.c3
-rw-r--r--drivers/pinctrl/pinctrl-nomadik.c15
-rw-r--r--drivers/pinctrl/pinctrl-pxa168.c2
-rw-r--r--drivers/pinctrl/pinctrl-pxa910.c2
-rw-r--r--drivers/pinctrl/pinctrl-samsung.c26
-rw-r--r--drivers/pinctrl/pinctrl-single.c9
-rw-r--r--drivers/pinctrl/pinctrl-sirf.c52
-rw-r--r--drivers/pinctrl/pinctrl-tegra.c2
-rw-r--r--drivers/pinctrl/pinctrl-tegra20.c2
-rw-r--r--drivers/pinctrl/pinctrl-tegra30.c2
-rw-r--r--drivers/pinctrl/pinctrl-u300.c2
-rw-r--r--drivers/pinctrl/pinctrl-xway.c2
-rw-r--r--drivers/pinctrl/spear/pinctrl-plgpio.c5
-rw-r--r--drivers/pinctrl/spear/pinctrl-spear.c11
-rw-r--r--drivers/pinctrl/spear/pinctrl-spear.h11
-rw-r--r--drivers/pinctrl/spear/pinctrl-spear1310.c2
-rw-r--r--drivers/pinctrl/spear/pinctrl-spear1340.c2
-rw-r--r--drivers/pinctrl/spear/pinctrl-spear300.c2
-rw-r--r--drivers/pinctrl/spear/pinctrl-spear310.c2
-rw-r--r--drivers/pinctrl/spear/pinctrl-spear320.c2
-rw-r--r--drivers/platform/x86/acer-wmi.c8
-rw-r--r--drivers/platform/x86/acerhdf.c2
-rw-r--r--drivers/platform/x86/amilo-rfkill.c4
-rw-r--r--drivers/platform/x86/apple-gmux.c7
-rw-r--r--drivers/platform/x86/asus-laptop.c6
-rw-r--r--drivers/platform/x86/compal-laptop.c10
-rw-r--r--drivers/platform/x86/dell-laptop.c4
-rw-r--r--drivers/platform/x86/eeepc-laptop.c6
-rw-r--r--drivers/platform/x86/fujitsu-tablet.c17
-rw-r--r--drivers/platform/x86/hp-wmi.c8
-rw-r--r--drivers/platform/x86/ideapad-laptop.c13
-rw-r--r--drivers/platform/x86/intel_mid_powerbtn.c6
-rw-r--r--drivers/platform/x86/intel_mid_thermal.c2
-rw-r--r--drivers/platform/x86/intel_oaktrail.c6
-rw-r--r--drivers/platform/x86/intel_pmic_gpio.c2
-rw-r--r--drivers/platform/x86/samsung-q10.c6
-rw-r--r--drivers/platform/x86/tc1100-wmi.c4
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c4
-rw-r--r--drivers/platform/x86/toshiba_acpi.c13
-rw-r--r--drivers/platform/x86/xo1-rfkill.c6
-rw-r--r--drivers/pnp/interface.c105
-rw-r--r--drivers/pnp/manager.c25
-rw-r--r--drivers/power/ab8500_bmdata.c6
-rw-r--r--drivers/power/avs/smartreflex.c2
-rw-r--r--drivers/power/olpc_battery.c2
-rw-r--r--drivers/power/reset/gpio-poweroff.c39
-rw-r--r--drivers/power/rx51_battery.c6
-rw-r--r--drivers/pps/clients/pps-gpio.c2
-rw-r--r--drivers/ps3/ps3-lpm.c2
-rw-r--r--drivers/ps3/ps3-sys-manager.c2
-rw-r--r--drivers/ps3/ps3av.c2
-rw-r--r--drivers/regulator/anatop-regulator.c2
-rw-r--r--drivers/regulator/da9055-regulator.c12
-rw-r--r--drivers/regulator/fixed.c2
-rw-r--r--drivers/regulator/gpio-regulator.c2
-rw-r--r--drivers/regulator/max8973-regulator.c12
-rw-r--r--drivers/regulator/palmas-regulator.c2
-rw-r--r--drivers/regulator/twl-regulator.c2
-rw-r--r--drivers/remoteproc/omap_remoteproc.c6
-rw-r--r--drivers/rpmsg/virtio_rpmsg_bus.c4
-rw-r--r--drivers/rtc/Kconfig8
-rw-r--r--drivers/rtc/Makefile1
-rw-r--r--drivers/rtc/rtc-88pm80x.c6
-rw-r--r--drivers/rtc/rtc-88pm860x.c10
-rw-r--r--drivers/rtc/rtc-ab8500.c6
-rw-r--r--drivers/rtc/rtc-at91sam9.c6
-rw-r--r--drivers/rtc/rtc-au1xxx.c6
-rw-r--r--drivers/rtc/rtc-bfin.c6
-rw-r--r--drivers/rtc/rtc-bq32k.c4
-rw-r--r--drivers/rtc/rtc-bq4802.c6
-rw-r--r--drivers/rtc/rtc-cmos.c9
-rw-r--r--drivers/rtc/rtc-da9052.c6
-rw-r--r--drivers/rtc/rtc-davinci.c4
-rw-r--r--drivers/rtc/rtc-dm355evm.c6
-rw-r--r--drivers/rtc/rtc-ds1286.c6
-rw-r--r--drivers/rtc/rtc-ds1302.c4
-rw-r--r--drivers/rtc/rtc-ds1305.c6
-rw-r--r--drivers/rtc/rtc-ds1307.c8
-rw-r--r--drivers/rtc/rtc-ds1374.c4
-rw-r--r--drivers/rtc/rtc-ds1390.c6
-rw-r--r--drivers/rtc/rtc-ds1511.c8
-rw-r--r--drivers/rtc/rtc-ds1553.c6
-rw-r--r--drivers/rtc/rtc-ds1742.c6
-rw-r--r--drivers/rtc/rtc-ds3232.c8
-rw-r--r--drivers/rtc/rtc-ds3234.c6
-rw-r--r--drivers/rtc/rtc-ep93xx.c6
-rw-r--r--drivers/rtc/rtc-fm3130.c8
-rw-r--r--drivers/rtc/rtc-imxdi.c4
-rw-r--r--drivers/rtc/rtc-jz4740.c6
-rw-r--r--drivers/rtc/rtc-lpc32xx.c6
-rw-r--r--drivers/rtc/rtc-ls1x.c6
-rw-r--r--drivers/rtc/rtc-m41t93.c6
-rw-r--r--drivers/rtc/rtc-m41t94.c6
-rw-r--r--drivers/rtc/rtc-m48t35.c6
-rw-r--r--drivers/rtc/rtc-m48t59.c6
-rw-r--r--drivers/rtc/rtc-m48t86.c6
-rw-r--r--drivers/rtc/rtc-max6902.c6
-rw-r--r--drivers/rtc/rtc-max8907.c6
-rw-r--r--drivers/rtc/rtc-max8925.c6
-rw-r--r--drivers/rtc/rtc-max8998.c6
-rw-r--r--drivers/rtc/rtc-mpc5121.c8
-rw-r--r--drivers/rtc/rtc-mrst.c12
-rw-r--r--drivers/rtc/rtc-mv.c2
-rw-r--r--drivers/rtc/rtc-mxc.c6
-rw-r--r--drivers/rtc/rtc-nuc900.c6
-rw-r--r--drivers/rtc/rtc-pcap.c6
-rw-r--r--drivers/rtc/rtc-pcf2123.c6
-rw-r--r--drivers/rtc/rtc-pcf50633.c6
-rw-r--r--drivers/rtc/rtc-pcf8563.c2
-rw-r--r--drivers/rtc/rtc-pcf8583.c4
-rw-r--r--drivers/rtc/rtc-pm8xxx.c6
-rw-r--r--drivers/rtc/rtc-puv3.c6
-rw-r--r--drivers/rtc/rtc-r9701.c6
-rw-r--r--drivers/rtc/rtc-rc5t583.c6
-rw-r--r--drivers/rtc/rtc-rs5c313.c4
-rw-r--r--drivers/rtc/rtc-rs5c348.c6
-rw-r--r--drivers/rtc/rtc-rv3029c2.c8
-rw-r--r--drivers/rtc/rtc-rx8025.c8
-rw-r--r--drivers/rtc/rtc-rx8581.c8
-rw-r--r--drivers/rtc/rtc-s3c.c6
-rw-r--r--drivers/rtc/rtc-snvs.c8
-rw-r--r--drivers/rtc/rtc-spear.c6
-rw-r--r--drivers/rtc/rtc-stk17ta8.c6
-rw-r--r--drivers/rtc/rtc-tegra.c13
-rw-r--r--drivers/rtc/rtc-test.c4
-rw-r--r--drivers/rtc/rtc-tile.c6
-rw-r--r--drivers/rtc/rtc-tps6586x.c356
-rw-r--r--drivers/rtc/rtc-tps65910.c6
-rw-r--r--drivers/rtc/rtc-twl.c6
-rw-r--r--drivers/rtc/rtc-vr41xx.c6
-rw-r--r--drivers/rtc/rtc-vt8500.c17
-rw-r--r--drivers/rtc/rtc-wm831x.c4
-rw-r--r--drivers/rtc/rtc-wm8350.c4
-rw-r--r--drivers/sbus/char/bbc_i2c.c6
-rw-r--r--drivers/sbus/char/display7seg.c6
-rw-r--r--drivers/sbus/char/envctrl.c6
-rw-r--r--drivers/sbus/char/flash.c6
-rw-r--r--drivers/sbus/char/uctrl.c6
-rw-r--r--drivers/scsi/3w-9xxx.c4
-rw-r--r--drivers/scsi/3w-sas.c4
-rw-r--r--drivers/scsi/3w-xxxx.c4
-rw-r--r--drivers/scsi/BusLogic.c2
-rw-r--r--drivers/scsi/NCR5380.c2
-rw-r--r--drivers/scsi/NCR_D700.c12
-rw-r--r--drivers/scsi/NCR_Q720.c2
-rw-r--r--drivers/scsi/a100u2w.c8
-rw-r--r--drivers/scsi/a2091.c9
-rw-r--r--drivers/scsi/aacraid/linit.c15
-rw-r--r--drivers/scsi/advansys.c152
-rw-r--r--drivers/scsi/aha152x.c2
-rw-r--r--drivers/scsi/aha1740.c4
-rw-r--r--drivers/scsi/aic94xx/aic94xx_init.c23
-rw-r--r--drivers/scsi/arm/acornscsi.c7
-rw-r--r--drivers/scsi/arm/arxescsi.c7
-rw-r--r--drivers/scsi/arm/cumana_1.c8
-rw-r--r--drivers/scsi/arm/cumana_2.c8
-rw-r--r--drivers/scsi/arm/eesox.c7
-rw-r--r--drivers/scsi/arm/oak.c7
-rw-r--r--drivers/scsi/arm/powertec.c8
-rw-r--r--drivers/scsi/atp870u.c2
-rw-r--r--drivers/scsi/be2iscsi/be_main.c4
-rw-r--r--drivers/scsi/bfa/bfad.c2
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c2
-rw-r--r--drivers/scsi/bnx2i/bnx2i_init.c2
-rw-r--r--drivers/scsi/bvme6000_scsi.c6
-rw-r--r--drivers/scsi/csiostor/csio_init.c17
-rw-r--r--drivers/scsi/dc395x.c51
-rw-r--r--drivers/scsi/dmx3191d.c8
-rw-r--r--drivers/scsi/fdomain.c2
-rw-r--r--drivers/scsi/fnic/fnic_main.c7
-rw-r--r--drivers/scsi/g_NCR5380.c2
-rw-r--r--drivers/scsi/gdth.c17
-rw-r--r--drivers/scsi/gvp11.c11
-rw-r--r--drivers/scsi/hpsa.c92
-rw-r--r--drivers/scsi/hptiop.c3
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c2
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c2
-rw-r--r--drivers/scsi/ibmvscsi/ibmvstgt.c2
-rw-r--r--drivers/scsi/initio.c2
-rw-r--r--drivers/scsi/ipr.c32
-rw-r--r--drivers/scsi/ips.c10
-rw-r--r--drivers/scsi/isci/init.c8
-rw-r--r--drivers/scsi/jazz_esp.c6
-rw-r--r--drivers/scsi/lasi700.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c14
-rw-r--r--drivers/scsi/mac_esp.c6
-rw-r--r--drivers/scsi/megaraid.c6
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c6
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c8
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c4
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_scsih.c5
-rw-r--r--drivers/scsi/mvme16x_scsi.c8
-rw-r--r--drivers/scsi/mvsas/mv_64xx.c8
-rw-r--r--drivers/scsi/mvsas/mv_94xx.c7
-rw-r--r--drivers/scsi/mvsas/mv_chips.h2
-rw-r--r--drivers/scsi/mvsas/mv_init.c19
-rw-r--r--drivers/scsi/mvsas/mv_sas.c4
-rw-r--r--drivers/scsi/mvsas/mv_sas.h4
-rw-r--r--drivers/scsi/mvumi.c5
-rw-r--r--drivers/scsi/nsp32.c16
-rw-r--r--drivers/scsi/pm8001/pm8001_hwi.c36
-rw-r--r--drivers/scsi/pm8001/pm8001_init.c28
-rw-r--r--drivers/scsi/pmcraid.c31
-rw-r--r--drivers/scsi/ps3rom.c2
-rw-r--r--drivers/scsi/qla1280.c8
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c6
-rw-r--r--drivers/scsi/qlogicfas.c2
-rw-r--r--drivers/scsi/qlogicpti.c20
-rw-r--r--drivers/scsi/sgiwd93.c4
-rw-r--r--drivers/scsi/sim710.c11
-rw-r--r--drivers/scsi/sni_53c710.c4
-rw-r--r--drivers/scsi/stex.c5
-rw-r--r--drivers/scsi/sun3x_esp.c6
-rw-r--r--drivers/scsi/sun_esp.c30
-rw-r--r--drivers/scsi/sym53c416.c2
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c23
-rw-r--r--drivers/scsi/tmscsim.c23
-rw-r--r--drivers/scsi/ufs/ufshcd.c5
-rw-r--r--drivers/scsi/virtio_scsi.c6
-rw-r--r--drivers/scsi/vmw_pvscsi.c9
-rw-r--r--drivers/scsi/zalon.c2
-rw-r--r--drivers/scsi/zorro7xx.c12
-rw-r--r--drivers/sh/pfc/gpio.c6
-rw-r--r--drivers/sh/pfc/pinctrl.c20
-rw-r--r--drivers/sn/ioc3.c14
-rw-r--r--drivers/ssb/Kconfig3
-rw-r--r--drivers/ssb/driver_gige.c14
-rw-r--r--drivers/ssb/driver_pcicore.c10
-rw-r--r--drivers/ssb/main.c27
-rw-r--r--drivers/ssb/pcihost_wrapper.c6
-rw-r--r--drivers/staging/omapdrm/omap_gem_dmabuf.c5
-rw-r--r--drivers/thermal/exynos_thermal.c6
-rw-r--r--drivers/usb/host/ehci-orion.c2
-rw-r--r--drivers/video/acornfb.c22
-rw-r--r--drivers/video/arcfb.c10
-rw-r--r--drivers/video/arkfb.c10
-rw-r--r--drivers/video/asiliantfb.c18
-rw-r--r--drivers/video/aty/aty128fb.c57
-rw-r--r--drivers/video/aty/atyfb_base.c84
-rw-r--r--drivers/video/aty/mach64_ct.c6
-rw-r--r--drivers/video/aty/mach64_cursor.c2
-rw-r--r--drivers/video/aty/radeon_base.c20
-rw-r--r--drivers/video/aty/radeon_monitor.c24
-rw-r--r--drivers/video/au1100fb.c6
-rw-r--r--drivers/video/au1200fb.c6
-rw-r--r--drivers/video/auo_k1900fb.c6
-rw-r--r--drivers/video/auo_k1901fb.c6
-rw-r--r--drivers/video/auo_k190x.c6
-rw-r--r--drivers/video/bf537-lq035.c18
-rw-r--r--drivers/video/bf54x-lq043fb.c6
-rw-r--r--drivers/video/bfin-lq035q1-fb.c14
-rw-r--r--drivers/video/bfin-t350mcqb-fb.c6
-rw-r--r--drivers/video/bfin_adv7393fb.c10
-rw-r--r--drivers/video/broadsheetfb.c16
-rw-r--r--drivers/video/bw2.c23
-rw-r--r--drivers/video/carminefb.c16
-rw-r--r--drivers/video/cg14.c12
-rw-r--r--drivers/video/cg3.c26
-rw-r--r--drivers/video/cg6.c12
-rw-r--r--drivers/video/chipsfb.c13
-rw-r--r--drivers/video/cirrusfb.c44
-rw-r--r--drivers/video/clps711xfb.c8
-rw-r--r--drivers/video/cobalt_lcdfb.c8
-rw-r--r--drivers/video/console/sticore.c83
-rw-r--r--drivers/video/cyber2000fb.c23
-rw-r--r--drivers/video/da8xx-fb.c10
-rw-r--r--drivers/video/dnfb.c6
-rw-r--r--drivers/video/efifb.c4
-rw-r--r--drivers/video/ep93xx-fb.c8
-rw-r--r--drivers/video/exynos/exynos_dp_core.c6
-rw-r--r--drivers/video/exynos/exynos_mipi_dsi.c4
-rw-r--r--drivers/video/ffb.c6
-rw-r--r--drivers/video/fm2fb.c14
-rw-r--r--drivers/video/fsl-diu-fb.c6
-rw-r--r--drivers/video/gbefb.c24
-rw-r--r--drivers/video/geode/gx1fb_core.c14
-rw-r--r--drivers/video/geode/gxfb_core.c20
-rw-r--r--drivers/video/geode/lxfb_core.c20
-rw-r--r--drivers/video/grvga.c12
-rw-r--r--drivers/video/gxt4500.c13
-rw-r--r--drivers/video/hecubafb.c10
-rw-r--r--drivers/video/hgafb.c12
-rw-r--r--drivers/video/hitfb.c10
-rw-r--r--drivers/video/hpfb.c9
-rw-r--r--drivers/video/i740fb.c15
-rw-r--r--drivers/video/i810/i810_main.c72
-rw-r--r--drivers/video/i810/i810_main.h2
-rw-r--r--drivers/video/igafb.c2
-rw-r--r--drivers/video/imsttfb.c17
-rw-r--r--drivers/video/imxfb.c4
-rw-r--r--drivers/video/intelfb/intelfbdrv.c29
-rw-r--r--drivers/video/jz4740_fb.c8
-rw-r--r--drivers/video/kyro/fbdev.c21
-rw-r--r--drivers/video/leo.c6
-rw-r--r--drivers/video/mb862xx/mb862xxfbdrv.c20
-rw-r--r--drivers/video/mbx/mbxdebugfs.c4
-rw-r--r--drivers/video/mbx/mbxfb.c18
-rw-r--r--drivers/video/metronomefb.c22
-rw-r--r--drivers/video/msm/mddi.c9
-rw-r--r--drivers/video/mxsfb.c15
-rw-r--r--drivers/video/neofb.c26
-rw-r--r--drivers/video/nuc900fb.c4
-rw-r--r--drivers/video/nvidia/nvidia.c49
-rw-r--r--drivers/video/omap/lcd_mipid.c2
-rw-r--r--drivers/video/omap2/displays/panel-acx565akm.c2
-rw-r--r--drivers/video/omap2/displays/panel-lgphilips-lb035q02.c6
-rw-r--r--drivers/video/omap2/displays/panel-n8x0.c2
-rw-r--r--drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c2
-rw-r--r--drivers/video/omap2/displays/panel-tpo-td043mtea1.c4
-rw-r--r--drivers/video/p9100.c6
-rw-r--r--drivers/video/platinumfb.c11
-rw-r--r--drivers/video/pm2fb.c17
-rw-r--r--drivers/video/pm3fb.c17
-rw-r--r--drivers/video/pmag-ba-fb.c6
-rw-r--r--drivers/video/pmagb-b-fb.c12
-rw-r--r--drivers/video/ps3fb.c4
-rw-r--r--drivers/video/pvr2fb.c28
-rw-r--r--drivers/video/pxa168fb.c8
-rw-r--r--drivers/video/pxa3xx-gcu.c8
-rw-r--r--drivers/video/pxafb.c33
-rw-r--r--drivers/video/q40fb.c6
-rw-r--r--drivers/video/riva/fbdev.c45
-rw-r--r--drivers/video/riva/rivafb-i2c.c9
-rw-r--r--drivers/video/s1d13xxxfb.c10
-rw-r--r--drivers/video/s3c-fb.c15
-rw-r--r--drivers/video/s3c2410fb.c16
-rw-r--r--drivers/video/s3fb.c16
-rw-r--r--drivers/video/sa1100fb.c8
-rw-r--r--drivers/video/savage/savagefb_driver.c23
-rw-r--r--drivers/video/sgivwfb.c12
-rw-r--r--drivers/video/sh7760fb.c6
-rw-r--r--drivers/video/sh_mipi_dsi.c4
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c18
-rw-r--r--drivers/video/sh_mobile_meram.c2
-rw-r--r--drivers/video/sis/sis_main.c140
-rw-r--r--drivers/video/sis/sis_main.h20
-rw-r--r--drivers/video/skeletonfb.c17
-rw-r--r--drivers/video/sm501fb.c16
-rw-r--r--drivers/video/ssd1307fb.c11
-rw-r--r--drivers/video/sstfb.c33
-rw-r--r--drivers/video/sunxvr1000.c10
-rw-r--r--drivers/video/sunxvr2500.c12
-rw-r--r--drivers/video/sunxvr500.c12
-rw-r--r--drivers/video/tcx.c6
-rw-r--r--drivers/video/tdfxfb.c30
-rw-r--r--drivers/video/tgafb.c45
-rw-r--r--drivers/video/tmiofb.c8
-rw-r--r--drivers/video/tridentfb.c28
-rw-r--r--drivers/video/uvesafb.c74
-rw-r--r--drivers/video/vermilion/vermilion.c7
-rw-r--r--drivers/video/vfb.c6
-rw-r--r--drivers/video/vga16fb.c10
-rw-r--r--drivers/video/via/dvi.c10
-rw-r--r--drivers/video/via/dvi.h4
-rw-r--r--drivers/video/via/hw.c16
-rw-r--r--drivers/video/via/hw.h4
-rw-r--r--drivers/video/via/lcd.c10
-rw-r--r--drivers/video/via/lcd.h6
-rw-r--r--drivers/video/via/via-core.c19
-rw-r--r--drivers/video/via/via-gpio.c2
-rw-r--r--drivers/video/via/viafbdev.c12
-rw-r--r--drivers/video/vt8500lcdfb.c6
-rw-r--r--drivers/video/vt8623fb.c8
-rw-r--r--drivers/video/w100fb.c10
-rw-r--r--drivers/video/wm8505fb.c6
-rw-r--r--drivers/video/wmt_ge_rops.c6
-rw-r--r--drivers/video/xen-fbfront.c7
-rw-r--r--drivers/video/xilinxfb.c8
-rw-r--r--drivers/virtio/virtio_balloon.c4
-rw-r--r--drivers/virtio/virtio_mmio.c6
-rw-r--r--drivers/virtio/virtio_pci.c8
-rw-r--r--drivers/vlynq/vlynq.c6
-rw-r--r--drivers/w1/masters/mxc_w1.c2
-rw-r--r--drivers/watchdog/da9055_wdt.c17
-rw-r--r--drivers/watchdog/omap_wdt.c1
-rw-r--r--drivers/watchdog/twl4030_wdt.c11
-rw-r--r--drivers/xen/grant-table.c2
-rw-r--r--drivers/xen/platform-pci.c6
-rw-r--r--drivers/xen/xen-pciback/pci_stub.c13
-rw-r--r--drivers/zorro/zorro-driver.c4
-rw-r--r--fs/cifs/cifsfs.c1
-rw-r--r--fs/cifs/cifsglob.h2
-rw-r--r--fs/cifs/file.c141
-rw-r--r--fs/cifs/smb1ops.c8
-rw-r--r--fs/cifs/smb2ops.c2
-rw-r--r--fs/cifs/transport.c6
-rw-r--r--fs/ecryptfs/crypto.c2
-rw-r--r--fs/ecryptfs/kthread.c6
-rw-r--r--fs/ecryptfs/mmap.c12
-rw-r--r--fs/eventpoll.c22
-rw-r--r--fs/ext4/Kconfig2
-rw-r--r--fs/ext4/extents.c22
-rw-r--r--fs/ext4/file.c8
-rw-r--r--fs/ext4/fsync.c2
-rw-r--r--fs/ext4/inode.c99
-rw-r--r--fs/ext4/namei.c6
-rw-r--r--fs/ext4/super.c30
-rw-r--r--fs/f2fs/acl.c1
-rw-r--r--fs/f2fs/data.c1
-rw-r--r--fs/f2fs/dir.c16
-rw-r--r--fs/f2fs/f2fs.h2
-rw-r--r--fs/f2fs/file.c10
-rw-r--r--fs/f2fs/gc.c34
-rw-r--r--fs/f2fs/hash.c18
-rw-r--r--fs/f2fs/inode.c1
-rw-r--r--fs/f2fs/namei.c34
-rw-r--r--fs/f2fs/node.c37
-rw-r--r--fs/f2fs/recovery.c10
-rw-r--r--fs/f2fs/segment.c46
-rw-r--r--fs/f2fs/segment.h15
-rw-r--r--fs/f2fs/super.c15
-rw-r--r--fs/f2fs/xattr.c5
-rw-r--r--fs/file.c2
-rw-r--r--fs/gfs2/lock_dlm.c1
-rw-r--r--fs/gfs2/rgrp.c35
-rw-r--r--fs/jbd2/transaction.c30
-rw-r--r--fs/nfs/callback_proc.c2
-rw-r--r--fs/nfs/dir.c16
-rw-r--r--fs/nfs/nfs4proc.c18
-rw-r--r--fs/nfs/pnfs.c2
-rw-r--r--fs/nfs/read.c10
-rw-r--r--fs/nfs/super.c2
-rw-r--r--fs/nfs/write.c10
-rw-r--r--fs/proc/generic.c13
-rw-r--r--fs/proc/task_mmu.c2
-rw-r--r--fs/pstore/ram.c14
-rw-r--r--fs/pstore/ram_core.c9
-rw-r--r--fs/splice.c4
-rw-r--r--include/Kbuild3
-rw-r--r--include/asm-generic/parport.h4
-rw-r--r--include/asm-generic/tlb.h9
-rw-r--r--include/drm/drm_mm.h25
-rw-r--r--include/drm/exynos_drm.h22
-rw-r--r--include/linux/Kbuild5
-rw-r--r--include/linux/ata_platform.h12
-rw-r--r--include/linux/bcma/bcma_driver_gmac_cmn.h2
-rw-r--r--include/linux/bcma/bcma_driver_pci.h2
-rw-r--r--include/linux/cred.h1
-rw-r--r--include/linux/hdlc/Kbuild0
-rw-r--r--include/linux/hsi/Kbuild0
-rw-r--r--include/linux/ipc_namespace.h1
-rw-r--r--include/linux/jbd2.h2
-rw-r--r--include/linux/mempolicy.h13
-rw-r--r--include/linux/mmzone.h8
-rw-r--r--include/linux/msg.h6
-rw-r--r--include/linux/namei.h1
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/linux/page-flags.h8
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/pid.h1
-rw-r--r--include/linux/pid_namespace.h4
-rw-r--r--include/linux/pstore_ram.h5
-rw-r--r--include/linux/raid/Kbuild0
-rw-r--r--include/linux/usb/Kbuild0
-rw-r--r--include/net/netns/conntrack.h1
-rw-r--r--include/net/netns/x_tables.h1
-rw-r--r--include/net/sock.h2
-rw-r--r--include/rdma/Kbuild0
-rw-r--r--include/sound/Kbuild0
-rw-r--r--include/sound/cs4271.h2
-rw-r--r--include/sound/soc.h10
-rw-r--r--include/trace/events/ext4.h14
-rw-r--r--include/uapi/drm/exynos_drm.h24
-rw-r--r--include/uapi/drm/i915_drm.h10
-rw-r--r--include/uapi/linux/msg.h1
-rw-r--r--include/uapi/linux/pci_regs.h2
-rw-r--r--ipc/compat.c46
-rw-r--r--ipc/ipc_sysctl.c32
-rw-r--r--ipc/msg.c123
-rw-r--r--ipc/msgutil.c43
-rw-r--r--ipc/util.c16
-rw-r--r--ipc/util.h2
-rw-r--r--kernel/fork.c8
-rw-r--r--kernel/pid.c15
-rw-r--r--kernel/pid_namespace.c4
-rw-r--r--kernel/printk.c5
-rw-r--r--kernel/signal.c9
-rw-r--r--lib/Kconfig.debug2
-rw-r--r--mm/memory.c13
-rw-r--r--mm/mempolicy.c130
-rw-r--r--mm/page_alloc.c27
-rw-r--r--mm/page_isolation.c26
-rw-r--r--mm/shmem.c4
-rw-r--r--mm/vmscan.c111
-rw-r--r--net/batman-adv/bat_iv_ogm.c2
-rw-r--r--net/bridge/br_if.c8
-rw-r--r--net/bridge/br_multicast.c2
-rw-r--r--net/bridge/br_netlink.c13
-rw-r--r--net/bridge/br_private.h6
-rw-r--r--net/ceph/messenger.c23
-rw-r--r--net/ceph/osd_client.c34
-rw-r--r--net/core/dev.c18
-rw-r--r--net/core/net-sysfs.c4
-rw-r--r--net/core/sock.c4
-rw-r--r--net/ipv4/arp.c10
-rw-r--r--net/ipv4/devinet.c2
-rw-r--r--net/ipv4/ip_gre.c13
-rw-r--r--net/ipv4/ipconfig.c8
-rw-r--r--net/ipv4/netfilter/ipt_REJECT.c1
-rw-r--r--net/ipv4/netfilter/iptable_nat.c15
-rw-r--r--net/ipv4/tcp_input.c14
-rw-r--r--net/ipv6/ip6_gre.c3
-rw-r--r--net/ipv6/netfilter/ip6t_NPT.c33
-rw-r--r--net/ipv6/netfilter/ip6t_REJECT.c1
-rw-r--r--net/ipv6/netfilter/ip6table_nat.c15
-rw-r--r--net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c4
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c5
-rw-r--r--net/mac802154/wpan.c2
-rw-r--r--net/netfilter/Kconfig7
-rw-r--r--net/netfilter/nf_conntrack_core.c2
-rw-r--r--net/netfilter/nf_conntrack_netlink.c2
-rw-r--r--net/netfilter/nfnetlink_log.c16
-rw-r--r--net/netfilter/xt_CT.c58
-rw-r--r--net/netfilter/xt_hashlimit.c54
-rw-r--r--net/netfilter/xt_recent.c43
-rw-r--r--net/rds/ib_cm.c11
-rw-r--r--net/rds/ib_recv.c9
-rw-r--r--net/sched/sch_htb.c2
-rw-r--r--net/sctp/Kconfig2
-rw-r--r--net/sunrpc/clnt.c5
-rw-r--r--net/sunrpc/sched.c27
-rw-r--r--net/wireless/reg.c7
-rw-r--r--net/wireless/sysfs.c4
-rw-r--r--samples/rpmsg/rpmsg_client_sample.c4
-rw-r--r--scripts/headers_install.pl6
-rwxr-xr-xscripts/kernel-doc1
-rw-r--r--security/integrity/ima/ima.h1
-rw-r--r--security/integrity/ima/ima_main.c12
-rw-r--r--security/integrity/ima/ima_policy.c3
-rw-r--r--sound/arm/pxa2xx-ac97-lib.c26
-rw-r--r--sound/soc/codecs/arizona.c9
-rw-r--r--sound/soc/codecs/arizona.h18
-rw-r--r--sound/soc/codecs/cs4271.c6
-rw-r--r--sound/soc/codecs/cs42l52.c4
-rw-r--r--sound/soc/codecs/lm49453.c106
-rw-r--r--sound/soc/codecs/sgtl5000.c4
-rw-r--r--sound/soc/codecs/sta529.c9
-rw-r--r--sound/soc/codecs/wm2000.c4
-rw-r--r--sound/soc/codecs/wm2200.c8
-rw-r--r--sound/soc/codecs/wm5100.c6
-rw-r--r--sound/soc/codecs/wm5102.c48
-rw-r--r--sound/soc/codecs/wm_adsp.c23
-rw-r--r--sound/soc/soc-core.c35
-rw-r--r--sound/soc/soc-pcm.c1
-rw-r--r--tools/testing/selftests/ipc/Makefile25
-rw-r--r--tools/testing/selftests/ipc/msgque.c246
1600 files changed, 9947 insertions, 9126 deletions
diff --git a/Documentation/DocBook/media/v4l/driver.xml b/Documentation/DocBook/media/v4l/driver.xml
index eacafe312cd2..7c6638bacedb 100644
--- a/Documentation/DocBook/media/v4l/driver.xml
+++ b/Documentation/DocBook/media/v4l/driver.xml
@@ -116,7 +116,7 @@ my_suspend (struct pci_dev * pci_dev,
116 return 0; /* a negative value on error, 0 on success. */ 116 return 0; /* a negative value on error, 0 on success. */
117} 117}
118 118
119static void __devexit 119static void
120my_remove (struct pci_dev * pci_dev) 120my_remove (struct pci_dev * pci_dev)
121{ 121{
122 my_device *my = pci_get_drvdata (pci_dev); 122 my_device *my = pci_get_drvdata (pci_dev);
@@ -124,7 +124,7 @@ my_remove (struct pci_dev * pci_dev)
124 /* Describe me. */ 124 /* Describe me. */
125} 125}
126 126
127static int __devinit 127static int
128my_probe (struct pci_dev * pci_dev, 128my_probe (struct pci_dev * pci_dev,
129 const struct pci_device_id * pci_id) 129 const struct pci_device_id * pci_id)
130{ 130{
@@ -157,7 +157,7 @@ my_pci_driver = {
157 .id_table = my_pci_device_ids, 157 .id_table = my_pci_device_ids,
158 158
159 .probe = my_probe, 159 .probe = my_probe,
160 .remove = __devexit_p (my_remove), 160 .remove = my_remove,
161 161
162 /* Power management functions. */ 162 /* Power management functions. */
163 .suspend = my_suspend, 163 .suspend = my_suspend,
diff --git a/Documentation/PCI/pci-iov-howto.txt b/Documentation/PCI/pci-iov-howto.txt
index cfaca7e69893..86551cc72e03 100644
--- a/Documentation/PCI/pci-iov-howto.txt
+++ b/Documentation/PCI/pci-iov-howto.txt
@@ -76,7 +76,7 @@ To notify SR-IOV core of Virtual Function Migration:
76 76
77Following piece of code illustrates the usage of the SR-IOV API. 77Following piece of code illustrates the usage of the SR-IOV API.
78 78
79static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *id) 79static int dev_probe(struct pci_dev *dev, const struct pci_device_id *id)
80{ 80{
81 pci_enable_sriov(dev, NR_VIRTFN); 81 pci_enable_sriov(dev, NR_VIRTFN);
82 82
@@ -85,7 +85,7 @@ static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *
85 return 0; 85 return 0;
86} 86}
87 87
88static void __devexit dev_remove(struct pci_dev *dev) 88static void dev_remove(struct pci_dev *dev)
89{ 89{
90 pci_disable_sriov(dev); 90 pci_disable_sriov(dev);
91 91
@@ -131,7 +131,7 @@ static struct pci_driver dev_driver = {
131 .name = "SR-IOV Physical Function driver", 131 .name = "SR-IOV Physical Function driver",
132 .id_table = dev_id_table, 132 .id_table = dev_id_table,
133 .probe = dev_probe, 133 .probe = dev_probe,
134 .remove = __devexit_p(dev_remove), 134 .remove = dev_remove,
135 .suspend = dev_suspend, 135 .suspend = dev_suspend,
136 .resume = dev_resume, 136 .resume = dev_resume,
137 .shutdown = dev_shutdown, 137 .shutdown = dev_shutdown,
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt
index aa09e5476bba..bccf602a87f5 100644
--- a/Documentation/PCI/pci.txt
+++ b/Documentation/PCI/pci.txt
@@ -183,12 +183,6 @@ Please mark the initialization and cleanup functions where appropriate
183 initializes. 183 initializes.
184 __exit Exit code. Ignored for non-modular drivers. 184 __exit Exit code. Ignored for non-modular drivers.
185 185
186
187 __devinit Device initialization code.
188 Identical to __init if the kernel is not compiled
189 with CONFIG_HOTPLUG, normal function otherwise.
190 __devexit The same for __exit.
191
192Tips on when/where to use the above attributes: 186Tips on when/where to use the above attributes:
193 o The module_init()/module_exit() functions (and all 187 o The module_init()/module_exit() functions (and all
194 initialization functions called _only_ from these) 188 initialization functions called _only_ from these)
@@ -196,20 +190,6 @@ Tips on when/where to use the above attributes:
196 190
197 o Do not mark the struct pci_driver. 191 o Do not mark the struct pci_driver.
198 192
199 o The ID table array should be marked __devinitconst; this is done
200 automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE().
201
202 o The probe() and remove() functions should be marked __devinit
203 and __devexit respectively. All initialization functions
204 exclusively called by the probe() routine, can be marked __devinit.
205 Ditto for remove() and __devexit.
206
207 o If mydriver_remove() is marked with __devexit(), then all address
208 references to mydriver_remove must use __devexit_p(mydriver_remove)
209 (in the struct pci_driver declaration for example).
210 __devexit_p() will generate the function name _or_ NULL if the
211 function will be discarded. For an example, see drivers/net/tg3.c.
212
213 o Do NOT mark a function if you are not sure which mark to use. 193 o Do NOT mark a function if you are not sure which mark to use.
214 Better to not mark the function than mark the function wrong. 194 Better to not mark the function than mark the function wrong.
215 195
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt
index 4f27785ca0c8..54469bc81b1c 100644
--- a/Documentation/acpi/enumeration.txt
+++ b/Documentation/acpi/enumeration.txt
@@ -185,7 +185,7 @@ input driver:
185 .acpi_match_table ACPI_PTR(mpu3050_acpi_match), 185 .acpi_match_table ACPI_PTR(mpu3050_acpi_match),
186 }, 186 },
187 .probe = mpu3050_probe, 187 .probe = mpu3050_probe,
188 .remove = __devexit_p(mpu3050_remove), 188 .remove = mpu3050_remove,
189 .id_table = mpu3050_ids, 189 .id_table = mpu3050_ids,
190 }; 190 };
191 191
diff --git a/Documentation/devicetree/bindings/clock/imx23-clock.txt b/Documentation/devicetree/bindings/clock/imx23-clock.txt
index baadbb11fe98..5083c0b834b2 100644
--- a/Documentation/devicetree/bindings/clock/imx23-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx23-clock.txt
@@ -60,11 +60,6 @@ clks: clkctrl@80040000 {
60 compatible = "fsl,imx23-clkctrl"; 60 compatible = "fsl,imx23-clkctrl";
61 reg = <0x80040000 0x2000>; 61 reg = <0x80040000 0x2000>;
62 #clock-cells = <1>; 62 #clock-cells = <1>;
63 clock-output-names =
64 ...
65 "uart", /* 32 */
66 ...
67 "end_of_list";
68}; 63};
69 64
70auart0: serial@8006c000 { 65auart0: serial@8006c000 {
diff --git a/Documentation/devicetree/bindings/clock/imx25-clock.txt b/Documentation/devicetree/bindings/clock/imx25-clock.txt
index c2a3525ecb4e..db4f2f05c4d0 100644
--- a/Documentation/devicetree/bindings/clock/imx25-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx25-clock.txt
@@ -146,10 +146,6 @@ clks: ccm@53f80000 {
146 compatible = "fsl,imx25-ccm"; 146 compatible = "fsl,imx25-ccm";
147 reg = <0x53f80000 0x4000>; 147 reg = <0x53f80000 0x4000>;
148 interrupts = <31>; 148 interrupts = <31>;
149 clock-output-names = ...
150 "uart_ipg",
151 "uart_serial",
152 ...;
153}; 149};
154 150
155uart1: serial@43f90000 { 151uart1: serial@43f90000 {
diff --git a/Documentation/devicetree/bindings/clock/imx28-clock.txt b/Documentation/devicetree/bindings/clock/imx28-clock.txt
index 52a49a4a50b3..e6587af62ff0 100644
--- a/Documentation/devicetree/bindings/clock/imx28-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx28-clock.txt
@@ -83,11 +83,6 @@ clks: clkctrl@80040000 {
83 compatible = "fsl,imx28-clkctrl"; 83 compatible = "fsl,imx28-clkctrl";
84 reg = <0x80040000 0x2000>; 84 reg = <0x80040000 0x2000>;
85 #clock-cells = <1>; 85 #clock-cells = <1>;
86 clock-output-names =
87 ...
88 "uart", /* 45 */
89 ...
90 "end_of_list";
91}; 86};
92 87
93auart0: serial@8006a000 { 88auart0: serial@8006a000 {
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
index d77b4e68dc42..f73fdf595568 100644
--- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
@@ -211,10 +211,6 @@ clks: ccm@020c4000 {
211 reg = <0x020c4000 0x4000>; 211 reg = <0x020c4000 0x4000>;
212 interrupts = <0 87 0x04 0 88 0x04>; 212 interrupts = <0 87 0x04 0 88 0x04>;
213 #clock-cells = <1>; 213 #clock-cells = <1>;
214 clock-output-names = ...
215 "uart_ipg",
216 "uart_serial",
217 ...;
218}; 214};
219 215
220uart1: serial@02020000 { 216uart1: serial@02020000 {
diff --git a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt
index 558cdf3c9abc..d4eab9227ea4 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt
@@ -1,4 +1,19 @@
1GPIO line that should be set high/low to power off a device 1Driver a GPIO line that can be used to turn the power off.
2
3The driver supports both level triggered and edge triggered power off.
4At driver load time, the driver will request the given gpio line and
5install a pm_power_off handler. If the optional properties 'input' is
6not found, the GPIO line will be driven in the inactive
7state. Otherwise its configured as an input.
8
9When the pm_power_off is called, the gpio is configured as an output,
10and drive active, so triggering a level triggered power off
11condition. This will also cause an inactive->active edge condition, so
12triggering positive edge triggered power off. After a delay of 100ms,
13the GPIO is set to inactive, thus causing an active->inactive edge,
14triggering negative edge triggered power off. After another 100ms
15delay the GPIO is driver active again. If the power is still on and
16the CPU still running after a 3000ms delay, a WARN_ON(1) is emitted.
2 17
3Required properties: 18Required properties:
4- compatible : should be "gpio-poweroff". 19- compatible : should be "gpio-poweroff".
@@ -13,10 +28,9 @@ Optional properties:
13 property is not specified, the GPIO is initialized as an output in its 28 property is not specified, the GPIO is initialized as an output in its
14 inactive state. 29 inactive state.
15 30
16
17Examples: 31Examples:
18 32
19gpio-poweroff { 33gpio-poweroff {
20 compatible = "gpio-poweroff"; 34 compatible = "gpio-poweroff";
21 gpios = <&gpio 4 0>; /* GPIO 4 Active Low */ 35 gpios = <&gpio 4 0>;
22}; 36};
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
new file mode 100644
index 000000000000..c596a6ad3285
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
@@ -0,0 +1,47 @@
1CSR SiRFprimaII pinmux controller
2
3Required properties:
4- compatible : "sirf,prima2-pinctrl"
5- reg : Address range of the pinctrl registers
6- interrupts : Interrupts used by every GPIO group
7- gpio-controller : Indicates this device is a GPIO controller
8- interrupt-controller : Marks the device node as an interrupt controller
9Optional properties:
10- sirf,pullups : if n-th bit of m-th bank is set, set a pullup on GPIO-n of bank m
11- sirf,pulldowns : if n-th bit of m-th bank is set, set a pulldown on GPIO-n of bank m
12
13Please refer to pinctrl-bindings.txt in this directory for details of the common
14pinctrl bindings used by client devices.
15
16SiRFprimaII's pinmux nodes act as a container for an abitrary number of subnodes.
17Each of these subnodes represents some desired configuration for a group of pins.
18
19Required subnode-properties:
20- sirf,pins : An array of strings. Each string contains the name of a group.
21- sirf,function: A string containing the name of the function to mux to the
22 group.
23
24 Valid values for group and function names can be found from looking at the
25 group and function arrays in driver files:
26 drivers/pinctrl/pinctrl-sirf.c
27
28For example, pinctrl might have subnodes like the following:
29 uart2_pins_a: uart2@0 {
30 uart {
31 sirf,pins = "uart2grp";
32 sirf,function = "uart2";
33 };
34 };
35 uart2_noflow_pins_a: uart2@1 {
36 uart {
37 sirf,pins = "uart2_nostreamctrlgrp";
38 sirf,function = "uart2_nostreamctrl";
39 };
40 };
41
42For a specific board, if it wants to use uart2 without hardware flow control,
43it can add the following to its board-specific .dts file.
44uart2: uart@0xb0070000 {
45 pinctrl-names = "default";
46 pinctrl-0 = <&uart2_noflow_pins_a>;
47}
diff --git a/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt b/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt
new file mode 100644
index 000000000000..80a37193c0b8
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt
@@ -0,0 +1,10 @@
1Device tree bindings for twl4030-wdt driver (TWL4030 watchdog)
2
3Required properties:
4 compatible = "ti,twl4030-wdt";
5
6Example:
7
8watchdog {
9 compatible = "ti,twl4030-wdt";
10};
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
index abf63615ee05..22182660dda7 100644
--- a/Documentation/i2c/instantiating-devices
+++ b/Documentation/i2c/instantiating-devices
@@ -91,7 +91,7 @@ Example (from the nxp OHCI driver):
91 91
92static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; 92static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
93 93
94static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev) 94static int usb_hcd_nxp_probe(struct platform_device *pdev)
95{ 95{
96 (...) 96 (...)
97 struct i2c_adapter *i2c_adap; 97 struct i2c_adapter *i2c_adap;
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index dd52d516cb89..dbca66182089 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -36,7 +36,7 @@ neigh/default/unres_qlen_bytes - INTEGER
36 The maximum number of bytes which may be used by packets 36 The maximum number of bytes which may be used by packets
37 queued for each unresolved address by other network layers. 37 queued for each unresolved address by other network layers.
38 (added in linux 3.3) 38 (added in linux 3.3)
39 Seting negative value is meaningless and will retrun error. 39 Setting negative value is meaningless and will return error.
40 Default: 65536 Bytes(64KB) 40 Default: 65536 Bytes(64KB)
41 41
42neigh/default/unres_qlen - INTEGER 42neigh/default/unres_qlen - INTEGER
@@ -215,7 +215,7 @@ tcp_ecn - INTEGER
215 Possible values are: 215 Possible values are:
216 0 Disable ECN. Neither initiate nor accept ECN. 216 0 Disable ECN. Neither initiate nor accept ECN.
217 1 Always request ECN on outgoing connection attempts. 217 1 Always request ECN on outgoing connection attempts.
218 2 Enable ECN when requested by incomming connections 218 2 Enable ECN when requested by incoming connections
219 but do not request ECN on outgoing connections. 219 but do not request ECN on outgoing connections.
220 Default: 2 220 Default: 2
221 221
@@ -503,7 +503,7 @@ tcp_fastopen - INTEGER
503tcp_syn_retries - INTEGER 503tcp_syn_retries - INTEGER
504 Number of times initial SYNs for an active TCP connection attempt 504 Number of times initial SYNs for an active TCP connection attempt
505 will be retransmitted. Should not be higher than 255. Default value 505 will be retransmitted. Should not be higher than 255. Default value
506 is 6, which corresponds to 63seconds till the last restransmission 506 is 6, which corresponds to 63seconds till the last retransmission
507 with the current initial RTO of 1second. With this the final timeout 507 with the current initial RTO of 1second. With this the final timeout
508 for an active TCP connection attempt will happen after 127seconds. 508 for an active TCP connection attempt will happen after 127seconds.
509 509
@@ -1331,6 +1331,12 @@ force_tllao - BOOLEAN
1331 race condition where the sender deletes the cached link-layer address 1331 race condition where the sender deletes the cached link-layer address
1332 prior to receiving a response to a previous solicitation." 1332 prior to receiving a response to a previous solicitation."
1333 1333
1334ndisc_notify - BOOLEAN
1335 Define mode for notification of address and device changes.
1336 0 - (default): do nothing
1337 1 - Generate unsolicited neighbour advertisements when device is brought
1338 up or hardware address changes.
1339
1334icmp/*: 1340icmp/*:
1335ratelimit - INTEGER 1341ratelimit - INTEGER
1336 Limit the maximal rates for sending ICMPv6 packets. 1342 Limit the maximal rates for sending ICMPv6 packets.
@@ -1530,7 +1536,7 @@ cookie_hmac_alg - STRING
1530 * sha1 1536 * sha1
1531 * none 1537 * none
1532 Ability to assign md5 or sha1 as the selected alg is predicated on the 1538 Ability to assign md5 or sha1 as the selected alg is predicated on the
1533 configuarion of those algorithms at build time (CONFIG_CRYPTO_MD5 and 1539 configuration of those algorithms at build time (CONFIG_CRYPTO_MD5 and
1534 CONFIG_CRYPTO_SHA1). 1540 CONFIG_CRYPTO_SHA1).
1535 1541
1536 Default: Dependent on configuration. MD5 if available, else SHA1 if 1542 Default: Dependent on configuration. MD5 if available, else SHA1 if
@@ -1548,7 +1554,7 @@ rcvbuf_policy - INTEGER
1548 blocking. 1554 blocking.
1549 1555
1550 1: rcvbuf space is per association 1556 1: rcvbuf space is per association
1551 0: recbuf space is per socket 1557 0: rcvbuf space is per socket
1552 1558
1553 Default: 0 1559 Default: 0
1554 1560
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 4abe83e1045a..03591a750f99 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -642,12 +642,13 @@ out the following operations:
642 * During system suspend it calls pm_runtime_get_noresume() and 642 * During system suspend it calls pm_runtime_get_noresume() and
643 pm_runtime_barrier() for every device right before executing the 643 pm_runtime_barrier() for every device right before executing the
644 subsystem-level .suspend() callback for it. In addition to that it calls 644 subsystem-level .suspend() callback for it. In addition to that it calls
645 pm_runtime_disable() for every device right after executing the 645 __pm_runtime_disable() with 'false' as the second argument for every device
646 subsystem-level .suspend() callback for it. 646 right before executing the subsystem-level .suspend_late() callback for it.
647 647
648 * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync() 648 * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync()
649 for every device right before and right after executing the subsystem-level 649 for every device right after executing the subsystem-level .resume_early()
650 .resume() callback for it, respectively. 650 callback and right after executing the subsystem-level .resume() callback
651 for it, respectively.
651 652
6527. Generic subsystem callbacks 6537. Generic subsystem callbacks
653 654
diff --git a/Documentation/rpmsg.txt b/Documentation/rpmsg.txt
index 409d9f964c5b..f7edc3aa1e92 100644
--- a/Documentation/rpmsg.txt
+++ b/Documentation/rpmsg.txt
@@ -236,7 +236,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev)
236 return 0; 236 return 0;
237} 237}
238 238
239static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev) 239static void rpmsg_sample_remove(struct rpmsg_channel *rpdev)
240{ 240{
241 dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); 241 dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n");
242} 242}
@@ -253,7 +253,7 @@ static struct rpmsg_driver rpmsg_sample_client = {
253 .id_table = rpmsg_driver_sample_id_table, 253 .id_table = rpmsg_driver_sample_id_table,
254 .probe = rpmsg_sample_probe, 254 .probe = rpmsg_sample_probe,
255 .callback = rpmsg_sample_cb, 255 .callback = rpmsg_sample_cb,
256 .remove = __devexit_p(rpmsg_sample_remove), 256 .remove = rpmsg_sample_remove,
257}; 257};
258 258
259static int __init init(void) 259static int __init init(void)
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index 7312ec14dd89..2331eb214146 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -345,7 +345,7 @@ SPI protocol drivers somewhat resemble platform device drivers:
345 }, 345 },
346 346
347 .probe = CHIP_probe, 347 .probe = CHIP_probe,
348 .remove = __devexit_p(CHIP_remove), 348 .remove = CHIP_remove,
349 .suspend = CHIP_suspend, 349 .suspend = CHIP_suspend,
350 .resume = CHIP_resume, 350 .resume = CHIP_resume,
351 }; 351 };
@@ -355,7 +355,7 @@ device whose board_info gave a modalias of "CHIP". Your probe() code
355might look like this unless you're creating a device which is managing 355might look like this unless you're creating a device which is managing
356a bus (appearing under /sys/class/spi_master). 356a bus (appearing under /sys/class/spi_master).
357 357
358 static int __devinit CHIP_probe(struct spi_device *spi) 358 static int CHIP_probe(struct spi_device *spi)
359 { 359 {
360 struct CHIP *chip; 360 struct CHIP *chip;
361 struct CHIP_platform_data *pdata; 361 struct CHIP_platform_data *pdata;
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 2907ba6c3607..ccd42589e124 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -38,6 +38,7 @@ show up in /proc/sys/kernel:
38- l2cr [ PPC only ] 38- l2cr [ PPC only ]
39- modprobe ==> Documentation/debugging-modules.txt 39- modprobe ==> Documentation/debugging-modules.txt
40- modules_disabled 40- modules_disabled
41- msg_next_id [ sysv ipc ]
41- msgmax 42- msgmax
42- msgmnb 43- msgmnb
43- msgmni 44- msgmni
@@ -62,7 +63,9 @@ show up in /proc/sys/kernel:
62- rtsig-max 63- rtsig-max
63- rtsig-nr 64- rtsig-nr
64- sem 65- sem
66- sem_next_id [ sysv ipc ]
65- sg-big-buff [ generic SCSI device (sg) ] 67- sg-big-buff [ generic SCSI device (sg) ]
68- shm_next_id [ sysv ipc ]
66- shm_rmid_forced 69- shm_rmid_forced
67- shmall 70- shmall
68- shmmax [ sysv ipc ] 71- shmmax [ sysv ipc ]
@@ -320,6 +323,22 @@ to false.
320 323
321============================================================== 324==============================================================
322 325
326msg_next_id, sem_next_id, and shm_next_id:
327
328These three toggles allows to specify desired id for next allocated IPC
329object: message, semaphore or shared memory respectively.
330
331By default they are equal to -1, which means generic allocation logic.
332Possible values to set are in range {0..INT_MAX}.
333
334Notes:
3351) kernel doesn't guarantee, that new object will have desired id. So,
336it's up to userspace, how to handle an object with "wrong" id.
3372) Toggle with non-default value will be set back to -1 by kernel after
338successful IPC object allocation.
339
340==============================================================
341
323nmi_watchdog: 342nmi_watchdog:
324 343
325Enables/Disables the NMI watchdog on x86 systems. When the value is 344Enables/Disables the NMI watchdog on x86 systems. When the value is
@@ -542,6 +561,19 @@ are doing anyway :)
542 561
543============================================================== 562==============================================================
544 563
564shmall:
565
566This parameter sets the total amount of shared memory pages that
567can be used system wide. Hence, SHMALL should always be at least
568ceil(shmmax/PAGE_SIZE).
569
570If you are not sure what the default PAGE_SIZE is on your Linux
571system, you can run the following command:
572
573# getconf PAGE_SIZE
574
575==============================================================
576
545shmmax: 577shmmax:
546 578
547This value can be used to query and set the run time limit 579This value can be used to query and set the run time limit
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 32bfe926e8d7..b89567ad04b7 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -174,8 +174,7 @@ The recommended approach is as follows:
174 174
175static atomic_t drv_instance = ATOMIC_INIT(0); 175static atomic_t drv_instance = ATOMIC_INIT(0);
176 176
177static int __devinit drv_probe(struct pci_dev *pdev, 177static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
178 const struct pci_device_id *pci_id)
179{ 178{
180 ... 179 ...
181 state->instance = atomic_inc_return(&drv_instance) - 1; 180 state->instance = atomic_inc_return(&drv_instance) - 1;
diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt b/Documentation/zh_CN/video4linux/v4l2-framework.txt
index 3e74f13af426..44c1d934c4e3 100644
--- a/Documentation/zh_CN/video4linux/v4l2-framework.txt
+++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt
@@ -182,8 +182,7 @@ int iterate(void *p)
182 182
183static atomic_t drv_instance = ATOMIC_INIT(0); 183static atomic_t drv_instance = ATOMIC_INIT(0);
184 184
185static int __devinit drv_probe(struct pci_dev *pdev, 185static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
186 const struct pci_device_id *pci_id)
187{ 186{
188 ... 187 ...
189 state->instance = atomic_inc_return(&drv_instance) - 1; 188 state->instance = atomic_inc_return(&drv_instance) - 1;
diff --git a/MAINTAINERS b/MAINTAINERS
index 4e2a1f67a1fc..915564eda145 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -449,6 +449,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
449S: Maintained 449S: Maintained
450F: drivers/char/agp/ 450F: drivers/char/agp/
451F: include/linux/agp* 451F: include/linux/agp*
452F: include/uapi/linux/agp*
452 453
453AHA152X SCSI DRIVER 454AHA152X SCSI DRIVER
454M: "Juergen E. Fischer" <fischer@norbit.de> 455M: "Juergen E. Fischer" <fischer@norbit.de>
@@ -589,6 +590,7 @@ M: Jiri Kosina <jkosina@suse.cz>
589S: Odd fixes 590S: Odd fixes
590F: arch/x86/kernel/apm_32.c 591F: arch/x86/kernel/apm_32.c
591F: include/linux/apm_bios.h 592F: include/linux/apm_bios.h
593F: include/uapi/linux/apm_bios.h
592F: drivers/char/apm-emulation.c 594F: drivers/char/apm-emulation.c
593 595
594APPLE BCM5974 MULTITOUCH DRIVER 596APPLE BCM5974 MULTITOUCH DRIVER
@@ -1005,7 +1007,6 @@ F: drivers/mmc/host/msm_sdcc.c
1005F: drivers/mmc/host/msm_sdcc.h 1007F: drivers/mmc/host/msm_sdcc.h
1006F: drivers/tty/serial/msm_serial.h 1008F: drivers/tty/serial/msm_serial.h
1007F: drivers/tty/serial/msm_serial.c 1009F: drivers/tty/serial/msm_serial.c
1008F: drivers/platform/msm/
1009F: drivers/*/pm8???-* 1010F: drivers/*/pm8???-*
1010F: include/linux/mfd/pm8xxx/ 1011F: include/linux/mfd/pm8xxx/
1011T: git git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git 1012T: git git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git
@@ -1069,7 +1070,6 @@ M: Russell King <linux@arm.linux.org.uk>
1069L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1070L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1070W: http://www.arm.linux.org.uk/ 1071W: http://www.arm.linux.org.uk/
1071S: Maintained 1072S: Maintained
1072F: arch/arm/common/time-acorn.c
1073F: arch/arm/include/asm/hardware/entry-macro-iomd.S 1073F: arch/arm/include/asm/hardware/entry-macro-iomd.S
1074F: arch/arm/include/asm/hardware/ioc.h 1074F: arch/arm/include/asm/hardware/ioc.h
1075F: arch/arm/include/asm/hardware/iomd.h 1075F: arch/arm/include/asm/hardware/iomd.h
@@ -1094,7 +1094,6 @@ W: http://www.fluff.org/ben/linux/
1094S: Maintained 1094S: Maintained
1095F: arch/arm/plat-samsung/ 1095F: arch/arm/plat-samsung/
1096F: arch/arm/plat-s3c24xx/ 1096F: arch/arm/plat-s3c24xx/
1097F: arch/arm/plat-s5p/
1098F: arch/arm/mach-s3c24*/ 1097F: arch/arm/mach-s3c24*/
1099F: arch/arm/mach-s3c64xx/ 1098F: arch/arm/mach-s3c64xx/
1100F: drivers/*/*s3c2410* 1099F: drivers/*/*s3c2410*
@@ -1125,7 +1124,6 @@ M: Sylwester Nawrocki <s.nawrocki@samsung.com>
1125L: linux-arm-kernel@lists.infradead.org 1124L: linux-arm-kernel@lists.infradead.org
1126L: linux-media@vger.kernel.org 1125L: linux-media@vger.kernel.org
1127S: Maintained 1126S: Maintained
1128F: arch/arm/plat-s5p/dev-fimc*
1129F: arch/arm/plat-samsung/include/plat/*fimc* 1127F: arch/arm/plat-samsung/include/plat/*fimc*
1130F: drivers/media/platform/s5p-fimc/ 1128F: drivers/media/platform/s5p-fimc/
1131 1129
@@ -1136,7 +1134,7 @@ M: Jeongtae Park <jtp.park@samsung.com>
1136L: linux-arm-kernel@lists.infradead.org 1134L: linux-arm-kernel@lists.infradead.org
1137L: linux-media@vger.kernel.org 1135L: linux-media@vger.kernel.org
1138S: Maintained 1136S: Maintained
1139F: arch/arm/plat-s5p/dev-mfc.c 1137F: arch/arm/plat-samsung/s5p-dev-mfc.c
1140F: drivers/media/platform/s5p-mfc/ 1138F: drivers/media/platform/s5p-mfc/
1141 1139
1142ARM/SAMSUNG S5P SERIES TV SUBSYSTEM SUPPORT 1140ARM/SAMSUNG S5P SERIES TV SUBSYSTEM SUPPORT
@@ -1254,7 +1252,7 @@ F: drivers/video/vt8500lcdfb.*
1254F: drivers/video/wm8505fb* 1252F: drivers/video/wm8505fb*
1255F: drivers/video/wmt_ge_rops.* 1253F: drivers/video/wmt_ge_rops.*
1256F: drivers/tty/serial/vt8500_serial.c 1254F: drivers/tty/serial/vt8500_serial.c
1257F: drivers/rtc/rtc-vt8500-c 1255F: drivers/rtc/rtc-vt8500.c
1258F: drivers/mmc/host/wmt-sdmmc.c 1256F: drivers/mmc/host/wmt-sdmmc.c
1259 1257
1260ARM/ZIPIT Z2 SUPPORT 1258ARM/ZIPIT Z2 SUPPORT
@@ -1388,6 +1386,7 @@ W: http://linux-atm.sourceforge.net
1388S: Maintained 1386S: Maintained
1389F: drivers/atm/ 1387F: drivers/atm/
1390F: include/linux/atm* 1388F: include/linux/atm*
1389F: include/uapi/linux/atm*
1391 1390
1392ATMEL AT91 / AT32 MCI DRIVER 1391ATMEL AT91 / AT32 MCI DRIVER
1393M: Ludovic Desroches <ludovic.desroches@atmel.com> 1392M: Ludovic Desroches <ludovic.desroches@atmel.com>
@@ -1406,13 +1405,13 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1406S: Supported 1405S: Supported
1407F: drivers/dma/at_hdmac.c 1406F: drivers/dma/at_hdmac.c
1408F: drivers/dma/at_hdmac_regs.h 1407F: drivers/dma/at_hdmac_regs.h
1409F: arch/arm/mach-at91/include/mach/at_hdmac.h 1408F: include/linux/platform_data/dma-atmel.h
1410 1409
1411ATMEL ISI DRIVER 1410ATMEL ISI DRIVER
1412M: Josh Wu <josh.wu@atmel.com> 1411M: Josh Wu <josh.wu@atmel.com>
1413L: linux-media@vger.kernel.org 1412L: linux-media@vger.kernel.org
1414S: Supported 1413S: Supported
1415F: drivers/media/platform/atmel-isi.c 1414F: drivers/media/platform/soc_camera/atmel-isi.c
1416F: include/media/atmel-isi.h 1415F: include/media/atmel-isi.h
1417 1416
1418ATMEL LCDFB DRIVER 1417ATMEL LCDFB DRIVER
@@ -1467,6 +1466,7 @@ W: http://people.redhat.com/sgrubb/audit/
1467T: git git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git 1466T: git git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git
1468S: Maintained 1467S: Maintained
1469F: include/linux/audit.h 1468F: include/linux/audit.h
1469F: include/uapi/linux/audit.h
1470F: kernel/audit* 1470F: kernel/audit*
1471 1471
1472AUXILIARY DISPLAY DRIVERS 1472AUXILIARY DISPLAY DRIVERS
@@ -1497,7 +1497,7 @@ M: Ralf Baechle <ralf@linux-mips.org>
1497L: linux-hams@vger.kernel.org 1497L: linux-hams@vger.kernel.org
1498W: http://www.linux-ax25.org/ 1498W: http://www.linux-ax25.org/
1499S: Maintained 1499S: Maintained
1500F: include/linux/ax25.h 1500F: include/uapi/linux/ax25.h
1501F: include/net/ax25.h 1501F: include/net/ax25.h
1502F: net/ax25/ 1502F: net/ax25/
1503 1503
@@ -1558,7 +1558,7 @@ M: "Tigran A. Aivazian" <tigran@aivazian.fsnet.co.uk>
1558S: Maintained 1558S: Maintained
1559F: Documentation/filesystems/bfs.txt 1559F: Documentation/filesystems/bfs.txt
1560F: fs/bfs/ 1560F: fs/bfs/
1561F: include/linux/bfs_fs.h 1561F: include/uapi/linux/bfs_fs.h
1562 1562
1563BLACKFIN ARCHITECTURE 1563BLACKFIN ARCHITECTURE
1564M: Mike Frysinger <vapier@gentoo.org> 1564M: Mike Frysinger <vapier@gentoo.org>
@@ -1655,7 +1655,7 @@ L: netdev@vger.kernel.org
1655W: http://sourceforge.net/projects/bonding/ 1655W: http://sourceforge.net/projects/bonding/
1656S: Supported 1656S: Supported
1657F: drivers/net/bonding/ 1657F: drivers/net/bonding/
1658F: include/linux/if_bonding.h 1658F: include/uapi/linux/if_bonding.h
1659 1659
1660BROADCOM B44 10/100 ETHERNET DRIVER 1660BROADCOM B44 10/100 ETHERNET DRIVER
1661M: Gary Zambrano <zambrano@broadcom.com> 1661M: Gary Zambrano <zambrano@broadcom.com>
@@ -1734,6 +1734,7 @@ L: linux-scsi@vger.kernel.org
1734S: Supported 1734S: Supported
1735F: block/bsg.c 1735F: block/bsg.c
1736F: include/linux/bsg.h 1736F: include/linux/bsg.h
1737F: include/uapi/linux/bsg.h
1737 1738
1738BT87X AUDIO DRIVER 1739BT87X AUDIO DRIVER
1739M: Clemens Ladisch <clemens@ladisch.de> 1740M: Clemens Ladisch <clemens@ladisch.de>
@@ -1804,7 +1805,7 @@ L: netdev@vger.kernel.org
1804S: Supported 1805S: Supported
1805F: Documentation/networking/caif/ 1806F: Documentation/networking/caif/
1806F: drivers/net/caif/ 1807F: drivers/net/caif/
1807F: include/linux/caif/ 1808F: include/uapi/linux/caif/
1808F: include/net/caif/ 1809F: include/net/caif/
1809F: net/caif/ 1810F: net/caif/
1810 1811
@@ -1825,11 +1826,11 @@ W: http://gitorious.org/linux-can
1825T: git git://gitorious.org/linux-can/linux-can-next.git 1826T: git git://gitorious.org/linux-can/linux-can-next.git
1826S: Maintained 1827S: Maintained
1827F: net/can/ 1828F: net/can/
1828F: include/linux/can.h
1829F: include/linux/can/core.h 1829F: include/linux/can/core.h
1830F: include/linux/can/bcm.h 1830F: include/uapi/linux/can.h
1831F: include/linux/can/raw.h 1831F: include/uapi/linux/can/bcm.h
1832F: include/linux/can/gw.h 1832F: include/uapi/linux/can/raw.h
1833F: include/uapi/linux/can/gw.h
1833 1834
1834CAN NETWORK DRIVERS 1835CAN NETWORK DRIVERS
1835M: Wolfgang Grandegger <wg@grandegger.com> 1836M: Wolfgang Grandegger <wg@grandegger.com>
@@ -1840,15 +1841,16 @@ T: git git://gitorious.org/linux-can/linux-can-next.git
1840S: Maintained 1841S: Maintained
1841F: drivers/net/can/ 1842F: drivers/net/can/
1842F: include/linux/can/dev.h 1843F: include/linux/can/dev.h
1843F: include/linux/can/error.h
1844F: include/linux/can/netlink.h
1845F: include/linux/can/platform/ 1844F: include/linux/can/platform/
1845F: include/uapi/linux/can/error.h
1846F: include/uapi/linux/can/netlink.h
1846 1847
1847CAPABILITIES 1848CAPABILITIES
1848M: Serge Hallyn <serge.hallyn@canonical.com> 1849M: Serge Hallyn <serge.hallyn@canonical.com>
1849L: linux-security-module@vger.kernel.org 1850L: linux-security-module@vger.kernel.org
1850S: Supported 1851S: Supported
1851F: include/linux/capability.h 1852F: include/linux/capability.h
1853F: include/uapi/linux/capability.h
1852F: security/capability.c 1854F: security/capability.c
1853F: security/commoncap.c 1855F: security/commoncap.c
1854F: kernel/capability.c 1856F: kernel/capability.c
@@ -1861,6 +1863,7 @@ W: http://www.ibm.com/developerworks/power/cell/
1861S: Supported 1863S: Supported
1862F: arch/powerpc/include/asm/cell*.h 1864F: arch/powerpc/include/asm/cell*.h
1863F: arch/powerpc/include/asm/spu*.h 1865F: arch/powerpc/include/asm/spu*.h
1866F: arch/powerpc/include/uapi/asm/spu*.h
1864F: arch/powerpc/oprofile/*cell* 1867F: arch/powerpc/oprofile/*cell*
1865F: arch/powerpc/platforms/cell/ 1868F: arch/powerpc/platforms/cell/
1866 1869
@@ -1909,7 +1912,7 @@ W: http://wireless.kernel.org/
1909T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git 1912T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
1910T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git 1913T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
1911S: Maintained 1914S: Maintained
1912F: include/linux/nl80211.h 1915F: include/uapi/linux/nl80211.h
1913F: include/net/cfg80211.h 1916F: include/net/cfg80211.h
1914F: net/wireless/* 1917F: net/wireless/*
1915X: net/wireless/wext* 1918X: net/wireless/wext*
@@ -2012,6 +2015,7 @@ S: Maintained
2012F: Documentation/filesystems/coda.txt 2015F: Documentation/filesystems/coda.txt
2013F: fs/coda/ 2016F: fs/coda/
2014F: include/linux/coda*.h 2017F: include/linux/coda*.h
2018F: include/uapi/linux/coda*.h
2015 2019
2016COMMON CLK FRAMEWORK 2020COMMON CLK FRAMEWORK
2017M: Mike Turquette <mturquette@linaro.org> 2021M: Mike Turquette <mturquette@linaro.org>
@@ -2266,6 +2270,7 @@ W: http://www.cyclades.com/
2266S: Orphan 2270S: Orphan
2267F: drivers/tty/cyclades.c 2271F: drivers/tty/cyclades.c
2268F: include/linux/cyclades.h 2272F: include/linux/cyclades.h
2273F: include/uapi/linux/cyclades.h
2269 2274
2270CYCLADES PC300 DRIVER 2275CYCLADES PC300 DRIVER
2271W: http://www.cyclades.com/ 2276W: http://www.cyclades.com/
@@ -2323,6 +2328,7 @@ L: dccp@vger.kernel.org
2323W: http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp 2328W: http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp
2324S: Maintained 2329S: Maintained
2325F: include/linux/dccp.h 2330F: include/linux/dccp.h
2331F: include/uapi/linux/dccp.h
2326F: include/linux/tfrc.h 2332F: include/linux/tfrc.h
2327F: net/dccp/ 2333F: net/dccp/
2328 2334
@@ -2349,7 +2355,7 @@ M: Massimo Dal Zotto <dz@debian.org>
2349W: http://www.debian.org/~dz/i8k/ 2355W: http://www.debian.org/~dz/i8k/
2350S: Maintained 2356S: Maintained
2351F: drivers/char/i8k.c 2357F: drivers/char/i8k.c
2352F: include/linux/i8k.h 2358F: include/uapi/linux/i8k.h
2353 2359
2354DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas) 2360DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas)
2355M: Doug Warzecha <Douglas_Warzecha@dell.com> 2361M: Doug Warzecha <Douglas_Warzecha@dell.com>
@@ -2422,6 +2428,7 @@ S: Maintained
2422F: Documentation/filesystems/quota.txt 2428F: Documentation/filesystems/quota.txt
2423F: fs/quota/ 2429F: fs/quota/
2424F: include/linux/quota*.h 2430F: include/linux/quota*.h
2431F: include/uapi/linux/quota*.h
2425 2432
2426DISPLAYLINK USB 2.0 FRAMEBUFFER DRIVER (UDLFB) 2433DISPLAYLINK USB 2.0 FRAMEBUFFER DRIVER (UDLFB)
2427M: Bernie Thompson <bernie@plugable.com> 2434M: Bernie Thompson <bernie@plugable.com>
@@ -2528,6 +2535,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
2528S: Maintained 2535S: Maintained
2529F: drivers/gpu/drm/ 2536F: drivers/gpu/drm/
2530F: include/drm/ 2537F: include/drm/
2538F: include/uapi/drm/
2531 2539
2532INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets) 2540INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
2533M: Daniel Vetter <daniel.vetter@ffwll.ch> 2541M: Daniel Vetter <daniel.vetter@ffwll.ch>
@@ -2537,6 +2545,7 @@ T: git git://people.freedesktop.org/~danvet/drm-intel
2537S: Supported 2545S: Supported
2538F: drivers/gpu/drm/i915 2546F: drivers/gpu/drm/i915
2539F: include/drm/i915* 2547F: include/drm/i915*
2548F: include/uapi/drm/i915*
2540 2549
2541DRM DRIVERS FOR EXYNOS 2550DRM DRIVERS FOR EXYNOS
2542M: Inki Dae <inki.dae@samsung.com> 2551M: Inki Dae <inki.dae@samsung.com>
@@ -2548,6 +2557,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
2548S: Supported 2557S: Supported
2549F: drivers/gpu/drm/exynos 2558F: drivers/gpu/drm/exynos
2550F: include/drm/exynos* 2559F: include/drm/exynos*
2560F: include/uapi/drm/exynos*
2551 2561
2552DRM DRIVERS FOR NVIDIA TEGRA 2562DRM DRIVERS FOR NVIDIA TEGRA
2553M: Thierry Reding <thierry.reding@avionic-design.de> 2563M: Thierry Reding <thierry.reding@avionic-design.de>
@@ -2622,7 +2632,7 @@ W: http://github.com/mkrufky
2622Q: http://patchwork.linuxtv.org/project/linux-media/list/ 2632Q: http://patchwork.linuxtv.org/project/linux-media/list/
2623T: git git://linuxtv.org/media_tree.git 2633T: git git://linuxtv.org/media_tree.git
2624S: Maintained 2634S: Maintained
2625F: drivers/media/usb/dvb-usb-v2/cxusb* 2635F: drivers/media/usb/dvb-usb/cxusb*
2626 2636
2627DVB_USB_CYPRESS_FIRMWARE MEDIA DRIVER 2637DVB_USB_CYPRESS_FIRMWARE MEDIA DRIVER
2628M: Antti Palosaari <crope@iki.fi> 2638M: Antti Palosaari <crope@iki.fi>
@@ -2722,6 +2732,7 @@ L: netfilter-devel@vger.kernel.org
2722W: http://ebtables.sourceforge.net/ 2732W: http://ebtables.sourceforge.net/
2723S: Maintained 2733S: Maintained
2724F: include/linux/netfilter_bridge/ebt_*.h 2734F: include/linux/netfilter_bridge/ebt_*.h
2735F: include/uapi/linux/netfilter_bridge/ebt_*.h
2725F: net/bridge/netfilter/ebt*.c 2736F: net/bridge/netfilter/ebt*.c
2726 2737
2727EC100 MEDIA DRIVER 2738EC100 MEDIA DRIVER
@@ -2933,12 +2944,6 @@ M: Maxim Levitsky <maximlevitsky@gmail.com>
2933S: Maintained 2944S: Maintained
2934F: drivers/media/rc/ene_ir.* 2945F: drivers/media/rc/ene_ir.*
2935 2946
2936EPSON 1355 FRAMEBUFFER DRIVER
2937M: Christopher Hoover <ch@murgatroid.com>
2938M: Christopher Hoover <ch@hpl.hp.com>
2939S: Maintained
2940F: drivers/video/epson1355fb.c
2941
2942EPSON S1D13XXX FRAMEBUFFER DRIVER 2947EPSON S1D13XXX FRAMEBUFFER DRIVER
2943M: Kristoffer Ericson <kristoffer.ericson@gmail.com> 2948M: Kristoffer Ericson <kristoffer.ericson@gmail.com>
2944S: Maintained 2949S: Maintained
@@ -3051,6 +3056,7 @@ M: Eric Paris <eparis@redhat.com>
3051S: Maintained 3056S: Maintained
3052F: fs/notify/fanotify/ 3057F: fs/notify/fanotify/
3053F: include/linux/fanotify.h 3058F: include/linux/fanotify.h
3059F: include/uapi/linux/fanotify.h
3054 3060
3055FARSYNC SYNCHRONOUS DRIVER 3061FARSYNC SYNCHRONOUS DRIVER
3056M: Kevin Curtis <kevin.curtis@farsite.co.uk> 3062M: Kevin Curtis <kevin.curtis@farsite.co.uk>
@@ -3074,6 +3080,7 @@ F: drivers/scsi/fcoe/
3074F: include/scsi/fc/ 3080F: include/scsi/fc/
3075F: include/scsi/libfc.h 3081F: include/scsi/libfc.h
3076F: include/scsi/libfcoe.h 3082F: include/scsi/libfcoe.h
3083F: include/uapi/scsi/fc/
3077 3084
3078FILE LOCKING (flock() and fcntl()/lockf()) 3085FILE LOCKING (flock() and fcntl()/lockf())
3079M: Matthew Wilcox <matthew@wil.cx> 3086M: Matthew Wilcox <matthew@wil.cx>
@@ -3081,6 +3088,8 @@ L: linux-fsdevel@vger.kernel.org
3081S: Maintained 3088S: Maintained
3082F: include/linux/fcntl.h 3089F: include/linux/fcntl.h
3083F: include/linux/fs.h 3090F: include/linux/fs.h
3091F: include/uapi/linux/fcntl.h
3092F: include/uapi/linux/fs.h
3084F: fs/fcntl.c 3093F: fs/fcntl.c
3085F: fs/locks.c 3094F: fs/locks.c
3086 3095
@@ -3170,6 +3179,8 @@ F: Documentation/devicetree/bindings/fb/
3170F: drivers/video/ 3179F: drivers/video/
3171F: include/video/ 3180F: include/video/
3172F: include/linux/fb.h 3181F: include/linux/fb.h
3182F: include/uapi/video/
3183F: include/uapi/linux/fb.h
3173 3184
3174FREESCALE DIU FRAMEBUFFER DRIVER 3185FREESCALE DIU FRAMEBUFFER DRIVER
3175M: Timur Tabi <timur@freescale.com> 3186M: Timur Tabi <timur@freescale.com>
@@ -3196,7 +3207,7 @@ M: Sascha Hauer <kernel@pengutronix.de>
3196L: linux-fbdev@vger.kernel.org 3207L: linux-fbdev@vger.kernel.org
3197L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 3208L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
3198S: Maintained 3209S: Maintained
3199F: arch/arm/plat-mxc/include/mach/imxfb.h 3210F: include/linux/platform_data/video-imxfb.h
3200F: drivers/video/imxfb.c 3211F: drivers/video/imxfb.c
3201 3212
3202FREESCALE SOC FS_ENET DRIVER 3213FREESCALE SOC FS_ENET DRIVER
@@ -3273,6 +3284,16 @@ F: Documentation/filesystems/caching/
3273F: fs/fscache/ 3284F: fs/fscache/
3274F: include/linux/fscache*.h 3285F: include/linux/fscache*.h
3275 3286
3287F2FS FILE SYSTEM
3288M: Jaegeuk Kim <jaegeuk.kim@samsung.com>
3289L: linux-f2fs-devel@lists.sourceforge.net
3290W: http://en.wikipedia.org/wiki/F2FS
3291T: git git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git
3292S: Maintained
3293F: Documentation/filesystems/f2fs.txt
3294F: fs/f2fs/
3295F: include/linux/f2fs_fs.h
3296
3276FUJITSU FR-V (FRV) PORT 3297FUJITSU FR-V (FRV) PORT
3277M: David Howells <dhowells@redhat.com> 3298M: David Howells <dhowells@redhat.com>
3278S: Maintained 3299S: Maintained
@@ -3304,7 +3325,7 @@ L: fuse-devel@lists.sourceforge.net
3304W: http://fuse.sourceforge.net/ 3325W: http://fuse.sourceforge.net/
3305S: Maintained 3326S: Maintained
3306F: fs/fuse/ 3327F: fs/fuse/
3307F: include/linux/fuse.h 3328F: include/uapi/linux/fuse.h
3308 3329
3309FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit) 3330FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit)
3310M: Rik Faith <faith@cs.unc.edu> 3331M: Rik Faith <faith@cs.unc.edu>
@@ -3351,6 +3372,7 @@ L: linux-arch@vger.kernel.org
3351T: git git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git 3372T: git git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
3352S: Maintained 3373S: Maintained
3353F: include/asm-generic 3374F: include/asm-generic
3375F: include/uapi/asm-generic
3354 3376
3355GENERIC UIO DRIVER FOR PCI DEVICES 3377GENERIC UIO DRIVER FOR PCI DEVICES
3356M: "Michael S. Tsirkin" <mst@redhat.com> 3378M: "Michael S. Tsirkin" <mst@redhat.com>
@@ -3367,7 +3389,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw.git
3367S: Supported 3389S: Supported
3368F: Documentation/filesystems/gfs2*.txt 3390F: Documentation/filesystems/gfs2*.txt
3369F: fs/gfs2/ 3391F: fs/gfs2/
3370F: include/linux/gfs2_ondisk.h 3392F: include/uapi/linux/gfs2_ondisk.h
3371 3393
3372GIGASET ISDN DRIVERS 3394GIGASET ISDN DRIVERS
3373M: Hansjoerg Lipp <hjlipp@web.de> 3395M: Hansjoerg Lipp <hjlipp@web.de>
@@ -3377,7 +3399,7 @@ W: http://gigaset307x.sourceforge.net/
3377S: Maintained 3399S: Maintained
3378F: Documentation/isdn/README.gigaset 3400F: Documentation/isdn/README.gigaset
3379F: drivers/isdn/gigaset/ 3401F: drivers/isdn/gigaset/
3380F: include/linux/gigaset_dev.h 3402F: include/uapi/linux/gigaset_dev.h
3381 3403
3382GPIO SUBSYSTEM 3404GPIO SUBSYSTEM
3383M: Grant Likely <grant.likely@secretlab.ca> 3405M: Grant Likely <grant.likely@secretlab.ca>
@@ -3534,6 +3556,7 @@ S: Supported
3534F: Documentation/scsi/hpsa.txt 3556F: Documentation/scsi/hpsa.txt
3535F: drivers/scsi/hpsa*.[ch] 3557F: drivers/scsi/hpsa*.[ch]
3536F: include/linux/cciss*.h 3558F: include/linux/cciss*.h
3559F: include/uapi/linux/cciss*.h
3537 3560
3538HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss) 3561HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss)
3539M: Mike Miller <mike.miller@hp.com> 3562M: Mike Miller <mike.miller@hp.com>
@@ -3542,6 +3565,7 @@ S: Supported
3542F: Documentation/blockdev/cciss.txt 3565F: Documentation/blockdev/cciss.txt
3543F: drivers/block/cciss* 3566F: drivers/block/cciss*
3544F: include/linux/cciss_ioctl.h 3567F: include/linux/cciss_ioctl.h
3568F: include/uapi/linux/cciss_ioctl.h
3545 3569
3546HFS FILESYSTEM 3570HFS FILESYSTEM
3547L: linux-fsdevel@vger.kernel.org 3571L: linux-fsdevel@vger.kernel.org
@@ -3576,6 +3600,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git
3576S: Maintained 3600S: Maintained
3577F: drivers/hid/ 3601F: drivers/hid/
3578F: include/linux/hid* 3602F: include/linux/hid*
3603F: include/uapi/linux/hid*
3579 3604
3580HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS 3605HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS
3581M: Thomas Gleixner <tglx@linutronix.de> 3606M: Thomas Gleixner <tglx@linutronix.de>
@@ -3607,7 +3632,7 @@ M: Jes Sorensen <jes@trained-monkey.org>
3607L: linux-hippi@sunsite.dk 3632L: linux-hippi@sunsite.dk
3608S: Maintained 3633S: Maintained
3609F: include/linux/hippidevice.h 3634F: include/linux/hippidevice.h
3610F: include/linux/if_hippi.h 3635F: include/uapi/linux/if_hippi.h
3611F: net/802/hippi.c 3636F: net/802/hippi.c
3612F: drivers/net/hippi/ 3637F: drivers/net/hippi/
3613 3638
@@ -3635,6 +3660,7 @@ S: Maintained
3635F: Documentation/timers/hpet.txt 3660F: Documentation/timers/hpet.txt
3636F: drivers/char/hpet.c 3661F: drivers/char/hpet.c
3637F: include/linux/hpet.h 3662F: include/linux/hpet.h
3663F: include/uapi/linux/hpet.h
3638 3664
3639HPET: x86 3665HPET: x86
3640M: "Venkatesh Pallipadi (Venki)" <venki@google.com> 3666M: "Venkatesh Pallipadi (Venki)" <venki@google.com>
@@ -3735,6 +3761,8 @@ F: Documentation/i2c/
3735F: drivers/i2c/ 3761F: drivers/i2c/
3736F: include/linux/i2c.h 3762F: include/linux/i2c.h
3737F: include/linux/i2c-*.h 3763F: include/linux/i2c-*.h
3764F: include/uapi/linux/i2c.h
3765F: include/uapi/linux/i2c-*.h
3738 3766
3739I2C-TAOS-EVM DRIVER 3767I2C-TAOS-EVM DRIVER
3740M: Jean Delvare <khali@linux-fr.org> 3768M: Jean Delvare <khali@linux-fr.org>
@@ -3850,7 +3878,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git
3850S: Maintained 3878S: Maintained
3851F: net/ieee802154/ 3879F: net/ieee802154/
3852F: net/mac802154/ 3880F: net/mac802154/
3853F: drivers/ieee802154/ 3881F: drivers/net/ieee802154/
3854 3882
3855IGUANAWORKS USB IR TRANSCEIVER 3883IGUANAWORKS USB IR TRANSCEIVER
3856M: Sean Young <sean@mess.org> 3884M: Sean Young <sean@mess.org>
@@ -3901,7 +3929,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git
3901S: Supported 3929S: Supported
3902F: Documentation/infiniband/ 3930F: Documentation/infiniband/
3903F: drivers/infiniband/ 3931F: drivers/infiniband/
3904F: include/linux/if_infiniband.h 3932F: include/uapi/linux/if_infiniband.h
3905 3933
3906INOTIFY 3934INOTIFY
3907M: John McCutchan <john@johnmccutchan.com> 3935M: John McCutchan <john@johnmccutchan.com>
@@ -3911,6 +3939,7 @@ S: Maintained
3911F: Documentation/filesystems/inotify.txt 3939F: Documentation/filesystems/inotify.txt
3912F: fs/notify/inotify/ 3940F: fs/notify/inotify/
3913F: include/linux/inotify.h 3941F: include/linux/inotify.h
3942F: include/uapi/linux/inotify.h
3914 3943
3915INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS 3944INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS
3916M: Dmitry Torokhov <dmitry.torokhov@gmail.com> 3945M: Dmitry Torokhov <dmitry.torokhov@gmail.com>
@@ -3921,6 +3950,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
3921S: Maintained 3950S: Maintained
3922F: drivers/input/ 3951F: drivers/input/
3923F: include/linux/input.h 3952F: include/linux/input.h
3953F: include/uapi/linux/input.h
3924F: include/linux/input/ 3954F: include/linux/input/
3925 3955
3926INPUT MULTITOUCH (MT) PROTOCOL 3956INPUT MULTITOUCH (MT) PROTOCOL
@@ -3941,7 +3971,6 @@ L: linux-scsi@vger.kernel.org
3941T: git git://git.code.sf.net/p/intel-sas/isci 3971T: git git://git.code.sf.net/p/intel-sas/isci
3942S: Supported 3972S: Supported
3943F: drivers/scsi/isci/ 3973F: drivers/scsi/isci/
3944F: firmware/isci/
3945 3974
3946INTEL IDLE DRIVER 3975INTEL IDLE DRIVER
3947M: Len Brown <lenb@kernel.org> 3976M: Len Brown <lenb@kernel.org>
@@ -4036,12 +4065,6 @@ F: Documentation/networking/ixgbe.txt
4036F: Documentation/networking/ixgbevf.txt 4065F: Documentation/networking/ixgbevf.txt
4037F: drivers/net/ethernet/intel/ 4066F: drivers/net/ethernet/intel/
4038 4067
4039INTEL MRST PMU DRIVER
4040M: Len Brown <len.brown@intel.com>
4041L: linux-pm@vger.kernel.org
4042S: Supported
4043F: arch/x86/platform/mrst/pmu.*
4044
4045INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT 4068INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
4046M: Stanislav Yakovlev <stas.yakovlev@gmail.com> 4069M: Stanislav Yakovlev <stas.yakovlev@gmail.com>
4047L: linux-wireless@vger.kernel.org 4070L: linux-wireless@vger.kernel.org
@@ -4070,7 +4093,7 @@ S: Supported
4070W: http://linuxwimax.org 4093W: http://linuxwimax.org
4071F: Documentation/wimax/README.i2400m 4094F: Documentation/wimax/README.i2400m
4072F: drivers/net/wimax/i2400m/ 4095F: drivers/net/wimax/i2400m/
4073F: include/linux/wimax/i2400m.h 4096F: include/uapi/linux/wimax/i2400m.h
4074 4097
4075INTEL WIRELESS 3945ABG/BG, 4965AGN (iwlegacy) 4098INTEL WIRELESS 3945ABG/BG, 4965AGN (iwlegacy)
4076M: Stanislaw Gruszka <sgruszka@redhat.com> 4099M: Stanislaw Gruszka <sgruszka@redhat.com>
@@ -4092,9 +4115,9 @@ INTEL MANAGEMENT ENGINE (mei)
4092M: Tomas Winkler <tomas.winkler@intel.com> 4115M: Tomas Winkler <tomas.winkler@intel.com>
4093L: linux-kernel@vger.kernel.org 4116L: linux-kernel@vger.kernel.org
4094S: Supported 4117S: Supported
4095F: include/linux/mei.h 4118F: include/uapi/linux/mei.h
4096F: drivers/misc/mei/* 4119F: drivers/misc/mei/*
4097F: Documentation/mei/* 4120F: Documentation/misc-devices/mei/*
4098 4121
4099IOC3 ETHERNET DRIVER 4122IOC3 ETHERNET DRIVER
4100M: Ralf Baechle <ralf@linux-mips.org> 4123M: Ralf Baechle <ralf@linux-mips.org>
@@ -4134,6 +4157,7 @@ S: Supported
4134F: Documentation/IPMI.txt 4157F: Documentation/IPMI.txt
4135F: drivers/char/ipmi/ 4158F: drivers/char/ipmi/
4136F: include/linux/ipmi* 4159F: include/linux/ipmi*
4160F: include/uapi/linux/ipmi*
4137 4161
4138IPS SCSI RAID DRIVER 4162IPS SCSI RAID DRIVER
4139M: Adaptec OEM Raid Solutions <aacraid@adaptec.com> 4163M: Adaptec OEM Raid Solutions <aacraid@adaptec.com>
@@ -4151,7 +4175,7 @@ L: lvs-devel@vger.kernel.org
4151S: Maintained 4175S: Maintained
4152F: Documentation/networking/ipvs-sysctl.txt 4176F: Documentation/networking/ipvs-sysctl.txt
4153F: include/net/ip_vs.h 4177F: include/net/ip_vs.h
4154F: include/linux/ip_vs.h 4178F: include/uapi/linux/ip_vs.h
4155F: net/netfilter/ipvs/ 4179F: net/netfilter/ipvs/
4156 4180
4157IPWIRELESS DRIVER 4181IPWIRELESS DRIVER
@@ -4164,8 +4188,8 @@ IPX NETWORK LAYER
4164M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> 4188M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
4165L: netdev@vger.kernel.org 4189L: netdev@vger.kernel.org
4166S: Maintained 4190S: Maintained
4167F: include/linux/ipx.h
4168F: include/net/ipx.h 4191F: include/net/ipx.h
4192F: include/uapi/linux/ipx.h
4169F: net/ipx/ 4193F: net/ipx/
4170 4194
4171IRDA SUBSYSTEM 4195IRDA SUBSYSTEM
@@ -4228,6 +4252,8 @@ F: Documentation/isdn/
4228F: drivers/isdn/ 4252F: drivers/isdn/
4229F: include/linux/isdn.h 4253F: include/linux/isdn.h
4230F: include/linux/isdn/ 4254F: include/linux/isdn/
4255F: include/uapi/linux/isdn.h
4256F: include/uapi/linux/isdn/
4231 4257
4232ISDN SUBSYSTEM (Eicon active card driver) 4258ISDN SUBSYSTEM (Eicon active card driver)
4233M: Armin Schindler <mac@melware.de> 4259M: Armin Schindler <mac@melware.de>
@@ -4268,7 +4294,7 @@ W: http://www.ivtvdriver.org
4268S: Maintained 4294S: Maintained
4269F: Documentation/video4linux/*.ivtv 4295F: Documentation/video4linux/*.ivtv
4270F: drivers/media/pci/ivtv/ 4296F: drivers/media/pci/ivtv/
4271F: include/linux/ivtv* 4297F: include/uapi/linux/ivtv*
4272 4298
4273IX2505V MEDIA DRIVER 4299IX2505V MEDIA DRIVER
4274M: Malcolm Priestley <tvboxspy@gmail.com> 4300M: Malcolm Priestley <tvboxspy@gmail.com>
@@ -4306,7 +4332,7 @@ L: linux-mtd@lists.infradead.org
4306W: http://www.linux-mtd.infradead.org/doc/jffs2.html 4332W: http://www.linux-mtd.infradead.org/doc/jffs2.html
4307S: Maintained 4333S: Maintained
4308F: fs/jffs2/ 4334F: fs/jffs2/
4309F: include/linux/jffs2.h 4335F: include/uapi/linux/jffs2.h
4310 4336
4311JOURNALLING LAYER FOR BLOCK DEVICES (JBD) 4337JOURNALLING LAYER FOR BLOCK DEVICES (JBD)
4312M: Andrew Morton <akpm@linux-foundation.org> 4338M: Andrew Morton <akpm@linux-foundation.org>
@@ -4389,11 +4415,13 @@ W: http://nfs.sourceforge.net/
4389S: Supported 4415S: Supported
4390F: fs/nfsd/ 4416F: fs/nfsd/
4391F: include/linux/nfsd/ 4417F: include/linux/nfsd/
4418F: include/uapi/linux/nfsd/
4392F: fs/lockd/ 4419F: fs/lockd/
4393F: fs/nfs_common/ 4420F: fs/nfs_common/
4394F: net/sunrpc/ 4421F: net/sunrpc/
4395F: include/linux/lockd/ 4422F: include/linux/lockd/
4396F: include/linux/sunrpc/ 4423F: include/linux/sunrpc/
4424F: include/uapi/linux/sunrpc/
4397 4425
4398KERNEL VIRTUAL MACHINE (KVM) 4426KERNEL VIRTUAL MACHINE (KVM)
4399M: Marcelo Tosatti <mtosatti@redhat.com> 4427M: Marcelo Tosatti <mtosatti@redhat.com>
@@ -4405,6 +4433,7 @@ F: Documentation/*/kvm.txt
4405F: arch/*/kvm/ 4433F: arch/*/kvm/
4406F: arch/*/include/asm/kvm* 4434F: arch/*/include/asm/kvm*
4407F: include/linux/kvm* 4435F: include/linux/kvm*
4436F: include/uapi/linux/kvm*
4408F: virt/kvm/ 4437F: virt/kvm/
4409 4438
4410KERNEL VIRTUAL MACHINE (KVM) FOR AMD-V 4439KERNEL VIRTUAL MACHINE (KVM) FOR AMD-V
@@ -4451,6 +4480,7 @@ W: http://kernel.org/pub/linux/utils/kernel/kexec/
4451L: kexec@lists.infradead.org 4480L: kexec@lists.infradead.org
4452S: Maintained 4481S: Maintained
4453F: include/linux/kexec.h 4482F: include/linux/kexec.h
4483F: include/uapi/linux/kexec.h
4454F: kernel/kexec.c 4484F: kernel/kexec.c
4455 4485
4456KEYS/KEYRINGS: 4486KEYS/KEYRINGS:
@@ -4692,6 +4722,7 @@ LLC (802.2)
4692M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> 4722M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
4693S: Maintained 4723S: Maintained
4694F: include/linux/llc.h 4724F: include/linux/llc.h
4725F: include/uapi/linux/llc.h
4695F: include/net/llc* 4726F: include/net/llc*
4696F: net/llc/ 4727F: net/llc/
4697 4728
@@ -4912,7 +4943,7 @@ MATROX FRAMEBUFFER DRIVER
4912L: linux-fbdev@vger.kernel.org 4943L: linux-fbdev@vger.kernel.org
4913S: Orphan 4944S: Orphan
4914F: drivers/video/matrox/matroxfb_* 4945F: drivers/video/matrox/matroxfb_*
4915F: include/linux/matroxfb.h 4946F: include/uapi/linux/matroxfb.h
4916 4947
4917MAX16065 HARDWARE MONITOR DRIVER 4948MAX16065 HARDWARE MONITOR DRIVER
4918M: Guenter Roeck <linux@roeck-us.net> 4949M: Guenter Roeck <linux@roeck-us.net>
@@ -4994,7 +5025,7 @@ T: git git://git.infradead.org/mtd-2.6.git
4994S: Maintained 5025S: Maintained
4995F: drivers/mtd/ 5026F: drivers/mtd/
4996F: include/linux/mtd/ 5027F: include/linux/mtd/
4997F: include/mtd/ 5028F: include/uapi/mtd/
4998 5029
4999MICROBLAZE ARCHITECTURE 5030MICROBLAZE ARCHITECTURE
5000M: Michal Simek <monstr@monstr.eu> 5031M: Michal Simek <monstr@monstr.eu>
@@ -5032,12 +5063,6 @@ F: Documentation/video4linux/meye.txt
5032F: drivers/media/pci/meye/ 5063F: drivers/media/pci/meye/
5033F: include/uapi/linux/meye.h 5064F: include/uapi/linux/meye.h
5034 5065
5035MOTOROLA IMX MMC/SD HOST CONTROLLER INTERFACE DRIVER
5036M: Pavel Pisa <ppisa@pikron.com>
5037L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
5038S: Maintained
5039F: drivers/mmc/host/imxmmc.*
5040
5041MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD 5066MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD
5042M: Jiri Slaby <jirislaby@gmail.com> 5067M: Jiri Slaby <jirislaby@gmail.com>
5043S: Maintained 5068S: Maintained
@@ -5076,6 +5101,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git
5076S: Maintained 5101S: Maintained
5077F: drivers/mmc/ 5102F: drivers/mmc/
5078F: include/linux/mmc/ 5103F: include/linux/mmc/
5104F: include/uapi/linux/mmc/
5079 5105
5080MULTIMEDIA CARD (MMC) ETC. OVER SPI 5106MULTIMEDIA CARD (MMC) ETC. OVER SPI
5081S: Orphan 5107S: Orphan
@@ -5176,6 +5202,8 @@ S: Supported
5176F: include/linux/netfilter* 5202F: include/linux/netfilter*
5177F: include/linux/netfilter/ 5203F: include/linux/netfilter/
5178F: include/net/netfilter/ 5204F: include/net/netfilter/
5205F: include/uapi/linux/netfilter*
5206F: include/uapi/linux/netfilter/
5179F: net/*/netfilter.c 5207F: net/*/netfilter.c
5180F: net/*/netfilter/ 5208F: net/*/netfilter/
5181F: net/netfilter/ 5209F: net/netfilter/
@@ -5194,8 +5222,8 @@ M: Ralf Baechle <ralf@linux-mips.org>
5194L: linux-hams@vger.kernel.org 5222L: linux-hams@vger.kernel.org
5195W: http://www.linux-ax25.org/ 5223W: http://www.linux-ax25.org/
5196S: Maintained 5224S: Maintained
5197F: include/linux/netrom.h
5198F: include/net/netrom.h 5225F: include/net/netrom.h
5226F: include/uapi/linux/netrom.h
5199F: net/netrom/ 5227F: net/netrom/
5200 5228
5201NETWORK BLOCK DEVICE (NBD) 5229NETWORK BLOCK DEVICE (NBD)
@@ -5204,6 +5232,7 @@ S: Maintained
5204F: Documentation/blockdev/nbd.txt 5232F: Documentation/blockdev/nbd.txt
5205F: drivers/block/nbd.c 5233F: drivers/block/nbd.c
5206F: include/linux/nbd.h 5234F: include/linux/nbd.h
5235F: include/uapi/linux/nbd.h
5207 5236
5208NETWORK DROP MONITOR 5237NETWORK DROP MONITOR
5209M: Neil Horman <nhorman@tuxdriver.com> 5238M: Neil Horman <nhorman@tuxdriver.com>
@@ -5225,6 +5254,9 @@ F: include/net/
5225F: include/linux/in.h 5254F: include/linux/in.h
5226F: include/linux/net.h 5255F: include/linux/net.h
5227F: include/linux/netdevice.h 5256F: include/linux/netdevice.h
5257F: include/uapi/linux/in.h
5258F: include/uapi/linux/net.h
5259F: include/uapi/linux/netdevice.h
5228 5260
5229NETWORKING [IPv4/IPv6] 5261NETWORKING [IPv4/IPv6]
5230M: "David S. Miller" <davem@davemloft.net> 5262M: "David S. Miller" <davem@davemloft.net>
@@ -5270,6 +5302,7 @@ F: net/rfkill/
5270F: net/wireless/ 5302F: net/wireless/
5271F: include/net/ieee80211* 5303F: include/net/ieee80211*
5272F: include/linux/wireless.h 5304F: include/linux/wireless.h
5305F: include/uapi/linux/wireless.h
5273F: include/net/iw_handler.h 5306F: include/net/iw_handler.h
5274F: drivers/net/wireless/ 5307F: drivers/net/wireless/
5275 5308
@@ -5289,6 +5322,8 @@ F: include/linux/fcdevice.h
5289F: include/linux/fddidevice.h 5322F: include/linux/fddidevice.h
5290F: include/linux/hippidevice.h 5323F: include/linux/hippidevice.h
5291F: include/linux/inetdevice.h 5324F: include/linux/inetdevice.h
5325F: include/uapi/linux/if_*
5326F: include/uapi/linux/netdevice.h
5292 5327
5293NETXEN (1/10) GbE SUPPORT 5328NETXEN (1/10) GbE SUPPORT
5294M: Sony Chacko <sony.chacko@qlogic.com> 5329M: Sony Chacko <sony.chacko@qlogic.com>
@@ -5306,8 +5341,8 @@ L: linux-wireless@vger.kernel.org
5306L: linux-nfc@lists.01.org (moderated for non-subscribers) 5341L: linux-nfc@lists.01.org (moderated for non-subscribers)
5307S: Maintained 5342S: Maintained
5308F: net/nfc/ 5343F: net/nfc/
5309F: include/linux/nfc.h
5310F: include/net/nfc/ 5344F: include/net/nfc/
5345F: include/uapi/linux/nfc.h
5311F: drivers/nfc/ 5346F: drivers/nfc/
5312F: include/linux/platform_data/pn544.h 5347F: include/linux/platform_data/pn544.h
5313 5348
@@ -5324,6 +5359,8 @@ F: net/sunrpc/
5324F: include/linux/lockd/ 5359F: include/linux/lockd/
5325F: include/linux/nfs* 5360F: include/linux/nfs*
5326F: include/linux/sunrpc/ 5361F: include/linux/sunrpc/
5362F: include/uapi/linux/nfs*
5363F: include/uapi/linux/sunrpc/
5327 5364
5328NI5010 NETWORK DRIVER 5365NI5010 NETWORK DRIVER
5329M: Jan-Pascal van Best <janpascal@vanbest.org> 5366M: Jan-Pascal van Best <janpascal@vanbest.org>
@@ -5385,6 +5422,15 @@ F: arch/arm/*omap*/
5385F: drivers/i2c/busses/i2c-omap.c 5422F: drivers/i2c/busses/i2c-omap.c
5386F: include/linux/i2c-omap.h 5423F: include/linux/i2c-omap.h
5387 5424
5425OMAP DEVICE TREE SUPPORT
5426M: Benoît Cousson <b-cousson@ti.com>
5427M: Tony Lindgren <tony@atomide.com>
5428L: linux-omap@vger.kernel.org
5429L: devicetree-discuss@lists.ozlabs.org (moderated for non-subscribers)
5430S: Maintained
5431F: arch/arm/boot/dts/*omap*
5432F: arch/arm/boot/dts/*am3*
5433
5388OMAP CLOCK FRAMEWORK SUPPORT 5434OMAP CLOCK FRAMEWORK SUPPORT
5389M: Paul Walmsley <paul@pwsan.com> 5435M: Paul Walmsley <paul@pwsan.com>
5390L: linux-omap@vger.kernel.org 5436L: linux-omap@vger.kernel.org
@@ -5504,6 +5550,7 @@ M: Harald Welte <laforge@gnumonks.org>
5504S: Maintained 5550S: Maintained
5505F: drivers/char/pcmcia/cm4000_cs.c 5551F: drivers/char/pcmcia/cm4000_cs.c
5506F: include/linux/cm4000_cs.h 5552F: include/linux/cm4000_cs.h
5553F: include/uapi/linux/cm4000_cs.h
5507 5554
5508OMNIKEY CARDMAN 4040 DRIVER 5555OMNIKEY CARDMAN 4040 DRIVER
5509M: Harald Welte <laforge@gnumonks.org> 5556M: Harald Welte <laforge@gnumonks.org>
@@ -5662,7 +5709,7 @@ S: Orphan
5662F: drivers/parport/ 5709F: drivers/parport/
5663F: include/linux/parport*.h 5710F: include/linux/parport*.h
5664F: drivers/char/ppdev.c 5711F: drivers/char/ppdev.c
5665F: include/linux/ppdev.h 5712F: include/uapi/linux/ppdev.h
5666 5713
5667PARAVIRT_OPS INTERFACE 5714PARAVIRT_OPS INTERFACE
5668M: Jeremy Fitzhardinge <jeremy@goop.org> 5715M: Jeremy Fitzhardinge <jeremy@goop.org>
@@ -5803,11 +5850,11 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
5803S: Supported 5850S: Supported
5804F: kernel/events/* 5851F: kernel/events/*
5805F: include/linux/perf_event.h 5852F: include/linux/perf_event.h
5853F: include/uapi/linux/perf_event.h
5806F: arch/*/kernel/perf_event*.c 5854F: arch/*/kernel/perf_event*.c
5807F: arch/*/kernel/*/perf_event*.c 5855F: arch/*/kernel/*/perf_event*.c
5808F: arch/*/kernel/*/*/perf_event*.c 5856F: arch/*/kernel/*/*/perf_event*.c
5809F: arch/*/include/asm/perf_event.h 5857F: arch/*/include/asm/perf_event.h
5810F: arch/*/lib/perf_event*.c
5811F: arch/*/kernel/perf_callchain.c 5858F: arch/*/kernel/perf_callchain.c
5812F: tools/perf/ 5859F: tools/perf/
5813 5860
@@ -5816,6 +5863,7 @@ M: Christoph Hellwig <hch@infradead.org>
5816L: linux-abi-devel@lists.sourceforge.net 5863L: linux-abi-devel@lists.sourceforge.net
5817S: Maintained 5864S: Maintained
5818F: include/linux/personality.h 5865F: include/linux/personality.h
5866F: include/uapi/linux/personality.h
5819 5867
5820PHONET PROTOCOL 5868PHONET PROTOCOL
5821M: Remi Denis-Courmont <courmisch@gmail.com> 5869M: Remi Denis-Courmont <courmisch@gmail.com>
@@ -5823,6 +5871,7 @@ S: Supported
5823F: Documentation/networking/phonet.txt 5871F: Documentation/networking/phonet.txt
5824F: include/linux/phonet.h 5872F: include/linux/phonet.h
5825F: include/net/phonet/ 5873F: include/net/phonet/
5874F: include/uapi/linux/phonet.h
5826F: net/phonet/ 5875F: net/phonet/
5827 5876
5828PHRAM MTD DRIVER 5877PHRAM MTD DRIVER
@@ -5871,6 +5920,7 @@ M: Jiri Kosina <jkosina@suse.cz>
5871S: Maintained 5920S: Maintained
5872F: drivers/block/pktcdvd.c 5921F: drivers/block/pktcdvd.c
5873F: include/linux/pktcdvd.h 5922F: include/linux/pktcdvd.h
5923F: include/uapi/linux/pktcdvd.h
5874 5924
5875PKUNITY SOC DRIVERS 5925PKUNITY SOC DRIVERS
5876M: Guan Xuetao <gxt@mprc.pku.edu.cn> 5926M: Guan Xuetao <gxt@mprc.pku.edu.cn>
@@ -5945,7 +5995,7 @@ PPP OVER ATM (RFC 2364)
5945M: Mitchell Blank Jr <mitch@sfgoth.com> 5995M: Mitchell Blank Jr <mitch@sfgoth.com>
5946S: Maintained 5996S: Maintained
5947F: net/atm/pppoatm.c 5997F: net/atm/pppoatm.c
5948F: include/linux/atmppp.h 5998F: include/uapi/linux/atmppp.h
5949 5999
5950PPP OVER ETHERNET 6000PPP OVER ETHERNET
5951M: Michal Ostrowski <mostrows@earthlink.net> 6001M: Michal Ostrowski <mostrows@earthlink.net>
@@ -5958,6 +6008,7 @@ M: James Chapman <jchapman@katalix.com>
5958S: Maintained 6008S: Maintained
5959F: net/l2tp/l2tp_ppp.c 6009F: net/l2tp/l2tp_ppp.c
5960F: include/linux/if_pppol2tp.h 6010F: include/linux/if_pppol2tp.h
6011F: include/uapi/linux/if_pppol2tp.h
5961 6012
5962PPS SUPPORT 6013PPS SUPPORT
5963M: Rodolfo Giometti <giometti@enneenne.com> 6014M: Rodolfo Giometti <giometti@enneenne.com>
@@ -6055,6 +6106,7 @@ F: include/asm-generic/syscall.h
6055F: include/linux/ptrace.h 6106F: include/linux/ptrace.h
6056F: include/linux/regset.h 6107F: include/linux/regset.h
6057F: include/linux/tracehook.h 6108F: include/linux/tracehook.h
6109F: include/uapi/linux/ptrace.h
6058F: kernel/ptrace.c 6110F: kernel/ptrace.c
6059 6111
6060PVRUSB2 VIDEO4LINUX DRIVER 6112PVRUSB2 VIDEO4LINUX DRIVER
@@ -6083,7 +6135,6 @@ T: git git://gitorious.org/linux-pwm/linux-pwm.git
6083F: Documentation/pwm.txt 6135F: Documentation/pwm.txt
6084F: Documentation/devicetree/bindings/pwm/ 6136F: Documentation/devicetree/bindings/pwm/
6085F: include/linux/pwm.h 6137F: include/linux/pwm.h
6086F: include/linux/of_pwm.h
6087F: drivers/pwm/ 6138F: drivers/pwm/
6088F: drivers/video/backlight/pwm_bl.c 6139F: drivers/video/backlight/pwm_bl.c
6089F: include/linux/pwm_backlight.h 6140F: include/linux/pwm_backlight.h
@@ -6179,8 +6230,8 @@ M: Anders Larsen <al@alarsen.net>
6179W: http://www.alarsen.net/linux/qnx4fs/ 6230W: http://www.alarsen.net/linux/qnx4fs/
6180S: Maintained 6231S: Maintained
6181F: fs/qnx4/ 6232F: fs/qnx4/
6182F: include/linux/qnx4_fs.h 6233F: include/uapi/linux/qnx4_fs.h
6183F: include/linux/qnxtypes.h 6234F: include/uapi/linux/qnxtypes.h
6184 6235
6185QT1010 MEDIA DRIVER 6236QT1010 MEDIA DRIVER
6186M: Antti Palosaari <crope@iki.fi> 6237M: Antti Palosaari <crope@iki.fi>
@@ -6214,7 +6265,7 @@ M: Benjamin Herrenschmidt <benh@kernel.crashing.org>
6214L: linux-fbdev@vger.kernel.org 6265L: linux-fbdev@vger.kernel.org
6215S: Maintained 6266S: Maintained
6216F: drivers/video/aty/radeon* 6267F: drivers/video/aty/radeon*
6217F: include/linux/radeonfb.h 6268F: include/uapi/linux/radeonfb.h
6218 6269
6219RADIOSHARK RADIO DRIVER 6270RADIOSHARK RADIO DRIVER
6220M: Hans de Goede <hdegoede@redhat.com> 6271M: Hans de Goede <hdegoede@redhat.com>
@@ -6315,6 +6366,7 @@ S: Maintained
6315F: Documentation/rtc.txt 6366F: Documentation/rtc.txt
6316F: drivers/rtc/ 6367F: drivers/rtc/
6317F: include/linux/rtc.h 6368F: include/linux/rtc.h
6369F: include/uapi/linux/rtc.h
6318 6370
6319REISERFS FILE SYSTEM 6371REISERFS FILE SYSTEM
6320L: reiserfs-devel@vger.kernel.org 6372L: reiserfs-devel@vger.kernel.org
@@ -6369,8 +6421,8 @@ M: Ralf Baechle <ralf@linux-mips.org>
6369L: linux-hams@vger.kernel.org 6421L: linux-hams@vger.kernel.org
6370W: http://www.linux-ax25.org/ 6422W: http://www.linux-ax25.org/
6371S: Maintained 6423S: Maintained
6372F: include/linux/rose.h
6373F: include/net/rose.h 6424F: include/net/rose.h
6425F: include/uapi/linux/rose.h
6374F: net/rose/ 6426F: net/rose/
6375 6427
6376RTL2830 MEDIA DRIVER 6428RTL2830 MEDIA DRIVER
@@ -6547,6 +6599,8 @@ S: Supported
6547F: include/linux/clocksource.h 6599F: include/linux/clocksource.h
6548F: include/linux/time.h 6600F: include/linux/time.h
6549F: include/linux/timex.h 6601F: include/linux/timex.h
6602F: include/uapi/linux/time.h
6603F: include/uapi/linux/timex.h
6550F: kernel/time/clocksource.c 6604F: kernel/time/clocksource.c
6551F: kernel/time/time*.c 6605F: kernel/time/time*.c
6552F: kernel/time/ntp.c 6606F: kernel/time/ntp.c
@@ -6571,6 +6625,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
6571S: Maintained 6625S: Maintained
6572F: kernel/sched/ 6626F: kernel/sched/
6573F: include/linux/sched.h 6627F: include/linux/sched.h
6628F: include/uapi/linux/sched.h
6574 6629
6575SCORE ARCHITECTURE 6630SCORE ARCHITECTURE
6576M: Chen Liqin <liqin.chen@sunplusct.com> 6631M: Chen Liqin <liqin.chen@sunplusct.com>
@@ -6724,7 +6779,7 @@ SENSABLE PHANTOM
6724M: Jiri Slaby <jirislaby@gmail.com> 6779M: Jiri Slaby <jirislaby@gmail.com>
6725S: Maintained 6780S: Maintained
6726F: drivers/misc/phantom.c 6781F: drivers/misc/phantom.c
6727F: include/linux/phantom.h 6782F: include/uapi/linux/phantom.h
6728 6783
6729SERIAL ATA (SATA) SUBSYSTEM 6784SERIAL ATA (SATA) SUBSYSTEM
6730M: Jeff Garzik <jgarzik@pobox.com> 6785M: Jeff Garzik <jgarzik@pobox.com>
@@ -6982,6 +7037,7 @@ L: linux-raid@vger.kernel.org
6982S: Supported 7037S: Supported
6983F: drivers/md/ 7038F: drivers/md/
6984F: include/linux/raid/ 7039F: include/linux/raid/
7040F: include/uapi/linux/raid/
6985 7041
6986SONIC NETWORK DRIVER 7042SONIC NETWORK DRIVER
6987M: Thomas Bogendoerfer <tsbogend@alpha.franken.de> 7043M: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
@@ -7022,6 +7078,7 @@ T: git git://git.alsa-project.org/alsa-kernel.git
7022S: Maintained 7078S: Maintained
7023F: Documentation/sound/ 7079F: Documentation/sound/
7024F: include/sound/ 7080F: include/sound/
7081F: include/uapi/sound/
7025F: sound/ 7082F: sound/
7026 7083
7027SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC) 7084SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
@@ -7122,6 +7179,7 @@ S: Maintained
7122F: Documentation/spi/ 7179F: Documentation/spi/
7123F: drivers/spi/ 7180F: drivers/spi/
7124F: include/linux/spi/ 7181F: include/linux/spi/
7182F: include/uapi/linux/spi/
7125 7183
7126SPIDERNET NETWORK DRIVER for CELL 7184SPIDERNET NETWORK DRIVER for CELL
7127M: Ishizaki Kou <kou.ishizaki@toshiba.co.jp> 7185M: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
@@ -7258,7 +7316,7 @@ F: drivers/staging/rtl8712/
7258STAGING - SILICON MOTION SM7XX FRAME BUFFER DRIVER 7316STAGING - SILICON MOTION SM7XX FRAME BUFFER DRIVER
7259M: Teddy Wang <teddy.wang@siliconmotion.com.cn> 7317M: Teddy Wang <teddy.wang@siliconmotion.com.cn>
7260S: Odd Fixes 7318S: Odd Fixes
7261F: drivers/staging/sm7xx/ 7319F: drivers/staging/sm7xxfb/
7262 7320
7263STAGING - SOFTLOGIC 6x10 MPEG CODEC 7321STAGING - SOFTLOGIC 6x10 MPEG CODEC
7264M: Ben Collins <bcollins@bluecherry.net> 7322M: Ben Collins <bcollins@bluecherry.net>
@@ -7384,8 +7442,8 @@ TC CLASSIFIER
7384M: Jamal Hadi Salim <jhs@mojatatu.com> 7442M: Jamal Hadi Salim <jhs@mojatatu.com>
7385L: netdev@vger.kernel.org 7443L: netdev@vger.kernel.org
7386S: Maintained 7444S: Maintained
7387F: include/linux/pkt_cls.h
7388F: include/net/pkt_cls.h 7445F: include/net/pkt_cls.h
7446F: include/uapi/linux/pkt_cls.h
7389F: net/sched/ 7447F: net/sched/
7390 7448
7391TCP LOW PRIORITY MODULE 7449TCP LOW PRIORITY MODULE
@@ -7477,6 +7535,7 @@ L: netdev@vger.kernel.org
7477S: Supported 7535S: Supported
7478F: drivers/net/team/ 7536F: drivers/net/team/
7479F: include/linux/if_team.h 7537F: include/linux/if_team.h
7538F: include/uapi/linux/if_team.h
7480 7539
7481TECHNOTREND USB IR RECEIVER 7540TECHNOTREND USB IR RECEIVER
7482M: Sean Young <sean@mess.org> 7541M: Sean Young <sean@mess.org>
@@ -7575,7 +7634,7 @@ L: netdev@vger.kernel.org (core kernel code)
7575L: tipc-discussion@lists.sourceforge.net (user apps, general discussion) 7634L: tipc-discussion@lists.sourceforge.net (user apps, general discussion)
7576W: http://tipc.sourceforge.net/ 7635W: http://tipc.sourceforge.net/
7577S: Maintained 7636S: Maintained
7578F: include/linux/tipc*.h 7637F: include/uapi/linux/tipc*.h
7579F: net/tipc/ 7638F: net/tipc/
7580 7639
7581TILE ARCHITECTURE 7640TILE ARCHITECTURE
@@ -7625,6 +7684,7 @@ W: http://www.buzzard.org.uk/toshiba/
7625S: Maintained 7684S: Maintained
7626F: drivers/char/toshiba.c 7685F: drivers/char/toshiba.c
7627F: include/linux/toshiba.h 7686F: include/linux/toshiba.h
7687F: include/uapi/linux/toshiba.h
7628 7688
7629TMIO MMC DRIVER 7689TMIO MMC DRIVER
7630M: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 7690M: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
@@ -7692,6 +7752,9 @@ F: drivers/tty/serial/serial_core.c
7692F: include/linux/serial_core.h 7752F: include/linux/serial_core.h
7693F: include/linux/serial.h 7753F: include/linux/serial.h
7694F: include/linux/tty.h 7754F: include/linux/tty.h
7755F: include/uapi/linux/serial_core.h
7756F: include/uapi/linux/serial.h
7757F: include/uapi/linux/tty.h
7695 7758
7696TUA9001 MEDIA DRIVER 7759TUA9001 MEDIA DRIVER
7697M: Antti Palosaari <crope@iki.fi> 7760M: Antti Palosaari <crope@iki.fi>
@@ -7771,7 +7834,7 @@ M: David Herrmann <dh.herrmann@googlemail.com>
7771L: linux-input@vger.kernel.org 7834L: linux-input@vger.kernel.org
7772S: Maintained 7835S: Maintained
7773F: drivers/hid/uhid.c 7836F: drivers/hid/uhid.c
7774F: include/linux/uhid.h 7837F: include/uapi/linux/uhid.h
7775 7838
7776ULTRA-WIDEBAND (UWB) SUBSYSTEM: 7839ULTRA-WIDEBAND (UWB) SUBSYSTEM:
7777L: linux-usb@vger.kernel.org 7840L: linux-usb@vger.kernel.org
@@ -7800,6 +7863,7 @@ S: Maintained
7800F: Documentation/cdrom/ 7863F: Documentation/cdrom/
7801F: drivers/cdrom/cdrom.c 7864F: drivers/cdrom/cdrom.c
7802F: include/linux/cdrom.h 7865F: include/linux/cdrom.h
7866F: include/uapi/linux/cdrom.h
7803 7867
7804UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER 7868UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
7805M: Vinayak Holikatti <vinholikatti@gmail.com> 7869M: Vinayak Holikatti <vinholikatti@gmail.com>
@@ -7817,7 +7881,7 @@ T: git git://git.infradead.org/ubi-2.6.git
7817S: Maintained 7881S: Maintained
7818F: drivers/mtd/ubi/ 7882F: drivers/mtd/ubi/
7819F: include/linux/mtd/ubi.h 7883F: include/linux/mtd/ubi.h
7820F: include/mtd/ubi-user.h 7884F: include/uapi/mtd/ubi-user.h
7821 7885
7822UNSORTED BLOCK IMAGES (UBI) Fastmap 7886UNSORTED BLOCK IMAGES (UBI) Fastmap
7823M: Richard Weinberger <richard@nod.at> 7887M: Richard Weinberger <richard@nod.at>
@@ -7851,7 +7915,7 @@ M: Oliver Neukum <oliver@neukum.org>
7851L: linux-usb@vger.kernel.org 7915L: linux-usb@vger.kernel.org
7852S: Maintained 7916S: Maintained
7853F: drivers/net/usb/cdc_*.c 7917F: drivers/net/usb/cdc_*.c
7854F: include/linux/usb/cdc.h 7918F: include/uapi/linux/usb/cdc.h
7855 7919
7856USB CYPRESS C67X00 DRIVER 7920USB CYPRESS C67X00 DRIVER
7857M: Peter Korsgaard <jacmet@sunsite.dk> 7921M: Peter Korsgaard <jacmet@sunsite.dk>
@@ -8172,6 +8236,7 @@ S: Maintained
8172F: Documentation/vfio.txt 8236F: Documentation/vfio.txt
8173F: drivers/vfio/ 8237F: drivers/vfio/
8174F: include/linux/vfio.h 8238F: include/linux/vfio.h
8239F: include/uapi/linux/vfio.h
8175 8240
8176VIDEOBUF2 FRAMEWORK 8241VIDEOBUF2 FRAMEWORK
8177M: Pawel Osciak <pawel@osciak.com> 8242M: Pawel Osciak <pawel@osciak.com>
@@ -8188,6 +8253,7 @@ L: virtualization@lists.linux-foundation.org
8188S: Maintained 8253S: Maintained
8189F: drivers/char/virtio_console.c 8254F: drivers/char/virtio_console.c
8190F: include/linux/virtio_console.h 8255F: include/linux/virtio_console.h
8256F: include/uapi/linux/virtio_console.h
8191 8257
8192VIRTIO CORE, NET AND BLOCK DRIVERS 8258VIRTIO CORE, NET AND BLOCK DRIVERS
8193M: Rusty Russell <rusty@rustcorp.com.au> 8259M: Rusty Russell <rusty@rustcorp.com.au>
@@ -8206,7 +8272,7 @@ L: virtualization@lists.linux-foundation.org
8206L: netdev@vger.kernel.org 8272L: netdev@vger.kernel.org
8207S: Maintained 8273S: Maintained
8208F: drivers/vhost/ 8274F: drivers/vhost/
8209F: include/linux/vhost.h 8275F: include/uapi/linux/vhost.h
8210 8276
8211VIA RHINE NETWORK DRIVER 8277VIA RHINE NETWORK DRIVER
8212M: Roger Luethi <rl@hellgate.ch> 8278M: Roger Luethi <rl@hellgate.ch>
@@ -8346,6 +8412,7 @@ S: Maintained
8346F: Documentation/watchdog/ 8412F: Documentation/watchdog/
8347F: drivers/watchdog/ 8413F: drivers/watchdog/
8348F: include/linux/watchdog.h 8414F: include/linux/watchdog.h
8415F: include/uapi/linux/watchdog.h
8349 8416
8350WD7000 SCSI DRIVER 8417WD7000 SCSI DRIVER
8351M: Miroslav Zagorac <zaga@fly.cc.fer.hr> 8418M: Miroslav Zagorac <zaga@fly.cc.fer.hr>
@@ -8371,9 +8438,9 @@ L: wimax@linuxwimax.org
8371S: Supported 8438S: Supported
8372W: http://linuxwimax.org 8439W: http://linuxwimax.org
8373F: Documentation/wimax/README.wimax 8440F: Documentation/wimax/README.wimax
8374F: include/linux/wimax.h
8375F: include/linux/wimax/debug.h 8441F: include/linux/wimax/debug.h
8376F: include/net/wimax.h 8442F: include/net/wimax.h
8443F: include/uapi/linux/wimax.h
8377F: net/wimax/ 8444F: net/wimax/
8378 8445
8379WISTRON LAPTOP BUTTON DRIVER 8446WISTRON LAPTOP BUTTON DRIVER
@@ -8491,6 +8558,7 @@ F: drivers/*/xen-*front.c
8491F: drivers/xen/ 8558F: drivers/xen/
8492F: arch/x86/include/asm/xen/ 8559F: arch/x86/include/asm/xen/
8493F: include/xen/ 8560F: include/xen/
8561F: include/uapi/xen/
8494 8562
8495XEN HYPERVISOR ARM 8563XEN HYPERVISOR ARM
8496M: Stefano Stabellini <stefano.stabellini@eu.citrix.com> 8564M: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
diff --git a/Makefile b/Makefile
index 275b9567382c..a1667c4bcce5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 3 1VERSION = 3
2PATCHLEVEL = 8 2PATCHLEVEL = 8
3SUBLEVEL = 0 3SUBLEVEL = 0
4EXTRAVERSION = -rc1 4EXTRAVERSION = -rc3
5NAME = Terrified Chipmunk 5NAME = Terrified Chipmunk
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/arch/alpha/include/asm/parport.h b/arch/alpha/include/asm/parport.h
index c5ee7cbb2fcd..6abd0af11f13 100644
--- a/arch/alpha/include/asm/parport.h
+++ b/arch/alpha/include/asm/parport.h
@@ -9,8 +9,8 @@
9#ifndef _ASM_AXP_PARPORT_H 9#ifndef _ASM_AXP_PARPORT_H
10#define _ASM_AXP_PARPORT_H 1 10#define _ASM_AXP_PARPORT_H 1
11 11
12static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); 12static int parport_pc_find_isa_ports (int autoirq, int autodma);
13static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 13static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
14{ 14{
15 return parport_pc_find_isa_ports (autoirq, autodma); 15 return parport_pc_find_isa_ports (autoirq, autodma);
16} 16}
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index ef757147cbf9..edb4e0097b75 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -59,13 +59,13 @@ struct pci_controller *pci_isa_hose;
59 * Quirks. 59 * Quirks.
60 */ 60 */
61 61
62static void __devinit quirk_isa_bridge(struct pci_dev *dev) 62static void quirk_isa_bridge(struct pci_dev *dev)
63{ 63{
64 dev->class = PCI_CLASS_BRIDGE_ISA << 8; 64 dev->class = PCI_CLASS_BRIDGE_ISA << 8;
65} 65}
66DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge); 66DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge);
67 67
68static void __devinit quirk_cypress(struct pci_dev *dev) 68static void quirk_cypress(struct pci_dev *dev)
69{ 69{
70 /* The Notorious Cy82C693 chip. */ 70 /* The Notorious Cy82C693 chip. */
71 71
@@ -104,7 +104,7 @@ static void __devinit quirk_cypress(struct pci_dev *dev)
104DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress); 104DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress);
105 105
106/* Called for each device after PCI setup is done. */ 106/* Called for each device after PCI setup is done. */
107static void __devinit pcibios_fixup_final(struct pci_dev *dev) 107static void pcibios_fixup_final(struct pci_dev *dev)
108{ 108{
109 unsigned int class = dev->class >> 8; 109 unsigned int class = dev->class >> 8;
110 110
@@ -198,8 +198,7 @@ subsys_initcall(pcibios_init);
198#ifdef ALPHA_RESTORE_SRM_SETUP 198#ifdef ALPHA_RESTORE_SRM_SETUP
199static struct pdev_srm_saved_conf *srm_saved_configs; 199static struct pdev_srm_saved_conf *srm_saved_configs;
200 200
201void __devinit 201void pdev_save_srm_config(struct pci_dev *dev)
202pdev_save_srm_config(struct pci_dev *dev)
203{ 202{
204 struct pdev_srm_saved_conf *tmp; 203 struct pdev_srm_saved_conf *tmp;
205 static int printed = 0; 204 static int printed = 0;
@@ -241,8 +240,7 @@ pci_restore_srm_config(void)
241} 240}
242#endif 241#endif
243 242
244void __devinit 243void pcibios_fixup_bus(struct pci_bus *bus)
245pcibios_fixup_bus(struct pci_bus *bus)
246{ 244{
247 struct pci_dev *dev = bus->self; 245 struct pci_dev *dev = bus->self;
248 246
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index a41ad90a97a6..9603bc234b47 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -68,7 +68,7 @@ enum ipi_message_type {
68}; 68};
69 69
70/* Set to a secondary's cpuid when it comes online. */ 70/* Set to a secondary's cpuid when it comes online. */
71static int smp_secondary_alive __devinitdata = 0; 71static int smp_secondary_alive = 0;
72 72
73int smp_num_probed; /* Internal processor count */ 73int smp_num_probed; /* Internal processor count */
74int smp_num_cpus = 1; /* Number that came online. */ 74int smp_num_cpus = 1; /* Number that came online. */
@@ -172,7 +172,7 @@ smp_callin(void)
172} 172}
173 173
174/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ 174/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
175static int __devinit 175static int
176wait_for_txrdy (unsigned long cpumask) 176wait_for_txrdy (unsigned long cpumask)
177{ 177{
178 unsigned long timeout; 178 unsigned long timeout;
@@ -468,7 +468,7 @@ smp_prepare_cpus(unsigned int max_cpus)
468 smp_num_cpus = smp_num_probed; 468 smp_num_cpus = smp_num_probed;
469} 469}
470 470
471void __devinit 471void
472smp_prepare_boot_cpu(void) 472smp_prepare_boot_cpu(void)
473{ 473{
474} 474}
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c
index 2533db280d9b..5cf4a481b8c5 100644
--- a/arch/alpha/kernel/sys_titan.c
+++ b/arch/alpha/kernel/sys_titan.c
@@ -303,7 +303,7 @@ titan_late_init(void)
303 303
304} 304}
305 305
306static int __devinit 306static int
307titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 307titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
308{ 308{
309 u8 intline; 309 u8 intline;
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f95ba14ae3d0..67874b82a4ed 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -371,7 +371,6 @@ config ARCH_CNS3XXX
371config ARCH_CLPS711X 371config ARCH_CLPS711X
372 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" 372 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
373 select ARCH_REQUIRE_GPIOLIB 373 select ARCH_REQUIRE_GPIOLIB
374 select ARCH_USES_GETTIMEOFFSET
375 select AUTO_ZRELADDR 374 select AUTO_ZRELADDR
376 select CLKDEV_LOOKUP 375 select CLKDEV_LOOKUP
377 select COMMON_CLK 376 select COMMON_CLK
@@ -1230,6 +1229,7 @@ config ARM_ERRATA_430973
1230config ARM_ERRATA_458693 1229config ARM_ERRATA_458693
1231 bool "ARM errata: Processor deadlock when a false hazard is created" 1230 bool "ARM errata: Processor deadlock when a false hazard is created"
1232 depends on CPU_V7 1231 depends on CPU_V7
1232 depends on !ARCH_MULTIPLATFORM
1233 help 1233 help
1234 This option enables the workaround for the 458693 Cortex-A8 (r2p0) 1234 This option enables the workaround for the 458693 Cortex-A8 (r2p0)
1235 erratum. For very specific sequences of memory operations, it is 1235 erratum. For very specific sequences of memory operations, it is
@@ -1243,6 +1243,7 @@ config ARM_ERRATA_458693
1243config ARM_ERRATA_460075 1243config ARM_ERRATA_460075
1244 bool "ARM errata: Data written to the L2 cache can be overwritten with stale data" 1244 bool "ARM errata: Data written to the L2 cache can be overwritten with stale data"
1245 depends on CPU_V7 1245 depends on CPU_V7
1246 depends on !ARCH_MULTIPLATFORM
1246 help 1247 help
1247 This option enables the workaround for the 460075 Cortex-A8 (r2p0) 1248 This option enables the workaround for the 460075 Cortex-A8 (r2p0)
1248 erratum. Any asynchronous access to the L2 cache may encounter a 1249 erratum. Any asynchronous access to the L2 cache may encounter a
@@ -1255,6 +1256,7 @@ config ARM_ERRATA_460075
1255config ARM_ERRATA_742230 1256config ARM_ERRATA_742230
1256 bool "ARM errata: DMB operation may be faulty" 1257 bool "ARM errata: DMB operation may be faulty"
1257 depends on CPU_V7 && SMP 1258 depends on CPU_V7 && SMP
1259 depends on !ARCH_MULTIPLATFORM
1258 help 1260 help
1259 This option enables the workaround for the 742230 Cortex-A9 1261 This option enables the workaround for the 742230 Cortex-A9
1260 (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction 1262 (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction
@@ -1267,6 +1269,7 @@ config ARM_ERRATA_742230
1267config ARM_ERRATA_742231 1269config ARM_ERRATA_742231
1268 bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption" 1270 bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption"
1269 depends on CPU_V7 && SMP 1271 depends on CPU_V7 && SMP
1272 depends on !ARCH_MULTIPLATFORM
1270 help 1273 help
1271 This option enables the workaround for the 742231 Cortex-A9 1274 This option enables the workaround for the 742231 Cortex-A9
1272 (r2p0..r2p2) erratum. Under certain conditions, specific to the 1275 (r2p0..r2p2) erratum. Under certain conditions, specific to the
@@ -1317,6 +1320,7 @@ config PL310_ERRATA_727915
1317config ARM_ERRATA_743622 1320config ARM_ERRATA_743622
1318 bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption" 1321 bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption"
1319 depends on CPU_V7 1322 depends on CPU_V7
1323 depends on !ARCH_MULTIPLATFORM
1320 help 1324 help
1321 This option enables the workaround for the 743622 Cortex-A9 1325 This option enables the workaround for the 743622 Cortex-A9
1322 (r2p*) erratum. Under very rare conditions, a faulty 1326 (r2p*) erratum. Under very rare conditions, a faulty
@@ -1330,6 +1334,7 @@ config ARM_ERRATA_743622
1330config ARM_ERRATA_751472 1334config ARM_ERRATA_751472
1331 bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" 1335 bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation"
1332 depends on CPU_V7 1336 depends on CPU_V7
1337 depends on !ARCH_MULTIPLATFORM
1333 help 1338 help
1334 This option enables the workaround for the 751472 Cortex-A9 (prior 1339 This option enables the workaround for the 751472 Cortex-A9 (prior
1335 to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the 1340 to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index cf6c48a09eac..4c0abe85405f 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -50,17 +50,19 @@
50 ranges; 50 ranges;
51 51
52 serial@d0012000 { 52 serial@d0012000 {
53 compatible = "ns16550"; 53 compatible = "snps,dw-apb-uart";
54 reg = <0xd0012000 0x100>; 54 reg = <0xd0012000 0x100>;
55 reg-shift = <2>; 55 reg-shift = <2>;
56 interrupts = <41>; 56 interrupts = <41>;
57 reg-io-width = <4>;
57 status = "disabled"; 58 status = "disabled";
58 }; 59 };
59 serial@d0012100 { 60 serial@d0012100 {
60 compatible = "ns16550"; 61 compatible = "snps,dw-apb-uart";
61 reg = <0xd0012100 0x100>; 62 reg = <0xd0012100 0x100>;
62 reg-shift = <2>; 63 reg-shift = <2>;
63 interrupts = <42>; 64 interrupts = <42>;
65 reg-io-width = <4>;
64 status = "disabled"; 66 status = "disabled";
65 }; 67 };
66 68
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
index c45c7b4dc352..271855a6e224 100644
--- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
@@ -34,7 +34,14 @@
34 reg = <0>; 34 reg = <0>;
35 clocks = <&cpuclk 0>; 35 clocks = <&cpuclk 0>;
36 }; 36 };
37 } 37
38 cpu@1 {
39 device_type = "cpu";
40 compatible = "marvell,sheeva-v7";
41 reg = <1>;
42 clocks = <&cpuclk 1>;
43 };
44 };
38 45
39 soc { 46 soc {
40 pinctrl { 47 pinctrl {
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
index a2aee5707377..1c1937dbce73 100644
--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
@@ -85,5 +85,13 @@
85 #interrupts-cells = <2>; 85 #interrupts-cells = <2>;
86 interrupts = <24>; 86 interrupts = <24>;
87 }; 87 };
88
89 ethernet@d0034000 {
90 compatible = "marvell,armada-370-neta";
91 reg = <0xd0034000 0x2500>;
92 interrupts = <14>;
93 clocks = <&gateclk 1>;
94 status = "disabled";
95 };
88 }; 96 };
89}; 97};
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
index da03a129243a..4905cf3a5ef8 100644
--- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
@@ -100,5 +100,13 @@
100 #interrupts-cells = <2>; 100 #interrupts-cells = <2>;
101 interrupts = <24>; 101 interrupts = <24>;
102 }; 102 };
103
104 ethernet@d0034000 {
105 compatible = "marvell,armada-370-neta";
106 reg = <0xd0034000 0x2500>;
107 interrupts = <14>;
108 clocks = <&gateclk 1>;
109 status = "disabled";
110 };
103 }; 111 };
104 }; 112 };
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 367aa3f94912..2e37ef101c90 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -42,17 +42,19 @@
42 42
43 soc { 43 soc {
44 serial@d0012200 { 44 serial@d0012200 {
45 compatible = "ns16550"; 45 compatible = "snps,dw-apb-uart";
46 reg = <0xd0012200 0x100>; 46 reg = <0xd0012200 0x100>;
47 reg-shift = <2>; 47 reg-shift = <2>;
48 interrupts = <43>; 48 interrupts = <43>;
49 reg-io-width = <4>;
49 status = "disabled"; 50 status = "disabled";
50 }; 51 };
51 serial@d0012300 { 52 serial@d0012300 {
52 compatible = "ns16550"; 53 compatible = "snps,dw-apb-uart";
53 reg = <0xd0012300 0x100>; 54 reg = <0xd0012300 0x100>;
54 reg-shift = <2>; 55 reg-shift = <2>;
55 interrupts = <44>; 56 interrupts = <44>;
57 reg-io-width = <4>;
56 status = "disabled"; 58 status = "disabled";
57 }; 59 };
58 60
@@ -93,14 +95,6 @@
93 status = "disabled"; 95 status = "disabled";
94 }; 96 };
95 97
96 ethernet@d0034000 {
97 compatible = "marvell,armada-370-neta";
98 reg = <0xd0034000 0x2500>;
99 interrupts = <14>;
100 clocks = <&gateclk 1>;
101 status = "disabled";
102 };
103
104 xor@d0060900 { 98 xor@d0060900 {
105 compatible = "marvell,orion-xor"; 99 compatible = "marvell,orion-xor";
106 reg = <0xd0060900 0x100 100 reg = <0xd0060900 0x100
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index 2efd9c891bc9..63f2fbcfe819 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -170,7 +170,9 @@
170 gpio-bank = <8>; 170 gpio-bank = <8>;
171 }; 171 };
172 172
173 pinctrl { 173 pinctrl@80157000 {
174 // This is actually the PRCMU base address
175 reg = <0x80157000 0x2000>;
174 compatible = "stericsson,nmk_pinctrl"; 176 compatible = "stericsson,nmk_pinctrl";
175 }; 177 };
176 178
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index f3f7e9d8adca..42eac1ff3cc8 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -117,6 +117,7 @@
117 pinctrl: pinctrl@d0200 { 117 pinctrl: pinctrl@d0200 {
118 compatible = "marvell,dove-pinctrl"; 118 compatible = "marvell,dove-pinctrl";
119 reg = <0xd0200 0x10>; 119 reg = <0xd0200 0x10>;
120 clocks = <&gate_clk 22>;
120 }; 121 };
121 122
122 spi0: spi@10600 { 123 spi0: spi@10600 {
diff --git a/arch/arm/boot/dts/ecx-2000.dts b/arch/arm/boot/dts/ecx-2000.dts
index 46477ac1de99..139b40cc3a23 100644
--- a/arch/arm/boot/dts/ecx-2000.dts
+++ b/arch/arm/boot/dts/ecx-2000.dts
@@ -32,6 +32,7 @@
32 32
33 cpu@0 { 33 cpu@0 {
34 compatible = "arm,cortex-a15"; 34 compatible = "arm,cortex-a15";
35 device_type = "cpu";
35 reg = <0>; 36 reg = <0>;
36 clocks = <&a9pll>; 37 clocks = <&a9pll>;
37 clock-names = "cpu"; 38 clock-names = "cpu";
@@ -39,6 +40,7 @@
39 40
40 cpu@1 { 41 cpu@1 {
41 compatible = "arm,cortex-a15"; 42 compatible = "arm,cortex-a15";
43 device_type = "cpu";
42 reg = <1>; 44 reg = <1>;
43 clocks = <&a9pll>; 45 clocks = <&a9pll>;
44 clock-names = "cpu"; 46 clock-names = "cpu";
@@ -46,6 +48,7 @@
46 48
47 cpu@2 { 49 cpu@2 {
48 compatible = "arm,cortex-a15"; 50 compatible = "arm,cortex-a15";
51 device_type = "cpu";
49 reg = <2>; 52 reg = <2>;
50 clocks = <&a9pll>; 53 clocks = <&a9pll>;
51 clock-names = "cpu"; 54 clock-names = "cpu";
@@ -53,6 +56,7 @@
53 56
54 cpu@3 { 57 cpu@3 {
55 compatible = "arm,cortex-a15"; 58 compatible = "arm,cortex-a15";
59 device_type = "cpu";
56 reg = <3>; 60 reg = <3>;
57 clocks = <&a9pll>; 61 clocks = <&a9pll>;
58 clock-names = "cpu"; 62 clock-names = "cpu";
diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts
index 9b23a8255e39..f63490707f3a 100644
--- a/arch/arm/boot/dts/exynos4210-smdkv310.dts
+++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts
@@ -26,7 +26,7 @@
26 }; 26 };
27 27
28 chosen { 28 chosen {
29 bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC2,115200 init=/linuxrc"; 29 bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc";
30 }; 30 };
31 31
32 sdhci@12530000 { 32 sdhci@12530000 {
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 2e3b6efaf1a2..3acf594ea60b 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -574,7 +574,7 @@
574 574
575 hdmi { 575 hdmi {
576 compatible = "samsung,exynos5-hdmi"; 576 compatible = "samsung,exynos5-hdmi";
577 reg = <0x14530000 0x100000>; 577 reg = <0x14530000 0x70000>;
578 interrupts = <0 95 0>; 578 interrupts = <0 95 0>;
579 }; 579 };
580 580
diff --git a/arch/arm/boot/dts/exynos5440-ssdk5440.dts b/arch/arm/boot/dts/exynos5440-ssdk5440.dts
index 921c83cf694f..81e2c964a900 100644
--- a/arch/arm/boot/dts/exynos5440-ssdk5440.dts
+++ b/arch/arm/boot/dts/exynos5440-ssdk5440.dts
@@ -21,7 +21,7 @@
21 }; 21 };
22 22
23 chosen { 23 chosen {
24 bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC2,115200 init=/linuxrc"; 24 bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC0,115200 init=/linuxrc";
25 }; 25 };
26 26
27 spi { 27 spi {
diff --git a/arch/arm/boot/dts/highbank.dts b/arch/arm/boot/dts/highbank.dts
index a9ae5d32e80d..5927a8df5625 100644
--- a/arch/arm/boot/dts/highbank.dts
+++ b/arch/arm/boot/dts/highbank.dts
@@ -30,33 +30,37 @@
30 #address-cells = <1>; 30 #address-cells = <1>;
31 #size-cells = <0>; 31 #size-cells = <0>;
32 32
33 cpu@0 { 33 cpu@900 {
34 compatible = "arm,cortex-a9"; 34 compatible = "arm,cortex-a9";
35 reg = <0>; 35 device_type = "cpu";
36 reg = <0x900>;
36 next-level-cache = <&L2>; 37 next-level-cache = <&L2>;
37 clocks = <&a9pll>; 38 clocks = <&a9pll>;
38 clock-names = "cpu"; 39 clock-names = "cpu";
39 }; 40 };
40 41
41 cpu@1 { 42 cpu@901 {
42 compatible = "arm,cortex-a9"; 43 compatible = "arm,cortex-a9";
43 reg = <1>; 44 device_type = "cpu";
45 reg = <0x901>;
44 next-level-cache = <&L2>; 46 next-level-cache = <&L2>;
45 clocks = <&a9pll>; 47 clocks = <&a9pll>;
46 clock-names = "cpu"; 48 clock-names = "cpu";
47 }; 49 };
48 50
49 cpu@2 { 51 cpu@902 {
50 compatible = "arm,cortex-a9"; 52 compatible = "arm,cortex-a9";
51 reg = <2>; 53 device_type = "cpu";
54 reg = <0x902>;
52 next-level-cache = <&L2>; 55 next-level-cache = <&L2>;
53 clocks = <&a9pll>; 56 clocks = <&a9pll>;
54 clock-names = "cpu"; 57 clock-names = "cpu";
55 }; 58 };
56 59
57 cpu@3 { 60 cpu@903 {
58 compatible = "arm,cortex-a9"; 61 compatible = "arm,cortex-a9";
59 reg = <3>; 62 device_type = "cpu";
63 reg = <0x903>;
60 next-level-cache = <&L2>; 64 next-level-cache = <&L2>;
61 clocks = <&a9pll>; 65 clocks = <&a9pll>;
62 clock-names = "cpu"; 66 clock-names = "cpu";
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts
index 7c43b8e70b9f..e7484e4ea659 100644
--- a/arch/arm/boot/dts/imx23-olinuxino.dts
+++ b/arch/arm/boot/dts/imx23-olinuxino.dts
@@ -39,17 +39,17 @@
39 hog_pins_a: hog@0 { 39 hog_pins_a: hog@0 {
40 reg = <0>; 40 reg = <0>;
41 fsl,pinmux-ids = < 41 fsl,pinmux-ids = <
42 0x2013 /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ 42 0x0113 /* MX23_PAD_GPMI_ALE__GPIO_0_17 */
43 >; 43 >;
44 fsl,drive-strength = <0>; 44 fsl,drive-strength = <0>;
45 fsl,voltage = <1>; 45 fsl,voltage = <1>;
46 fsl,pull-up = <0>; 46 fsl,pull-up = <0>;
47 }; 47 };
48 48
49 led_pin_gpio0_17: led_gpio0_17@0 { 49 led_pin_gpio2_1: led_gpio2_1@0 {
50 reg = <0>; 50 reg = <0>;
51 fsl,pinmux-ids = < 51 fsl,pinmux-ids = <
52 0x0113 /* MX23_PAD_GPMI_ALE__GPIO_0_17 */ 52 0x2013 /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */
53 >; 53 >;
54 fsl,drive-strength = <0>; 54 fsl,drive-strength = <0>;
55 fsl,voltage = <1>; 55 fsl,voltage = <1>;
@@ -110,7 +110,7 @@
110 leds { 110 leds {
111 compatible = "gpio-leds"; 111 compatible = "gpio-leds";
112 pinctrl-names = "default"; 112 pinctrl-names = "default";
113 pinctrl-0 = <&led_pin_gpio0_17>; 113 pinctrl-0 = <&led_pin_gpio2_1>;
114 114
115 user { 115 user {
116 label = "green"; 116 label = "green";
diff --git a/arch/arm/boot/dts/imx31-bug.dts b/arch/arm/boot/dts/imx31-bug.dts
index 24731cb78e8e..7f67402328d3 100644
--- a/arch/arm/boot/dts/imx31-bug.dts
+++ b/arch/arm/boot/dts/imx31-bug.dts
@@ -14,7 +14,7 @@
14 14
15/ { 15/ {
16 model = "Buglabs i.MX31 Bug 1.x"; 16 model = "Buglabs i.MX31 Bug 1.x";
17 compatible = "fsl,imx31-bug", "fsl,imx31"; 17 compatible = "buglabs,imx31-bug", "fsl,imx31";
18 18
19 memory { 19 memory {
20 reg = <0x80000000 0x8000000>; /* 128M */ 20 reg = <0x80000000 0x8000000>; /* 128M */
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 552aed4ff982..edc3f1eb6699 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -492,7 +492,7 @@
492 compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; 492 compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
493 reg = <0x53fcc000 0x4000>; 493 reg = <0x53fcc000 0x4000>;
494 interrupts = <83>; 494 interrupts = <83>;
495 clocks = <&clks 158>, <&clks 157>; 495 clocks = <&clks 87>, <&clks 86>;
496 clock-names = "ipg", "per"; 496 clock-names = "ipg", "per";
497 status = "disabled"; 497 status = "disabled";
498 }; 498 };
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi
index 9ae2004d5675..4ccea2130a6c 100644
--- a/arch/arm/boot/dts/kirkwood-6282.dtsi
+++ b/arch/arm/boot/dts/kirkwood-6282.dtsi
@@ -39,6 +39,7 @@
39 #size-cells = <0>; 39 #size-cells = <0>;
40 interrupts = <32>; 40 interrupts = <32>;
41 clock-frequency = <100000>; 41 clock-frequency = <100000>;
42 clocks = <&gate_clk 7>;
42 status = "disabled"; 43 status = "disabled";
43 }; 44 };
44 }; 45 };
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
index c0de5a7f660d..cd15452a52a6 100644
--- a/arch/arm/boot/dts/kirkwood-topkick.dts
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -82,4 +82,21 @@
82 gpios = <&gpio1 16 1>; 82 gpios = <&gpio1 16 1>;
83 }; 83 };
84 }; 84 };
85 regulators {
86 compatible = "simple-bus";
87 #address-cells = <1>;
88 #size-cells = <0>;
89
90 sata0_power: regulator@1 {
91 compatible = "regulator-fixed";
92 reg = <1>;
93 regulator-name = "SATA0 Power";
94 regulator-min-microvolt = <5000000>;
95 regulator-max-microvolt = <5000000>;
96 enable-active-high;
97 regulator-always-on;
98 regulator-boot-on;
99 gpio = <&gpio1 4 0>;
100 };
101 };
85}; 102};
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 7735cee4a9c6..110d6cbb795b 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -144,6 +144,7 @@
144 compatible = "marvell,orion-ehci"; 144 compatible = "marvell,orion-ehci";
145 reg = <0x50000 0x1000>; 145 reg = <0x50000 0x1000>;
146 interrupts = <19>; 146 interrupts = <19>;
147 clocks = <&gate_clk 3>;
147 status = "okay"; 148 status = "okay";
148 }; 149 };
149 150
diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi
index 63411b036932..ed0bc9546837 100644
--- a/arch/arm/boot/dts/twl4030.dtsi
+++ b/arch/arm/boot/dts/twl4030.dtsi
@@ -19,6 +19,10 @@
19 interrupts = <11>; 19 interrupts = <11>;
20 }; 20 };
21 21
22 watchdog {
23 compatible = "ti,twl4030-wdt";
24 };
25
22 vdac: regulator-vdac { 26 vdac: regulator-vdac {
23 compatible = "ti,twl4030-vdac"; 27 compatible = "ti,twl4030-vdac";
24 regulator-min-microvolt = <1800000>; 28 regulator-min-microvolt = <1800000>;
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 9173d112ea01..e57d7e5bf96a 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -686,8 +686,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
686 * %-EINVAL no platform data passed 686 * %-EINVAL no platform data passed
687 * %0 successful. 687 * %0 successful.
688 */ 688 */
689static int __devinit 689static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
690__sa1111_probe(struct device *me, struct resource *mem, int irq)
691{ 690{
692 struct sa1111_platform_data *pd = me->platform_data; 691 struct sa1111_platform_data *pd = me->platform_data;
693 struct sa1111 *sachip; 692 struct sa1111 *sachip;
@@ -1011,7 +1010,7 @@ static int sa1111_resume(struct platform_device *dev)
1011#define sa1111_resume NULL 1010#define sa1111_resume NULL
1012#endif 1011#endif
1013 1012
1014static int __devinit sa1111_probe(struct platform_device *pdev) 1013static int sa1111_probe(struct platform_device *pdev)
1015{ 1014{
1016 struct resource *mem; 1015 struct resource *mem;
1017 int irq; 1016 int irq;
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index 0c616d5fcb0f..a5c3dc38aa18 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -176,7 +176,7 @@ static int scoop_resume(struct platform_device *dev)
176#define scoop_resume NULL 176#define scoop_resume NULL
177#endif 177#endif
178 178
179static int __devinit scoop_probe(struct platform_device *pdev) 179static int scoop_probe(struct platform_device *pdev)
180{ 180{
181 struct scoop_dev *devptr; 181 struct scoop_dev *devptr;
182 struct scoop_config *inf; 182 struct scoop_config *inf;
@@ -243,7 +243,7 @@ err_ioremap:
243 return ret; 243 return ret;
244} 244}
245 245
246static int __devexit scoop_remove(struct platform_device *pdev) 246static int scoop_remove(struct platform_device *pdev)
247{ 247{
248 struct scoop_dev *sdev = platform_get_drvdata(pdev); 248 struct scoop_dev *sdev = platform_get_drvdata(pdev);
249 int ret; 249 int ret;
@@ -268,7 +268,7 @@ static int __devexit scoop_remove(struct platform_device *pdev)
268 268
269static struct platform_driver scoop_driver = { 269static struct platform_driver scoop_driver = {
270 .probe = scoop_probe, 270 .probe = scoop_probe,
271 .remove = __devexit_p(scoop_remove), 271 .remove = scoop_remove,
272 .suspend = scoop_suspend, 272 .suspend = scoop_suspend,
273 .resume = scoop_resume, 273 .resume = scoop_resume,
274 .driver = { 274 .driver = {
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index e4df17ca90c7..8f324b99416e 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -206,6 +206,7 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
206 struct device_node *node) 206 struct device_node *node)
207{ 207{
208 struct vic_device *v; 208 struct vic_device *v;
209 int i;
209 210
210 if (vic_id >= ARRAY_SIZE(vic_devices)) { 211 if (vic_id >= ARRAY_SIZE(vic_devices)) {
211 printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); 212 printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__);
@@ -220,6 +221,10 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
220 vic_id++; 221 vic_id++;
221 v->domain = irq_domain_add_simple(node, fls(valid_sources), irq, 222 v->domain = irq_domain_add_simple(node, fls(valid_sources), irq,
222 &vic_irqdomain_ops, v); 223 &vic_irqdomain_ops, v);
224 /* create an IRQ mapping for each valid IRQ */
225 for (i = 0; i < fls(valid_sources); i++)
226 if (valid_sources & (1 << i))
227 irq_create_mapping(v->domain, i);
223} 228}
224 229
225static void vic_ack_irq(struct irq_data *d) 230static void vic_ack_irq(struct irq_data *d)
@@ -416,9 +421,9 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
416 return -EIO; 421 return -EIO;
417 422
418 /* 423 /*
419 * Passing -1 as first IRQ makes the simple domain allocate descriptors 424 * Passing 0 as first IRQ makes the simple domain allocate descriptors
420 */ 425 */
421 __vic_init(regs, -1, ~0, ~0, node); 426 __vic_init(regs, 0, ~0, ~0, node);
422 427
423 return 0; 428 return 0;
424} 429}
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index dbea6f4efe9f..2eeff1e64b6e 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -6,6 +6,7 @@ CONFIG_MACH_ARMADA_370=y
6CONFIG_MACH_ARMADA_XP=y 6CONFIG_MACH_ARMADA_XP=y
7CONFIG_ARCH_HIGHBANK=y 7CONFIG_ARCH_HIGHBANK=y
8CONFIG_ARCH_SOCFPGA=y 8CONFIG_ARCH_SOCFPGA=y
9CONFIG_ARCH_SUNXI=y
9# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set 10# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set
10CONFIG_ARM_ERRATA_754322=y 11CONFIG_ARM_ERRATA_754322=y
11CONFIG_SMP=y 12CONFIG_SMP=y
diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig
index a702fb345c01..b5bc96cb65a7 100644
--- a/arch/arm/configs/mvebu_defconfig
+++ b/arch/arm/configs/mvebu_defconfig
@@ -33,9 +33,7 @@ CONFIG_MVNETA=y
33CONFIG_MARVELL_PHY=y 33CONFIG_MARVELL_PHY=y
34CONFIG_SERIAL_8250=y 34CONFIG_SERIAL_8250=y
35CONFIG_SERIAL_8250_CONSOLE=y 35CONFIG_SERIAL_8250_CONSOLE=y
36CONFIG_SERIAL_OF_PLATFORM=y 36CONFIG_SERIAL_8250_DW=y
37CONFIG_I2C=y
38CONFIG_I2C_MV64XXX=y
39CONFIG_GPIOLIB=y 37CONFIG_GPIOLIB=y
40CONFIG_GPIO_SYSFS=y 38CONFIG_GPIO_SYSFS=y
41# CONFIG_USB_SUPPORT is not set 39# CONFIG_USB_SUPPORT is not set
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index a1dc5c071e71..82ce8d738fa1 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -65,6 +65,8 @@ CONFIG_MAC80211_RC_PID=y
65CONFIG_MAC80211_RC_DEFAULT_PID=y 65CONFIG_MAC80211_RC_DEFAULT_PID=y
66CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 66CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
67CONFIG_CONNECTOR=y 67CONFIG_CONNECTOR=y
68CONFIG_DEVTMPFS=y
69CONFIG_DEVTMPFS_MOUNT=y
68CONFIG_MTD=y 70CONFIG_MTD=y
69CONFIG_MTD_CMDLINE_PARTS=y 71CONFIG_MTD_CMDLINE_PARTS=y
70CONFIG_MTD_CHAR=y 72CONFIG_MTD_CHAR=y
@@ -132,9 +134,11 @@ CONFIG_POWER_SUPPLY=y
132CONFIG_WATCHDOG=y 134CONFIG_WATCHDOG=y
133CONFIG_OMAP_WATCHDOG=y 135CONFIG_OMAP_WATCHDOG=y
134CONFIG_TWL4030_WATCHDOG=y 136CONFIG_TWL4030_WATCHDOG=y
137CONFIG_MFD_TPS65217=y
135CONFIG_REGULATOR_TWL4030=y 138CONFIG_REGULATOR_TWL4030=y
136CONFIG_REGULATOR_TPS65023=y 139CONFIG_REGULATOR_TPS65023=y
137CONFIG_REGULATOR_TPS6507X=y 140CONFIG_REGULATOR_TPS6507X=y
141CONFIG_REGULATOR_TPS65217=y
138CONFIG_FB=y 142CONFIG_FB=y
139CONFIG_FIRMWARE_EDID=y 143CONFIG_FIRMWARE_EDID=y
140CONFIG_FB_MODE_HELPERS=y 144CONFIG_FB_MODE_HELPERS=y
@@ -170,6 +174,7 @@ CONFIG_SND_DEBUG=y
170CONFIG_SND_USB_AUDIO=m 174CONFIG_SND_USB_AUDIO=m
171CONFIG_SND_SOC=m 175CONFIG_SND_SOC=m
172CONFIG_SND_OMAP_SOC=m 176CONFIG_SND_OMAP_SOC=m
177CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
173CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m 178CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
174CONFIG_USB=y 179CONFIG_USB=y
175CONFIG_USB_DEBUG=y 180CONFIG_USB_DEBUG=y
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 9b722612553d..379cf3292390 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -78,7 +78,7 @@ void pcibios_report_status(u_int status_mask, int warn)
78 * Bug 3 is responsible for the sound DMA grinding to a halt. We now 78 * Bug 3 is responsible for the sound DMA grinding to a halt. We now
79 * live with bug 2. 79 * live with bug 2.
80 */ 80 */
81static void __devinit pci_fixup_83c553(struct pci_dev *dev) 81static void pci_fixup_83c553(struct pci_dev *dev)
82{ 82{
83 /* 83 /*
84 * Set memory region to start at address 0, and enable IO 84 * Set memory region to start at address 0, and enable IO
@@ -130,7 +130,7 @@ static void __devinit pci_fixup_83c553(struct pci_dev *dev)
130} 130}
131DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553, pci_fixup_83c553); 131DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553, pci_fixup_83c553);
132 132
133static void __devinit pci_fixup_unassign(struct pci_dev *dev) 133static void pci_fixup_unassign(struct pci_dev *dev)
134{ 134{
135 dev->resource[0].end -= dev->resource[0].start; 135 dev->resource[0].end -= dev->resource[0].start;
136 dev->resource[0].start = 0; 136 dev->resource[0].start = 0;
@@ -142,7 +142,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940F,
142 * if it is the host bridge by marking it as such. These resources are of 142 * if it is the host bridge by marking it as such. These resources are of
143 * no consequence to the PCI layer (they are handled elsewhere). 143 * no consequence to the PCI layer (they are handled elsewhere).
144 */ 144 */
145static void __devinit pci_fixup_dec21285(struct pci_dev *dev) 145static void pci_fixup_dec21285(struct pci_dev *dev)
146{ 146{
147 int i; 147 int i;
148 148
@@ -161,7 +161,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, pci_fixup_d
161/* 161/*
162 * PCI IDE controllers use non-standard I/O port decoding, respect it. 162 * PCI IDE controllers use non-standard I/O port decoding, respect it.
163 */ 163 */
164static void __devinit pci_fixup_ide_bases(struct pci_dev *dev) 164static void pci_fixup_ide_bases(struct pci_dev *dev)
165{ 165{
166 struct resource *r; 166 struct resource *r;
167 int i; 167 int i;
@@ -182,7 +182,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
182/* 182/*
183 * Put the DEC21142 to sleep 183 * Put the DEC21142 to sleep
184 */ 184 */
185static void __devinit pci_fixup_dec21142(struct pci_dev *dev) 185static void pci_fixup_dec21142(struct pci_dev *dev)
186{ 186{
187 pci_write_config_dword(dev, 0x40, 0x80000000); 187 pci_write_config_dword(dev, 0x40, 0x80000000);
188} 188}
@@ -204,7 +204,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, pci_fixup_d
204 * functional. However, The CY82C693U _does not work_ in bus 204 * functional. However, The CY82C693U _does not work_ in bus
205 * master mode without locking the PCI bus solid. 205 * master mode without locking the PCI bus solid.
206 */ 206 */
207static void __devinit pci_fixup_cy82c693(struct pci_dev *dev) 207static void pci_fixup_cy82c693(struct pci_dev *dev)
208{ 208{
209 if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { 209 if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
210 u32 base0, base1; 210 u32 base0, base1;
@@ -254,7 +254,7 @@ static void __devinit pci_fixup_cy82c693(struct pci_dev *dev)
254} 254}
255DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693); 255DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693);
256 256
257static void __devinit pci_fixup_it8152(struct pci_dev *dev) 257static void pci_fixup_it8152(struct pci_dev *dev)
258{ 258{
259 int i; 259 int i;
260 /* fixup for ITE 8152 devices */ 260 /* fixup for ITE 8152 devices */
@@ -361,9 +361,7 @@ void pcibios_fixup_bus(struct pci_bus *bus)
361 printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", 361 printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n",
362 bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); 362 bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis");
363} 363}
364#ifdef CONFIG_HOTPLUG
365EXPORT_SYMBOL(pcibios_fixup_bus); 364EXPORT_SYMBOL(pcibios_fixup_bus);
366#endif
367 365
368/* 366/*
369 * Swizzle the device pin each time we cross a bridge. If a platform does 367 * Swizzle the device pin each time we cross a bridge. If a platform does
@@ -380,7 +378,7 @@ EXPORT_SYMBOL(pcibios_fixup_bus);
380 * PCI standard swizzle is implemented on plug-in cards and Cardbus based 378 * PCI standard swizzle is implemented on plug-in cards and Cardbus based
381 * PCI extenders, so it can not be ignored. 379 * PCI extenders, so it can not be ignored.
382 */ 380 */
383static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) 381static u8 pcibios_swizzle(struct pci_dev *dev, u8 *pin)
384{ 382{
385 struct pci_sys_data *sys = dev->sysdata; 383 struct pci_sys_data *sys = dev->sysdata;
386 int slot, oldpin = *pin; 384 int slot, oldpin = *pin;
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c
index 36d20bd50120..9b6de8c988f3 100644
--- a/arch/arm/kernel/etm.c
+++ b/arch/arm/kernel/etm.c
@@ -339,7 +339,7 @@ static struct miscdevice etb_miscdev = {
339 .fops = &etb_fops, 339 .fops = &etb_fops,
340}; 340};
341 341
342static int __devinit etb_probe(struct amba_device *dev, const struct amba_id *id) 342static int etb_probe(struct amba_device *dev, const struct amba_id *id)
343{ 343{
344 struct tracectx *t = &tracer; 344 struct tracectx *t = &tracer;
345 int ret = 0; 345 int ret = 0;
@@ -531,7 +531,7 @@ static ssize_t trace_mode_store(struct kobject *kobj,
531static struct kobj_attribute trace_mode_attr = 531static struct kobj_attribute trace_mode_attr =
532 __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); 532 __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store);
533 533
534static int __devinit etm_probe(struct amba_device *dev, const struct amba_id *id) 534static int etm_probe(struct amba_device *dev, const struct amba_id *id)
535{ 535{
536 struct tracectx *t = &tracer; 536 struct tracectx *t = &tracer;
537 int ret = 0; 537 int ret = 0;
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
index 9a4f6307a016..5f6620684e25 100644
--- a/arch/arm/kernel/perf_event_cpu.c
+++ b/arch/arm/kernel/perf_event_cpu.c
@@ -132,7 +132,7 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler)
132 return 0; 132 return 0;
133} 133}
134 134
135static void __devinit cpu_pmu_init(struct arm_pmu *cpu_pmu) 135static void cpu_pmu_init(struct arm_pmu *cpu_pmu)
136{ 136{
137 int cpu; 137 int cpu;
138 for_each_possible_cpu(cpu) { 138 for_each_possible_cpu(cpu) {
@@ -178,7 +178,7 @@ static struct notifier_block __cpuinitdata cpu_pmu_hotplug_notifier = {
178/* 178/*
179 * PMU platform driver and devicetree bindings. 179 * PMU platform driver and devicetree bindings.
180 */ 180 */
181static struct of_device_id __devinitdata cpu_pmu_of_device_ids[] = { 181static struct of_device_id cpu_pmu_of_device_ids[] = {
182 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, 182 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init},
183 {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init}, 183 {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init},
184 {.compatible = "arm,cortex-a8-pmu", .data = armv7_a8_pmu_init}, 184 {.compatible = "arm,cortex-a8-pmu", .data = armv7_a8_pmu_init},
@@ -190,7 +190,7 @@ static struct of_device_id __devinitdata cpu_pmu_of_device_ids[] = {
190 {}, 190 {},
191}; 191};
192 192
193static struct platform_device_id __devinitdata cpu_pmu_plat_device_ids[] = { 193static struct platform_device_id cpu_pmu_plat_device_ids[] = {
194 {.name = "arm-pmu"}, 194 {.name = "arm-pmu"},
195 {}, 195 {},
196}; 196};
@@ -198,7 +198,7 @@ static struct platform_device_id __devinitdata cpu_pmu_plat_device_ids[] = {
198/* 198/*
199 * CPU PMU identification and probing. 199 * CPU PMU identification and probing.
200 */ 200 */
201static int __devinit probe_current_pmu(struct arm_pmu *pmu) 201static int probe_current_pmu(struct arm_pmu *pmu)
202{ 202{
203 int cpu = get_cpu(); 203 int cpu = get_cpu();
204 unsigned long cpuid = read_cpuid_id(); 204 unsigned long cpuid = read_cpuid_id();
@@ -252,7 +252,7 @@ static int __devinit probe_current_pmu(struct arm_pmu *pmu)
252 return ret; 252 return ret;
253} 253}
254 254
255static int __devinit cpu_pmu_device_probe(struct platform_device *pdev) 255static int cpu_pmu_device_probe(struct platform_device *pdev)
256{ 256{
257 const struct of_device_id *of_id; 257 const struct of_device_id *of_id;
258 int (*init_fn)(struct arm_pmu *); 258 int (*init_fn)(struct arm_pmu *);
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c
index f3e22ff8b6a2..041d0526a288 100644
--- a/arch/arm/kernel/perf_event_v6.c
+++ b/arch/arm/kernel/perf_event_v6.c
@@ -653,7 +653,7 @@ static int armv6_map_event(struct perf_event *event)
653 &armv6_perf_cache_map, 0xFF); 653 &armv6_perf_cache_map, 0xFF);
654} 654}
655 655
656static int __devinit armv6pmu_init(struct arm_pmu *cpu_pmu) 656static int armv6pmu_init(struct arm_pmu *cpu_pmu)
657{ 657{
658 cpu_pmu->name = "v6"; 658 cpu_pmu->name = "v6";
659 cpu_pmu->handle_irq = armv6pmu_handle_irq; 659 cpu_pmu->handle_irq = armv6pmu_handle_irq;
@@ -685,7 +685,7 @@ static int armv6mpcore_map_event(struct perf_event *event)
685 &armv6mpcore_perf_cache_map, 0xFF); 685 &armv6mpcore_perf_cache_map, 0xFF);
686} 686}
687 687
688static int __devinit armv6mpcore_pmu_init(struct arm_pmu *cpu_pmu) 688static int armv6mpcore_pmu_init(struct arm_pmu *cpu_pmu)
689{ 689{
690 cpu_pmu->name = "v6mpcore"; 690 cpu_pmu->name = "v6mpcore";
691 cpu_pmu->handle_irq = armv6pmu_handle_irq; 691 cpu_pmu->handle_irq = armv6pmu_handle_irq;
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index 7d0cce85d17e..4fbc757d9cff 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -1226,7 +1226,7 @@ static void armv7pmu_init(struct arm_pmu *cpu_pmu)
1226 cpu_pmu->max_period = (1LLU << 32) - 1; 1226 cpu_pmu->max_period = (1LLU << 32) - 1;
1227}; 1227};
1228 1228
1229static u32 __devinit armv7_read_num_pmnc_events(void) 1229static u32 armv7_read_num_pmnc_events(void)
1230{ 1230{
1231 u32 nb_cnt; 1231 u32 nb_cnt;
1232 1232
@@ -1237,7 +1237,7 @@ static u32 __devinit armv7_read_num_pmnc_events(void)
1237 return nb_cnt + 1; 1237 return nb_cnt + 1;
1238} 1238}
1239 1239
1240static int __devinit armv7_a8_pmu_init(struct arm_pmu *cpu_pmu) 1240static int armv7_a8_pmu_init(struct arm_pmu *cpu_pmu)
1241{ 1241{
1242 armv7pmu_init(cpu_pmu); 1242 armv7pmu_init(cpu_pmu);
1243 cpu_pmu->name = "ARMv7 Cortex-A8"; 1243 cpu_pmu->name = "ARMv7 Cortex-A8";
@@ -1246,7 +1246,7 @@ static int __devinit armv7_a8_pmu_init(struct arm_pmu *cpu_pmu)
1246 return 0; 1246 return 0;
1247} 1247}
1248 1248
1249static int __devinit armv7_a9_pmu_init(struct arm_pmu *cpu_pmu) 1249static int armv7_a9_pmu_init(struct arm_pmu *cpu_pmu)
1250{ 1250{
1251 armv7pmu_init(cpu_pmu); 1251 armv7pmu_init(cpu_pmu);
1252 cpu_pmu->name = "ARMv7 Cortex-A9"; 1252 cpu_pmu->name = "ARMv7 Cortex-A9";
@@ -1255,7 +1255,7 @@ static int __devinit armv7_a9_pmu_init(struct arm_pmu *cpu_pmu)
1255 return 0; 1255 return 0;
1256} 1256}
1257 1257
1258static int __devinit armv7_a5_pmu_init(struct arm_pmu *cpu_pmu) 1258static int armv7_a5_pmu_init(struct arm_pmu *cpu_pmu)
1259{ 1259{
1260 armv7pmu_init(cpu_pmu); 1260 armv7pmu_init(cpu_pmu);
1261 cpu_pmu->name = "ARMv7 Cortex-A5"; 1261 cpu_pmu->name = "ARMv7 Cortex-A5";
@@ -1264,7 +1264,7 @@ static int __devinit armv7_a5_pmu_init(struct arm_pmu *cpu_pmu)
1264 return 0; 1264 return 0;
1265} 1265}
1266 1266
1267static int __devinit armv7_a15_pmu_init(struct arm_pmu *cpu_pmu) 1267static int armv7_a15_pmu_init(struct arm_pmu *cpu_pmu)
1268{ 1268{
1269 armv7pmu_init(cpu_pmu); 1269 armv7pmu_init(cpu_pmu);
1270 cpu_pmu->name = "ARMv7 Cortex-A15"; 1270 cpu_pmu->name = "ARMv7 Cortex-A15";
@@ -1274,7 +1274,7 @@ static int __devinit armv7_a15_pmu_init(struct arm_pmu *cpu_pmu)
1274 return 0; 1274 return 0;
1275} 1275}
1276 1276
1277static int __devinit armv7_a7_pmu_init(struct arm_pmu *cpu_pmu) 1277static int armv7_a7_pmu_init(struct arm_pmu *cpu_pmu)
1278{ 1278{
1279 armv7pmu_init(cpu_pmu); 1279 armv7pmu_init(cpu_pmu);
1280 cpu_pmu->name = "ARMv7 Cortex-A7"; 1280 cpu_pmu->name = "ARMv7 Cortex-A7";
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c
index 0c8265e53d5f..2b0fe30ec12e 100644
--- a/arch/arm/kernel/perf_event_xscale.c
+++ b/arch/arm/kernel/perf_event_xscale.c
@@ -440,7 +440,7 @@ static int xscale_map_event(struct perf_event *event)
440 &xscale_perf_cache_map, 0xFF); 440 &xscale_perf_cache_map, 0xFF);
441} 441}
442 442
443static int __devinit xscale1pmu_init(struct arm_pmu *cpu_pmu) 443static int xscale1pmu_init(struct arm_pmu *cpu_pmu)
444{ 444{
445 cpu_pmu->name = "xscale1"; 445 cpu_pmu->name = "xscale1";
446 cpu_pmu->handle_irq = xscale1pmu_handle_irq; 446 cpu_pmu->handle_irq = xscale1pmu_handle_irq;
@@ -810,7 +810,7 @@ static inline void xscale2pmu_write_counter(struct perf_event *event, u32 val)
810 } 810 }
811} 811}
812 812
813static int __devinit xscale2pmu_init(struct arm_pmu *cpu_pmu) 813static int xscale2pmu_init(struct arm_pmu *cpu_pmu)
814{ 814{
815 cpu_pmu->name = "xscale2"; 815 cpu_pmu->name = "xscale2";
816 cpu_pmu->handle_irq = xscale2pmu_handle_irq; 816 cpu_pmu->handle_irq = xscale2pmu_handle_irq;
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 9211e8800c79..6e2f1631df5b 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -358,7 +358,7 @@ static int cpld_video_probe(struct i2c_client *client,
358 return 0; 358 return 0;
359} 359}
360 360
361static int __devexit cpld_video_remove(struct i2c_client *client) 361static int cpld_video_remove(struct i2c_client *client)
362{ 362{
363 cpld_client = NULL; 363 cpld_client = NULL;
364 return 0; 364 return 0;
diff --git a/arch/arm/mach-davinci/cdce949.c b/arch/arm/mach-davinci/cdce949.c
index f2232ca6d070..abafb92031c0 100644
--- a/arch/arm/mach-davinci/cdce949.c
+++ b/arch/arm/mach-davinci/cdce949.c
@@ -256,7 +256,7 @@ static int cdce_probe(struct i2c_client *client,
256 return 0; 256 return 0;
257} 257}
258 258
259static int __devexit cdce_remove(struct i2c_client *client) 259static int cdce_remove(struct i2c_client *client)
260{ 260{
261 cdce_i2c_client = NULL; 261 cdce_i2c_client = NULL;
262 return 0; 262 return 0;
@@ -274,7 +274,7 @@ static struct i2c_driver cdce_driver = {
274 .name = "cdce949", 274 .name = "cdce949",
275 }, 275 },
276 .probe = cdce_probe, 276 .probe = cdce_probe,
277 .remove = __devexit_p(cdce_remove), 277 .remove = cdce_remove,
278 .id_table = cdce_id, 278 .id_table = cdce_id,
279}; 279};
280 280
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c
index 0ef4435b1657..8a275f297522 100644
--- a/arch/arm/mach-dove/pcie.c
+++ b/arch/arm/mach-dove/pcie.c
@@ -135,7 +135,7 @@ static struct pci_ops pcie_ops = {
135 .write = pcie_wr_conf, 135 .write = pcie_wr_conf,
136}; 136};
137 137
138static void __devinit rc_pci_fixup(struct pci_dev *dev) 138static void rc_pci_fixup(struct pci_dev *dev)
139{ 139{
140 /* 140 /*
141 * Prevent enumeration of root complex. 141 * Prevent enumeration of root complex.
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 91d5b6f1d5af..e103c290bc9e 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -74,6 +74,8 @@ config SOC_EXYNOS5440
74 depends on ARCH_EXYNOS5 74 depends on ARCH_EXYNOS5
75 select ARM_ARCH_TIMER 75 select ARM_ARCH_TIMER
76 select AUTO_ZRELADDR 76 select AUTO_ZRELADDR
77 select PINCTRL
78 select PINCTRL_EXYNOS5440
77 help 79 help
78 Enable EXYNOS5440 SoC support 80 Enable EXYNOS5440 SoC support
79 81
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index d6d0dc651089..1a89824a5f78 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -424,11 +424,18 @@ static void __init exynos5_init_clocks(int xtal)
424{ 424{
425 printk(KERN_DEBUG "%s: initializing clocks\n", __func__); 425 printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
426 426
427 /* EXYNOS5440 can support only common clock framework */
428
429 if (soc_is_exynos5440())
430 return;
431
432#ifdef CONFIG_SOC_EXYNOS5250
427 s3c24xx_register_baseclocks(xtal); 433 s3c24xx_register_baseclocks(xtal);
428 s5p_register_clocks(xtal); 434 s5p_register_clocks(xtal);
429 435
430 exynos5_register_clocks(); 436 exynos5_register_clocks();
431 exynos5_setup_clocks(); 437 exynos5_setup_clocks();
438#endif
432} 439}
433 440
434#define COMBINER_ENABLE_SET 0x0 441#define COMBINER_ENABLE_SET 0x0
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index dc248167d206..981dc1e1da51 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -135,7 +135,7 @@ static struct sys_timer highbank_timer = {
135 135
136static void highbank_power_off(void) 136static void highbank_power_off(void)
137{ 137{
138 hignbank_set_pwr_shutdown(); 138 highbank_set_pwr_shutdown();
139 139
140 while (1) 140 while (1)
141 cpu_do_idle(); 141 cpu_do_idle();
diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c
index 7b60faccd551..f30c52843396 100644
--- a/arch/arm/mach-highbank/hotplug.c
+++ b/arch/arm/mach-highbank/hotplug.c
@@ -30,7 +30,7 @@ void __ref highbank_cpu_die(unsigned int cpu)
30{ 30{
31 flush_cache_all(); 31 flush_cache_all();
32 32
33 highbank_set_cpu_jump(cpu, secondary_startup); 33 highbank_set_cpu_jump(cpu, phys_to_virt(0));
34 highbank_set_core_pwr(); 34 highbank_set_core_pwr();
35 35
36 cpu_do_idle(); 36 cpu_do_idle();
diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c
index 1129957f6c1d..4ecc864ac8b9 100644
--- a/arch/arm/mach-highbank/platsmp.c
+++ b/arch/arm/mach-highbank/platsmp.c
@@ -32,6 +32,7 @@ static void __cpuinit highbank_secondary_init(unsigned int cpu)
32 32
33static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle) 33static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)
34{ 34{
35 highbank_set_cpu_jump(cpu, secondary_startup);
35 gic_raise_softirq(cpumask_of(cpu), 0); 36 gic_raise_softirq(cpumask_of(cpu), 0);
36 return 0; 37 return 0;
37} 38}
@@ -61,19 +62,8 @@ static void __init highbank_smp_init_cpus(void)
61 62
62static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) 63static void __init highbank_smp_prepare_cpus(unsigned int max_cpus)
63{ 64{
64 int i;
65
66 if (scu_base_addr) 65 if (scu_base_addr)
67 scu_enable(scu_base_addr); 66 scu_enable(scu_base_addr);
68
69 /*
70 * Write the address of secondary startup into the jump table
71 * The cores are in wfi and wait until they receive a soft interrupt
72 * and a non-zero value to jump to. Then the secondary CPU branches
73 * to this address.
74 */
75 for (i = 1; i < max_cpus; i++)
76 highbank_set_cpu_jump(i, secondary_startup);
77} 67}
78 68
79struct smp_operations highbank_smp_ops __initdata = { 69struct smp_operations highbank_smp_ops __initdata = {
diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c
index 74aa135966f0..04eddb4f4380 100644
--- a/arch/arm/mach-highbank/pm.c
+++ b/arch/arm/mach-highbank/pm.c
@@ -14,10 +14,12 @@
14 * this program. If not, see <http://www.gnu.org/licenses/>. 14 * this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#include <linux/cpu_pm.h>
17#include <linux/init.h> 18#include <linux/init.h>
18#include <linux/io.h> 19#include <linux/io.h>
19#include <linux/suspend.h> 20#include <linux/suspend.h>
20 21
22#include <asm/cacheflush.h>
21#include <asm/proc-fns.h> 23#include <asm/proc-fns.h>
22#include <asm/suspend.h> 24#include <asm/suspend.h>
23 25
@@ -26,16 +28,31 @@
26 28
27static int highbank_suspend_finish(unsigned long val) 29static int highbank_suspend_finish(unsigned long val)
28{ 30{
31 outer_flush_all();
32 outer_disable();
33
34 highbank_set_pwr_suspend();
35
29 cpu_do_idle(); 36 cpu_do_idle();
37
38 highbank_clear_pwr_request();
30 return 0; 39 return 0;
31} 40}
32 41
33static int highbank_pm_enter(suspend_state_t state) 42static int highbank_pm_enter(suspend_state_t state)
34{ 43{
35 hignbank_set_pwr_suspend(); 44 cpu_pm_enter();
45 cpu_cluster_pm_enter();
46
36 highbank_set_cpu_jump(0, cpu_resume); 47 highbank_set_cpu_jump(0, cpu_resume);
37 cpu_suspend(0, highbank_suspend_finish); 48 cpu_suspend(0, highbank_suspend_finish);
38 49
50 cpu_cluster_pm_exit();
51 cpu_pm_exit();
52
53 highbank_smc1(0x102, 0x1);
54 if (scu_base_addr)
55 scu_enable(scu_base_addr);
39 return 0; 56 return 0;
40} 57}
41 58
diff --git a/arch/arm/mach-highbank/sysregs.h b/arch/arm/mach-highbank/sysregs.h
index e13e8ea7c6cb..70af9d13fcef 100644
--- a/arch/arm/mach-highbank/sysregs.h
+++ b/arch/arm/mach-highbank/sysregs.h
@@ -44,28 +44,43 @@ static inline void highbank_set_core_pwr(void)
44 writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu)); 44 writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu));
45} 45}
46 46
47static inline void hignbank_set_pwr_suspend(void) 47static inline void highbank_clear_core_pwr(void)
48{
49 int cpu = cpu_logical_map(smp_processor_id());
50 if (scu_base_addr)
51 scu_power_mode(scu_base_addr, SCU_PM_NORMAL);
52 else
53 writel_relaxed(0, sregs_base + SREG_CPU_PWR_CTRL(cpu));
54}
55
56static inline void highbank_set_pwr_suspend(void)
48{ 57{
49 writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); 58 writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ);
50 highbank_set_core_pwr(); 59 highbank_set_core_pwr();
51} 60}
52 61
53static inline void hignbank_set_pwr_shutdown(void) 62static inline void highbank_set_pwr_shutdown(void)
54{ 63{
55 writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ); 64 writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ);
56 highbank_set_core_pwr(); 65 highbank_set_core_pwr();
57} 66}
58 67
59static inline void hignbank_set_pwr_soft_reset(void) 68static inline void highbank_set_pwr_soft_reset(void)
60{ 69{
61 writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ); 70 writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
62 highbank_set_core_pwr(); 71 highbank_set_core_pwr();
63} 72}
64 73
65static inline void hignbank_set_pwr_hard_reset(void) 74static inline void highbank_set_pwr_hard_reset(void)
66{ 75{
67 writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ); 76 writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
68 highbank_set_core_pwr(); 77 highbank_set_core_pwr();
69} 78}
70 79
80static inline void highbank_clear_pwr_request(void)
81{
82 writel(~0UL, sregs_base + HB_SREG_A9_PWR_REQ);
83 highbank_clear_core_pwr();
84}
85
71#endif 86#endif
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c
index aed96ad9bd4a..37d8384dcf19 100644
--- a/arch/arm/mach-highbank/system.c
+++ b/arch/arm/mach-highbank/system.c
@@ -22,9 +22,9 @@
22void highbank_restart(char mode, const char *cmd) 22void highbank_restart(char mode, const char *cmd)
23{ 23{
24 if (mode == 'h') 24 if (mode == 'h')
25 hignbank_set_pwr_hard_reset(); 25 highbank_set_pwr_hard_reset();
26 else 26 else
27 hignbank_set_pwr_soft_reset(); 27 highbank_set_pwr_soft_reset();
28 28
29 while (1) 29 while (1)
30 cpu_do_idle(); 30 cpu_do_idle();
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 1ad0d76de8c7..3e628fd7a674 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -841,8 +841,6 @@ config SOC_IMX6Q
841 select ARCH_HAS_CPUFREQ 841 select ARCH_HAS_CPUFREQ
842 select ARCH_HAS_OPP 842 select ARCH_HAS_OPP
843 select ARM_CPU_SUSPEND if PM 843 select ARM_CPU_SUSPEND if PM
844 select ARM_ERRATA_743622
845 select ARM_ERRATA_751472
846 select ARM_ERRATA_754322 844 select ARM_ERRATA_754322
847 select ARM_ERRATA_764369 if SMP 845 select ARM_ERRATA_764369 if SMP
848 select ARM_ERRATA_775420 846 select ARM_ERRATA_775420
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c
index 36e8b3994470..d8c75c3c925d 100644
--- a/arch/arm/mach-imx/cpufreq.c
+++ b/arch/arm/mach-imx/cpufreq.c
@@ -188,7 +188,7 @@ static struct cpufreq_driver mxc_driver = {
188 .name = "imx", 188 .name = "imx",
189}; 189};
190 190
191static int __devinit mxc_cpufreq_driver_init(void) 191static int mxc_cpufreq_driver_init(void)
192{ 192{
193 return cpufreq_register_driver(&mxc_driver); 193 return cpufreq_register_driver(&mxc_driver);
194} 194}
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index c461e98496c3..7a9686ad994c 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -21,7 +21,7 @@
21#define BP_MMDC_MAPSR_PSD 0 21#define BP_MMDC_MAPSR_PSD 0
22#define BP_MMDC_MAPSR_PSS 4 22#define BP_MMDC_MAPSR_PSS 4
23 23
24static int __devinit imx_mmdc_probe(struct platform_device *pdev) 24static int imx_mmdc_probe(struct platform_device *pdev)
25{ 25{
26 struct device_node *np = pdev->dev.of_node; 26 struct device_node *np = pdev->dev.of_node;
27 void __iomem *mmdc_base, *reg; 27 void __iomem *mmdc_base, *reg;
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c
index 2f28018c4447..9082b84aeebb 100644
--- a/arch/arm/mach-iop13xx/pci.c
+++ b/arch/arm/mach-iop13xx/pci.c
@@ -504,7 +504,7 @@ iop13xx_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
504 504
505/* Scan an IOP13XX PCI bus. nr selects which ATU we use. 505/* Scan an IOP13XX PCI bus. nr selects which ATU we use.
506 */ 506 */
507struct pci_bus * __devinit iop13xx_scan_bus(int nr, struct pci_sys_data *sys) 507struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *sys)
508{ 508{
509 int which_atu; 509 int which_atu;
510 struct pci_bus *bus = NULL; 510 struct pci_bus *bus = NULL;
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index ff4150a2ad05..de4fd2bb1e27 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -67,6 +67,10 @@ static void __init kirkwood_legacy_clk_init(void)
67 orion_clkdev_add(NULL, "mv643xx_eth_port.1", 67 orion_clkdev_add(NULL, "mv643xx_eth_port.1",
68 of_clk_get_from_provider(&clkspec)); 68 of_clk_get_from_provider(&clkspec));
69 69
70 clkspec.args[0] = CGC_BIT_SDIO;
71 orion_clkdev_add(NULL, "mvsdio",
72 of_clk_get_from_provider(&clkspec));
73
70} 74}
71 75
72static void __init kirkwood_of_clk_init(void) 76static void __init kirkwood_of_clk_init(void)
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c
index 15e69fcde9f4..23d2dd1b1b1e 100644
--- a/arch/arm/mach-kirkwood/board-usi_topkick.c
+++ b/arch/arm/mach-kirkwood/board-usi_topkick.c
@@ -64,8 +64,6 @@ static unsigned int topkick_mpp_config[] __initdata = {
64 0 64 0
65}; 65};
66 66
67#define TOPKICK_SATA0_PWR_ENABLE 36
68
69void __init usi_topkick_init(void) 67void __init usi_topkick_init(void)
70{ 68{
71 /* 69 /*
@@ -73,8 +71,6 @@ void __init usi_topkick_init(void)
73 */ 71 */
74 kirkwood_mpp_conf(topkick_mpp_config); 72 kirkwood_mpp_conf(topkick_mpp_config);
75 73
76 /* SATA0 power enable */
77 gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1);
78 74
79 kirkwood_ge00_init(&topkick_ge00_data); 75 kirkwood_ge00_init(&topkick_ge00_data);
80 kirkwood_sdio_init(&topkick_mvsdio_data); 76 kirkwood_sdio_init(&topkick_mvsdio_data);
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
index ef102646ba9a..a1c3ab6fc809 100644
--- a/arch/arm/mach-kirkwood/pcie.c
+++ b/arch/arm/mach-kirkwood/pcie.c
@@ -214,7 +214,7 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
214 * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on 214 * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on
215 * the device. Decoding setup is handled by the orion code. 215 * the device. Decoding setup is handled by the orion code.
216 */ 216 */
217static void __devinit rc_pci_fixup(struct pci_dev *dev) 217static void rc_pci_fixup(struct pci_dev *dev)
218{ 218{
219 if (dev->bus->parent == NULL && dev->devfn == 0) { 219 if (dev->bus->parent == NULL && dev->devfn == 0) {
220 int i; 220 int i;
diff --git a/arch/arm/mach-ks8695/board-acs5k.c b/arch/arm/mach-ks8695/board-acs5k.c
index 255502ddd879..b0c306ccbc6e 100644
--- a/arch/arm/mach-ks8695/board-acs5k.c
+++ b/arch/arm/mach-ks8695/board-acs5k.c
@@ -92,7 +92,7 @@ static struct i2c_board_info acs5k_i2c_devs[] __initdata = {
92 }, 92 },
93}; 93};
94 94
95static void __devinit acs5k_i2c_init(void) 95static void acs5k_i2c_init(void)
96{ 96{
97 /* The gpio interface */ 97 /* The gpio interface */
98 platform_device_register(&acs5k_i2c_device); 98 platform_device_register(&acs5k_i2c_device);
diff --git a/arch/arm/mach-mmp/sram.c b/arch/arm/mach-mmp/sram.c
index a6c08ede4491..bf5e64906e65 100644
--- a/arch/arm/mach-mmp/sram.c
+++ b/arch/arm/mach-mmp/sram.c
@@ -61,7 +61,7 @@ struct gen_pool *sram_get_gpool(char *pool_name)
61} 61}
62EXPORT_SYMBOL(sram_get_gpool); 62EXPORT_SYMBOL(sram_get_gpool);
63 63
64static int __devinit sram_probe(struct platform_device *pdev) 64static int sram_probe(struct platform_device *pdev)
65{ 65{
66 struct sram_platdata *pdata = pdev->dev.platform_data; 66 struct sram_platdata *pdata = pdev->dev.platform_data;
67 struct sram_bank_info *info; 67 struct sram_bank_info *info;
@@ -125,7 +125,7 @@ out:
125 return ret; 125 return ret;
126} 126}
127 127
128static int __devexit sram_remove(struct platform_device *pdev) 128static int sram_remove(struct platform_device *pdev)
129{ 129{
130 struct sram_bank_info *info; 130 struct sram_bank_info *info;
131 131
diff --git a/arch/arm/mach-msm/proc_comm.c b/arch/arm/mach-msm/proc_comm.c
index 8f1eecd88186..507f5ca80697 100644
--- a/arch/arm/mach-msm/proc_comm.c
+++ b/arch/arm/mach-msm/proc_comm.c
@@ -120,7 +120,7 @@ int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2)
120 * and unknown state. This function should be called early to 120 * and unknown state. This function should be called early to
121 * wait on the ARM9. 121 * wait on the ARM9.
122 */ 122 */
123void __devinit proc_comm_boot_wait(void) 123void proc_comm_boot_wait(void)
124{ 124{
125 void __iomem *base = MSM_SHARED_RAM_BASE; 125 void __iomem *base = MSM_SHARED_RAM_BASE;
126 126
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index c5a2eddc6cdc..b1588a1ea2f8 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -988,7 +988,7 @@ int smd_core_init(void)
988 return 0; 988 return 0;
989} 989}
990 990
991static int __devinit msm_smd_probe(struct platform_device *pdev) 991static int msm_smd_probe(struct platform_device *pdev)
992{ 992{
993 /* 993 /*
994 * If we haven't waited for the ARM9 to boot up till now, 994 * If we haven't waited for the ARM9 to boot up till now,
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c
index a9a154a646dd..ee8c0b51df2c 100644
--- a/arch/arm/mach-mv78xx0/pcie.c
+++ b/arch/arm/mach-mv78xx0/pcie.c
@@ -173,7 +173,7 @@ static struct pci_ops pcie_ops = {
173 .write = pcie_wr_conf, 173 .write = pcie_wr_conf,
174}; 174};
175 175
176static void __devinit rc_pci_fixup(struct pci_dev *dev) 176static void rc_pci_fixup(struct pci_dev *dev)
177{ 177{
178 /* 178 /*
179 * Prevent enumeration of root complex. 179 * Prevent enumeration of root complex.
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 98167a4319f7..9f19069248da 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -27,7 +27,6 @@
27#include <linux/pinctrl/machine.h> 27#include <linux/pinctrl/machine.h>
28#include <linux/platform_data/pinctrl-nomadik.h> 28#include <linux/platform_data/pinctrl-nomadik.h>
29#include <linux/platform_data/clocksource-nomadik-mtu.h> 29#include <linux/platform_data/clocksource-nomadik-mtu.h>
30#include <linux/platform_data/mtd-nomadik-nand.h>
31#include <asm/hardware/vic.h> 30#include <asm/hardware/vic.h>
32#include <asm/sizes.h> 31#include <asm/sizes.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
diff --git a/arch/arm/mach-nomadik/include/mach/irqs.h b/arch/arm/mach-nomadik/include/mach/irqs.h
index b549d0571548..215f8cdb4004 100644
--- a/arch/arm/mach-nomadik/include/mach/irqs.h
+++ b/arch/arm/mach-nomadik/include/mach/irqs.h
@@ -22,49 +22,49 @@
22 22
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24 24
25#define IRQ_VIC_START 1 /* first VIC interrupt is 1 */ 25#define IRQ_VIC_START 32 /* first VIC interrupt is 1 */
26 26
27/* 27/*
28 * Interrupt numbers generic for all Nomadik Chip cuts 28 * Interrupt numbers generic for all Nomadik Chip cuts
29 */ 29 */
30#define IRQ_WATCHDOG 1 30#define IRQ_WATCHDOG (IRQ_VIC_START+0)
31#define IRQ_SOFTINT 2 31#define IRQ_SOFTINT (IRQ_VIC_START+1)
32#define IRQ_CRYPTO 3 32#define IRQ_CRYPTO (IRQ_VIC_START+2)
33#define IRQ_OWM 4 33#define IRQ_OWM (IRQ_VIC_START+3)
34#define IRQ_MTU0 5 34#define IRQ_MTU0 (IRQ_VIC_START+4)
35#define IRQ_MTU1 6 35#define IRQ_MTU1 (IRQ_VIC_START+5)
36#define IRQ_GPIO0 7 36#define IRQ_GPIO0 (IRQ_VIC_START+6)
37#define IRQ_GPIO1 8 37#define IRQ_GPIO1 (IRQ_VIC_START+7)
38#define IRQ_GPIO2 9 38#define IRQ_GPIO2 (IRQ_VIC_START+8)
39#define IRQ_GPIO3 10 39#define IRQ_GPIO3 (IRQ_VIC_START+9)
40#define IRQ_RTC_RTT 11 40#define IRQ_RTC_RTT (IRQ_VIC_START+10)
41#define IRQ_SSP 12 41#define IRQ_SSP (IRQ_VIC_START+11)
42#define IRQ_UART0 13 42#define IRQ_UART0 (IRQ_VIC_START+12)
43#define IRQ_DMA1 14 43#define IRQ_DMA1 (IRQ_VIC_START+13)
44#define IRQ_CLCD_MDIF 15 44#define IRQ_CLCD_MDIF (IRQ_VIC_START+14)
45#define IRQ_DMA0 16 45#define IRQ_DMA0 (IRQ_VIC_START+15)
46#define IRQ_PWRFAIL 17 46#define IRQ_PWRFAIL (IRQ_VIC_START+16)
47#define IRQ_UART1 18 47#define IRQ_UART1 (IRQ_VIC_START+17)
48#define IRQ_FIRDA 19 48#define IRQ_FIRDA (IRQ_VIC_START+18)
49#define IRQ_MSP0 20 49#define IRQ_MSP0 (IRQ_VIC_START+19)
50#define IRQ_I2C0 21 50#define IRQ_I2C0 (IRQ_VIC_START+20)
51#define IRQ_I2C1 22 51#define IRQ_I2C1 (IRQ_VIC_START+21)
52#define IRQ_SDMMC 23 52#define IRQ_SDMMC (IRQ_VIC_START+22)
53#define IRQ_USBOTG 24 53#define IRQ_USBOTG (IRQ_VIC_START+23)
54#define IRQ_SVA_IT0 25 54#define IRQ_SVA_IT0 (IRQ_VIC_START+24)
55#define IRQ_SVA_IT1 26 55#define IRQ_SVA_IT1 (IRQ_VIC_START+25)
56#define IRQ_SAA_IT0 27 56#define IRQ_SAA_IT0 (IRQ_VIC_START+26)
57#define IRQ_SAA_IT1 28 57#define IRQ_SAA_IT1 (IRQ_VIC_START+27)
58#define IRQ_UART2 29 58#define IRQ_UART2 (IRQ_VIC_START+28)
59#define IRQ_MSP2 30 59#define IRQ_MSP2 (IRQ_VIC_START+29)
60#define IRQ_L2CC 49 60#define IRQ_L2CC (IRQ_VIC_START+30)
61#define IRQ_HPI 50 61#define IRQ_HPI (IRQ_VIC_START+31)
62#define IRQ_SKE 51 62#define IRQ_SKE (IRQ_VIC_START+32)
63#define IRQ_KP 52 63#define IRQ_KP (IRQ_VIC_START+33)
64#define IRQ_MEMST 55 64#define IRQ_MEMST (IRQ_VIC_START+34)
65#define IRQ_SGA_IT 59 65#define IRQ_SGA_IT (IRQ_VIC_START+35)
66#define IRQ_USBM 61 66#define IRQ_USBM (IRQ_VIC_START+36)
67#define IRQ_MSP1 63 67#define IRQ_MSP1 (IRQ_VIC_START+37)
68 68
69#define NOMADIK_GPIO_OFFSET (IRQ_VIC_START+64) 69#define NOMADIK_GPIO_OFFSET (IRQ_VIC_START+64)
70 70
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index f0e69cbc5baa..222d58c0ae76 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -4,7 +4,7 @@
4 4
5# Common support 5# Common support
6obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \ 6obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \
7 serial.o devices.o dma.o 7 serial.o devices.o dma.o fb.o
8obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o 8obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o
9 9
10ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) 10ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index a8fce3ccc707..2e98a3ac7c5e 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -160,7 +160,7 @@ static struct omap_lcd_config ams_delta_lcd_config __initdata = {
160 .ctrl_name = "internal", 160 .ctrl_name = "internal",
161}; 161};
162 162
163static struct omap_usb_config ams_delta_usb_config = { 163static struct omap_usb_config ams_delta_usb_config __initdata = {
164 .register_host = 1, 164 .register_host = 1,
165 .hmc_mode = 16, 165 .hmc_mode = 16,
166 .pins[0] = 2, 166 .pins[0] = 2,
diff --git a/arch/arm/mach-omap1/fb.c b/arch/arm/mach-omap1/fb.c
new file mode 100644
index 000000000000..c770d45c7226
--- /dev/null
+++ b/arch/arm/mach-omap1/fb.c
@@ -0,0 +1,80 @@
1/*
2 * File: arch/arm/plat-omap/fb.c
3 *
4 * Framebuffer device registration for TI OMAP platforms
5 *
6 * Copyright (C) 2006 Nokia Corporation
7 * Author: Imre Deak <imre.deak@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24#include <linux/module.h>
25#include <linux/kernel.h>
26#include <linux/mm.h>
27#include <linux/init.h>
28#include <linux/platform_device.h>
29#include <linux/memblock.h>
30#include <linux/io.h>
31#include <linux/omapfb.h>
32#include <linux/dma-mapping.h>
33
34#include <asm/mach/map.h>
35
36#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
37
38static bool omapfb_lcd_configured;
39static struct omapfb_platform_data omapfb_config;
40
41static u64 omap_fb_dma_mask = ~(u32)0;
42
43static struct platform_device omap_fb_device = {
44 .name = "omapfb",
45 .id = -1,
46 .dev = {
47 .dma_mask = &omap_fb_dma_mask,
48 .coherent_dma_mask = DMA_BIT_MASK(32),
49 .platform_data = &omapfb_config,
50 },
51 .num_resources = 0,
52};
53
54void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
55{
56 omapfb_config.lcd = *config;
57 omapfb_lcd_configured = true;
58}
59
60static int __init omap_init_fb(void)
61{
62 /*
63 * If the board file has not set the lcd config with
64 * omapfb_set_lcd_config(), don't bother registering the omapfb device
65 */
66 if (!omapfb_lcd_configured)
67 return 0;
68
69 return platform_device_register(&omap_fb_device);
70}
71
72arch_initcall(omap_init_fb);
73
74#else
75
76void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
77{
78}
79
80#endif
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
index e962926b67bc..efc8f207f6fc 100644
--- a/arch/arm/mach-omap1/mailbox.c
+++ b/arch/arm/mach-omap1/mailbox.c
@@ -142,7 +142,7 @@ static struct omap_mbox mbox_dsp_info = {
142 142
143static struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL }; 143static struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL };
144 144
145static int __devinit omap1_mbox_probe(struct platform_device *pdev) 145static int omap1_mbox_probe(struct platform_device *pdev)
146{ 146{
147 struct resource *mem; 147 struct resource *mem;
148 int ret; 148 int ret;
@@ -165,7 +165,7 @@ static int __devinit omap1_mbox_probe(struct platform_device *pdev)
165 return 0; 165 return 0;
166} 166}
167 167
168static int __devexit omap1_mbox_remove(struct platform_device *pdev) 168static int omap1_mbox_remove(struct platform_device *pdev)
169{ 169{
170 omap_mbox_unregister(); 170 omap_mbox_unregister();
171 iounmap(mbox_base); 171 iounmap(mbox_base);
@@ -174,7 +174,7 @@ static int __devexit omap1_mbox_remove(struct platform_device *pdev)
174 174
175static struct platform_driver omap1_mbox_driver = { 175static struct platform_driver omap1_mbox_driver = {
176 .probe = omap1_mbox_probe, 176 .probe = omap1_mbox_probe,
177 .remove = __devexit_p(omap1_mbox_remove), 177 .remove = omap1_mbox_remove,
178 .driver = { 178 .driver = {
179 .name = "omap-mailbox", 179 .name = "omap-mailbox",
180 }, 180 },
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c
index 104fed366b8f..1a1db5971cd9 100644
--- a/arch/arm/mach-omap1/usb.c
+++ b/arch/arm/mach-omap1/usb.c
@@ -629,8 +629,14 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config)
629static inline void omap_1510_usb_init(struct omap_usb_config *config) {} 629static inline void omap_1510_usb_init(struct omap_usb_config *config) {}
630#endif 630#endif
631 631
632void __init omap1_usb_init(struct omap_usb_config *pdata) 632void __init omap1_usb_init(struct omap_usb_config *_pdata)
633{ 633{
634 struct omap_usb_config *pdata;
635
636 pdata = kmemdup(_pdata, sizeof(*pdata), GFP_KERNEL);
637 if (!pdata)
638 return;
639
634 pdata->usb0_init = omap1_usb0_init; 640 pdata->usb0_init = omap1_usb0_init;
635 pdata->usb1_init = omap1_usb1_init; 641 pdata->usb1_init = omap1_usb1_init;
636 pdata->usb2_init = omap1_usb2_init; 642 pdata->usb2_init = omap1_usb2_init;
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index a8004f33b7e2..947cafe65aef 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ 6obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ 7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
8 omap_device.o sram.o 8 omap_device.o sram.o
9 9
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
index bdf39481fbd6..6ef87580c33f 100644
--- a/arch/arm/mach-omap2/cclock3xxx_data.c
+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
@@ -1167,6 +1167,8 @@ static const struct clk_ops emu_src_ck_ops = {
1167 .recalc_rate = &omap2_clksel_recalc, 1167 .recalc_rate = &omap2_clksel_recalc,
1168 .get_parent = &omap2_clksel_find_parent_index, 1168 .get_parent = &omap2_clksel_find_parent_index,
1169 .set_parent = &omap2_clksel_set_parent, 1169 .set_parent = &omap2_clksel_set_parent,
1170 .enable = &omap2_clkops_enable_clkdm,
1171 .disable = &omap2_clkops_disable_clkdm,
1170}; 1172};
1171 1173
1172static struct clk emu_src_ck; 1174static struct clk emu_src_ck;
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index 3d944d3263d2..e6c328128a0a 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -234,7 +234,7 @@
234#define OMAP343X_PADCONF_ETK_D14 OMAP343X_PADCONF_ETK(16) 234#define OMAP343X_PADCONF_ETK_D14 OMAP343X_PADCONF_ETK(16)
235#define OMAP343X_PADCONF_ETK_D15 OMAP343X_PADCONF_ETK(17) 235#define OMAP343X_PADCONF_ETK_D15 OMAP343X_PADCONF_ETK(17)
236 236
237/* 34xx GENERAL_WKUP regist offsets */ 237/* 34xx GENERAL_WKUP register offsets */
238#define OMAP343X_CONTROL_WKUP_DEBOBSMUX(i) (OMAP343X_CONTROL_GENERAL_WKUP + \ 238#define OMAP343X_CONTROL_WKUP_DEBOBSMUX(i) (OMAP343X_CONTROL_GENERAL_WKUP + \
239 0x008 + (i)) 239 0x008 + (i))
240#define OMAP343X_CONTROL_WKUP_DEBOBS0 (OMAP343X_CONTROL_GENERAL_WKUP + 0x008) 240#define OMAP343X_CONTROL_WKUP_DEBOBS0 (OMAP343X_CONTROL_GENERAL_WKUP + 0x008)
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index 2bb18838cba9..0a02aab5df67 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -504,8 +504,7 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
504 if (!cpu_is_omap44xx() && !cpu_is_omap3630()) { 504 if (!cpu_is_omap44xx() && !cpu_is_omap3630()) {
505 freqsel = _omap3_dpll_compute_freqsel(clk, 505 freqsel = _omap3_dpll_compute_freqsel(clk,
506 dd->last_rounded_n); 506 dd->last_rounded_n);
507 if (!freqsel) 507 WARN_ON(!freqsel);
508 WARN_ON(1);
509 } 508 }
510 509
511 pr_debug("%s: %s: set rate: locking rate to %lu.\n", 510 pr_debug("%s: %s: set rate: locking rate to %lu.\n",
diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c
index fce5aa3fff49..4c7566c7e24a 100644
--- a/arch/arm/mach-omap2/drm.c
+++ b/arch/arm/mach-omap2/drm.c
@@ -27,7 +27,6 @@
27 27
28#include "omap_device.h" 28#include "omap_device.h"
29#include "omap_hwmod.h" 29#include "omap_hwmod.h"
30#include <plat/cpu.h>
31 30
32#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) 31#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE)
33 32
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c
index 679a0478644f..4be5cfc81ab8 100644
--- a/arch/arm/mach-omap2/dss-common.c
+++ b/arch/arm/mach-omap2/dss-common.c
@@ -31,8 +31,7 @@
31#include <video/omap-panel-nokia-dsi.h> 31#include <video/omap-panel-nokia-dsi.h>
32#include <video/omap-panel-picodlp.h> 32#include <video/omap-panel-picodlp.h>
33 33
34#include <plat/cpu.h> 34#include "soc.h"
35
36#include "dss-common.h" 35#include "dss-common.h"
37#include "mux.h" 36#include "mux.h"
38 37
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/mach-omap2/fb.c
index a3367b783fc7..d9bd965f6d07 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/mach-omap2/fb.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * File: arch/arm/plat-omap/fb.c
3 *
4 * Framebuffer device registration for TI OMAP platforms 2 * Framebuffer device registration for TI OMAP platforms
5 * 3 *
6 * Copyright (C) 2006 Nokia Corporation 4 * Copyright (C) 2006 Nokia Corporation
@@ -33,7 +31,7 @@
33 31
34#include <asm/mach/map.h> 32#include <asm/mach/map.h>
35 33
36#include <plat/cpu.h> 34#include "soc.h"
37 35
38#ifdef CONFIG_OMAP2_VRFB 36#ifdef CONFIG_OMAP2_VRFB
39 37
@@ -94,45 +92,7 @@ static int __init omap_init_vrfb(void)
94arch_initcall(omap_init_vrfb); 92arch_initcall(omap_init_vrfb);
95#endif 93#endif
96 94
97#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) 95#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
98
99static bool omapfb_lcd_configured;
100static struct omapfb_platform_data omapfb_config;
101
102static u64 omap_fb_dma_mask = ~(u32)0;
103
104static struct platform_device omap_fb_device = {
105 .name = "omapfb",
106 .id = -1,
107 .dev = {
108 .dma_mask = &omap_fb_dma_mask,
109 .coherent_dma_mask = DMA_BIT_MASK(32),
110 .platform_data = &omapfb_config,
111 },
112 .num_resources = 0,
113};
114
115void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
116{
117 omapfb_config.lcd = *config;
118 omapfb_lcd_configured = true;
119}
120
121static int __init omap_init_fb(void)
122{
123 /*
124 * If the board file has not set the lcd config with
125 * omapfb_set_lcd_config(), don't bother registering the omapfb device
126 */
127 if (!omapfb_lcd_configured)
128 return 0;
129
130 return platform_device_register(&omap_fb_device);
131}
132
133arch_initcall(omap_init_fb);
134
135#elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
136 96
137static u64 omap_fb_dma_mask = ~(u32)0; 97static u64 omap_fb_dma_mask = ~(u32)0;
138static struct omapfb_platform_data omapfb_config; 98static struct omapfb_platform_data omapfb_config;
@@ -155,10 +115,4 @@ static int __init omap_init_fb(void)
155 115
156arch_initcall(omap_init_fb); 116arch_initcall(omap_init_fb);
157 117
158#else
159
160void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
161{
162}
163
164#endif 118#endif
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 65468f6d7f0e..8033cb747c86 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -744,7 +744,7 @@ static int gpmc_setup_irq(void)
744 return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL); 744 return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL);
745} 745}
746 746
747static __devexit int gpmc_free_irq(void) 747static int gpmc_free_irq(void)
748{ 748{
749 int i; 749 int i;
750 750
@@ -762,7 +762,7 @@ static __devexit int gpmc_free_irq(void)
762 return 0; 762 return 0;
763} 763}
764 764
765static void __devexit gpmc_mem_exit(void) 765static void gpmc_mem_exit(void)
766{ 766{
767 int cs; 767 int cs;
768 768
@@ -774,7 +774,7 @@ static void __devexit gpmc_mem_exit(void)
774 774
775} 775}
776 776
777static int __devinit gpmc_mem_init(void) 777static int gpmc_mem_init(void)
778{ 778{
779 int cs, rc; 779 int cs, rc;
780 unsigned long boot_rom_space = 0; 780 unsigned long boot_rom_space = 0;
@@ -1121,7 +1121,7 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t,
1121 return 0; 1121 return 0;
1122} 1122}
1123 1123
1124static __devinit int gpmc_probe(struct platform_device *pdev) 1124static int gpmc_probe(struct platform_device *pdev)
1125{ 1125{
1126 int rc; 1126 int rc;
1127 u32 l; 1127 u32 l;
@@ -1177,7 +1177,7 @@ static __devinit int gpmc_probe(struct platform_device *pdev)
1177 return 0; 1177 return 0;
1178} 1178}
1179 1179
1180static __devexit int gpmc_remove(struct platform_device *pdev) 1180static int gpmc_remove(struct platform_device *pdev)
1181{ 1181{
1182 gpmc_free_irq(); 1182 gpmc_free_irq();
1183 gpmc_mem_exit(); 1183 gpmc_mem_exit();
@@ -1187,7 +1187,7 @@ static __devexit int gpmc_remove(struct platform_device *pdev)
1187 1187
1188static struct platform_driver gpmc_driver = { 1188static struct platform_driver gpmc_driver = {
1189 .probe = gpmc_probe, 1189 .probe = gpmc_probe,
1190 .remove = __devexit_p(gpmc_remove), 1190 .remove = gpmc_remove,
1191 .driver = { 1191 .driver = {
1192 .name = DEVICE_NAME, 1192 .name = DEVICE_NAME,
1193 .owner = THIS_MODULE, 1193 .owner = THIS_MODULE,
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 0d974565f8ca..0b080267b7f6 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -342,7 +342,7 @@ struct omap_mbox mbox_2_info = {
342struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL }; 342struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL };
343#endif 343#endif
344 344
345static int __devinit omap2_mbox_probe(struct platform_device *pdev) 345static int omap2_mbox_probe(struct platform_device *pdev)
346{ 346{
347 struct resource *mem; 347 struct resource *mem;
348 int ret; 348 int ret;
@@ -395,7 +395,7 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
395 return 0; 395 return 0;
396} 396}
397 397
398static int __devexit omap2_mbox_remove(struct platform_device *pdev) 398static int omap2_mbox_remove(struct platform_device *pdev)
399{ 399{
400 omap_mbox_unregister(); 400 omap_mbox_unregister();
401 iounmap(mbox_base); 401 iounmap(mbox_base);
@@ -404,7 +404,7 @@ static int __devexit omap2_mbox_remove(struct platform_device *pdev)
404 404
405static struct platform_driver omap2_mbox_driver = { 405static struct platform_driver omap2_mbox_driver = {
406 .probe = omap2_mbox_probe, 406 .probe = omap2_mbox_probe,
407 .remove = __devexit_p(omap2_mbox_remove), 407 .remove = omap2_mbox_remove,
408 .driver = { 408 .driver = {
409 .name = "omap-mailbox", 409 .name = "omap-mailbox",
410 }, 410 },
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 081c71edddf4..646c14d9fdb9 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -2070,7 +2070,7 @@ static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = {
2070 { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, }, 2070 { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, },
2071 { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, }, 2071 { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, },
2072 { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, }, 2072 { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, },
2073 { .irq = -1 + OMAP_INTC_START, }, 2073 { .irq = -1, },
2074}; 2074};
2075 2075
2076static struct omap_hwmod am33xx_usbss_hwmod = { 2076static struct omap_hwmod am33xx_usbss_hwmod = {
@@ -2515,7 +2515,7 @@ static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
2515 .user = OCP_USER_MPU, 2515 .user = OCP_USER_MPU,
2516}; 2516};
2517 2517
2518struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { 2518static struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = {
2519 { 2519 {
2520 .pa_start = 0x4A101000, 2520 .pa_start = 0x4A101000,
2521 .pa_end = 0x4A101000 + SZ_256 - 1, 2521 .pa_end = 0x4A101000 + SZ_256 - 1,
@@ -2523,7 +2523,7 @@ struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = {
2523 { } 2523 { }
2524}; 2524};
2525 2525
2526struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { 2526static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
2527 .master = &am33xx_cpgmac0_hwmod, 2527 .master = &am33xx_cpgmac0_hwmod,
2528 .slave = &am33xx_mdio_hwmod, 2528 .slave = &am33xx_mdio_hwmod,
2529 .addr = am33xx_mdio_addr_space, 2529 .addr = am33xx_mdio_addr_space,
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index f9fab942d5ba..129d5081ed15 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -26,7 +26,6 @@
26 26
27#include <linux/omap-dma.h> 27#include <linux/omap-dma.h>
28 28
29#include <linux/platform_data/omap_ocp2scp.h>
30#include <linux/platform_data/spi-omap2-mcspi.h> 29#include <linux/platform_data/spi-omap2-mcspi.h>
31#include <linux/platform_data/asoc-ti-mcbsp.h> 30#include <linux/platform_data/asoc-ti-mcbsp.h>
32#include <linux/platform_data/iommu-omap.h> 31#include <linux/platform_data/iommu-omap.h>
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index fefd40166624..615e5b1fb025 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -292,8 +292,8 @@ int __init omap3_twl_set_sr_bit(bool enable)
292 if (twl_sr_enable_autoinit) 292 if (twl_sr_enable_autoinit)
293 pr_warning("%s: unexpected multiple calls\n", __func__); 293 pr_warning("%s: unexpected multiple calls\n", __func__);
294 294
295 ret = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &temp, 295 ret = twl_i2c_read_u8(TWL_MODULE_PM_RECEIVER, &temp,
296 TWL4030_DCDC_GLOBAL_CFG); 296 TWL4030_DCDC_GLOBAL_CFG);
297 if (ret) 297 if (ret)
298 goto err; 298 goto err;
299 299
@@ -302,8 +302,8 @@ int __init omap3_twl_set_sr_bit(bool enable)
302 else 302 else
303 temp &= ~SMARTREFLEX_ENABLE; 303 temp &= ~SMARTREFLEX_ENABLE;
304 304
305 ret = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, temp, 305 ret = twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, temp,
306 TWL4030_DCDC_GLOBAL_CFG); 306 TWL4030_DCDC_GLOBAL_CFG);
307 if (!ret) { 307 if (!ret) {
308 twl_sr_enable_autoinit = true; 308 twl_sr_enable_autoinit = true;
309 return 0; 309 return 0;
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
index 250d909e38bd..eb78ae7a3464 100644
--- a/arch/arm/mach-omap2/pmu.c
+++ b/arch/arm/mach-omap2/pmu.c
@@ -11,8 +11,6 @@
11 * the Free Software Foundation; either version 2 of the License, or 11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 12 * (at your option) any later version.
13 */ 13 */
14#include <linux/pm_runtime.h>
15
16#include <asm/pmu.h> 14#include <asm/pmu.h>
17 15
18#include "soc.h" 16#include "soc.h"
diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c
index faeab18696df..418de9c3b319 100644
--- a/arch/arm/mach-omap2/prm2xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx.c
@@ -18,9 +18,8 @@
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20 20
21#include "soc.h"
21#include "common.h" 22#include "common.h"
22#include <plat/cpu.h>
23
24#include "vp.h" 23#include "vp.h"
25#include "powerdomain.h" 24#include "powerdomain.h"
26#include "clockdomain.h" 25#include "clockdomain.h"
@@ -29,6 +28,14 @@
29#include "prm-regbits-24xx.h" 28#include "prm-regbits-24xx.h"
30 29
31/* 30/*
31 * OMAP24xx PM_PWSTCTRL_*.POWERSTATE and PM_PWSTST_*.LASTSTATEENTERED bits -
32 * these are reversed from the bits used on OMAP3+
33 */
34#define OMAP24XX_PWRDM_POWER_ON 0x0
35#define OMAP24XX_PWRDM_POWER_RET 0x1
36#define OMAP24XX_PWRDM_POWER_OFF 0x3
37
38/*
32 * omap2xxx_prm_reset_src_map - map from bits in the PRM_RSTST_WKUP 39 * omap2xxx_prm_reset_src_map - map from bits in the PRM_RSTST_WKUP
33 * hardware register (which are specific to the OMAP2xxx SoCs) to 40 * hardware register (which are specific to the OMAP2xxx SoCs) to
34 * reset source ID bit shifts (which is an OMAP SoC-independent 41 * reset source ID bit shifts (which is an OMAP SoC-independent
@@ -69,6 +76,34 @@ static u32 omap2xxx_prm_read_reset_sources(void)
69} 76}
70 77
71/** 78/**
79 * omap2xxx_pwrst_to_common_pwrst - convert OMAP2xxx pwrst to common pwrst
80 * @omap2xxx_pwrst: OMAP2xxx hardware power state to convert
81 *
82 * Return the common power state bits corresponding to the OMAP2xxx
83 * hardware power state bits @omap2xxx_pwrst, or -EINVAL upon error.
84 */
85static int omap2xxx_pwrst_to_common_pwrst(u8 omap2xxx_pwrst)
86{
87 u8 pwrst;
88
89 switch (omap2xxx_pwrst) {
90 case OMAP24XX_PWRDM_POWER_OFF:
91 pwrst = PWRDM_POWER_OFF;
92 break;
93 case OMAP24XX_PWRDM_POWER_RET:
94 pwrst = PWRDM_POWER_RET;
95 break;
96 case OMAP24XX_PWRDM_POWER_ON:
97 pwrst = PWRDM_POWER_ON;
98 break;
99 default:
100 return -EINVAL;
101 }
102
103 return pwrst;
104}
105
106/**
72 * omap2xxx_prm_dpll_reset - use DPLL reset to reboot the OMAP SoC 107 * omap2xxx_prm_dpll_reset - use DPLL reset to reboot the OMAP SoC
73 * 108 *
74 * Set the DPLL reset bit, which should reboot the SoC. This is the 109 * Set the DPLL reset bit, which should reboot the SoC. This is the
@@ -98,10 +133,56 @@ int omap2xxx_clkdm_wakeup(struct clockdomain *clkdm)
98 return 0; 133 return 0;
99} 134}
100 135
136static int omap2xxx_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
137{
138 u8 omap24xx_pwrst;
139
140 switch (pwrst) {
141 case PWRDM_POWER_OFF:
142 omap24xx_pwrst = OMAP24XX_PWRDM_POWER_OFF;
143 break;
144 case PWRDM_POWER_RET:
145 omap24xx_pwrst = OMAP24XX_PWRDM_POWER_RET;
146 break;
147 case PWRDM_POWER_ON:
148 omap24xx_pwrst = OMAP24XX_PWRDM_POWER_ON;
149 break;
150 default:
151 return -EINVAL;
152 }
153
154 omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK,
155 (omap24xx_pwrst << OMAP_POWERSTATE_SHIFT),
156 pwrdm->prcm_offs, OMAP2_PM_PWSTCTRL);
157 return 0;
158}
159
160static int omap2xxx_pwrdm_read_next_pwrst(struct powerdomain *pwrdm)
161{
162 u8 omap2xxx_pwrst;
163
164 omap2xxx_pwrst = omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
165 OMAP2_PM_PWSTCTRL,
166 OMAP_POWERSTATE_MASK);
167
168 return omap2xxx_pwrst_to_common_pwrst(omap2xxx_pwrst);
169}
170
171static int omap2xxx_pwrdm_read_pwrst(struct powerdomain *pwrdm)
172{
173 u8 omap2xxx_pwrst;
174
175 omap2xxx_pwrst = omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
176 OMAP2_PM_PWSTST,
177 OMAP_POWERSTATEST_MASK);
178
179 return omap2xxx_pwrst_to_common_pwrst(omap2xxx_pwrst);
180}
181
101struct pwrdm_ops omap2_pwrdm_operations = { 182struct pwrdm_ops omap2_pwrdm_operations = {
102 .pwrdm_set_next_pwrst = omap2_pwrdm_set_next_pwrst, 183 .pwrdm_set_next_pwrst = omap2xxx_pwrdm_set_next_pwrst,
103 .pwrdm_read_next_pwrst = omap2_pwrdm_read_next_pwrst, 184 .pwrdm_read_next_pwrst = omap2xxx_pwrdm_read_next_pwrst,
104 .pwrdm_read_pwrst = omap2_pwrdm_read_pwrst, 185 .pwrdm_read_pwrst = omap2xxx_pwrdm_read_pwrst,
105 .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst, 186 .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst,
106 .pwrdm_set_mem_onst = omap2_pwrdm_set_mem_onst, 187 .pwrdm_set_mem_onst = omap2_pwrdm_set_mem_onst,
107 .pwrdm_set_mem_retst = omap2_pwrdm_set_mem_retst, 188 .pwrdm_set_mem_retst = omap2_pwrdm_set_mem_retst,
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index 30517f5af707..a3e121f94a86 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -103,28 +103,6 @@ int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift)
103/* Powerdomain low-level functions */ 103/* Powerdomain low-level functions */
104 104
105/* Common functions across OMAP2 and OMAP3 */ 105/* Common functions across OMAP2 and OMAP3 */
106int omap2_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
107{
108 omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK,
109 (pwrst << OMAP_POWERSTATE_SHIFT),
110 pwrdm->prcm_offs, OMAP2_PM_PWSTCTRL);
111 return 0;
112}
113
114int omap2_pwrdm_read_next_pwrst(struct powerdomain *pwrdm)
115{
116 return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
117 OMAP2_PM_PWSTCTRL,
118 OMAP_POWERSTATE_MASK);
119}
120
121int omap2_pwrdm_read_pwrst(struct powerdomain *pwrdm)
122{
123 return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
124 OMAP2_PM_PWSTST,
125 OMAP_POWERSTATEST_MASK);
126}
127
128int omap2_pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank, 106int omap2_pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank,
129 u8 pwrst) 107 u8 pwrst)
130{ 108{
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index db198d058584..e648bd55b072 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -18,9 +18,8 @@
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20 20
21#include "soc.h"
21#include "common.h" 22#include "common.h"
22#include <plat/cpu.h>
23
24#include "vp.h" 23#include "vp.h"
25#include "powerdomain.h" 24#include "powerdomain.h"
26#include "prm3xxx.h" 25#include "prm3xxx.h"
@@ -278,6 +277,28 @@ static u32 omap3xxx_prm_read_reset_sources(void)
278 277
279/* Powerdomain low-level functions */ 278/* Powerdomain low-level functions */
280 279
280static int omap3_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
281{
282 omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK,
283 (pwrst << OMAP_POWERSTATE_SHIFT),
284 pwrdm->prcm_offs, OMAP2_PM_PWSTCTRL);
285 return 0;
286}
287
288static int omap3_pwrdm_read_next_pwrst(struct powerdomain *pwrdm)
289{
290 return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
291 OMAP2_PM_PWSTCTRL,
292 OMAP_POWERSTATE_MASK);
293}
294
295static int omap3_pwrdm_read_pwrst(struct powerdomain *pwrdm)
296{
297 return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
298 OMAP2_PM_PWSTST,
299 OMAP_POWERSTATEST_MASK);
300}
301
281/* Applicable only for OMAP3. Not supported on OMAP2 */ 302/* Applicable only for OMAP3. Not supported on OMAP2 */
282static int omap3_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm) 303static int omap3_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm)
283{ 304{
@@ -356,9 +377,9 @@ static int omap3_pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
356} 377}
357 378
358struct pwrdm_ops omap3_pwrdm_operations = { 379struct pwrdm_ops omap3_pwrdm_operations = {
359 .pwrdm_set_next_pwrst = omap2_pwrdm_set_next_pwrst, 380 .pwrdm_set_next_pwrst = omap3_pwrdm_set_next_pwrst,
360 .pwrdm_read_next_pwrst = omap2_pwrdm_read_next_pwrst, 381 .pwrdm_read_next_pwrst = omap3_pwrdm_read_next_pwrst,
361 .pwrdm_read_pwrst = omap2_pwrdm_read_pwrst, 382 .pwrdm_read_pwrst = omap3_pwrdm_read_pwrst,
362 .pwrdm_read_prev_pwrst = omap3_pwrdm_read_prev_pwrst, 383 .pwrdm_read_prev_pwrst = omap3_pwrdm_read_prev_pwrst,
363 .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst, 384 .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst,
364 .pwrdm_read_logic_pwrst = omap3_pwrdm_read_logic_pwrst, 385 .pwrdm_read_logic_pwrst = omap3_pwrdm_read_logic_pwrst,
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index 7498bc77fe8b..c05a343d465d 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -56,9 +56,9 @@ static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
56 * enumeration) 56 * enumeration)
57 */ 57 */
58static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = { 58static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = {
59 { OMAP4430_RST_GLOBAL_WARM_SW_SHIFT, 59 { OMAP4430_GLOBAL_WARM_SW_RST_SHIFT,
60 OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT }, 60 OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT },
61 { OMAP4430_RST_GLOBAL_COLD_SW_SHIFT, 61 { OMAP4430_GLOBAL_COLD_RST_SHIFT,
62 OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT }, 62 OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT },
63 { OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT, 63 { OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT,
64 OMAP_SECU_VIOL_RST_SRC_ID_SHIFT }, 64 OMAP_SECU_VIOL_RST_SRC_ID_SHIFT },
@@ -333,7 +333,7 @@ static u32 omap44xx_prm_read_reset_sources(void)
333 u32 r = 0; 333 u32 r = 0;
334 u32 v; 334 u32 v;
335 335
336 v = omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, 336 v = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
337 OMAP4_RM_RSTST); 337 OMAP4_RM_RSTST);
338 338
339 p = omap44xx_prm_reset_src_map; 339 p = omap44xx_prm_reset_src_map;
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
index 22b0979206ca..8ee1fbdec561 100644
--- a/arch/arm/mach-omap2/prm44xx.h
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -62,8 +62,8 @@
62 62
63/* OMAP4 specific register offsets */ 63/* OMAP4 specific register offsets */
64#define OMAP4_RM_RSTCTRL 0x0000 64#define OMAP4_RM_RSTCTRL 0x0000
65#define OMAP4_RM_RSTTIME 0x0004 65#define OMAP4_RM_RSTST 0x0004
66#define OMAP4_RM_RSTST 0x0008 66#define OMAP4_RM_RSTTIME 0x0008
67#define OMAP4_PM_PWSTCTRL 0x0000 67#define OMAP4_PM_PWSTCTRL 0x0000
68#define OMAP4_PM_PWSTST 0x0004 68#define OMAP4_PM_PWSTST 0x0004
69 69
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index cd50e328db2a..d9c7c3bf0d9c 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -506,7 +506,7 @@ static int __init pci_setup(struct pci_sys_data *sys)
506/***************************************************************************** 506/*****************************************************************************
507 * General PCIe + PCI 507 * General PCIe + PCI
508 ****************************************************************************/ 508 ****************************************************************************/
509static void __devinit rc_pci_fixup(struct pci_dev *dev) 509static void rc_pci_fixup(struct pci_dev *dev)
510{ 510{
511 /* 511 /*
512 * Prevent enumeration of root complex. 512 * Prevent enumeration of root complex.
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c
index fb5a7910af35..9936c180bf01 100644
--- a/arch/arm/mach-prima2/pm.c
+++ b/arch/arm/mach-prima2/pm.c
@@ -123,7 +123,7 @@ static const struct of_device_id memc_ids[] = {
123 {} 123 {}
124}; 124};
125 125
126static int __devinit sirfsoc_memc_probe(struct platform_device *op) 126static int sirfsoc_memc_probe(struct platform_device *op)
127{ 127{
128 struct device_node *np = op->dev.of_node; 128 struct device_node *np = op->dev.of_node;
129 129
diff --git a/arch/arm/mach-prima2/rtciobrg.c b/arch/arm/mach-prima2/rtciobrg.c
index 9d80f1e20a98..557353602130 100644
--- a/arch/arm/mach-prima2/rtciobrg.c
+++ b/arch/arm/mach-prima2/rtciobrg.c
@@ -107,7 +107,7 @@ static const struct of_device_id rtciobrg_ids[] = {
107 {} 107 {}
108}; 108};
109 109
110static int __devinit sirfsoc_rtciobrg_probe(struct platform_device *op) 110static int sirfsoc_rtciobrg_probe(struct platform_device *op)
111{ 111{
112 struct device_node *np = op->dev.of_node; 112 struct device_node *np = op->dev.of_node;
113 113
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c
index 048c4299473c..7a39efc50865 100644
--- a/arch/arm/mach-pxa/corgi_pm.c
+++ b/arch/arm/mach-pxa/corgi_pm.c
@@ -198,7 +198,7 @@ static struct sharpsl_charger_machinfo corgi_pm_machinfo = {
198 198
199static struct platform_device *corgipm_device; 199static struct platform_device *corgipm_device;
200 200
201static int __devinit corgipm_init(void) 201static int corgipm_init(void)
202{ 202{
203 int ret; 203 int ret;
204 204
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
index a611ad3153c7..b6132aa95dc0 100644
--- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
@@ -463,6 +463,9 @@
463 GPIO76_LCD_PCLK, \ 463 GPIO76_LCD_PCLK, \
464 GPIO77_LCD_BIAS 464 GPIO77_LCD_BIAS
465 465
466/* these enable a work-around for a hw bug in pxa27x during ac97 warm reset */
467#define GPIO113_AC97_nRESET_GPIO_HIGH MFP_CFG_OUT(GPIO113, AF0, DEFAULT)
468#define GPIO95_AC97_nRESET_GPIO_HIGH MFP_CFG_OUT(GPIO95, AF0, DEFAULT)
466 469
467extern int keypad_set_wake(unsigned int on); 470extern int keypad_set_wake(unsigned int on);
468#endif /* __ASM_ARCH_MFP_PXA27X_H */ 471#endif /* __ASM_ARCH_MFP_PXA27X_H */
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 8047ee0effc5..616cb87b6179 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -47,9 +47,9 @@ void pxa27x_clear_otgph(void)
47EXPORT_SYMBOL(pxa27x_clear_otgph); 47EXPORT_SYMBOL(pxa27x_clear_otgph);
48 48
49static unsigned long ac97_reset_config[] = { 49static unsigned long ac97_reset_config[] = {
50 GPIO113_GPIO, 50 GPIO113_AC97_nRESET_GPIO_HIGH,
51 GPIO113_AC97_nRESET, 51 GPIO113_AC97_nRESET,
52 GPIO95_GPIO, 52 GPIO95_AC97_nRESET_GPIO_HIGH,
53 GPIO95_AC97_nRESET, 53 GPIO95_AC97_nRESET,
54}; 54};
55 55
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index ec55c575ed19..0a36d3585f26 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -829,7 +829,7 @@ static const struct platform_suspend_ops sharpsl_pm_ops = {
829}; 829};
830#endif 830#endif
831 831
832static int __devinit sharpsl_pm_probe(struct platform_device *pdev) 832static int sharpsl_pm_probe(struct platform_device *pdev)
833{ 833{
834 int ret, irq; 834 int ret, irq;
835 835
@@ -941,7 +941,7 @@ static struct platform_driver sharpsl_pm_driver = {
941 }, 941 },
942}; 942};
943 943
944static int __devinit sharpsl_pm_init(void) 944static int sharpsl_pm_init(void)
945{ 945{
946 return platform_driver_register(&sharpsl_pm_driver); 946 return platform_driver_register(&sharpsl_pm_driver);
947} 947}
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index 842596d4d31e..e191f9996b26 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -232,7 +232,7 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = {
232 232
233static struct platform_device *spitzpm_device; 233static struct platform_device *spitzpm_device;
234 234
235static int __devinit spitzpm_init(void) 235static int spitzpm_init(void)
236{ 236{
237 int ret; 237 int ret;
238 238
diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c
index b9b1e5c2b290..fc3646c2c694 100644
--- a/arch/arm/mach-pxa/tosa-bt.c
+++ b/arch/arm/mach-pxa/tosa-bt.c
@@ -102,7 +102,7 @@ err_reset:
102 return rc; 102 return rc;
103} 103}
104 104
105static int __devexit tosa_bt_remove(struct platform_device *dev) 105static int tosa_bt_remove(struct platform_device *dev)
106{ 106{
107 struct tosa_bt_data *data = dev->dev.platform_data; 107 struct tosa_bt_data *data = dev->dev.platform_data;
108 struct rfkill *rfk = platform_get_drvdata(dev); 108 struct rfkill *rfk = platform_get_drvdata(dev);
@@ -125,7 +125,7 @@ static int __devexit tosa_bt_remove(struct platform_device *dev)
125 125
126static struct platform_driver tosa_bt_driver = { 126static struct platform_driver tosa_bt_driver = {
127 .probe = tosa_bt_probe, 127 .probe = tosa_bt_probe,
128 .remove = __devexit_p(tosa_bt_remove), 128 .remove = tosa_bt_remove,
129 129
130 .driver = { 130 .driver = {
131 .name = "tosa-bt", 131 .name = "tosa-bt",
diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
index 57aee916bdb1..3f40c61b6e02 100644
--- a/arch/arm/mach-s3c24xx/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
@@ -62,7 +62,7 @@ static const struct rfkill_ops h1940bt_rfkill_ops = {
62 .set_block = h1940bt_set_block, 62 .set_block = h1940bt_set_block,
63}; 63};
64 64
65static int __devinit h1940bt_probe(struct platform_device *pdev) 65static int h1940bt_probe(struct platform_device *pdev)
66{ 66{
67 struct rfkill *rfk; 67 struct rfkill *rfk;
68 int ret = 0; 68 int ret = 0;
diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
index 5876c6ba7500..45e74363aaa9 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
@@ -93,7 +93,7 @@ static struct notifier_block osiris_dvs_nb = {
93 .notifier_call = osiris_dvs_notify, 93 .notifier_call = osiris_dvs_notify,
94}; 94};
95 95
96static int __devinit osiris_dvs_probe(struct platform_device *pdev) 96static int osiris_dvs_probe(struct platform_device *pdev)
97{ 97{
98 int ret; 98 int ret;
99 99
@@ -126,7 +126,7 @@ err_nogpio:
126 return ret; 126 return ret;
127} 127}
128 128
129static int __devexit osiris_dvs_remove(struct platform_device *pdev) 129static int osiris_dvs_remove(struct platform_device *pdev)
130{ 130{
131 dev_info(&pdev->dev, "exiting\n"); 131 dev_info(&pdev->dev, "exiting\n");
132 132
@@ -167,7 +167,7 @@ static const struct dev_pm_ops osiris_dvs_pm = {
167 167
168static struct platform_driver osiris_dvs_driver = { 168static struct platform_driver osiris_dvs_driver = {
169 .probe = osiris_dvs_probe, 169 .probe = osiris_dvs_probe,
170 .remove = __devexit_p(osiris_dvs_remove), 170 .remove = osiris_dvs_remove,
171 .driver = { 171 .driver = {
172 .name = "osiris-dvs", 172 .name = "osiris-dvs",
173 .owner = THIS_MODULE, 173 .owner = THIS_MODULE,
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index c6d8dba90623..553059f51841 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -290,7 +290,7 @@ static const struct i2c_board_info wm2200_i2c[] = {
290 .platform_data = &wm2200_pdata, }, 290 .platform_data = &wm2200_pdata, },
291}; 291};
292 292
293static __devinitdata const struct { 293static const struct {
294 u8 id; 294 u8 id;
295 u8 rev; 295 u8 rev;
296 const char *name; 296 const char *name;
@@ -343,8 +343,8 @@ static __devinitdata const struct {
343 .i2c_devs = wm2200_i2c, .num_i2c_devs = ARRAY_SIZE(wm2200_i2c) }, 343 .i2c_devs = wm2200_i2c, .num_i2c_devs = ARRAY_SIZE(wm2200_i2c) },
344}; 344};
345 345
346static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, 346static int wlf_gf_module_probe(struct i2c_client *i2c,
347 const struct i2c_device_id *i2c_id) 347 const struct i2c_device_id *i2c_id)
348{ 348{
349 int ret, i, j, id, rev; 349 int ret, i, j, id, rev;
350 350
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index cdde249166b5..bf6311a28f3d 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -171,7 +171,7 @@ static struct fb_videomode crag6410_lcd_timing = {
171}; 171};
172 172
173/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ 173/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
174static struct s3c_fb_platdata crag6410_lcd_pdata __devinitdata = { 174static struct s3c_fb_platdata crag6410_lcd_pdata = {
175 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 175 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
176 .vtiming = &crag6410_lcd_timing, 176 .vtiming = &crag6410_lcd_timing,
177 .win[0] = &crag6410_fb_win0, 177 .win[0] = &crag6410_fb_win0,
@@ -181,7 +181,7 @@ static struct s3c_fb_platdata crag6410_lcd_pdata __devinitdata = {
181 181
182/* 2x6 keypad */ 182/* 2x6 keypad */
183 183
184static uint32_t crag6410_keymap[] __devinitdata = { 184static uint32_t crag6410_keymap[] = {
185 /* KEY(row, col, keycode) */ 185 /* KEY(row, col, keycode) */
186 KEY(0, 0, KEY_VOLUMEUP), 186 KEY(0, 0, KEY_VOLUMEUP),
187 KEY(0, 1, KEY_HOME), 187 KEY(0, 1, KEY_HOME),
@@ -197,12 +197,12 @@ static uint32_t crag6410_keymap[] __devinitdata = {
197 KEY(1, 5, KEY_CAMERA), 197 KEY(1, 5, KEY_CAMERA),
198}; 198};
199 199
200static struct matrix_keymap_data crag6410_keymap_data __devinitdata = { 200static struct matrix_keymap_data crag6410_keymap_data = {
201 .keymap = crag6410_keymap, 201 .keymap = crag6410_keymap,
202 .keymap_size = ARRAY_SIZE(crag6410_keymap), 202 .keymap_size = ARRAY_SIZE(crag6410_keymap),
203}; 203};
204 204
205static struct samsung_keypad_platdata crag6410_keypad_data __devinitdata = { 205static struct samsung_keypad_platdata crag6410_keypad_data = {
206 .keymap_data = &crag6410_keymap_data, 206 .keymap_data = &crag6410_keymap_data,
207 .rows = 2, 207 .rows = 2,
208 .cols = 6, 208 .cols = 6,
@@ -407,11 +407,11 @@ static struct wm831x_buckv_pdata vddarm_pdata = {
407 .dvs_gpio = S3C64XX_GPK(0), 407 .dvs_gpio = S3C64XX_GPK(0),
408}; 408};
409 409
410static struct regulator_consumer_supply vddarm_consumers[] __devinitdata = { 410static struct regulator_consumer_supply vddarm_consumers[] = {
411 REGULATOR_SUPPLY("vddarm", NULL), 411 REGULATOR_SUPPLY("vddarm", NULL),
412}; 412};
413 413
414static struct regulator_init_data vddarm __devinitdata = { 414static struct regulator_init_data vddarm = {
415 .constraints = { 415 .constraints = {
416 .name = "VDDARM", 416 .name = "VDDARM",
417 .min_uV = 1000000, 417 .min_uV = 1000000,
@@ -425,11 +425,11 @@ static struct regulator_init_data vddarm __devinitdata = {
425 .driver_data = &vddarm_pdata, 425 .driver_data = &vddarm_pdata,
426}; 426};
427 427
428static struct regulator_consumer_supply vddint_consumers[] __devinitdata = { 428static struct regulator_consumer_supply vddint_consumers[] = {
429 REGULATOR_SUPPLY("vddint", NULL), 429 REGULATOR_SUPPLY("vddint", NULL),
430}; 430};
431 431
432static struct regulator_init_data vddint __devinitdata = { 432static struct regulator_init_data vddint = {
433 .constraints = { 433 .constraints = {
434 .name = "VDDINT", 434 .name = "VDDINT",
435 .min_uV = 1000000, 435 .min_uV = 1000000,
@@ -442,27 +442,27 @@ static struct regulator_init_data vddint __devinitdata = {
442 .supply_regulator = "WALLVDD", 442 .supply_regulator = "WALLVDD",
443}; 443};
444 444
445static struct regulator_init_data vddmem __devinitdata = { 445static struct regulator_init_data vddmem = {
446 .constraints = { 446 .constraints = {
447 .name = "VDDMEM", 447 .name = "VDDMEM",
448 .always_on = 1, 448 .always_on = 1,
449 }, 449 },
450}; 450};
451 451
452static struct regulator_init_data vddsys __devinitdata = { 452static struct regulator_init_data vddsys = {
453 .constraints = { 453 .constraints = {
454 .name = "VDDSYS,VDDEXT,VDDPCM,VDDSS", 454 .name = "VDDSYS,VDDEXT,VDDPCM,VDDSS",
455 .always_on = 1, 455 .always_on = 1,
456 }, 456 },
457}; 457};
458 458
459static struct regulator_consumer_supply vddmmc_consumers[] __devinitdata = { 459static struct regulator_consumer_supply vddmmc_consumers[] = {
460 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"), 460 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
461 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.1"), 461 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.1"),
462 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"), 462 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"),
463}; 463};
464 464
465static struct regulator_init_data vddmmc __devinitdata = { 465static struct regulator_init_data vddmmc = {
466 .constraints = { 466 .constraints = {
467 .name = "VDDMMC,UH", 467 .name = "VDDMMC,UH",
468 .always_on = 1, 468 .always_on = 1,
@@ -472,7 +472,7 @@ static struct regulator_init_data vddmmc __devinitdata = {
472 .supply_regulator = "WALLVDD", 472 .supply_regulator = "WALLVDD",
473}; 473};
474 474
475static struct regulator_init_data vddotgi __devinitdata = { 475static struct regulator_init_data vddotgi = {
476 .constraints = { 476 .constraints = {
477 .name = "VDDOTGi", 477 .name = "VDDOTGi",
478 .always_on = 1, 478 .always_on = 1,
@@ -480,7 +480,7 @@ static struct regulator_init_data vddotgi __devinitdata = {
480 .supply_regulator = "WALLVDD", 480 .supply_regulator = "WALLVDD",
481}; 481};
482 482
483static struct regulator_init_data vddotg __devinitdata = { 483static struct regulator_init_data vddotg = {
484 .constraints = { 484 .constraints = {
485 .name = "VDDOTG", 485 .name = "VDDOTG",
486 .always_on = 1, 486 .always_on = 1,
@@ -488,7 +488,7 @@ static struct regulator_init_data vddotg __devinitdata = {
488 .supply_regulator = "WALLVDD", 488 .supply_regulator = "WALLVDD",
489}; 489};
490 490
491static struct regulator_init_data vddhi __devinitdata = { 491static struct regulator_init_data vddhi = {
492 .constraints = { 492 .constraints = {
493 .name = "VDDHI", 493 .name = "VDDHI",
494 .always_on = 1, 494 .always_on = 1,
@@ -496,7 +496,7 @@ static struct regulator_init_data vddhi __devinitdata = {
496 .supply_regulator = "WALLVDD", 496 .supply_regulator = "WALLVDD",
497}; 497};
498 498
499static struct regulator_init_data vddadc __devinitdata = { 499static struct regulator_init_data vddadc = {
500 .constraints = { 500 .constraints = {
501 .name = "VDDADC,VDDDAC", 501 .name = "VDDADC,VDDDAC",
502 .always_on = 1, 502 .always_on = 1,
@@ -504,7 +504,7 @@ static struct regulator_init_data vddadc __devinitdata = {
504 .supply_regulator = "WALLVDD", 504 .supply_regulator = "WALLVDD",
505}; 505};
506 506
507static struct regulator_init_data vddmem0 __devinitdata = { 507static struct regulator_init_data vddmem0 = {
508 .constraints = { 508 .constraints = {
509 .name = "VDDMEM0", 509 .name = "VDDMEM0",
510 .always_on = 1, 510 .always_on = 1,
@@ -512,7 +512,7 @@ static struct regulator_init_data vddmem0 __devinitdata = {
512 .supply_regulator = "WALLVDD", 512 .supply_regulator = "WALLVDD",
513}; 513};
514 514
515static struct regulator_init_data vddpll __devinitdata = { 515static struct regulator_init_data vddpll = {
516 .constraints = { 516 .constraints = {
517 .name = "VDDPLL", 517 .name = "VDDPLL",
518 .always_on = 1, 518 .always_on = 1,
@@ -520,7 +520,7 @@ static struct regulator_init_data vddpll __devinitdata = {
520 .supply_regulator = "WALLVDD", 520 .supply_regulator = "WALLVDD",
521}; 521};
522 522
523static struct regulator_init_data vddlcd __devinitdata = { 523static struct regulator_init_data vddlcd = {
524 .constraints = { 524 .constraints = {
525 .name = "VDDLCD", 525 .name = "VDDLCD",
526 .always_on = 1, 526 .always_on = 1,
@@ -528,7 +528,7 @@ static struct regulator_init_data vddlcd __devinitdata = {
528 .supply_regulator = "WALLVDD", 528 .supply_regulator = "WALLVDD",
529}; 529};
530 530
531static struct regulator_init_data vddalive __devinitdata = { 531static struct regulator_init_data vddalive = {
532 .constraints = { 532 .constraints = {
533 .name = "VDDALIVE", 533 .name = "VDDALIVE",
534 .always_on = 1, 534 .always_on = 1,
@@ -536,28 +536,28 @@ static struct regulator_init_data vddalive __devinitdata = {
536 .supply_regulator = "WALLVDD", 536 .supply_regulator = "WALLVDD",
537}; 537};
538 538
539static struct wm831x_backup_pdata banff_backup_pdata __devinitdata = { 539static struct wm831x_backup_pdata banff_backup_pdata = {
540 .charger_enable = 1, 540 .charger_enable = 1,
541 .vlim = 2500, /* mV */ 541 .vlim = 2500, /* mV */
542 .ilim = 200, /* uA */ 542 .ilim = 200, /* uA */
543}; 543};
544 544
545static struct wm831x_status_pdata banff_red_led __devinitdata = { 545static struct wm831x_status_pdata banff_red_led = {
546 .name = "banff:red:", 546 .name = "banff:red:",
547 .default_src = WM831X_STATUS_MANUAL, 547 .default_src = WM831X_STATUS_MANUAL,
548}; 548};
549 549
550static struct wm831x_status_pdata banff_green_led __devinitdata = { 550static struct wm831x_status_pdata banff_green_led = {
551 .name = "banff:green:", 551 .name = "banff:green:",
552 .default_src = WM831X_STATUS_MANUAL, 552 .default_src = WM831X_STATUS_MANUAL,
553}; 553};
554 554
555static struct wm831x_touch_pdata touch_pdata __devinitdata = { 555static struct wm831x_touch_pdata touch_pdata = {
556 .data_irq = S3C_EINT(26), 556 .data_irq = S3C_EINT(26),
557 .pd_irq = S3C_EINT(27), 557 .pd_irq = S3C_EINT(27),
558}; 558};
559 559
560static struct wm831x_pdata crag_pmic_pdata __devinitdata = { 560static struct wm831x_pdata crag_pmic_pdata = {
561 .wm831x_num = 1, 561 .wm831x_num = 1,
562 .gpio_base = BANFF_PMIC_GPIO_BASE, 562 .gpio_base = BANFF_PMIC_GPIO_BASE,
563 .soft_shutdown = true, 563 .soft_shutdown = true,
@@ -601,7 +601,7 @@ static struct wm831x_pdata crag_pmic_pdata __devinitdata = {
601 .touch = &touch_pdata, 601 .touch = &touch_pdata,
602}; 602};
603 603
604static struct i2c_board_info i2c_devs0[] __devinitdata = { 604static struct i2c_board_info i2c_devs0[] = {
605 { I2C_BOARD_INFO("24c08", 0x50), }, 605 { I2C_BOARD_INFO("24c08", 0x50), },
606 { I2C_BOARD_INFO("tca6408", 0x20), 606 { I2C_BOARD_INFO("tca6408", 0x20),
607 .platform_data = &crag6410_pca_data, 607 .platform_data = &crag6410_pca_data,
@@ -616,13 +616,13 @@ static struct s3c2410_platform_i2c i2c0_pdata = {
616 .frequency = 400000, 616 .frequency = 400000,
617}; 617};
618 618
619static struct regulator_consumer_supply pvdd_1v2_consumers[] __devinitdata = { 619static struct regulator_consumer_supply pvdd_1v2_consumers[] = {
620 REGULATOR_SUPPLY("DCVDD", "spi0.0"), 620 REGULATOR_SUPPLY("DCVDD", "spi0.0"),
621 REGULATOR_SUPPLY("AVDD", "spi0.0"), 621 REGULATOR_SUPPLY("AVDD", "spi0.0"),
622 REGULATOR_SUPPLY("AVDD", "spi0.1"), 622 REGULATOR_SUPPLY("AVDD", "spi0.1"),
623}; 623};
624 624
625static struct regulator_init_data pvdd_1v2 __devinitdata = { 625static struct regulator_init_data pvdd_1v2 = {
626 .constraints = { 626 .constraints = {
627 .name = "PVDD_1V2", 627 .name = "PVDD_1V2",
628 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 628 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
@@ -632,7 +632,7 @@ static struct regulator_init_data pvdd_1v2 __devinitdata = {
632 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers), 632 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers),
633}; 633};
634 634
635static struct regulator_consumer_supply pvdd_1v8_consumers[] __devinitdata = { 635static struct regulator_consumer_supply pvdd_1v8_consumers[] = {
636 REGULATOR_SUPPLY("LDOVDD", "1-001a"), 636 REGULATOR_SUPPLY("LDOVDD", "1-001a"),
637 REGULATOR_SUPPLY("PLLVDD", "1-001a"), 637 REGULATOR_SUPPLY("PLLVDD", "1-001a"),
638 REGULATOR_SUPPLY("DBVDD", "1-001a"), 638 REGULATOR_SUPPLY("DBVDD", "1-001a"),
@@ -664,7 +664,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __devinitdata = {
664 REGULATOR_SUPPLY("CPVDD", "wm5110-codec"), 664 REGULATOR_SUPPLY("CPVDD", "wm5110-codec"),
665}; 665};
666 666
667static struct regulator_init_data pvdd_1v8 __devinitdata = { 667static struct regulator_init_data pvdd_1v8 = {
668 .constraints = { 668 .constraints = {
669 .name = "PVDD_1V8", 669 .name = "PVDD_1V8",
670 .always_on = 1, 670 .always_on = 1,
@@ -674,12 +674,12 @@ static struct regulator_init_data pvdd_1v8 __devinitdata = {
674 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v8_consumers), 674 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v8_consumers),
675}; 675};
676 676
677static struct regulator_consumer_supply pvdd_3v3_consumers[] __devinitdata = { 677static struct regulator_consumer_supply pvdd_3v3_consumers[] = {
678 REGULATOR_SUPPLY("MICVDD", "1-001a"), 678 REGULATOR_SUPPLY("MICVDD", "1-001a"),
679 REGULATOR_SUPPLY("AVDD1", "1-001a"), 679 REGULATOR_SUPPLY("AVDD1", "1-001a"),
680}; 680};
681 681
682static struct regulator_init_data pvdd_3v3 __devinitdata = { 682static struct regulator_init_data pvdd_3v3 = {
683 .constraints = { 683 .constraints = {
684 .name = "PVDD_3V3", 684 .name = "PVDD_3V3",
685 .always_on = 1, 685 .always_on = 1,
@@ -689,7 +689,7 @@ static struct regulator_init_data pvdd_3v3 __devinitdata = {
689 .num_consumer_supplies = ARRAY_SIZE(pvdd_3v3_consumers), 689 .num_consumer_supplies = ARRAY_SIZE(pvdd_3v3_consumers),
690}; 690};
691 691
692static struct wm831x_pdata glenfarclas_pmic_pdata __devinitdata = { 692static struct wm831x_pdata glenfarclas_pmic_pdata = {
693 .wm831x_num = 2, 693 .wm831x_num = 2,
694 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE, 694 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE,
695 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE, 695 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE,
@@ -721,7 +721,7 @@ static struct wm1250_ev1_pdata wm1250_ev1_pdata = {
721 }, 721 },
722}; 722};
723 723
724static struct i2c_board_info i2c_devs1[] __devinitdata = { 724static struct i2c_board_info i2c_devs1[] = {
725 { I2C_BOARD_INFO("wm8311", 0x34), 725 { I2C_BOARD_INFO("wm8311", 0x34),
726 .irq = S3C_EINT(0), 726 .irq = S3C_EINT(0),
727 .platform_data = &glenfarclas_pmic_pdata }, 727 .platform_data = &glenfarclas_pmic_pdata },
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
index 7f07f08d8968..b143c4659346 100644
--- a/arch/arm/mach-sa1100/jornada720_ssp.c
+++ b/arch/arm/mach-sa1100/jornada720_ssp.c
@@ -130,7 +130,7 @@ void jornada_ssp_end(void)
130}; 130};
131EXPORT_SYMBOL(jornada_ssp_end); 131EXPORT_SYMBOL(jornada_ssp_end);
132 132
133static int __devinit jornada_ssp_probe(struct platform_device *dev) 133static int jornada_ssp_probe(struct platform_device *dev)
134{ 134{
135 int ret; 135 int ret;
136 136
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 88be0474f3d7..400f80332046 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -154,7 +154,7 @@ static u_int neponset_get_mctrl(struct uart_port *port)
154 return ret; 154 return ret;
155} 155}
156 156
157static struct sa1100_port_fns neponset_port_fns __devinitdata = { 157static struct sa1100_port_fns neponset_port_fns = {
158 .set_mctrl = neponset_set_mctrl, 158 .set_mctrl = neponset_set_mctrl,
159 .get_mctrl = neponset_get_mctrl, 159 .get_mctrl = neponset_get_mctrl,
160}; 160};
@@ -233,7 +233,7 @@ static struct sa1111_platform_data sa1111_info = {
233 .disable_devs = SA1111_DEVID_PS2_MSE, 233 .disable_devs = SA1111_DEVID_PS2_MSE,
234}; 234};
235 235
236static int __devinit neponset_probe(struct platform_device *dev) 236static int neponset_probe(struct platform_device *dev)
237{ 237{
238 struct neponset_drvdata *d; 238 struct neponset_drvdata *d;
239 struct resource *nep_res, *sa1111_res, *smc91x_res; 239 struct resource *nep_res, *sa1111_res, *smc91x_res;
@@ -368,7 +368,7 @@ static int __devinit neponset_probe(struct platform_device *dev)
368 return ret; 368 return ret;
369} 369}
370 370
371static int __devexit neponset_remove(struct platform_device *dev) 371static int neponset_remove(struct platform_device *dev)
372{ 372{
373 struct neponset_drvdata *d = platform_get_drvdata(dev); 373 struct neponset_drvdata *d = platform_get_drvdata(dev);
374 int irq = platform_get_irq(dev, 0); 374 int irq = platform_get_irq(dev, 0);
@@ -420,7 +420,7 @@ static const struct dev_pm_ops neponset_pm_ops = {
420 420
421static struct platform_driver neponset_device_driver = { 421static struct platform_driver neponset_device_driver = {
422 .probe = neponset_probe, 422 .probe = neponset_probe,
423 .remove = __devexit_p(neponset_remove), 423 .remove = neponset_remove,
424 .driver = { 424 .driver = {
425 .name = "neponset", 425 .name = "neponset",
426 .owner = THIS_MODULE, 426 .owner = THIS_MODULE,
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 9be910f7920b..1dc8a92e5a5f 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -80,8 +80,8 @@ static void __init sunxi_dt_init(void)
80} 80}
81 81
82static const char * const sunxi_board_dt_compat[] = { 82static const char * const sunxi_board_dt_compat[] = {
83 "allwinner,sun4i", 83 "allwinner,sun4i-a10",
84 "allwinner,sun5i", 84 "allwinner,sun5i-a13",
85 NULL, 85 NULL,
86}; 86};
87 87
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c
index 53d085871798..bffcd643d7a3 100644
--- a/arch/arm/mach-tegra/pcie.c
+++ b/arch/arm/mach-tegra/pcie.c
@@ -331,7 +331,7 @@ static struct pci_ops tegra_pcie_ops = {
331 .write = tegra_pcie_write_conf, 331 .write = tegra_pcie_write_conf,
332}; 332};
333 333
334static void __devinit tegra_pcie_fixup_bridge(struct pci_dev *dev) 334static void tegra_pcie_fixup_bridge(struct pci_dev *dev)
335{ 335{
336 u16 reg; 336 u16 reg;
337 337
@@ -345,7 +345,7 @@ static void __devinit tegra_pcie_fixup_bridge(struct pci_dev *dev)
345DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_fixup_bridge); 345DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_fixup_bridge);
346 346
347/* Tegra PCIE root complex wrongly reports device class */ 347/* Tegra PCIE root complex wrongly reports device class */
348static void __devinit tegra_pcie_fixup_class(struct pci_dev *dev) 348static void tegra_pcie_fixup_class(struct pci_dev *dev)
349{ 349{
350 dev->class = PCI_CLASS_BRIDGE_PCI << 8; 350 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
351} 351}
@@ -353,7 +353,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf0, tegra_pcie_fixup_class);
353DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf1, tegra_pcie_fixup_class); 353DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf1, tegra_pcie_fixup_class);
354 354
355/* Tegra PCIE requires relaxed ordering */ 355/* Tegra PCIE requires relaxed ordering */
356static void __devinit tegra_pcie_relax_enable(struct pci_dev *dev) 356static void tegra_pcie_relax_enable(struct pci_dev *dev)
357{ 357{
358 pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_RELAX_EN); 358 pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_RELAX_EN);
359} 359}
diff --git a/arch/arm/mach-tegra/tegra2_emc.c b/arch/arm/mach-tegra/tegra2_emc.c
index 837c7b9ea63b..e18aa2f83ebf 100644
--- a/arch/arm/mach-tegra/tegra2_emc.c
+++ b/arch/arm/mach-tegra/tegra2_emc.c
@@ -268,7 +268,7 @@ static struct tegra_emc_pdata *tegra_emc_dt_parse_pdata(
268} 268}
269#endif 269#endif
270 270
271static struct tegra_emc_pdata __devinit *tegra_emc_fill_pdata(struct platform_device *pdev) 271static struct tegra_emc_pdata *tegra_emc_fill_pdata(struct platform_device *pdev)
272{ 272{
273 struct clk *c = clk_get_sys(NULL, "emc"); 273 struct clk *c = clk_get_sys(NULL, "emc");
274 struct tegra_emc_pdata *pdata; 274 struct tegra_emc_pdata *pdata;
@@ -296,7 +296,7 @@ static struct tegra_emc_pdata __devinit *tegra_emc_fill_pdata(struct platform_de
296 return pdata; 296 return pdata;
297} 297}
298 298
299static int __devinit tegra_emc_probe(struct platform_device *pdev) 299static int tegra_emc_probe(struct platform_device *pdev)
300{ 300{
301 struct tegra_emc_pdata *pdata; 301 struct tegra_emc_pdata *pdata;
302 struct resource *res; 302 struct resource *res;
@@ -333,7 +333,7 @@ static int __devinit tegra_emc_probe(struct platform_device *pdev)
333 return 0; 333 return 0;
334} 334}
335 335
336static struct of_device_id tegra_emc_of_match[] __devinitdata = { 336static struct of_device_id tegra_emc_of_match[] = {
337 { .compatible = "nvidia,tegra20-emc", }, 337 { .compatible = "nvidia,tegra20-emc", },
338 { }, 338 { },
339}; 339};
diff --git a/arch/arm/mach-u300/dummyspichip.c b/arch/arm/mach-u300/dummyspichip.c
index 03f793612594..2785cb67b5e8 100644
--- a/arch/arm/mach-u300/dummyspichip.c
+++ b/arch/arm/mach-u300/dummyspichip.c
@@ -222,7 +222,7 @@ static ssize_t dummy_looptest(struct device *dev,
222 222
223static DEVICE_ATTR(looptest, S_IRUGO, dummy_looptest, NULL); 223static DEVICE_ATTR(looptest, S_IRUGO, dummy_looptest, NULL);
224 224
225static int __devinit pl022_dummy_probe(struct spi_device *spi) 225static int pl022_dummy_probe(struct spi_device *spi)
226{ 226{
227 struct dummy *p_dummy; 227 struct dummy *p_dummy;
228 int status; 228 int status;
@@ -251,7 +251,7 @@ out_dev_create_looptest_failed:
251 return status; 251 return status;
252} 252}
253 253
254static int __devexit pl022_dummy_remove(struct spi_device *spi) 254static int pl022_dummy_remove(struct spi_device *spi)
255{ 255{
256 struct dummy *p_dummy = dev_get_drvdata(&spi->dev); 256 struct dummy *p_dummy = dev_get_drvdata(&spi->dev);
257 257
@@ -269,7 +269,7 @@ static struct spi_driver pl022_dummy_driver = {
269 .owner = THIS_MODULE, 269 .owner = THIS_MODULE,
270 }, 270 },
271 .probe = pl022_dummy_probe, 271 .probe = pl022_dummy_probe,
272 .remove = __devexit_p(pl022_dummy_remove), 272 .remove = pl022_dummy_remove,
273}; 273};
274 274
275static int __init pl022_init_dummy(void) 275static int __init pl022_init_dummy(void)
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index db0bb75e2c76..5b286e06474c 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -285,7 +285,8 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
285 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), 285 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
286 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), 286 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
287 /* Requires device name bindings. */ 287 /* Requires device name bindings. */
288 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), 288 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", U8500_PRCMU_BASE,
289 "pinctrl-db8500", NULL),
289 /* Requires clock name and DMA bindings. */ 290 /* Requires clock name and DMA bindings. */
290 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, 291 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
291 "ux500-msp-i2s.0", &msp0_platform_data), 292 "ux500-msp-i2s.0", &msp0_platform_data),
diff --git a/arch/arm/mach-versatile/include/mach/irqs.h b/arch/arm/mach-versatile/include/mach/irqs.h
index bf44c61bd1f6..0fd771ca617b 100644
--- a/arch/arm/mach-versatile/include/mach/irqs.h
+++ b/arch/arm/mach-versatile/include/mach/irqs.h
@@ -25,7 +25,7 @@
25 * IRQ interrupts definitions are the same as the INT definitions 25 * IRQ interrupts definitions are the same as the INT definitions
26 * held within platform.h 26 * held within platform.h
27 */ 27 */
28#define IRQ_VIC_START 0 28#define IRQ_VIC_START 32
29#define IRQ_WDOGINT (IRQ_VIC_START + INT_WDOGINT) 29#define IRQ_WDOGINT (IRQ_VIC_START + INT_WDOGINT)
30#define IRQ_SOFTINT (IRQ_VIC_START + INT_SOFTINT) 30#define IRQ_SOFTINT (IRQ_VIC_START + INT_SOFTINT)
31#define IRQ_COMMRx (IRQ_VIC_START + INT_COMMRx) 31#define IRQ_COMMRx (IRQ_VIC_START + INT_COMMRx)
@@ -100,7 +100,7 @@
100/* 100/*
101 * Secondary interrupt controller 101 * Secondary interrupt controller
102 */ 102 */
103#define IRQ_SIC_START 32 103#define IRQ_SIC_START 64
104#define IRQ_SIC_MMCI0B (IRQ_SIC_START + SIC_INT_MMCI0B) 104#define IRQ_SIC_MMCI0B (IRQ_SIC_START + SIC_INT_MMCI0B)
105#define IRQ_SIC_MMCI1B (IRQ_SIC_START + SIC_INT_MMCI1B) 105#define IRQ_SIC_MMCI1B (IRQ_SIC_START + SIC_INT_MMCI1B)
106#define IRQ_SIC_KMI0 (IRQ_SIC_START + SIC_INT_KMI0) 106#define IRQ_SIC_KMI0 (IRQ_SIC_START + SIC_INT_KMI0)
@@ -120,7 +120,7 @@
120#define IRQ_SIC_PCI1 (IRQ_SIC_START + SIC_INT_PCI1) 120#define IRQ_SIC_PCI1 (IRQ_SIC_START + SIC_INT_PCI1)
121#define IRQ_SIC_PCI2 (IRQ_SIC_START + SIC_INT_PCI2) 121#define IRQ_SIC_PCI2 (IRQ_SIC_START + SIC_INT_PCI2)
122#define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3) 122#define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3)
123#define IRQ_SIC_END 63 123#define IRQ_SIC_END 95
124 124
125#define IRQ_GPIO0_START (IRQ_SIC_END + 1) 125#define IRQ_GPIO0_START (IRQ_SIC_END + 1)
126#define IRQ_GPIO0_END (IRQ_GPIO0_START + 31) 126#define IRQ_GPIO0_END (IRQ_GPIO0_START + 31)
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 99e63f5f99d1..52d315b792c8 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -42,7 +42,6 @@ config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
42 bool "Enable A5 and A9 only errata work-arounds" 42 bool "Enable A5 and A9 only errata work-arounds"
43 default y 43 default y
44 select ARM_ERRATA_720789 44 select ARM_ERRATA_720789
45 select ARM_ERRATA_751472
46 select PL310_ERRATA_753970 if CACHE_PL310 45 select PL310_ERRATA_753970 if CACHE_PL310
47 help 46 help
48 Provides common dependencies for Versatile Express platforms 47 Provides common dependencies for Versatile Express platforms
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 6911b8b2745c..c2f37390308a 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -352,7 +352,8 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
352 /* Unmapped register. */ 352 /* Unmapped register. */
353 sync_reg_offset = L2X0_DUMMY_REG; 353 sync_reg_offset = L2X0_DUMMY_REG;
354#endif 354#endif
355 outer_cache.set_debug = pl310_set_debug; 355 if ((cache_id & L2X0_CACHE_ID_RTL_MASK) <= L2X0_CACHE_ID_RTL_R3P0)
356 outer_cache.set_debug = pl310_set_debug;
356 break; 357 break;
357 case L2X0_CACHE_ID_PART_L210: 358 case L2X0_CACHE_ID_PART_L210:
358 ways = (aux >> 13) & 0xf; 359 ways = (aux >> 13) & 0xf;
@@ -459,8 +460,8 @@ static void aurora_pa_range(unsigned long start, unsigned long end,
459 unsigned long flags; 460 unsigned long flags;
460 461
461 raw_spin_lock_irqsave(&l2x0_lock, flags); 462 raw_spin_lock_irqsave(&l2x0_lock, flags);
462 writel(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG); 463 writel_relaxed(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG);
463 writel(end, l2x0_base + offset); 464 writel_relaxed(end, l2x0_base + offset);
464 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 465 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
465 466
466 cache_sync(); 467 cache_sync();
@@ -505,15 +506,21 @@ static void aurora_clean_range(unsigned long start, unsigned long end)
505 506
506static void aurora_flush_range(unsigned long start, unsigned long end) 507static void aurora_flush_range(unsigned long start, unsigned long end)
507{ 508{
508 if (!l2_wt_override) { 509 start &= ~(CACHE_LINE_SIZE - 1);
509 start &= ~(CACHE_LINE_SIZE - 1); 510 end = ALIGN(end, CACHE_LINE_SIZE);
510 end = ALIGN(end, CACHE_LINE_SIZE); 511 while (start != end) {
511 while (start != end) { 512 unsigned long range_end = calc_range_end(start, end);
512 unsigned long range_end = calc_range_end(start, end); 513 /*
514 * If L2 is forced to WT, the L2 will always be clean and we
515 * just need to invalidate.
516 */
517 if (l2_wt_override)
513 aurora_pa_range(start, range_end - CACHE_LINE_SIZE, 518 aurora_pa_range(start, range_end - CACHE_LINE_SIZE,
514 AURORA_FLUSH_RANGE_REG); 519 AURORA_INVAL_RANGE_REG);
515 start = range_end; 520 else
516 } 521 aurora_pa_range(start, range_end - CACHE_LINE_SIZE,
522 AURORA_FLUSH_RANGE_REG);
523 start = range_end;
517 } 524 }
518} 525}
519 526
@@ -668,8 +675,9 @@ static void pl310_resume(void)
668static void aurora_resume(void) 675static void aurora_resume(void)
669{ 676{
670 if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { 677 if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
671 writel(l2x0_saved_regs.aux_ctrl, l2x0_base + L2X0_AUX_CTRL); 678 writel_relaxed(l2x0_saved_regs.aux_ctrl,
672 writel(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL); 679 l2x0_base + L2X0_AUX_CTRL);
680 writel_relaxed(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL);
673 } 681 }
674} 682}
675 683
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 350f6a74992b..3a3c015f8d5c 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -169,6 +169,7 @@ __v7_ca15mp_setup:
169 orreq r0, r0, r10 @ Enable CPU-specific SMP bits 169 orreq r0, r0, r10 @ Enable CPU-specific SMP bits
170 mcreq p15, 0, r0, c1, c0, 1 170 mcreq p15, 0, r0, c1, c0, 1
171#endif 171#endif
172 b __v7_setup
172 173
173__v7_pj4b_setup: 174__v7_pj4b_setup:
174#ifdef CONFIG_CPU_PJ4B 175#ifdef CONFIG_CPU_PJ4B
@@ -245,7 +246,8 @@ __v7_setup:
245 ldr r10, =0x00000c08 @ Cortex-A8 primary part number 246 ldr r10, =0x00000c08 @ Cortex-A8 primary part number
246 teq r0, r10 247 teq r0, r10
247 bne 2f 248 bne 2f
248#ifdef CONFIG_ARM_ERRATA_430973 249#if defined(CONFIG_ARM_ERRATA_430973) && !defined(CONFIG_ARCH_MULTIPLATFORM)
250
249 teq r5, #0x00100000 @ only present in r1p* 251 teq r5, #0x00100000 @ only present in r1p*
250 mrceq p15, 0, r10, c1, c0, 1 @ read aux control register 252 mrceq p15, 0, r10, c1, c0, 1 @ read aux control register
251 orreq r10, r10, #(1 << 6) @ set IBE to 1 253 orreq r10, r10, #(1 << 6) @ set IBE to 1
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 9d9aa2f55129..a14a78a2f149 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := sram.o dma.o fb.o counter_32k.o 6obj-y := sram.o dma.o counter_32k.o
7obj-m := 7obj-m :=
8obj-n := 8obj-n :=
9obj- := 9obj- :=
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index f3771cdb9838..5b0b86bb34bb 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -22,6 +22,8 @@
22#include <asm/mach/time.h> 22#include <asm/mach/time.h>
23#include <asm/sched_clock.h> 23#include <asm/sched_clock.h>
24 24
25#include <plat/counter-32k.h>
26
25/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */ 27/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */
26#define OMAP2_32KSYNCNT_REV_OFF 0x0 28#define OMAP2_32KSYNCNT_REV_OFF 0x0
27#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30) 29#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 37a488aaa2ba..4136b20cba3c 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2000,7 +2000,7 @@ void omap_dma_global_context_restore(void)
2000 omap_clear_dma(ch); 2000 omap_clear_dma(ch);
2001} 2001}
2002 2002
2003static int __devinit omap_system_dma_probe(struct platform_device *pdev) 2003static int omap_system_dma_probe(struct platform_device *pdev)
2004{ 2004{
2005 int ch, ret = 0; 2005 int ch, ret = 0;
2006 int dma_irq; 2006 int dma_irq;
@@ -2116,7 +2116,7 @@ exit_dma_lch_fail:
2116 return ret; 2116 return ret;
2117} 2117}
2118 2118
2119static int __devexit omap_system_dma_remove(struct platform_device *pdev) 2119static int omap_system_dma_remove(struct platform_device *pdev)
2120{ 2120{
2121 int dma_irq; 2121 int dma_irq;
2122 2122
@@ -2140,7 +2140,7 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev)
2140 2140
2141static struct platform_driver omap_system_dma_driver = { 2141static struct platform_driver omap_system_dma_driver = {
2142 .probe = omap_system_dma_probe, 2142 .probe = omap_system_dma_probe,
2143 .remove = __devexit_p(omap_system_dma_remove), 2143 .remove = omap_system_dma_remove,
2144 .driver = { 2144 .driver = {
2145 .name = "omap_dma_system" 2145 .name = "omap_dma_system"
2146 }, 2146 },
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 89585c293554..7b433f3bddca 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -777,7 +777,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timers_active);
777 * Called by driver framework at the end of device registration for all 777 * Called by driver framework at the end of device registration for all
778 * timer devices. 778 * timer devices.
779 */ 779 */
780static int __devinit omap_dm_timer_probe(struct platform_device *pdev) 780static int omap_dm_timer_probe(struct platform_device *pdev)
781{ 781{
782 unsigned long flags; 782 unsigned long flags;
783 struct omap_dm_timer *timer; 783 struct omap_dm_timer *timer;
@@ -864,7 +864,7 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
864 * In addition to freeing platform resources it also deletes the timer 864 * In addition to freeing platform resources it also deletes the timer
865 * entry from the local list. 865 * entry from the local list.
866 */ 866 */
867static int __devexit omap_dm_timer_remove(struct platform_device *pdev) 867static int omap_dm_timer_remove(struct platform_device *pdev)
868{ 868{
869 struct omap_dm_timer *timer; 869 struct omap_dm_timer *timer;
870 unsigned long flags; 870 unsigned long flags;
@@ -891,26 +891,15 @@ MODULE_DEVICE_TABLE(of, omap_timer_match);
891 891
892static struct platform_driver omap_dm_timer_driver = { 892static struct platform_driver omap_dm_timer_driver = {
893 .probe = omap_dm_timer_probe, 893 .probe = omap_dm_timer_probe,
894 .remove = __devexit_p(omap_dm_timer_remove), 894 .remove = omap_dm_timer_remove,
895 .driver = { 895 .driver = {
896 .name = "omap_timer", 896 .name = "omap_timer",
897 .of_match_table = of_match_ptr(omap_timer_match), 897 .of_match_table = of_match_ptr(omap_timer_match),
898 }, 898 },
899}; 899};
900 900
901static int __init omap_dm_timer_driver_init(void)
902{
903 return platform_driver_register(&omap_dm_timer_driver);
904}
905
906static void __exit omap_dm_timer_driver_exit(void)
907{
908 platform_driver_unregister(&omap_dm_timer_driver);
909}
910
911early_platform_init("earlytimer", &omap_dm_timer_driver); 901early_platform_init("earlytimer", &omap_dm_timer_driver);
912module_init(omap_dm_timer_driver_init); 902module_platform_driver(omap_dm_timer_driver);
913module_exit(omap_dm_timer_driver_exit);
914 903
915MODULE_DESCRIPTION("OMAP Dual-Mode Timer Driver"); 904MODULE_DESCRIPTION("OMAP Dual-Mode Timer Driver");
916MODULE_LICENSE("GPL"); 905MODULE_LICENSE("GPL");
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index b4516aba67ed..c9a66bf36c9a 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -32,8 +32,4 @@
32#include <mach/soc.h> 32#include <mach/soc.h>
33#endif 33#endif
34 34
35#ifdef CONFIG_ARCH_OMAP2PLUS
36#include "../../mach-omap2/soc.h"
37#endif
38
39#endif 35#endif
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 743fc2836f7a..a5bc92d7e476 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -26,6 +26,8 @@
26 26
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28 28
29#include <plat/sram.h>
30
29#define ROUND_DOWN(value,boundary) ((value) & (~((boundary)-1))) 31#define ROUND_DOWN(value,boundary) ((value) & (~((boundary)-1)))
30 32
31static void __iomem *omap_sram_base; 33static void __iomem *omap_sram_base;
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c
index 584c9bf8ed2d..8e11e96eab5e 100644
--- a/arch/arm/plat-pxa/ssp.c
+++ b/arch/arm/plat-pxa/ssp.c
@@ -72,7 +72,7 @@ void pxa_ssp_free(struct ssp_device *ssp)
72} 72}
73EXPORT_SYMBOL(pxa_ssp_free); 73EXPORT_SYMBOL(pxa_ssp_free);
74 74
75static int __devinit pxa_ssp_probe(struct platform_device *pdev) 75static int pxa_ssp_probe(struct platform_device *pdev)
76{ 76{
77 const struct platform_device_id *id = platform_get_device_id(pdev); 77 const struct platform_device_id *id = platform_get_device_id(pdev);
78 struct resource *res; 78 struct resource *res;
@@ -164,7 +164,7 @@ err_free:
164 return ret; 164 return ret;
165} 165}
166 166
167static int __devexit pxa_ssp_remove(struct platform_device *pdev) 167static int pxa_ssp_remove(struct platform_device *pdev)
168{ 168{
169 struct resource *res; 169 struct resource *res;
170 struct ssp_device *ssp; 170 struct ssp_device *ssp;
@@ -199,7 +199,7 @@ static const struct platform_device_id ssp_id_table[] = {
199 199
200static struct platform_driver pxa_ssp_driver = { 200static struct platform_driver pxa_ssp_driver = {
201 .probe = pxa_ssp_probe, 201 .probe = pxa_ssp_probe,
202 .remove = __devexit_p(pxa_ssp_remove), 202 .remove = pxa_ssp_remove,
203 .driver = { 203 .driver = {
204 .owner = THIS_MODULE, 204 .owner = THIS_MODULE,
205 .name = "pxa2xx-ssp", 205 .name = "pxa2xx-ssp",
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index 37542c2689a2..2d676ab50f73 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -416,7 +416,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
416 return 0; 416 return 0;
417} 417}
418 418
419static int __devexit s3c_adc_remove(struct platform_device *pdev) 419static int s3c_adc_remove(struct platform_device *pdev)
420{ 420{
421 struct adc_device *adc = platform_get_drvdata(pdev); 421 struct adc_device *adc = platform_get_drvdata(pdev);
422 422
@@ -516,7 +516,7 @@ static struct platform_driver s3c_adc_driver = {
516 .pm = &adc_pm_ops, 516 .pm = &adc_pm_ops,
517 }, 517 },
518 .probe = s3c_adc_probe, 518 .probe = s3c_adc_probe,
519 .remove = __devexit_p(s3c_adc_remove), 519 .remove = s3c_adc_remove,
520}; 520};
521 521
522static int __init adc_init(void) 522static int __init adc_init(void)
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index e0072ce8d6e9..b69e11dc679d 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -43,7 +43,7 @@ extern unsigned long samsung_cpu_id;
43#define EXYNOS4_CPU_MASK 0xFFFE0000 43#define EXYNOS4_CPU_MASK 0xFFFE0000
44 44
45#define EXYNOS5250_SOC_ID 0x43520000 45#define EXYNOS5250_SOC_ID 0x43520000
46#define EXYNOS5440_SOC_ID 0x54400000 46#define EXYNOS5440_SOC_ID 0xE5440000
47#define EXYNOS5_SOC_MASK 0xFFFFF000 47#define EXYNOS5_SOC_MASK 0xFFFFF000
48 48
49#define IS_SAMSUNG_CPU(name, id, mask) \ 49#define IS_SAMSUNG_CPU(name, id, mask) \
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 9c829b008261..f8f362aafee9 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -2,6 +2,8 @@ config ARM64
2 def_bool y 2 def_bool y
3 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE 3 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
4 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 4 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
5 select ARM_AMBA
6 select CLONE_BACKWARDS
5 select COMMON_CLK 7 select COMMON_CLK
6 select GENERIC_CLOCKEVENTS 8 select GENERIC_CLOCKEVENTS
7 select GENERIC_HARDIRQS_NO_DEPRECATED 9 select GENERIC_HARDIRQS_NO_DEPRECATED
@@ -31,7 +33,6 @@ config ARM64
31 select RTC_LIB 33 select RTC_LIB
32 select SPARSE_IRQ 34 select SPARSE_IRQ
33 select SYSCTL_EXCEPTION_TRACE 35 select SYSCTL_EXCEPTION_TRACE
34 select CLONE_BACKWARDS
35 help 36 help
36 ARM 64-bit (AArch64) Linux support. 37 ARM 64-bit (AArch64) Linux support.
37 38
@@ -90,6 +91,9 @@ config SWIOTLB
90config IOMMU_HELPER 91config IOMMU_HELPER
91 def_bool SWIOTLB 92 def_bool SWIOTLB
92 93
94config GENERIC_GPIO
95 def_bool y
96
93source "init/Kconfig" 97source "init/Kconfig"
94 98
95source "kernel/Kconfig.freezer" 99source "kernel/Kconfig.freezer"
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index d9ec40217a27..618b450e5a1d 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -23,6 +23,7 @@
23 */ 23 */
24#include <linux/types.h> 24#include <linux/types.h>
25#include <linux/sched.h> 25#include <linux/sched.h>
26#include <linux/ptrace.h>
26 27
27#define COMPAT_USER_HZ 100 28#define COMPAT_USER_HZ 100
28#define COMPAT_UTS_MACHINE "armv8l\0\0" 29#define COMPAT_UTS_MACHINE "armv8l\0\0"
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index c76c7241125b..f7073c7b1ca9 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -1221,7 +1221,7 @@ static struct of_device_id armpmu_of_device_ids[] = {
1221 {}, 1221 {},
1222}; 1222};
1223 1223
1224static int __devinit armpmu_device_probe(struct platform_device *pdev) 1224static int armpmu_device_probe(struct platform_device *pdev)
1225{ 1225{
1226 if (!cpu_pmu) 1226 if (!cpu_pmu)
1227 return -ENODEV; 1227 return -ENODEV;
diff --git a/arch/avr32/lib/delay.c b/arch/avr32/lib/delay.c
index 9aa8800830f3..c2f4a07dcda1 100644
--- a/arch/avr32/lib/delay.c
+++ b/arch/avr32/lib/delay.c
@@ -20,7 +20,7 @@
20#include <asm/processor.h> 20#include <asm/processor.h>
21#include <asm/sysreg.h> 21#include <asm/sysreg.h>
22 22
23int __devinit read_current_timer(unsigned long *timer_value) 23int read_current_timer(unsigned long *timer_value)
24{ 24{
25 *timer_value = sysreg_read(COUNT); 25 *timer_value = sysreg_read(COUNT);
26 return 0; 26 return 0;
diff --git a/arch/blackfin/mach-common/dpmc.c b/arch/blackfin/mach-common/dpmc.c
index 978bb400be06..724a8c5f5578 100644
--- a/arch/blackfin/mach-common/dpmc.c
+++ b/arch/blackfin/mach-common/dpmc.c
@@ -129,7 +129,7 @@ static struct notifier_block vreg_cpufreq_notifier_block = {
129 * bfin_dpmc_probe - 129 * bfin_dpmc_probe -
130 * 130 *
131 */ 131 */
132static int __devinit bfin_dpmc_probe(struct platform_device *pdev) 132static int bfin_dpmc_probe(struct platform_device *pdev)
133{ 133{
134 if (pdev->dev.platform_data) 134 if (pdev->dev.platform_data)
135 pdata = pdev->dev.platform_data; 135 pdata = pdev->dev.platform_data;
@@ -143,7 +143,7 @@ static int __devinit bfin_dpmc_probe(struct platform_device *pdev)
143/** 143/**
144 * bfin_dpmc_remove - 144 * bfin_dpmc_remove -
145 */ 145 */
146static int __devexit bfin_dpmc_remove(struct platform_device *pdev) 146static int bfin_dpmc_remove(struct platform_device *pdev)
147{ 147{
148 pdata = NULL; 148 pdata = NULL;
149 return cpufreq_unregister_notifier(&vreg_cpufreq_notifier_block, 149 return cpufreq_unregister_notifier(&vreg_cpufreq_notifier_block,
@@ -152,7 +152,7 @@ static int __devexit bfin_dpmc_remove(struct platform_device *pdev)
152 152
153struct platform_driver bfin_dpmc_device_driver = { 153struct platform_driver bfin_dpmc_device_driver = {
154 .probe = bfin_dpmc_probe, 154 .probe = bfin_dpmc_probe,
155 .remove = __devexit_p(bfin_dpmc_remove), 155 .remove = bfin_dpmc_remove,
156 .driver = { 156 .driver = {
157 .name = DRIVER_NAME, 157 .name = DRIVER_NAME,
158 } 158 }
diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c
index e3dfc72d0cfd..64a5fb93767d 100644
--- a/arch/cris/arch-v32/drivers/pci/bios.c
+++ b/arch/cris/arch-v32/drivers/pci/bios.c
@@ -2,7 +2,7 @@
2#include <linux/kernel.h> 2#include <linux/kernel.h>
3#include <arch/hwregs/intr_vect.h> 3#include <arch/hwregs/intr_vect.h>
4 4
5void __devinit pcibios_fixup_bus(struct pci_bus *b) 5void pcibios_fixup_bus(struct pci_bus *b)
6{ 6{
7} 7}
8 8
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
index ebe2cb30bd11..04a16edd5401 100644
--- a/arch/cris/arch-v32/kernel/smp.c
+++ b/arch/cris/arch-v32/kernel/smp.c
@@ -84,7 +84,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
84 cpumask_set_cpu(i, &phys_cpu_present_map); 84 cpumask_set_cpu(i, &phys_cpu_present_map);
85} 85}
86 86
87void __devinit smp_prepare_boot_cpu(void) 87void smp_prepare_boot_cpu(void)
88{ 88{
89 /* PGD pointer has moved after per_cpu initialization so 89 /* PGD pointer has moved after per_cpu initialization so
90 * update the MMU. 90 * update the MMU.
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 3cb3392f799e..a5136474c6fd 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -852,7 +852,7 @@ void __init setup_arch(char **cmdline_p)
852/* 852/*
853 * 853 *
854 */ 854 */
855static int __devinit setup_arch_serial(void) 855static int setup_arch_serial(void)
856{ 856{
857 /* register those serial ports that are available */ 857 /* register those serial ports that are available */
858#ifndef CONFIG_GDBSTUB_UART0 858#ifndef CONFIG_GDBSTUB_UART0
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c
index 71e9bcf58105..d186b254ce99 100644
--- a/arch/frv/mb93090-mb00/pci-vdk.c
+++ b/arch/frv/mb93090-mb00/pci-vdk.c
@@ -268,7 +268,7 @@ static void __init pci_fixup_umc_ide(struct pci_dev *d)
268 d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO; 268 d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
269} 269}
270 270
271static void __devinit pci_fixup_ide_bases(struct pci_dev *d) 271static void pci_fixup_ide_bases(struct pci_dev *d)
272{ 272{
273 int i; 273 int i;
274 274
@@ -287,7 +287,7 @@ static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
287 } 287 }
288} 288}
289 289
290static void __devinit pci_fixup_ide_trash(struct pci_dev *d) 290static void pci_fixup_ide_trash(struct pci_dev *d)
291{ 291{
292 int i; 292 int i;
293 293
@@ -300,7 +300,7 @@ static void __devinit pci_fixup_ide_trash(struct pci_dev *d)
300 d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0; 300 d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0;
301} 301}
302 302
303static void __devinit pci_fixup_latency(struct pci_dev *d) 303static void pci_fixup_latency(struct pci_dev *d)
304{ 304{
305 /* 305 /*
306 * SiS 5597 and 5598 chipsets require latency timer set to 306 * SiS 5597 and 5598 chipsets require latency timer set to
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h
index 301609c3fcec..359e68a03ca3 100644
--- a/arch/ia64/include/asm/acpi.h
+++ b/arch/ia64/include/asm/acpi.h
@@ -153,7 +153,7 @@ extern int additional_cpus;
153#else 153#else
154#define MAX_PXM_DOMAINS (256) 154#define MAX_PXM_DOMAINS (256)
155#endif 155#endif
156extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; 156extern int pxm_to_nid_map[MAX_PXM_DOMAINS];
157extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; 157extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
158#endif 158#endif
159 159
diff --git a/arch/ia64/include/asm/iosapic.h b/arch/ia64/include/asm/iosapic.h
index b9c102e15f22..94c89a2d97fe 100644
--- a/arch/ia64/include/asm/iosapic.h
+++ b/arch/ia64/include/asm/iosapic.h
@@ -87,18 +87,13 @@ static inline void iosapic_eoi(char __iomem *iosapic, u32 vector)
87} 87}
88 88
89extern void __init iosapic_system_init (int pcat_compat); 89extern void __init iosapic_system_init (int pcat_compat);
90extern int __devinit iosapic_init (unsigned long address, 90extern int iosapic_init (unsigned long address, unsigned int gsi_base);
91 unsigned int gsi_base);
92#ifdef CONFIG_HOTPLUG
93extern int iosapic_remove (unsigned int gsi_base); 91extern int iosapic_remove (unsigned int gsi_base);
94#else
95#define iosapic_remove(gsi_base) (-EINVAL)
96#endif /* CONFIG_HOTPLUG */
97extern int gsi_to_irq (unsigned int gsi); 92extern int gsi_to_irq (unsigned int gsi);
98extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity, 93extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity,
99 unsigned long trigger); 94 unsigned long trigger);
100extern void iosapic_unregister_intr (unsigned int irq); 95extern void iosapic_unregister_intr (unsigned int irq);
101extern void __devinit iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, 96extern void iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi,
102 unsigned long polarity, 97 unsigned long polarity,
103 unsigned long trigger); 98 unsigned long trigger);
104extern int __init iosapic_register_platform_intr (u32 int_type, 99extern int __init iosapic_register_platform_intr (u32 int_type,
@@ -109,7 +104,7 @@ extern int __init iosapic_register_platform_intr (u32 int_type,
109 unsigned long trigger); 104 unsigned long trigger);
110 105
111#ifdef CONFIG_NUMA 106#ifdef CONFIG_NUMA
112extern void __devinit map_iosapic_to_node (unsigned int, int); 107extern void map_iosapic_to_node (unsigned int, int);
113#endif 108#endif
114#else 109#else
115#define iosapic_system_init(pcat_compat) do { } while (0) 110#define iosapic_system_init(pcat_compat) do { } while (0)
diff --git a/arch/ia64/include/asm/parport.h b/arch/ia64/include/asm/parport.h
index 67e16adfcd25..638b4d271b99 100644
--- a/arch/ia64/include/asm/parport.h
+++ b/arch/ia64/include/asm/parport.h
@@ -9,10 +9,9 @@
9#ifndef _ASM_IA64_PARPORT_H 9#ifndef _ASM_IA64_PARPORT_H
10#define _ASM_IA64_PARPORT_H 1 10#define _ASM_IA64_PARPORT_H 1
11 11
12static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); 12static int parport_pc_find_isa_ports(int autoirq, int autodma);
13 13
14static int __devinit 14static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
15parport_pc_find_nonpci_ports (int autoirq, int autodma)
16{ 15{
17 return parport_pc_find_isa_ports(autoirq, autodma); 16 return parport_pc_find_isa_ports(autoirq, autodma);
18} 17}
diff --git a/arch/ia64/include/asm/smp.h b/arch/ia64/include/asm/smp.h
index 0b3b3997decd..fea21e986022 100644
--- a/arch/ia64/include/asm/smp.h
+++ b/arch/ia64/include/asm/smp.h
@@ -55,7 +55,7 @@ extern struct smp_boot_data {
55 int cpu_phys_id[NR_CPUS]; 55 int cpu_phys_id[NR_CPUS];
56} smp_boot_data __initdata; 56} smp_boot_data __initdata;
57 57
58extern char no_int_routing __devinitdata; 58extern char no_int_routing;
59 59
60extern cpumask_t cpu_core_map[NR_CPUS]; 60extern cpumask_t cpu_core_map[NR_CPUS];
61DECLARE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); 61DECLARE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map);
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index 8b3ff2f5b861..c3cc42a15af1 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -11,7 +11,7 @@
11 11
12 12
13 13
14#define NR_syscalls 311 /* length of syscall table */ 14#define NR_syscalls 312 /* length of syscall table */
15 15
16/* 16/*
17 * The following defines stop scripts/checksyscalls.sh from complaining about 17 * The following defines stop scripts/checksyscalls.sh from complaining about
diff --git a/arch/ia64/include/uapi/asm/unistd.h b/arch/ia64/include/uapi/asm/unistd.h
index b706aa54df20..34fd6fe46da1 100644
--- a/arch/ia64/include/uapi/asm/unistd.h
+++ b/arch/ia64/include/uapi/asm/unistd.h
@@ -324,5 +324,6 @@
324#define __NR_process_vm_readv 1332 324#define __NR_process_vm_readv 1332
325#define __NR_process_vm_writev 1333 325#define __NR_process_vm_writev 1333
326#define __NR_accept4 1334 326#define __NR_accept4 1334
327#define __NR_finit_module 1335
327 328
328#endif /* _UAPI_ASM_IA64_UNISTD_H */ 329#endif /* _UAPI_ASM_IA64_UNISTD_H */
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index e9682f5be343..335eb07480fe 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -422,7 +422,7 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
422#define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32) 422#define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32)
423 423
424static int __initdata srat_num_cpus; /* number of cpus */ 424static int __initdata srat_num_cpus; /* number of cpus */
425static u32 __devinitdata pxm_flag[PXM_FLAG_LEN]; 425static u32 pxm_flag[PXM_FLAG_LEN];
426#define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag)) 426#define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag))
427#define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) 427#define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag))
428static struct acpi_table_slit __initdata *slit_table; 428static struct acpi_table_slit __initdata *slit_table;
@@ -956,8 +956,8 @@ EXPORT_SYMBOL(acpi_unmap_lsapic);
956#endif /* CONFIG_ACPI_HOTPLUG_CPU */ 956#endif /* CONFIG_ACPI_HOTPLUG_CPU */
957 957
958#ifdef CONFIG_ACPI_NUMA 958#ifdef CONFIG_ACPI_NUMA
959static acpi_status __devinit 959static acpi_status acpi_map_iosapic(acpi_handle handle, u32 depth,
960acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret) 960 void *context, void **ret)
961{ 961{
962 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 962 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
963 union acpi_object *obj; 963 union acpi_object *obj;
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index e25b784a2b72..6bfd8429ee0f 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1785,6 +1785,7 @@ sys_call_table:
1785 data8 sys_process_vm_readv 1785 data8 sys_process_vm_readv
1786 data8 sys_process_vm_writev 1786 data8 sys_process_vm_writev
1787 data8 sys_accept4 1787 data8 sys_accept4
1788 data8 sys_finit_module // 1335
1788 1789
1789 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls 1790 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
1790#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ 1791#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index ef4b5d877cf2..ee33c3aaa2fc 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -147,7 +147,7 @@ static struct iosapic_intr_info {
147 unsigned char trigger : 1; /* trigger mode (see iosapic.h) */ 147 unsigned char trigger : 1; /* trigger mode (see iosapic.h) */
148} iosapic_intr_info[NR_IRQS]; 148} iosapic_intr_info[NR_IRQS];
149 149
150static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */ 150static unsigned char pcat_compat; /* 8259 compatibility flag */
151 151
152static inline void 152static inline void
153iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val) 153iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val)
@@ -914,10 +914,8 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
914/* 914/*
915 * ACPI calls this when it finds an entry for a legacy ISA IRQ override. 915 * ACPI calls this when it finds an entry for a legacy ISA IRQ override.
916 */ 916 */
917void __devinit 917void iosapic_override_isa_irq(unsigned int isa_irq, unsigned int gsi,
918iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, 918 unsigned long polarity, unsigned long trigger)
919 unsigned long polarity,
920 unsigned long trigger)
921{ 919{
922 int vector, irq; 920 int vector, irq;
923 unsigned int dest = cpu_physical_id(smp_processor_id()); 921 unsigned int dest = cpu_physical_id(smp_processor_id());
@@ -1012,8 +1010,7 @@ iosapic_check_gsi_range (unsigned int gsi_base, unsigned int ver)
1012 return 0; 1010 return 0;
1013} 1011}
1014 1012
1015int __devinit 1013int iosapic_init(unsigned long phys_addr, unsigned int gsi_base)
1016iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
1017{ 1014{
1018 int num_rte, err, index; 1015 int num_rte, err, index;
1019 unsigned int isa_irq, ver; 1016 unsigned int isa_irq, ver;
@@ -1070,9 +1067,7 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
1070 return 0; 1067 return 0;
1071} 1068}
1072 1069
1073#ifdef CONFIG_HOTPLUG 1070int iosapic_remove(unsigned int gsi_base)
1074int
1075iosapic_remove (unsigned int gsi_base)
1076{ 1071{
1077 int index, err = 0; 1072 int index, err = 0;
1078 unsigned long flags; 1073 unsigned long flags;
@@ -1098,11 +1093,9 @@ iosapic_remove (unsigned int gsi_base)
1098 spin_unlock_irqrestore(&iosapic_lock, flags); 1093 spin_unlock_irqrestore(&iosapic_lock, flags);
1099 return err; 1094 return err;
1100} 1095}
1101#endif /* CONFIG_HOTPLUG */
1102 1096
1103#ifdef CONFIG_NUMA 1097#ifdef CONFIG_NUMA
1104void __devinit 1098void map_iosapic_to_node(unsigned int gsi_base, int node)
1105map_iosapic_to_node(unsigned int gsi_base, int node)
1106{ 1099{
1107 int index; 1100 int index;
1108 1101
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 6a368cb2043e..500f1e4d9f9d 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -347,8 +347,7 @@ ia64_sync_itc (unsigned int master)
347/* 347/*
348 * Ideally sets up per-cpu profiling hooks. Doesn't do much now... 348 * Ideally sets up per-cpu profiling hooks. Doesn't do much now...
349 */ 349 */
350static inline void __devinit 350static inline void smp_setup_percpu_timer(void)
351smp_setup_percpu_timer (void)
352{ 351{
353} 352}
354 353
@@ -563,7 +562,7 @@ smp_prepare_cpus (unsigned int max_cpus)
563 } 562 }
564} 563}
565 564
566void __devinit smp_prepare_boot_cpu(void) 565void smp_prepare_boot_cpu(void)
567{ 566{
568 set_cpu_online(smp_processor_id(), true); 567 set_cpu_online(smp_processor_id(), true);
569 cpu_set(smp_processor_id(), cpu_callin_map); 568 cpu_set(smp_processor_id(), cpu_callin_map);
@@ -713,8 +712,7 @@ smp_cpus_done (unsigned int dummy)
713 (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100); 712 (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100);
714} 713}
715 714
716static inline void __devinit 715static inline void set_cpu_sibling_map(int cpu)
717set_cpu_sibling_map(int cpu)
718{ 716{
719 int i; 717 int i;
720 718
@@ -793,8 +791,7 @@ init_smp_config(void)
793 * identify_siblings(cpu) gets called from identify_cpu. This populates the 791 * identify_siblings(cpu) gets called from identify_cpu. This populates the
794 * information related to logical execution units in per_cpu_data structure. 792 * information related to logical execution units in per_cpu_data structure.
795 */ 793 */
796void __devinit 794void identify_siblings(struct cpuinfo_ia64 *c)
797identify_siblings(struct cpuinfo_ia64 *c)
798{ 795{
799 long status; 796 long status;
800 u16 pltid; 797 u16 pltid;
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index b1995efbfd21..88a794536bc0 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -243,8 +243,7 @@ static int __init nojitter_setup(char *str)
243__setup("nojitter", nojitter_setup); 243__setup("nojitter", nojitter_setup);
244 244
245 245
246void __devinit 246void ia64_init_itm(void)
247ia64_init_itm (void)
248{ 247{
249 unsigned long platform_base_freq, itc_freq; 248 unsigned long platform_base_freq, itc_freq;
250 struct pal_freq_ratio itc_ratio, proc_ratio; 249 struct pal_freq_ratio itc_ratio, proc_ratio;
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 082e383c1b6f..b755ea92aea7 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -294,11 +294,10 @@ setup_gate (void)
294 ia64_patch_gate(); 294 ia64_patch_gate();
295} 295}
296 296
297void __devinit 297void ia64_mmu_init(void *my_cpu_data)
298ia64_mmu_init (void *my_cpu_data)
299{ 298{
300 unsigned long pta, impl_va_bits; 299 unsigned long pta, impl_va_bits;
301 extern void __devinit tlb_init (void); 300 extern void tlb_init(void);
302 301
303#ifdef CONFIG_DISABLE_VHPT 302#ifdef CONFIG_DISABLE_VHPT
304# define VHPT_ENABLE_BIT 0 303# define VHPT_ENABLE_BIT 0
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index 7b3cdc6c6d91..ed6129768681 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -337,8 +337,7 @@ flush_tlb_range (struct vm_area_struct *vma, unsigned long start,
337} 337}
338EXPORT_SYMBOL(flush_tlb_range); 338EXPORT_SYMBOL(flush_tlb_range);
339 339
340void __devinit 340void ia64_tlb_init(void)
341ia64_tlb_init (void)
342{ 341{
343 ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */ 342 ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */
344 u64 tr_pgbits; 343 u64 tr_pgbits;
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c
index eab28e314022..5dc969dd4ac0 100644
--- a/arch/ia64/pci/fixup.c
+++ b/arch/ia64/pci/fixup.c
@@ -24,7 +24,7 @@
24 * video device at this point. 24 * video device at this point.
25 */ 25 */
26 26
27static void __devinit pci_fixup_video(struct pci_dev *pdev) 27static void pci_fixup_video(struct pci_dev *pdev)
28{ 28{
29 struct pci_dev *bridge; 29 struct pci_dev *bridge;
30 struct pci_bus *bus; 30 struct pci_bus *bus;
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 5faa66c5c2a8..55b72ad57329 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -116,8 +116,7 @@ struct pci_ops pci_root_ops = {
116 116
117/* Called by ACPI when it finds a new root bus. */ 117/* Called by ACPI when it finds a new root bus. */
118 118
119static struct pci_controller * __devinit 119static struct pci_controller *alloc_pci_controller(int seg)
120alloc_pci_controller (int seg)
121{ 120{
122 struct pci_controller *controller; 121 struct pci_controller *controller;
123 122
@@ -165,8 +164,8 @@ new_space (u64 phys_base, int sparse)
165 return i; 164 return i;
166} 165}
167 166
168static u64 __devinit 167static u64 add_io_space(struct pci_root_info *info,
169add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr) 168 struct acpi_resource_address64 *addr)
170{ 169{
171 struct resource *resource; 170 struct resource *resource;
172 char *name; 171 char *name;
@@ -226,8 +225,8 @@ out:
226 return ~0; 225 return ~0;
227} 226}
228 227
229static acpi_status __devinit resource_to_window(struct acpi_resource *resource, 228static acpi_status resource_to_window(struct acpi_resource *resource,
230 struct acpi_resource_address64 *addr) 229 struct acpi_resource_address64 *addr)
231{ 230{
232 acpi_status status; 231 acpi_status status;
233 232
@@ -249,8 +248,7 @@ static acpi_status __devinit resource_to_window(struct acpi_resource *resource,
249 return AE_ERROR; 248 return AE_ERROR;
250} 249}
251 250
252static acpi_status __devinit 251static acpi_status count_window(struct acpi_resource *resource, void *data)
253count_window (struct acpi_resource *resource, void *data)
254{ 252{
255 unsigned int *windows = (unsigned int *) data; 253 unsigned int *windows = (unsigned int *) data;
256 struct acpi_resource_address64 addr; 254 struct acpi_resource_address64 addr;
@@ -263,7 +261,7 @@ count_window (struct acpi_resource *resource, void *data)
263 return AE_OK; 261 return AE_OK;
264} 262}
265 263
266static __devinit acpi_status add_window(struct acpi_resource *res, void *data) 264static acpi_status add_window(struct acpi_resource *res, void *data)
267{ 265{
268 struct pci_root_info *info = data; 266 struct pci_root_info *info = data;
269 struct pci_window *window; 267 struct pci_window *window;
@@ -324,8 +322,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
324 return AE_OK; 322 return AE_OK;
325} 323}
326 324
327struct pci_bus * __devinit 325struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
328pci_acpi_scan_root(struct acpi_pci_root *root)
329{ 326{
330 struct acpi_device *device = root->device; 327 struct acpi_device *device = root->device;
331 int domain = root->segment; 328 int domain = root->segment;
@@ -396,7 +393,7 @@ out1:
396 return NULL; 393 return NULL;
397} 394}
398 395
399static int __devinit is_valid_resource(struct pci_dev *dev, int idx) 396static int is_valid_resource(struct pci_dev *dev, int idx)
400{ 397{
401 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; 398 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
402 struct resource *devr = &dev->resource[idx], *busr; 399 struct resource *devr = &dev->resource[idx], *busr;
@@ -414,8 +411,7 @@ static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
414 return 0; 411 return 0;
415} 412}
416 413
417static void __devinit 414static void pcibios_fixup_resources(struct pci_dev *dev, int start, int limit)
418pcibios_fixup_resources(struct pci_dev *dev, int start, int limit)
419{ 415{
420 int i; 416 int i;
421 417
@@ -427,13 +423,13 @@ pcibios_fixup_resources(struct pci_dev *dev, int start, int limit)
427 } 423 }
428} 424}
429 425
430void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) 426void pcibios_fixup_device_resources(struct pci_dev *dev)
431{ 427{
432 pcibios_fixup_resources(dev, 0, PCI_BRIDGE_RESOURCES); 428 pcibios_fixup_resources(dev, 0, PCI_BRIDGE_RESOURCES);
433} 429}
434EXPORT_SYMBOL_GPL(pcibios_fixup_device_resources); 430EXPORT_SYMBOL_GPL(pcibios_fixup_device_resources);
435 431
436static void __devinit pcibios_fixup_bridge_resources(struct pci_dev *dev) 432static void pcibios_fixup_bridge_resources(struct pci_dev *dev)
437{ 433{
438 pcibios_fixup_resources(dev, PCI_BRIDGE_RESOURCES, PCI_NUM_RESOURCES); 434 pcibios_fixup_resources(dev, PCI_BRIDGE_RESOURCES, PCI_NUM_RESOURCES);
439} 435}
@@ -441,8 +437,7 @@ static void __devinit pcibios_fixup_bridge_resources(struct pci_dev *dev)
441/* 437/*
442 * Called after each bus is probed, but before its children are examined. 438 * Called after each bus is probed, but before its children are examined.
443 */ 439 */
444void __devinit 440void pcibios_fixup_bus(struct pci_bus *b)
445pcibios_fixup_bus (struct pci_bus *b)
446{ 441{
447 struct pci_dev *dev; 442 struct pci_dev *dev;
448 443
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c
index 8630875e74b5..11f2275570fb 100644
--- a/arch/ia64/sn/kernel/io_common.c
+++ b/arch/ia64/sn/kernel/io_common.c
@@ -435,8 +435,7 @@ void sn_generate_path(struct pci_bus *pci_bus, char *address)
435 geo_slot(geoid)); 435 geo_slot(geoid));
436} 436}
437 437
438void __devinit 438void sn_pci_fixup_bus(struct pci_bus *bus)
439sn_pci_fixup_bus(struct pci_bus *bus)
440{ 439{
441 440
442 if (SN_ACPI_BASE_SUPPORT()) 441 if (SN_ACPI_BASE_SUPPORT())
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 4554f68b7865..b9992571c036 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -977,7 +977,7 @@ int sn_hwperf_get_nearest_node(cnodeid_t node,
977 return e; 977 return e;
978} 978}
979 979
980static int __devinit sn_hwperf_misc_register_init(void) 980static int sn_hwperf_misc_register_init(void)
981{ 981{
982 int e; 982 int e;
983 983
diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
index 01f479ee1c43..efb74dafec4d 100644
--- a/arch/ia64/xen/irq_xen.c
+++ b/arch/ia64/xen/irq_xen.c
@@ -273,9 +273,8 @@ xen_bind_early_percpu_irq(void)
273 */ 273 */
274 274
275#ifdef CONFIG_HOTPLUG_CPU 275#ifdef CONFIG_HOTPLUG_CPU
276static int __devinit 276static int unbind_evtchn_callback(struct notifier_block *nfb,
277unbind_evtchn_callback(struct notifier_block *nfb, 277 unsigned long action, void *hcpu)
278 unsigned long action, void *hcpu)
279{ 278{
280 unsigned int cpu = (unsigned long)hcpu; 279 unsigned int cpu = (unsigned long)hcpu;
281 280
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
index a2cfc0abb05c..13168a769f8f 100644
--- a/arch/m32r/kernel/smpboot.c
+++ b/arch/m32r/kernel/smpboot.c
@@ -127,7 +127,7 @@ static void unmap_cpu_to_physid(int, int);
127/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 127/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
128/* Boot up APs Routines : BSP */ 128/* Boot up APs Routines : BSP */
129/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 129/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
130void __devinit smp_prepare_boot_cpu(void) 130void smp_prepare_boot_cpu(void)
131{ 131{
132 bsp_phys_id = hard_smp_processor_id(); 132 bsp_phys_id = hard_smp_processor_id();
133 physid_set(bsp_phys_id, phys_cpu_present_map); 133 physid_set(bsp_phys_id, phys_cpu_present_map);
diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c
index a985a7e87d45..695cd737a42e 100644
--- a/arch/m68k/emu/nfeth.c
+++ b/arch/m68k/emu/nfeth.c
@@ -39,7 +39,7 @@ enum {
39#define MAX_UNIT 8 39#define MAX_UNIT 8
40 40
41/* These identify the driver base version and may not be removed. */ 41/* These identify the driver base version and may not be removed. */
42static const char version[] __devinitconst = 42static const char version[] =
43 KERN_INFO KBUILD_MODNAME ".c:v" DRV_VERSION " " DRV_RELDATE 43 KERN_INFO KBUILD_MODNAME ".c:v" DRV_VERSION " " DRV_RELDATE
44 " S.Opichal, M.Jurik, P.Stehlik\n" 44 " S.Opichal, M.Jurik, P.Stehlik\n"
45 KERN_INFO " http://aranym.org/\n"; 45 KERN_INFO " http://aranym.org/\n";
diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h
index 646b1872f73b..5ea75e6a7399 100644
--- a/arch/m68k/include/asm/parport.h
+++ b/arch/m68k/include/asm/parport.h
@@ -15,8 +15,8 @@
15#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) 15#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2)
16 16
17/* no dma, or IRQ autoprobing */ 17/* no dma, or IRQ autoprobing */
18static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); 18static int parport_pc_find_isa_ports (int autoirq, int autodma);
19static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 19static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
20{ 20{
21 if (! (MACH_IS_Q40)) 21 if (! (MACH_IS_Q40))
22 return 0; /* count=0 */ 22 return 0; /* count=0 */
diff --git a/arch/m68k/kernel/pcibios.c b/arch/m68k/kernel/pcibios.c
index 73fa0b56a06c..931a31ff59dd 100644
--- a/arch/m68k/kernel/pcibios.c
+++ b/arch/m68k/kernel/pcibios.c
@@ -87,7 +87,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
87 return 0; 87 return 0;
88} 88}
89 89
90void __devinit pcibios_fixup_bus(struct pci_bus *bus) 90void pcibios_fixup_bus(struct pci_bus *bus)
91{ 91{
92 struct pci_dev *dev; 92 struct pci_dev *dev;
93 93
@@ -97,7 +97,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
97 } 97 }
98} 98}
99 99
100char __devinit *pcibios_setup(char *str) 100char *pcibios_setup(char *str)
101{ 101{
102 return str; 102 return str;
103} 103}
diff --git a/arch/microblaze/configs/mmu_defconfig b/arch/microblaze/configs/mmu_defconfig
index b3f5eecff2a7..d2b097a652d9 100644
--- a/arch/microblaze/configs/mmu_defconfig
+++ b/arch/microblaze/configs/mmu_defconfig
@@ -1,25 +1,22 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
3CONFIG_POSIX_MQUEUE=y
4CONFIG_FHANDLE=y
5CONFIG_AUDIT=y
6CONFIG_AUDIT_LOGINUID_IMMUTABLE=y
3CONFIG_IKCONFIG=y 7CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y 8CONFIG_IKCONFIG_PROC=y
9CONFIG_SYSFS_DEPRECATED=y
5CONFIG_SYSFS_DEPRECATED_V2=y 10CONFIG_SYSFS_DEPRECATED_V2=y
6CONFIG_BLK_DEV_INITRD=y
7CONFIG_INITRAMFS_SOURCE="rootfs.cpio"
8CONFIG_INITRAMFS_COMPRESSION_GZIP=y
9# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
10CONFIG_EXPERT=y
11CONFIG_KALLSYMS_ALL=y 11CONFIG_KALLSYMS_ALL=y
12CONFIG_KALLSYMS_EXTRA_PASS=y
13# CONFIG_HOTPLUG is not set
14# CONFIG_BASE_FULL is not set 12# CONFIG_BASE_FULL is not set
15# CONFIG_FUTEX is not set 13CONFIG_EMBEDDED=y
16# CONFIG_EPOLL is not set
17# CONFIG_SIGNALFD is not set
18# CONFIG_SHMEM is not set
19CONFIG_SLAB=y 14CONFIG_SLAB=y
20CONFIG_MODULES=y 15CONFIG_MODULES=y
21CONFIG_MODULE_UNLOAD=y 16CONFIG_MODULE_UNLOAD=y
22# CONFIG_BLK_DEV_BSG is not set 17# CONFIG_BLK_DEV_BSG is not set
18CONFIG_PARTITION_ADVANCED=y
19# CONFIG_EFI_PARTITION is not set
23CONFIG_OPT_LIB_ASM=y 20CONFIG_OPT_LIB_ASM=y
24CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 21CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
25CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 22CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
@@ -31,39 +28,62 @@ CONFIG_HZ_100=y
31CONFIG_MMU=y 28CONFIG_MMU=y
32CONFIG_CMDLINE_BOOL=y 29CONFIG_CMDLINE_BOOL=y
33CONFIG_CMDLINE_FORCE=y 30CONFIG_CMDLINE_FORCE=y
31CONFIG_HIGHMEM=y
32CONFIG_PCI=y
33CONFIG_PCI_XILINX=y
34CONFIG_NET=y 34CONFIG_NET=y
35CONFIG_PACKET=y 35CONFIG_PACKET=y
36CONFIG_UNIX=y 36CONFIG_UNIX=y
37CONFIG_INET=y 37CONFIG_INET=y
38# CONFIG_INET_LRO is not set 38# CONFIG_INET_LRO is not set
39# CONFIG_IPV6 is not set 39# CONFIG_IPV6 is not set
40CONFIG_MTD=y
40CONFIG_PROC_DEVICETREE=y 41CONFIG_PROC_DEVICETREE=y
41CONFIG_BLK_DEV_RAM=y 42CONFIG_BLK_DEV_RAM=y
42CONFIG_BLK_DEV_RAM_SIZE=8192 43CONFIG_BLK_DEV_RAM_SIZE=8192
43CONFIG_NETDEVICES=y 44CONFIG_NETDEVICES=y
44CONFIG_NET_ETHERNET=y
45CONFIG_XILINX_EMACLITE=y 45CONFIG_XILINX_EMACLITE=y
46CONFIG_XILINX_LL_TEMAC=y
46# CONFIG_INPUT is not set 47# CONFIG_INPUT is not set
47# CONFIG_SERIO is not set 48# CONFIG_SERIO is not set
48# CONFIG_VT is not set 49# CONFIG_VT is not set
50CONFIG_SERIAL_8250=y
51CONFIG_SERIAL_8250_CONSOLE=y
49CONFIG_SERIAL_UARTLITE=y 52CONFIG_SERIAL_UARTLITE=y
50CONFIG_SERIAL_UARTLITE_CONSOLE=y 53CONFIG_SERIAL_UARTLITE_CONSOLE=y
51# CONFIG_HW_RANDOM is not set 54# CONFIG_HW_RANDOM is not set
55CONFIG_XILINX_HWICAP=y
56CONFIG_I2C=y
57CONFIG_I2C_XILINX=y
58CONFIG_SPI=y
59CONFIG_SPI_XILINX=y
60CONFIG_GPIOLIB=y
61CONFIG_GPIO_SYSFS=y
62CONFIG_GPIO_XILINX=y
52# CONFIG_HWMON is not set 63# CONFIG_HWMON is not set
64CONFIG_WATCHDOG=y
65CONFIG_XILINX_WATCHDOG=y
66CONFIG_FB=y
67CONFIG_FB_XILINX=y
53# CONFIG_USB_SUPPORT is not set 68# CONFIG_USB_SUPPORT is not set
69CONFIG_UIO=y
70CONFIG_UIO_PDRV=y
71CONFIG_UIO_PDRV_GENIRQ=y
72CONFIG_UIO_DMEM_GENIRQ=y
54CONFIG_EXT2_FS=y 73CONFIG_EXT2_FS=y
55# CONFIG_DNOTIFY is not set 74# CONFIG_DNOTIFY is not set
75CONFIG_CRAMFS=y
76CONFIG_ROMFS_FS=y
56CONFIG_NFS_FS=y 77CONFIG_NFS_FS=y
57CONFIG_NFS_V3=y
58CONFIG_CIFS=y 78CONFIG_CIFS=y
59CONFIG_CIFS_STATS=y 79CONFIG_CIFS_STATS=y
60CONFIG_CIFS_STATS2=y 80CONFIG_CIFS_STATS2=y
61CONFIG_PARTITION_ADVANCED=y
62CONFIG_DEBUG_KERNEL=y
63CONFIG_DETECT_HUNG_TASK=y 81CONFIG_DETECT_HUNG_TASK=y
64CONFIG_DEBUG_SLAB=y 82CONFIG_DEBUG_SLAB=y
65CONFIG_DEBUG_SPINLOCK=y 83CONFIG_DEBUG_SPINLOCK=y
66CONFIG_DEBUG_INFO=y 84CONFIG_DEBUG_INFO=y
67# CONFIG_RCU_CPU_STALL_DETECTOR is not set
68CONFIG_EARLY_PRINTK=y 85CONFIG_EARLY_PRINTK=y
86CONFIG_KEYS=y
87CONFIG_ENCRYPTED_KEYS=y
88CONFIG_KEYS_DEBUG_PROC_KEYS=y
69# CONFIG_CRYPTO_ANSI_CPRNG is not set 89# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/microblaze/configs/nommu_defconfig b/arch/microblaze/configs/nommu_defconfig
index 0249e4b7e1d3..10b5172283d7 100644
--- a/arch/microblaze/configs/nommu_defconfig
+++ b/arch/microblaze/configs/nommu_defconfig
@@ -1,41 +1,42 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
3CONFIG_POSIX_MQUEUE=y 3CONFIG_POSIX_MQUEUE=y
4CONFIG_FHANDLE=y
5CONFIG_AUDIT=y
6CONFIG_AUDIT_LOGINUID_IMMUTABLE=y
4CONFIG_BSD_PROCESS_ACCT=y 7CONFIG_BSD_PROCESS_ACCT=y
5CONFIG_BSD_PROCESS_ACCT_V3=y 8CONFIG_BSD_PROCESS_ACCT_V3=y
6CONFIG_IKCONFIG=y 9CONFIG_IKCONFIG=y
7CONFIG_IKCONFIG_PROC=y 10CONFIG_IKCONFIG_PROC=y
11CONFIG_SYSFS_DEPRECATED=y
8CONFIG_SYSFS_DEPRECATED_V2=y 12CONFIG_SYSFS_DEPRECATED_V2=y
9CONFIG_EXPERT=y
10CONFIG_KALLSYMS_ALL=y 13CONFIG_KALLSYMS_ALL=y
11CONFIG_KALLSYMS_EXTRA_PASS=y
12# CONFIG_HOTPLUG is not set
13# CONFIG_BASE_FULL is not set 14# CONFIG_BASE_FULL is not set
15CONFIG_EMBEDDED=y
14CONFIG_SLAB=y 16CONFIG_SLAB=y
15CONFIG_MODULES=y 17CONFIG_MODULES=y
16CONFIG_MODULE_UNLOAD=y 18CONFIG_MODULE_UNLOAD=y
17# CONFIG_BLK_DEV_BSG is not set 19# CONFIG_BLK_DEV_BSG is not set
18# CONFIG_OPT_LIB_FUNCTION is not set 20CONFIG_PARTITION_ADVANCED=y
21# CONFIG_EFI_PARTITION is not set
19CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 22CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
20CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 23CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
21CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 24CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
22CONFIG_XILINX_MICROBLAZE0_USE_DIV=1 25CONFIG_XILINX_MICROBLAZE0_USE_DIV=1
23CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2 26CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2
24CONFIG_XILINX_MICROBLAZE0_USE_FPU=2 27CONFIG_XILINX_MICROBLAZE0_USE_FPU=2
25CONFIG_HIGH_RES_TIMERS=y
26CONFIG_HZ_100=y 28CONFIG_HZ_100=y
27CONFIG_CMDLINE_BOOL=y 29CONFIG_CMDLINE_BOOL=y
28CONFIG_BINFMT_FLAT=y 30CONFIG_CMDLINE_FORCE=y
31CONFIG_PCI=y
32CONFIG_PCI_XILINX=y
29CONFIG_NET=y 33CONFIG_NET=y
30CONFIG_PACKET=y 34CONFIG_PACKET=y
31CONFIG_UNIX=y 35CONFIG_UNIX=y
32CONFIG_INET=y 36CONFIG_INET=y
33# CONFIG_INET_LRO is not set 37# CONFIG_INET_LRO is not set
34# CONFIG_IPV6 is not set 38# CONFIG_IPV6 is not set
35# CONFIG_PREVENT_FIRMWARE_BUILD is not set
36CONFIG_MTD=y 39CONFIG_MTD=y
37CONFIG_MTD_CONCAT=y
38CONFIG_MTD_PARTITIONS=y
39CONFIG_MTD_CMDLINE_PARTS=y 40CONFIG_MTD_CMDLINE_PARTS=y
40CONFIG_MTD_CHAR=y 41CONFIG_MTD_CHAR=y
41CONFIG_MTD_BLOCK=y 42CONFIG_MTD_BLOCK=y
@@ -45,41 +46,55 @@ CONFIG_MTD_CFI_AMDSTD=y
45CONFIG_MTD_RAM=y 46CONFIG_MTD_RAM=y
46CONFIG_MTD_UCLINUX=y 47CONFIG_MTD_UCLINUX=y
47CONFIG_PROC_DEVICETREE=y 48CONFIG_PROC_DEVICETREE=y
48CONFIG_BLK_DEV_NBD=y
49CONFIG_BLK_DEV_RAM=y 49CONFIG_BLK_DEV_RAM=y
50CONFIG_BLK_DEV_RAM_SIZE=8192
50CONFIG_NETDEVICES=y 51CONFIG_NETDEVICES=y
51CONFIG_NET_ETHERNET=y 52CONFIG_XILINX_EMACLITE=y
53CONFIG_XILINX_LL_TEMAC=y
52# CONFIG_INPUT is not set 54# CONFIG_INPUT is not set
53# CONFIG_SERIO is not set 55# CONFIG_SERIO is not set
54# CONFIG_VT is not set 56# CONFIG_VT is not set
57CONFIG_SERIAL_8250=y
58CONFIG_SERIAL_8250_CONSOLE=y
55CONFIG_SERIAL_UARTLITE=y 59CONFIG_SERIAL_UARTLITE=y
56CONFIG_SERIAL_UARTLITE_CONSOLE=y 60CONFIG_SERIAL_UARTLITE_CONSOLE=y
57CONFIG_HW_RANDOM=y 61# CONFIG_HW_RANDOM is not set
62CONFIG_XILINX_HWICAP=y
63CONFIG_I2C=y
64CONFIG_I2C_XILINX=y
65CONFIG_SPI=y
66CONFIG_SPI_XILINX=y
67CONFIG_GPIOLIB=y
68CONFIG_GPIO_SYSFS=y
69CONFIG_GPIO_XILINX=y
58# CONFIG_HWMON is not set 70# CONFIG_HWMON is not set
59CONFIG_VIDEO_OUTPUT_CONTROL=y 71CONFIG_WATCHDOG=y
72CONFIG_XILINX_WATCHDOG=y
73CONFIG_FB=y
74CONFIG_FB_XILINX=y
75# CONFIG_USB_SUPPORT is not set
76CONFIG_UIO=y
77CONFIG_UIO_PDRV=y
78CONFIG_UIO_PDRV_GENIRQ=y
79CONFIG_UIO_DMEM_GENIRQ=y
60CONFIG_EXT2_FS=y 80CONFIG_EXT2_FS=y
61# CONFIG_DNOTIFY is not set 81# CONFIG_DNOTIFY is not set
62CONFIG_CRAMFS=y 82CONFIG_CRAMFS=y
63CONFIG_ROMFS_FS=y 83CONFIG_ROMFS_FS=y
64CONFIG_NFS_FS=y 84CONFIG_NFS_FS=y
65CONFIG_NFS_V3=y
66CONFIG_NFS_V3_ACL=y 85CONFIG_NFS_V3_ACL=y
67CONFIG_UNUSED_SYMBOLS=y 86CONFIG_NLS=y
68CONFIG_DEBUG_FS=y
69CONFIG_DEBUG_KERNEL=y
70CONFIG_DEBUG_SHIRQ=y
71CONFIG_DETECT_HUNG_TASK=y 87CONFIG_DETECT_HUNG_TASK=y
72CONFIG_SCHEDSTATS=y 88CONFIG_DEBUG_SLAB=y
73CONFIG_TIMER_STATS=y 89CONFIG_DEBUG_SPINLOCK=y
74CONFIG_DEBUG_OBJECTS=y
75CONFIG_DEBUG_OBJECTS_SELFTEST=y
76CONFIG_DEBUG_OBJECTS_FREE=y
77CONFIG_DEBUG_OBJECTS_TIMERS=y
78CONFIG_DEBUG_INFO=y 90CONFIG_DEBUG_INFO=y
79CONFIG_DEBUG_LIST=y
80CONFIG_DEBUG_SG=y
81# CONFIG_RCU_CPU_STALL_DETECTOR is not set
82CONFIG_SYSCTL_SYSCALL_CHECK=y
83CONFIG_EARLY_PRINTK=y 91CONFIG_EARLY_PRINTK=y
92CONFIG_KEYS=y
93CONFIG_ENCRYPTED_KEYS=y
94CONFIG_KEYS_DEBUG_PROC_KEYS=y
95CONFIG_CRYPTO_ECB=y
96CONFIG_CRYPTO_MD4=y
97CONFIG_CRYPTO_MD5=y
98CONFIG_CRYPTO_ARC4=y
99CONFIG_CRYPTO_DES=y
84# CONFIG_CRYPTO_ANSI_CPRNG is not set 100# CONFIG_CRYPTO_ANSI_CPRNG is not set
85# CONFIG_CRC32 is not set
diff --git a/arch/microblaze/include/asm/highmem.h b/arch/microblaze/include/asm/highmem.h
index 2446a73140ac..d04638932438 100644
--- a/arch/microblaze/include/asm/highmem.h
+++ b/arch/microblaze/include/asm/highmem.h
@@ -71,7 +71,7 @@ static inline void kunmap(struct page *page)
71 kunmap_high(page); 71 kunmap_high(page);
72} 72}
73 73
74static inline void *__kmap_atomic(struct page *page) 74static inline void *kmap_atomic(struct page *page)
75{ 75{
76 return kmap_atomic_prot(page, kmap_prot); 76 return kmap_atomic_prot(page, kmap_prot);
77} 77}
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
index 927540d3cb7d..a1ab5f0009ef 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -108,7 +108,7 @@ static inline int ___range_ok(unsigned long addr, unsigned long size)
108# define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n" 108# define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n"
109#else 109#else
110# define __FIXUP_SECTION ".section .discard,\"ax\"\n" 110# define __FIXUP_SECTION ".section .discard,\"ax\"\n"
111# define __EX_TABLE_SECTION ".section .discard,\"a\"\n" 111# define __EX_TABLE_SECTION ".section .discard,\"ax\"\n"
112#endif 112#endif
113 113
114extern unsigned long __copy_tofrom_user(void __user *to, 114extern unsigned long __copy_tofrom_user(void __user *to,
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h
index a5f06ac97113..10f8ac186855 100644
--- a/arch/microblaze/include/asm/unistd.h
+++ b/arch/microblaze/include/asm/unistd.h
@@ -37,9 +37,7 @@
37#define __ARCH_WANT_SYS_RT_SIGSUSPEND 37#define __ARCH_WANT_SYS_RT_SIGSUSPEND
38#define __ARCH_WANT_SYS_CLONE 38#define __ARCH_WANT_SYS_CLONE
39#define __ARCH_WANT_SYS_VFORK 39#define __ARCH_WANT_SYS_VFORK
40#ifdef CONFIG_MMU
41#define __ARCH_WANT_SYS_FORK 40#define __ARCH_WANT_SYS_FORK
42#endif
43 41
44/* 42/*
45 * "Conditional" syscalls 43 * "Conditional" syscalls
diff --git a/arch/microblaze/include/uapi/asm/unistd.h b/arch/microblaze/include/uapi/asm/unistd.h
index ccb6920f3b33..5f7fe7582f3a 100644
--- a/arch/microblaze/include/uapi/asm/unistd.h
+++ b/arch/microblaze/include/uapi/asm/unistd.h
@@ -395,7 +395,8 @@
395#define __NR_process_vm_readv 377 395#define __NR_process_vm_readv 377
396#define __NR_process_vm_writev 378 396#define __NR_process_vm_writev 378
397#define __NR_kcmp 379 397#define __NR_kcmp 379
398#define __NR_finit_module 380
398 399
399#define __NR_syscalls 380 400#define __NR_syscalls 381
400 401
401#endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */ 402#endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
index 1cbace29b5e2..4fca56cf02f6 100644
--- a/arch/microblaze/kernel/syscall_table.S
+++ b/arch/microblaze/kernel/syscall_table.S
@@ -380,3 +380,4 @@ ENTRY(sys_call_table)
380 .long sys_process_vm_readv 380 .long sys_process_vm_readv
381 .long sys_process_vm_writev 381 .long sys_process_vm_writev
382 .long sys_kcmp 382 .long sys_kcmp
383 .long sys_finit_module
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index a1c5b996d66d..96416553cb36 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -287,7 +287,7 @@ static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
287 unsigned long io_offset = 0; 287 unsigned long io_offset = 0;
288 int i, res_bit; 288 int i, res_bit;
289 289
290 if (hose == 0) 290 if (!hose)
291 return NULL; /* should never happen */ 291 return NULL; /* should never happen */
292 292
293 /* If memory, add on the PCI bridge address offset */ 293 /* If memory, add on the PCI bridge address offset */
@@ -655,9 +655,8 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar,
655 * - Some 32 bits platforms such as 4xx can have physical space larger than 655 * - Some 32 bits platforms such as 4xx can have physical space larger than
656 * 32 bits so we need to use 64 bits values for the parsing 656 * 32 bits so we need to use 64 bits values for the parsing
657 */ 657 */
658void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, 658void pci_process_bridge_OF_ranges(struct pci_controller *hose,
659 struct device_node *dev, 659 struct device_node *dev, int primary)
660 int primary)
661{ 660{
662 const u32 *ranges; 661 const u32 *ranges;
663 int rlen; 662 int rlen;
@@ -822,15 +821,13 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
822/* Decide whether to display the domain number in /proc */ 821/* Decide whether to display the domain number in /proc */
823int pci_proc_domain(struct pci_bus *bus) 822int pci_proc_domain(struct pci_bus *bus)
824{ 823{
825 struct pci_controller *hose = pci_bus_to_host(bus);
826
827 return 0; 824 return 0;
828} 825}
829 826
830/* This header fixup will do the resource fixup for all devices as they are 827/* This header fixup will do the resource fixup for all devices as they are
831 * probed, but not for bridge ranges 828 * probed, but not for bridge ranges
832 */ 829 */
833static void __devinit pcibios_fixup_resources(struct pci_dev *dev) 830static void pcibios_fixup_resources(struct pci_dev *dev)
834{ 831{
835 struct pci_controller *hose = pci_bus_to_host(dev->bus); 832 struct pci_controller *hose = pci_bus_to_host(dev->bus);
836 int i; 833 int i;
@@ -871,8 +868,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
871 * things go more smoothly when it gets it right. It should covers cases such 868 * things go more smoothly when it gets it right. It should covers cases such
872 * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges 869 * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges
873 */ 870 */
874static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus, 871static int pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
875 struct resource *res) 872 struct resource *res)
876{ 873{
877 struct pci_controller *hose = pci_bus_to_host(bus); 874 struct pci_controller *hose = pci_bus_to_host(bus);
878 struct pci_dev *dev = bus->self; 875 struct pci_dev *dev = bus->self;
@@ -933,7 +930,7 @@ static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
933} 930}
934 931
935/* Fixup resources of a PCI<->PCI bridge */ 932/* Fixup resources of a PCI<->PCI bridge */
936static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) 933static void pcibios_fixup_bridge(struct pci_bus *bus)
937{ 934{
938 struct resource *res; 935 struct resource *res;
939 int i; 936 int i;
@@ -970,14 +967,14 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
970 } 967 }
971} 968}
972 969
973void __devinit pcibios_setup_bus_self(struct pci_bus *bus) 970void pcibios_setup_bus_self(struct pci_bus *bus)
974{ 971{
975 /* Fix up the bus resources for P2P bridges */ 972 /* Fix up the bus resources for P2P bridges */
976 if (bus->self != NULL) 973 if (bus->self != NULL)
977 pcibios_fixup_bridge(bus); 974 pcibios_fixup_bridge(bus);
978} 975}
979 976
980void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) 977void pcibios_setup_bus_devices(struct pci_bus *bus)
981{ 978{
982 struct pci_dev *dev; 979 struct pci_dev *dev;
983 980
@@ -1002,7 +999,7 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
1002 } 999 }
1003} 1000}
1004 1001
1005void __devinit pcibios_fixup_bus(struct pci_bus *bus) 1002void pcibios_fixup_bus(struct pci_bus *bus)
1006{ 1003{
1007 /* When called from the generic PCI probe, read PCI<->PCI bridge 1004 /* When called from the generic PCI probe, read PCI<->PCI bridge
1008 * bases. This is -not- called when generating the PCI tree from 1005 * bases. This is -not- called when generating the PCI tree from
@@ -1124,7 +1121,7 @@ static int __init reparent_resources(struct resource *parent,
1124 * as well. 1121 * as well.
1125 */ 1122 */
1126 1123
1127void pcibios_allocate_bus_resources(struct pci_bus *bus) 1124static void pcibios_allocate_bus_resources(struct pci_bus *bus)
1128{ 1125{
1129 struct pci_bus *b; 1126 struct pci_bus *b;
1130 int i; 1127 int i;
@@ -1179,7 +1176,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1179 } 1176 }
1180 printk(KERN_WARNING "PCI: Cannot allocate resource region " 1177 printk(KERN_WARNING "PCI: Cannot allocate resource region "
1181 "%d of PCI bridge %d, will remap\n", i, bus->number); 1178 "%d of PCI bridge %d, will remap\n", i, bus->number);
1182clear_resource: 1179
1183 res->start = res->end = 0; 1180 res->start = res->end = 0;
1184 res->flags = 0; 1181 res->flags = 0;
1185 } 1182 }
@@ -1188,7 +1185,7 @@ clear_resource:
1188 pcibios_allocate_bus_resources(b); 1185 pcibios_allocate_bus_resources(b);
1189} 1186}
1190 1187
1191static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) 1188static inline void alloc_resource(struct pci_dev *dev, int idx)
1192{ 1189{
1193 struct resource *pr, *r = &dev->resource[idx]; 1190 struct resource *pr, *r = &dev->resource[idx];
1194 1191
@@ -1351,7 +1348,7 @@ void __init pcibios_resource_survey(void)
1351 * rest of the code later, for now, keep it as-is as our main 1348 * rest of the code later, for now, keep it as-is as our main
1352 * resource allocation function doesn't deal with sub-trees yet. 1349 * resource allocation function doesn't deal with sub-trees yet.
1353 */ 1350 */
1354void __devinit pcibios_claim_one_bus(struct pci_bus *bus) 1351void pcibios_claim_one_bus(struct pci_bus *bus)
1355{ 1352{
1356 struct pci_dev *dev; 1353 struct pci_dev *dev;
1357 struct pci_bus *child_bus; 1354 struct pci_bus *child_bus;
@@ -1410,7 +1407,8 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
1410 return pci_enable_resources(dev, mask); 1407 return pci_enable_resources(dev, mask);
1411} 1408}
1412 1409
1413static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources) 1410static void pcibios_setup_phb_resources(struct pci_controller *hose,
1411 struct list_head *resources)
1414{ 1412{
1415 unsigned long io_offset; 1413 unsigned long io_offset;
1416 struct resource *res; 1414 struct resource *res;
@@ -1433,7 +1431,8 @@ static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, s
1433 res->end = res->start + IO_SPACE_LIMIT; 1431 res->end = res->start + IO_SPACE_LIMIT;
1434 res->flags = IORESOURCE_IO; 1432 res->flags = IORESOURCE_IO;
1435 } 1433 }
1436 pci_add_resource_offset(resources, res, hose->io_base_virt - _IO_BASE); 1434 pci_add_resource_offset(resources, res,
1435 (__force resource_size_t)(hose->io_base_virt - _IO_BASE));
1437 1436
1438 pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n", 1437 pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n",
1439 (unsigned long long)res->start, 1438 (unsigned long long)res->start,
@@ -1477,7 +1476,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
1477 return of_node_get(hose->dn); 1476 return of_node_get(hose->dn);
1478} 1477}
1479 1478
1480static void __devinit pcibios_scan_phb(struct pci_controller *hose) 1479static void pcibios_scan_phb(struct pci_controller *hose)
1481{ 1480{
1482 LIST_HEAD(resources); 1481 LIST_HEAD(resources);
1483 struct pci_bus *bus; 1482 struct pci_bus *bus;
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index b7dc39c6c849..2ac626ab9d43 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -39,8 +39,8 @@ config MIPS
39 select GENERIC_CLOCKEVENTS 39 select GENERIC_CLOCKEVENTS
40 select GENERIC_CMOS_UPDATE 40 select GENERIC_CMOS_UPDATE
41 select HAVE_MOD_ARCH_SPECIFIC 41 select HAVE_MOD_ARCH_SPECIFIC
42 select MODULES_USE_ELF_REL 42 select MODULES_USE_ELF_REL if MODULES
43 select MODULES_USE_ELF_RELA if 64BIT 43 select MODULES_USE_ELF_RELA if MODULES && 64BIT
44 44
45menu "Machine selection" 45menu "Machine selection"
46 46
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c
index a7193ae13a5d..b67930d19325 100644
--- a/arch/mips/alchemy/common/time.c
+++ b/arch/mips/alchemy/common/time.c
@@ -53,7 +53,7 @@ static struct clocksource au1x_counter1_clocksource = {
53 .read = au1x_counter1_read, 53 .read = au1x_counter1_read,
54 .mask = CLOCKSOURCE_MASK(32), 54 .mask = CLOCKSOURCE_MASK(32),
55 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 55 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
56 .rating = 100, 56 .rating = 1500,
57}; 57};
58 58
59static int au1x_rtcmatch2_set_next_event(unsigned long delta, 59static int au1x_rtcmatch2_set_next_event(unsigned long delta,
@@ -84,7 +84,7 @@ static irqreturn_t au1x_rtcmatch2_irq(int irq, void *dev_id)
84static struct clock_event_device au1x_rtcmatch2_clockdev = { 84static struct clock_event_device au1x_rtcmatch2_clockdev = {
85 .name = "rtcmatch2", 85 .name = "rtcmatch2",
86 .features = CLOCK_EVT_FEAT_ONESHOT, 86 .features = CLOCK_EVT_FEAT_ONESHOT,
87 .rating = 100, 87 .rating = 1500,
88 .set_next_event = au1x_rtcmatch2_set_next_event, 88 .set_next_event = au1x_rtcmatch2_set_next_event,
89 .set_mode = au1x_rtcmatch2_set_mode, 89 .set_mode = au1x_rtcmatch2_set_mode,
90 .cpumask = cpu_all_mask, 90 .cpumask = cpu_all_mask,
@@ -158,20 +158,6 @@ cntr_err:
158 return -1; 158 return -1;
159} 159}
160 160
161static void __init alchemy_setup_c0timer(void)
162{
163 /*
164 * MIPS kernel assigns 'au1k_wait' to 'cpu_wait' before this
165 * function is called. Because the Alchemy counters are unusable
166 * the C0 timekeeping code is installed and use of the 'wait'
167 * instruction must be prohibited, which is done most easily by
168 * assigning NULL to cpu_wait.
169 */
170 cpu_wait = NULL;
171 r4k_clockevent_init();
172 init_r4k_clocksource();
173}
174
175static int alchemy_m2inttab[] __initdata = { 161static int alchemy_m2inttab[] __initdata = {
176 AU1000_RTC_MATCH2_INT, 162 AU1000_RTC_MATCH2_INT,
177 AU1500_RTC_MATCH2_INT, 163 AU1500_RTC_MATCH2_INT,
@@ -186,8 +172,7 @@ void __init plat_time_init(void)
186 int t; 172 int t;
187 173
188 t = alchemy_get_cputype(); 174 t = alchemy_get_cputype();
189 if (t == ALCHEMY_CPU_UNKNOWN) 175 if (t == ALCHEMY_CPU_UNKNOWN ||
190 alchemy_setup_c0timer(); 176 alchemy_time_init(alchemy_m2inttab[t]))
191 else if (alchemy_time_init(alchemy_m2inttab[t])) 177 cpu_wait = NULL; /* wait doesn't work with r4k timer */
192 alchemy_setup_c0timer();
193} 178}
diff --git a/arch/mips/cavium-octeon/serial.c b/arch/mips/cavium-octeon/serial.c
index 569f41bdcc46..f393f65f3923 100644
--- a/arch/mips/cavium-octeon/serial.c
+++ b/arch/mips/cavium-octeon/serial.c
@@ -43,7 +43,7 @@ void octeon_serial_out(struct uart_port *up, int offset, int value)
43 cvmx_write_csr((uint64_t)(up->membase + (offset << 3)), (u8)value); 43 cvmx_write_csr((uint64_t)(up->membase + (offset << 3)), (u8)value);
44} 44}
45 45
46static int __devinit octeon_serial_probe(struct platform_device *pdev) 46static int octeon_serial_probe(struct platform_device *pdev)
47{ 47{
48 int irq, res; 48 int irq, res;
49 struct resource *res_mem; 49 struct resource *res_mem;
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index 31ab10f02bad..dbaec94046da 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -45,8 +45,6 @@
45#define HUGETLB_PAGE_ORDER ({BUILD_BUG(); 0; }) 45#define HUGETLB_PAGE_ORDER ({BUILD_BUG(); 0; })
46#endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */ 46#endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */
47 47
48#ifndef __ASSEMBLY__
49
50#include <linux/pfn.h> 48#include <linux/pfn.h>
51#include <asm/io.h> 49#include <asm/io.h>
52 50
@@ -139,8 +137,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
139 */ 137 */
140#define ptep_buddy(x) ((pte_t *)((unsigned long)(x) ^ sizeof(pte_t))) 138#define ptep_buddy(x) ((pte_t *)((unsigned long)(x) ^ sizeof(pte_t)))
141 139
142#endif /* !__ASSEMBLY__ */
143
144/* 140/*
145 * __pa()/__va() should be used only during mem init. 141 * __pa()/__va() should be used only during mem init.
146 */ 142 */
@@ -202,7 +198,10 @@ typedef struct { unsigned long pgprot; } pgprot_t;
202#endif 198#endif
203 199
204#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) 200#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
205#define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr))) 201
202extern int __virt_addr_valid(const volatile void *kaddr);
203#define virt_addr_valid(kaddr) \
204 __virt_addr_valid((const volatile void *) (kaddr))
206 205
207#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 206#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
208 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 207 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h
index 90bf3b3fce19..d69ea743272b 100644
--- a/arch/mips/include/asm/pci.h
+++ b/arch/mips/include/asm/pci.h
@@ -145,7 +145,7 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
145extern char * (*pcibios_plat_setup)(char *str); 145extern char * (*pcibios_plat_setup)(char *str);
146 146
147/* this function parses memory ranges from a device node */ 147/* this function parses memory ranges from a device node */
148extern void __devinit pci_load_of_ranges(struct pci_controller *hose, 148extern void pci_load_of_ranges(struct pci_controller *hose,
149 struct device_node *node); 149 struct device_node *node);
150 150
151#endif /* _ASM_PCI_H */ 151#endif /* _ASM_PCI_H */
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
index 18806a52061c..b2050b9e64b1 100644
--- a/arch/mips/include/asm/thread_info.h
+++ b/arch/mips/include/asm/thread_info.h
@@ -29,10 +29,11 @@ struct thread_info {
29 __u32 cpu; /* current CPU */ 29 __u32 cpu; /* current CPU */
30 int preempt_count; /* 0 => preemptable, <0 => BUG */ 30 int preempt_count; /* 0 => preemptable, <0 => BUG */
31 31
32 mm_segment_t addr_limit; /* thread address space: 32 mm_segment_t addr_limit; /*
33 0-0xBFFFFFFF for user-thead 33 * thread address space limit:
34 0-0xFFFFFFFF for kernel-thread 34 * 0x7fffffff for user-thead
35 */ 35 * 0xffffffff for kernel-thread
36 */
36 struct restart_block restart_block; 37 struct restart_block restart_block;
37 struct pt_regs *regs; 38 struct pt_regs *regs;
38}; 39};
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h
index cc98a9dcb01b..0eebf3c3e03c 100644
--- a/arch/mips/include/uapi/asm/unistd.h
+++ b/arch/mips/include/uapi/asm/unistd.h
@@ -368,16 +368,17 @@
368#define __NR_process_vm_readv (__NR_Linux + 345) 368#define __NR_process_vm_readv (__NR_Linux + 345)
369#define __NR_process_vm_writev (__NR_Linux + 346) 369#define __NR_process_vm_writev (__NR_Linux + 346)
370#define __NR_kcmp (__NR_Linux + 347) 370#define __NR_kcmp (__NR_Linux + 347)
371#define __NR_finit_module (__NR_Linux + 348)
371 372
372/* 373/*
373 * Offset of the last Linux o32 flavoured syscall 374 * Offset of the last Linux o32 flavoured syscall
374 */ 375 */
375#define __NR_Linux_syscalls 347 376#define __NR_Linux_syscalls 348
376 377
377#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 378#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
378 379
379#define __NR_O32_Linux 4000 380#define __NR_O32_Linux 4000
380#define __NR_O32_Linux_syscalls 347 381#define __NR_O32_Linux_syscalls 348
381 382
382#if _MIPS_SIM == _MIPS_SIM_ABI64 383#if _MIPS_SIM == _MIPS_SIM_ABI64
383 384
@@ -692,16 +693,17 @@
692#define __NR_process_vm_readv (__NR_Linux + 304) 693#define __NR_process_vm_readv (__NR_Linux + 304)
693#define __NR_process_vm_writev (__NR_Linux + 305) 694#define __NR_process_vm_writev (__NR_Linux + 305)
694#define __NR_kcmp (__NR_Linux + 306) 695#define __NR_kcmp (__NR_Linux + 306)
696#define __NR_finit_module (__NR_Linux + 307)
695 697
696/* 698/*
697 * Offset of the last Linux 64-bit flavoured syscall 699 * Offset of the last Linux 64-bit flavoured syscall
698 */ 700 */
699#define __NR_Linux_syscalls 306 701#define __NR_Linux_syscalls 307
700 702
701#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 703#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
702 704
703#define __NR_64_Linux 5000 705#define __NR_64_Linux 5000
704#define __NR_64_Linux_syscalls 306 706#define __NR_64_Linux_syscalls 307
705 707
706#if _MIPS_SIM == _MIPS_SIM_NABI32 708#if _MIPS_SIM == _MIPS_SIM_NABI32
707 709
@@ -1021,15 +1023,16 @@
1021#define __NR_process_vm_readv (__NR_Linux + 309) 1023#define __NR_process_vm_readv (__NR_Linux + 309)
1022#define __NR_process_vm_writev (__NR_Linux + 310) 1024#define __NR_process_vm_writev (__NR_Linux + 310)
1023#define __NR_kcmp (__NR_Linux + 311) 1025#define __NR_kcmp (__NR_Linux + 311)
1026#define __NR_finit_module (__NR_Linux + 312)
1024 1027
1025/* 1028/*
1026 * Offset of the last N32 flavoured syscall 1029 * Offset of the last N32 flavoured syscall
1027 */ 1030 */
1028#define __NR_Linux_syscalls 311 1031#define __NR_Linux_syscalls 312
1029 1032
1030#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 1033#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
1031 1034
1032#define __NR_N32_Linux 6000 1035#define __NR_N32_Linux 6000
1033#define __NR_N32_Linux_syscalls 311 1036#define __NR_N32_Linux_syscalls 312
1034 1037
1035#endif /* _UAPI_ASM_UNISTD_H */ 1038#endif /* _UAPI_ASM_UNISTD_H */
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 9690998d4ef3..50285b2c7ffe 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -200,6 +200,9 @@ void output_mm_defines(void)
200 DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD); 200 DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD);
201 DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE); 201 DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE);
202 BLANK(); 202 BLANK();
203 DEFINE(_PAGE_SHIFT, PAGE_SHIFT);
204 DEFINE(_PAGE_SIZE, PAGE_SIZE);
205 BLANK();
203} 206}
204 207
205#ifdef CONFIG_32BIT 208#ifdef CONFIG_32BIT
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 8882e5766f27..8a0096d62812 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -19,7 +19,6 @@
19#include <asm/mipsregs.h> 19#include <asm/mipsregs.h>
20#include <asm/stackframe.h> 20#include <asm/stackframe.h>
21#include <asm/war.h> 21#include <asm/war.h>
22#include <asm/page.h>
23#include <asm/thread_info.h> 22#include <asm/thread_info.h>
24 23
25#define PANIC_PIC(msg) \ 24#define PANIC_PIC(msg) \
@@ -483,8 +482,8 @@ NESTED(nmi_handler, PT_SIZE, sp)
483 MFC0 k1, CP0_ENTRYHI 482 MFC0 k1, CP0_ENTRYHI
484 andi k1, 0xff /* ASID_MASK */ 483 andi k1, 0xff /* ASID_MASK */
485 MFC0 k0, CP0_EPC 484 MFC0 k0, CP0_EPC
486 PTR_SRL k0, PAGE_SHIFT + 1 485 PTR_SRL k0, _PAGE_SHIFT + 1
487 PTR_SLL k0, PAGE_SHIFT + 1 486 PTR_SLL k0, _PAGE_SHIFT + 1
488 or k1, k0 487 or k1, k0
489 MTC0 k1, CP0_ENTRYHI 488 MTC0 k1, CP0_ENTRYHI
490 mtc0_tlbw_hazard 489 mtc0_tlbw_hazard
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index ea695d9605e9..fcf97312f328 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -21,7 +21,6 @@
21#include <asm/asmmacro.h> 21#include <asm/asmmacro.h>
22#include <asm/irqflags.h> 22#include <asm/irqflags.h>
23#include <asm/regdef.h> 23#include <asm/regdef.h>
24#include <asm/page.h>
25#include <asm/pgtable-bits.h> 24#include <asm/pgtable-bits.h>
26#include <asm/mipsregs.h> 25#include <asm/mipsregs.h>
27#include <asm/stackframe.h> 26#include <asm/stackframe.h>
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S
index 0441f54b2a6a..207f1341578b 100644
--- a/arch/mips/kernel/octeon_switch.S
+++ b/arch/mips/kernel/octeon_switch.S
@@ -15,7 +15,6 @@
15#include <asm/fpregdef.h> 15#include <asm/fpregdef.h>
16#include <asm/mipsregs.h> 16#include <asm/mipsregs.h>
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include <asm/page.h>
19#include <asm/pgtable-bits.h> 18#include <asm/pgtable-bits.h>
20#include <asm/regdef.h> 19#include <asm/regdef.h>
21#include <asm/stackframe.h> 20#include <asm/stackframe.h>
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
index b14c14d90fc2..d9c81c5a6c90 100644
--- a/arch/mips/kernel/perf_event_mipsxx.c
+++ b/arch/mips/kernel/perf_event_mipsxx.c
@@ -847,7 +847,6 @@ static const struct mips_perf_event xlp_event_map[PERF_COUNT_HW_MAX] = {
847 [PERF_COUNT_HW_CACHE_MISSES] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ 847 [PERF_COUNT_HW_CACHE_MISSES] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */
848 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x1b, CNTR_ALL }, /* PAPI_BR_CN */ 848 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x1b, CNTR_ALL }, /* PAPI_BR_CN */
849 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x1c, CNTR_ALL }, /* PAPI_BR_MSP */ 849 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x1c, CNTR_ALL }, /* PAPI_BR_MSP */
850 [PERF_COUNT_HW_BUS_CYCLES] = { UNSUPPORTED_PERF_EVENT_ID },
851}; 850};
852 851
853/* 24K/34K/1004K cores can share the same cache event map. */ 852/* 24K/34K/1004K cores can share the same cache event map. */
@@ -1115,24 +1114,12 @@ static const struct mips_perf_event xlp_cache_map
1115 [C(RESULT_ACCESS)] = { 0x2f, CNTR_ALL }, /* PAPI_L1_DCW */ 1114 [C(RESULT_ACCESS)] = { 0x2f, CNTR_ALL }, /* PAPI_L1_DCW */
1116 [C(RESULT_MISS)] = { 0x2e, CNTR_ALL }, /* PAPI_L1_STM */ 1115 [C(RESULT_MISS)] = { 0x2e, CNTR_ALL }, /* PAPI_L1_STM */
1117 }, 1116 },
1118 [C(OP_PREFETCH)] = {
1119 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1120 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1121 },
1122}, 1117},
1123[C(L1I)] = { 1118[C(L1I)] = {
1124 [C(OP_READ)] = { 1119 [C(OP_READ)] = {
1125 [C(RESULT_ACCESS)] = { 0x04, CNTR_ALL }, /* PAPI_L1_ICA */ 1120 [C(RESULT_ACCESS)] = { 0x04, CNTR_ALL }, /* PAPI_L1_ICA */
1126 [C(RESULT_MISS)] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ 1121 [C(RESULT_MISS)] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */
1127 }, 1122 },
1128 [C(OP_WRITE)] = {
1129 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1130 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1131 },
1132 [C(OP_PREFETCH)] = {
1133 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1134 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1135 },
1136}, 1123},
1137[C(LL)] = { 1124[C(LL)] = {
1138 [C(OP_READ)] = { 1125 [C(OP_READ)] = {
@@ -1143,10 +1130,6 @@ static const struct mips_perf_event xlp_cache_map
1143 [C(RESULT_ACCESS)] = { 0x34, CNTR_ALL }, /* PAPI_L2_DCA */ 1130 [C(RESULT_ACCESS)] = { 0x34, CNTR_ALL }, /* PAPI_L2_DCA */
1144 [C(RESULT_MISS)] = { 0x36, CNTR_ALL }, /* PAPI_L2_DCM */ 1131 [C(RESULT_MISS)] = { 0x36, CNTR_ALL }, /* PAPI_L2_DCM */
1145 }, 1132 },
1146 [C(OP_PREFETCH)] = {
1147 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1148 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1149 },
1150}, 1133},
1151[C(DTLB)] = { 1134[C(DTLB)] = {
1152 /* 1135 /*
@@ -1154,45 +1137,24 @@ static const struct mips_perf_event xlp_cache_map
1154 * read and write. 1137 * read and write.
1155 */ 1138 */
1156 [C(OP_READ)] = { 1139 [C(OP_READ)] = {
1157 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1158 [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ 1140 [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */
1159 }, 1141 },
1160 [C(OP_WRITE)] = { 1142 [C(OP_WRITE)] = {
1161 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1162 [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ 1143 [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */
1163 }, 1144 },
1164 [C(OP_PREFETCH)] = {
1165 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1166 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1167 },
1168}, 1145},
1169[C(ITLB)] = { 1146[C(ITLB)] = {
1170 [C(OP_READ)] = { 1147 [C(OP_READ)] = {
1171 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1172 [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ 1148 [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */
1173 }, 1149 },
1174 [C(OP_WRITE)] = { 1150 [C(OP_WRITE)] = {
1175 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1176 [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ 1151 [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */
1177 }, 1152 },
1178 [C(OP_PREFETCH)] = {
1179 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1180 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1181 },
1182}, 1153},
1183[C(BPU)] = { 1154[C(BPU)] = {
1184 [C(OP_READ)] = { 1155 [C(OP_READ)] = {
1185 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1186 [C(RESULT_MISS)] = { 0x25, CNTR_ALL }, 1156 [C(RESULT_MISS)] = { 0x25, CNTR_ALL },
1187 }, 1157 },
1188 [C(OP_WRITE)] = {
1189 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1190 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1191 },
1192 [C(OP_PREFETCH)] = {
1193 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1194 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1195 },
1196}, 1158},
1197}; 1159};
1198 1160
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S
index 9c51be5a163a..8d32d5a6b460 100644
--- a/arch/mips/kernel/r2300_switch.S
+++ b/arch/mips/kernel/r2300_switch.S
@@ -15,7 +15,6 @@
15#include <asm/fpregdef.h> 15#include <asm/fpregdef.h>
16#include <asm/mipsregs.h> 16#include <asm/mipsregs.h>
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include <asm/page.h>
19#include <asm/regdef.h> 18#include <asm/regdef.h>
20#include <asm/stackframe.h> 19#include <asm/stackframe.h>
21#include <asm/thread_info.h> 20#include <asm/thread_info.h>
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index 42d2a3938420..8decdfacb448 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -15,7 +15,6 @@
15#include <asm/fpregdef.h> 15#include <asm/fpregdef.h>
16#include <asm/mipsregs.h> 16#include <asm/mipsregs.h>
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include <asm/page.h>
19#include <asm/pgtable-bits.h> 18#include <asm/pgtable-bits.h>
20#include <asm/regdef.h> 19#include <asm/regdef.h>
21#include <asm/stackframe.h> 20#include <asm/stackframe.h>
diff --git a/arch/mips/kernel/relocate_kernel.S b/arch/mips/kernel/relocate_kernel.S
index e4142c5f7c2b..804ebb2c34a6 100644
--- a/arch/mips/kernel/relocate_kernel.S
+++ b/arch/mips/kernel/relocate_kernel.S
@@ -9,7 +9,6 @@
9#include <asm/asm.h> 9#include <asm/asm.h>
10#include <asm/asmmacro.h> 10#include <asm/asmmacro.h>
11#include <asm/regdef.h> 11#include <asm/regdef.h>
12#include <asm/page.h>
13#include <asm/mipsregs.h> 12#include <asm/mipsregs.h>
14#include <asm/stackframe.h> 13#include <asm/stackframe.h>
15#include <asm/addrspace.h> 14#include <asm/addrspace.h>
@@ -50,7 +49,7 @@ process_entry:
50 and s3, s2, 0x8 49 and s3, s2, 0x8
51 beq s3, zero, process_entry 50 beq s3, zero, process_entry
52 and s2, s2, ~0x8 51 and s2, s2, ~0x8
53 li s6, (1 << PAGE_SHIFT) / SZREG 52 li s6, (1 << _PAGE_SHIFT) / SZREG
54 53
55copy_word: 54copy_word:
56 /* copy page word by word */ 55 /* copy page word by word */
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 374f66e05f3d..d20a4bc9ed05 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -583,6 +583,7 @@ einval: li v0, -ENOSYS
583 sys sys_process_vm_readv 6 /* 4345 */ 583 sys sys_process_vm_readv 6 /* 4345 */
584 sys sys_process_vm_writev 6 584 sys sys_process_vm_writev 6
585 sys sys_kcmp 5 585 sys sys_kcmp 5
586 sys sys_finit_module 3
586 .endm 587 .endm
587 588
588 /* We pre-compute the number of _instruction_ bytes needed to 589 /* We pre-compute the number of _instruction_ bytes needed to
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 169de6a6d916..b64f642da073 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -422,4 +422,5 @@ sys_call_table:
422 PTR sys_process_vm_readv 422 PTR sys_process_vm_readv
423 PTR sys_process_vm_writev /* 5305 */ 423 PTR sys_process_vm_writev /* 5305 */
424 PTR sys_kcmp 424 PTR sys_kcmp
425 PTR sys_finit_module
425 .size sys_call_table,.-sys_call_table 426 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index ad3de9668da9..c29ac197f446 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -416,4 +416,5 @@ EXPORT(sysn32_call_table)
416 PTR compat_sys_process_vm_readv 416 PTR compat_sys_process_vm_readv
417 PTR compat_sys_process_vm_writev /* 6310 */ 417 PTR compat_sys_process_vm_writev /* 6310 */
418 PTR sys_kcmp 418 PTR sys_kcmp
419 PTR sys_finit_module
419 .size sysn32_call_table,.-sysn32_call_table 420 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 9601be6afa3d..cf3e75e46650 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -540,4 +540,5 @@ sys_call_table:
540 PTR compat_sys_process_vm_readv /* 4345 */ 540 PTR compat_sys_process_vm_readv /* 4345 */
541 PTR compat_sys_process_vm_writev 541 PTR compat_sys_process_vm_writev
542 PTR sys_kcmp 542 PTR sys_kcmp
543 PTR sys_finit_module
543 .size sys_call_table,.-sys_call_table 544 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 2e6374a589ec..66bf4e22d9b9 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -188,7 +188,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
188} 188}
189 189
190/* preload SMP state for boot cpu */ 190/* preload SMP state for boot cpu */
191void __devinit smp_prepare_boot_cpu(void) 191void smp_prepare_boot_cpu(void)
192{ 192{
193 set_cpu_possible(0, true); 193 set_cpu_possible(0, true);
194 set_cpu_online(0, true); 194 set_cpu_online(0, true);
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 007ccbe1e264..0a4336b803e9 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -1,7 +1,8 @@
1#include <asm/asm-offsets.h> 1#include <asm/asm-offsets.h>
2#include <asm/page.h>
3#include <asm/thread_info.h> 2#include <asm/thread_info.h>
4 3
4#define PAGE_SIZE _PAGE_SIZE
5
5/* 6/*
6 * Put .bss..swapper_pg_dir as the first thing in .bss. This will 7 * Put .bss..swapper_pg_dir as the first thing in .bss. This will
7 * ensure that it has .bss alignment (64K). 8 * ensure that it has .bss alignment (64K).
diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c
index 6453962ac898..e44a1866653f 100644
--- a/arch/mips/lantiq/xway/dma.c
+++ b/arch/mips/lantiq/xway/dma.c
@@ -210,7 +210,7 @@ ltq_dma_init_port(int p)
210} 210}
211EXPORT_SYMBOL_GPL(ltq_dma_init_port); 211EXPORT_SYMBOL_GPL(ltq_dma_init_port);
212 212
213static int __devinit 213static int
214ltq_dma_init(struct platform_device *pdev) 214ltq_dma_init(struct platform_device *pdev)
215{ 215{
216 struct clk *clk; 216 struct clk *clk;
diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c
index cbb56fc022bc..e30b1ed1b936 100644
--- a/arch/mips/lantiq/xway/gptu.c
+++ b/arch/mips/lantiq/xway/gptu.c
@@ -133,7 +133,7 @@ static inline void clkdev_add_gptu(struct device *dev, const char *con,
133 clkdev_add(&clk->cl); 133 clkdev_add(&clk->cl);
134} 134}
135 135
136static int __devinit gptu_probe(struct platform_device *pdev) 136static int gptu_probe(struct platform_device *pdev)
137{ 137{
138 struct clk *clk; 138 struct clk *clk;
139 struct resource *res; 139 struct resource *res;
diff --git a/arch/mips/lantiq/xway/xrx200_phy_fw.c b/arch/mips/lantiq/xway/xrx200_phy_fw.c
index fe808bf5366d..d4d9d31f152e 100644
--- a/arch/mips/lantiq/xway/xrx200_phy_fw.c
+++ b/arch/mips/lantiq/xway/xrx200_phy_fw.c
@@ -54,7 +54,7 @@ static dma_addr_t xway_gphy_load(struct platform_device *pdev)
54 return dev_addr; 54 return dev_addr;
55} 55}
56 56
57static int __devinit xway_phy_fw_probe(struct platform_device *pdev) 57static int xway_phy_fw_probe(struct platform_device *pdev)
58{ 58{
59 dma_addr_t fw_addr; 59 dma_addr_t fw_addr;
60 struct property *pp; 60 struct property *pp;
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c
index cacfd31e8ec9..7657fd21cd3f 100644
--- a/arch/mips/mm/ioremap.c
+++ b/arch/mips/mm/ioremap.c
@@ -190,3 +190,9 @@ void __iounmap(const volatile void __iomem *addr)
190 190
191EXPORT_SYMBOL(__ioremap); 191EXPORT_SYMBOL(__ioremap);
192EXPORT_SYMBOL(__iounmap); 192EXPORT_SYMBOL(__iounmap);
193
194int __virt_addr_valid(const volatile void *kaddr)
195{
196 return pfn_valid(PFN_DOWN(virt_to_phys(kaddr)));
197}
198EXPORT_SYMBOL_GPL(__virt_addr_valid);
diff --git a/arch/mips/mm/tlbex-fault.S b/arch/mips/mm/tlbex-fault.S
index e99eaa1fbedc..318855eb5f80 100644
--- a/arch/mips/mm/tlbex-fault.S
+++ b/arch/mips/mm/tlbex-fault.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 1999 Silicon Graphics, Inc. 7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 */ 8 */
9#include <asm/mipsregs.h> 9#include <asm/mipsregs.h>
10#include <asm/page.h>
11#include <asm/regdef.h> 10#include <asm/regdef.h>
12#include <asm/stackframe.h> 11#include <asm/stackframe.h>
13 12
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 05613355627b..1c8ac49ec72c 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -976,13 +976,6 @@ build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr)
976#endif 976#endif
977 uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */ 977 uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */
978 uasm_i_lw(p, ptr, uasm_rel_lo(pgdc), ptr); 978 uasm_i_lw(p, ptr, uasm_rel_lo(pgdc), ptr);
979
980 if (cpu_has_mips_r2) {
981 uasm_i_ext(p, tmp, tmp, PGDIR_SHIFT, (32 - PGDIR_SHIFT));
982 uasm_i_ins(p, ptr, tmp, PGD_T_LOG2, (32 - PGDIR_SHIFT));
983 return;
984 }
985
986 uasm_i_srl(p, tmp, tmp, PGDIR_SHIFT); /* get pgd only bits */ 979 uasm_i_srl(p, tmp, tmp, PGDIR_SHIFT); /* get pgd only bits */
987 uasm_i_sll(p, tmp, tmp, PGD_T_LOG2); 980 uasm_i_sll(p, tmp, tmp, PGD_T_LOG2);
988 uasm_i_addu(p, ptr, ptr, tmp); /* add in pgd offset */ 981 uasm_i_addu(p, ptr, ptr, tmp); /* add in pgd offset */
@@ -1018,15 +1011,6 @@ static void __cpuinit build_adjust_context(u32 **p, unsigned int ctx)
1018 1011
1019static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr) 1012static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr)
1020{ 1013{
1021 if (cpu_has_mips_r2) {
1022 /* PTE ptr offset is obtained from BadVAddr */
1023 UASM_i_MFC0(p, tmp, C0_BADVADDR);
1024 UASM_i_LW(p, ptr, 0, ptr);
1025 uasm_i_ext(p, tmp, tmp, PAGE_SHIFT+1, PGDIR_SHIFT-PAGE_SHIFT-1);
1026 uasm_i_ins(p, ptr, tmp, PTE_T_LOG2+1, PGDIR_SHIFT-PAGE_SHIFT-1);
1027 return;
1028 }
1029
1030 /* 1014 /*
1031 * Bug workaround for the Nevada. It seems as if under certain 1015 * Bug workaround for the Nevada. It seems as if under certain
1032 * circumstances the move from cp0_context might produce a 1016 * circumstances the move from cp0_context might produce a
diff --git a/arch/mips/mti-sead3/sead3-i2c-drv.c b/arch/mips/mti-sead3/sead3-i2c-drv.c
index 0375ee66bca3..7aa2225e75b9 100644
--- a/arch/mips/mti-sead3/sead3-i2c-drv.c
+++ b/arch/mips/mti-sead3/sead3-i2c-drv.c
@@ -297,7 +297,7 @@ static void sead3_i2c_platform_setup(struct pic32_i2c_platform_data *priv)
297 priv->base + PIC32_I2CxSTATCLR); 297 priv->base + PIC32_I2CxSTATCLR);
298} 298}
299 299
300static int __devinit sead3_i2c_platform_probe(struct platform_device *pdev) 300static int sead3_i2c_platform_probe(struct platform_device *pdev)
301{ 301{
302 struct pic32_i2c_platform_data *priv; 302 struct pic32_i2c_platform_data *priv;
303 struct resource *r; 303 struct resource *r;
@@ -345,7 +345,7 @@ out:
345 return ret; 345 return ret;
346} 346}
347 347
348static int __devexit sead3_i2c_platform_remove(struct platform_device *pdev) 348static int sead3_i2c_platform_remove(struct platform_device *pdev)
349{ 349{
350 struct pic32_i2c_platform_data *priv = platform_get_drvdata(pdev); 350 struct pic32_i2c_platform_data *priv = platform_get_drvdata(pdev);
351 351
@@ -383,7 +383,7 @@ static struct platform_driver sead3_i2c_platform_driver = {
383 .owner = THIS_MODULE, 383 .owner = THIS_MODULE,
384 }, 384 },
385 .probe = sead3_i2c_platform_probe, 385 .probe = sead3_i2c_platform_probe,
386 .remove = __devexit_p(sead3_i2c_platform_remove), 386 .remove = sead3_i2c_platform_remove,
387 .suspend = sead3_i2c_platform_suspend, 387 .suspend = sead3_i2c_platform_suspend,
388 .resume = sead3_i2c_platform_resume, 388 .resume = sead3_i2c_platform_resume,
389}; 389};
diff --git a/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c b/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c
index 46509b0a620d..514675ed0cde 100644
--- a/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c
+++ b/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c
@@ -304,8 +304,7 @@ static void i2c_platform_disable(struct i2c_platform_data *priv)
304 pr_debug("i2c_platform_disable\n"); 304 pr_debug("i2c_platform_disable\n");
305} 305}
306 306
307static int __devinit 307static int i2c_platform_probe(struct platform_device *pdev)
308i2c_platform_probe(struct platform_device *pdev)
309{ 308{
310 struct i2c_platform_data *priv; 309 struct i2c_platform_data *priv;
311 struct resource *r; 310 struct resource *r;
@@ -362,8 +361,7 @@ out:
362 return ret; 361 return ret;
363} 362}
364 363
365static int __devexit 364static int i2c_platform_remove(struct platform_device *pdev)
366i2c_platform_remove(struct platform_device *pdev)
367{ 365{
368 struct i2c_platform_data *priv = platform_get_drvdata(pdev); 366 struct i2c_platform_data *priv = platform_get_drvdata(pdev);
369 367
@@ -408,7 +406,7 @@ static struct platform_driver i2c_platform_driver = {
408 .owner = THIS_MODULE, 406 .owner = THIS_MODULE,
409 }, 407 },
410 .probe = i2c_platform_probe, 408 .probe = i2c_platform_probe,
411 .remove = __devexit_p(i2c_platform_remove), 409 .remove = i2c_platform_remove,
412 .suspend = i2c_platform_suspend, 410 .suspend = i2c_platform_suspend,
413 .resume = i2c_platform_resume, 411 .resume = i2c_platform_resume,
414}; 412};
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c
index 3e7ce65d776c..9553b14002dd 100644
--- a/arch/mips/pci/fixup-cobalt.c
+++ b/arch/mips/pci/fixup-cobalt.c
@@ -37,7 +37,7 @@
37#define VIA_COBALT_BRD_ID_REG 0x94 37#define VIA_COBALT_BRD_ID_REG 0x94
38#define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char)(reg) >> 4) 38#define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char)(reg) >> 4)
39 39
40static void __devinit qube_raq_galileo_early_fixup(struct pci_dev *dev) 40static void qube_raq_galileo_early_fixup(struct pci_dev *dev)
41{ 41{
42 if (dev->devfn == PCI_DEVFN(0, 0) && 42 if (dev->devfn == PCI_DEVFN(0, 0) &&
43 (dev->class >> 8) == PCI_CLASS_MEMORY_OTHER) { 43 (dev->class >> 8) == PCI_CLASS_MEMORY_OTHER) {
@@ -51,7 +51,7 @@ static void __devinit qube_raq_galileo_early_fixup(struct pci_dev *dev)
51DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_GT64111, 51DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_GT64111,
52 qube_raq_galileo_early_fixup); 52 qube_raq_galileo_early_fixup);
53 53
54static void __devinit qube_raq_via_bmIDE_fixup(struct pci_dev *dev) 54static void qube_raq_via_bmIDE_fixup(struct pci_dev *dev)
55{ 55{
56 unsigned short cfgword; 56 unsigned short cfgword;
57 unsigned char lt; 57 unsigned char lt;
@@ -74,7 +74,7 @@ static void __devinit qube_raq_via_bmIDE_fixup(struct pci_dev *dev)
74DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, 74DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1,
75 qube_raq_via_bmIDE_fixup); 75 qube_raq_via_bmIDE_fixup);
76 76
77static void __devinit qube_raq_galileo_fixup(struct pci_dev *dev) 77static void qube_raq_galileo_fixup(struct pci_dev *dev)
78{ 78{
79 if (dev->devfn != PCI_DEVFN(0, 0)) 79 if (dev->devfn != PCI_DEVFN(0, 0))
80 return; 80 return;
@@ -129,7 +129,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_GT64111,
129 129
130int cobalt_board_id; 130int cobalt_board_id;
131 131
132static void __devinit qube_raq_via_board_id_fixup(struct pci_dev *dev) 132static void qube_raq_via_board_id_fixup(struct pci_dev *dev)
133{ 133{
134 u8 id; 134 u8 id;
135 int retval; 135 int retval;
diff --git a/arch/mips/pci/fixup-emma2rh.c b/arch/mips/pci/fixup-emma2rh.c
index 0d9ccf4dfc5a..beaec32b02e5 100644
--- a/arch/mips/pci/fixup-emma2rh.c
+++ b/arch/mips/pci/fixup-emma2rh.c
@@ -52,7 +52,7 @@ static unsigned char irq_map[][5] __initdata = {
52 MARKEINS_PCI_IRQ_INTA, MARKEINS_PCI_IRQ_INTB,}, 52 MARKEINS_PCI_IRQ_INTA, MARKEINS_PCI_IRQ_INTB,},
53}; 53};
54 54
55static void __devinit nec_usb_controller_fixup(struct pci_dev *dev) 55static void nec_usb_controller_fixup(struct pci_dev *dev)
56{ 56{
57 if (PCI_SLOT(dev->devfn) == EMMA2RH_USB_SLOT) 57 if (PCI_SLOT(dev->devfn) == EMMA2RH_USB_SLOT)
58 /* on board USB controller configuration */ 58 /* on board USB controller configuration */
@@ -67,7 +67,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
67 * if it is the host bridge by marking it as such. These resources are of 67 * if it is the host bridge by marking it as such. These resources are of
68 * no consequence to the PCI layer (they are handled elsewhere). 68 * no consequence to the PCI layer (they are handled elsewhere).
69 */ 69 */
70static void __devinit emma2rh_pci_host_fixup(struct pci_dev *dev) 70static void emma2rh_pci_host_fixup(struct pci_dev *dev)
71{ 71{
72 int i; 72 int i;
73 73
diff --git a/arch/mips/pci/fixup-fuloong2e.c b/arch/mips/pci/fixup-fuloong2e.c
index 0857ab8c3919..63ab4a042cd6 100644
--- a/arch/mips/pci/fixup-fuloong2e.c
+++ b/arch/mips/pci/fixup-fuloong2e.c
@@ -48,7 +48,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
48 return 0; 48 return 0;
49} 49}
50 50
51static void __devinit loongson2e_nec_fixup(struct pci_dev *pdev) 51static void loongson2e_nec_fixup(struct pci_dev *pdev)
52{ 52{
53 unsigned int val; 53 unsigned int val;
54 54
@@ -60,7 +60,7 @@ static void __devinit loongson2e_nec_fixup(struct pci_dev *pdev)
60 pci_write_config_dword(pdev, 0xe4, 1 << 5); 60 pci_write_config_dword(pdev, 0xe4, 1 << 5);
61} 61}
62 62
63static void __devinit loongson2e_686b_func0_fixup(struct pci_dev *pdev) 63static void loongson2e_686b_func0_fixup(struct pci_dev *pdev)
64{ 64{
65 unsigned char c; 65 unsigned char c;
66 66
@@ -135,7 +135,7 @@ static void __devinit loongson2e_686b_func0_fixup(struct pci_dev *pdev)
135 printk(KERN_INFO"via686b fix: ISA bridge done\n"); 135 printk(KERN_INFO"via686b fix: ISA bridge done\n");
136} 136}
137 137
138static void __devinit loongson2e_686b_func1_fixup(struct pci_dev *pdev) 138static void loongson2e_686b_func1_fixup(struct pci_dev *pdev)
139{ 139{
140 printk(KERN_INFO"via686b fix: IDE\n"); 140 printk(KERN_INFO"via686b fix: IDE\n");
141 141
@@ -168,19 +168,19 @@ static void __devinit loongson2e_686b_func1_fixup(struct pci_dev *pdev)
168 printk(KERN_INFO"via686b fix: IDE done\n"); 168 printk(KERN_INFO"via686b fix: IDE done\n");
169} 169}
170 170
171static void __devinit loongson2e_686b_func2_fixup(struct pci_dev *pdev) 171static void loongson2e_686b_func2_fixup(struct pci_dev *pdev)
172{ 172{
173 /* irq routing */ 173 /* irq routing */
174 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10); 174 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10);
175} 175}
176 176
177static void __devinit loongson2e_686b_func3_fixup(struct pci_dev *pdev) 177static void loongson2e_686b_func3_fixup(struct pci_dev *pdev)
178{ 178{
179 /* irq routing */ 179 /* irq routing */
180 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11); 180 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11);
181} 181}
182 182
183static void __devinit loongson2e_686b_func5_fixup(struct pci_dev *pdev) 183static void loongson2e_686b_func5_fixup(struct pci_dev *pdev)
184{ 184{
185 unsigned int val; 185 unsigned int val;
186 unsigned char c; 186 unsigned char c;
diff --git a/arch/mips/pci/fixup-lemote2f.c b/arch/mips/pci/fixup-lemote2f.c
index a7b917dcf604..519daaebb5da 100644
--- a/arch/mips/pci/fixup-lemote2f.c
+++ b/arch/mips/pci/fixup-lemote2f.c
@@ -96,21 +96,21 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
96} 96}
97 97
98/* CS5536 SPEC. fixup */ 98/* CS5536 SPEC. fixup */
99static void __devinit loongson_cs5536_isa_fixup(struct pci_dev *pdev) 99static void loongson_cs5536_isa_fixup(struct pci_dev *pdev)
100{ 100{
101 /* the uart1 and uart2 interrupt in PIC is enabled as default */ 101 /* the uart1 and uart2 interrupt in PIC is enabled as default */
102 pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1); 102 pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1);
103 pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1); 103 pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1);
104} 104}
105 105
106static void __devinit loongson_cs5536_ide_fixup(struct pci_dev *pdev) 106static void loongson_cs5536_ide_fixup(struct pci_dev *pdev)
107{ 107{
108 /* setting the mutex pin as IDE function */ 108 /* setting the mutex pin as IDE function */
109 pci_write_config_dword(pdev, PCI_IDE_CFG_REG, 109 pci_write_config_dword(pdev, PCI_IDE_CFG_REG,
110 CS5536_IDE_FLASH_SIGNATURE); 110 CS5536_IDE_FLASH_SIGNATURE);
111} 111}
112 112
113static void __devinit loongson_cs5536_acc_fixup(struct pci_dev *pdev) 113static void loongson_cs5536_acc_fixup(struct pci_dev *pdev)
114{ 114{
115 /* enable the AUDIO interrupt in PIC */ 115 /* enable the AUDIO interrupt in PIC */
116 pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1); 116 pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1);
@@ -118,14 +118,14 @@ static void __devinit loongson_cs5536_acc_fixup(struct pci_dev *pdev)
118 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0); 118 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0);
119} 119}
120 120
121static void __devinit loongson_cs5536_ohci_fixup(struct pci_dev *pdev) 121static void loongson_cs5536_ohci_fixup(struct pci_dev *pdev)
122{ 122{
123 /* enable the OHCI interrupt in PIC */ 123 /* enable the OHCI interrupt in PIC */
124 /* THE OHCI, EHCI, UDC, OTG are shared with interrupt in PIC */ 124 /* THE OHCI, EHCI, UDC, OTG are shared with interrupt in PIC */
125 pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1); 125 pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1);
126} 126}
127 127
128static void __devinit loongson_cs5536_ehci_fixup(struct pci_dev *pdev) 128static void loongson_cs5536_ehci_fixup(struct pci_dev *pdev)
129{ 129{
130 u32 hi, lo; 130 u32 hi, lo;
131 131
@@ -137,7 +137,7 @@ static void __devinit loongson_cs5536_ehci_fixup(struct pci_dev *pdev)
137 pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000); 137 pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000);
138} 138}
139 139
140static void __devinit loongson_nec_fixup(struct pci_dev *pdev) 140static void loongson_nec_fixup(struct pci_dev *pdev)
141{ 141{
142 unsigned int val; 142 unsigned int val;
143 143
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c
index 9a1a2244522a..75d03f6be3bd 100644
--- a/arch/mips/pci/fixup-malta.c
+++ b/arch/mips/pci/fixup-malta.c
@@ -8,7 +8,7 @@
8#define PCID 4 8#define PCID 4
9 9
10/* This table is filled in by interrogating the PIIX4 chip */ 10/* This table is filled in by interrogating the PIIX4 chip */
11static char pci_irq[5] __devinitdata = { 11static char pci_irq[5] = {
12}; 12};
13 13
14static char irq_tab[][5] __initdata = { 14static char irq_tab[][5] __initdata = {
@@ -50,10 +50,10 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
50 return 0; 50 return 0;
51} 51}
52 52
53static void __devinit malta_piix_func0_fixup(struct pci_dev *pdev) 53static void malta_piix_func0_fixup(struct pci_dev *pdev)
54{ 54{
55 unsigned char reg_val; 55 unsigned char reg_val;
56 static int piixirqmap[16] __devinitdata = { /* PIIX PIRQC[A:D] irq mappings */ 56 static int piixirqmap[16] = { /* PIIX PIRQC[A:D] irq mappings */
57 0, 0, 0, 3, 57 0, 0, 0, 3,
58 4, 5, 6, 7, 58 4, 5, 6, 7,
59 0, 9, 10, 11, 59 0, 9, 10, 11,
@@ -84,7 +84,7 @@ static void __devinit malta_piix_func0_fixup(struct pci_dev *pdev)
84DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, 84DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0,
85 malta_piix_func0_fixup); 85 malta_piix_func0_fixup);
86 86
87static void __devinit malta_piix_func1_fixup(struct pci_dev *pdev) 87static void malta_piix_func1_fixup(struct pci_dev *pdev)
88{ 88{
89 unsigned char reg_val; 89 unsigned char reg_val;
90 90
@@ -104,7 +104,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB,
104 malta_piix_func1_fixup); 104 malta_piix_func1_fixup);
105 105
106/* Enable PCI 2.1 compatibility in PIIX4 */ 106/* Enable PCI 2.1 compatibility in PIIX4 */
107static void __devinit quirk_dlcsetup(struct pci_dev *dev) 107static void quirk_dlcsetup(struct pci_dev *dev)
108{ 108{
109 u8 odlc, ndlc; 109 u8 odlc, ndlc;
110 110
diff --git a/arch/mips/pci/fixup-rc32434.c b/arch/mips/pci/fixup-rc32434.c
index 76bb1be99d43..d0f6ecbf35f7 100644
--- a/arch/mips/pci/fixup-rc32434.c
+++ b/arch/mips/pci/fixup-rc32434.c
@@ -32,12 +32,12 @@
32#include <asm/mach-rc32434/rc32434.h> 32#include <asm/mach-rc32434/rc32434.h>
33#include <asm/mach-rc32434/irq.h> 33#include <asm/mach-rc32434/irq.h>
34 34
35static int __devinitdata irq_map[2][12] = { 35static int irq_map[2][12] = {
36 {0, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 1}, 36 {0, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 1},
37 {0, 0, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3} 37 {0, 0, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3}
38}; 38};
39 39
40int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 40int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
41{ 41{
42 int irq = 0; 42 int irq = 0;
43 43
@@ -47,7 +47,7 @@ int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
47 return irq + GROUP4_IRQ_BASE + 4; 47 return irq + GROUP4_IRQ_BASE + 4;
48} 48}
49 49
50static void __devinit rc32434_pci_early_fixup(struct pci_dev *dev) 50static void rc32434_pci_early_fixup(struct pci_dev *dev)
51{ 51{
52 if (PCI_SLOT(dev->devfn) == 6 && dev->bus->number == 0) { 52 if (PCI_SLOT(dev->devfn) == 6 && dev->bus->number == 0) {
53 /* disable prefetched memory range */ 53 /* disable prefetched memory range */
diff --git a/arch/mips/pci/fixup-sb1250.c b/arch/mips/pci/fixup-sb1250.c
index d02900a72916..1441becdcb6c 100644
--- a/arch/mips/pci/fixup-sb1250.c
+++ b/arch/mips/pci/fixup-sb1250.c
@@ -15,7 +15,7 @@
15 * Set the BCM1250, etc. PCI host bridge's TRDY timeout 15 * Set the BCM1250, etc. PCI host bridge's TRDY timeout
16 * to the finite max. 16 * to the finite max.
17 */ 17 */
18static void __devinit quirk_sb1250_pci(struct pci_dev *dev) 18static void quirk_sb1250_pci(struct pci_dev *dev)
19{ 19{
20 pci_write_config_byte(dev, 0x40, 0xff); 20 pci_write_config_byte(dev, 0x40, 0xff);
21} 21}
@@ -25,7 +25,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SIBYTE, PCI_DEVICE_ID_BCM1250_PCI,
25/* 25/*
26 * The BCM1250, etc. PCI/HT bridge reports as a host bridge. 26 * The BCM1250, etc. PCI/HT bridge reports as a host bridge.
27 */ 27 */
28static void __devinit quirk_sb1250_ht(struct pci_dev *dev) 28static void quirk_sb1250_ht(struct pci_dev *dev)
29{ 29{
30 dev->class = PCI_CLASS_BRIDGE_PCI << 8; 30 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
31} 31}
@@ -35,7 +35,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SIBYTE, PCI_DEVICE_ID_BCM1250_HT,
35/* 35/*
36 * Set the SP1011 HT/PCI bridge's TRDY timeout to the finite max. 36 * Set the SP1011 HT/PCI bridge's TRDY timeout to the finite max.
37 */ 37 */
38static void __devinit quirk_sp1011(struct pci_dev *dev) 38static void quirk_sp1011(struct pci_dev *dev)
39{ 39{
40 pci_write_config_byte(dev, 0x64, 0xff); 40 pci_write_config_byte(dev, 0x64, 0xff);
41} 41}
diff --git a/arch/mips/pci/ops-bcm63xx.c b/arch/mips/pci/ops-bcm63xx.c
index 65c7bd100486..4a156629e958 100644
--- a/arch/mips/pci/ops-bcm63xx.c
+++ b/arch/mips/pci/ops-bcm63xx.c
@@ -411,7 +411,7 @@ struct pci_ops bcm63xx_cb_ops = {
411 * only one IO window, so it cannot be shared by PCI and cardbus, use 411 * only one IO window, so it cannot be shared by PCI and cardbus, use
412 * fixup to choose and detect unhandled configuration 412 * fixup to choose and detect unhandled configuration
413 */ 413 */
414static void __devinit bcm63xx_fixup(struct pci_dev *dev) 414static void bcm63xx_fixup(struct pci_dev *dev)
415{ 415{
416 static int io_window = -1; 416 static int io_window = -1;
417 int i, found, new_io_window; 417 int i, found, new_io_window;
diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c
index bc13e29d2bb3..0d69d6f4ea44 100644
--- a/arch/mips/pci/ops-tx4927.c
+++ b/arch/mips/pci/ops-tx4927.c
@@ -191,13 +191,13 @@ static struct {
191 u8 trdyto; 191 u8 trdyto;
192 u8 retryto; 192 u8 retryto;
193 u16 gbwc; 193 u16 gbwc;
194} tx4927_pci_opts __devinitdata = { 194} tx4927_pci_opts = {
195 .trdyto = 0, 195 .trdyto = 0,
196 .retryto = 0, 196 .retryto = 0,
197 .gbwc = 0xfe0, /* 4064 GBUSCLK for CCFG.GTOT=0b11 */ 197 .gbwc = 0xfe0, /* 4064 GBUSCLK for CCFG.GTOT=0b11 */
198}; 198};
199 199
200char *__devinit tx4927_pcibios_setup(char *str) 200char *tx4927_pcibios_setup(char *str)
201{ 201{
202 unsigned long val; 202 unsigned long val;
203 203
@@ -495,7 +495,7 @@ irqreturn_t tx4927_pcierr_interrupt(int irq, void *dev_id)
495} 495}
496 496
497#ifdef CONFIG_TOSHIBA_FPCIB0 497#ifdef CONFIG_TOSHIBA_FPCIB0
498static void __devinit tx4927_quirk_slc90e66_bridge(struct pci_dev *dev) 498static void tx4927_quirk_slc90e66_bridge(struct pci_dev *dev)
499{ 499{
500 struct tx4927_pcic_reg __iomem *pcicptr = pci_bus_to_pcicptr(dev->bus); 500 struct tx4927_pcic_reg __iomem *pcicptr = pci_bus_to_pcicptr(dev->bus);
501 501
diff --git a/arch/mips/pci/pci-alchemy.c b/arch/mips/pci/pci-alchemy.c
index ec125bed721c..c4ea6cc55f94 100644
--- a/arch/mips/pci/pci-alchemy.c
+++ b/arch/mips/pci/pci-alchemy.c
@@ -356,7 +356,7 @@ static struct syscore_ops alchemy_pci_pmops = {
356 .resume = alchemy_pci_resume, 356 .resume = alchemy_pci_resume,
357}; 357};
358 358
359static int __devinit alchemy_pci_probe(struct platform_device *pdev) 359static int alchemy_pci_probe(struct platform_device *pdev)
360{ 360{
361 struct alchemy_pci_platdata *pd = pdev->dev.platform_data; 361 struct alchemy_pci_platdata *pd = pdev->dev.platform_data;
362 struct alchemy_pci_context *ctx; 362 struct alchemy_pci_context *ctx;
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
index fdc24440294c..7f4f49b09b5b 100644
--- a/arch/mips/pci/pci-ip27.c
+++ b/arch/mips/pci/pci-ip27.c
@@ -143,7 +143,7 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid)
143 * A given PCI device, in general, should be able to intr any of the cpus 143 * A given PCI device, in general, should be able to intr any of the cpus
144 * on any one of the hubs connected to its xbow. 144 * on any one of the hubs connected to its xbow.
145 */ 145 */
146int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 146int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
147{ 147{
148 return 0; 148 return 0;
149} 149}
@@ -212,7 +212,7 @@ static inline void pci_enable_swapping(struct pci_dev *dev)
212 bridge->b_widget.w_tflush; /* Flush */ 212 bridge->b_widget.w_tflush; /* Flush */
213} 213}
214 214
215static void __devinit pci_fixup_ioc3(struct pci_dev *d) 215static void pci_fixup_ioc3(struct pci_dev *d)
216{ 216{
217 pci_disable_swapping(d); 217 pci_disable_swapping(d);
218} 218}
diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
index 075d87acd12a..95681789b51e 100644
--- a/arch/mips/pci/pci-lantiq.c
+++ b/arch/mips/pci/pci-lantiq.c
@@ -95,7 +95,7 @@ static inline u32 ltq_calc_bar11mask(void)
95 return bar11mask; 95 return bar11mask;
96} 96}
97 97
98static int __devinit ltq_pci_startup(struct platform_device *pdev) 98static int ltq_pci_startup(struct platform_device *pdev)
99{ 99{
100 struct device_node *node = pdev->dev.of_node; 100 struct device_node *node = pdev->dev.of_node;
101 const __be32 *req_mask, *bus_clk; 101 const __be32 *req_mask, *bus_clk;
@@ -201,7 +201,7 @@ static int __devinit ltq_pci_startup(struct platform_device *pdev)
201 return 0; 201 return 0;
202} 202}
203 203
204static int __devinit ltq_pci_probe(struct platform_device *pdev) 204static int ltq_pci_probe(struct platform_device *pdev)
205{ 205{
206 struct resource *res_cfg, *res_bridge; 206 struct resource *res_cfg, *res_bridge;
207 207
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 4040416e0603..a1843448fad3 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -76,7 +76,7 @@ pcibios_align_resource(void *data, const struct resource *res,
76 return start; 76 return start;
77} 77}
78 78
79static void __devinit pcibios_scanbus(struct pci_controller *hose) 79static void pcibios_scanbus(struct pci_controller *hose)
80{ 80{
81 static int next_busno; 81 static int next_busno;
82 static int need_domain_info; 82 static int need_domain_info;
@@ -120,8 +120,7 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose)
120} 120}
121 121
122#ifdef CONFIG_OF 122#ifdef CONFIG_OF
123void __devinit pci_load_of_ranges(struct pci_controller *hose, 123void pci_load_of_ranges(struct pci_controller *hose, struct device_node *node)
124 struct device_node *node)
125{ 124{
126 const __be32 *ranges; 125 const __be32 *ranges;
127 int rlen; 126 int rlen;
@@ -174,7 +173,7 @@ void __devinit pci_load_of_ranges(struct pci_controller *hose,
174 173
175static DEFINE_MUTEX(pci_scan_mutex); 174static DEFINE_MUTEX(pci_scan_mutex);
176 175
177void __devinit register_pci_controller(struct pci_controller *hose) 176void register_pci_controller(struct pci_controller *hose)
178{ 177{
179 if (request_resource(&iomem_resource, hose->mem_resource) < 0) 178 if (request_resource(&iomem_resource, hose->mem_resource) < 0)
180 goto out; 179 goto out;
@@ -303,7 +302,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
303 return pcibios_plat_dev_init(dev); 302 return pcibios_plat_dev_init(dev);
304} 303}
305 304
306void __devinit pcibios_fixup_bus(struct pci_bus *bus) 305void pcibios_fixup_bus(struct pci_bus *bus)
307{ 306{
308 struct pci_dev *dev = bus->self; 307 struct pci_dev *dev = bus->self;
309 308
diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate.S
index f8a751c03282..61e2558a2dcb 100644
--- a/arch/mips/power/hibernate.S
+++ b/arch/mips/power/hibernate.S
@@ -8,7 +8,6 @@
8 * Wu Zhangjin <wuzhangjin@gmail.com> 8 * Wu Zhangjin <wuzhangjin@gmail.com>
9 */ 9 */
10#include <asm/asm-offsets.h> 10#include <asm/asm-offsets.h>
11#include <asm/page.h>
12#include <asm/regdef.h> 11#include <asm/regdef.h>
13#include <asm/asm.h> 12#include <asm/asm.h>
14 13
@@ -35,7 +34,7 @@ LEAF(swsusp_arch_resume)
350: 340:
36 PTR_L t1, PBE_ADDRESS(t0) /* source */ 35 PTR_L t1, PBE_ADDRESS(t0) /* source */
37 PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */ 36 PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */
38 PTR_ADDU t3, t1, PAGE_SIZE 37 PTR_ADDU t3, t1, _PAGE_SIZE
391: 381:
40 REG_L t8, (t1) 39 REG_L t8, (t1)
41 REG_S t8, (t2) 40 REG_S t8, (t2)
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index d6c7bd4b5ab0..2e9c283b8e68 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -236,7 +236,7 @@ void __init plat_mem_setup(void)
236#include <video/vga.h> 236#include <video/vga.h>
237#include <video/cirrus.h> 237#include <video/cirrus.h>
238 238
239static void __devinit quirk_cirrus_ram_size(struct pci_dev *dev) 239static void quirk_cirrus_ram_size(struct pci_dev *dev)
240{ 240{
241 u16 cmd; 241 u16 cmd;
242 242
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c
index b14ee53581a9..ce8f8b9b930c 100644
--- a/arch/mips/txx9/generic/pci.c
+++ b/arch/mips/txx9/generic/pci.c
@@ -256,8 +256,7 @@ static irqreturn_t i8259_interrupt(int irq, void *dev_id)
256 return IRQ_HANDLED; 256 return IRQ_HANDLED;
257} 257}
258 258
259static int __devinit 259static int txx9_i8259_irq_setup(int irq)
260txx9_i8259_irq_setup(int irq)
261{ 260{
262 int err; 261 int err;
263 262
@@ -269,7 +268,7 @@ txx9_i8259_irq_setup(int irq)
269 return err; 268 return err;
270} 269}
271 270
272static void __devinit quirk_slc90e66_bridge(struct pci_dev *dev) 271static void quirk_slc90e66_bridge(struct pci_dev *dev)
273{ 272{
274 int irq; /* PCI/ISA Bridge interrupt */ 273 int irq; /* PCI/ISA Bridge interrupt */
275 u8 reg_64; 274 u8 reg_64;
@@ -304,7 +303,7 @@ static void __devinit quirk_slc90e66_bridge(struct pci_dev *dev)
304 smsc_fdc37m81x_config_end(); 303 smsc_fdc37m81x_config_end();
305} 304}
306 305
307static void __devinit quirk_slc90e66_ide(struct pci_dev *dev) 306static void quirk_slc90e66_ide(struct pci_dev *dev)
308{ 307{
309 unsigned char dat; 308 unsigned char dat;
310 int regs[2] = {0x41, 0x43}; 309 int regs[2] = {0x41, 0x43};
@@ -339,7 +338,7 @@ static void __devinit quirk_slc90e66_ide(struct pci_dev *dev)
339} 338}
340#endif /* CONFIG_TOSHIBA_FPCIB0 */ 339#endif /* CONFIG_TOSHIBA_FPCIB0 */
341 340
342static void __devinit tc35815_fixup(struct pci_dev *dev) 341static void tc35815_fixup(struct pci_dev *dev)
343{ 342{
344 /* This device may have PM registers but not they are not supported. */ 343 /* This device may have PM registers but not they are not supported. */
345 if (dev->pm_cap) { 344 if (dev->pm_cap) {
@@ -348,7 +347,7 @@ static void __devinit tc35815_fixup(struct pci_dev *dev)
348 } 347 }
349} 348}
350 349
351static void __devinit final_fixup(struct pci_dev *dev) 350static void final_fixup(struct pci_dev *dev)
352{ 351{
353 unsigned char bist; 352 unsigned char bist;
354 353
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c
index 95983cd21e77..5d7e152a23b7 100644
--- a/arch/mn10300/kernel/smp.c
+++ b/arch/mn10300/kernel/smp.c
@@ -905,7 +905,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
905 * Set up the cpu_online_mask, cpu_callout_map and cpu_callin_map of the boot 905 * Set up the cpu_online_mask, cpu_callout_map and cpu_callin_map of the boot
906 * processor (CPU 0). 906 * processor (CPU 0).
907 */ 907 */
908void __devinit smp_prepare_boot_cpu(void) 908void smp_prepare_boot_cpu(void)
909{ 909{
910 cpumask_set_cpu(0, &cpu_callout_map); 910 cpumask_set_cpu(0, &cpu_callout_map);
911 cpumask_set_cpu(0, &cpu_callin_map); 911 cpumask_set_cpu(0, &cpu_callin_map);
@@ -930,7 +930,7 @@ void initialize_secondary(void)
930 * __cpu_up - Set smp_commenced_mask for the nominated CPU 930 * __cpu_up - Set smp_commenced_mask for the nominated CPU
931 * @cpu: The target CPU. 931 * @cpu: The target CPU.
932 */ 932 */
933int __devinit __cpu_up(unsigned int cpu, struct task_struct *tidle) 933int __cpu_up(unsigned int cpu, struct task_struct *tidle)
934{ 934{
935 int timeout; 935 int timeout;
936 936
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c
index e2059486d3f8..6911e845b8cd 100644
--- a/arch/mn10300/unit-asb2305/pci.c
+++ b/arch/mn10300/unit-asb2305/pci.c
@@ -282,7 +282,7 @@ static int __init pci_check_direct(void)
282 return -ENODEV; 282 return -ENODEV;
283} 283}
284 284
285static int __devinit is_valid_resource(struct pci_dev *dev, int idx) 285static int is_valid_resource(struct pci_dev *dev, int idx)
286{ 286{
287 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; 287 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
288 struct resource *devr = &dev->resource[idx], *busr; 288 struct resource *devr = &dev->resource[idx], *busr;
@@ -302,7 +302,7 @@ static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
302 return 0; 302 return 0;
303} 303}
304 304
305static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) 305static void pcibios_fixup_device_resources(struct pci_dev *dev)
306{ 306{
307 int limit, i; 307 int limit, i;
308 308
@@ -325,7 +325,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
325 * Called after each bus is probed, but before its children 325 * Called after each bus is probed, but before its children
326 * are examined. 326 * are examined.
327 */ 327 */
328void __devinit pcibios_fixup_bus(struct pci_bus *bus) 328void pcibios_fixup_bus(struct pci_bus *bus)
329{ 329{
330 struct pci_dev *dev; 330 struct pci_dev *dev;
331 331
diff --git a/arch/openrisc/lib/delay.c b/arch/openrisc/lib/delay.c
index c330767c9217..c82b09f4a106 100644
--- a/arch/openrisc/lib/delay.c
+++ b/arch/openrisc/lib/delay.c
@@ -22,7 +22,7 @@
22#include <asm/timex.h> 22#include <asm/timex.h>
23#include <asm/processor.h> 23#include <asm/processor.h>
24 24
25int __devinit read_current_timer(unsigned long *timer_value) 25int read_current_timer(unsigned long *timer_value)
26{ 26{
27 *timer_value = mfspr(SPR_TTCR); 27 *timer_value = mfspr(SPR_TTCR);
28 return 0; 28 return 0;
diff --git a/arch/parisc/include/asm/parport.h b/arch/parisc/include/asm/parport.h
index 00d9cc3e7b97..c391d7cbc223 100644
--- a/arch/parisc/include/asm/parport.h
+++ b/arch/parisc/include/asm/parport.h
@@ -8,7 +8,7 @@
8#define _ASM_PARPORT_H 1 8#define _ASM_PARPORT_H 1
9 9
10 10
11static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 11static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
12{ 12{
13 /* nothing ! */ 13 /* nothing ! */
14 return 0; 14 return 0;
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c
index f48a640b55fb..f7752f6af29e 100644
--- a/arch/parisc/kernel/hardware.c
+++ b/arch/parisc/kernel/hardware.c
@@ -38,7 +38,7 @@
38 * so don't reference this table after starting the init process 38 * so don't reference this table after starting the init process
39 */ 39 */
40 40
41static struct hp_hardware hp_hardware_list[] __devinitdata = { 41static struct hp_hardware hp_hardware_list[] = {
42 {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, 42 {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"},
43 {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, 43 {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"},
44 {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, 44 {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
@@ -1230,7 +1230,7 @@ static struct hp_cpu_type_mask {
1230 unsigned short model; 1230 unsigned short model;
1231 unsigned short mask; 1231 unsigned short mask;
1232 enum cpu_type cpu; 1232 enum cpu_type cpu;
1233} hp_cpu_type_mask_list[] __devinitdata = { 1233} hp_cpu_type_mask_list[] = {
1234 1234
1235 { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ 1235 { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */
1236 { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ 1236 { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */
@@ -1327,8 +1327,7 @@ const char * const cpu_name_version[][2] = {
1327 [mako2] = { "PA8900 (Shortfin)", "2.0" } 1327 [mako2] = { "PA8900 (Shortfin)", "2.0" }
1328}; 1328};
1329 1329
1330const char * __devinit 1330const char *parisc_hardware_description(struct parisc_device_id *id)
1331parisc_hardware_description(struct parisc_device_id *id)
1332{ 1331{
1333 struct hp_hardware *listptr; 1332 struct hp_hardware *listptr;
1334 1333
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index b0ef73882b38..a8fb03e22770 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -183,7 +183,7 @@ static inline void eeh_unlock(void)
183#define EEH_MAX_ALLOWED_FREEZES 5 183#define EEH_MAX_ALLOWED_FREEZES 5
184 184
185typedef void *(*eeh_traverse_func)(void *data, void *flag); 185typedef void *(*eeh_traverse_func)(void *data, void *flag);
186int __devinit eeh_phb_pe_create(struct pci_controller *phb); 186int eeh_phb_pe_create(struct pci_controller *phb);
187int eeh_add_to_parent_pe(struct eeh_dev *edev); 187int eeh_add_to_parent_pe(struct eeh_dev *edev);
188int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe); 188int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe);
189void *eeh_pe_dev_traverse(struct eeh_pe *root, 189void *eeh_pe_dev_traverse(struct eeh_pe *root,
@@ -191,8 +191,8 @@ void *eeh_pe_dev_traverse(struct eeh_pe *root,
191void eeh_pe_restore_bars(struct eeh_pe *pe); 191void eeh_pe_restore_bars(struct eeh_pe *pe);
192struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe); 192struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe);
193 193
194void * __devinit eeh_dev_init(struct device_node *dn, void *data); 194void *eeh_dev_init(struct device_node *dn, void *data);
195void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb); 195void eeh_dev_phb_init_dynamic(struct pci_controller *phb);
196int __init eeh_ops_register(struct eeh_ops *ops); 196int __init eeh_ops_register(struct eeh_ops *ops);
197int __exit eeh_ops_unregister(const char *name); 197int __exit eeh_ops_unregister(const char *name);
198unsigned long eeh_check_failure(const volatile void __iomem *token, 198unsigned long eeh_check_failure(const volatile void __iomem *token,
diff --git a/arch/powerpc/include/asm/io-workarounds.h b/arch/powerpc/include/asm/io-workarounds.h
index fbae49286926..f96dd096ff4e 100644
--- a/arch/powerpc/include/asm/io-workarounds.h
+++ b/arch/powerpc/include/asm/io-workarounds.h
@@ -31,8 +31,8 @@ struct iowa_bus {
31 void *private; 31 void *private;
32}; 32};
33 33
34void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *, 34void iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
35 int (*)(struct iowa_bus *, void *), void *); 35 int (*)(struct iowa_bus *, void *), void *);
36struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR); 36struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR);
37struct iowa_bus *iowa_pio_find_bus(unsigned long); 37struct iowa_bus *iowa_pio_find_bus(unsigned long);
38 38
diff --git a/arch/powerpc/include/asm/parport.h b/arch/powerpc/include/asm/parport.h
index 1ca1102b4a2f..6dc2577932b1 100644
--- a/arch/powerpc/include/asm/parport.h
+++ b/arch/powerpc/include/asm/parport.h
@@ -12,7 +12,7 @@
12 12
13#include <asm/prom.h> 13#include <asm/prom.h>
14 14
15static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 15static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
16{ 16{
17 struct device_node *np; 17 struct device_node *np;
18 const u32 *prop; 18 const u32 *prop;
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index 5a4e437c238d..195ce2ac5691 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -54,8 +54,8 @@ struct smp_ops_t {
54 54
55extern void smp_send_debugger_break(void); 55extern void smp_send_debugger_break(void);
56extern void start_secondary_resume(void); 56extern void start_secondary_resume(void);
57extern void __devinit smp_generic_give_timebase(void); 57extern void smp_generic_give_timebase(void);
58extern void __devinit smp_generic_take_timebase(void); 58extern void smp_generic_take_timebase(void);
59 59
60DECLARE_PER_CPU(unsigned int, cpu_pvr); 60DECLARE_PER_CPU(unsigned int, cpu_pvr);
61 61
diff --git a/arch/powerpc/include/asm/vio.h b/arch/powerpc/include/asm/vio.h
index df81cb72d1e0..68d0cc998b1b 100644
--- a/arch/powerpc/include/asm/vio.h
+++ b/arch/powerpc/include/asm/vio.h
@@ -139,7 +139,7 @@ extern void vio_unregister_driver(struct vio_driver *drv);
139extern int vio_cmo_entitlement_update(size_t); 139extern int vio_cmo_entitlement_update(size_t);
140extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired); 140extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired);
141 141
142extern void __devinit vio_unregister_device(struct vio_dev *dev); 142extern void vio_unregister_device(struct vio_dev *dev);
143 143
144extern int vio_h_cop_sync(struct vio_dev *vdev, struct vio_pfo_op *op); 144extern int vio_h_cop_sync(struct vio_dev *vdev, struct vio_pfo_op *op);
145 145
diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c
index 12d329bcbb98..50e90b7e7139 100644
--- a/arch/powerpc/kernel/io-workarounds.c
+++ b/arch/powerpc/kernel/io-workarounds.c
@@ -118,7 +118,7 @@ static void iowa_##name at \
118#undef DEF_PCI_AC_RET 118#undef DEF_PCI_AC_RET
119#undef DEF_PCI_AC_NORET 119#undef DEF_PCI_AC_NORET
120 120
121static const struct ppc_pci_io __devinitconst iowa_pci_io = { 121static const struct ppc_pci_io iowa_pci_io = {
122 122
123#define DEF_PCI_AC_RET(name, ret, at, al, space, aa) .name = iowa_##name, 123#define DEF_PCI_AC_RET(name, ret, at, al, space, aa) .name = iowa_##name,
124#define DEF_PCI_AC_NORET(name, at, al, space, aa) .name = iowa_##name, 124#define DEF_PCI_AC_NORET(name, at, al, space, aa) .name = iowa_##name,
@@ -146,7 +146,7 @@ static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
146} 146}
147 147
148/* Enable IO workaround */ 148/* Enable IO workaround */
149static void __devinit io_workaround_init(void) 149static void io_workaround_init(void)
150{ 150{
151 static int io_workaround_inited; 151 static int io_workaround_inited;
152 152
@@ -158,9 +158,8 @@ static void __devinit io_workaround_init(void)
158} 158}
159 159
160/* Register new bus to support workaround */ 160/* Register new bus to support workaround */
161void __devinit iowa_register_bus(struct pci_controller *phb, 161void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops,
162 struct ppc_pci_io *ops, 162 int (*initfunc)(struct iowa_bus *, void *), void *data)
163 int (*initfunc)(struct iowa_bus *, void *), void *data)
164{ 163{
165 struct iowa_bus *bus; 164 struct iowa_bus *bus;
166 struct device_node *np = phb->dn; 165 struct device_node *np = phb->dn;
diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
index d45ec58703ce..0f1997097960 100644
--- a/arch/powerpc/kernel/isa-bridge.c
+++ b/arch/powerpc/kernel/isa-bridge.c
@@ -41,8 +41,8 @@ EXPORT_SYMBOL_GPL(isa_bridge_pcidev);
41#define ISA_SPACE_MASK 0x1 41#define ISA_SPACE_MASK 0x1
42#define ISA_SPACE_IO 0x1 42#define ISA_SPACE_IO 0x1
43 43
44static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, 44static void pci_process_ISA_OF_ranges(struct device_node *isa_node,
45 unsigned long phb_io_base_phys) 45 unsigned long phb_io_base_phys)
46{ 46{
47 /* We should get some saner parsing here and remove these structs */ 47 /* We should get some saner parsing here and remove these structs */
48 struct pci_address { 48 struct pci_address {
@@ -170,8 +170,8 @@ void __init isa_bridge_find_early(struct pci_controller *hose)
170 * isa_bridge_find_late - Find and map the ISA IO space upon discovery of 170 * isa_bridge_find_late - Find and map the ISA IO space upon discovery of
171 * a new ISA bridge 171 * a new ISA bridge
172 */ 172 */
173static void __devinit isa_bridge_find_late(struct pci_dev *pdev, 173static void isa_bridge_find_late(struct pci_dev *pdev,
174 struct device_node *devnode) 174 struct device_node *devnode)
175{ 175{
176 struct pci_controller *hose = pci_bus_to_host(pdev->bus); 176 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
177 177
@@ -215,8 +215,8 @@ static void isa_bridge_remove(void)
215/** 215/**
216 * isa_bridge_notify - Get notified of PCI devices addition/removal 216 * isa_bridge_notify - Get notified of PCI devices addition/removal
217 */ 217 */
218static int __devinit isa_bridge_notify(struct notifier_block *nb, 218static int isa_bridge_notify(struct notifier_block *nb, unsigned long action,
219 unsigned long action, void *data) 219 void *data)
220{ 220{
221 struct device *dev = data; 221 struct device *dev = data;
222 struct pci_dev *pdev = to_pci_dev(dev); 222 struct pci_dev *pdev = to_pci_dev(dev);
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 9db8ec07ec94..07c12697d708 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -37,7 +37,7 @@
37 * lacking some bits needed here. 37 * lacking some bits needed here.
38 */ 38 */
39 39
40static int __devinit of_pci_phb_probe(struct platform_device *dev) 40static int of_pci_phb_probe(struct platform_device *dev)
41{ 41{
42 struct pci_controller *phb; 42 struct pci_controller *phb;
43 43
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index abc0d0856994..7c37379ea9b1 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -673,9 +673,8 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar,
673 * - Some 32 bits platforms such as 4xx can have physical space larger than 673 * - Some 32 bits platforms such as 4xx can have physical space larger than
674 * 32 bits so we need to use 64 bits values for the parsing 674 * 32 bits so we need to use 64 bits values for the parsing
675 */ 675 */
676void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, 676void pci_process_bridge_OF_ranges(struct pci_controller *hose,
677 struct device_node *dev, 677 struct device_node *dev, int primary)
678 int primary)
679{ 678{
680 const u32 *ranges; 679 const u32 *ranges;
681 int rlen; 680 int rlen;
@@ -848,7 +847,7 @@ int pci_proc_domain(struct pci_bus *bus)
848/* This header fixup will do the resource fixup for all devices as they are 847/* This header fixup will do the resource fixup for all devices as they are
849 * probed, but not for bridge ranges 848 * probed, but not for bridge ranges
850 */ 849 */
851static void __devinit pcibios_fixup_resources(struct pci_dev *dev) 850static void pcibios_fixup_resources(struct pci_dev *dev)
852{ 851{
853 struct pci_controller *hose = pci_bus_to_host(dev->bus); 852 struct pci_controller *hose = pci_bus_to_host(dev->bus);
854 int i; 853 int i;
@@ -902,8 +901,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
902 * things go more smoothly when it gets it right. It should covers cases such 901 * things go more smoothly when it gets it right. It should covers cases such
903 * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges 902 * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges
904 */ 903 */
905static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus, 904static int pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
906 struct resource *res) 905 struct resource *res)
907{ 906{
908 struct pci_controller *hose = pci_bus_to_host(bus); 907 struct pci_controller *hose = pci_bus_to_host(bus);
909 struct pci_dev *dev = bus->self; 908 struct pci_dev *dev = bus->self;
@@ -967,7 +966,7 @@ static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
967} 966}
968 967
969/* Fixup resources of a PCI<->PCI bridge */ 968/* Fixup resources of a PCI<->PCI bridge */
970static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) 969static void pcibios_fixup_bridge(struct pci_bus *bus)
971{ 970{
972 struct resource *res; 971 struct resource *res;
973 int i; 972 int i;
@@ -1007,7 +1006,7 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
1007 } 1006 }
1008} 1007}
1009 1008
1010void __devinit pcibios_setup_bus_self(struct pci_bus *bus) 1009void pcibios_setup_bus_self(struct pci_bus *bus)
1011{ 1010{
1012 /* Fix up the bus resources for P2P bridges */ 1011 /* Fix up the bus resources for P2P bridges */
1013 if (bus->self != NULL) 1012 if (bus->self != NULL)
@@ -1024,7 +1023,7 @@ void __devinit pcibios_setup_bus_self(struct pci_bus *bus)
1024 ppc_md.pci_dma_bus_setup(bus); 1023 ppc_md.pci_dma_bus_setup(bus);
1025} 1024}
1026 1025
1027void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) 1026void pcibios_setup_bus_devices(struct pci_bus *bus)
1028{ 1027{
1029 struct pci_dev *dev; 1028 struct pci_dev *dev;
1030 1029
@@ -1063,7 +1062,7 @@ void pcibios_set_master(struct pci_dev *dev)
1063 /* No special bus mastering setup handling */ 1062 /* No special bus mastering setup handling */
1064} 1063}
1065 1064
1066void __devinit pcibios_fixup_bus(struct pci_bus *bus) 1065void pcibios_fixup_bus(struct pci_bus *bus)
1067{ 1066{
1068 /* When called from the generic PCI probe, read PCI<->PCI bridge 1067 /* When called from the generic PCI probe, read PCI<->PCI bridge
1069 * bases. This is -not- called when generating the PCI tree from 1068 * bases. This is -not- called when generating the PCI tree from
@@ -1080,7 +1079,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
1080} 1079}
1081EXPORT_SYMBOL(pcibios_fixup_bus); 1080EXPORT_SYMBOL(pcibios_fixup_bus);
1082 1081
1083void __devinit pci_fixup_cardbus(struct pci_bus *bus) 1082void pci_fixup_cardbus(struct pci_bus *bus)
1084{ 1083{
1085 /* Now fixup devices on that bus */ 1084 /* Now fixup devices on that bus */
1086 pcibios_setup_bus_devices(bus); 1085 pcibios_setup_bus_devices(bus);
@@ -1264,7 +1263,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1264 pcibios_allocate_bus_resources(b); 1263 pcibios_allocate_bus_resources(b);
1265} 1264}
1266 1265
1267static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) 1266static inline void alloc_resource(struct pci_dev *dev, int idx)
1268{ 1267{
1269 struct resource *pr, *r = &dev->resource[idx]; 1268 struct resource *pr, *r = &dev->resource[idx];
1270 1269
@@ -1500,7 +1499,8 @@ resource_size_t pcibios_io_space_offset(struct pci_controller *hose)
1500 return (unsigned long) hose->io_base_virt - _IO_BASE; 1499 return (unsigned long) hose->io_base_virt - _IO_BASE;
1501} 1500}
1502 1501
1503static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources) 1502static void pcibios_setup_phb_resources(struct pci_controller *hose,
1503 struct list_head *resources)
1504{ 1504{
1505 struct resource *res; 1505 struct resource *res;
1506 int i; 1506 int i;
@@ -1639,7 +1639,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
1639 * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus 1639 * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus
1640 * @hose: Pointer to the PCI host controller instance structure 1640 * @hose: Pointer to the PCI host controller instance structure
1641 */ 1641 */
1642void __devinit pcibios_scan_phb(struct pci_controller *hose) 1642void pcibios_scan_phb(struct pci_controller *hose)
1643{ 1643{
1644 LIST_HEAD(resources); 1644 LIST_HEAD(resources);
1645 struct pci_bus *bus; 1645 struct pci_bus *bus;
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 64f526a321f5..e37c2152acf4 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -213,7 +213,7 @@ pci_create_OF_bus_map(void)
213 } 213 }
214} 214}
215 215
216void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) 216void pcibios_setup_phb_io_space(struct pci_controller *hose)
217{ 217{
218 unsigned long io_offset; 218 unsigned long io_offset;
219 struct resource *res = &hose->io_resource; 219 struct resource *res = &hose->io_resource;
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 2cbe6768fddd..51a133a78a09 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -122,7 +122,7 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
122} 122}
123EXPORT_SYMBOL_GPL(pcibios_unmap_io_space); 123EXPORT_SYMBOL_GPL(pcibios_unmap_io_space);
124 124
125static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose) 125static int pcibios_map_phb_io_space(struct pci_controller *hose)
126{ 126{
127 struct vm_struct *area; 127 struct vm_struct *area;
128 unsigned long phys_page; 128 unsigned long phys_page;
@@ -173,7 +173,7 @@ static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose)
173 return 0; 173 return 0;
174} 174}
175 175
176int __devinit pcibios_map_io_space(struct pci_bus *bus) 176int pcibios_map_io_space(struct pci_bus *bus)
177{ 177{
178 WARN_ON(bus == NULL); 178 WARN_ON(bus == NULL);
179 179
@@ -193,7 +193,7 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
193} 193}
194EXPORT_SYMBOL_GPL(pcibios_map_io_space); 194EXPORT_SYMBOL_GPL(pcibios_map_io_space);
195 195
196void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) 196void pcibios_setup_phb_io_space(struct pci_controller *hose)
197{ 197{
198 pcibios_map_phb_io_space(hose); 198 pcibios_map_phb_io_space(hose);
199} 199}
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index dd9e4a04bf79..e7af165f8b9d 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -36,7 +36,7 @@
36 * Traverse_func that inits the PCI fields of the device node. 36 * Traverse_func that inits the PCI fields of the device node.
37 * NOTE: this *must* be done before read/write config to the device. 37 * NOTE: this *must* be done before read/write config to the device.
38 */ 38 */
39void * __devinit update_dn_pci_info(struct device_node *dn, void *data) 39void *update_dn_pci_info(struct device_node *dn, void *data)
40{ 40{
41 struct pci_controller *phb = data; 41 struct pci_controller *phb = data;
42 const int *type = 42 const int *type =
@@ -129,7 +129,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
129 * subsystem is set up, before kmalloc is valid) and during the 129 * subsystem is set up, before kmalloc is valid) and during the
130 * dynamic lpar operation of adding a PHB to a running system. 130 * dynamic lpar operation of adding a PHB to a running system.
131 */ 131 */
132void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) 132void pci_devs_phb_init_dynamic(struct pci_controller *phb)
133{ 133{
134 struct device_node *dn = phb->dn; 134 struct device_node *dn = phb->dn;
135 struct pci_dn *pdn; 135 struct pci_dn *pdn;
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index 30378a19f65d..2a67e9baa59f 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -204,7 +204,7 @@ EXPORT_SYMBOL(of_create_pci_dev);
204 * this routine in turn call of_scan_bus() recusively to scan for more child 204 * this routine in turn call of_scan_bus() recusively to scan for more child
205 * devices. 205 * devices.
206 */ 206 */
207void __devinit of_scan_pci_bridge(struct pci_dev *dev) 207void of_scan_pci_bridge(struct pci_dev *dev)
208{ 208{
209 struct device_node *node = dev->dev.of_node; 209 struct device_node *node = dev->dev.of_node;
210 struct pci_bus *bus; 210 struct pci_bus *bus;
@@ -299,8 +299,8 @@ EXPORT_SYMBOL(of_scan_pci_bridge);
299 * @bus: pci_bus structure for the PCI bus 299 * @bus: pci_bus structure for the PCI bus
300 * @rescan_existing: Flag indicating bus has already been set up 300 * @rescan_existing: Flag indicating bus has already been set up
301 */ 301 */
302static void __devinit __of_scan_bus(struct device_node *node, 302static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,
303 struct pci_bus *bus, int rescan_existing) 303 int rescan_existing)
304{ 304{
305 struct device_node *child; 305 struct device_node *child;
306 const u32 *reg; 306 const u32 *reg;
@@ -348,8 +348,7 @@ static void __devinit __of_scan_bus(struct device_node *node,
348 * @node: device tree node for the PCI bus 348 * @node: device tree node for the PCI bus
349 * @bus: pci_bus structure for the PCI bus 349 * @bus: pci_bus structure for the PCI bus
350 */ 350 */
351void __devinit of_scan_bus(struct device_node *node, 351void of_scan_bus(struct device_node *node, struct pci_bus *bus)
352 struct pci_bus *bus)
353{ 352{
354 __of_scan_bus(node, bus, 0); 353 __of_scan_bus(node, bus, 0);
355} 354}
@@ -363,8 +362,7 @@ EXPORT_SYMBOL_GPL(of_scan_bus);
363 * Same as of_scan_bus, but for a pci_bus structure that has already been 362 * Same as of_scan_bus, but for a pci_bus structure that has already been
364 * setup. 363 * setup.
365 */ 364 */
366void __devinit of_rescan_bus(struct device_node *node, 365void of_rescan_bus(struct device_node *node, struct pci_bus *bus)
367 struct pci_bus *bus)
368{ 366{
369 __of_scan_bus(node, bus, 1); 367 __of_scan_bus(node, bus, 1);
370} 368}
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 6de63e3250bb..71cb20d6ec61 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -209,7 +209,7 @@ void __init init_pci_config_tokens (void)
209 ibm_write_pci_config = rtas_token("ibm,write-pci-config"); 209 ibm_write_pci_config = rtas_token("ibm,write-pci-config");
210} 210}
211 211
212unsigned long __devinit get_phb_buid (struct device_node *phb) 212unsigned long get_phb_buid (struct device_node *phb)
213{ 213{
214 struct resource r; 214 struct resource r;
215 215
@@ -237,7 +237,7 @@ static int phb_set_bus_ranges(struct device_node *dev,
237 return 0; 237 return 0;
238} 238}
239 239
240int __devinit rtas_setup_phb(struct pci_controller *phb) 240int rtas_setup_phb(struct pci_controller *phb)
241{ 241{
242 struct device_node *dev = phb->dn; 242 struct device_node *dev = phb->dn;
243 243
diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c
index 640de836e466..e68fd1ae727a 100644
--- a/arch/powerpc/kernel/smp-tbsync.c
+++ b/arch/powerpc/kernel/smp-tbsync.c
@@ -36,13 +36,13 @@ static struct {
36 36
37static volatile int running; 37static volatile int running;
38 38
39static void __devinit enter_contest(u64 mark, long add) 39static void enter_contest(u64 mark, long add)
40{ 40{
41 while (get_tb() < mark) 41 while (get_tb() < mark)
42 tbsync->race_result = add; 42 tbsync->race_result = add;
43} 43}
44 44
45void __devinit smp_generic_take_timebase(void) 45void smp_generic_take_timebase(void)
46{ 46{
47 int cmd; 47 int cmd;
48 u64 tb; 48 u64 tb;
@@ -75,7 +75,7 @@ void __devinit smp_generic_take_timebase(void)
75 local_irq_restore(flags); 75 local_irq_restore(flags);
76} 76}
77 77
78static int __devinit start_contest(int cmd, long offset, int num) 78static int start_contest(int cmd, long offset, int num)
79{ 79{
80 int i, score=0; 80 int i, score=0;
81 u64 tb; 81 u64 tb;
@@ -110,7 +110,7 @@ static int __devinit start_contest(int cmd, long offset, int num)
110 return score; 110 return score;
111} 111}
112 112
113void __devinit smp_generic_give_timebase(void) 113void smp_generic_give_timebase(void)
114{ 114{
115 int i, score, score2, old, min=0, max=5000, offset=1000; 115 int i, score, score2, old, min=0, max=5000, offset=1000;
116 116
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index e5b133ebd8a5..793401e65088 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -82,7 +82,7 @@ int smt_enabled_at_boot = 1;
82static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL; 82static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
83 83
84#ifdef CONFIG_PPC64 84#ifdef CONFIG_PPC64
85int __devinit smp_generic_kick_cpu(int nr) 85int smp_generic_kick_cpu(int nr)
86{ 86{
87 BUG_ON(nr < 0 || nr >= NR_CPUS); 87 BUG_ON(nr < 0 || nr >= NR_CPUS);
88 88
@@ -311,7 +311,7 @@ void smp_send_stop(void)
311 311
312struct thread_info *current_set[NR_CPUS]; 312struct thread_info *current_set[NR_CPUS];
313 313
314static void __devinit smp_store_cpu_info(int id) 314static void smp_store_cpu_info(int id)
315{ 315{
316 per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR); 316 per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR);
317#ifdef CONFIG_PPC_FSL_BOOK3E 317#ifdef CONFIG_PPC_FSL_BOOK3E
@@ -355,7 +355,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
355 max_cpus = 1; 355 max_cpus = 1;
356} 356}
357 357
358void __devinit smp_prepare_boot_cpu(void) 358void smp_prepare_boot_cpu(void)
359{ 359{
360 BUG_ON(smp_processor_id() != boot_cpuid); 360 BUG_ON(smp_processor_id() != boot_cpuid);
361#ifdef CONFIG_PPC64 361#ifdef CONFIG_PPC64
@@ -610,7 +610,7 @@ static struct device_node *cpu_to_l2cache(int cpu)
610} 610}
611 611
612/* Activate a secondary processor. */ 612/* Activate a secondary processor. */
613void __devinit start_secondary(void *unused) 613void start_secondary(void *unused)
614{ 614{
615 unsigned int cpu = smp_processor_id(); 615 unsigned int cpu = smp_processor_id();
616 struct device_node *l2_cache; 616 struct device_node *l2_cache;
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index b3b14352b05e..6f6b1cccc916 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -770,13 +770,8 @@ void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm,
770 770
771void update_vsyscall_tz(void) 771void update_vsyscall_tz(void)
772{ 772{
773 /* Make userspace gettimeofday spin until we're done. */
774 ++vdso_data->tb_update_count;
775 smp_mb();
776 vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; 773 vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
777 vdso_data->tz_dsttime = sys_tz.tz_dsttime; 774 vdso_data->tz_dsttime = sys_tz.tz_dsttime;
778 smp_mb();
779 ++vdso_data->tb_update_count;
780} 775}
781 776
782static void __init clocksource_init(void) 777static void __init clocksource_init(void)
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 201ba59738be..536016d792ba 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1289,7 +1289,7 @@ void vio_unregister_driver(struct vio_driver *viodrv)
1289EXPORT_SYMBOL(vio_unregister_driver); 1289EXPORT_SYMBOL(vio_unregister_driver);
1290 1290
1291/* vio_dev refcount hit 0 */ 1291/* vio_dev refcount hit 0 */
1292static void __devinit vio_dev_release(struct device *dev) 1292static void vio_dev_release(struct device *dev)
1293{ 1293{
1294 struct iommu_table *tbl = get_iommu_table_base(dev); 1294 struct iommu_table *tbl = get_iommu_table_base(dev);
1295 1295
@@ -1545,7 +1545,7 @@ static struct device_attribute vio_dev_attrs[] = {
1545 __ATTR_NULL 1545 __ATTR_NULL
1546}; 1546};
1547 1547
1548void __devinit vio_unregister_device(struct vio_dev *viodev) 1548void vio_unregister_device(struct vio_dev *viodev)
1549{ 1549{
1550 device_unregister(&viodev->dev); 1550 device_unregister(&viodev->dev);
1551} 1551}
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c
index ae758b3ff72c..0d82ef50dc3f 100644
--- a/arch/powerpc/mm/tlb_hash64.c
+++ b/arch/powerpc/mm/tlb_hash64.c
@@ -186,8 +186,6 @@ void tlb_flush(struct mmu_gather *tlb)
186 * Because of that usage pattern, it's only available with CONFIG_HOTPLUG 186 * Because of that usage pattern, it's only available with CONFIG_HOTPLUG
187 * and is implemented for small size rather than speed. 187 * and is implemented for small size rather than speed.
188 */ 188 */
189#ifdef CONFIG_HOTPLUG
190
191void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, 189void __flush_hash_table_range(struct mm_struct *mm, unsigned long start,
192 unsigned long end) 190 unsigned long end)
193{ 191{
@@ -221,5 +219,3 @@ void __flush_hash_table_range(struct mm_struct *mm, unsigned long start,
221 arch_leave_lazy_mmu_mode(); 219 arch_leave_lazy_mmu_mode();
222 local_irq_restore(flags); 220 local_irq_restore(flags);
223} 221}
224
225#endif /* CONFIG_HOTPLUG */
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c
index 969dddcf3320..8f3920e5a046 100644
--- a/arch/powerpc/platforms/40x/ppc40x_simple.c
+++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
@@ -57,7 +57,8 @@ static const char * const board[] __initconst = {
57 "amcc,makalu", 57 "amcc,makalu",
58 "apm,klondike", 58 "apm,klondike",
59 "est,hotfoot", 59 "est,hotfoot",
60 "plathome,obs600" 60 "plathome,obs600",
61 NULL
61}; 62};
62 63
63static int __init ppc40x_probe(void) 64static int __init ppc40x_probe(void)
diff --git a/arch/powerpc/platforms/44x/currituck.c b/arch/powerpc/platforms/44x/currituck.c
index 6bd89a0e0dea..ecd3890c40d7 100644
--- a/arch/powerpc/platforms/44x/currituck.c
+++ b/arch/powerpc/platforms/44x/currituck.c
@@ -46,7 +46,7 @@ static __initdata struct of_device_id ppc47x_of_bus[] = {
46 46
47/* The EEPROM is missing and the default values are bogus. This forces USB in 47/* The EEPROM is missing and the default values are bogus. This forces USB in
48 * to EHCI mode */ 48 * to EHCI mode */
49static void __devinit quirk_ppc_currituck_usb_fixup(struct pci_dev *dev) 49static void quirk_ppc_currituck_usb_fixup(struct pci_dev *dev)
50{ 50{
51 if (of_machine_is_compatible("ibm,currituck")) { 51 if (of_machine_is_compatible("ibm,currituck")) {
52 pci_write_config_dword(dev, 0xe0, 0x0114231f); 52 pci_write_config_dword(dev, 0xe0, 0x0114231f);
diff --git a/arch/powerpc/platforms/44x/virtex_ml510.c b/arch/powerpc/platforms/44x/virtex_ml510.c
index ba4a6e388a46..1fdb8748638d 100644
--- a/arch/powerpc/platforms/44x/virtex_ml510.c
+++ b/arch/powerpc/platforms/44x/virtex_ml510.c
@@ -5,7 +5,7 @@
5/** 5/**
6 * ml510_ail_quirk 6 * ml510_ail_quirk
7 */ 7 */
8static void __devinit ml510_ali_quirk(struct pci_dev *dev) 8static void ml510_ali_quirk(struct pci_dev *dev)
9{ 9{
10 /* Enable the IDE controller */ 10 /* Enable the IDE controller */
11 pci_write_config_byte(dev, 0x58, 0x4c); 11 pci_write_config_byte(dev, 0x58, 0x4c);
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index a51cb07bd663..692998244d2c 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -669,7 +669,7 @@ static struct miscdevice mpc52xx_wdt_miscdev = {
669 .fops = &mpc52xx_wdt_fops, 669 .fops = &mpc52xx_wdt_fops,
670}; 670};
671 671
672static int __devinit mpc52xx_gpt_wdt_init(void) 672static int mpc52xx_gpt_wdt_init(void)
673{ 673{
674 int err; 674 int err;
675 675
@@ -704,7 +704,7 @@ static int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt,
704 704
705#else 705#else
706 706
707static int __devinit mpc52xx_gpt_wdt_init(void) 707static int mpc52xx_gpt_wdt_init(void)
708{ 708{
709 return 0; 709 return 0;
710} 710}
@@ -720,7 +720,7 @@ static inline int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt,
720/* --------------------------------------------------------------------- 720/* ---------------------------------------------------------------------
721 * of_platform bus binding code 721 * of_platform bus binding code
722 */ 722 */
723static int __devinit mpc52xx_gpt_probe(struct platform_device *ofdev) 723static int mpc52xx_gpt_probe(struct platform_device *ofdev)
724{ 724{
725 struct mpc52xx_gpt_priv *gpt; 725 struct mpc52xx_gpt_priv *gpt;
726 726
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
index 16150fa430f9..f9f4537f546d 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
@@ -470,7 +470,7 @@ void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req)
470} 470}
471EXPORT_SYMBOL(mpc52xx_lpbfifo_abort); 471EXPORT_SYMBOL(mpc52xx_lpbfifo_abort);
472 472
473static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op) 473static int mpc52xx_lpbfifo_probe(struct platform_device *op)
474{ 474{
475 struct resource res; 475 struct resource res;
476 int rc = -ENOMEM; 476 int rc = -ENOMEM;
@@ -540,7 +540,7 @@ static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op)
540} 540}
541 541
542 542
543static int __devexit mpc52xx_lpbfifo_remove(struct platform_device *op) 543static int mpc52xx_lpbfifo_remove(struct platform_device *op)
544{ 544{
545 if (lpbfifo.dev != &op->dev) 545 if (lpbfifo.dev != &op->dev)
546 return 0; 546 return 0;
@@ -564,7 +564,7 @@ static int __devexit mpc52xx_lpbfifo_remove(struct platform_device *op)
564 return 0; 564 return 0;
565} 565}
566 566
567static struct of_device_id mpc52xx_lpbfifo_match[] __devinitconst = { 567static struct of_device_id mpc52xx_lpbfifo_match[] = {
568 { .compatible = "fsl,mpc5200-lpbfifo", }, 568 { .compatible = "fsl,mpc5200-lpbfifo", },
569 {}, 569 {},
570}; 570};
@@ -576,6 +576,6 @@ static struct platform_driver mpc52xx_lpbfifo_driver = {
576 .of_match_table = mpc52xx_lpbfifo_match, 576 .of_match_table = mpc52xx_lpbfifo_match,
577 }, 577 },
578 .probe = mpc52xx_lpbfifo_probe, 578 .probe = mpc52xx_lpbfifo_probe,
579 .remove = __devexit_p(mpc52xx_lpbfifo_remove), 579 .remove = mpc52xx_lpbfifo_remove,
580}; 580};
581module_platform_driver(mpc52xx_lpbfifo_driver); 581module_platform_driver(mpc52xx_lpbfifo_driver);
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
index 10ff526cd046..79799b29ffe2 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -111,7 +111,7 @@ static struct mdiobb_ctrl ep8248e_mdio_ctrl = {
111 .ops = &ep8248e_mdio_ops, 111 .ops = &ep8248e_mdio_ops,
112}; 112};
113 113
114static int __devinit ep8248e_mdio_probe(struct platform_device *ofdev) 114static int ep8248e_mdio_probe(struct platform_device *ofdev)
115{ 115{
116 struct mii_bus *bus; 116 struct mii_bus *bus;
117 struct resource res; 117 struct resource res;
diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
index ef6537b8ed33..624cb51d19c9 100644
--- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
+++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
@@ -145,8 +145,7 @@ static int mcu_gpiochip_remove(struct mcu *mcu)
145 return gpiochip_remove(&mcu->gc); 145 return gpiochip_remove(&mcu->gc);
146} 146}
147 147
148static int __devinit mcu_probe(struct i2c_client *client, 148static int mcu_probe(struct i2c_client *client, const struct i2c_device_id *id)
149 const struct i2c_device_id *id)
150{ 149{
151 struct mcu *mcu; 150 struct mcu *mcu;
152 int ret; 151 int ret;
@@ -188,7 +187,7 @@ err:
188 return ret; 187 return ret;
189} 188}
190 189
191static int __devexit mcu_remove(struct i2c_client *client) 190static int mcu_remove(struct i2c_client *client)
192{ 191{
193 struct mcu *mcu = i2c_get_clientdata(client); 192 struct mcu *mcu = i2c_get_clientdata(client);
194 int ret; 193 int ret;
@@ -216,7 +215,7 @@ static const struct i2c_device_id mcu_ids[] = {
216}; 215};
217MODULE_DEVICE_TABLE(i2c, mcu_ids); 216MODULE_DEVICE_TABLE(i2c, mcu_ids);
218 217
219static struct of_device_id mcu_of_match_table[] __devinitdata = { 218static struct of_device_id mcu_of_match_table[] = {
220 { .compatible = "fsl,mcu-mpc8349emitx", }, 219 { .compatible = "fsl,mcu-mpc8349emitx", },
221 { }, 220 { },
222}; 221};
@@ -228,7 +227,7 @@ static struct i2c_driver mcu_driver = {
228 .of_match_table = mcu_of_match_table, 227 .of_match_table = mcu_of_match_table,
229 }, 228 },
230 .probe = mcu_probe, 229 .probe = mcu_probe,
231 .remove = __devexit_p(mcu_remove), 230 .remove = mcu_remove,
232 .id_table = mcu_ids, 231 .id_table = mcu_ids,
233}; 232};
234 233
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c
index ed69c9250717..6f355d8c92f6 100644
--- a/arch/powerpc/platforms/85xx/corenet_ds.c
+++ b/arch/powerpc/platforms/85xx/corenet_ds.c
@@ -64,7 +64,7 @@ void __init corenet_ds_setup_arch(void)
64 pr_info("%s board from Freescale Semiconductor\n", ppc_md.name); 64 pr_info("%s board from Freescale Semiconductor\n", ppc_md.name);
65} 65}
66 66
67static const struct of_device_id of_device_ids[] __devinitconst = { 67static const struct of_device_id of_device_ids[] = {
68 { 68 {
69 .compatible = "simple-bus" 69 .compatible = "simple-bus"
70 }, 70 },
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index c474505ad0d0..7a31a0e1df29 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -154,7 +154,7 @@ static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
154 } 154 }
155} 155}
156 156
157static void __devinit skip_fake_bridge(struct pci_dev *dev) 157static void skip_fake_bridge(struct pci_dev *dev)
158{ 158{
159 /* Make it an error to skip the fake bridge 159 /* Make it an error to skip the fake bridge
160 * in pci_setup_device() in probe.c */ 160 * in pci_setup_device() in probe.c */
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
index b4e58cdc09a5..ec0b7272fae2 100644
--- a/arch/powerpc/platforms/85xx/tqm85xx.c
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -85,7 +85,7 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m)
85 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 85 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
86} 86}
87 87
88static void __devinit tqm85xx_ti1520_fixup(struct pci_dev *pdev) 88static void tqm85xx_ti1520_fixup(struct pci_dev *pdev)
89{ 89{
90 unsigned int val; 90 unsigned int val;
91 91
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c
index bf5338754c5a..c23f3443880a 100644
--- a/arch/powerpc/platforms/86xx/gef_ppc9a.c
+++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c
@@ -159,7 +159,7 @@ static void gef_ppc9a_show_cpuinfo(struct seq_file *m)
159 gef_ppc9a_get_vme_is_syscon() ? "yes" : "no"); 159 gef_ppc9a_get_vme_is_syscon() ? "yes" : "no");
160} 160}
161 161
162static void __devinit gef_ppc9a_nec_fixup(struct pci_dev *pdev) 162static void gef_ppc9a_nec_fixup(struct pci_dev *pdev)
163{ 163{
164 unsigned int val; 164 unsigned int val;
165 165
diff --git a/arch/powerpc/platforms/86xx/gef_sbc310.c b/arch/powerpc/platforms/86xx/gef_sbc310.c
index 0b7851330a07..8a6ac20686ea 100644
--- a/arch/powerpc/platforms/86xx/gef_sbc310.c
+++ b/arch/powerpc/platforms/86xx/gef_sbc310.c
@@ -146,7 +146,7 @@ static void gef_sbc310_show_cpuinfo(struct seq_file *m)
146 146
147} 147}
148 148
149static void __devinit gef_sbc310_nec_fixup(struct pci_dev *pdev) 149static void gef_sbc310_nec_fixup(struct pci_dev *pdev)
150{ 150{
151 unsigned int val; 151 unsigned int val;
152 152
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c
index b9eb174897b1..06c72636f299 100644
--- a/arch/powerpc/platforms/86xx/gef_sbc610.c
+++ b/arch/powerpc/platforms/86xx/gef_sbc610.c
@@ -136,7 +136,7 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m)
136 seq_printf(m, "SVR\t\t: 0x%x\n", svid); 136 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
137} 137}
138 138
139static void __devinit gef_sbc610_nec_fixup(struct pci_dev *pdev) 139static void gef_sbc610_nec_fixup(struct pci_dev *pdev)
140{ 140{
141 unsigned int val; 141 unsigned int val;
142 142
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index 4ab087671185..6ae25fb62015 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -117,7 +117,7 @@ static void cell_fixup_pcie_rootcomplex(struct pci_dev *dev)
117} 117}
118DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex); 118DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex);
119 119
120static int __devinit cell_setup_phb(struct pci_controller *phb) 120static int cell_setup_phb(struct pci_controller *phb)
121{ 121{
122 const char *model; 122 const char *model;
123 struct device_node *np; 123 struct device_node *np;
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index 49a65e2dfc71..d35dbbc8ec79 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -67,7 +67,7 @@ static cpumask_t of_spin_map;
67 * 0 - failure 67 * 0 - failure
68 * 1 - success 68 * 1 - success
69 */ 69 */
70static inline int __devinit smp_startup_cpu(unsigned int lcpu) 70static inline int smp_startup_cpu(unsigned int lcpu)
71{ 71{
72 int status; 72 int status;
73 unsigned long start_here = __pa((u32)*((unsigned long *) 73 unsigned long start_here = __pa((u32)*((unsigned long *)
@@ -108,7 +108,7 @@ static int __init smp_iic_probe(void)
108 return cpumask_weight(cpu_possible_mask); 108 return cpumask_weight(cpu_possible_mask);
109} 109}
110 110
111static void __devinit smp_cell_setup_cpu(int cpu) 111static void smp_cell_setup_cpu(int cpu)
112{ 112{
113 if (cpu != boot_cpuid) 113 if (cpu != boot_cpuid)
114 iic_setup_cpu(); 114 iic_setup_cpu();
@@ -119,7 +119,7 @@ static void __devinit smp_cell_setup_cpu(int cpu)
119 mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER); 119 mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER);
120} 120}
121 121
122static int __devinit smp_cell_kick_cpu(int nr) 122static int smp_cell_kick_cpu(int nr)
123{ 123{
124 BUG_ON(nr < 0 || nr >= NR_CPUS); 124 BUG_ON(nr < 0 || nr >= NR_CPUS);
125 125
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index 83285c5a2049..1b87e198faa7 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -323,7 +323,7 @@ chrp_find_bridges(void)
323 * ATA controller to be set to fully native mode or bad things 323 * ATA controller to be set to fully native mode or bad things
324 * will happen. 324 * will happen.
325 */ 325 */
326static void __devinit chrp_pci_fixup_winbond_ata(struct pci_dev *sl82c105) 326static void chrp_pci_fixup_winbond_ata(struct pci_dev *sl82c105)
327{ 327{
328 u8 progif; 328 u8 progif;
329 329
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c
index feab30bbae23..dead91b177b9 100644
--- a/arch/powerpc/platforms/chrp/smp.c
+++ b/arch/powerpc/platforms/chrp/smp.c
@@ -30,7 +30,7 @@
30#include <asm/mpic.h> 30#include <asm/mpic.h>
31#include <asm/rtas.h> 31#include <asm/rtas.h>
32 32
33static int __devinit smp_chrp_kick_cpu(int nr) 33static int smp_chrp_kick_cpu(int nr)
34{ 34{
35 *(unsigned long *)KERNELBASE = nr; 35 *(unsigned long *)KERNELBASE = nr;
36 asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory"); 36 asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory");
@@ -38,7 +38,7 @@ static int __devinit smp_chrp_kick_cpu(int nr)
38 return 0; 38 return 0;
39} 39}
40 40
41static void __devinit smp_chrp_setup_cpu(int cpu_nr) 41static void smp_chrp_setup_cpu(int cpu_nr)
42{ 42{
43 mpic_setup_this_cpu(); 43 mpic_setup_this_cpu();
44} 44}
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c
index 64fde058e545..92ac9b52b32d 100644
--- a/arch/powerpc/platforms/fsl_uli1575.c
+++ b/arch/powerpc/platforms/fsl_uli1575.c
@@ -59,7 +59,7 @@ static inline bool is_quirk_valid(void)
59} 59}
60 60
61/* Bridge */ 61/* Bridge */
62static void __devinit early_uli5249(struct pci_dev *dev) 62static void early_uli5249(struct pci_dev *dev)
63{ 63{
64 unsigned char temp; 64 unsigned char temp;
65 65
@@ -82,7 +82,7 @@ static void __devinit early_uli5249(struct pci_dev *dev)
82} 82}
83 83
84 84
85static void __devinit quirk_uli1575(struct pci_dev *dev) 85static void quirk_uli1575(struct pci_dev *dev)
86{ 86{
87 int i; 87 int i;
88 88
@@ -139,7 +139,7 @@ static void __devinit quirk_uli1575(struct pci_dev *dev)
139 pci_write_config_byte(dev, 0x75, ULI_8259_IRQ15); 139 pci_write_config_byte(dev, 0x75, ULI_8259_IRQ15);
140} 140}
141 141
142static void __devinit quirk_final_uli1575(struct pci_dev *dev) 142static void quirk_final_uli1575(struct pci_dev *dev)
143{ 143{
144 /* Set i8259 interrupt trigger 144 /* Set i8259 interrupt trigger
145 * IRQ 3: Level 145 * IRQ 3: Level
@@ -175,7 +175,7 @@ static void __devinit quirk_final_uli1575(struct pci_dev *dev)
175} 175}
176 176
177/* SATA */ 177/* SATA */
178static void __devinit quirk_uli5288(struct pci_dev *dev) 178static void quirk_uli5288(struct pci_dev *dev)
179{ 179{
180 unsigned char c; 180 unsigned char c;
181 unsigned int d; 181 unsigned int d;
@@ -200,7 +200,7 @@ static void __devinit quirk_uli5288(struct pci_dev *dev)
200} 200}
201 201
202/* PATA */ 202/* PATA */
203static void __devinit quirk_uli5229(struct pci_dev *dev) 203static void quirk_uli5229(struct pci_dev *dev)
204{ 204{
205 unsigned short temp; 205 unsigned short temp;
206 206
@@ -216,7 +216,7 @@ static void __devinit quirk_uli5229(struct pci_dev *dev)
216} 216}
217 217
218/* We have to do a dummy read on the P2P for the RTC to work, WTF */ 218/* We have to do a dummy read on the P2P for the RTC to work, WTF */
219static void __devinit quirk_final_uli5249(struct pci_dev *dev) 219static void quirk_final_uli5249(struct pci_dev *dev)
220{ 220{
221 int i; 221 int i;
222 u8 *dummy; 222 u8 *dummy;
@@ -253,7 +253,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5249, quirk_final_uli5249);
253DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575); 253DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575);
254DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229); 254DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
255 255
256static void __devinit hpcd_quirk_uli1575(struct pci_dev *dev) 256static void hpcd_quirk_uli1575(struct pci_dev *dev)
257{ 257{
258 u32 temp32; 258 u32 temp32;
259 259
@@ -269,7 +269,7 @@ static void __devinit hpcd_quirk_uli1575(struct pci_dev *dev)
269 pci_write_config_dword(dev, 0x90, (temp32 | 1<<22)); 269 pci_write_config_dword(dev, 0x90, (temp32 | 1<<22));
270} 270}
271 271
272static void __devinit hpcd_quirk_uli5288(struct pci_dev *dev) 272static void hpcd_quirk_uli5288(struct pci_dev *dev)
273{ 273{
274 unsigned char c; 274 unsigned char c;
275 275
@@ -295,7 +295,7 @@ static void __devinit hpcd_quirk_uli5288(struct pci_dev *dev)
295 * IRQ14 is a sideband interrupt from IDE device to CPU and we use this 295 * IRQ14 is a sideband interrupt from IDE device to CPU and we use this
296 * as the interrupt for IDE device. 296 * as the interrupt for IDE device.
297 */ 297 */
298static void __devinit hpcd_quirk_uli5229(struct pci_dev *dev) 298static void hpcd_quirk_uli5229(struct pci_dev *dev)
299{ 299{
300 unsigned char c; 300 unsigned char c;
301 301
@@ -317,7 +317,7 @@ static void __devinit hpcd_quirk_uli5229(struct pci_dev *dev)
317 * bug by re-assigning a correct irq to 5288. 317 * bug by re-assigning a correct irq to 5288.
318 * 318 *
319 */ 319 */
320static void __devinit hpcd_final_uli5288(struct pci_dev *dev) 320static void hpcd_final_uli5288(struct pci_dev *dev)
321{ 321{
322 struct pci_controller *hose = pci_bus_to_host(dev->bus); 322 struct pci_controller *hose = pci_bus_to_host(dev->bus);
323 struct device_node *hosenode = hose ? hose->dn : NULL; 323 struct device_node *hosenode = hose ? hose->dn : NULL;
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 465ee8f5c086..f7136aae8bbf 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -543,7 +543,7 @@ static int __init maple_add_bridge(struct device_node *dev)
543} 543}
544 544
545 545
546void __devinit maple_pci_irq_fixup(struct pci_dev *dev) 546void maple_pci_irq_fixup(struct pci_dev *dev)
547{ 547{
548 DBG(" -> maple_pci_irq_fixup\n"); 548 DBG(" -> maple_pci_irq_fixup\n");
549 549
@@ -648,7 +648,7 @@ int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
648 return irq; 648 return irq;
649} 649}
650 650
651static void __devinit quirk_ipr_msi(struct pci_dev *dev) 651static void quirk_ipr_msi(struct pci_dev *dev)
652{ 652{
653 /* Something prevents MSIs from the IPR from working on Bimini, 653 /* Something prevents MSIs from the IPR from working on Bimini,
654 * and the driver has no smarts to recover. So disable MSI 654 * and the driver has no smarts to recover. So disable MSI
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index 9886296e08da..0237ab782fb8 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -216,7 +216,7 @@ static int gpio_mdio_reset(struct mii_bus *bus)
216} 216}
217 217
218 218
219static int __devinit gpio_mdio_probe(struct platform_device *ofdev) 219static int gpio_mdio_probe(struct platform_device *ofdev)
220{ 220{
221 struct device *dev = &ofdev->dev; 221 struct device *dev = &ofdev->dev;
222 struct device_node *np = ofdev->dev.of_node; 222 struct device_node *np = ofdev->dev.of_node;
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h
index b1e524f7489d..ea65bf0eb897 100644
--- a/arch/powerpc/platforms/pasemi/pasemi.h
+++ b/arch/powerpc/platforms/pasemi/pasemi.h
@@ -3,8 +3,8 @@
3 3
4extern unsigned long pas_get_boot_time(void); 4extern unsigned long pas_get_boot_time(void);
5extern void pas_pci_init(void); 5extern void pas_pci_init(void);
6extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev); 6extern void pas_pci_irq_fixup(struct pci_dev *dev);
7extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev); 7extern void pas_pci_dma_dev_setup(struct pci_dev *dev);
8 8
9extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset); 9extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset);
10 10
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 2ed9212d7d59..8c54de6d8ec4 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -76,7 +76,7 @@ static void pas_restart(char *cmd)
76static arch_spinlock_t timebase_lock; 76static arch_spinlock_t timebase_lock;
77static unsigned long timebase; 77static unsigned long timebase;
78 78
79static void __devinit pas_give_timebase(void) 79static void pas_give_timebase(void)
80{ 80{
81 unsigned long flags; 81 unsigned long flags;
82 82
@@ -94,7 +94,7 @@ static void __devinit pas_give_timebase(void)
94 local_irq_restore(flags); 94 local_irq_restore(flags);
95} 95}
96 96
97static void __devinit pas_take_timebase(void) 97static void pas_take_timebase(void)
98{ 98{
99 while (!timebase) 99 while (!timebase)
100 smp_rmb(); 100 smp_rmb();
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 43bbe1bda939..2b8af75abc23 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -561,7 +561,7 @@ static struct pci_ops u4_pcie_pci_ops =
561 .write = u4_pcie_write_config, 561 .write = u4_pcie_write_config,
562}; 562};
563 563
564static void __devinit pmac_pci_fixup_u4_of_node(struct pci_dev *dev) 564static void pmac_pci_fixup_u4_of_node(struct pci_dev *dev)
565{ 565{
566 /* Apple's device-tree "hides" the root complex virtual P2P bridge 566 /* Apple's device-tree "hides" the root complex virtual P2P bridge
567 * on U4. However, Linux sees it, causing the PCI <-> OF matching 567 * on U4. However, Linux sees it, causing the PCI <-> OF matching
@@ -988,7 +988,7 @@ static int __init pmac_add_bridge(struct device_node *dev)
988 return 0; 988 return 0;
989} 989}
990 990
991void __devinit pmac_pci_irq_fixup(struct pci_dev *dev) 991void pmac_pci_irq_fixup(struct pci_dev *dev)
992{ 992{
993#ifdef CONFIG_PPC32 993#ifdef CONFIG_PPC32
994 /* Fixup interrupt for the modem/ethernet combo controller. 994 /* Fixup interrupt for the modem/ethernet combo controller.
@@ -1138,7 +1138,7 @@ int pmac_pci_enable_device_hook(struct pci_dev *dev)
1138 return 0; 1138 return 0;
1139} 1139}
1140 1140
1141void __devinit pmac_pci_fixup_ohci(struct pci_dev *dev) 1141void pmac_pci_fixup_ohci(struct pci_dev *dev)
1142{ 1142{
1143 struct device_node *node = pci_device_to_OF_node(dev); 1143 struct device_node *node = pci_device_to_OF_node(dev);
1144 1144
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index b4ddaa3fbb29..bdb738a69e41 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -484,7 +484,7 @@ static void smp_core99_give_timebase(void)
484} 484}
485 485
486 486
487static void __devinit smp_core99_take_timebase(void) 487static void smp_core99_take_timebase(void)
488{ 488{
489 unsigned long flags; 489 unsigned long flags;
490 490
@@ -669,7 +669,7 @@ static void smp_core99_gpio_tb_freeze(int freeze)
669volatile static long int core99_l2_cache; 669volatile static long int core99_l2_cache;
670volatile static long int core99_l3_cache; 670volatile static long int core99_l3_cache;
671 671
672static void __devinit core99_init_caches(int cpu) 672static void core99_init_caches(int cpu)
673{ 673{
674#ifndef CONFIG_PPC64 674#ifndef CONFIG_PPC64
675 if (!cpu_has_feature(CPU_FTR_L2CR)) 675 if (!cpu_has_feature(CPU_FTR_L2CR))
@@ -801,7 +801,7 @@ static int __init smp_core99_probe(void)
801 return ncpus; 801 return ncpus;
802} 802}
803 803
804static int __devinit smp_core99_kick_cpu(int nr) 804static int smp_core99_kick_cpu(int nr)
805{ 805{
806 unsigned int save_vector; 806 unsigned int save_vector;
807 unsigned long target, flags; 807 unsigned long target, flags;
@@ -844,7 +844,7 @@ static int __devinit smp_core99_kick_cpu(int nr)
844 return 0; 844 return 0;
845} 845}
846 846
847static void __devinit smp_core99_setup_cpu(int cpu_nr) 847static void smp_core99_setup_cpu(int cpu_nr)
848{ 848{
849 /* Setup L2/L3 */ 849 /* Setup L2/L3 */
850 if (cpu_nr != 0) 850 if (cpu_nr != 0)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 53d052e95cfc..8e90e8906df3 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -76,7 +76,7 @@ static struct pci_dn *pnv_ioda_get_pdn(struct pci_dev *dev)
76 return PCI_DN(np); 76 return PCI_DN(np);
77} 77}
78 78
79static int __devinit pnv_ioda_alloc_pe(struct pnv_phb *phb) 79static int pnv_ioda_alloc_pe(struct pnv_phb *phb)
80{ 80{
81 unsigned long pe; 81 unsigned long pe;
82 82
@@ -91,7 +91,7 @@ static int __devinit pnv_ioda_alloc_pe(struct pnv_phb *phb)
91 return pe; 91 return pe;
92} 92}
93 93
94static void __devinit pnv_ioda_free_pe(struct pnv_phb *phb, int pe) 94static void pnv_ioda_free_pe(struct pnv_phb *phb, int pe)
95{ 95{
96 WARN_ON(phb->ioda.pe_array[pe].pdev); 96 WARN_ON(phb->ioda.pe_array[pe].pdev);
97 97
@@ -103,7 +103,7 @@ static void __devinit pnv_ioda_free_pe(struct pnv_phb *phb, int pe)
103 * but in the meantime, we need to protect them to avoid warnings 103 * but in the meantime, we need to protect them to avoid warnings
104 */ 104 */
105#ifdef CONFIG_PCI_MSI 105#ifdef CONFIG_PCI_MSI
106static struct pnv_ioda_pe * __devinit pnv_ioda_get_pe(struct pci_dev *dev) 106static struct pnv_ioda_pe *pnv_ioda_get_pe(struct pci_dev *dev)
107{ 107{
108 struct pci_controller *hose = pci_bus_to_host(dev->bus); 108 struct pci_controller *hose = pci_bus_to_host(dev->bus);
109 struct pnv_phb *phb = hose->private_data; 109 struct pnv_phb *phb = hose->private_data;
@@ -117,8 +117,7 @@ static struct pnv_ioda_pe * __devinit pnv_ioda_get_pe(struct pci_dev *dev)
117} 117}
118#endif /* CONFIG_PCI_MSI */ 118#endif /* CONFIG_PCI_MSI */
119 119
120static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb, 120static int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
121 struct pnv_ioda_pe *pe)
122{ 121{
123 struct pci_dev *parent; 122 struct pci_dev *parent;
124 uint8_t bcomp, dcomp, fcomp; 123 uint8_t bcomp, dcomp, fcomp;
@@ -207,8 +206,8 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb,
207 return 0; 206 return 0;
208} 207}
209 208
210static void __devinit pnv_ioda_link_pe_by_weight(struct pnv_phb *phb, 209static void pnv_ioda_link_pe_by_weight(struct pnv_phb *phb,
211 struct pnv_ioda_pe *pe) 210 struct pnv_ioda_pe *pe)
212{ 211{
213 struct pnv_ioda_pe *lpe; 212 struct pnv_ioda_pe *lpe;
214 213
@@ -246,7 +245,7 @@ static unsigned int pnv_ioda_dma_weight(struct pci_dev *dev)
246} 245}
247 246
248#if 0 247#if 0
249static struct pnv_ioda_pe * __devinit pnv_ioda_setup_dev_PE(struct pci_dev *dev) 248static struct pnv_ioda_pe *pnv_ioda_setup_dev_PE(struct pci_dev *dev)
250{ 249{
251 struct pci_controller *hose = pci_bus_to_host(dev->bus); 250 struct pci_controller *hose = pci_bus_to_host(dev->bus);
252 struct pnv_phb *phb = hose->private_data; 251 struct pnv_phb *phb = hose->private_data;
@@ -343,7 +342,7 @@ static void pnv_ioda_setup_same_PE(struct pci_bus *bus, struct pnv_ioda_pe *pe)
343 * subordinate PCI devices and buses. The second type of PE is normally 342 * subordinate PCI devices and buses. The second type of PE is normally
344 * orgiriated by PCIe-to-PCI bridge or PLX switch downstream ports. 343 * orgiriated by PCIe-to-PCI bridge or PLX switch downstream ports.
345 */ 344 */
346static void __devinit pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all) 345static void pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all)
347{ 346{
348 struct pci_controller *hose = pci_bus_to_host(bus); 347 struct pci_controller *hose = pci_bus_to_host(bus);
349 struct pnv_phb *phb = hose->private_data; 348 struct pnv_phb *phb = hose->private_data;
@@ -399,7 +398,7 @@ static void __devinit pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all)
399 pnv_ioda_link_pe_by_weight(phb, pe); 398 pnv_ioda_link_pe_by_weight(phb, pe);
400} 399}
401 400
402static void __devinit pnv_ioda_setup_PEs(struct pci_bus *bus) 401static void pnv_ioda_setup_PEs(struct pci_bus *bus)
403{ 402{
404 struct pci_dev *dev; 403 struct pci_dev *dev;
405 404
@@ -423,7 +422,7 @@ static void __devinit pnv_ioda_setup_PEs(struct pci_bus *bus)
423 * port to PE# here. The game rule here is expected to be changed 422 * port to PE# here. The game rule here is expected to be changed
424 * as soon as we can detected PLX bridge correctly. 423 * as soon as we can detected PLX bridge correctly.
425 */ 424 */
426static void __devinit pnv_pci_ioda_setup_PEs(void) 425static void pnv_pci_ioda_setup_PEs(void)
427{ 426{
428 struct pci_controller *hose, *tmp; 427 struct pci_controller *hose, *tmp;
429 428
@@ -432,14 +431,12 @@ static void __devinit pnv_pci_ioda_setup_PEs(void)
432 } 431 }
433} 432}
434 433
435static void __devinit pnv_pci_ioda_dma_dev_setup(struct pnv_phb *phb, 434static void pnv_pci_ioda_dma_dev_setup(struct pnv_phb *phb, struct pci_dev *dev)
436 struct pci_dev *dev)
437{ 435{
438 /* We delay DMA setup after we have assigned all PE# */ 436 /* We delay DMA setup after we have assigned all PE# */
439} 437}
440 438
441static void __devinit pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, 439static void pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, struct pci_bus *bus)
442 struct pci_bus *bus)
443{ 440{
444 struct pci_dev *dev; 441 struct pci_dev *dev;
445 442
@@ -450,10 +447,9 @@ static void __devinit pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe,
450 } 447 }
451} 448}
452 449
453static void __devinit pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb, 450static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
454 struct pnv_ioda_pe *pe, 451 struct pnv_ioda_pe *pe, unsigned int base,
455 unsigned int base, 452 unsigned int segs)
456 unsigned int segs)
457{ 453{
458 454
459 struct page *tce_mem = NULL; 455 struct page *tce_mem = NULL;
@@ -541,7 +537,7 @@ static void __devinit pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
541 __free_pages(tce_mem, get_order(TCE32_TABLE_SIZE * segs)); 537 __free_pages(tce_mem, get_order(TCE32_TABLE_SIZE * segs));
542} 538}
543 539
544static void __devinit pnv_ioda_setup_dma(struct pnv_phb *phb) 540static void pnv_ioda_setup_dma(struct pnv_phb *phb)
545{ 541{
546 struct pci_controller *hose = phb->hose; 542 struct pci_controller *hose = phb->hose;
547 unsigned int residual, remaining, segs, tw, base; 543 unsigned int residual, remaining, segs, tw, base;
@@ -684,8 +680,8 @@ static void pnv_pci_init_ioda_msis(struct pnv_phb *phb) { }
684 * to bottom style. So the the I/O or MMIO segment assigned to 680 * to bottom style. So the the I/O or MMIO segment assigned to
685 * parent PE could be overrided by its child PEs if necessary. 681 * parent PE could be overrided by its child PEs if necessary.
686 */ 682 */
687static void __devinit pnv_ioda_setup_pe_seg(struct pci_controller *hose, 683static void pnv_ioda_setup_pe_seg(struct pci_controller *hose,
688 struct pnv_ioda_pe *pe) 684 struct pnv_ioda_pe *pe)
689{ 685{
690 struct pnv_phb *phb = hose->private_data; 686 struct pnv_phb *phb = hose->private_data;
691 struct pci_bus_region region; 687 struct pci_bus_region region;
@@ -753,7 +749,7 @@ static void __devinit pnv_ioda_setup_pe_seg(struct pci_controller *hose,
753 } 749 }
754} 750}
755 751
756static void __devinit pnv_pci_ioda_setup_seg(void) 752static void pnv_pci_ioda_setup_seg(void)
757{ 753{
758 struct pci_controller *tmp, *hose; 754 struct pci_controller *tmp, *hose;
759 struct pnv_phb *phb; 755 struct pnv_phb *phb;
@@ -767,7 +763,7 @@ static void __devinit pnv_pci_ioda_setup_seg(void)
767 } 763 }
768} 764}
769 765
770static void __devinit pnv_pci_ioda_setup_DMA(void) 766static void pnv_pci_ioda_setup_DMA(void)
771{ 767{
772 struct pci_controller *hose, *tmp; 768 struct pci_controller *hose, *tmp;
773 struct pnv_phb *phb; 769 struct pnv_phb *phb;
@@ -781,7 +777,7 @@ static void __devinit pnv_pci_ioda_setup_DMA(void)
781 } 777 }
782} 778}
783 779
784static void __devinit pnv_pci_ioda_fixup(void) 780static void pnv_pci_ioda_fixup(void)
785{ 781{
786 pnv_pci_ioda_setup_PEs(); 782 pnv_pci_ioda_setup_PEs();
787 pnv_pci_ioda_setup_seg(); 783 pnv_pci_ioda_setup_seg();
@@ -829,7 +825,7 @@ static resource_size_t pnv_pci_window_alignment(struct pci_bus *bus,
829/* Prevent enabling devices for which we couldn't properly 825/* Prevent enabling devices for which we couldn't properly
830 * assign a PE 826 * assign a PE
831 */ 827 */
832static int __devinit pnv_pci_enable_device_hook(struct pci_dev *dev) 828static int pnv_pci_enable_device_hook(struct pci_dev *dev)
833{ 829{
834 struct pci_controller *hose = pci_bus_to_host(dev->bus); 830 struct pci_controller *hose = pci_bus_to_host(dev->bus);
835 struct pnv_phb *phb = hose->private_data; 831 struct pnv_phb *phb = hose->private_data;
diff --git a/arch/powerpc/platforms/powernv/pci-p5ioc2.c b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
index 6b4bef4e9d82..7db8771a40f5 100644
--- a/arch/powerpc/platforms/powernv/pci-p5ioc2.c
+++ b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
@@ -84,8 +84,8 @@ static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb)
84static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb) { } 84static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb) { }
85#endif /* CONFIG_PCI_MSI */ 85#endif /* CONFIG_PCI_MSI */
86 86
87static void __devinit pnv_pci_p5ioc2_dma_dev_setup(struct pnv_phb *phb, 87static void pnv_pci_p5ioc2_dma_dev_setup(struct pnv_phb *phb,
88 struct pci_dev *pdev) 88 struct pci_dev *pdev)
89{ 89{
90 if (phb->p5ioc2.iommu_table.it_map == NULL) 90 if (phb->p5ioc2.iommu_table.it_map == NULL)
91 iommu_init_table(&phb->p5ioc2.iommu_table, phb->hose->node); 91 iommu_init_table(&phb->p5ioc2.iommu_table, phb->hose->node);
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index c01688a1a741..b8b8e0bd9897 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -464,8 +464,7 @@ void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
464 tbl->it_type = TCE_PCI; 464 tbl->it_type = TCE_PCI;
465} 465}
466 466
467static struct iommu_table * __devinit 467static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose)
468pnv_pci_setup_bml_iommu(struct pci_controller *hose)
469{ 468{
470 struct iommu_table *tbl; 469 struct iommu_table *tbl;
471 const __be64 *basep, *swinvp; 470 const __be64 *basep, *swinvp;
@@ -496,8 +495,8 @@ pnv_pci_setup_bml_iommu(struct pci_controller *hose)
496 return tbl; 495 return tbl;
497} 496}
498 497
499static void __devinit pnv_pci_dma_fallback_setup(struct pci_controller *hose, 498static void pnv_pci_dma_fallback_setup(struct pci_controller *hose,
500 struct pci_dev *pdev) 499 struct pci_dev *pdev)
501{ 500{
502 struct device_node *np = pci_bus_to_OF_node(hose->bus); 501 struct device_node *np = pci_bus_to_OF_node(hose->bus);
503 struct pci_dn *pdn; 502 struct pci_dn *pdn;
@@ -512,7 +511,7 @@ static void __devinit pnv_pci_dma_fallback_setup(struct pci_controller *hose,
512 set_iommu_table_base(&pdev->dev, pdn->iommu_table); 511 set_iommu_table_base(&pdev->dev, pdn->iommu_table);
513} 512}
514 513
515static void __devinit pnv_pci_dma_dev_setup(struct pci_dev *pdev) 514static void pnv_pci_dma_dev_setup(struct pci_dev *pdev)
516{ 515{
517 struct pci_controller *hose = pci_bus_to_host(pdev->bus); 516 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
518 struct pnv_phb *phb = hose->private_data; 517 struct pnv_phb *phb = hose->private_data;
@@ -527,7 +526,7 @@ static void __devinit pnv_pci_dma_dev_setup(struct pci_dev *pdev)
527} 526}
528 527
529/* Fixup wrong class code in p7ioc root complex */ 528/* Fixup wrong class code in p7ioc root complex */
530static void __devinit pnv_p7ioc_rc_quirk(struct pci_dev *dev) 529static void pnv_p7ioc_rc_quirk(struct pci_dev *dev)
531{ 530{
532 dev->class = PCI_CLASS_BRIDGE_PCI << 8; 531 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
533} 532}
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index 7698b6e13c57..0bdc735db16f 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -62,7 +62,7 @@ static int pnv_smp_cpu_bootable(unsigned int nr)
62 return 1; 62 return 1;
63} 63}
64 64
65int __devinit pnv_smp_kick_cpu(int nr) 65int pnv_smp_kick_cpu(int nr)
66{ 66{
67 unsigned int pcpu = get_hard_smp_processor_id(nr); 67 unsigned int pcpu = get_hard_smp_processor_id(nr);
68 unsigned long start_here = __pa(*((unsigned long *) 68 unsigned long start_here = __pa(*((unsigned long *)
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 9b47ba7a5de7..bfccdc7cb85f 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -437,7 +437,7 @@ found_dev:
437 return 0; 437 return 0;
438} 438}
439 439
440int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type, 440int ps3_repository_find_devices(enum ps3_bus_type bus_type,
441 int (*callback)(const struct ps3_repository_device *repo)) 441 int (*callback)(const struct ps3_repository_device *repo))
442{ 442{
443 int result = 0; 443 int result = 0;
diff --git a/arch/powerpc/platforms/pseries/eeh_dev.c b/arch/powerpc/platforms/pseries/eeh_dev.c
index 66442341d3a6..1efa28f5fc54 100644
--- a/arch/powerpc/platforms/pseries/eeh_dev.c
+++ b/arch/powerpc/platforms/pseries/eeh_dev.c
@@ -49,7 +49,7 @@
49 * It will create EEH device according to the given OF node. The function 49 * It will create EEH device according to the given OF node. The function
50 * might be called by PCI emunation, DR, PHB hotplug. 50 * might be called by PCI emunation, DR, PHB hotplug.
51 */ 51 */
52void * __devinit eeh_dev_init(struct device_node *dn, void *data) 52void *eeh_dev_init(struct device_node *dn, void *data)
53{ 53{
54 struct pci_controller *phb = data; 54 struct pci_controller *phb = data;
55 struct eeh_dev *edev; 55 struct eeh_dev *edev;
@@ -77,7 +77,7 @@ void * __devinit eeh_dev_init(struct device_node *dn, void *data)
77 * Scan the PHB OF node and its child association, then create the 77 * Scan the PHB OF node and its child association, then create the
78 * EEH devices accordingly 78 * EEH devices accordingly
79 */ 79 */
80void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb) 80void eeh_dev_phb_init_dynamic(struct pci_controller *phb)
81{ 81{
82 struct device_node *dn = phb->dn; 82 struct device_node *dn = phb->dn;
83 83
diff --git a/arch/powerpc/platforms/pseries/eeh_pe.c b/arch/powerpc/platforms/pseries/eeh_pe.c
index d16c8ded1084..fe43d1aa2cf1 100644
--- a/arch/powerpc/platforms/pseries/eeh_pe.c
+++ b/arch/powerpc/platforms/pseries/eeh_pe.c
@@ -66,7 +66,7 @@ static struct eeh_pe *eeh_pe_alloc(struct pci_controller *phb, int type)
66 * The function should be called while the PHB is detected during 66 * The function should be called while the PHB is detected during
67 * system boot or PCI hotplug in order to create PHB PE. 67 * system boot or PCI hotplug in order to create PHB PE.
68 */ 68 */
69int __devinit eeh_phb_pe_create(struct pci_controller *phb) 69int eeh_phb_pe_create(struct pci_controller *phb)
70{ 70{
71 struct eeh_pe *pe; 71 struct eeh_pe *pe;
72 72
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index 261a577a3dd2..c91b22be9288 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -149,7 +149,7 @@ void pcibios_add_pci_devices(struct pci_bus * bus)
149} 149}
150EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); 150EXPORT_SYMBOL_GPL(pcibios_add_pci_devices);
151 151
152struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) 152struct pci_controller *init_phb_dynamic(struct device_node *dn)
153{ 153{
154 struct pci_controller *phb; 154 struct pci_controller *phb;
155 155
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 9fc0a4941908..80cd0be71e06 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -87,7 +87,7 @@ int smp_query_cpu_stopped(unsigned int pcpu)
87 * 0 - failure 87 * 0 - failure
88 * 1 - success 88 * 1 - success
89 */ 89 */
90static inline int __devinit smp_startup_cpu(unsigned int lcpu) 90static inline int smp_startup_cpu(unsigned int lcpu)
91{ 91{
92 int status; 92 int status;
93 unsigned long start_here = __pa((u32)*((unsigned long *) 93 unsigned long start_here = __pa((u32)*((unsigned long *)
@@ -133,7 +133,7 @@ out:
133 return 1; 133 return 1;
134} 134}
135 135
136static void __devinit smp_xics_setup_cpu(int cpu) 136static void smp_xics_setup_cpu(int cpu)
137{ 137{
138 if (cpu != boot_cpuid) 138 if (cpu != boot_cpuid)
139 xics_setup_cpu(); 139 xics_setup_cpu();
@@ -148,7 +148,7 @@ static void __devinit smp_xics_setup_cpu(int cpu)
148#endif 148#endif
149} 149}
150 150
151static int __devinit smp_pSeries_kick_cpu(int nr) 151static int smp_pSeries_kick_cpu(int nr)
152{ 152{
153 BUG_ON(nr < 0 || nr >= NR_CPUS); 153 BUG_ON(nr < 0 || nr >= NR_CPUS);
154 154
diff --git a/arch/powerpc/platforms/wsp/scom_smp.c b/arch/powerpc/platforms/wsp/scom_smp.c
index 141e78032097..b56b70aeb497 100644
--- a/arch/powerpc/platforms/wsp/scom_smp.c
+++ b/arch/powerpc/platforms/wsp/scom_smp.c
@@ -337,8 +337,7 @@ scom_fail:
337 return rc; 337 return rc;
338} 338}
339 339
340int __devinit a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, 340int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, struct device_node *np)
341 struct device_node *np)
342{ 341{
343 u64 init_iar, init_msr, init_ccr2; 342 u64 init_iar, init_msr, init_ccr2;
344 unsigned long start_here; 343 unsigned long start_here;
diff --git a/arch/powerpc/platforms/wsp/smp.c b/arch/powerpc/platforms/wsp/smp.c
index 0ba103ae83a5..332a18b81403 100644
--- a/arch/powerpc/platforms/wsp/smp.c
+++ b/arch/powerpc/platforms/wsp/smp.c
@@ -23,7 +23,7 @@
23#include "ics.h" 23#include "ics.h"
24#include "wsp.h" 24#include "wsp.h"
25 25
26static void __devinit smp_a2_setup_cpu(int cpu) 26static void smp_a2_setup_cpu(int cpu)
27{ 27{
28 doorbell_setup_this_cpu(); 28 doorbell_setup_this_cpu();
29 29
@@ -31,7 +31,7 @@ static void __devinit smp_a2_setup_cpu(int cpu)
31 xics_setup_cpu(); 31 xics_setup_cpu();
32} 32}
33 33
34int __devinit smp_a2_kick_cpu(int nr) 34int smp_a2_kick_cpu(int nr)
35{ 35{
36 const char *enable_method; 36 const char *enable_method;
37 struct device_node *np; 37 struct device_node *np;
diff --git a/arch/powerpc/platforms/wsp/wsp.h b/arch/powerpc/platforms/wsp/wsp.h
index 10c1d1fff362..62ef21afb89a 100644
--- a/arch/powerpc/platforms/wsp/wsp.h
+++ b/arch/powerpc/platforms/wsp/wsp.h
@@ -18,7 +18,7 @@ extern void a2_setup_smp(void);
18extern int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, 18extern int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx,
19 struct device_node *np); 19 struct device_node *np);
20extern int smp_a2_cpu_bootable(unsigned int nr); 20extern int smp_a2_cpu_bootable(unsigned int nr);
21extern int __devinit smp_a2_kick_cpu(int nr); 21extern int smp_a2_kick_cpu(int nr);
22 22
23extern void opb_pic_init(void); 23extern void opb_pic_init(void);
24 24
diff --git a/arch/powerpc/platforms/wsp/wsp_pci.c b/arch/powerpc/platforms/wsp/wsp_pci.c
index 1526551f9fe6..8e22f561d171 100644
--- a/arch/powerpc/platforms/wsp/wsp_pci.c
+++ b/arch/powerpc/platforms/wsp/wsp_pci.c
@@ -402,7 +402,7 @@ static struct wsp_dma_table *wsp_pci_create_dma32_table(struct wsp_phb *phb,
402 return ERR_PTR(-ENOMEM); 402 return ERR_PTR(-ENOMEM);
403} 403}
404 404
405static void __devinit wsp_pci_dma_dev_setup(struct pci_dev *pdev) 405static void wsp_pci_dma_dev_setup(struct pci_dev *pdev)
406{ 406{
407 struct dev_archdata *archdata = &pdev->dev.archdata; 407 struct dev_archdata *archdata = &pdev->dev.archdata;
408 struct pci_controller *hose = pci_bus_to_host(pdev->bus); 408 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index b3fbb271be87..d9130630f7ef 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -30,7 +30,7 @@
30#define DRIVER_NAME "bestcomm-core" 30#define DRIVER_NAME "bestcomm-core"
31 31
32/* MPC5200 device tree match tables */ 32/* MPC5200 device tree match tables */
33static struct of_device_id mpc52xx_sram_ids[] __devinitdata = { 33static struct of_device_id mpc52xx_sram_ids[] = {
34 { .compatible = "fsl,mpc5200-sram", }, 34 { .compatible = "fsl,mpc5200-sram", },
35 { .compatible = "mpc5200-sram", }, 35 { .compatible = "mpc5200-sram", },
36 {} 36 {}
@@ -273,8 +273,7 @@ static u32 fdt_ops[] = {
273}; 273};
274 274
275 275
276static int __devinit 276static int bcom_engine_init(void)
277bcom_engine_init(void)
278{ 277{
279 int task; 278 int task;
280 phys_addr_t tdt_pa, ctx_pa, var_pa, fdt_pa; 279 phys_addr_t tdt_pa, ctx_pa, var_pa, fdt_pa;
@@ -365,7 +364,7 @@ bcom_engine_cleanup(void)
365/* OF platform driver */ 364/* OF platform driver */
366/* ======================================================================== */ 365/* ======================================================================== */
367 366
368static int __devinit mpc52xx_bcom_probe(struct platform_device *op) 367static int mpc52xx_bcom_probe(struct platform_device *op)
369{ 368{
370 struct device_node *ofn_sram; 369 struct device_node *ofn_sram;
371 struct resource res_bcom; 370 struct resource res_bcom;
diff --git a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
index d131c8a1cb15..8cf93f029e17 100644
--- a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
+++ b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
@@ -69,7 +69,7 @@ static int __init get_offset_from_cmdline(char *str)
69__setup("cache-sram-size=", get_size_from_cmdline); 69__setup("cache-sram-size=", get_size_from_cmdline);
70__setup("cache-sram-offset=", get_offset_from_cmdline); 70__setup("cache-sram-offset=", get_offset_from_cmdline);
71 71
72static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev) 72static int mpc85xx_l2ctlr_of_probe(struct platform_device *dev)
73{ 73{
74 long rval; 74 long rval;
75 unsigned int rem; 75 unsigned int rem;
@@ -160,7 +160,7 @@ static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev)
160 return 0; 160 return 0;
161} 161}
162 162
163static int __devexit mpc85xx_l2ctlr_of_remove(struct platform_device *dev) 163static int mpc85xx_l2ctlr_of_remove(struct platform_device *dev)
164{ 164{
165 BUG_ON(!l2ctlr); 165 BUG_ON(!l2ctlr);
166 166
@@ -213,7 +213,7 @@ static struct platform_driver mpc85xx_l2ctlr_of_platform_driver = {
213 .of_match_table = mpc85xx_l2ctlr_of_match, 213 .of_match_table = mpc85xx_l2ctlr_of_match,
214 }, 214 },
215 .probe = mpc85xx_l2ctlr_of_probe, 215 .probe = mpc85xx_l2ctlr_of_probe,
216 .remove = __devexit_p(mpc85xx_l2ctlr_of_remove), 216 .remove = mpc85xx_l2ctlr_of_remove,
217}; 217};
218 218
219static __init int mpc85xx_l2ctlr_of_init(void) 219static __init int mpc85xx_l2ctlr_of_init(void)
diff --git a/arch/powerpc/sysdev/fsl_ifc.c b/arch/powerpc/sysdev/fsl_ifc.c
index 097cc9d2585b..2a36fd6a9583 100644
--- a/arch/powerpc/sysdev/fsl_ifc.c
+++ b/arch/powerpc/sysdev/fsl_ifc.c
@@ -73,7 +73,7 @@ int fsl_ifc_find(phys_addr_t addr_base)
73} 73}
74EXPORT_SYMBOL(fsl_ifc_find); 74EXPORT_SYMBOL(fsl_ifc_find);
75 75
76static int __devinit fsl_ifc_ctrl_init(struct fsl_ifc_ctrl *ctrl) 76static int fsl_ifc_ctrl_init(struct fsl_ifc_ctrl *ctrl)
77{ 77{
78 struct fsl_ifc_regs __iomem *ifc = ctrl->regs; 78 struct fsl_ifc_regs __iomem *ifc = ctrl->regs;
79 79
@@ -211,7 +211,7 @@ static irqreturn_t fsl_ifc_ctrl_irq(int irqno, void *data)
211 * resources for the NAND banks themselves are allocated 211 * resources for the NAND banks themselves are allocated
212 * in the chip probe function. 212 * in the chip probe function.
213*/ 213*/
214static int __devinit fsl_ifc_ctrl_probe(struct platform_device *dev) 214static int fsl_ifc_ctrl_probe(struct platform_device *dev)
215{ 215{
216 int ret = 0; 216 int ret = 0;
217 217
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c
index 483126d7b3c0..300be2d06a26 100644
--- a/arch/powerpc/sysdev/fsl_lbc.c
+++ b/arch/powerpc/sysdev/fsl_lbc.c
@@ -185,8 +185,8 @@ int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, u32 mar)
185} 185}
186EXPORT_SYMBOL(fsl_upm_run_pattern); 186EXPORT_SYMBOL(fsl_upm_run_pattern);
187 187
188static int __devinit fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl, 188static int fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl,
189 struct device_node *node) 189 struct device_node *node)
190{ 190{
191 struct fsl_lbc_regs __iomem *lbc = ctrl->regs; 191 struct fsl_lbc_regs __iomem *lbc = ctrl->regs;
192 192
@@ -273,7 +273,7 @@ static irqreturn_t fsl_lbc_ctrl_irq(int irqno, void *data)
273 * in the chip probe function. 273 * in the chip probe function.
274*/ 274*/
275 275
276static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev) 276static int fsl_lbc_ctrl_probe(struct platform_device *dev)
277{ 277{
278 int ret; 278 int ret;
279 279
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 63c5f04ea580..6e53d97abd3f 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -333,9 +333,8 @@ static int fsl_of_msi_remove(struct platform_device *ofdev)
333 return 0; 333 return 0;
334} 334}
335 335
336static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi, 336static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
337 struct platform_device *dev, 337 int offset, int irq_index)
338 int offset, int irq_index)
339{ 338{
340 struct fsl_msi_cascade_data *cascade_data = NULL; 339 struct fsl_msi_cascade_data *cascade_data = NULL;
341 int virt_msir; 340 int virt_msir;
@@ -363,7 +362,7 @@ static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi,
363} 362}
364 363
365static const struct of_device_id fsl_of_msi_ids[]; 364static const struct of_device_id fsl_of_msi_ids[];
366static int __devinit fsl_of_msi_probe(struct platform_device *dev) 365static int fsl_of_msi_probe(struct platform_device *dev)
367{ 366{
368 const struct of_device_id *match; 367 const struct of_device_id *match;
369 struct fsl_msi *msi; 368 struct fsl_msi *msi;
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 5ba325bff3a2..92a5915b1827 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -36,7 +36,7 @@
36 36
37static int fsl_pcie_bus_fixup, is_mpc83xx_pci; 37static int fsl_pcie_bus_fixup, is_mpc83xx_pci;
38 38
39static void __devinit quirk_fsl_pcie_header(struct pci_dev *dev) 39static void quirk_fsl_pcie_header(struct pci_dev *dev)
40{ 40{
41 u8 hdr_type; 41 u8 hdr_type;
42 42
@@ -871,7 +871,7 @@ void fsl_pci_assign_primary(void)
871 } 871 }
872} 872}
873 873
874static int __devinit fsl_pci_probe(struct platform_device *pdev) 874static int fsl_pci_probe(struct platform_device *pdev)
875{ 875{
876 int ret; 876 int ret;
877 struct device_node *node; 877 struct device_node *node;
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 5b6f556094dd..e2fb3171f41b 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -644,7 +644,7 @@ err_rio_regs:
644 644
645/* The probe function for RapidIO peer-to-peer network. 645/* The probe function for RapidIO peer-to-peer network.
646 */ 646 */
647static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev) 647static int fsl_of_rio_rpn_probe(struct platform_device *dev)
648{ 648{
649 printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", 649 printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n",
650 dev->dev.of_node->full_name); 650 dev->dev.of_node->full_name);
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 9c6e535daad2..3b2efd41abf2 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1864,7 +1864,7 @@ int __init smp_mpic_probe(void)
1864 return nr_cpus; 1864 return nr_cpus;
1865} 1865}
1866 1866
1867void __devinit smp_mpic_setup_cpu(int cpu) 1867void smp_mpic_setup_cpu(int cpu)
1868{ 1868{
1869 mpic_setup_this_cpu(); 1869 mpic_setup_this_cpu();
1870} 1870}
diff --git a/arch/powerpc/sysdev/mpic_msgr.c b/arch/powerpc/sysdev/mpic_msgr.c
index e961f8c4a8f0..c75325865a85 100644
--- a/arch/powerpc/sysdev/mpic_msgr.c
+++ b/arch/powerpc/sysdev/mpic_msgr.c
@@ -160,7 +160,7 @@ static int mpic_msgr_block_number(struct device_node *node)
160 160
161/* The probe function for a single message register block. 161/* The probe function for a single message register block.
162 */ 162 */
163static __devinit int mpic_msgr_probe(struct platform_device *dev) 163static int mpic_msgr_probe(struct platform_device *dev)
164{ 164{
165 void __iomem *msgr_block_addr; 165 void __iomem *msgr_block_addr;
166 int block_number; 166 int block_number;
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index 364b14d4754b..330d56613c5a 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -104,7 +104,7 @@ subsys_initcall(mv64x60_sysfs_init);
104 104
105#endif /* CONFIG_SYSFS */ 105#endif /* CONFIG_SYSFS */
106 106
107static void __devinit mv64x60_pci_fixup_early(struct pci_dev *dev) 107static void mv64x60_pci_fixup_early(struct pci_dev *dev)
108{ 108{
109 /* 109 /*
110 * Set the host bridge hdr_type to an invalid value so that 110 * Set the host bridge hdr_type to an invalid value so that
diff --git a/arch/powerpc/sysdev/ppc4xx_msi.c b/arch/powerpc/sysdev/ppc4xx_msi.c
index 82c6702dcbab..43948da837a7 100644
--- a/arch/powerpc/sysdev/ppc4xx_msi.c
+++ b/arch/powerpc/sysdev/ppc4xx_msi.c
@@ -220,7 +220,7 @@ static int ppc4xx_of_msi_remove(struct platform_device *dev)
220 return 0; 220 return 0;
221} 221}
222 222
223static int __devinit ppc4xx_msi_probe(struct platform_device *dev) 223static int ppc4xx_msi_probe(struct platform_device *dev)
224{ 224{
225 struct ppc4xx_msi *msi; 225 struct ppc4xx_msi *msi;
226 struct resource res; 226 struct resource res;
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index ea431e551c6b..0b45baa55438 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -623,10 +623,9 @@ static struct sclp_cpu_info *smp_get_cpu_info(void)
623 return info; 623 return info;
624} 624}
625 625
626static int __devinit smp_add_present_cpu(int cpu); 626static int smp_add_present_cpu(int cpu);
627 627
628static int __devinit __smp_rescan_cpus(struct sclp_cpu_info *info, 628static int __smp_rescan_cpus(struct sclp_cpu_info *info, int sysfs_add)
629 int sysfs_add)
630{ 629{
631 struct pcpu *pcpu; 630 struct pcpu *pcpu;
632 cpumask_t avail; 631 cpumask_t avail;
@@ -986,7 +985,7 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
986 return notifier_from_errno(err); 985 return notifier_from_errno(err);
987} 986}
988 987
989static int __devinit smp_add_present_cpu(int cpu) 988static int smp_add_present_cpu(int cpu)
990{ 989{
991 struct cpu *c = &pcpu_devices[cpu].cpu; 990 struct cpu *c = &pcpu_devices[cpu].cpu;
992 struct device *s = &c->dev; 991 struct device *s = &c->dev;
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 8fa416b8775f..ff49427e9941 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -385,7 +385,7 @@ unsigned int probe_irq_mask(unsigned long val)
385} 385}
386EXPORT_SYMBOL_GPL(probe_irq_mask); 386EXPORT_SYMBOL_GPL(probe_irq_mask);
387 387
388void __devinit pcibios_fixup_bus(struct pci_bus *bus) 388void pcibios_fixup_bus(struct pci_bus *bus)
389{ 389{
390} 390}
391 391
diff --git a/arch/score/mm/cache.c b/arch/score/mm/cache.c
index b25e95743600..f85ec1a7c88e 100644
--- a/arch/score/mm/cache.c
+++ b/arch/score/mm/cache.c
@@ -113,7 +113,7 @@ static inline void setup_protection_map(void)
113 protection_map[15] = PAGE_SHARED; 113 protection_map[15] = PAGE_SHARED;
114} 114}
115 115
116void __devinit cpu_cache_init(void) 116void cpu_cache_init(void)
117{ 117{
118 setup_protection_map(); 118 setup_protection_map();
119} 119}
diff --git a/arch/sh/drivers/pci/fixups-dreamcast.c b/arch/sh/drivers/pci/fixups-dreamcast.c
index a5fe1b54c952..d6cde700e316 100644
--- a/arch/sh/drivers/pci/fixups-dreamcast.c
+++ b/arch/sh/drivers/pci/fixups-dreamcast.c
@@ -28,7 +28,7 @@
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <mach/pci.h> 29#include <mach/pci.h>
30 30
31static void __devinit gapspci_fixup_resources(struct pci_dev *dev) 31static void gapspci_fixup_resources(struct pci_dev *dev)
32{ 32{
33 struct pci_channel *p = dev->sysdata; 33 struct pci_channel *p = dev->sysdata;
34 34
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 81e5dafed3e4..102f5d58b037 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -32,7 +32,7 @@ static struct pci_channel *hose_head, **hose_tail = &hose_head;
32 32
33static int pci_initialized; 33static int pci_initialized;
34 34
35static void __devinit pcibios_scanbus(struct pci_channel *hose) 35static void pcibios_scanbus(struct pci_channel *hose)
36{ 36{
37 static int next_busno; 37 static int next_busno;
38 static int need_domain_info; 38 static int need_domain_info;
@@ -82,7 +82,7 @@ static void __devinit pcibios_scanbus(struct pci_channel *hose)
82DEFINE_RAW_SPINLOCK(pci_config_lock); 82DEFINE_RAW_SPINLOCK(pci_config_lock);
83static DEFINE_MUTEX(pci_scan_mutex); 83static DEFINE_MUTEX(pci_scan_mutex);
84 84
85int __devinit register_pci_controller(struct pci_channel *hose) 85int register_pci_controller(struct pci_channel *hose)
86{ 86{
87 int i; 87 int i;
88 88
@@ -156,7 +156,7 @@ subsys_initcall(pcibios_init);
156 * Called after each bus is probed, but before its children 156 * Called after each bus is probed, but before its children
157 * are examined. 157 * are examined.
158 */ 158 */
159void __devinit pcibios_fixup_bus(struct pci_bus *bus) 159void pcibios_fixup_bus(struct pci_bus *bus)
160{ 160{
161} 161}
162 162
diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c
index 9e702f2f8045..c2c85f6cd738 100644
--- a/arch/sh/drivers/pci/pcie-sh7786.c
+++ b/arch/sh/drivers/pci/pcie-sh7786.c
@@ -132,7 +132,7 @@ static struct clk fixed_pciexclkp = {
132 .rate = 100000000, /* 100 MHz reference clock */ 132 .rate = 100000000, /* 100 MHz reference clock */
133}; 133};
134 134
135static void __devinit sh7786_pci_fixup(struct pci_dev *dev) 135static void sh7786_pci_fixup(struct pci_dev *dev)
136{ 136{
137 /* 137 /*
138 * Prevent enumeration of root complex resources. 138 * Prevent enumeration of root complex resources.
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h
index cb33608cc68f..c55291e5b83e 100644
--- a/arch/sparc/include/asm/parport.h
+++ b/arch/sparc/include/asm/parport.h
@@ -103,7 +103,7 @@ static inline unsigned int get_dma_residue(unsigned int dmanr)
103 return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); 103 return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info);
104} 104}
105 105
106static int __devinit ecpp_probe(struct platform_device *op) 106static int ecpp_probe(struct platform_device *op)
107{ 107{
108 unsigned long base = op->resource[0].start; 108 unsigned long base = op->resource[0].start;
109 unsigned long config = op->resource[1].start; 109 unsigned long config = op->resource[1].start;
@@ -192,7 +192,7 @@ out_err:
192 return err; 192 return err;
193} 193}
194 194
195static int __devexit ecpp_remove(struct platform_device *op) 195static int ecpp_remove(struct platform_device *op)
196{ 196{
197 struct parport *p = dev_get_drvdata(&op->dev); 197 struct parport *p = dev_get_drvdata(&op->dev);
198 int slot = p->dma; 198 int slot = p->dma;
@@ -242,7 +242,7 @@ static struct platform_driver ecpp_driver = {
242 .of_match_table = ecpp_match, 242 .of_match_table = ecpp_match,
243 }, 243 },
244 .probe = ecpp_probe, 244 .probe = ecpp_probe,
245 .remove = __devexit_p(ecpp_remove), 245 .remove = ecpp_remove,
246}; 246};
247 247
248static int parport_pc_find_nonpci_ports(int autoirq, int autodma) 248static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
diff --git a/arch/sparc/include/asm/timer_64.h b/arch/sparc/include/asm/timer_64.h
index ef3c3682debf..01197d8215c4 100644
--- a/arch/sparc/include/asm/timer_64.h
+++ b/arch/sparc/include/asm/timer_64.h
@@ -24,7 +24,7 @@ struct sparc64_tick_ops {
24extern struct sparc64_tick_ops *tick_ops; 24extern struct sparc64_tick_ops *tick_ops;
25 25
26extern unsigned long sparc64_get_clock_tick(unsigned int cpu); 26extern unsigned long sparc64_get_clock_tick(unsigned int cpu);
27extern void __devinit setup_sparc64_timer(void); 27extern void setup_sparc64_timer(void);
28extern void __init time_init(void); 28extern void __init time_init(void);
29 29
30#endif /* _SPARC64_TIMER_H */ 30#endif /* _SPARC64_TIMER_H */
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c
index 812e10bbb0b3..348fa1aeabce 100644
--- a/arch/sparc/kernel/apc.c
+++ b/arch/sparc/kernel/apc.c
@@ -31,7 +31,7 @@
31#define APC_DEVNAME "apc" 31#define APC_DEVNAME "apc"
32 32
33static u8 __iomem *regs; 33static u8 __iomem *regs;
34static int apc_no_idle __devinitdata = 0; 34static int apc_no_idle = 0;
35 35
36#define apc_readb(offs) (sbus_readb(regs+offs)) 36#define apc_readb(offs) (sbus_readb(regs+offs))
37#define apc_writeb(val, offs) (sbus_writeb(val, regs+offs)) 37#define apc_writeb(val, offs) (sbus_writeb(val, regs+offs))
@@ -138,7 +138,7 @@ static const struct file_operations apc_fops = {
138 138
139static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; 139static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops };
140 140
141static int __devinit apc_probe(struct platform_device *op) 141static int apc_probe(struct platform_device *op)
142{ 142{
143 int err; 143 int err;
144 144
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c
index 773091ac71a3..86e55778e4af 100644
--- a/arch/sparc/kernel/auxio_64.c
+++ b/arch/sparc/kernel/auxio_64.c
@@ -102,7 +102,7 @@ static const struct of_device_id auxio_match[] = {
102 102
103MODULE_DEVICE_TABLE(of, auxio_match); 103MODULE_DEVICE_TABLE(of, auxio_match);
104 104
105static int __devinit auxio_probe(struct platform_device *dev) 105static int auxio_probe(struct platform_device *dev)
106{ 106{
107 struct device_node *dp = dev->dev.of_node; 107 struct device_node *dp = dev->dev.of_node;
108 unsigned long size; 108 unsigned long size;
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
index 9708851a8b9f..052b5a44318f 100644
--- a/arch/sparc/kernel/central.c
+++ b/arch/sparc/kernel/central.c
@@ -33,7 +33,7 @@ struct fhc {
33 struct platform_device leds_pdev; 33 struct platform_device leds_pdev;
34}; 34};
35 35
36static int __devinit clock_board_calc_nslots(struct clock_board *p) 36static int clock_board_calc_nslots(struct clock_board *p)
37{ 37{
38 u8 reg = upa_readb(p->clock_regs + CLOCK_STAT1) & 0xc0; 38 u8 reg = upa_readb(p->clock_regs + CLOCK_STAT1) & 0xc0;
39 39
@@ -60,7 +60,7 @@ static int __devinit clock_board_calc_nslots(struct clock_board *p)
60 } 60 }
61} 61}
62 62
63static int __devinit clock_board_probe(struct platform_device *op) 63static int clock_board_probe(struct platform_device *op)
64{ 64{
65 struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL); 65 struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL);
66 int err = -ENOMEM; 66 int err = -ENOMEM;
@@ -157,7 +157,7 @@ static struct platform_driver clock_board_driver = {
157 }, 157 },
158}; 158};
159 159
160static int __devinit fhc_probe(struct platform_device *op) 160static int fhc_probe(struct platform_device *op)
161{ 161{
162 struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL); 162 struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL);
163 int err = -ENOMEM; 163 int err = -ENOMEM;
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c
index 5f450260981d..dbb210d74e21 100644
--- a/arch/sparc/kernel/chmc.c
+++ b/arch/sparc/kernel/chmc.c
@@ -336,9 +336,9 @@ static int jbusmc_print_dimm(int syndrome_code,
336 return 0; 336 return 0;
337} 337}
338 338
339static u64 __devinit jbusmc_dimm_group_size(u64 base, 339static u64 jbusmc_dimm_group_size(u64 base,
340 const struct linux_prom64_registers *mem_regs, 340 const struct linux_prom64_registers *mem_regs,
341 int num_mem_regs) 341 int num_mem_regs)
342{ 342{
343 u64 max = base + (8UL * 1024 * 1024 * 1024); 343 u64 max = base + (8UL * 1024 * 1024 * 1024);
344 u64 max_seen = base; 344 u64 max_seen = base;
@@ -363,10 +363,10 @@ static u64 __devinit jbusmc_dimm_group_size(u64 base,
363 return max_seen - base; 363 return max_seen - base;
364} 364}
365 365
366static void __devinit jbusmc_construct_one_dimm_group(struct jbusmc *p, 366static void jbusmc_construct_one_dimm_group(struct jbusmc *p,
367 unsigned long index, 367 unsigned long index,
368 const struct linux_prom64_registers *mem_regs, 368 const struct linux_prom64_registers *mem_regs,
369 int num_mem_regs) 369 int num_mem_regs)
370{ 370{
371 struct jbusmc_dimm_group *dp = &p->dimm_groups[index]; 371 struct jbusmc_dimm_group *dp = &p->dimm_groups[index];
372 372
@@ -378,9 +378,9 @@ static void __devinit jbusmc_construct_one_dimm_group(struct jbusmc *p,
378 dp->size = jbusmc_dimm_group_size(dp->base_addr, mem_regs, num_mem_regs); 378 dp->size = jbusmc_dimm_group_size(dp->base_addr, mem_regs, num_mem_regs);
379} 379}
380 380
381static void __devinit jbusmc_construct_dimm_groups(struct jbusmc *p, 381static void jbusmc_construct_dimm_groups(struct jbusmc *p,
382 const struct linux_prom64_registers *mem_regs, 382 const struct linux_prom64_registers *mem_regs,
383 int num_mem_regs) 383 int num_mem_regs)
384{ 384{
385 if (p->mc_reg_1 & JB_MC_REG1_DIMM1_BANK0) { 385 if (p->mc_reg_1 & JB_MC_REG1_DIMM1_BANK0) {
386 jbusmc_construct_one_dimm_group(p, 0, mem_regs, num_mem_regs); 386 jbusmc_construct_one_dimm_group(p, 0, mem_regs, num_mem_regs);
@@ -392,7 +392,7 @@ static void __devinit jbusmc_construct_dimm_groups(struct jbusmc *p,
392 } 392 }
393} 393}
394 394
395static int __devinit jbusmc_probe(struct platform_device *op) 395static int jbusmc_probe(struct platform_device *op)
396{ 396{
397 const struct linux_prom64_registers *mem_regs; 397 const struct linux_prom64_registers *mem_regs;
398 struct device_node *mem_node; 398 struct device_node *mem_node;
@@ -689,7 +689,7 @@ static void chmc_fetch_decode_regs(struct chmc *p)
689 chmc_read_mcreg(p, CHMCTRL_DECODE4)); 689 chmc_read_mcreg(p, CHMCTRL_DECODE4));
690} 690}
691 691
692static int __devinit chmc_probe(struct platform_device *op) 692static int chmc_probe(struct platform_device *op)
693{ 693{
694 struct device_node *dp = op->dev.of_node; 694 struct device_node *dp = op->dev.of_node;
695 unsigned long ver; 695 unsigned long ver;
@@ -763,7 +763,7 @@ out_free:
763 goto out; 763 goto out;
764} 764}
765 765
766static int __devinit us3mc_probe(struct platform_device *op) 766static int us3mc_probe(struct platform_device *op)
767{ 767{
768 if (mc_type == MC_TYPE_SAFARI) 768 if (mc_type == MC_TYPE_SAFARI)
769 return chmc_probe(op); 769 return chmc_probe(op);
@@ -772,21 +772,21 @@ static int __devinit us3mc_probe(struct platform_device *op)
772 return -ENODEV; 772 return -ENODEV;
773} 773}
774 774
775static void __devexit chmc_destroy(struct platform_device *op, struct chmc *p) 775static void chmc_destroy(struct platform_device *op, struct chmc *p)
776{ 776{
777 list_del(&p->list); 777 list_del(&p->list);
778 of_iounmap(&op->resource[0], p->regs, 0x48); 778 of_iounmap(&op->resource[0], p->regs, 0x48);
779 kfree(p); 779 kfree(p);
780} 780}
781 781
782static void __devexit jbusmc_destroy(struct platform_device *op, struct jbusmc *p) 782static void jbusmc_destroy(struct platform_device *op, struct jbusmc *p)
783{ 783{
784 mc_list_del(&p->list); 784 mc_list_del(&p->list);
785 of_iounmap(&op->resource[0], p->regs, JBUSMC_REGS_SIZE); 785 of_iounmap(&op->resource[0], p->regs, JBUSMC_REGS_SIZE);
786 kfree(p); 786 kfree(p);
787} 787}
788 788
789static int __devexit us3mc_remove(struct platform_device *op) 789static int us3mc_remove(struct platform_device *op)
790{ 790{
791 void *p = dev_get_drvdata(&op->dev); 791 void *p = dev_get_drvdata(&op->dev);
792 792
@@ -814,7 +814,7 @@ static struct platform_driver us3mc_driver = {
814 .of_match_table = us3mc_match, 814 .of_match_table = us3mc_match,
815 }, 815 },
816 .probe = us3mc_probe, 816 .probe = us3mc_probe,
817 .remove = __devexit_p(us3mc_remove), 817 .remove = us3mc_remove,
818}; 818};
819 819
820static inline bool us3mc_platform(void) 820static inline bool us3mc_platform(void)
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index f09257c86107..75bb608c423e 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -29,7 +29,7 @@
29#define DRV_MODULE_VERSION "1.0" 29#define DRV_MODULE_VERSION "1.0"
30#define DRV_MODULE_RELDATE "Jul 11, 2007" 30#define DRV_MODULE_RELDATE "Jul 11, 2007"
31 31
32static char version[] __devinitdata = 32static char version[] =
33 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 33 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
34MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); 34MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
35MODULE_DESCRIPTION("Sun LDOM domain services driver"); 35MODULE_DESCRIPTION("Sun LDOM domain services driver");
@@ -1146,8 +1146,7 @@ static void ds_event(void *arg, int event)
1146 spin_unlock_irqrestore(&ds_lock, flags); 1146 spin_unlock_irqrestore(&ds_lock, flags);
1147} 1147}
1148 1148
1149static int __devinit ds_probe(struct vio_dev *vdev, 1149static int ds_probe(struct vio_dev *vdev, const struct vio_device_id *id)
1150 const struct vio_device_id *id)
1151{ 1150{
1152 static int ds_version_printed; 1151 static int ds_version_printed;
1153 struct ldc_channel_config ds_cfg = { 1152 struct ldc_channel_config ds_cfg = {
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index 81d92fc9983b..9fcc6b4e93b3 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -27,7 +27,7 @@
27#define DRV_MODULE_VERSION "1.1" 27#define DRV_MODULE_VERSION "1.1"
28#define DRV_MODULE_RELDATE "July 22, 2008" 28#define DRV_MODULE_RELDATE "July 22, 2008"
29 29
30static char version[] __devinitdata = 30static char version[] =
31 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 31 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
32#define LDC_PACKET_SIZE 64 32#define LDC_PACKET_SIZE 64
33 33
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c
index fc0521161568..852dc8430528 100644
--- a/arch/sparc/kernel/leon_pci.c
+++ b/arch/sparc/kernel/leon_pci.c
@@ -43,7 +43,7 @@ void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info)
43 } 43 }
44} 44}
45 45
46void __devinit pcibios_fixup_bus(struct pci_bus *pbus) 46void pcibios_fixup_bus(struct pci_bus *pbus)
47{ 47{
48 struct pci_dev *dev; 48 struct pci_dev *dev;
49 int i, has_io, has_mem; 49 int i, has_io, has_mem;
diff --git a/arch/sparc/kernel/leon_pci_grpci2.c b/arch/sparc/kernel/leon_pci_grpci2.c
index b1bc38853a3d..fc4320886a3a 100644
--- a/arch/sparc/kernel/leon_pci_grpci2.c
+++ b/arch/sparc/kernel/leon_pci_grpci2.c
@@ -668,7 +668,7 @@ static irqreturn_t grpci2_err_interrupt(int irq, void *arg)
668 return IRQ_HANDLED; 668 return IRQ_HANDLED;
669} 669}
670 670
671static int __devinit grpci2_of_probe(struct platform_device *ofdev) 671static int grpci2_of_probe(struct platform_device *ofdev)
672{ 672{
673 struct grpci2_regs *regs; 673 struct grpci2_regs *regs;
674 struct grpci2_priv *priv; 674 struct grpci2_priv *priv;
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 75b31bcdeadf..04bacce76fe6 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -356,7 +356,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
356 return dev; 356 return dev;
357} 357}
358 358
359static void __devinit apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p) 359static void apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p)
360{ 360{
361 u32 idx, first, last; 361 u32 idx, first, last;
362 362
@@ -378,9 +378,8 @@ static void __devinit apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p)
378/* Cook up fake bus resources for SUNW,simba PCI bridges which lack 378/* Cook up fake bus resources for SUNW,simba PCI bridges which lack
379 * a proper 'ranges' property. 379 * a proper 'ranges' property.
380 */ 380 */
381static void __devinit apb_fake_ranges(struct pci_dev *dev, 381static void apb_fake_ranges(struct pci_dev *dev, struct pci_bus *bus,
382 struct pci_bus *bus, 382 struct pci_pbm_info *pbm)
383 struct pci_pbm_info *pbm)
384{ 383{
385 struct pci_bus_region region; 384 struct pci_bus_region region;
386 struct resource *res; 385 struct resource *res;
@@ -404,15 +403,13 @@ static void __devinit apb_fake_ranges(struct pci_dev *dev,
404 pcibios_bus_to_resource(dev, res, &region); 403 pcibios_bus_to_resource(dev, res, &region);
405} 404}
406 405
407static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, 406static void pci_of_scan_bus(struct pci_pbm_info *pbm, struct device_node *node,
408 struct device_node *node, 407 struct pci_bus *bus);
409 struct pci_bus *bus);
410 408
411#define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1]) 409#define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1])
412 410
413static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, 411static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
414 struct device_node *node, 412 struct device_node *node, struct pci_dev *dev)
415 struct pci_dev *dev)
416{ 413{
417 struct pci_bus *bus; 414 struct pci_bus *bus;
418 const u32 *busrange, *ranges; 415 const u32 *busrange, *ranges;
@@ -503,9 +500,8 @@ after_ranges:
503 pci_of_scan_bus(pbm, node, bus); 500 pci_of_scan_bus(pbm, node, bus);
504} 501}
505 502
506static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, 503static void pci_of_scan_bus(struct pci_pbm_info *pbm, struct device_node *node,
507 struct device_node *node, 504 struct pci_bus *bus)
508 struct pci_bus *bus)
509{ 505{
510 struct device_node *child; 506 struct device_node *child;
511 const u32 *reg; 507 const u32 *reg;
@@ -564,7 +560,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char *
564 560
565static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL); 561static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL);
566 562
567static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus) 563static void pci_bus_register_of_sysfs(struct pci_bus *bus)
568{ 564{
569 struct pci_dev *dev; 565 struct pci_dev *dev;
570 struct pci_bus *child_bus; 566 struct pci_bus *child_bus;
@@ -585,8 +581,8 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
585 pci_bus_register_of_sysfs(child_bus); 581 pci_bus_register_of_sysfs(child_bus);
586} 582}
587 583
588struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, 584struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
589 struct device *parent) 585 struct device *parent)
590{ 586{
591 LIST_HEAD(resources); 587 LIST_HEAD(resources);
592 struct device_node *node = pbm->op->dev.of_node; 588 struct device_node *node = pbm->op->dev.of_node;
@@ -618,7 +614,7 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
618 return bus; 614 return bus;
619} 615}
620 616
621void __devinit pcibios_fixup_bus(struct pci_bus *pbus) 617void pcibios_fixup_bus(struct pci_bus *pbus)
622{ 618{
623} 619}
624 620
@@ -949,8 +945,7 @@ static int __init pcibios_init(void)
949subsys_initcall(pcibios_init); 945subsys_initcall(pcibios_init);
950 946
951#ifdef CONFIG_SYSFS 947#ifdef CONFIG_SYSFS
952static void __devinit pci_bus_slot_names(struct device_node *node, 948static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus)
953 struct pci_bus *bus)
954{ 949{
955 const struct pci_slot_names { 950 const struct pci_slot_names {
956 u32 slot_mask; 951 u32 slot_mask;
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c
index 188f935276fd..e60fc6a67e9b 100644
--- a/arch/sparc/kernel/pci_fire.c
+++ b/arch/sparc/kernel/pci_fire.c
@@ -408,8 +408,8 @@ static void pci_fire_hw_init(struct pci_pbm_info *pbm)
408 upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_PEC_IENAB); 408 upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_PEC_IENAB);
409} 409}
410 410
411static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, 411static int pci_fire_pbm_init(struct pci_pbm_info *pbm,
412 struct platform_device *op, u32 portid) 412 struct platform_device *op, u32 portid)
413{ 413{
414 const struct linux_prom64_registers *regs; 414 const struct linux_prom64_registers *regs;
415 struct device_node *dp = op->dev.of_node; 415 struct device_node *dp = op->dev.of_node;
@@ -454,7 +454,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm,
454 return 0; 454 return 0;
455} 455}
456 456
457static int __devinit fire_probe(struct platform_device *op) 457static int fire_probe(struct platform_device *op)
458{ 458{
459 struct device_node *dp = op->dev.of_node; 459 struct device_node *dp = op->dev.of_node;
460 struct pci_pbm_info *pbm; 460 struct pci_pbm_info *pbm;
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c
index f4d29e15ce71..b85238289717 100644
--- a/arch/sparc/kernel/pci_psycho.c
+++ b/arch/sparc/kernel/pci_psycho.c
@@ -366,8 +366,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm)
366 pci_config_write8(addr, 64); 366 pci_config_write8(addr, 64);
367} 367}
368 368
369static void __devinit psycho_scan_bus(struct pci_pbm_info *pbm, 369static void psycho_scan_bus(struct pci_pbm_info *pbm, struct device *parent)
370 struct device *parent)
371{ 370{
372 pbm_config_busmastering(pbm); 371 pbm_config_busmastering(pbm);
373 pbm->is_66mhz_capable = 0; 372 pbm->is_66mhz_capable = 0;
@@ -483,15 +482,15 @@ static void psycho_pbm_strbuf_init(struct pci_pbm_info *pbm,
483#define PSYCHO_MEMSPACE_B 0x180000000UL 482#define PSYCHO_MEMSPACE_B 0x180000000UL
484#define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL 483#define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL
485 484
486static void __devinit psycho_pbm_init(struct pci_pbm_info *pbm, 485static void psycho_pbm_init(struct pci_pbm_info *pbm,
487 struct platform_device *op, int is_pbm_a) 486 struct platform_device *op, int is_pbm_a)
488{ 487{
489 psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO); 488 psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO);
490 psycho_pbm_strbuf_init(pbm, is_pbm_a); 489 psycho_pbm_strbuf_init(pbm, is_pbm_a);
491 psycho_scan_bus(pbm, &op->dev); 490 psycho_scan_bus(pbm, &op->dev);
492} 491}
493 492
494static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid) 493static struct pci_pbm_info *psycho_find_sibling(u32 upa_portid)
495{ 494{
496 struct pci_pbm_info *pbm; 495 struct pci_pbm_info *pbm;
497 496
@@ -504,7 +503,7 @@ static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid)
504 503
505#define PSYCHO_CONFIGSPACE 0x001000000UL 504#define PSYCHO_CONFIGSPACE 0x001000000UL
506 505
507static int __devinit psycho_probe(struct platform_device *op) 506static int psycho_probe(struct platform_device *op)
508{ 507{
509 const struct linux_prom64_registers *pr_regs; 508 const struct linux_prom64_registers *pr_regs;
510 struct device_node *dp = op->dev.of_node; 509 struct device_node *dp = op->dev.of_node;
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c
index 3efaa4644d60..531186d7c9ab 100644
--- a/arch/sparc/kernel/pci_sabre.c
+++ b/arch/sparc/kernel/pci_sabre.c
@@ -403,8 +403,7 @@ static void apb_init(struct pci_bus *sabre_bus)
403 } 403 }
404} 404}
405 405
406static void __devinit sabre_scan_bus(struct pci_pbm_info *pbm, 406static void sabre_scan_bus(struct pci_pbm_info *pbm, struct device *parent)
407 struct device *parent)
408{ 407{
409 static int once; 408 static int once;
410 409
@@ -443,8 +442,7 @@ static void __devinit sabre_scan_bus(struct pci_pbm_info *pbm,
443 sabre_register_error_handlers(pbm); 442 sabre_register_error_handlers(pbm);
444} 443}
445 444
446static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm, 445static void sabre_pbm_init(struct pci_pbm_info *pbm, struct platform_device *op)
447 struct platform_device *op)
448{ 446{
449 psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE); 447 psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE);
450 pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR; 448 pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR;
@@ -454,7 +452,7 @@ static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm,
454} 452}
455 453
456static const struct of_device_id sabre_match[]; 454static const struct of_device_id sabre_match[];
457static int __devinit sabre_probe(struct platform_device *op) 455static int sabre_probe(struct platform_device *op)
458{ 456{
459 const struct of_device_id *match; 457 const struct of_device_id *match;
460 const struct linux_prom64_registers *pr_regs; 458 const struct linux_prom64_registers *pr_regs;
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
index 13d4aa20b5a5..29e888158ae6 100644
--- a/arch/sparc/kernel/pci_schizo.c
+++ b/arch/sparc/kernel/pci_schizo.c
@@ -1064,8 +1064,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm)
1064 pci_config_write8(addr, 64); 1064 pci_config_write8(addr, 64);
1065} 1065}
1066 1066
1067static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm, 1067static void schizo_scan_bus(struct pci_pbm_info *pbm, struct device *parent)
1068 struct device *parent)
1069{ 1068{
1070 pbm_config_busmastering(pbm); 1069 pbm_config_busmastering(pbm);
1071 pbm->is_66mhz_capable = 1070 pbm->is_66mhz_capable =
@@ -1307,9 +1306,8 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm)
1307 } 1306 }
1308} 1307}
1309 1308
1310static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm, 1309static int schizo_pbm_init(struct pci_pbm_info *pbm, struct platform_device *op,
1311 struct platform_device *op, u32 portid, 1310 u32 portid, int chip_type)
1312 int chip_type)
1313{ 1311{
1314 const struct linux_prom64_registers *regs; 1312 const struct linux_prom64_registers *regs;
1315 struct device_node *dp = op->dev.of_node; 1313 struct device_node *dp = op->dev.of_node;
@@ -1400,8 +1398,7 @@ static inline int portid_compare(u32 x, u32 y, int chip_type)
1400 return (x == y); 1398 return (x == y);
1401} 1399}
1402 1400
1403static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid, 1401static struct pci_pbm_info *schizo_find_sibling(u32 portid, int chip_type)
1404 int chip_type)
1405{ 1402{
1406 struct pci_pbm_info *pbm; 1403 struct pci_pbm_info *pbm;
1407 1404
@@ -1412,7 +1409,7 @@ static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid,
1412 return NULL; 1409 return NULL;
1413} 1410}
1414 1411
1415static int __devinit __schizo_init(struct platform_device *op, unsigned long chip_type) 1412static int __schizo_init(struct platform_device *op, unsigned long chip_type)
1416{ 1413{
1417 struct device_node *dp = op->dev.of_node; 1414 struct device_node *dp = op->dev.of_node;
1418 struct pci_pbm_info *pbm; 1415 struct pci_pbm_info *pbm;
@@ -1460,7 +1457,7 @@ out_err:
1460} 1457}
1461 1458
1462static const struct of_device_id schizo_match[]; 1459static const struct of_device_id schizo_match[];
1463static int __devinit schizo_probe(struct platform_device *op) 1460static int schizo_probe(struct platform_device *op)
1464{ 1461{
1465 const struct of_device_id *match; 1462 const struct of_device_id *match;
1466 1463
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index 051b69caeffd..d07f6b29aed8 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -536,8 +536,7 @@ static struct dma_map_ops sun4v_dma_ops = {
536 .unmap_sg = dma_4v_unmap_sg, 536 .unmap_sg = dma_4v_unmap_sg,
537}; 537};
538 538
539static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm, 539static void pci_sun4v_scan_bus(struct pci_pbm_info *pbm, struct device *parent)
540 struct device *parent)
541{ 540{
542 struct property *prop; 541 struct property *prop;
543 struct device_node *dp; 542 struct device_node *dp;
@@ -550,8 +549,8 @@ static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm,
550 /* XXX register error interrupt handlers XXX */ 549 /* XXX register error interrupt handlers XXX */
551} 550}
552 551
553static unsigned long __devinit probe_existing_entries(struct pci_pbm_info *pbm, 552static unsigned long probe_existing_entries(struct pci_pbm_info *pbm,
554 struct iommu *iommu) 553 struct iommu *iommu)
555{ 554{
556 struct iommu_arena *arena = &iommu->arena; 555 struct iommu_arena *arena = &iommu->arena;
557 unsigned long i, cnt = 0; 556 unsigned long i, cnt = 0;
@@ -578,7 +577,7 @@ static unsigned long __devinit probe_existing_entries(struct pci_pbm_info *pbm,
578 return cnt; 577 return cnt;
579} 578}
580 579
581static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm) 580static int pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
582{ 581{
583 static const u32 vdma_default[] = { 0x80000000, 0x80000000 }; 582 static const u32 vdma_default[] = { 0x80000000, 0x80000000 };
584 struct iommu *iommu = pbm->iommu; 583 struct iommu *iommu = pbm->iommu;
@@ -879,8 +878,8 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
879} 878}
880#endif /* !(CONFIG_PCI_MSI) */ 879#endif /* !(CONFIG_PCI_MSI) */
881 880
882static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, 881static int pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
883 struct platform_device *op, u32 devhandle) 882 struct platform_device *op, u32 devhandle)
884{ 883{
885 struct device_node *dp = op->dev.of_node; 884 struct device_node *dp = op->dev.of_node;
886 int err; 885 int err;
@@ -919,7 +918,7 @@ static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
919 return 0; 918 return 0;
920} 919}
921 920
922static int __devinit pci_sun4v_probe(struct platform_device *op) 921static int pci_sun4v_probe(struct platform_device *op)
923{ 922{
924 const struct linux_prom64_registers *regs; 923 const struct linux_prom64_registers *regs;
925 static int hvapi_negotiated = 0; 924 static int hvapi_negotiated = 0;
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index 521fdf1b20e5..09f4fdd8d808 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -439,8 +439,7 @@ int pcic_present(void)
439 return pcic0_up; 439 return pcic0_up;
440} 440}
441 441
442static int __devinit pdev_to_pnode(struct linux_pbm_info *pbm, 442static int pdev_to_pnode(struct linux_pbm_info *pbm, struct pci_dev *pdev)
443 struct pci_dev *pdev)
444{ 443{
445 struct linux_prom_pci_registers regs[PROMREG_MAX]; 444 struct linux_prom_pci_registers regs[PROMREG_MAX];
446 int err; 445 int err;
@@ -595,7 +594,7 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node)
595/* 594/*
596 * Normally called from {do_}pci_scan_bus... 595 * Normally called from {do_}pci_scan_bus...
597 */ 596 */
598void __devinit pcibios_fixup_bus(struct pci_bus *bus) 597void pcibios_fixup_bus(struct pci_bus *bus)
599{ 598{
600 struct pci_dev *dev; 599 struct pci_dev *dev;
601 int i, has_io, has_mem; 600 int i, has_io, has_mem;
diff --git a/arch/sparc/kernel/pmc.c b/arch/sparc/kernel/pmc.c
index 0e3202239ff5..dcbb62f63068 100644
--- a/arch/sparc/kernel/pmc.c
+++ b/arch/sparc/kernel/pmc.c
@@ -52,7 +52,7 @@ static void pmc_swift_idle(void)
52#endif 52#endif
53} 53}
54 54
55static int __devinit pmc_probe(struct platform_device *op) 55static int pmc_probe(struct platform_device *op)
56{ 56{
57 regs = of_ioremap(&op->resource[0], 0, 57 regs = of_ioremap(&op->resource[0], 0,
58 resource_size(&op->resource[0]), PMC_OBPNAME); 58 resource_size(&op->resource[0]), PMC_OBPNAME);
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c
index 0d39075063b2..4cb23c41553f 100644
--- a/arch/sparc/kernel/power.c
+++ b/arch/sparc/kernel/power.c
@@ -23,7 +23,7 @@ static irqreturn_t power_handler(int irq, void *dev_id)
23 return IRQ_HANDLED; 23 return IRQ_HANDLED;
24} 24}
25 25
26static int __devinit has_button_interrupt(unsigned int irq, struct device_node *dp) 26static int has_button_interrupt(unsigned int irq, struct device_node *dp)
27{ 27{
28 if (irq == 0xffffffff) 28 if (irq == 0xffffffff)
29 return 0; 29 return 0;
@@ -33,7 +33,7 @@ static int __devinit has_button_interrupt(unsigned int irq, struct device_node *
33 return 1; 33 return 1;
34} 34}
35 35
36static int __devinit power_probe(struct platform_device *op) 36static int power_probe(struct platform_device *op)
37{ 37{
38 struct resource *res = &op->resource[0]; 38 struct resource *res = &op->resource[0];
39 unsigned int irq = op->archdata.irqs[0]; 39 unsigned int irq = op->archdata.irqs[0];
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index d94b878577b7..537eb66abd06 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1180,7 +1180,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
1180{ 1180{
1181} 1181}
1182 1182
1183void __devinit smp_prepare_boot_cpu(void) 1183void smp_prepare_boot_cpu(void)
1184{ 1184{
1185} 1185}
1186 1186
@@ -1194,7 +1194,7 @@ void __init smp_setup_processor_id(void)
1194 xcall_deliver_impl = hypervisor_xcall_deliver; 1194 xcall_deliver_impl = hypervisor_xcall_deliver;
1195} 1195}
1196 1196
1197void __devinit smp_fill_in_sib_core_maps(void) 1197void smp_fill_in_sib_core_maps(void)
1198{ 1198{
1199 unsigned int i; 1199 unsigned int i;
1200 1200
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 953641549e82..c4c27b0f9063 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -278,7 +278,7 @@ static struct platform_device m48t59_rtc = {
278 }, 278 },
279}; 279};
280 280
281static int __devinit clock_probe(struct platform_device *op) 281static int clock_probe(struct platform_device *op)
282{ 282{
283 struct device_node *dp = op->dev.of_node; 283 struct device_node *dp = op->dev.of_node;
284 const char *model = of_get_property(dp, "model", NULL); 284 const char *model = of_get_property(dp, "model", NULL);
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c
index e861072b9c52..c3d82b5f54ca 100644
--- a/arch/sparc/kernel/time_64.c
+++ b/arch/sparc/kernel/time_64.c
@@ -419,7 +419,7 @@ static struct platform_device rtc_cmos_device = {
419 .num_resources = 1, 419 .num_resources = 1,
420}; 420};
421 421
422static int __devinit rtc_probe(struct platform_device *op) 422static int rtc_probe(struct platform_device *op)
423{ 423{
424 struct resource *r; 424 struct resource *r;
425 425
@@ -477,7 +477,7 @@ static struct platform_device rtc_bq4802_device = {
477 .num_resources = 1, 477 .num_resources = 1,
478}; 478};
479 479
480static int __devinit bq4802_probe(struct platform_device *op) 480static int bq4802_probe(struct platform_device *op)
481{ 481{
482 482
483 printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", 483 printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n",
@@ -534,7 +534,7 @@ static struct platform_device m48t59_rtc = {
534 }, 534 },
535}; 535};
536 536
537static int __devinit mostek_probe(struct platform_device *op) 537static int mostek_probe(struct platform_device *op)
538{ 538{
539 struct device_node *dp = op->dev.of_node; 539 struct device_node *dp = op->dev.of_node;
540 540
@@ -746,7 +746,7 @@ void __irq_entry timer_interrupt(int irq, struct pt_regs *regs)
746 set_irq_regs(old_regs); 746 set_irq_regs(old_regs);
747} 747}
748 748
749void __devinit setup_sparc64_timer(void) 749void setup_sparc64_timer(void)
750{ 750{
751 struct clock_event_device *sevt; 751 struct clock_event_device *sevt;
752 unsigned long pstate; 752 unsigned long pstate;
@@ -844,7 +844,7 @@ unsigned long long sched_clock(void)
844 >> SPARC64_NSEC_PER_CYC_SHIFT; 844 >> SPARC64_NSEC_PER_CYC_SHIFT;
845} 845}
846 846
847int __devinit read_current_timer(unsigned long *timer_val) 847int read_current_timer(unsigned long *timer_val)
848{ 848{
849 *timer_val = tick_ops->get_tick(); 849 *timer_val = tick_ops->get_tick();
850 return 0; 850 return 0;
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 85be1ca539b2..c3b72423c846 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -87,8 +87,8 @@ static unsigned long cpu_pgsz_mask;
87 87
88#define MAX_BANKS 32 88#define MAX_BANKS 32
89 89
90static struct linux_prom64_registers pavail[MAX_BANKS] __devinitdata; 90static struct linux_prom64_registers pavail[MAX_BANKS];
91static int pavail_ents __devinitdata; 91static int pavail_ents;
92 92
93static int cmp_p64(const void *a, const void *b) 93static int cmp_p64(const void *a, const void *b)
94{ 94{
@@ -1931,7 +1931,7 @@ void __init paging_init(void)
1931 printk("Booting Linux...\n"); 1931 printk("Booting Linux...\n");
1932} 1932}
1933 1933
1934int __devinit page_in_phys_avail(unsigned long paddr) 1934int page_in_phys_avail(unsigned long paddr)
1935{ 1935{
1936 int i; 1936 int i;
1937 1937
diff --git a/arch/tile/include/asm/pci.h b/arch/tile/include/asm/pci.h
index 302cdf71ceed..54a924208d3c 100644
--- a/arch/tile/include/asm/pci.h
+++ b/arch/tile/include/asm/pci.h
@@ -188,7 +188,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
188int __init tile_pci_init(void); 188int __init tile_pci_init(void);
189int __init pcibios_init(void); 189int __init pcibios_init(void);
190 190
191void __devinit pcibios_fixup_bus(struct pci_bus *bus); 191void pcibios_fixup_bus(struct pci_bus *bus);
192 192
193#define pci_domain_nr(bus) (((struct pci_controller *)(bus)->sysdata)->index) 193#define pci_domain_nr(bus) (((struct pci_controller *)(bus)->sysdata)->index)
194 194
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c
index aac1cd586966..67237d34c2e2 100644
--- a/arch/tile/kernel/pci.c
+++ b/arch/tile/kernel/pci.c
@@ -81,7 +81,7 @@ EXPORT_SYMBOL(pcibios_align_resource);
81 * controller_id is the controller number, config type is 0 or 1 for 81 * controller_id is the controller number, config type is 0 or 1 for
82 * config0 or config1 operations. 82 * config0 or config1 operations.
83 */ 83 */
84static int __devinit tile_pcie_open(int controller_id, int config_type) 84static int tile_pcie_open(int controller_id, int config_type)
85{ 85{
86 char filename[32]; 86 char filename[32];
87 int fd; 87 int fd;
@@ -97,8 +97,7 @@ static int __devinit tile_pcie_open(int controller_id, int config_type)
97/* 97/*
98 * Get the IRQ numbers from the HV and set up the handlers for them. 98 * Get the IRQ numbers from the HV and set up the handlers for them.
99 */ 99 */
100static int __devinit tile_init_irqs(int controller_id, 100static int tile_init_irqs(int controller_id, struct pci_controller *controller)
101 struct pci_controller *controller)
102{ 101{
103 char filename[32]; 102 char filename[32];
104 int fd; 103 int fd;
@@ -237,7 +236,7 @@ static int tile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
237} 236}
238 237
239 238
240static void __devinit fixup_read_and_payload_sizes(void) 239static void fixup_read_and_payload_sizes(void)
241{ 240{
242 struct pci_dev *dev = NULL; 241 struct pci_dev *dev = NULL;
243 int smallest_max_payload = 0x1; /* Tile maxes out at 256 bytes. */ 242 int smallest_max_payload = 0x1; /* Tile maxes out at 256 bytes. */
@@ -379,7 +378,7 @@ subsys_initcall(pcibios_init);
379/* 378/*
380 * No bus fixups needed. 379 * No bus fixups needed.
381 */ 380 */
382void __devinit pcibios_fixup_bus(struct pci_bus *bus) 381void pcibios_fixup_bus(struct pci_bus *bus)
383{ 382{
384 /* Nothing needs to be done. */ 383 /* Nothing needs to be done. */
385} 384}
@@ -458,11 +457,8 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
458 * specified bus & slot. 457 * specified bus & slot.
459 */ 458 */
460 459
461static int __devinit tile_cfg_read(struct pci_bus *bus, 460static int tile_cfg_read(struct pci_bus *bus, unsigned int devfn, int offset,
462 unsigned int devfn, 461 int size, u32 *val)
463 int offset,
464 int size,
465 u32 *val)
466{ 462{
467 struct pci_controller *controller = bus->sysdata; 463 struct pci_controller *controller = bus->sysdata;
468 int busnum = bus->number & 0xff; 464 int busnum = bus->number & 0xff;
@@ -504,11 +500,8 @@ static int __devinit tile_cfg_read(struct pci_bus *bus,
504 * See tile_cfg_read() for relevant comments. 500 * See tile_cfg_read() for relevant comments.
505 * Note that "val" is the value to write, not a pointer to that value. 501 * Note that "val" is the value to write, not a pointer to that value.
506 */ 502 */
507static int __devinit tile_cfg_write(struct pci_bus *bus, 503static int tile_cfg_write(struct pci_bus *bus, unsigned int devfn, int offset,
508 unsigned int devfn, 504 int size, u32 val)
509 int offset,
510 int size,
511 u32 val)
512{ 505{
513 struct pci_controller *controller = bus->sysdata; 506 struct pci_controller *controller = bus->sysdata;
514 int busnum = bus->number & 0xff; 507 int busnum = bus->number & 0xff;
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c
index 94810d4a6332..11425633b2d7 100644
--- a/arch/tile/kernel/pci_gx.c
+++ b/arch/tile/kernel/pci_gx.c
@@ -58,10 +58,10 @@
58#define TRACE_CFG_RD(...) 58#define TRACE_CFG_RD(...)
59#endif 59#endif
60 60
61static int __devinitdata pci_probe = 1; 61static int pci_probe = 1;
62 62
63/* Information on the PCIe RC ports configuration. */ 63/* Information on the PCIe RC ports configuration. */
64static int __devinitdata pcie_rc[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES]; 64static int pcie_rc[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES];
65 65
66/* 66/*
67 * On some platforms with one or more Gx endpoint ports, we need to 67 * On some platforms with one or more Gx endpoint ports, we need to
@@ -72,7 +72,7 @@ static int __devinitdata pcie_rc[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES];
72 * the delay in seconds. If the delay is not provided, the value 72 * the delay in seconds. If the delay is not provided, the value
73 * will be DEFAULT_RC_DELAY. 73 * will be DEFAULT_RC_DELAY.
74 */ 74 */
75static int __devinitdata rc_delay[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES]; 75static int rc_delay[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES];
76 76
77/* Default number of seconds that the PCIe RC port probe can be delayed. */ 77/* Default number of seconds that the PCIe RC port probe can be delayed. */
78#define DEFAULT_RC_DELAY 10 78#define DEFAULT_RC_DELAY 10
@@ -137,7 +137,7 @@ static int tile_irq_cpu(int irq)
137/* 137/*
138 * Open a file descriptor to the TRIO shim. 138 * Open a file descriptor to the TRIO shim.
139 */ 139 */
140static int __devinit tile_pcie_open(int trio_index) 140static int tile_pcie_open(int trio_index)
141{ 141{
142 gxio_trio_context_t *context = &trio_contexts[trio_index]; 142 gxio_trio_context_t *context = &trio_contexts[trio_index];
143 int ret; 143 int ret;
@@ -265,7 +265,7 @@ trio_handle_level_irq(unsigned int irq, struct irq_desc *desc)
265 * Create kernel irqs and set up the handlers for the legacy interrupts. 265 * Create kernel irqs and set up the handlers for the legacy interrupts.
266 * Also some minimum initialization for the MSI support. 266 * Also some minimum initialization for the MSI support.
267 */ 267 */
268static int __devinit tile_init_irqs(struct pci_controller *controller) 268static int tile_init_irqs(struct pci_controller *controller)
269{ 269{
270 int i; 270 int i;
271 int j; 271 int j;
@@ -459,8 +459,7 @@ static int tile_map_irq(const struct pci_dev *dev, u8 device, u8 pin)
459} 459}
460 460
461 461
462static void __devinit fixup_read_and_payload_sizes(struct pci_controller * 462static void fixup_read_and_payload_sizes(struct pci_controller *controller)
463 controller)
464{ 463{
465 gxio_trio_context_t *trio_context = controller->trio; 464 gxio_trio_context_t *trio_context = controller->trio;
466 struct pci_bus *root_bus = controller->root_bus; 465 struct pci_bus *root_bus = controller->root_bus;
@@ -541,7 +540,7 @@ static void __devinit fixup_read_and_payload_sizes(struct pci_controller *
541 } 540 }
542} 541}
543 542
544static int __devinit setup_pcie_rc_delay(char *str) 543static int setup_pcie_rc_delay(char *str)
545{ 544{
546 unsigned long delay = 0; 545 unsigned long delay = 0;
547 unsigned long trio_index; 546 unsigned long trio_index;
@@ -1016,7 +1015,7 @@ alloc_mem_map_failed:
1016subsys_initcall(pcibios_init); 1015subsys_initcall(pcibios_init);
1017 1016
1018/* Note: to be deleted after Linux 3.6 merge. */ 1017/* Note: to be deleted after Linux 3.6 merge. */
1019void __devinit pcibios_fixup_bus(struct pci_bus *bus) 1018void pcibios_fixup_bus(struct pci_bus *bus)
1020{ 1019{
1021} 1020}
1022 1021
@@ -1024,7 +1023,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
1024 * This can be called from the generic PCI layer, but doesn't need to 1023 * This can be called from the generic PCI layer, but doesn't need to
1025 * do anything. 1024 * do anything.
1026 */ 1025 */
1027char __devinit *pcibios_setup(char *str) 1026char *pcibios_setup(char *str)
1028{ 1027{
1029 if (!strcmp(str, "off")) { 1028 if (!strcmp(str, "off")) {
1030 pci_probe = 0; 1029 pci_probe = 0;
@@ -1143,11 +1142,8 @@ EXPORT_SYMBOL(pci_iounmap);
1143 * specified bus & device. 1142 * specified bus & device.
1144 */ 1143 */
1145 1144
1146static int __devinit tile_cfg_read(struct pci_bus *bus, 1145static int tile_cfg_read(struct pci_bus *bus, unsigned int devfn, int offset,
1147 unsigned int devfn, 1146 int size, u32 *val)
1148 int offset,
1149 int size,
1150 u32 *val)
1151{ 1147{
1152 struct pci_controller *controller = bus->sysdata; 1148 struct pci_controller *controller = bus->sysdata;
1153 gxio_trio_context_t *trio_context = controller->trio; 1149 gxio_trio_context_t *trio_context = controller->trio;
@@ -1271,11 +1267,8 @@ invalid_device:
1271 * See tile_cfg_read() for relevent comments. 1267 * See tile_cfg_read() for relevent comments.
1272 * Note that "val" is the value to write, not a pointer to that value. 1268 * Note that "val" is the value to write, not a pointer to that value.
1273 */ 1269 */
1274static int __devinit tile_cfg_write(struct pci_bus *bus, 1270static int tile_cfg_write(struct pci_bus *bus, unsigned int devfn, int offset,
1275 unsigned int devfn, 1271 int size, u32 val)
1276 int offset,
1277 int size,
1278 u32 val)
1279{ 1272{
1280 struct pci_controller *controller = bus->sysdata; 1273 struct pci_controller *controller = bus->sysdata;
1281 gxio_trio_context_t *trio_context = controller->trio; 1274 gxio_trio_context_t *trio_context = controller->trio;
diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c
index 7c4359240b81..ef69c0c82825 100644
--- a/arch/unicore32/kernel/pci.c
+++ b/arch/unicore32/kernel/pci.c
@@ -167,7 +167,7 @@ static inline int pdev_bad_for_parity(struct pci_dev *dev)
167 * pcibios_fixup_bus - Called after each bus is probed, 167 * pcibios_fixup_bus - Called after each bus is probed,
168 * but before its children are examined. 168 * but before its children are examined.
169 */ 169 */
170void __devinit pcibios_fixup_bus(struct pci_bus *bus) 170void pcibios_fixup_bus(struct pci_bus *bus)
171{ 171{
172 struct pci_dev *dev; 172 struct pci_dev *dev;
173 u16 features = PCI_COMMAND_SERR 173 u16 features = PCI_COMMAND_SERR
diff --git a/arch/x86/include/asm/parport.h b/arch/x86/include/asm/parport.h
index 3c4ffeb467e9..0d2d3b29118f 100644
--- a/arch/x86/include/asm/parport.h
+++ b/arch/x86/include/asm/parport.h
@@ -1,8 +1,8 @@
1#ifndef _ASM_X86_PARPORT_H 1#ifndef _ASM_X86_PARPORT_H
2#define _ASM_X86_PARPORT_H 2#define _ASM_X86_PARPORT_H
3 3
4static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); 4static int parport_pc_find_isa_ports(int autoirq, int autodma);
5static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) 5static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
6{ 6{
7 return parport_pc_find_isa_ports(autoirq, autodma); 7 return parport_pc_find_isa_ports(autoirq, autodma);
8} 8}
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index 73e8eeff22ee..747e5a38b590 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/arch/x86/include/asm/pci_x86.h
@@ -140,11 +140,10 @@ struct pci_mmcfg_region {
140 140
141extern int __init pci_mmcfg_arch_init(void); 141extern int __init pci_mmcfg_arch_init(void);
142extern void __init pci_mmcfg_arch_free(void); 142extern void __init pci_mmcfg_arch_free(void);
143extern int __devinit pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg); 143extern int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg);
144extern void pci_mmcfg_arch_unmap(struct pci_mmcfg_region *cfg); 144extern void pci_mmcfg_arch_unmap(struct pci_mmcfg_region *cfg);
145extern int __devinit pci_mmconfig_insert(struct device *dev, 145extern int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end,
146 u16 seg, u8 start, 146 phys_addr_t addr);
147 u8 end, phys_addr_t addr);
148extern int pci_mmconfig_delete(u16 seg, u8 start, u8 end); 147extern int pci_mmconfig_delete(u16 seg, u8 start, u8 end);
149extern struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus); 148extern struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus);
150 149
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 3cf3d97cce3a..b43200dbfe7e 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -2500,7 +2500,7 @@ static bool pcidrv_registered;
2500/* 2500/*
2501 * add a pci uncore device 2501 * add a pci uncore device
2502 */ 2502 */
2503static int __devinit uncore_pci_add(struct intel_uncore_type *type, struct pci_dev *pdev) 2503static int uncore_pci_add(struct intel_uncore_type *type, struct pci_dev *pdev)
2504{ 2504{
2505 struct intel_uncore_pmu *pmu; 2505 struct intel_uncore_pmu *pmu;
2506 struct intel_uncore_box *box; 2506 struct intel_uncore_box *box;
@@ -2571,8 +2571,8 @@ static void uncore_pci_remove(struct pci_dev *pdev)
2571 kfree(box); 2571 kfree(box);
2572} 2572}
2573 2573
2574static int __devinit uncore_pci_probe(struct pci_dev *pdev, 2574static int uncore_pci_probe(struct pci_dev *pdev,
2575 const struct pci_device_id *id) 2575 const struct pci_device_id *id)
2576{ 2576{
2577 struct intel_uncore_type *type; 2577 struct intel_uncore_type *type;
2578 2578
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index de2b7ad70273..0f5dec5c80e0 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -265,7 +265,7 @@ rootfs_initcall(pci_iommu_init);
265#ifdef CONFIG_PCI 265#ifdef CONFIG_PCI
266/* Many VIA bridges seem to corrupt data for DAC. Disable it here */ 266/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
267 267
268static __devinit void via_no_dac(struct pci_dev *dev) 268static void via_no_dac(struct pci_dev *dev)
269{ 269{
270 if (forbid_dac == 0) { 270 if (forbid_dac == 0) {
271 dev_info(&dev->dev, "disabling DAC on VIA PCI bridge\n"); 271 dev_info(&dev->dev, "disabling DAC on VIA PCI bridge\n");
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index 1b27de563561..26ee48a33dc4 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -8,7 +8,7 @@
8 8
9#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) 9#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI)
10 10
11static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) 11static void quirk_intel_irqbalance(struct pci_dev *dev)
12{ 12{
13 u8 config; 13 u8 config;
14 u16 word; 14 u16 word;
@@ -512,7 +512,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
512 512
513#if defined(CONFIG_PCI) && defined(CONFIG_NUMA) 513#if defined(CONFIG_PCI) && defined(CONFIG_NUMA)
514/* Set correct numa_node information for AMD NB functions */ 514/* Set correct numa_node information for AMD NB functions */
515static void __devinit quirk_amd_nb_node(struct pci_dev *dev) 515static void quirk_amd_nb_node(struct pci_dev *dev)
516{ 516{
517 struct pci_dev *nb_ht; 517 struct pci_dev *nb_ht;
518 unsigned int devfn; 518 unsigned int devfn;
diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c
index e395693abdb1..7c3bee636e2f 100644
--- a/arch/x86/lib/delay.c
+++ b/arch/x86/lib/delay.c
@@ -98,7 +98,7 @@ void use_tsc_delay(void)
98 delay_fn = delay_tsc; 98 delay_fn = delay_tsc;
99} 99}
100 100
101int __devinit read_current_timer(unsigned long *timer_val) 101int read_current_timer(unsigned long *timer_val)
102{ 102{
103 if (delay_fn == delay_tsc) { 103 if (delay_fn == delay_tsc) {
104 rdtscll(*timer_val); 104 rdtscll(*timer_val);
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 0c01261fe5a8..53ea60458e01 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -145,7 +145,7 @@ void __init pci_acpi_crs_quirks(void)
145} 145}
146 146
147#ifdef CONFIG_PCI_MMCONFIG 147#ifdef CONFIG_PCI_MMCONFIG
148static int __devinit check_segment(u16 seg, struct device *dev, char *estr) 148static int check_segment(u16 seg, struct device *dev, char *estr)
149{ 149{
150 if (seg) { 150 if (seg) {
151 dev_err(dev, 151 dev_err(dev,
@@ -168,9 +168,8 @@ static int __devinit check_segment(u16 seg, struct device *dev, char *estr)
168 return 0; 168 return 0;
169} 169}
170 170
171static int __devinit setup_mcfg_map(struct pci_root_info *info, 171static int setup_mcfg_map(struct pci_root_info *info, u16 seg, u8 start,
172 u16 seg, u8 start, u8 end, 172 u8 end, phys_addr_t addr)
173 phys_addr_t addr)
174{ 173{
175 int result; 174 int result;
176 struct device *dev = &info->bridge->dev; 175 struct device *dev = &info->bridge->dev;
@@ -208,7 +207,7 @@ static void teardown_mcfg_map(struct pci_root_info *info)
208 } 207 }
209} 208}
210#else 209#else
211static int __devinit setup_mcfg_map(struct pci_root_info *info, 210static int setup_mcfg_map(struct pci_root_info *info,
212 u16 seg, u8 start, u8 end, 211 u16 seg, u8 start, u8 end,
213 phys_addr_t addr) 212 phys_addr_t addr)
214{ 213{
@@ -474,7 +473,7 @@ probe_pci_root_info(struct pci_root_info *info, struct acpi_device *device,
474 info); 473 info);
475} 474}
476 475
477struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root) 476struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
478{ 477{
479 struct acpi_device *device = root->device; 478 struct acpi_device *device = root->device;
480 struct pci_root_info *info = NULL; 479 struct pci_root_info *info = NULL;
diff --git a/arch/x86/pci/bus_numa.c b/arch/x86/pci/bus_numa.c
index d37e2fec97e5..c2735feb2508 100644
--- a/arch/x86/pci/bus_numa.c
+++ b/arch/x86/pci/bus_numa.c
@@ -93,8 +93,8 @@ struct pci_root_info __init *alloc_pci_root_info(int bus_min, int bus_max,
93 return info; 93 return info;
94} 94}
95 95
96void __devinit update_res(struct pci_root_info *info, resource_size_t start, 96void update_res(struct pci_root_info *info, resource_size_t start,
97 resource_size_t end, unsigned long flags, int merge) 97 resource_size_t end, unsigned long flags, int merge)
98{ 98{
99 struct resource *res; 99 struct resource *res;
100 struct pci_root_res *root_res; 100 struct pci_root_res *root_res;
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 1b1dda90a945..ccd0ab3ab899 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -81,14 +81,14 @@ struct pci_ops pci_root_ops = {
81 */ 81 */
82DEFINE_RAW_SPINLOCK(pci_config_lock); 82DEFINE_RAW_SPINLOCK(pci_config_lock);
83 83
84static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) 84static int can_skip_ioresource_align(const struct dmi_system_id *d)
85{ 85{
86 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; 86 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
87 printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); 87 printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident);
88 return 0; 88 return 0;
89} 89}
90 90
91static const struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitconst = { 91static const struct dmi_system_id can_skip_pciprobe_dmi_table[] = {
92/* 92/*
93 * Systems where PCI IO resource ISA alignment can be skipped 93 * Systems where PCI IO resource ISA alignment can be skipped
94 * when the ISA enable bit in the bridge control is not set 94 * when the ISA enable bit in the bridge control is not set
@@ -125,7 +125,7 @@ void __init dmi_check_skip_isa_align(void)
125 dmi_check_system(can_skip_pciprobe_dmi_table); 125 dmi_check_system(can_skip_pciprobe_dmi_table);
126} 126}
127 127
128static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) 128static void pcibios_fixup_device_resources(struct pci_dev *dev)
129{ 129{
130 struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; 130 struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE];
131 struct resource *bar_r; 131 struct resource *bar_r;
@@ -162,7 +162,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
162 * are examined. 162 * are examined.
163 */ 163 */
164 164
165void __devinit pcibios_fixup_bus(struct pci_bus *b) 165void pcibios_fixup_bus(struct pci_bus *b)
166{ 166{
167 struct pci_dev *dev; 167 struct pci_dev *dev;
168 168
@@ -176,7 +176,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *b)
176 * on the kernel command line (which was parsed earlier). 176 * on the kernel command line (which was parsed earlier).
177 */ 177 */
178 178
179static int __devinit set_bf_sort(const struct dmi_system_id *d) 179static int set_bf_sort(const struct dmi_system_id *d)
180{ 180{
181 if (pci_bf_sort == pci_bf_sort_default) { 181 if (pci_bf_sort == pci_bf_sort_default) {
182 pci_bf_sort = pci_dmi_bf; 182 pci_bf_sort = pci_dmi_bf;
@@ -185,7 +185,7 @@ static int __devinit set_bf_sort(const struct dmi_system_id *d)
185 return 0; 185 return 0;
186} 186}
187 187
188static void __devinit read_dmi_type_b1(const struct dmi_header *dm, 188static void read_dmi_type_b1(const struct dmi_header *dm,
189 void *private_data) 189 void *private_data)
190{ 190{
191 u8 *d = (u8 *)dm + 4; 191 u8 *d = (u8 *)dm + 4;
@@ -207,7 +207,7 @@ static void __devinit read_dmi_type_b1(const struct dmi_header *dm,
207 } 207 }
208} 208}
209 209
210static int __devinit find_sort_method(const struct dmi_system_id *d) 210static int find_sort_method(const struct dmi_system_id *d)
211{ 211{
212 dmi_walk(read_dmi_type_b1, NULL); 212 dmi_walk(read_dmi_type_b1, NULL);
213 213
@@ -222,7 +222,7 @@ static int __devinit find_sort_method(const struct dmi_system_id *d)
222 * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) 222 * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus)
223 */ 223 */
224#ifdef __i386__ 224#ifdef __i386__
225static int __devinit assign_all_busses(const struct dmi_system_id *d) 225static int assign_all_busses(const struct dmi_system_id *d)
226{ 226{
227 pci_probe |= PCI_ASSIGN_ALL_BUSSES; 227 pci_probe |= PCI_ASSIGN_ALL_BUSSES;
228 printk(KERN_INFO "%s detected: enabling PCI bus# renumbering" 228 printk(KERN_INFO "%s detected: enabling PCI bus# renumbering"
@@ -231,7 +231,7 @@ static int __devinit assign_all_busses(const struct dmi_system_id *d)
231} 231}
232#endif 232#endif
233 233
234static int __devinit set_scan_all(const struct dmi_system_id *d) 234static int set_scan_all(const struct dmi_system_id *d)
235{ 235{
236 printk(KERN_INFO "PCI: %s detected, enabling pci=pcie_scan_all\n", 236 printk(KERN_INFO "PCI: %s detected, enabling pci=pcie_scan_all\n",
237 d->ident); 237 d->ident);
@@ -239,7 +239,7 @@ static int __devinit set_scan_all(const struct dmi_system_id *d)
239 return 0; 239 return 0;
240} 240}
241 241
242static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = { 242static const struct dmi_system_id pciprobe_dmi_table[] = {
243#ifdef __i386__ 243#ifdef __i386__
244/* 244/*
245 * Laptops which need pci=assign-busses to see Cardbus cards 245 * Laptops which need pci=assign-busses to see Cardbus cards
@@ -434,7 +434,8 @@ static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = {
434 .callback = set_scan_all, 434 .callback = set_scan_all,
435 .ident = "Stratus/NEC ftServer", 435 .ident = "Stratus/NEC ftServer",
436 .matches = { 436 .matches = {
437 DMI_MATCH(DMI_SYS_VENDOR, "ftServer"), 437 DMI_MATCH(DMI_SYS_VENDOR, "Stratus"),
438 DMI_MATCH(DMI_PRODUCT_NAME, "ftServer"),
438 }, 439 },
439 }, 440 },
440 {} 441 {}
@@ -445,7 +446,7 @@ void __init dmi_check_pciprobe(void)
445 dmi_check_system(pciprobe_dmi_table); 446 dmi_check_system(pciprobe_dmi_table);
446} 447}
447 448
448struct pci_bus * __devinit pcibios_scan_root(int busnum) 449struct pci_bus *pcibios_scan_root(int busnum)
449{ 450{
450 struct pci_bus *bus = NULL; 451 struct pci_bus *bus = NULL;
451 452
@@ -664,7 +665,7 @@ int pci_ext_cfg_avail(void)
664 return 0; 665 return 0;
665} 666}
666 667
667struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) 668struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
668{ 669{
669 LIST_HEAD(resources); 670 LIST_HEAD(resources);
670 struct pci_bus *bus = NULL; 671 struct pci_bus *bus = NULL;
@@ -692,7 +693,7 @@ struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops,
692 return bus; 693 return bus;
693} 694}
694 695
695struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno) 696struct pci_bus *pci_scan_bus_with_sysdata(int busno)
696{ 697{
697 return pci_scan_bus_on_node(busno, &pci_root_ops, -1); 698 return pci_scan_bus_on_node(busno, &pci_root_ops, -1);
698} 699}
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index af8a224db216..f5809fa2753e 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -9,7 +9,7 @@
9#include <linux/vgaarb.h> 9#include <linux/vgaarb.h>
10#include <asm/pci_x86.h> 10#include <asm/pci_x86.h>
11 11
12static void __devinit pci_fixup_i450nx(struct pci_dev *d) 12static void pci_fixup_i450nx(struct pci_dev *d)
13{ 13{
14 /* 14 /*
15 * i450NX -- Find and scan all secondary buses on all PXB's. 15 * i450NX -- Find and scan all secondary buses on all PXB's.
@@ -34,7 +34,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d)
34} 34}
35DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx); 35DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx);
36 36
37static void __devinit pci_fixup_i450gx(struct pci_dev *d) 37static void pci_fixup_i450gx(struct pci_dev *d)
38{ 38{
39 /* 39 /*
40 * i450GX and i450KX -- Find and scan all secondary buses. 40 * i450GX and i450KX -- Find and scan all secondary buses.
@@ -48,7 +48,7 @@ static void __devinit pci_fixup_i450gx(struct pci_dev *d)
48} 48}
49DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); 49DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx);
50 50
51static void __devinit pci_fixup_umc_ide(struct pci_dev *d) 51static void pci_fixup_umc_ide(struct pci_dev *d)
52{ 52{
53 /* 53 /*
54 * UM8886BF IDE controller sets region type bits incorrectly, 54 * UM8886BF IDE controller sets region type bits incorrectly,
@@ -62,7 +62,7 @@ static void __devinit pci_fixup_umc_ide(struct pci_dev *d)
62} 62}
63DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide); 63DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide);
64 64
65static void __devinit pci_fixup_ncr53c810(struct pci_dev *d) 65static void pci_fixup_ncr53c810(struct pci_dev *d)
66{ 66{
67 /* 67 /*
68 * NCR 53C810 returns class code 0 (at least on some systems). 68 * NCR 53C810 returns class code 0 (at least on some systems).
@@ -75,7 +75,7 @@ static void __devinit pci_fixup_ncr53c810(struct pci_dev *d)
75} 75}
76DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810); 76DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810);
77 77
78static void __devinit pci_fixup_latency(struct pci_dev *d) 78static void pci_fixup_latency(struct pci_dev *d)
79{ 79{
80 /* 80 /*
81 * SiS 5597 and 5598 chipsets require latency timer set to 81 * SiS 5597 and 5598 chipsets require latency timer set to
@@ -87,7 +87,7 @@ static void __devinit pci_fixup_latency(struct pci_dev *d)
87DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency); 87DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency);
88DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency); 88DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency);
89 89
90static void __devinit pci_fixup_piix4_acpi(struct pci_dev *d) 90static void pci_fixup_piix4_acpi(struct pci_dev *d)
91{ 91{
92 /* 92 /*
93 * PIIX4 ACPI device: hardwired IRQ9 93 * PIIX4 ACPI device: hardwired IRQ9
@@ -163,7 +163,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_
163 * system to PCI bus no matter what are their window settings, so they are 163 * system to PCI bus no matter what are their window settings, so they are
164 * "transparent" (or subtractive decoding) from programmers point of view. 164 * "transparent" (or subtractive decoding) from programmers point of view.
165 */ 165 */
166static void __devinit pci_fixup_transparent_bridge(struct pci_dev *dev) 166static void pci_fixup_transparent_bridge(struct pci_dev *dev)
167{ 167{
168 if ((dev->device & 0xff00) == 0x2400) 168 if ((dev->device & 0xff00) == 0x2400)
169 dev->transparent = 1; 169 dev->transparent = 1;
@@ -317,7 +317,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PC1, pcie_r
317 * video device at this point. 317 * video device at this point.
318 */ 318 */
319 319
320static void __devinit pci_fixup_video(struct pci_dev *pdev) 320static void pci_fixup_video(struct pci_dev *pdev)
321{ 321{
322 struct pci_dev *bridge; 322 struct pci_dev *bridge;
323 struct pci_bus *bus; 323 struct pci_bus *bus;
@@ -357,7 +357,7 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
357 PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video); 357 PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video);
358 358
359 359
360static const struct dmi_system_id __devinitconst msi_k8t_dmi_table[] = { 360static const struct dmi_system_id msi_k8t_dmi_table[] = {
361 { 361 {
362 .ident = "MSI-K8T-Neo2Fir", 362 .ident = "MSI-K8T-Neo2Fir",
363 .matches = { 363 .matches = {
@@ -378,7 +378,7 @@ static const struct dmi_system_id __devinitconst msi_k8t_dmi_table[] = {
378 * The soundcard is only enabled, if the mainborad is identified 378 * The soundcard is only enabled, if the mainborad is identified
379 * via DMI-tables and the soundcard is detected to be off. 379 * via DMI-tables and the soundcard is detected to be off.
380 */ 380 */
381static void __devinit pci_fixup_msi_k8t_onboard_sound(struct pci_dev *dev) 381static void pci_fixup_msi_k8t_onboard_sound(struct pci_dev *dev)
382{ 382{
383 unsigned char val; 383 unsigned char val;
384 if (!dmi_check_system(msi_k8t_dmi_table)) 384 if (!dmi_check_system(msi_k8t_dmi_table))
@@ -414,7 +414,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237,
414 */ 414 */
415static u16 toshiba_line_size; 415static u16 toshiba_line_size;
416 416
417static const struct dmi_system_id __devinitconst toshiba_ohci1394_dmi_table[] = { 417static const struct dmi_system_id toshiba_ohci1394_dmi_table[] = {
418 { 418 {
419 .ident = "Toshiba PS5 based laptop", 419 .ident = "Toshiba PS5 based laptop",
420 .matches = { 420 .matches = {
@@ -439,7 +439,7 @@ static const struct dmi_system_id __devinitconst toshiba_ohci1394_dmi_table[] =
439 { } 439 { }
440}; 440};
441 441
442static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev) 442static void pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev)
443{ 443{
444 if (!dmi_check_system(toshiba_ohci1394_dmi_table)) 444 if (!dmi_check_system(toshiba_ohci1394_dmi_table))
445 return; /* only applies to certain Toshibas (so far) */ 445 return; /* only applies to certain Toshibas (so far) */
@@ -450,7 +450,7 @@ static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev)
450DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0x8032, 450DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0x8032,
451 pci_pre_fixup_toshiba_ohci1394); 451 pci_pre_fixup_toshiba_ohci1394);
452 452
453static void __devinit pci_post_fixup_toshiba_ohci1394(struct pci_dev *dev) 453static void pci_post_fixup_toshiba_ohci1394(struct pci_dev *dev)
454{ 454{
455 if (!dmi_check_system(toshiba_ohci1394_dmi_table)) 455 if (!dmi_check_system(toshiba_ohci1394_dmi_table))
456 return; /* only applies to certain Toshibas (so far) */ 456 return; /* only applies to certain Toshibas (so far) */
@@ -488,7 +488,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
488 * Siemens Nixdorf AG FSC Multiprocessor Interrupt Controller: 488 * Siemens Nixdorf AG FSC Multiprocessor Interrupt Controller:
489 * prevent update of the BAR0, which doesn't look like a normal BAR. 489 * prevent update of the BAR0, which doesn't look like a normal BAR.
490 */ 490 */
491static void __devinit pci_siemens_interrupt_controller(struct pci_dev *dev) 491static void pci_siemens_interrupt_controller(struct pci_dev *dev)
492{ 492{
493 dev->resource[0].flags |= IORESOURCE_PCI_FIXED; 493 dev->resource[0].flags |= IORESOURCE_PCI_FIXED;
494} 494}
@@ -531,7 +531,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, 0x4385, sb600_disable_hpet_bar);
531 * 531 *
532 * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor) 532 * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor)
533 */ 533 */
534static void __devinit twinhead_reserve_killing_zone(struct pci_dev *dev) 534static void twinhead_reserve_killing_zone(struct pci_dev *dev)
535{ 535{
536 if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device == 0xA003) { 536 if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device == 0xA003) {
537 pr_info("Reserving memory on Twinhead H12Y\n"); 537 pr_info("Reserving memory on Twinhead H12Y\n");
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index a1df191129d3..4a2ab9cb3659 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -10,7 +10,7 @@
10 * Discover remaining PCI buses in case there are peer host bridges. 10 * Discover remaining PCI buses in case there are peer host bridges.
11 * We use the number of last PCI bus provided by the PCI BIOS. 11 * We use the number of last PCI bus provided by the PCI BIOS.
12 */ 12 */
13static void __devinit pcibios_fixup_peer_bridges(void) 13static void pcibios_fixup_peer_bridges(void)
14{ 14{
15 int n; 15 int n;
16 16
@@ -34,7 +34,7 @@ int __init pci_legacy_init(void)
34 return 0; 34 return 0;
35} 35}
36 36
37void __devinit pcibios_scan_specific_bus(int busn) 37void pcibios_scan_specific_bus(int busn)
38{ 38{
39 int devfn; 39 int devfn;
40 long node; 40 long node;
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 704b9ec043d7..fb29968a7cd5 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -49,7 +49,7 @@ static __init void free_all_mmcfg(void)
49 pci_mmconfig_remove(cfg); 49 pci_mmconfig_remove(cfg);
50} 50}
51 51
52static __devinit void list_add_sorted(struct pci_mmcfg_region *new) 52static void list_add_sorted(struct pci_mmcfg_region *new)
53{ 53{
54 struct pci_mmcfg_region *cfg; 54 struct pci_mmcfg_region *cfg;
55 55
@@ -65,9 +65,8 @@ static __devinit void list_add_sorted(struct pci_mmcfg_region *new)
65 list_add_tail_rcu(&new->list, &pci_mmcfg_list); 65 list_add_tail_rcu(&new->list, &pci_mmcfg_list);
66} 66}
67 67
68static __devinit struct pci_mmcfg_region *pci_mmconfig_alloc(int segment, 68static struct pci_mmcfg_region *pci_mmconfig_alloc(int segment, int start,
69 int start, 69 int end, u64 addr)
70 int end, u64 addr)
71{ 70{
72 struct pci_mmcfg_region *new; 71 struct pci_mmcfg_region *new;
73 struct resource *res; 72 struct resource *res;
@@ -371,8 +370,7 @@ static int __init pci_mmcfg_check_hostbridge(void)
371 return !list_empty(&pci_mmcfg_list); 370 return !list_empty(&pci_mmcfg_list);
372} 371}
373 372
374static acpi_status __devinit check_mcfg_resource(struct acpi_resource *res, 373static acpi_status check_mcfg_resource(struct acpi_resource *res, void *data)
375 void *data)
376{ 374{
377 struct resource *mcfg_res = data; 375 struct resource *mcfg_res = data;
378 struct acpi_resource_address64 address; 376 struct acpi_resource_address64 address;
@@ -408,8 +406,8 @@ static acpi_status __devinit check_mcfg_resource(struct acpi_resource *res,
408 return AE_OK; 406 return AE_OK;
409} 407}
410 408
411static acpi_status __devinit find_mboard_resource(acpi_handle handle, u32 lvl, 409static acpi_status find_mboard_resource(acpi_handle handle, u32 lvl,
412 void *context, void **rv) 410 void *context, void **rv)
413{ 411{
414 struct resource *mcfg_res = context; 412 struct resource *mcfg_res = context;
415 413
@@ -422,7 +420,7 @@ static acpi_status __devinit find_mboard_resource(acpi_handle handle, u32 lvl,
422 return AE_OK; 420 return AE_OK;
423} 421}
424 422
425static int __devinit is_acpi_reserved(u64 start, u64 end, unsigned not_used) 423static int is_acpi_reserved(u64 start, u64 end, unsigned not_used)
426{ 424{
427 struct resource mcfg_res; 425 struct resource mcfg_res;
428 426
@@ -693,9 +691,8 @@ static int __init pci_mmcfg_late_insert_resources(void)
693late_initcall(pci_mmcfg_late_insert_resources); 691late_initcall(pci_mmcfg_late_insert_resources);
694 692
695/* Add MMCFG information for host bridges */ 693/* Add MMCFG information for host bridges */
696int __devinit pci_mmconfig_insert(struct device *dev, 694int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end,
697 u16 seg, u8 start, u8 end, 695 phys_addr_t addr)
698 phys_addr_t addr)
699{ 696{
700 int rc; 697 int rc;
701 struct resource *tmp = NULL; 698 struct resource *tmp = NULL;
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index db63ac23e3d9..5c90975cdf0f 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -142,7 +142,7 @@ void __init pci_mmcfg_arch_free(void)
142{ 142{
143} 143}
144 144
145int __devinit pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) 145int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg)
146{ 146{
147 return 0; 147 return 0;
148} 148}
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c
index d4ebd07c306d..bea52496aea6 100644
--- a/arch/x86/pci/mmconfig_64.c
+++ b/arch/x86/pci/mmconfig_64.c
@@ -95,7 +95,7 @@ const struct pci_raw_ops pci_mmcfg = {
95 .write = pci_mmcfg_write, 95 .write = pci_mmcfg_write,
96}; 96};
97 97
98static void __iomem * __devinit mcfg_ioremap(struct pci_mmcfg_region *cfg) 98static void __iomem *mcfg_ioremap(struct pci_mmcfg_region *cfg)
99{ 99{
100 void __iomem *addr; 100 void __iomem *addr;
101 u64 start, size; 101 u64 start, size;
@@ -133,7 +133,7 @@ void __init pci_mmcfg_arch_free(void)
133 pci_mmcfg_arch_unmap(cfg); 133 pci_mmcfg_arch_unmap(cfg);
134} 134}
135 135
136int __devinit pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) 136int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg)
137{ 137{
138 cfg->virt = mcfg_ioremap(cfg); 138 cfg->virt = mcfg_ioremap(cfg);
139 if (!cfg->virt) { 139 if (!cfg->virt) {
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c
index e14a2ff708b5..6eb18c42a28a 100644
--- a/arch/x86/pci/mrst.c
+++ b/arch/x86/pci/mrst.c
@@ -247,7 +247,7 @@ int __init pci_mrst_init(void)
247/* Langwell devices are not true pci devices, they are not subject to 10 ms 247/* Langwell devices are not true pci devices, they are not subject to 10 ms
248 * d3 to d0 delay required by pci spec. 248 * d3 to d0 delay required by pci spec.
249 */ 249 */
250static void __devinit pci_d3delay_fixup(struct pci_dev *dev) 250static void pci_d3delay_fixup(struct pci_dev *dev)
251{ 251{
252 /* PCI fixups are effectively decided compile time. If we have a dual 252 /* PCI fixups are effectively decided compile time. If we have a dual
253 SoC/non-SoC kernel we don't want to mangle d3 on non SoC devices */ 253 SoC/non-SoC kernel we don't want to mangle d3 on non SoC devices */
@@ -262,7 +262,7 @@ static void __devinit pci_d3delay_fixup(struct pci_dev *dev)
262} 262}
263DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup); 263DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup);
264 264
265static void __devinit mrst_power_off_unused_dev(struct pci_dev *dev) 265static void mrst_power_off_unused_dev(struct pci_dev *dev)
266{ 266{
267 pci_set_power_state(dev, PCI_D3hot); 267 pci_set_power_state(dev, PCI_D3hot);
268} 268}
@@ -275,7 +275,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0815, mrst_power_off_unused_dev);
275/* 275/*
276 * Langwell devices reside at fixed offsets, don't try to move them. 276 * Langwell devices reside at fixed offsets, don't try to move them.
277 */ 277 */
278static void __devinit pci_fixed_bar_fixup(struct pci_dev *dev) 278static void pci_fixed_bar_fixup(struct pci_dev *dev)
279{ 279{
280 unsigned long offset; 280 unsigned long offset;
281 u32 size; 281 u32 size;
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c
index 83e125b95ca6..b96b14c250b6 100644
--- a/arch/x86/pci/numaq_32.c
+++ b/arch/x86/pci/numaq_32.c
@@ -116,7 +116,7 @@ static const struct pci_raw_ops pci_direct_conf1_mq = {
116}; 116};
117 117
118 118
119static void __devinit pci_fixup_i450nx(struct pci_dev *d) 119static void pci_fixup_i450nx(struct pci_dev *d)
120{ 120{
121 /* 121 /*
122 * i450NX -- Find and scan all secondary buses on all PXB's. 122 * i450NX -- Find and scan all secondary buses on all PXB's.
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
index da8fe0535ff4..c77b24a8b2da 100644
--- a/arch/x86/pci/pcbios.c
+++ b/arch/x86/pci/pcbios.c
@@ -124,7 +124,7 @@ static struct {
124 124
125static int pci_bios_present; 125static int pci_bios_present;
126 126
127static int __devinit check_pcibios(void) 127static int check_pcibios(void)
128{ 128{
129 u32 signature, eax, ebx, ecx; 129 u32 signature, eax, ebx, ecx;
130 u8 status, major_ver, minor_ver, hw_mech; 130 u8 status, major_ver, minor_ver, hw_mech;
@@ -312,7 +312,7 @@ static const struct pci_raw_ops pci_bios_access = {
312 * Try to find PCI BIOS. 312 * Try to find PCI BIOS.
313 */ 313 */
314 314
315static const struct pci_raw_ops * __devinit pci_find_bios(void) 315static const struct pci_raw_ops *pci_find_bios(void)
316{ 316{
317 union bios32 *check; 317 union bios32 *check;
318 unsigned char sum; 318 unsigned char sum;
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
index fd41a9262d65..e31bcd8f2eee 100644
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
@@ -782,7 +782,7 @@ BLOCKING_NOTIFIER_HEAD(intel_scu_notifier);
782EXPORT_SYMBOL_GPL(intel_scu_notifier); 782EXPORT_SYMBOL_GPL(intel_scu_notifier);
783 783
784/* Called by IPC driver */ 784/* Called by IPC driver */
785void __devinit intel_scu_devices_create(void) 785void intel_scu_devices_create(void)
786{ 786{
787 int i; 787 int i;
788 788
diff --git a/arch/x86/platform/olpc/olpc-xo1-pm.c b/arch/x86/platform/olpc/olpc-xo1-pm.c
index d75582d1aa55..ff0174dda810 100644
--- a/arch/x86/platform/olpc/olpc-xo1-pm.c
+++ b/arch/x86/platform/olpc/olpc-xo1-pm.c
@@ -121,7 +121,7 @@ static const struct platform_suspend_ops xo1_suspend_ops = {
121 .enter = xo1_power_state_enter, 121 .enter = xo1_power_state_enter,
122}; 122};
123 123
124static int __devinit xo1_pm_probe(struct platform_device *pdev) 124static int xo1_pm_probe(struct platform_device *pdev)
125{ 125{
126 struct resource *res; 126 struct resource *res;
127 int err; 127 int err;
@@ -154,7 +154,7 @@ static int __devinit xo1_pm_probe(struct platform_device *pdev)
154 return 0; 154 return 0;
155} 155}
156 156
157static int __devexit xo1_pm_remove(struct platform_device *pdev) 157static int xo1_pm_remove(struct platform_device *pdev)
158{ 158{
159 mfd_cell_disable(pdev); 159 mfd_cell_disable(pdev);
160 160
@@ -173,7 +173,7 @@ static struct platform_driver cs5535_pms_driver = {
173 .owner = THIS_MODULE, 173 .owner = THIS_MODULE,
174 }, 174 },
175 .probe = xo1_pm_probe, 175 .probe = xo1_pm_probe,
176 .remove = __devexit_p(xo1_pm_remove), 176 .remove = xo1_pm_remove,
177}; 177};
178 178
179static struct platform_driver cs5535_acpi_driver = { 179static struct platform_driver cs5535_acpi_driver = {
@@ -182,7 +182,7 @@ static struct platform_driver cs5535_acpi_driver = {
182 .owner = THIS_MODULE, 182 .owner = THIS_MODULE,
183 }, 183 },
184 .probe = xo1_pm_probe, 184 .probe = xo1_pm_probe,
185 .remove = __devexit_p(xo1_pm_remove), 185 .remove = xo1_pm_remove,
186}; 186};
187 187
188static int __init xo1_pm_init(void) 188static int __init xo1_pm_init(void)
diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c
index 63d4aa40956e..74704be7b1fe 100644
--- a/arch/x86/platform/olpc/olpc-xo1-sci.c
+++ b/arch/x86/platform/olpc/olpc-xo1-sci.c
@@ -309,7 +309,7 @@ static int xo1_sci_resume(struct platform_device *pdev)
309 return 0; 309 return 0;
310} 310}
311 311
312static int __devinit setup_sci_interrupt(struct platform_device *pdev) 312static int setup_sci_interrupt(struct platform_device *pdev)
313{ 313{
314 u32 lo, hi; 314 u32 lo, hi;
315 u32 sts; 315 u32 sts;
@@ -351,7 +351,7 @@ static int __devinit setup_sci_interrupt(struct platform_device *pdev)
351 return r; 351 return r;
352} 352}
353 353
354static int __devinit setup_ec_sci(void) 354static int setup_ec_sci(void)
355{ 355{
356 int r; 356 int r;
357 357
@@ -395,7 +395,7 @@ static void free_ec_sci(void)
395 gpio_free(OLPC_GPIO_ECSCI); 395 gpio_free(OLPC_GPIO_ECSCI);
396} 396}
397 397
398static int __devinit setup_lid_events(void) 398static int setup_lid_events(void)
399{ 399{
400 int r; 400 int r;
401 401
@@ -432,7 +432,7 @@ static void free_lid_events(void)
432 gpio_free(OLPC_GPIO_LID); 432 gpio_free(OLPC_GPIO_LID);
433} 433}
434 434
435static int __devinit setup_power_button(struct platform_device *pdev) 435static int setup_power_button(struct platform_device *pdev)
436{ 436{
437 int r; 437 int r;
438 438
@@ -463,7 +463,7 @@ static void free_power_button(void)
463 input_free_device(power_button_idev); 463 input_free_device(power_button_idev);
464} 464}
465 465
466static int __devinit setup_ebook_switch(struct platform_device *pdev) 466static int setup_ebook_switch(struct platform_device *pdev)
467{ 467{
468 int r; 468 int r;
469 469
@@ -494,7 +494,7 @@ static void free_ebook_switch(void)
494 input_free_device(ebook_switch_idev); 494 input_free_device(ebook_switch_idev);
495} 495}
496 496
497static int __devinit setup_lid_switch(struct platform_device *pdev) 497static int setup_lid_switch(struct platform_device *pdev)
498{ 498{
499 int r; 499 int r;
500 500
@@ -538,7 +538,7 @@ static void free_lid_switch(void)
538 input_free_device(lid_switch_idev); 538 input_free_device(lid_switch_idev);
539} 539}
540 540
541static int __devinit xo1_sci_probe(struct platform_device *pdev) 541static int xo1_sci_probe(struct platform_device *pdev)
542{ 542{
543 struct resource *res; 543 struct resource *res;
544 int r; 544 int r;
@@ -613,7 +613,7 @@ err_ebook:
613 return r; 613 return r;
614} 614}
615 615
616static int __devexit xo1_sci_remove(struct platform_device *pdev) 616static int xo1_sci_remove(struct platform_device *pdev)
617{ 617{
618 mfd_cell_disable(pdev); 618 mfd_cell_disable(pdev);
619 free_irq(sci_irq, pdev); 619 free_irq(sci_irq, pdev);
@@ -632,7 +632,7 @@ static struct platform_driver xo1_sci_driver = {
632 .name = "olpc-xo1-sci-acpi", 632 .name = "olpc-xo1-sci-acpi",
633 }, 633 },
634 .probe = xo1_sci_probe, 634 .probe = xo1_sci_probe,
635 .remove = __devexit_p(xo1_sci_remove), 635 .remove = xo1_sci_remove,
636 .suspend = xo1_sci_suspend, 636 .suspend = xo1_sci_suspend,
637 .resume = xo1_sci_resume, 637 .resume = xo1_sci_resume,
638}; 638};
diff --git a/arch/x86/platform/scx200/scx200_32.c b/arch/x86/platform/scx200/scx200_32.c
index 7a9ad30d6c9f..3dc9aee41d91 100644
--- a/arch/x86/platform/scx200/scx200_32.c
+++ b/arch/x86/platform/scx200/scx200_32.c
@@ -35,7 +35,7 @@ static struct pci_device_id scx200_tbl[] = {
35}; 35};
36MODULE_DEVICE_TABLE(pci,scx200_tbl); 36MODULE_DEVICE_TABLE(pci,scx200_tbl);
37 37
38static int __devinit scx200_probe(struct pci_dev *, const struct pci_device_id *); 38static int scx200_probe(struct pci_dev *, const struct pci_device_id *);
39 39
40static struct pci_driver scx200_pci_driver = { 40static struct pci_driver scx200_pci_driver = {
41 .name = "scx200", 41 .name = "scx200",
@@ -45,7 +45,7 @@ static struct pci_driver scx200_pci_driver = {
45 45
46static DEFINE_MUTEX(scx200_gpio_config_lock); 46static DEFINE_MUTEX(scx200_gpio_config_lock);
47 47
48static void __devinit scx200_init_shadow(void) 48static void scx200_init_shadow(void)
49{ 49{
50 int bank; 50 int bank;
51 51
@@ -54,7 +54,7 @@ static void __devinit scx200_init_shadow(void)
54 scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank); 54 scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank);
55} 55}
56 56
57static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 57static int scx200_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
58{ 58{
59 unsigned base; 59 unsigned base;
60 60
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index eb30e5ab4cab..b679bf8478f7 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -226,16 +226,6 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
226 struct acpi_memory_info *info; 226 struct acpi_memory_info *info;
227 int node; 227 int node;
228 228
229
230 /* Get the range from the _CRS */
231 result = acpi_memory_get_device_resources(mem_device);
232 if (result) {
233 dev_err(&mem_device->device->dev,
234 "get_device_resources failed\n");
235 mem_device->state = MEMORY_INVALID_STATE;
236 return result;
237 }
238
239 node = acpi_get_node(mem_device->device->handle); 229 node = acpi_get_node(mem_device->device->handle);
240 /* 230 /*
241 * Tell the VM there is more memory here... 231 * Tell the VM there is more memory here...
@@ -342,14 +332,6 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
342 break; 332 break;
343 } 333 }
344 334
345 if (acpi_memory_check_device(mem_device))
346 break;
347
348 if (acpi_memory_enable_device(mem_device)) {
349 acpi_handle_err(handle,"Cannot enable memory device\n");
350 break;
351 }
352
353 ost_code = ACPI_OST_SC_SUCCESS; 335 ost_code = ACPI_OST_SC_SUCCESS;
354 break; 336 break;
355 337
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index c8bc24bd1f72..bc7a03ded064 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -162,5 +162,5 @@ acpi-y += \
162 utxferror.o \ 162 utxferror.o \
163 utxfmutex.o 163 utxfmutex.o
164 164
165acpi-$(ACPI_FUTURE_USAGE) += uttrack.o utcache.o utclib.o 165acpi-$(ACPI_FUTURE_USAGE) += uttrack.o utcache.o
166 166
diff --git a/drivers/acpi/acpica/utclib.c b/drivers/acpi/acpica/utclib.c
deleted file mode 100644
index 19ea4755aa73..000000000000
--- a/drivers/acpi/acpica/utclib.c
+++ /dev/null
@@ -1,749 +0,0 @@
1/******************************************************************************
2 *
3 * Module Name: cmclib - Local implementation of C library functions
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2012, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#include <acpi/acpi.h>
45#include "accommon.h"
46
47/*
48 * These implementations of standard C Library routines can optionally be
49 * used if a C library is not available. In general, they are less efficient
50 * than an inline or assembly implementation
51 */
52
53#define _COMPONENT ACPI_UTILITIES
54ACPI_MODULE_NAME("cmclib")
55
56#ifndef ACPI_USE_SYSTEM_CLIBRARY
57#define NEGATIVE 1
58#define POSITIVE 0
59/*******************************************************************************
60 *
61 * FUNCTION: acpi_ut_memcmp (memcmp)
62 *
63 * PARAMETERS: buffer1 - First Buffer
64 * buffer2 - Second Buffer
65 * count - Maximum # of bytes to compare
66 *
67 * RETURN: Index where Buffers mismatched, or 0 if Buffers matched
68 *
69 * DESCRIPTION: Compare two Buffers, with a maximum length
70 *
71 ******************************************************************************/
72int acpi_ut_memcmp(const char *buffer1, const char *buffer2, acpi_size count)
73{
74
75 return ((count == ACPI_SIZE_MAX) ? 0 : ((unsigned char)*buffer1 -
76 (unsigned char)*buffer2));
77}
78
79/*******************************************************************************
80 *
81 * FUNCTION: acpi_ut_memcpy (memcpy)
82 *
83 * PARAMETERS: dest - Target of the copy
84 * src - Source buffer to copy
85 * count - Number of bytes to copy
86 *
87 * RETURN: Dest
88 *
89 * DESCRIPTION: Copy arbitrary bytes of memory
90 *
91 ******************************************************************************/
92
93void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count)
94{
95 char *new = (char *)dest;
96 char *old = (char *)src;
97
98 while (count) {
99 *new = *old;
100 new++;
101 old++;
102 count--;
103 }
104
105 return (dest);
106}
107
108/*******************************************************************************
109 *
110 * FUNCTION: acpi_ut_memset (memset)
111 *
112 * PARAMETERS: dest - Buffer to set
113 * value - Value to set each byte of memory
114 * count - Number of bytes to set
115 *
116 * RETURN: Dest
117 *
118 * DESCRIPTION: Initialize a buffer to a known value.
119 *
120 ******************************************************************************/
121
122void *acpi_ut_memset(void *dest, u8 value, acpi_size count)
123{
124 char *new = (char *)dest;
125
126 while (count) {
127 *new = (char)value;
128 new++;
129 count--;
130 }
131
132 return (dest);
133}
134
135/*******************************************************************************
136 *
137 * FUNCTION: acpi_ut_strlen (strlen)
138 *
139 * PARAMETERS: string - Null terminated string
140 *
141 * RETURN: Length
142 *
143 * DESCRIPTION: Returns the length of the input string
144 *
145 ******************************************************************************/
146
147acpi_size acpi_ut_strlen(const char *string)
148{
149 u32 length = 0;
150
151 /* Count the string until a null is encountered */
152
153 while (*string) {
154 length++;
155 string++;
156 }
157
158 return (length);
159}
160
161/*******************************************************************************
162 *
163 * FUNCTION: acpi_ut_strcpy (strcpy)
164 *
165 * PARAMETERS: dst_string - Target of the copy
166 * src_string - The source string to copy
167 *
168 * RETURN: dst_string
169 *
170 * DESCRIPTION: Copy a null terminated string
171 *
172 ******************************************************************************/
173
174char *acpi_ut_strcpy(char *dst_string, const char *src_string)
175{
176 char *string = dst_string;
177
178 /* Move bytes brute force */
179
180 while (*src_string) {
181 *string = *src_string;
182
183 string++;
184 src_string++;
185 }
186
187 /* Null terminate */
188
189 *string = 0;
190 return (dst_string);
191}
192
193/*******************************************************************************
194 *
195 * FUNCTION: acpi_ut_strncpy (strncpy)
196 *
197 * PARAMETERS: dst_string - Target of the copy
198 * src_string - The source string to copy
199 * count - Maximum # of bytes to copy
200 *
201 * RETURN: dst_string
202 *
203 * DESCRIPTION: Copy a null terminated string, with a maximum length
204 *
205 ******************************************************************************/
206
207char *acpi_ut_strncpy(char *dst_string, const char *src_string, acpi_size count)
208{
209 char *string = dst_string;
210
211 /* Copy the string */
212
213 for (string = dst_string;
214 count && (count--, (*string++ = *src_string++));) {;
215 }
216
217 /* Pad with nulls if necessary */
218
219 while (count--) {
220 *string = 0;
221 string++;
222 }
223
224 /* Return original pointer */
225
226 return (dst_string);
227}
228
229/*******************************************************************************
230 *
231 * FUNCTION: acpi_ut_strcmp (strcmp)
232 *
233 * PARAMETERS: string1 - First string
234 * string2 - Second string
235 *
236 * RETURN: Index where strings mismatched, or 0 if strings matched
237 *
238 * DESCRIPTION: Compare two null terminated strings
239 *
240 ******************************************************************************/
241
242int acpi_ut_strcmp(const char *string1, const char *string2)
243{
244
245 for (; (*string1 == *string2); string2++) {
246 if (!*string1++) {
247 return (0);
248 }
249 }
250
251 return ((unsigned char)*string1 - (unsigned char)*string2);
252}
253
254#ifdef ACPI_FUTURE_IMPLEMENTATION
255/* Not used at this time */
256/*******************************************************************************
257 *
258 * FUNCTION: acpi_ut_strchr (strchr)
259 *
260 * PARAMETERS: string - Search string
261 * ch - character to search for
262 *
263 * RETURN: Ptr to char or NULL if not found
264 *
265 * DESCRIPTION: Search a string for a character
266 *
267 ******************************************************************************/
268
269char *acpi_ut_strchr(const char *string, int ch)
270{
271
272 for (; (*string); string++) {
273 if ((*string) == (char)ch) {
274 return ((char *)string);
275 }
276 }
277
278 return (NULL);
279}
280#endif
281
282/*******************************************************************************
283 *
284 * FUNCTION: acpi_ut_strncmp (strncmp)
285 *
286 * PARAMETERS: string1 - First string
287 * string2 - Second string
288 * count - Maximum # of bytes to compare
289 *
290 * RETURN: Index where strings mismatched, or 0 if strings matched
291 *
292 * DESCRIPTION: Compare two null terminated strings, with a maximum length
293 *
294 ******************************************************************************/
295
296int acpi_ut_strncmp(const char *string1, const char *string2, acpi_size count)
297{
298
299 for (; count-- && (*string1 == *string2); string2++) {
300 if (!*string1++) {
301 return (0);
302 }
303 }
304
305 return ((count == ACPI_SIZE_MAX) ? 0 : ((unsigned char)*string1 -
306 (unsigned char)*string2));
307}
308
309/*******************************************************************************
310 *
311 * FUNCTION: acpi_ut_strcat (Strcat)
312 *
313 * PARAMETERS: dst_string - Target of the copy
314 * src_string - The source string to copy
315 *
316 * RETURN: dst_string
317 *
318 * DESCRIPTION: Append a null terminated string to a null terminated string
319 *
320 ******************************************************************************/
321
322char *acpi_ut_strcat(char *dst_string, const char *src_string)
323{
324 char *string;
325
326 /* Find end of the destination string */
327
328 for (string = dst_string; *string++;) {;
329 }
330
331 /* Concatenate the string */
332
333 for (--string; (*string++ = *src_string++);) {;
334 }
335
336 return (dst_string);
337}
338
339/*******************************************************************************
340 *
341 * FUNCTION: acpi_ut_strncat (strncat)
342 *
343 * PARAMETERS: dst_string - Target of the copy
344 * src_string - The source string to copy
345 * count - Maximum # of bytes to copy
346 *
347 * RETURN: dst_string
348 *
349 * DESCRIPTION: Append a null terminated string to a null terminated string,
350 * with a maximum count.
351 *
352 ******************************************************************************/
353
354char *acpi_ut_strncat(char *dst_string, const char *src_string, acpi_size count)
355{
356 char *string;
357
358 if (count) {
359
360 /* Find end of the destination string */
361
362 for (string = dst_string; *string++;) {;
363 }
364
365 /* Concatenate the string */
366
367 for (--string; (*string++ = *src_string++) && --count;) {;
368 }
369
370 /* Null terminate if necessary */
371
372 if (!count) {
373 *string = 0;
374 }
375 }
376
377 return (dst_string);
378}
379
380/*******************************************************************************
381 *
382 * FUNCTION: acpi_ut_strstr (strstr)
383 *
384 * PARAMETERS: string1 - Target string
385 * string2 - Substring to search for
386 *
387 * RETURN: Where substring match starts, Null if no match found
388 *
389 * DESCRIPTION: Checks if String2 occurs in String1. This is not really a
390 * full implementation of strstr, only sufficient for command
391 * matching
392 *
393 ******************************************************************************/
394
395char *acpi_ut_strstr(char *string1, char *string2)
396{
397 char *string;
398
399 if (acpi_ut_strlen(string2) > acpi_ut_strlen(string1)) {
400 return (NULL);
401 }
402
403 /* Walk entire string, comparing the letters */
404
405 for (string = string1; *string2;) {
406 if (*string2 != *string) {
407 return (NULL);
408 }
409
410 string2++;
411 string++;
412 }
413
414 return (string1);
415}
416
417/*******************************************************************************
418 *
419 * FUNCTION: acpi_ut_strtoul (strtoul)
420 *
421 * PARAMETERS: string - Null terminated string
422 * terminater - Where a pointer to the terminating byte is
423 * returned
424 * base - Radix of the string
425 *
426 * RETURN: Converted value
427 *
428 * DESCRIPTION: Convert a string into a 32-bit unsigned value.
429 * Note: use acpi_ut_strtoul64 for 64-bit integers.
430 *
431 ******************************************************************************/
432
433u32 acpi_ut_strtoul(const char *string, char **terminator, u32 base)
434{
435 u32 converted = 0;
436 u32 index;
437 u32 sign;
438 const char *string_start;
439 u32 return_value = 0;
440 acpi_status status = AE_OK;
441
442 /*
443 * Save the value of the pointer to the buffer's first
444 * character, save the current errno value, and then
445 * skip over any white space in the buffer:
446 */
447 string_start = string;
448 while (ACPI_IS_SPACE(*string) || *string == '\t') {
449 ++string;
450 }
451
452 /*
453 * The buffer may contain an optional plus or minus sign.
454 * If it does, then skip over it but remember what is was:
455 */
456 if (*string == '-') {
457 sign = NEGATIVE;
458 ++string;
459 } else if (*string == '+') {
460 ++string;
461 sign = POSITIVE;
462 } else {
463 sign = POSITIVE;
464 }
465
466 /*
467 * If the input parameter Base is zero, then we need to
468 * determine if it is octal, decimal, or hexadecimal:
469 */
470 if (base == 0) {
471 if (*string == '0') {
472 if (acpi_ut_to_lower(*(++string)) == 'x') {
473 base = 16;
474 ++string;
475 } else {
476 base = 8;
477 }
478 } else {
479 base = 10;
480 }
481 } else if (base < 2 || base > 36) {
482 /*
483 * The specified Base parameter is not in the domain of
484 * this function:
485 */
486 goto done;
487 }
488
489 /*
490 * For octal and hexadecimal bases, skip over the leading
491 * 0 or 0x, if they are present.
492 */
493 if (base == 8 && *string == '0') {
494 string++;
495 }
496
497 if (base == 16 &&
498 *string == '0' && acpi_ut_to_lower(*(++string)) == 'x') {
499 string++;
500 }
501
502 /*
503 * Main loop: convert the string to an unsigned long:
504 */
505 while (*string) {
506 if (ACPI_IS_DIGIT(*string)) {
507 index = (u32)((u8)*string - '0');
508 } else {
509 index = (u32)acpi_ut_to_upper(*string);
510 if (ACPI_IS_UPPER(index)) {
511 index = index - 'A' + 10;
512 } else {
513 goto done;
514 }
515 }
516
517 if (index >= base) {
518 goto done;
519 }
520
521 /*
522 * Check to see if value is out of range:
523 */
524
525 if (return_value > ((ACPI_UINT32_MAX - (u32)index) / (u32)base)) {
526 status = AE_ERROR;
527 return_value = 0; /* reset */
528 } else {
529 return_value *= base;
530 return_value += index;
531 converted = 1;
532 }
533
534 ++string;
535 }
536
537 done:
538 /*
539 * If appropriate, update the caller's pointer to the next
540 * unconverted character in the buffer.
541 */
542 if (terminator) {
543 if (converted == 0 && return_value == 0 && string != NULL) {
544 *terminator = (char *)string_start;
545 } else {
546 *terminator = (char *)string;
547 }
548 }
549
550 if (status == AE_ERROR) {
551 return_value = ACPI_UINT32_MAX;
552 }
553
554 /*
555 * If a minus sign was present, then "the conversion is negated":
556 */
557 if (sign == NEGATIVE) {
558 return_value = (ACPI_UINT32_MAX - return_value) + 1;
559 }
560
561 return (return_value);
562}
563
564/*******************************************************************************
565 *
566 * FUNCTION: acpi_ut_to_upper (TOUPPER)
567 *
568 * PARAMETERS: c - Character to convert
569 *
570 * RETURN: Converted character as an int
571 *
572 * DESCRIPTION: Convert character to uppercase
573 *
574 ******************************************************************************/
575
576int acpi_ut_to_upper(int c)
577{
578
579 return (ACPI_IS_LOWER(c) ? ((c) - 0x20) : (c));
580}
581
582/*******************************************************************************
583 *
584 * FUNCTION: acpi_ut_to_lower (TOLOWER)
585 *
586 * PARAMETERS: c - Character to convert
587 *
588 * RETURN: Converted character as an int
589 *
590 * DESCRIPTION: Convert character to lowercase
591 *
592 ******************************************************************************/
593
594int acpi_ut_to_lower(int c)
595{
596
597 return (ACPI_IS_UPPER(c) ? ((c) + 0x20) : (c));
598}
599
600/*******************************************************************************
601 *
602 * FUNCTION: is* functions
603 *
604 * DESCRIPTION: is* functions use the ctype table below
605 *
606 ******************************************************************************/
607
608const u8 _acpi_ctype[257] = {
609 _ACPI_CN, /* 0x00 0 NUL */
610 _ACPI_CN, /* 0x01 1 SOH */
611 _ACPI_CN, /* 0x02 2 STX */
612 _ACPI_CN, /* 0x03 3 ETX */
613 _ACPI_CN, /* 0x04 4 EOT */
614 _ACPI_CN, /* 0x05 5 ENQ */
615 _ACPI_CN, /* 0x06 6 ACK */
616 _ACPI_CN, /* 0x07 7 BEL */
617 _ACPI_CN, /* 0x08 8 BS */
618 _ACPI_CN | _ACPI_SP, /* 0x09 9 TAB */
619 _ACPI_CN | _ACPI_SP, /* 0x0A 10 LF */
620 _ACPI_CN | _ACPI_SP, /* 0x0B 11 VT */
621 _ACPI_CN | _ACPI_SP, /* 0x0C 12 FF */
622 _ACPI_CN | _ACPI_SP, /* 0x0D 13 CR */
623 _ACPI_CN, /* 0x0E 14 SO */
624 _ACPI_CN, /* 0x0F 15 SI */
625 _ACPI_CN, /* 0x10 16 DLE */
626 _ACPI_CN, /* 0x11 17 DC1 */
627 _ACPI_CN, /* 0x12 18 DC2 */
628 _ACPI_CN, /* 0x13 19 DC3 */
629 _ACPI_CN, /* 0x14 20 DC4 */
630 _ACPI_CN, /* 0x15 21 NAK */
631 _ACPI_CN, /* 0x16 22 SYN */
632 _ACPI_CN, /* 0x17 23 ETB */
633 _ACPI_CN, /* 0x18 24 CAN */
634 _ACPI_CN, /* 0x19 25 EM */
635 _ACPI_CN, /* 0x1A 26 SUB */
636 _ACPI_CN, /* 0x1B 27 ESC */
637 _ACPI_CN, /* 0x1C 28 FS */
638 _ACPI_CN, /* 0x1D 29 GS */
639 _ACPI_CN, /* 0x1E 30 RS */
640 _ACPI_CN, /* 0x1F 31 US */
641 _ACPI_XS | _ACPI_SP, /* 0x20 32 ' ' */
642 _ACPI_PU, /* 0x21 33 '!' */
643 _ACPI_PU, /* 0x22 34 '"' */
644 _ACPI_PU, /* 0x23 35 '#' */
645 _ACPI_PU, /* 0x24 36 '$' */
646 _ACPI_PU, /* 0x25 37 '%' */
647 _ACPI_PU, /* 0x26 38 '&' */
648 _ACPI_PU, /* 0x27 39 ''' */
649 _ACPI_PU, /* 0x28 40 '(' */
650 _ACPI_PU, /* 0x29 41 ')' */
651 _ACPI_PU, /* 0x2A 42 '*' */
652 _ACPI_PU, /* 0x2B 43 '+' */
653 _ACPI_PU, /* 0x2C 44 ',' */
654 _ACPI_PU, /* 0x2D 45 '-' */
655 _ACPI_PU, /* 0x2E 46 '.' */
656 _ACPI_PU, /* 0x2F 47 '/' */
657 _ACPI_XD | _ACPI_DI, /* 0x30 48 '0' */
658 _ACPI_XD | _ACPI_DI, /* 0x31 49 '1' */
659 _ACPI_XD | _ACPI_DI, /* 0x32 50 '2' */
660 _ACPI_XD | _ACPI_DI, /* 0x33 51 '3' */
661 _ACPI_XD | _ACPI_DI, /* 0x34 52 '4' */
662 _ACPI_XD | _ACPI_DI, /* 0x35 53 '5' */
663 _ACPI_XD | _ACPI_DI, /* 0x36 54 '6' */
664 _ACPI_XD | _ACPI_DI, /* 0x37 55 '7' */
665 _ACPI_XD | _ACPI_DI, /* 0x38 56 '8' */
666 _ACPI_XD | _ACPI_DI, /* 0x39 57 '9' */
667 _ACPI_PU, /* 0x3A 58 ':' */
668 _ACPI_PU, /* 0x3B 59 ';' */
669 _ACPI_PU, /* 0x3C 60 '<' */
670 _ACPI_PU, /* 0x3D 61 '=' */
671 _ACPI_PU, /* 0x3E 62 '>' */
672 _ACPI_PU, /* 0x3F 63 '?' */
673 _ACPI_PU, /* 0x40 64 '@' */
674 _ACPI_XD | _ACPI_UP, /* 0x41 65 'A' */
675 _ACPI_XD | _ACPI_UP, /* 0x42 66 'B' */
676 _ACPI_XD | _ACPI_UP, /* 0x43 67 'C' */
677 _ACPI_XD | _ACPI_UP, /* 0x44 68 'D' */
678 _ACPI_XD | _ACPI_UP, /* 0x45 69 'E' */
679 _ACPI_XD | _ACPI_UP, /* 0x46 70 'F' */
680 _ACPI_UP, /* 0x47 71 'G' */
681 _ACPI_UP, /* 0x48 72 'H' */
682 _ACPI_UP, /* 0x49 73 'I' */
683 _ACPI_UP, /* 0x4A 74 'J' */
684 _ACPI_UP, /* 0x4B 75 'K' */
685 _ACPI_UP, /* 0x4C 76 'L' */
686 _ACPI_UP, /* 0x4D 77 'M' */
687 _ACPI_UP, /* 0x4E 78 'N' */
688 _ACPI_UP, /* 0x4F 79 'O' */
689 _ACPI_UP, /* 0x50 80 'P' */
690 _ACPI_UP, /* 0x51 81 'Q' */
691 _ACPI_UP, /* 0x52 82 'R' */
692 _ACPI_UP, /* 0x53 83 'S' */
693 _ACPI_UP, /* 0x54 84 'T' */
694 _ACPI_UP, /* 0x55 85 'U' */
695 _ACPI_UP, /* 0x56 86 'V' */
696 _ACPI_UP, /* 0x57 87 'W' */
697 _ACPI_UP, /* 0x58 88 'X' */
698 _ACPI_UP, /* 0x59 89 'Y' */
699 _ACPI_UP, /* 0x5A 90 'Z' */
700 _ACPI_PU, /* 0x5B 91 '[' */
701 _ACPI_PU, /* 0x5C 92 '\' */
702 _ACPI_PU, /* 0x5D 93 ']' */
703 _ACPI_PU, /* 0x5E 94 '^' */
704 _ACPI_PU, /* 0x5F 95 '_' */
705 _ACPI_PU, /* 0x60 96 '`' */
706 _ACPI_XD | _ACPI_LO, /* 0x61 97 'a' */
707 _ACPI_XD | _ACPI_LO, /* 0x62 98 'b' */
708 _ACPI_XD | _ACPI_LO, /* 0x63 99 'c' */
709 _ACPI_XD | _ACPI_LO, /* 0x64 100 'd' */
710 _ACPI_XD | _ACPI_LO, /* 0x65 101 'e' */
711 _ACPI_XD | _ACPI_LO, /* 0x66 102 'f' */
712 _ACPI_LO, /* 0x67 103 'g' */
713 _ACPI_LO, /* 0x68 104 'h' */
714 _ACPI_LO, /* 0x69 105 'i' */
715 _ACPI_LO, /* 0x6A 106 'j' */
716 _ACPI_LO, /* 0x6B 107 'k' */
717 _ACPI_LO, /* 0x6C 108 'l' */
718 _ACPI_LO, /* 0x6D 109 'm' */
719 _ACPI_LO, /* 0x6E 110 'n' */
720 _ACPI_LO, /* 0x6F 111 'o' */
721 _ACPI_LO, /* 0x70 112 'p' */
722 _ACPI_LO, /* 0x71 113 'q' */
723 _ACPI_LO, /* 0x72 114 'r' */
724 _ACPI_LO, /* 0x73 115 's' */
725 _ACPI_LO, /* 0x74 116 't' */
726 _ACPI_LO, /* 0x75 117 'u' */
727 _ACPI_LO, /* 0x76 118 'v' */
728 _ACPI_LO, /* 0x77 119 'w' */
729 _ACPI_LO, /* 0x78 120 'x' */
730 _ACPI_LO, /* 0x79 121 'y' */
731 _ACPI_LO, /* 0x7A 122 'z' */
732 _ACPI_PU, /* 0x7B 123 '{' */
733 _ACPI_PU, /* 0x7C 124 '|' */
734 _ACPI_PU, /* 0x7D 125 '}' */
735 _ACPI_PU, /* 0x7E 126 '~' */
736 _ACPI_CN, /* 0x7F 127 DEL */
737
738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 to 0x8F */
739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 to 0x9F */
740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xA0 to 0xAF */
741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xB0 to 0xBF */
742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xC0 to 0xCF */
743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xD0 to 0xDF */
744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xE0 to 0xEF */
745 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xF0 to 0xFF */
746 0 /* 0x100 */
747};
748
749#endif /* ACPI_USE_SYSTEM_CLIBRARY */
diff --git a/drivers/acpi/apei/erst-dbg.c b/drivers/acpi/apei/erst-dbg.c
index 903549df809b..04ab5c9d3ced 100644
--- a/drivers/acpi/apei/erst-dbg.c
+++ b/drivers/acpi/apei/erst-dbg.c
@@ -111,8 +111,17 @@ retry_next:
111 if (rc) 111 if (rc)
112 goto out; 112 goto out;
113 /* no more record */ 113 /* no more record */
114 if (id == APEI_ERST_INVALID_RECORD_ID) 114 if (id == APEI_ERST_INVALID_RECORD_ID) {
115 /*
116 * If the persistent store is empty initially, the function
117 * 'erst_read' below will return "-ENOENT" value. This causes
118 * 'retry_next' label is entered again. The returned value
119 * should be zero indicating the read operation is EOF.
120 */
121 len = 0;
122
115 goto out; 123 goto out;
124 }
116retry: 125retry:
117 rc = len = erst_read(id, erst_dbg_buf, erst_dbg_buf_len); 126 rc = len = erst_read(id, erst_dbg_buf, erst_dbg_buf_len);
118 /* The record may be cleared by others, try read next record */ 127 /* The record may be cleared by others, try read next record */
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index f09dc987cf17..c6ff606c6d5b 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -358,8 +358,7 @@ static struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
358 acpi_handle handle = DEVICE_ACPI_HANDLE(dev); 358 acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
359 struct acpi_device *adev; 359 struct acpi_device *adev;
360 360
361 return handle && ACPI_SUCCESS(acpi_bus_get_device(handle, &adev)) ? 361 return handle && !acpi_bus_get_device(handle, &adev) ? adev : NULL;
362 adev : NULL;
363} 362}
364 363
365/** 364/**
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 01551840d236..95af6f674a6c 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -18,9 +18,14 @@
18 18
19#define ACPI_GLUE_DEBUG 0 19#define ACPI_GLUE_DEBUG 0
20#if ACPI_GLUE_DEBUG 20#if ACPI_GLUE_DEBUG
21#define DBG(x...) printk(PREFIX x) 21#define DBG(fmt, ...) \
22 printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__)
22#else 23#else
23#define DBG(x...) do { } while(0) 24#define DBG(fmt, ...) \
25do { \
26 if (0) \
27 printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__); \
28} while (0)
24#endif 29#endif
25static LIST_HEAD(bus_type_list); 30static LIST_HEAD(bus_type_list);
26static DECLARE_RWSEM(bus_type_sem); 31static DECLARE_RWSEM(bus_type_sem);
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 7db61b8fa11f..6e7b9d523812 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -445,11 +445,8 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle)
445 return -ENODEV; 445 return -ENODEV;
446 446
447 ret = acpi_bus_get_device(handle, &acpi_dev); 447 ret = acpi_bus_get_device(handle, &acpi_dev);
448 if (ret) 448 if (ret || !acpi_dev->power.flags.power_resources)
449 goto no_power_resource; 449 return -ENODEV;
450
451 if (!acpi_dev->power.flags.power_resources)
452 goto no_power_resource;
453 450
454 powered_device = kzalloc(sizeof(*powered_device), GFP_KERNEL); 451 powered_device = kzalloc(sizeof(*powered_device), GFP_KERNEL);
455 if (!powered_device) 452 if (!powered_device)
@@ -471,10 +468,6 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle)
471 } 468 }
472 469
473 return ret; 470 return ret;
474
475no_power_resource:
476 printk(KERN_DEBUG PREFIX "Invalid Power Resource to register!\n");
477 return -ENODEV;
478} 471}
479EXPORT_SYMBOL_GPL(acpi_power_resource_register_device); 472EXPORT_SYMBOL_GPL(acpi_power_resource_register_device);
480 473
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 53502d1bbf26..c88be6c37c30 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1346,7 +1346,7 @@ static void acpi_device_set_id(struct acpi_device *device)
1346 acpi_add_id(device, ACPI_DOCK_HID); 1346 acpi_add_id(device, ACPI_DOCK_HID);
1347 else if (!acpi_ibm_smbus_match(device)) 1347 else if (!acpi_ibm_smbus_match(device))
1348 acpi_add_id(device, ACPI_SMBUS_IBM_HID); 1348 acpi_add_id(device, ACPI_SMBUS_IBM_HID);
1349 else if (!acpi_device_hid(device) && 1349 else if (list_empty(&device->pnp.ids) &&
1350 ACPI_IS_ROOT_DEVICE(device->parent)) { 1350 ACPI_IS_ROOT_DEVICE(device->parent)) {
1351 acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */ 1351 acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */
1352 strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); 1352 strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index a2fc56d2e681..cdbad3a454a0 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -45,7 +45,6 @@ static int amba_match(struct device *dev, struct device_driver *drv)
45 return amba_lookup(pcdrv->id_table, pcdev) != NULL; 45 return amba_lookup(pcdrv->id_table, pcdev) != NULL;
46} 46}
47 47
48#ifdef CONFIG_HOTPLUG
49static int amba_uevent(struct device *dev, struct kobj_uevent_env *env) 48static int amba_uevent(struct device *dev, struct kobj_uevent_env *env)
50{ 49{
51 struct amba_device *pcdev = to_amba_device(dev); 50 struct amba_device *pcdev = to_amba_device(dev);
@@ -58,9 +57,6 @@ static int amba_uevent(struct device *dev, struct kobj_uevent_env *env)
58 retval = add_uevent_var(env, "MODALIAS=amba:d%08X", pcdev->periphid); 57 retval = add_uevent_var(env, "MODALIAS=amba:d%08X", pcdev->periphid);
59 return retval; 58 return retval;
60} 59}
61#else
62#define amba_uevent NULL
63#endif
64 60
65#define amba_attr_func(name,fmt,arg...) \ 61#define amba_attr_func(name,fmt,arg...) \
66static ssize_t name##_show(struct device *_dev, \ 62static ssize_t name##_show(struct device *_dev, \
diff --git a/drivers/amba/tegra-ahb.c b/drivers/amba/tegra-ahb.c
index 0576a7dd32a5..536c166f4253 100644
--- a/drivers/amba/tegra-ahb.c
+++ b/drivers/amba/tegra-ahb.c
@@ -243,7 +243,7 @@ static void tegra_ahb_gizmo_init(struct tegra_ahb *ahb)
243 gizmo_writel(ahb, val, AHB_MEM_PREFETCH_CFG4); 243 gizmo_writel(ahb, val, AHB_MEM_PREFETCH_CFG4);
244} 244}
245 245
246static int __devinit tegra_ahb_probe(struct platform_device *pdev) 246static int tegra_ahb_probe(struct platform_device *pdev)
247{ 247{
248 struct resource *res; 248 struct resource *res;
249 struct tegra_ahb *ahb; 249 struct tegra_ahb *ahb;
@@ -267,7 +267,7 @@ static int __devinit tegra_ahb_probe(struct platform_device *pdev)
267 return 0; 267 return 0;
268} 268}
269 269
270static const struct of_device_id tegra_ahb_of_match[] __devinitconst = { 270static const struct of_device_id tegra_ahb_of_match[] = {
271 { .compatible = "nvidia,tegra30-ahb", }, 271 { .compatible = "nvidia,tegra30-ahb", },
272 { .compatible = "nvidia,tegra20-ahb", }, 272 { .compatible = "nvidia,tegra20-ahb", },
273 {}, 273 {},
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 1cc467bdb63d..7a8a2841fe64 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -86,7 +86,7 @@ static struct scsi_host_template ahci_platform_sht = {
86 AHCI_SHT("ahci_platform"), 86 AHCI_SHT("ahci_platform"),
87}; 87};
88 88
89static int __devinit ahci_probe(struct platform_device *pdev) 89static int ahci_probe(struct platform_device *pdev)
90{ 90{
91 struct device *dev = &pdev->dev; 91 struct device *dev = &pdev->dev;
92 struct ahci_platform_data *pdata = dev_get_platdata(dev); 92 struct ahci_platform_data *pdata = dev_get_platdata(dev);
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index acffcf0b3ad3..174eca609b42 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1270,7 +1270,7 @@ static int piix_disable_ahci(struct pci_dev *pdev)
1270 * they are found return an error code so we can turn off DMA 1270 * they are found return an error code so we can turn off DMA
1271 */ 1271 */
1272 1272
1273static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev) 1273static int piix_check_450nx_errata(struct pci_dev *ata_dev)
1274{ 1274{
1275 struct pci_dev *pdev = NULL; 1275 struct pci_dev *pdev = NULL;
1276 u16 cfg; 1276 u16 cfg;
@@ -1296,8 +1296,8 @@ static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev)
1296 return no_piix_dma; 1296 return no_piix_dma;
1297} 1297}
1298 1298
1299static void __devinit piix_init_pcs(struct ata_host *host, 1299static void piix_init_pcs(struct ata_host *host,
1300 const struct piix_map_db *map_db) 1300 const struct piix_map_db *map_db)
1301{ 1301{
1302 struct pci_dev *pdev = to_pci_dev(host->dev); 1302 struct pci_dev *pdev = to_pci_dev(host->dev);
1303 u16 pcs, new_pcs; 1303 u16 pcs, new_pcs;
@@ -1313,9 +1313,9 @@ static void __devinit piix_init_pcs(struct ata_host *host,
1313 } 1313 }
1314} 1314}
1315 1315
1316static const int *__devinit piix_init_sata_map(struct pci_dev *pdev, 1316static const int *piix_init_sata_map(struct pci_dev *pdev,
1317 struct ata_port_info *pinfo, 1317 struct ata_port_info *pinfo,
1318 const struct piix_map_db *map_db) 1318 const struct piix_map_db *map_db)
1319{ 1319{
1320 const int *map; 1320 const int *map;
1321 int i, invalid_map = 0; 1321 int i, invalid_map = 0;
@@ -1392,7 +1392,7 @@ static bool piix_no_sidpr(struct ata_host *host)
1392 return false; 1392 return false;
1393} 1393}
1394 1394
1395static int __devinit piix_init_sidpr(struct ata_host *host) 1395static int piix_init_sidpr(struct ata_host *host)
1396{ 1396{
1397 struct pci_dev *pdev = to_pci_dev(host->dev); 1397 struct pci_dev *pdev = to_pci_dev(host->dev);
1398 struct piix_host_priv *hpriv = host->private_data; 1398 struct piix_host_priv *hpriv = host->private_data;
@@ -1595,8 +1595,7 @@ static void piix_ignore_devices_quirk(struct ata_host *host)
1595 * Zero on success, or -ERRNO value. 1595 * Zero on success, or -ERRNO value.
1596 */ 1596 */
1597 1597
1598static int __devinit piix_init_one(struct pci_dev *pdev, 1598static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1599 const struct pci_device_id *ent)
1600{ 1599{
1601 struct device *dev = &pdev->dev; 1600 struct device *dev = &pdev->dev;
1602 struct ata_port_info port_info[2]; 1601 struct ata_port_info port_info[2];
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 9764e80f9320..405022d302c3 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -791,7 +791,7 @@ static struct ata_port_operations arasan_cf_ops = {
791 .set_dmamode = arasan_cf_set_dmamode, 791 .set_dmamode = arasan_cf_set_dmamode,
792}; 792};
793 793
794static int __devinit arasan_cf_probe(struct platform_device *pdev) 794static int arasan_cf_probe(struct platform_device *pdev)
795{ 795{
796 struct arasan_cf_dev *acdev; 796 struct arasan_cf_dev *acdev;
797 struct arasan_cf_pdata *pdata = dev_get_platdata(&pdev->dev); 797 struct arasan_cf_pdata *pdata = dev_get_platdata(&pdev->dev);
@@ -905,7 +905,7 @@ free_clk:
905 return ret; 905 return ret;
906} 906}
907 907
908static int __devexit arasan_cf_remove(struct platform_device *pdev) 908static int arasan_cf_remove(struct platform_device *pdev)
909{ 909{
910 struct ata_host *host = dev_get_drvdata(&pdev->dev); 910 struct ata_host *host = dev_get_drvdata(&pdev->dev);
911 struct arasan_cf_dev *acdev = host->ports[0]->private_data; 911 struct arasan_cf_dev *acdev = host->ports[0]->private_data;
@@ -955,7 +955,7 @@ MODULE_DEVICE_TABLE(of, arasan_cf_id_table);
955 955
956static struct platform_driver arasan_cf_driver = { 956static struct platform_driver arasan_cf_driver = {
957 .probe = arasan_cf_probe, 957 .probe = arasan_cf_probe,
958 .remove = __devexit_p(arasan_cf_remove), 958 .remove = arasan_cf_remove,
959 .driver = { 959 .driver = {
960 .name = DRIVER_NAME, 960 .name = DRIVER_NAME,
961 .owner = THIS_MODULE, 961 .owner = THIS_MODULE,
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
index 2a96bb2c53ee..033f3f4c20ad 100644
--- a/drivers/ata/pata_at91.c
+++ b/drivers/ata/pata_at91.c
@@ -313,7 +313,7 @@ static struct ata_port_operations pata_at91_port_ops = {
313 .cable_detect = ata_cable_40wire, 313 .cable_detect = ata_cable_40wire,
314}; 314};
315 315
316static int __devinit pata_at91_probe(struct platform_device *pdev) 316static int pata_at91_probe(struct platform_device *pdev)
317{ 317{
318 struct at91_cf_data *board = pdev->dev.platform_data; 318 struct at91_cf_data *board = pdev->dev.platform_data;
319 struct device *dev = &pdev->dev; 319 struct device *dev = &pdev->dev;
@@ -420,7 +420,7 @@ err_put:
420 return ret; 420 return ret;
421} 421}
422 422
423static int __devexit pata_at91_remove(struct platform_device *pdev) 423static int pata_at91_remove(struct platform_device *pdev)
424{ 424{
425 struct ata_host *host = dev_get_drvdata(&pdev->dev); 425 struct ata_host *host = dev_get_drvdata(&pdev->dev);
426 struct at91_ide_info *info; 426 struct at91_ide_info *info;
@@ -441,7 +441,7 @@ static int __devexit pata_at91_remove(struct platform_device *pdev)
441 441
442static struct platform_driver pata_at91_driver = { 442static struct platform_driver pata_at91_driver = {
443 .probe = pata_at91_probe, 443 .probe = pata_at91_probe,
444 .remove = __devexit_p(pata_at91_remove), 444 .remove = pata_at91_remove,
445 .driver = { 445 .driver = {
446 .name = DRV_NAME, 446 .name = DRV_NAME,
447 .owner = THIS_MODULE, 447 .owner = THIS_MODULE,
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 1e65842e2ca7..8d43510c6bec 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1538,7 +1538,7 @@ static unsigned short atapi_io_port[] = {
1538 * - IRQ (IORESOURCE_IRQ) 1538 * - IRQ (IORESOURCE_IRQ)
1539 * 1539 *
1540 */ 1540 */
1541static int __devinit bfin_atapi_probe(struct platform_device *pdev) 1541static int bfin_atapi_probe(struct platform_device *pdev)
1542{ 1542{
1543 int board_idx = 0; 1543 int board_idx = 0;
1544 struct resource *res; 1544 struct resource *res;
@@ -1608,7 +1608,7 @@ static int __devinit bfin_atapi_probe(struct platform_device *pdev)
1608 * A bfin atapi device has been unplugged. Perform the needed 1608 * A bfin atapi device has been unplugged. Perform the needed
1609 * cleanup. Also called on module unload for any active devices. 1609 * cleanup. Also called on module unload for any active devices.
1610 */ 1610 */
1611static int __devexit bfin_atapi_remove(struct platform_device *pdev) 1611static int bfin_atapi_remove(struct platform_device *pdev)
1612{ 1612{
1613 struct device *dev = &pdev->dev; 1613 struct device *dev = &pdev->dev;
1614 struct ata_host *host = dev_get_drvdata(dev); 1614 struct ata_host *host = dev_get_drvdata(dev);
@@ -1654,7 +1654,7 @@ static int bfin_atapi_resume(struct platform_device *pdev)
1654 1654
1655static struct platform_driver bfin_atapi_driver = { 1655static struct platform_driver bfin_atapi_driver = {
1656 .probe = bfin_atapi_probe, 1656 .probe = bfin_atapi_probe,
1657 .remove = __devexit_p(bfin_atapi_remove), 1657 .remove = bfin_atapi_remove,
1658 .suspend = bfin_atapi_suspend, 1658 .suspend = bfin_atapi_suspend,
1659 .resume = bfin_atapi_resume, 1659 .resume = bfin_atapi_resume,
1660 .driver = { 1660 .driver = {
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index de74d804f031..bfcf377e8f77 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -115,7 +115,7 @@ static struct ata_port_operations cs5520_port_ops = {
115 .set_piomode = cs5520_set_piomode, 115 .set_piomode = cs5520_set_piomode,
116}; 116};
117 117
118static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id) 118static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
119{ 119{
120 static const unsigned int cmd_port[] = { 0x1F0, 0x170 }; 120 static const unsigned int cmd_port[] = { 0x1F0, 0x170 };
121 static const unsigned int ctl_port[] = { 0x3F6, 0x376 }; 121 static const unsigned int ctl_port[] = { 0x3F6, 0x376 };
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index 3982cef91f3c..556222f04731 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -910,7 +910,7 @@ static struct ata_port_operations ep93xx_pata_port_ops = {
910 .port_start = ep93xx_pata_port_start, 910 .port_start = ep93xx_pata_port_start,
911}; 911};
912 912
913static int __devinit ep93xx_pata_probe(struct platform_device *pdev) 913static int ep93xx_pata_probe(struct platform_device *pdev)
914{ 914{
915 struct ep93xx_pata_data *drv_data; 915 struct ep93xx_pata_data *drv_data;
916 struct ata_host *host; 916 struct ata_host *host;
@@ -1011,7 +1011,7 @@ err_rel_gpio:
1011 return err; 1011 return err;
1012} 1012}
1013 1013
1014static int __devexit ep93xx_pata_remove(struct platform_device *pdev) 1014static int ep93xx_pata_remove(struct platform_device *pdev)
1015{ 1015{
1016 struct ata_host *host = platform_get_drvdata(pdev); 1016 struct ata_host *host = platform_get_drvdata(pdev);
1017 struct ep93xx_pata_data *drv_data = host->private_data; 1017 struct ep93xx_pata_data *drv_data = host->private_data;
@@ -1029,7 +1029,7 @@ static struct platform_driver ep93xx_pata_platform_driver = {
1029 .owner = THIS_MODULE, 1029 .owner = THIS_MODULE,
1030 }, 1030 },
1031 .probe = ep93xx_pata_probe, 1031 .probe = ep93xx_pata_probe,
1032 .remove = __devexit_p(ep93xx_pata_remove), 1032 .remove = ep93xx_pata_remove,
1033}; 1033};
1034 1034
1035module_platform_driver(ep93xx_pata_platform_driver); 1035module_platform_driver(ep93xx_pata_platform_driver);
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
index 52e7e7b8c74f..d7c732042a4f 100644
--- a/drivers/ata/pata_icside.c
+++ b/drivers/ata/pata_icside.c
@@ -337,10 +337,9 @@ static struct ata_port_operations pata_icside_port_ops = {
337 .port_start = ATA_OP_NULL, /* don't need PRD table */ 337 .port_start = ATA_OP_NULL, /* don't need PRD table */
338}; 338};
339 339
340static void __devinit 340static void pata_icside_setup_ioaddr(struct ata_port *ap, void __iomem *base,
341pata_icside_setup_ioaddr(struct ata_port *ap, void __iomem *base, 341 struct pata_icside_info *info,
342 struct pata_icside_info *info, 342 const struct portinfo *port)
343 const struct portinfo *port)
344{ 343{
345 struct ata_ioports *ioaddr = &ap->ioaddr; 344 struct ata_ioports *ioaddr = &ap->ioaddr;
346 void __iomem *cmd = base + port->dataoffset; 345 void __iomem *cmd = base + port->dataoffset;
@@ -368,7 +367,7 @@ pata_icside_setup_ioaddr(struct ata_port *ap, void __iomem *base,
368 ata_port_desc(ap, "iocbase 0x%lx", info->raw_ioc_base); 367 ata_port_desc(ap, "iocbase 0x%lx", info->raw_ioc_base);
369} 368}
370 369
371static int __devinit pata_icside_register_v5(struct pata_icside_info *info) 370static int pata_icside_register_v5(struct pata_icside_info *info)
372{ 371{
373 struct pata_icside_state *state = info->state; 372 struct pata_icside_state *state = info->state;
374 void __iomem *base; 373 void __iomem *base;
@@ -391,7 +390,7 @@ static int __devinit pata_icside_register_v5(struct pata_icside_info *info)
391 return 0; 390 return 0;
392} 391}
393 392
394static int __devinit pata_icside_register_v6(struct pata_icside_info *info) 393static int pata_icside_register_v6(struct pata_icside_info *info)
395{ 394{
396 struct pata_icside_state *state = info->state; 395 struct pata_icside_state *state = info->state;
397 struct expansion_card *ec = info->ec; 396 struct expansion_card *ec = info->ec;
@@ -434,7 +433,7 @@ static int __devinit pata_icside_register_v6(struct pata_icside_info *info)
434 return icside_dma_init(info); 433 return icside_dma_init(info);
435} 434}
436 435
437static int __devinit pata_icside_add_ports(struct pata_icside_info *info) 436static int pata_icside_add_ports(struct pata_icside_info *info)
438{ 437{
439 struct expansion_card *ec = info->ec; 438 struct expansion_card *ec = info->ec;
440 struct ata_host *host; 439 struct ata_host *host;
@@ -474,8 +473,8 @@ static int __devinit pata_icside_add_ports(struct pata_icside_info *info)
474 &pata_icside_sht); 473 &pata_icside_sht);
475} 474}
476 475
477static int __devinit 476static int pata_icside_probe(struct expansion_card *ec,
478pata_icside_probe(struct expansion_card *ec, const struct ecard_id *id) 477 const struct ecard_id *id)
479{ 478{
480 struct pata_icside_state *state; 479 struct pata_icside_state *state;
481 struct pata_icside_info info; 480 struct pata_icside_info info;
@@ -575,7 +574,7 @@ static void pata_icside_shutdown(struct expansion_card *ec)
575 } 574 }
576} 575}
577 576
578static void __devexit pata_icside_remove(struct expansion_card *ec) 577static void pata_icside_remove(struct expansion_card *ec)
579{ 578{
580 struct ata_host *host = ecard_get_drvdata(ec); 579 struct ata_host *host = ecard_get_drvdata(ec);
581 struct pata_icside_state *state = host->private_data; 580 struct pata_icside_state *state = host->private_data;
@@ -602,7 +601,7 @@ static const struct ecard_id pata_icside_ids[] = {
602 601
603static struct ecard_driver pata_icside_driver = { 602static struct ecard_driver pata_icside_driver = {
604 .probe = pata_icside_probe, 603 .probe = pata_icside_probe,
605 .remove = __devexit_p(pata_icside_remove), 604 .remove = pata_icside_remove,
606 .shutdown = pata_icside_shutdown, 605 .shutdown = pata_icside_shutdown,
607 .id_table = pata_icside_ids, 606 .id_table = pata_icside_ids,
608 .drv = { 607 .drv = {
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index 7d40b526ef11..40849445a9dc 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -91,7 +91,7 @@ static void pata_imx_setup_port(struct ata_ioports *ioaddr)
91 ioaddr->command_addr = ioaddr->cmd_addr + (ATA_REG_CMD << 2); 91 ioaddr->command_addr = ioaddr->cmd_addr + (ATA_REG_CMD << 2);
92} 92}
93 93
94static int __devinit pata_imx_probe(struct platform_device *pdev) 94static int pata_imx_probe(struct platform_device *pdev)
95{ 95{
96 struct ata_host *host; 96 struct ata_host *host;
97 struct ata_port *ap; 97 struct ata_port *ap;
@@ -167,7 +167,7 @@ free_priv:
167 return -ENOMEM; 167 return -ENOMEM;
168} 168}
169 169
170static int __devexit pata_imx_remove(struct platform_device *pdev) 170static int pata_imx_remove(struct platform_device *pdev)
171{ 171{
172 struct ata_host *host = dev_get_drvdata(&pdev->dev); 172 struct ata_host *host = dev_get_drvdata(&pdev->dev);
173 struct pata_imx_priv *priv = host->private_data; 173 struct pata_imx_priv *priv = host->private_data;
@@ -225,7 +225,7 @@ static const struct dev_pm_ops pata_imx_pm_ops = {
225 225
226static struct platform_driver pata_imx_driver = { 226static struct platform_driver pata_imx_driver = {
227 .probe = pata_imx_probe, 227 .probe = pata_imx_probe,
228 .remove = __devexit_p(pata_imx_remove), 228 .remove = pata_imx_remove,
229 .driver = { 229 .driver = {
230 .name = DRV_NAME, 230 .name = DRV_NAME,
231 .owner = THIS_MODULE, 231 .owner = THIS_MODULE,
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 0566e67b5e12..dcc6b243e525 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -137,7 +137,7 @@ static void ixp4xx_setup_port(struct ata_port *ap,
137 ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", raw_cmd, raw_ctl); 137 ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", raw_cmd, raw_ctl);
138} 138}
139 139
140static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) 140static int ixp4xx_pata_probe(struct platform_device *pdev)
141{ 141{
142 unsigned int irq; 142 unsigned int irq;
143 struct resource *cs0, *cs1; 143 struct resource *cs0, *cs1;
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index b057e3fa44bc..e5725edcf515 100644
--- a/drivers/ata/pata_macio.c
+++ b/drivers/ata/pata_macio.c
@@ -935,7 +935,7 @@ static struct ata_port_operations pata_macio_ops = {
935 .sff_irq_clear = pata_macio_irq_clear, 935 .sff_irq_clear = pata_macio_irq_clear,
936}; 936};
937 937
938static void __devinit pata_macio_invariants(struct pata_macio_priv *priv) 938static void pata_macio_invariants(struct pata_macio_priv *priv)
939{ 939{
940 const int *bidp; 940 const int *bidp;
941 941
@@ -976,9 +976,8 @@ static void __devinit pata_macio_invariants(struct pata_macio_priv *priv)
976 priv->aapl_bus_id = 1; 976 priv->aapl_bus_id = 1;
977} 977}
978 978
979static void __devinit pata_macio_setup_ios(struct ata_ioports *ioaddr, 979static void pata_macio_setup_ios(struct ata_ioports *ioaddr,
980 void __iomem * base, 980 void __iomem * base, void __iomem * dma)
981 void __iomem * dma)
982{ 981{
983 /* cmd_addr is the base of regs for that port */ 982 /* cmd_addr is the base of regs for that port */
984 ioaddr->cmd_addr = base; 983 ioaddr->cmd_addr = base;
@@ -999,8 +998,8 @@ static void __devinit pata_macio_setup_ios(struct ata_ioports *ioaddr,
999 ioaddr->bmdma_addr = dma; 998 ioaddr->bmdma_addr = dma;
1000} 999}
1001 1000
1002static void __devinit pmac_macio_calc_timing_masks(struct pata_macio_priv *priv, 1001static void pmac_macio_calc_timing_masks(struct pata_macio_priv *priv,
1003 struct ata_port_info *pinfo) 1002 struct ata_port_info *pinfo)
1004{ 1003{
1005 int i = 0; 1004 int i = 0;
1006 1005
@@ -1027,11 +1026,11 @@ static void __devinit pmac_macio_calc_timing_masks(struct pata_macio_priv *priv,
1027 pinfo->pio_mask, pinfo->mwdma_mask, pinfo->udma_mask); 1026 pinfo->pio_mask, pinfo->mwdma_mask, pinfo->udma_mask);
1028} 1027}
1029 1028
1030static int __devinit pata_macio_common_init(struct pata_macio_priv *priv, 1029static int pata_macio_common_init(struct pata_macio_priv *priv,
1031 resource_size_t tfregs, 1030 resource_size_t tfregs,
1032 resource_size_t dmaregs, 1031 resource_size_t dmaregs,
1033 resource_size_t fcregs, 1032 resource_size_t fcregs,
1034 unsigned long irq) 1033 unsigned long irq)
1035{ 1034{
1036 struct ata_port_info pinfo; 1035 struct ata_port_info pinfo;
1037 const struct ata_port_info *ppi[] = { &pinfo, NULL }; 1036 const struct ata_port_info *ppi[] = { &pinfo, NULL };
@@ -1113,8 +1112,8 @@ static int __devinit pata_macio_common_init(struct pata_macio_priv *priv,
1113 &pata_macio_sht); 1112 &pata_macio_sht);
1114} 1113}
1115 1114
1116static int __devinit pata_macio_attach(struct macio_dev *mdev, 1115static int pata_macio_attach(struct macio_dev *mdev,
1117 const struct of_device_id *match) 1116 const struct of_device_id *match)
1118{ 1117{
1119 struct pata_macio_priv *priv; 1118 struct pata_macio_priv *priv;
1120 resource_size_t tfregs, dmaregs = 0; 1119 resource_size_t tfregs, dmaregs = 0;
@@ -1190,7 +1189,7 @@ static int __devinit pata_macio_attach(struct macio_dev *mdev,
1190 return rc; 1189 return rc;
1191} 1190}
1192 1191
1193static int __devexit pata_macio_detach(struct macio_dev *mdev) 1192static int pata_macio_detach(struct macio_dev *mdev)
1194{ 1193{
1195 struct ata_host *host = macio_get_drvdata(mdev); 1194 struct ata_host *host = macio_get_drvdata(mdev);
1196 struct pata_macio_priv *priv = host->private_data; 1195 struct pata_macio_priv *priv = host->private_data;
@@ -1257,8 +1256,8 @@ static void pata_macio_mb_event(struct macio_dev* mdev, int mb_state)
1257#endif /* CONFIG_PMAC_MEDIABAY */ 1256#endif /* CONFIG_PMAC_MEDIABAY */
1258 1257
1259 1258
1260static int __devinit pata_macio_pci_attach(struct pci_dev *pdev, 1259static int pata_macio_pci_attach(struct pci_dev *pdev,
1261 const struct pci_device_id *id) 1260 const struct pci_device_id *id)
1262{ 1261{
1263 struct pata_macio_priv *priv; 1262 struct pata_macio_priv *priv;
1264 struct device_node *np; 1263 struct device_node *np;
@@ -1310,7 +1309,7 @@ static int __devinit pata_macio_pci_attach(struct pci_dev *pdev,
1310 return 0; 1309 return 0;
1311} 1310}
1312 1311
1313static void __devexit pata_macio_pci_detach(struct pci_dev *pdev) 1312static void pata_macio_pci_detach(struct pci_dev *pdev)
1314{ 1313{
1315 struct ata_host *host = dev_get_drvdata(&pdev->dev); 1314 struct ata_host *host = dev_get_drvdata(&pdev->dev);
1316 1315
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index ec67f54dc56f..652f57e83484 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -621,9 +621,10 @@ static struct ata_port_operations mpc52xx_ata_port_ops = {
621 .qc_prep = ata_noop_qc_prep, 621 .qc_prep = ata_noop_qc_prep,
622}; 622};
623 623
624static int __devinit 624static int mpc52xx_ata_init_one(struct device *dev,
625mpc52xx_ata_init_one(struct device *dev, struct mpc52xx_ata_priv *priv, 625 struct mpc52xx_ata_priv *priv,
626 unsigned long raw_ata_regs, int mwdma_mask, int udma_mask) 626 unsigned long raw_ata_regs,
627 int mwdma_mask, int udma_mask)
627{ 628{
628 struct ata_host *host; 629 struct ata_host *host;
629 struct ata_port *ap; 630 struct ata_port *ap;
@@ -667,8 +668,7 @@ mpc52xx_ata_init_one(struct device *dev, struct mpc52xx_ata_priv *priv,
667/* OF Platform driver */ 668/* OF Platform driver */
668/* ======================================================================== */ 669/* ======================================================================== */
669 670
670static int __devinit 671static int mpc52xx_ata_probe(struct platform_device *op)
671mpc52xx_ata_probe(struct platform_device *op)
672{ 672{
673 unsigned int ipb_freq; 673 unsigned int ipb_freq;
674 struct resource res_mem; 674 struct resource res_mem;
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 4e1194b4c271..ff2e57f3b597 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -840,7 +840,7 @@ static struct ata_port_operations octeon_cf_ops = {
840 .dev_config = octeon_cf_dev_config, 840 .dev_config = octeon_cf_dev_config,
841}; 841};
842 842
843static int __devinit octeon_cf_probe(struct platform_device *pdev) 843static int octeon_cf_probe(struct platform_device *pdev)
844{ 844{
845 struct resource *res_cs0, *res_cs1; 845 struct resource *res_cs0, *res_cs1;
846 846
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index e5b234c370fa..a7e95a54c782 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -16,7 +16,7 @@
16#include <linux/ata_platform.h> 16#include <linux/ata_platform.h>
17#include <linux/libata.h> 17#include <linux/libata.h>
18 18
19static int __devinit pata_of_platform_probe(struct platform_device *ofdev) 19static int pata_of_platform_probe(struct platform_device *ofdev)
20{ 20{
21 int ret; 21 int ret;
22 struct device_node *dn = ofdev->dev.of_node; 22 struct device_node *dn = ofdev->dev.of_node;
diff --git a/drivers/ata/pata_palmld.c b/drivers/ata/pata_palmld.c
index f9f79fc04a8f..df2bb7504fc8 100644
--- a/drivers/ata/pata_palmld.c
+++ b/drivers/ata/pata_palmld.c
@@ -48,7 +48,7 @@ static struct ata_port_operations palmld_port_ops = {
48 .cable_detect = ata_cable_40wire, 48 .cable_detect = ata_cable_40wire,
49}; 49};
50 50
51static __devinit int palmld_pata_probe(struct platform_device *pdev) 51static int palmld_pata_probe(struct platform_device *pdev)
52{ 52{
53 struct ata_host *host; 53 struct ata_host *host;
54 struct ata_port *ap; 54 struct ata_port *ap;
@@ -109,7 +109,7 @@ err1:
109 return ret; 109 return ret;
110} 110}
111 111
112static __devexit int palmld_pata_remove(struct platform_device *dev) 112static int palmld_pata_remove(struct platform_device *dev)
113{ 113{
114 ata_platform_remove_one(dev); 114 ata_platform_remove_one(dev);
115 115
@@ -127,7 +127,7 @@ static struct platform_driver palmld_pata_platform_driver = {
127 .owner = THIS_MODULE, 127 .owner = THIS_MODULE,
128 }, 128 },
129 .probe = palmld_pata_probe, 129 .probe = palmld_pata_probe,
130 .remove = __devexit_p(palmld_pata_remove), 130 .remove = palmld_pata_remove,
131}; 131};
132 132
133module_platform_driver(palmld_pata_platform_driver); 133module_platform_driver(palmld_pata_platform_driver);
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index c9399c8688c5..3f94a886bb35 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -700,7 +700,8 @@ static void pdc_ata_setup_port(struct ata_ioports *port, void __iomem *base)
700 * @pdev: instance of pci_dev found 700 * @pdev: instance of pci_dev found
701 * @ent: matching entry in the id_tbl[] 701 * @ent: matching entry in the id_tbl[]
702 */ 702 */
703static int __devinit pdc2027x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 703static int pdc2027x_init_one(struct pci_dev *pdev,
704 const struct pci_device_id *ent)
704{ 705{
705 static const unsigned long cmd_offset[] = { 0x17c0, 0x15c0 }; 706 static const unsigned long cmd_offset[] = { 0x17c0, 0x15c0 };
706 static const unsigned long bmdma_offset[] = { 0x1000, 0x1008 }; 707 static const unsigned long bmdma_offset[] = { 0x1000, 0x1008 };
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index f4372d0c7ce6..71e093767f4e 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -98,12 +98,9 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr,
98 * 98 *
99 * If no IRQ resource is present, PIO polling mode is used instead. 99 * If no IRQ resource is present, PIO polling mode is used instead.
100 */ 100 */
101int __devinit __pata_platform_probe(struct device *dev, 101int __pata_platform_probe(struct device *dev, struct resource *io_res,
102 struct resource *io_res, 102 struct resource *ctl_res, struct resource *irq_res,
103 struct resource *ctl_res, 103 unsigned int ioport_shift, int __pio_mask)
104 struct resource *irq_res,
105 unsigned int ioport_shift,
106 int __pio_mask)
107{ 104{
108 struct ata_host *host; 105 struct ata_host *host;
109 struct ata_port *ap; 106 struct ata_port *ap;
@@ -178,7 +175,7 @@ int __devinit __pata_platform_probe(struct device *dev,
178} 175}
179EXPORT_SYMBOL_GPL(__pata_platform_probe); 176EXPORT_SYMBOL_GPL(__pata_platform_probe);
180 177
181static int __devinit pata_platform_probe(struct platform_device *pdev) 178static int pata_platform_probe(struct platform_device *pdev)
182{ 179{
183 struct resource *io_res; 180 struct resource *io_res;
184 struct resource *ctl_res; 181 struct resource *ctl_res;
diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c
index 4b8ba559fe24..b0ac9e0c5e01 100644
--- a/drivers/ata/pata_pxa.c
+++ b/drivers/ata/pata_pxa.c
@@ -229,7 +229,7 @@ static void pxa_ata_dma_irq(int dma, void *port)
229 complete(&pd->dma_done); 229 complete(&pd->dma_done);
230} 230}
231 231
232static int __devinit pxa_ata_probe(struct platform_device *pdev) 232static int pxa_ata_probe(struct platform_device *pdev)
233{ 233{
234 struct ata_host *host; 234 struct ata_host *host;
235 struct ata_port *ap; 235 struct ata_port *ap;
@@ -369,7 +369,7 @@ static int __devinit pxa_ata_probe(struct platform_device *pdev)
369 return ret; 369 return ret;
370} 370}
371 371
372static int __devexit pxa_ata_remove(struct platform_device *pdev) 372static int pxa_ata_remove(struct platform_device *pdev)
373{ 373{
374 struct ata_host *host = dev_get_drvdata(&pdev->dev); 374 struct ata_host *host = dev_get_drvdata(&pdev->dev);
375 struct pata_pxa_data *data = host->ports[0]->private_data; 375 struct pata_pxa_data *data = host->ports[0]->private_data;
@@ -383,7 +383,7 @@ static int __devexit pxa_ata_remove(struct platform_device *pdev)
383 383
384static struct platform_driver pxa_ata_driver = { 384static struct platform_driver pxa_ata_driver = {
385 .probe = pxa_ata_probe, 385 .probe = pxa_ata_probe,
386 .remove = __devexit_p(pxa_ata_remove), 386 .remove = pxa_ata_remove,
387 .driver = { 387 .driver = {
388 .name = DRV_NAME, 388 .name = DRV_NAME,
389 .owner = THIS_MODULE, 389 .owner = THIS_MODULE,
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index 9417101bd5ca..3c5eb8fa6bd1 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -102,7 +102,7 @@ static void rb532_pata_setup_ports(struct ata_host *ah)
102 ap->ioaddr.error_addr = info->iobase + RB500_CF_REG_ERR; 102 ap->ioaddr.error_addr = info->iobase + RB500_CF_REG_ERR;
103} 103}
104 104
105static __devinit int rb532_pata_driver_probe(struct platform_device *pdev) 105static int rb532_pata_driver_probe(struct platform_device *pdev)
106{ 106{
107 int irq; 107 int irq;
108 int gpio; 108 int gpio;
@@ -177,7 +177,7 @@ err_free_gpio:
177 return ret; 177 return ret;
178} 178}
179 179
180static __devexit int rb532_pata_driver_remove(struct platform_device *pdev) 180static int rb532_pata_driver_remove(struct platform_device *pdev)
181{ 181{
182 struct ata_host *ah = platform_get_drvdata(pdev); 182 struct ata_host *ah = platform_get_drvdata(pdev);
183 struct rb532_cf_info *info = ah->private_data; 183 struct rb532_cf_info *info = ah->private_data;
@@ -190,7 +190,7 @@ static __devexit int rb532_pata_driver_remove(struct platform_device *pdev)
190 190
191static struct platform_driver rb532_pata_platform_driver = { 191static struct platform_driver rb532_pata_platform_driver = {
192 .probe = rb532_pata_driver_probe, 192 .probe = rb532_pata_driver_probe,
193 .remove = __devexit_p(rb532_pata_driver_remove), 193 .remove = rb532_pata_driver_remove,
194 .driver = { 194 .driver = {
195 .name = DRV_NAME, 195 .name = DRV_NAME,
196 .owner = THIS_MODULE, 196 .owner = THIS_MODULE,
diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c
index e71f998dd90d..6a8665574fee 100644
--- a/drivers/ata/pata_rdc.c
+++ b/drivers/ata/pata_rdc.c
@@ -321,8 +321,7 @@ static struct scsi_host_template rdc_sht = {
321 * Zero on success, or -ERRNO value. 321 * Zero on success, or -ERRNO value.
322 */ 322 */
323 323
324static int __devinit rdc_init_one(struct pci_dev *pdev, 324static int rdc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
325 const struct pci_device_id *ent)
326{ 325{
327 struct device *dev = &pdev->dev; 326 struct device *dev = &pdev->dev;
328 struct ata_port_info port_info[2]; 327 struct ata_port_info port_info[2];
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c
index db0d18cf1c2a..d3830c45a369 100644
--- a/drivers/ata/pata_sch.c
+++ b/drivers/ata/pata_sch.c
@@ -169,8 +169,7 @@ static void sch_set_dmamode(struct ata_port *ap, struct ata_device *adev)
169 * Zero on success, or -ERRNO value. 169 * Zero on success, or -ERRNO value.
170 */ 170 */
171 171
172static int __devinit sch_init_one(struct pci_dev *pdev, 172static int sch_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
173 const struct pci_device_id *ent)
174{ 173{
175 const struct ata_port_info *ppi[] = { &sch_port_info, NULL }; 174 const struct ata_port_info *ppi[] = { &sch_port_info, NULL };
176 175
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index 5cfdf94823d0..64c5f0d0f812 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -323,8 +323,7 @@ static u8 sil680_init_chip(struct pci_dev *pdev, int *try_mmio)
323 return tmpbyte & 0x30; 323 return tmpbyte & 0x30;
324} 324}
325 325
326static int __devinit sil680_init_one(struct pci_dev *pdev, 326static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
327 const struct pci_device_id *id)
328{ 327{
329 static const struct ata_port_info info = { 328 static const struct ata_port_info info = {
330 .flags = ATA_FLAG_SLAVE_POSS, 329 .flags = ATA_FLAG_SLAVE_POSS,
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index dc7d78eecb19..5dba77ccaa0b 100644
--- a/drivers/ata/sata_highbank.c
+++ b/drivers/ata/sata_highbank.c
@@ -260,7 +260,7 @@ static const struct of_device_id ahci_of_match[] = {
260}; 260};
261MODULE_DEVICE_TABLE(of, ahci_of_match); 261MODULE_DEVICE_TABLE(of, ahci_of_match);
262 262
263static int __devinit ahci_highbank_probe(struct platform_device *pdev) 263static int ahci_highbank_probe(struct platform_device *pdev)
264{ 264{
265 struct device *dev = &pdev->dev; 265 struct device *dev = &pdev->dev;
266 struct ahci_host_priv *hpriv; 266 struct ahci_host_priv *hpriv;
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 68f4fb54d627..35c6b6d09c27 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4148,7 +4148,7 @@ err:
4148 * A platform bus SATA device has been unplugged. Perform the needed 4148 * A platform bus SATA device has been unplugged. Perform the needed
4149 * cleanup. Also called on module unload for any active devices. 4149 * cleanup. Also called on module unload for any active devices.
4150 */ 4150 */
4151static int __devexit mv_platform_remove(struct platform_device *pdev) 4151static int mv_platform_remove(struct platform_device *pdev)
4152{ 4152{
4153 struct ata_host *host = platform_get_drvdata(pdev); 4153 struct ata_host *host = platform_get_drvdata(pdev);
4154#if defined(CONFIG_HAVE_CLK) 4154#if defined(CONFIG_HAVE_CLK)
@@ -4215,7 +4215,7 @@ static int mv_platform_resume(struct platform_device *pdev)
4215#endif 4215#endif
4216 4216
4217#ifdef CONFIG_OF 4217#ifdef CONFIG_OF
4218static struct of_device_id mv_sata_dt_ids[] __devinitdata = { 4218static struct of_device_id mv_sata_dt_ids[] = {
4219 { .compatible = "marvell,orion-sata", }, 4219 { .compatible = "marvell,orion-sata", },
4220 {}, 4220 {},
4221}; 4221};
@@ -4224,7 +4224,7 @@ MODULE_DEVICE_TABLE(of, mv_sata_dt_ids);
4224 4224
4225static struct platform_driver mv_platform_driver = { 4225static struct platform_driver mv_platform_driver = {
4226 .probe = mv_platform_probe, 4226 .probe = mv_platform_probe,
4227 .remove = __devexit_p(mv_platform_remove), 4227 .remove = mv_platform_remove,
4228 .suspend = mv_platform_suspend, 4228 .suspend = mv_platform_suspend,
4229 .resume = mv_platform_resume, 4229 .resume = mv_platform_resume,
4230 .driver = { 4230 .driver = {
@@ -4429,7 +4429,7 @@ static int mv_pci_device_resume(struct pci_dev *pdev)
4429#endif 4429#endif
4430 4430
4431static int mv_platform_probe(struct platform_device *pdev); 4431static int mv_platform_probe(struct platform_device *pdev);
4432static int __devexit mv_platform_remove(struct platform_device *pdev); 4432static int mv_platform_remove(struct platform_device *pdev);
4433 4433
4434static int __init mv_init(void) 4434static int __init mv_init(void)
4435{ 4435{
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
index e8cf88ba145d..44f304b3de63 100644
--- a/drivers/ata/sata_vsc.c
+++ b/drivers/ata/sata_vsc.c
@@ -312,8 +312,7 @@ static struct ata_port_operations vsc_sata_ops = {
312 .scr_write = vsc_sata_scr_write, 312 .scr_write = vsc_sata_scr_write,
313}; 313};
314 314
315static void __devinit vsc_sata_setup_port(struct ata_ioports *port, 315static void vsc_sata_setup_port(struct ata_ioports *port, void __iomem *base)
316 void __iomem *base)
317{ 316{
318 port->cmd_addr = base + VSC_SATA_TF_CMD_OFFSET; 317 port->cmd_addr = base + VSC_SATA_TF_CMD_OFFSET;
319 port->data_addr = base + VSC_SATA_TF_DATA_OFFSET; 318 port->data_addr = base + VSC_SATA_TF_DATA_OFFSET;
@@ -335,8 +334,8 @@ static void __devinit vsc_sata_setup_port(struct ata_ioports *port,
335} 334}
336 335
337 336
338static int __devinit vsc_sata_init_one(struct pci_dev *pdev, 337static int vsc_sata_init_one(struct pci_dev *pdev,
339 const struct pci_device_id *ent) 338 const struct pci_device_id *ent)
340{ 339{
341 static const struct ata_port_info pi = { 340 static const struct ata_port_info pi = {
342 .flags = ATA_FLAG_SATA, 341 .flags = ATA_FLAG_SATA,
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index ff7bb8a42ed6..77a7480dc4d1 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -1507,9 +1507,9 @@ static void do_housekeeping (unsigned long arg) {
1507 1507
1508/********** creation of communication queues **********/ 1508/********** creation of communication queues **********/
1509 1509
1510static int __devinit create_queues (amb_dev * dev, unsigned int cmds, 1510static int create_queues(amb_dev *dev, unsigned int cmds, unsigned int txs,
1511 unsigned int txs, unsigned int * rxs, 1511 unsigned int *rxs, unsigned int *rx_buffer_sizes)
1512 unsigned int * rx_buffer_sizes) { 1512{
1513 unsigned char pool; 1513 unsigned char pool;
1514 size_t total = 0; 1514 size_t total = 0;
1515 void * memory; 1515 void * memory;
@@ -1737,8 +1737,9 @@ static int decode_loader_result (loader_command cmd, u32 result)
1737 return res; 1737 return res;
1738} 1738}
1739 1739
1740static int __devinit do_loader_command (volatile loader_block * lb, 1740static int do_loader_command(volatile loader_block *lb, const amb_dev *dev,
1741 const amb_dev * dev, loader_command cmd) { 1741 loader_command cmd)
1742{
1742 1743
1743 unsigned long timeout; 1744 unsigned long timeout;
1744 1745
@@ -1793,8 +1794,9 @@ static int __devinit do_loader_command (volatile loader_block * lb,
1793 1794
1794/* loader: determine loader version */ 1795/* loader: determine loader version */
1795 1796
1796static int __devinit get_loader_version (loader_block * lb, 1797static int get_loader_version(loader_block *lb, const amb_dev *dev,
1797 const amb_dev * dev, u32 * version) { 1798 u32 *version)
1799{
1798 int res; 1800 int res;
1799 1801
1800 PRINTD (DBG_FLOW|DBG_LOAD, "get_loader_version"); 1802 PRINTD (DBG_FLOW|DBG_LOAD, "get_loader_version");
@@ -1809,9 +1811,9 @@ static int __devinit get_loader_version (loader_block * lb,
1809 1811
1810/* loader: write memory data blocks */ 1812/* loader: write memory data blocks */
1811 1813
1812static int __devinit loader_write (loader_block* lb, 1814static int loader_write(loader_block *lb, const amb_dev *dev,
1813 const amb_dev *dev, 1815 const struct ihex_binrec *rec)
1814 const struct ihex_binrec *rec) { 1816{
1815 transfer_block * tb = &lb->payload.transfer; 1817 transfer_block * tb = &lb->payload.transfer;
1816 1818
1817 PRINTD (DBG_FLOW|DBG_LOAD, "loader_write"); 1819 PRINTD (DBG_FLOW|DBG_LOAD, "loader_write");
@@ -1824,9 +1826,9 @@ static int __devinit loader_write (loader_block* lb,
1824 1826
1825/* loader: verify memory data blocks */ 1827/* loader: verify memory data blocks */
1826 1828
1827static int __devinit loader_verify (loader_block * lb, 1829static int loader_verify(loader_block *lb, const amb_dev *dev,
1828 const amb_dev *dev, 1830 const struct ihex_binrec *rec)
1829 const struct ihex_binrec *rec) { 1831{
1830 transfer_block * tb = &lb->payload.transfer; 1832 transfer_block * tb = &lb->payload.transfer;
1831 int res; 1833 int res;
1832 1834
@@ -1842,8 +1844,8 @@ static int __devinit loader_verify (loader_block * lb,
1842 1844
1843/* loader: start microcode */ 1845/* loader: start microcode */
1844 1846
1845static int __devinit loader_start (loader_block * lb, 1847static int loader_start(loader_block *lb, const amb_dev *dev, u32 address)
1846 const amb_dev * dev, u32 address) { 1848{
1847 PRINTD (DBG_FLOW|DBG_LOAD, "loader_start"); 1849 PRINTD (DBG_FLOW|DBG_LOAD, "loader_start");
1848 1850
1849 lb->payload.start = cpu_to_be32 (address); 1851 lb->payload.start = cpu_to_be32 (address);
@@ -1918,7 +1920,8 @@ static int amb_reset (amb_dev * dev, int diags) {
1918 1920
1919/********** transfer and start the microcode **********/ 1921/********** transfer and start the microcode **********/
1920 1922
1921static int __devinit ucode_init (loader_block * lb, amb_dev * dev) { 1923static int ucode_init(loader_block *lb, amb_dev *dev)
1924{
1922 const struct firmware *fw; 1925 const struct firmware *fw;
1923 unsigned long start_address; 1926 unsigned long start_address;
1924 const struct ihex_binrec *rec; 1927 const struct ihex_binrec *rec;
@@ -1980,7 +1983,8 @@ static inline __be32 bus_addr(void * addr) {
1980 return cpu_to_be32 (virt_to_bus (addr)); 1983 return cpu_to_be32 (virt_to_bus (addr));
1981} 1984}
1982 1985
1983static int __devinit amb_talk (amb_dev * dev) { 1986static int amb_talk(amb_dev *dev)
1987{
1984 adap_talk_block a; 1988 adap_talk_block a;
1985 unsigned char pool; 1989 unsigned char pool;
1986 unsigned long timeout; 1990 unsigned long timeout;
@@ -2027,7 +2031,8 @@ static int __devinit amb_talk (amb_dev * dev) {
2027} 2031}
2028 2032
2029// get microcode version 2033// get microcode version
2030static void __devinit amb_ucode_version (amb_dev * dev) { 2034static void amb_ucode_version(amb_dev *dev)
2035{
2031 u32 major; 2036 u32 major;
2032 u32 minor; 2037 u32 minor;
2033 command cmd; 2038 command cmd;
@@ -2042,7 +2047,8 @@ static void __devinit amb_ucode_version (amb_dev * dev) {
2042} 2047}
2043 2048
2044// get end station address 2049// get end station address
2045static void __devinit amb_esi (amb_dev * dev, u8 * esi) { 2050static void amb_esi(amb_dev *dev, u8 *esi)
2051{
2046 u32 lower4; 2052 u32 lower4;
2047 u16 upper2; 2053 u16 upper2;
2048 command cmd; 2054 command cmd;
@@ -2088,7 +2094,7 @@ static void fixup_plx_window (amb_dev *dev, loader_block *lb)
2088 return; 2094 return;
2089} 2095}
2090 2096
2091static int __devinit amb_init (amb_dev * dev) 2097static int amb_init(amb_dev *dev)
2092{ 2098{
2093 loader_block lb; 2099 loader_block lb;
2094 2100
@@ -2184,7 +2190,8 @@ static void setup_pci_dev(struct pci_dev *pci_dev)
2184 } 2190 }
2185} 2191}
2186 2192
2187static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) 2193static int amb_probe(struct pci_dev *pci_dev,
2194 const struct pci_device_id *pci_ent)
2188{ 2195{
2189 amb_dev * dev; 2196 amb_dev * dev;
2190 int err; 2197 int err;
@@ -2285,7 +2292,7 @@ out_disable:
2285} 2292}
2286 2293
2287 2294
2288static void __devexit amb_remove_one(struct pci_dev *pci_dev) 2295static void amb_remove_one(struct pci_dev *pci_dev)
2289{ 2296{
2290 struct amb_dev *dev; 2297 struct amb_dev *dev;
2291 2298
@@ -2379,7 +2386,7 @@ MODULE_DEVICE_TABLE(pci, amb_pci_tbl);
2379static struct pci_driver amb_driver = { 2386static struct pci_driver amb_driver = {
2380 .name = "amb", 2387 .name = "amb",
2381 .probe = amb_probe, 2388 .probe = amb_probe,
2382 .remove = __devexit_p(amb_remove_one), 2389 .remove = amb_remove_one,
2383 .id_table = amb_pci_tbl, 2390 .id_table = amb_pci_tbl,
2384}; 2391};
2385 2392
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index 81e44f7b0ab6..c1eb6fa8ac35 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -1567,7 +1567,7 @@ tx_complete++;
1567/*--------------------------------- entries ---------------------------------*/ 1567/*--------------------------------- entries ---------------------------------*/
1568 1568
1569 1569
1570static char * const media_name[] __devinitconst = { 1570static char * const media_name[] = {
1571 "MMF", "SMF", "MMF", "03?", /* 0- 3 */ 1571 "MMF", "SMF", "MMF", "03?", /* 0- 3 */
1572 "UTP", "05?", "06?", "07?", /* 4- 7 */ 1572 "UTP", "05?", "06?", "07?", /* 4- 7 */
1573 "TAXI","09?", "10?", "11?", /* 8-11 */ 1573 "TAXI","09?", "10?", "11?", /* 8-11 */
@@ -1591,7 +1591,7 @@ static char * const media_name[] __devinitconst = {
1591 } }) 1591 } })
1592 1592
1593 1593
1594static int __devinit get_esi_asic(struct atm_dev *dev) 1594static int get_esi_asic(struct atm_dev *dev)
1595{ 1595{
1596 struct eni_dev *eni_dev; 1596 struct eni_dev *eni_dev;
1597 unsigned char tonga; 1597 unsigned char tonga;
@@ -1683,7 +1683,7 @@ static int __devinit get_esi_asic(struct atm_dev *dev)
1683#undef GET_SEPROM 1683#undef GET_SEPROM
1684 1684
1685 1685
1686static int __devinit get_esi_fpga(struct atm_dev *dev, void __iomem *base) 1686static int get_esi_fpga(struct atm_dev *dev, void __iomem *base)
1687{ 1687{
1688 void __iomem *mac_base; 1688 void __iomem *mac_base;
1689 int i; 1689 int i;
@@ -1694,7 +1694,7 @@ static int __devinit get_esi_fpga(struct atm_dev *dev, void __iomem *base)
1694} 1694}
1695 1695
1696 1696
1697static int __devinit eni_do_init(struct atm_dev *dev) 1697static int eni_do_init(struct atm_dev *dev)
1698{ 1698{
1699 struct midway_eprom __iomem *eprom; 1699 struct midway_eprom __iomem *eprom;
1700 struct eni_dev *eni_dev; 1700 struct eni_dev *eni_dev;
@@ -1797,7 +1797,7 @@ static void eni_do_release(struct atm_dev *dev)
1797 iounmap(ed->ioaddr); 1797 iounmap(ed->ioaddr);
1798} 1798}
1799 1799
1800static int __devinit eni_start(struct atm_dev *dev) 1800static int eni_start(struct atm_dev *dev)
1801{ 1801{
1802 struct eni_dev *eni_dev; 1802 struct eni_dev *eni_dev;
1803 1803
@@ -2226,8 +2226,8 @@ static const struct atmdev_ops ops = {
2226}; 2226};
2227 2227
2228 2228
2229static int __devinit eni_init_one(struct pci_dev *pci_dev, 2229static int eni_init_one(struct pci_dev *pci_dev,
2230 const struct pci_device_id *ent) 2230 const struct pci_device_id *ent)
2231{ 2231{
2232 struct atm_dev *dev; 2232 struct atm_dev *dev;
2233 struct eni_dev *eni_dev; 2233 struct eni_dev *eni_dev;
@@ -2292,7 +2292,7 @@ static struct pci_device_id eni_pci_tbl[] = {
2292MODULE_DEVICE_TABLE(pci,eni_pci_tbl); 2292MODULE_DEVICE_TABLE(pci,eni_pci_tbl);
2293 2293
2294 2294
2295static void __devexit eni_remove_one(struct pci_dev *pdev) 2295static void eni_remove_one(struct pci_dev *pdev)
2296{ 2296{
2297 struct atm_dev *dev = pci_get_drvdata(pdev); 2297 struct atm_dev *dev = pci_get_drvdata(pdev);
2298 struct eni_dev *ed = ENI_DEV(dev); 2298 struct eni_dev *ed = ENI_DEV(dev);
@@ -2310,7 +2310,7 @@ static struct pci_driver eni_driver = {
2310 .name = DEV_LABEL, 2310 .name = DEV_LABEL,
2311 .id_table = eni_pci_tbl, 2311 .id_table = eni_pci_tbl,
2312 .probe = eni_init_one, 2312 .probe = eni_init_one,
2313 .remove = __devexit_p(eni_remove_one), 2313 .remove = eni_remove_one,
2314}; 2314};
2315 2315
2316 2316
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 86fed1b91695..b41c9481b67b 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -252,7 +252,7 @@ struct reginit_item {
252}; 252};
253 253
254 254
255static struct reginit_item PHY_NTC_INIT[] __devinitdata = { 255static struct reginit_item PHY_NTC_INIT[] = {
256 { PHY_CLEARALL, 0x40 }, 256 { PHY_CLEARALL, 0x40 },
257 { 0x12, 0x0001 }, 257 { 0x12, 0x0001 },
258 { 0x13, 0x7605 }, 258 { 0x13, 0x7605 },
@@ -1295,7 +1295,7 @@ static const struct atmdev_ops ops = {
1295}; 1295};
1296 1296
1297 1297
1298static void __devinit undocumented_pci_fix (struct pci_dev *pdev) 1298static void undocumented_pci_fix(struct pci_dev *pdev)
1299{ 1299{
1300 u32 tint; 1300 u32 tint;
1301 1301
@@ -1319,13 +1319,13 @@ static void __devinit undocumented_pci_fix (struct pci_dev *pdev)
1319 * PHY routines * 1319 * PHY routines *
1320 **************************************************************************/ 1320 **************************************************************************/
1321 1321
1322static void __devinit write_phy (struct fs_dev *dev, int regnum, int val) 1322static void write_phy(struct fs_dev *dev, int regnum, int val)
1323{ 1323{
1324 submit_command (dev, &dev->hp_txq, QE_CMD_PRP_WR | QE_CMD_IMM_INQ, 1324 submit_command (dev, &dev->hp_txq, QE_CMD_PRP_WR | QE_CMD_IMM_INQ,
1325 regnum, val, 0); 1325 regnum, val, 0);
1326} 1326}
1327 1327
1328static int __devinit init_phy (struct fs_dev *dev, struct reginit_item *reginit) 1328static int init_phy(struct fs_dev *dev, struct reginit_item *reginit)
1329{ 1329{
1330 int i; 1330 int i;
1331 1331
@@ -1381,7 +1381,7 @@ static void reset_chip (struct fs_dev *dev)
1381 } 1381 }
1382} 1382}
1383 1383
1384static void __devinit *aligned_kmalloc (int size, gfp_t flags, int alignment) 1384static void *aligned_kmalloc(int size, gfp_t flags, int alignment)
1385{ 1385{
1386 void *t; 1386 void *t;
1387 1387
@@ -1398,8 +1398,8 @@ static void __devinit *aligned_kmalloc (int size, gfp_t flags, int alignment)
1398 return NULL; 1398 return NULL;
1399} 1399}
1400 1400
1401static int __devinit init_q (struct fs_dev *dev, 1401static int init_q(struct fs_dev *dev, struct queue *txq, int queue,
1402 struct queue *txq, int queue, int nentries, int is_rq) 1402 int nentries, int is_rq)
1403{ 1403{
1404 int sz = nentries * sizeof (struct FS_QENTRY); 1404 int sz = nentries * sizeof (struct FS_QENTRY);
1405 struct FS_QENTRY *p; 1405 struct FS_QENTRY *p;
@@ -1434,8 +1434,8 @@ static int __devinit init_q (struct fs_dev *dev,
1434} 1434}
1435 1435
1436 1436
1437static int __devinit init_fp (struct fs_dev *dev, 1437static int init_fp(struct fs_dev *dev, struct freepool *fp, int queue,
1438 struct freepool *fp, int queue, int bufsize, int nr_buffers) 1438 int bufsize, int nr_buffers)
1439{ 1439{
1440 func_enter (); 1440 func_enter ();
1441 1441
@@ -1528,7 +1528,7 @@ static void top_off_fp (struct fs_dev *dev, struct freepool *fp,
1528 fs_dprintk (FS_DEBUG_QUEUE, "Added %d entries. \n", n); 1528 fs_dprintk (FS_DEBUG_QUEUE, "Added %d entries. \n", n);
1529} 1529}
1530 1530
1531static void __devexit free_queue (struct fs_dev *dev, struct queue *txq) 1531static void free_queue(struct fs_dev *dev, struct queue *txq)
1532{ 1532{
1533 func_enter (); 1533 func_enter ();
1534 1534
@@ -1544,7 +1544,7 @@ static void __devexit free_queue (struct fs_dev *dev, struct queue *txq)
1544 func_exit (); 1544 func_exit ();
1545} 1545}
1546 1546
1547static void __devexit free_freepool (struct fs_dev *dev, struct freepool *fp) 1547static void free_freepool(struct fs_dev *dev, struct freepool *fp)
1548{ 1548{
1549 func_enter (); 1549 func_enter ();
1550 1550
@@ -1662,7 +1662,7 @@ static void fs_poll (unsigned long data)
1662} 1662}
1663#endif 1663#endif
1664 1664
1665static int __devinit fs_init (struct fs_dev *dev) 1665static int fs_init(struct fs_dev *dev)
1666{ 1666{
1667 struct pci_dev *pci_dev; 1667 struct pci_dev *pci_dev;
1668 int isr, to; 1668 int isr, to;
@@ -1897,8 +1897,8 @@ unmap:
1897 return 1; 1897 return 1;
1898} 1898}
1899 1899
1900static int __devinit firestream_init_one (struct pci_dev *pci_dev, 1900static int firestream_init_one(struct pci_dev *pci_dev,
1901 const struct pci_device_id *ent) 1901 const struct pci_device_id *ent)
1902{ 1902{
1903 struct atm_dev *atm_dev; 1903 struct atm_dev *atm_dev;
1904 struct fs_dev *fs_dev; 1904 struct fs_dev *fs_dev;
@@ -1934,7 +1934,7 @@ static int __devinit firestream_init_one (struct pci_dev *pci_dev,
1934 return -ENODEV; 1934 return -ENODEV;
1935} 1935}
1936 1936
1937static void __devexit firestream_remove_one (struct pci_dev *pdev) 1937static void firestream_remove_one(struct pci_dev *pdev)
1938{ 1938{
1939 int i; 1939 int i;
1940 struct fs_dev *dev, *nxtdev; 1940 struct fs_dev *dev, *nxtdev;
@@ -2038,7 +2038,7 @@ static struct pci_driver firestream_driver = {
2038 .name = "firestream", 2038 .name = "firestream",
2039 .id_table = firestream_pci_tbl, 2039 .id_table = firestream_pci_tbl,
2040 .probe = firestream_init_one, 2040 .probe = firestream_init_one,
2041 .remove = __devexit_p(firestream_remove_one), 2041 .remove = firestream_remove_one,
2042}; 2042};
2043 2043
2044static int __init firestream_init_module (void) 2044static int __init firestream_init_module (void)
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 361f5aee3be1..204814e88e46 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -527,8 +527,7 @@ fore200e_pca_reset(struct fore200e* fore200e)
527} 527}
528 528
529 529
530static int __devinit 530static int fore200e_pca_map(struct fore200e* fore200e)
531fore200e_pca_map(struct fore200e* fore200e)
532{ 531{
533 DPRINTK(2, "device %s being mapped in memory\n", fore200e->name); 532 DPRINTK(2, "device %s being mapped in memory\n", fore200e->name);
534 533
@@ -561,8 +560,7 @@ fore200e_pca_unmap(struct fore200e* fore200e)
561} 560}
562 561
563 562
564static int __devinit 563static int fore200e_pca_configure(struct fore200e *fore200e)
565fore200e_pca_configure(struct fore200e* fore200e)
566{ 564{
567 struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev; 565 struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev;
568 u8 master_ctrl, latency; 566 u8 master_ctrl, latency;
@@ -2028,8 +2026,7 @@ fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags)
2028} 2026}
2029 2027
2030 2028
2031static int __devinit 2029static int fore200e_irq_request(struct fore200e *fore200e)
2032fore200e_irq_request(struct fore200e* fore200e)
2033{ 2030{
2034 if (request_irq(fore200e->irq, fore200e_interrupt, IRQF_SHARED, fore200e->name, fore200e->atm_dev) < 0) { 2031 if (request_irq(fore200e->irq, fore200e_interrupt, IRQF_SHARED, fore200e->name, fore200e->atm_dev) < 0) {
2035 2032
@@ -2051,8 +2048,7 @@ fore200e_irq_request(struct fore200e* fore200e)
2051} 2048}
2052 2049
2053 2050
2054static int __devinit 2051static int fore200e_get_esi(struct fore200e *fore200e)
2055fore200e_get_esi(struct fore200e* fore200e)
2056{ 2052{
2057 struct prom_data* prom = kzalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA); 2053 struct prom_data* prom = kzalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA);
2058 int ok, i; 2054 int ok, i;
@@ -2081,8 +2077,7 @@ fore200e_get_esi(struct fore200e* fore200e)
2081} 2077}
2082 2078
2083 2079
2084static int __devinit 2080static int fore200e_alloc_rx_buf(struct fore200e *fore200e)
2085fore200e_alloc_rx_buf(struct fore200e* fore200e)
2086{ 2081{
2087 int scheme, magn, nbr, size, i; 2082 int scheme, magn, nbr, size, i;
2088 2083
@@ -2146,8 +2141,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e)
2146} 2141}
2147 2142
2148 2143
2149static int __devinit 2144static int fore200e_init_bs_queue(struct fore200e *fore200e)
2150fore200e_init_bs_queue(struct fore200e* fore200e)
2151{ 2145{
2152 int scheme, magn, i; 2146 int scheme, magn, i;
2153 2147
@@ -2209,8 +2203,7 @@ fore200e_init_bs_queue(struct fore200e* fore200e)
2209} 2203}
2210 2204
2211 2205
2212static int __devinit 2206static int fore200e_init_rx_queue(struct fore200e *fore200e)
2213fore200e_init_rx_queue(struct fore200e* fore200e)
2214{ 2207{
2215 struct host_rxq* rxq = &fore200e->host_rxq; 2208 struct host_rxq* rxq = &fore200e->host_rxq;
2216 struct cp_rxq_entry __iomem * cp_entry; 2209 struct cp_rxq_entry __iomem * cp_entry;
@@ -2269,8 +2262,7 @@ fore200e_init_rx_queue(struct fore200e* fore200e)
2269} 2262}
2270 2263
2271 2264
2272static int __devinit 2265static int fore200e_init_tx_queue(struct fore200e *fore200e)
2273fore200e_init_tx_queue(struct fore200e* fore200e)
2274{ 2266{
2275 struct host_txq* txq = &fore200e->host_txq; 2267 struct host_txq* txq = &fore200e->host_txq;
2276 struct cp_txq_entry __iomem * cp_entry; 2268 struct cp_txq_entry __iomem * cp_entry;
@@ -2332,8 +2324,7 @@ fore200e_init_tx_queue(struct fore200e* fore200e)
2332} 2324}
2333 2325
2334 2326
2335static int __devinit 2327static int fore200e_init_cmd_queue(struct fore200e *fore200e)
2336fore200e_init_cmd_queue(struct fore200e* fore200e)
2337{ 2328{
2338 struct host_cmdq* cmdq = &fore200e->host_cmdq; 2329 struct host_cmdq* cmdq = &fore200e->host_cmdq;
2339 struct cp_cmdq_entry __iomem * cp_entry; 2330 struct cp_cmdq_entry __iomem * cp_entry;
@@ -2374,10 +2365,10 @@ fore200e_init_cmd_queue(struct fore200e* fore200e)
2374} 2365}
2375 2366
2376 2367
2377static void __devinit 2368static void fore200e_param_bs_queue(struct fore200e *fore200e,
2378fore200e_param_bs_queue(struct fore200e* fore200e, 2369 enum buffer_scheme scheme,
2379 enum buffer_scheme scheme, enum buffer_magn magn, 2370 enum buffer_magn magn, int queue_length,
2380 int queue_length, int pool_size, int supply_blksize) 2371 int pool_size, int supply_blksize)
2381{ 2372{
2382 struct bs_spec __iomem * bs_spec = &fore200e->cp_queues->init.bs_spec[ scheme ][ magn ]; 2373 struct bs_spec __iomem * bs_spec = &fore200e->cp_queues->init.bs_spec[ scheme ][ magn ];
2383 2374
@@ -2388,8 +2379,7 @@ fore200e_param_bs_queue(struct fore200e* fore200e,
2388} 2379}
2389 2380
2390 2381
2391static int __devinit 2382static int fore200e_initialize(struct fore200e *fore200e)
2392fore200e_initialize(struct fore200e* fore200e)
2393{ 2383{
2394 struct cp_queues __iomem * cpq; 2384 struct cp_queues __iomem * cpq;
2395 int ok, scheme, magn; 2385 int ok, scheme, magn;
@@ -2440,8 +2430,7 @@ fore200e_initialize(struct fore200e* fore200e)
2440} 2430}
2441 2431
2442 2432
2443static void __devinit 2433static void fore200e_monitor_putc(struct fore200e *fore200e, char c)
2444fore200e_monitor_putc(struct fore200e* fore200e, char c)
2445{ 2434{
2446 struct cp_monitor __iomem * monitor = fore200e->cp_monitor; 2435 struct cp_monitor __iomem * monitor = fore200e->cp_monitor;
2447 2436
@@ -2452,8 +2441,7 @@ fore200e_monitor_putc(struct fore200e* fore200e, char c)
2452} 2441}
2453 2442
2454 2443
2455static int __devinit 2444static int fore200e_monitor_getc(struct fore200e *fore200e)
2456fore200e_monitor_getc(struct fore200e* fore200e)
2457{ 2445{
2458 struct cp_monitor __iomem * monitor = fore200e->cp_monitor; 2446 struct cp_monitor __iomem * monitor = fore200e->cp_monitor;
2459 unsigned long timeout = jiffies + msecs_to_jiffies(50); 2447 unsigned long timeout = jiffies + msecs_to_jiffies(50);
@@ -2477,8 +2465,7 @@ fore200e_monitor_getc(struct fore200e* fore200e)
2477} 2465}
2478 2466
2479 2467
2480static void __devinit 2468static void fore200e_monitor_puts(struct fore200e *fore200e, char *str)
2481fore200e_monitor_puts(struct fore200e* fore200e, char* str)
2482{ 2469{
2483 while (*str) { 2470 while (*str) {
2484 2471
@@ -2497,8 +2484,7 @@ fore200e_monitor_puts(struct fore200e* fore200e, char* str)
2497#define FW_EXT "_ecd.bin2" 2484#define FW_EXT "_ecd.bin2"
2498#endif 2485#endif
2499 2486
2500static int __devinit 2487static int fore200e_load_and_start_fw(struct fore200e *fore200e)
2501fore200e_load_and_start_fw(struct fore200e* fore200e)
2502{ 2488{
2503 const struct firmware *firmware; 2489 const struct firmware *firmware;
2504 struct device *device; 2490 struct device *device;
@@ -2566,8 +2552,7 @@ release:
2566} 2552}
2567 2553
2568 2554
2569static int __devinit 2555static int fore200e_register(struct fore200e *fore200e, struct device *parent)
2570fore200e_register(struct fore200e* fore200e, struct device *parent)
2571{ 2556{
2572 struct atm_dev* atm_dev; 2557 struct atm_dev* atm_dev;
2573 2558
@@ -2593,8 +2578,7 @@ fore200e_register(struct fore200e* fore200e, struct device *parent)
2593} 2578}
2594 2579
2595 2580
2596static int __devinit 2581static int fore200e_init(struct fore200e *fore200e, struct device *parent)
2597fore200e_init(struct fore200e* fore200e, struct device *parent)
2598{ 2582{
2599 if (fore200e_register(fore200e, parent) < 0) 2583 if (fore200e_register(fore200e, parent) < 0)
2600 return -ENODEV; 2584 return -ENODEV;
@@ -2644,7 +2628,7 @@ fore200e_init(struct fore200e* fore200e, struct device *parent)
2644 2628
2645#ifdef CONFIG_SBUS 2629#ifdef CONFIG_SBUS
2646static const struct of_device_id fore200e_sba_match[]; 2630static const struct of_device_id fore200e_sba_match[];
2647static int __devinit fore200e_sba_probe(struct platform_device *op) 2631static int fore200e_sba_probe(struct platform_device *op)
2648{ 2632{
2649 const struct of_device_id *match; 2633 const struct of_device_id *match;
2650 const struct fore200e_bus *bus; 2634 const struct fore200e_bus *bus;
@@ -2681,7 +2665,7 @@ static int __devinit fore200e_sba_probe(struct platform_device *op)
2681 return 0; 2665 return 0;
2682} 2666}
2683 2667
2684static int __devexit fore200e_sba_remove(struct platform_device *op) 2668static int fore200e_sba_remove(struct platform_device *op)
2685{ 2669{
2686 struct fore200e *fore200e = dev_get_drvdata(&op->dev); 2670 struct fore200e *fore200e = dev_get_drvdata(&op->dev);
2687 2671
@@ -2707,13 +2691,13 @@ static struct platform_driver fore200e_sba_driver = {
2707 .of_match_table = fore200e_sba_match, 2691 .of_match_table = fore200e_sba_match,
2708 }, 2692 },
2709 .probe = fore200e_sba_probe, 2693 .probe = fore200e_sba_probe,
2710 .remove = __devexit_p(fore200e_sba_remove), 2694 .remove = fore200e_sba_remove,
2711}; 2695};
2712#endif 2696#endif
2713 2697
2714#ifdef CONFIG_PCI 2698#ifdef CONFIG_PCI
2715static int __devinit 2699static int fore200e_pca_detect(struct pci_dev *pci_dev,
2716fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) 2700 const struct pci_device_id *pci_ent)
2717{ 2701{
2718 const struct fore200e_bus* bus = (struct fore200e_bus*) pci_ent->driver_data; 2702 const struct fore200e_bus* bus = (struct fore200e_bus*) pci_ent->driver_data;
2719 struct fore200e* fore200e; 2703 struct fore200e* fore200e;
@@ -2766,7 +2750,7 @@ out_disable:
2766} 2750}
2767 2751
2768 2752
2769static void __devexit fore200e_pca_remove_one(struct pci_dev *pci_dev) 2753static void fore200e_pca_remove_one(struct pci_dev *pci_dev)
2770{ 2754{
2771 struct fore200e *fore200e; 2755 struct fore200e *fore200e;
2772 2756
@@ -2789,7 +2773,7 @@ MODULE_DEVICE_TABLE(pci, fore200e_pca_tbl);
2789static struct pci_driver fore200e_pca_driver = { 2773static struct pci_driver fore200e_pca_driver = {
2790 .name = "fore_200e", 2774 .name = "fore_200e",
2791 .probe = fore200e_pca_detect, 2775 .probe = fore200e_pca_detect,
2792 .remove = __devexit_p(fore200e_pca_remove_one), 2776 .remove = fore200e_pca_remove_one,
2793 .id_table = fore200e_pca_tbl, 2777 .id_table = fore200e_pca_tbl,
2794}; 2778};
2795#endif 2779#endif
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index b182c2f7d777..72b6960fa95f 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -349,8 +349,8 @@ __find_vcc(struct he_dev *he_dev, unsigned cid)
349 return NULL; 349 return NULL;
350} 350}
351 351
352static int __devinit 352static int he_init_one(struct pci_dev *pci_dev,
353he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) 353 const struct pci_device_id *pci_ent)
354{ 354{
355 struct atm_dev *atm_dev = NULL; 355 struct atm_dev *atm_dev = NULL;
356 struct he_dev *he_dev = NULL; 356 struct he_dev *he_dev = NULL;
@@ -406,8 +406,7 @@ init_one_failure:
406 return err; 406 return err;
407} 407}
408 408
409static void __devexit 409static void he_remove_one(struct pci_dev *pci_dev)
410he_remove_one (struct pci_dev *pci_dev)
411{ 410{
412 struct atm_dev *atm_dev; 411 struct atm_dev *atm_dev;
413 struct he_dev *he_dev; 412 struct he_dev *he_dev;
@@ -445,8 +444,7 @@ rate_to_atmf(unsigned rate) /* cps to atm forum format */
445 return (NONZERO | (exp << 9) | (rate & 0x1ff)); 444 return (NONZERO | (exp << 9) | (rate & 0x1ff));
446} 445}
447 446
448static void __devinit 447static void he_init_rx_lbfp0(struct he_dev *he_dev)
449he_init_rx_lbfp0(struct he_dev *he_dev)
450{ 448{
451 unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; 449 unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count;
452 unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf; 450 unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf;
@@ -476,8 +474,7 @@ he_init_rx_lbfp0(struct he_dev *he_dev)
476 he_writel(he_dev, he_dev->r0_numbuffs, RLBF0_C); 474 he_writel(he_dev, he_dev->r0_numbuffs, RLBF0_C);
477} 475}
478 476
479static void __devinit 477static void he_init_rx_lbfp1(struct he_dev *he_dev)
480he_init_rx_lbfp1(struct he_dev *he_dev)
481{ 478{
482 unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; 479 unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count;
483 unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf; 480 unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf;
@@ -507,8 +504,7 @@ he_init_rx_lbfp1(struct he_dev *he_dev)
507 he_writel(he_dev, he_dev->r1_numbuffs, RLBF1_C); 504 he_writel(he_dev, he_dev->r1_numbuffs, RLBF1_C);
508} 505}
509 506
510static void __devinit 507static void he_init_tx_lbfp(struct he_dev *he_dev)
511he_init_tx_lbfp(struct he_dev *he_dev)
512{ 508{
513 unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; 509 unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count;
514 unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf; 510 unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf;
@@ -537,8 +533,7 @@ he_init_tx_lbfp(struct he_dev *he_dev)
537 he_writel(he_dev, lbufd_index - 1, TLBF_T); 533 he_writel(he_dev, lbufd_index - 1, TLBF_T);
538} 534}
539 535
540static int __devinit 536static int he_init_tpdrq(struct he_dev *he_dev)
541he_init_tpdrq(struct he_dev *he_dev)
542{ 537{
543 he_dev->tpdrq_base = pci_alloc_consistent(he_dev->pci_dev, 538 he_dev->tpdrq_base = pci_alloc_consistent(he_dev->pci_dev,
544 CONFIG_TPDRQ_SIZE * sizeof(struct he_tpdrq), &he_dev->tpdrq_phys); 539 CONFIG_TPDRQ_SIZE * sizeof(struct he_tpdrq), &he_dev->tpdrq_phys);
@@ -559,8 +554,7 @@ he_init_tpdrq(struct he_dev *he_dev)
559 return 0; 554 return 0;
560} 555}
561 556
562static void __devinit 557static void he_init_cs_block(struct he_dev *he_dev)
563he_init_cs_block(struct he_dev *he_dev)
564{ 558{
565 unsigned clock, rate, delta; 559 unsigned clock, rate, delta;
566 int reg; 560 int reg;
@@ -655,8 +649,7 @@ he_init_cs_block(struct he_dev *he_dev)
655 649
656} 650}
657 651
658static int __devinit 652static int he_init_cs_block_rcm(struct he_dev *he_dev)
659he_init_cs_block_rcm(struct he_dev *he_dev)
660{ 653{
661 unsigned (*rategrid)[16][16]; 654 unsigned (*rategrid)[16][16];
662 unsigned rate, delta; 655 unsigned rate, delta;
@@ -776,8 +769,7 @@ he_init_cs_block_rcm(struct he_dev *he_dev)
776 return 0; 769 return 0;
777} 770}
778 771
779static int __devinit 772static int he_init_group(struct he_dev *he_dev, int group)
780he_init_group(struct he_dev *he_dev, int group)
781{ 773{
782 struct he_buff *heb, *next; 774 struct he_buff *heb, *next;
783 dma_addr_t mapping; 775 dma_addr_t mapping;
@@ -915,8 +907,7 @@ out_free_rbpl_table:
915 return -ENOMEM; 907 return -ENOMEM;
916} 908}
917 909
918static int __devinit 910static int he_init_irq(struct he_dev *he_dev)
919he_init_irq(struct he_dev *he_dev)
920{ 911{
921 int i; 912 int i;
922 913
@@ -978,8 +969,7 @@ he_init_irq(struct he_dev *he_dev)
978 return 0; 969 return 0;
979} 970}
980 971
981static int __devinit 972static int he_start(struct atm_dev *dev)
982he_start(struct atm_dev *dev)
983{ 973{
984 struct he_dev *he_dev; 974 struct he_dev *he_dev;
985 struct pci_dev *pci_dev; 975 struct pci_dev *pci_dev;
@@ -2879,7 +2869,7 @@ MODULE_DEVICE_TABLE(pci, he_pci_tbl);
2879static struct pci_driver he_driver = { 2869static struct pci_driver he_driver = {
2880 .name = "he", 2870 .name = "he",
2881 .probe = he_init_one, 2871 .probe = he_init_one,
2882 .remove = __devexit_p(he_remove_one), 2872 .remove = he_remove_one,
2883 .id_table = he_pci_tbl, 2873 .id_table = he_pci_tbl,
2884}; 2874};
2885 2875
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 7d01c2a75256..1dc0519333f2 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -1789,7 +1789,7 @@ static void CLOCK_IT (const hrz_dev *dev, u32 ctrl)
1789 WRITE_IT_WAIT(dev, ctrl | SEEPROM_SK); 1789 WRITE_IT_WAIT(dev, ctrl | SEEPROM_SK);
1790} 1790}
1791 1791
1792static u16 __devinit read_bia (const hrz_dev * dev, u16 addr) 1792static u16 read_bia(const hrz_dev *dev, u16 addr)
1793{ 1793{
1794 u32 ctrl = rd_regl (dev, CONTROL_0_REG); 1794 u32 ctrl = rd_regl (dev, CONTROL_0_REG);
1795 1795
@@ -1845,7 +1845,8 @@ static u16 __devinit read_bia (const hrz_dev * dev, u16 addr)
1845 1845
1846/********** initialise a card **********/ 1846/********** initialise a card **********/
1847 1847
1848static int __devinit hrz_init (hrz_dev * dev) { 1848static int hrz_init(hrz_dev *dev)
1849{
1849 int onefivefive; 1850 int onefivefive;
1850 1851
1851 u16 chan; 1852 u16 chan;
@@ -2681,7 +2682,8 @@ static const struct atmdev_ops hrz_ops = {
2681 .owner = THIS_MODULE, 2682 .owner = THIS_MODULE,
2682}; 2683};
2683 2684
2684static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) 2685static int hrz_probe(struct pci_dev *pci_dev,
2686 const struct pci_device_id *pci_ent)
2685{ 2687{
2686 hrz_dev * dev; 2688 hrz_dev * dev;
2687 int err = 0; 2689 int err = 0;
@@ -2836,7 +2838,7 @@ out_disable:
2836 goto out; 2838 goto out;
2837} 2839}
2838 2840
2839static void __devexit hrz_remove_one(struct pci_dev *pci_dev) 2841static void hrz_remove_one(struct pci_dev *pci_dev)
2840{ 2842{
2841 hrz_dev *dev; 2843 hrz_dev *dev;
2842 2844
@@ -2901,7 +2903,7 @@ MODULE_DEVICE_TABLE(pci, hrz_pci_tbl);
2901static struct pci_driver hrz_driver = { 2903static struct pci_driver hrz_driver = {
2902 .name = "horizon", 2904 .name = "horizon",
2903 .probe = hrz_probe, 2905 .probe = hrz_probe,
2904 .remove = __devexit_p(hrz_remove_one), 2906 .remove = hrz_remove_one,
2905 .id_table = hrz_pci_tbl, 2907 .id_table = hrz_pci_tbl,
2906}; 2908};
2907 2909
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 8974bd2b961e..272f00927761 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3109,8 +3109,7 @@ deinit_card(struct idt77252_dev *card)
3109} 3109}
3110 3110
3111 3111
3112static void __devinit 3112static void init_sram(struct idt77252_dev *card)
3113init_sram(struct idt77252_dev *card)
3114{ 3113{
3115 int i; 3114 int i;
3116 3115
@@ -3257,8 +3256,7 @@ init_sram(struct idt77252_dev *card)
3257 IPRINTK("%s: SRAM initialization complete.\n", card->name); 3256 IPRINTK("%s: SRAM initialization complete.\n", card->name);
3258} 3257}
3259 3258
3260static int __devinit 3259static int init_card(struct atm_dev *dev)
3261init_card(struct atm_dev *dev)
3262{ 3260{
3263 struct idt77252_dev *card = dev->dev_data; 3261 struct idt77252_dev *card = dev->dev_data;
3264 struct pci_dev *pcidev = card->pcidev; 3262 struct pci_dev *pcidev = card->pcidev;
@@ -3537,8 +3535,7 @@ init_card(struct atm_dev *dev)
3537/*****************************************************************************/ 3535/*****************************************************************************/
3538 3536
3539 3537
3540static int __devinit 3538static int idt77252_preset(struct idt77252_dev *card)
3541idt77252_preset(struct idt77252_dev *card)
3542{ 3539{
3543 u16 pci_command; 3540 u16 pci_command;
3544 3541
@@ -3579,8 +3576,7 @@ idt77252_preset(struct idt77252_dev *card)
3579} 3576}
3580 3577
3581 3578
3582static unsigned long __devinit 3579static unsigned long probe_sram(struct idt77252_dev *card)
3583probe_sram(struct idt77252_dev *card)
3584{ 3580{
3585 u32 data, addr; 3581 u32 data, addr;
3586 3582
@@ -3601,8 +3597,8 @@ probe_sram(struct idt77252_dev *card)
3601 return addr * sizeof(u32); 3597 return addr * sizeof(u32);
3602} 3598}
3603 3599
3604static int __devinit 3600static int idt77252_init_one(struct pci_dev *pcidev,
3605idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id) 3601 const struct pci_device_id *id)
3606{ 3602{
3607 static struct idt77252_dev **last = &idt77252_chain; 3603 static struct idt77252_dev **last = &idt77252_chain;
3608 static int index = 0; 3604 static int index = 0;
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 96cce6d53195..4217f29a85e0 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -2299,7 +2299,7 @@ static int reset_sar(struct atm_dev *dev)
2299} 2299}
2300 2300
2301 2301
2302static int __devinit ia_init(struct atm_dev *dev) 2302static int ia_init(struct atm_dev *dev)
2303{ 2303{
2304 IADEV *iadev; 2304 IADEV *iadev;
2305 unsigned long real_base; 2305 unsigned long real_base;
@@ -2492,7 +2492,7 @@ static void ia_free_rx(IADEV *iadev)
2492 iadev->rx_dle_dma); 2492 iadev->rx_dle_dma);
2493} 2493}
2494 2494
2495static int __devinit ia_start(struct atm_dev *dev) 2495static int ia_start(struct atm_dev *dev)
2496{ 2496{
2497 IADEV *iadev; 2497 IADEV *iadev;
2498 int error; 2498 int error;
@@ -3168,8 +3168,7 @@ static const struct atmdev_ops ops = {
3168 .owner = THIS_MODULE, 3168 .owner = THIS_MODULE,
3169}; 3169};
3170 3170
3171static int __devinit ia_init_one(struct pci_dev *pdev, 3171static int ia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
3172 const struct pci_device_id *ent)
3173{ 3172{
3174 struct atm_dev *dev; 3173 struct atm_dev *dev;
3175 IADEV *iadev; 3174 IADEV *iadev;
@@ -3229,7 +3228,7 @@ err_out:
3229 return ret; 3228 return ret;
3230} 3229}
3231 3230
3232static void __devexit ia_remove_one(struct pci_dev *pdev) 3231static void ia_remove_one(struct pci_dev *pdev)
3233{ 3232{
3234 struct atm_dev *dev = pci_get_drvdata(pdev); 3233 struct atm_dev *dev = pci_get_drvdata(pdev);
3235 IADEV *iadev = INPH_IA_DEV(dev); 3234 IADEV *iadev = INPH_IA_DEV(dev);
@@ -3270,7 +3269,7 @@ static struct pci_driver ia_driver = {
3270 .name = DEV_LABEL, 3269 .name = DEV_LABEL,
3271 .id_table = ia_pci_tbl, 3270 .id_table = ia_pci_tbl,
3272 .probe = ia_init_one, 3271 .probe = ia_init_one,
3273 .remove = __devexit_p(ia_remove_one), 3272 .remove = ia_remove_one,
3274}; 3273};
3275 3274
3276static int __init ia_module_init(void) 3275static int __init ia_module_init(void)
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 68c758871812..fa7d701933ba 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -551,8 +551,8 @@ static inline void sram_write(const struct lanai_dev *lanai,
551 writel(val, sram_addr(lanai, offset)); 551 writel(val, sram_addr(lanai, offset));
552} 552}
553 553
554static int __devinit sram_test_word(const struct lanai_dev *lanai, 554static int sram_test_word(const struct lanai_dev *lanai, int offset,
555 int offset, u32 pattern) 555 u32 pattern)
556{ 556{
557 u32 readback; 557 u32 readback;
558 sram_write(lanai, pattern, offset); 558 sram_write(lanai, pattern, offset);
@@ -566,7 +566,7 @@ static int __devinit sram_test_word(const struct lanai_dev *lanai,
566 return -EIO; 566 return -EIO;
567} 567}
568 568
569static int __devinit sram_test_pass(const struct lanai_dev *lanai, u32 pattern) 569static int sram_test_pass(const struct lanai_dev *lanai, u32 pattern)
570{ 570{
571 int offset, result = 0; 571 int offset, result = 0;
572 for (offset = 0; offset < SRAM_BYTES && result == 0; offset += 4) 572 for (offset = 0; offset < SRAM_BYTES && result == 0; offset += 4)
@@ -574,7 +574,7 @@ static int __devinit sram_test_pass(const struct lanai_dev *lanai, u32 pattern)
574 return result; 574 return result;
575} 575}
576 576
577static int __devinit sram_test_and_clear(const struct lanai_dev *lanai) 577static int sram_test_and_clear(const struct lanai_dev *lanai)
578{ 578{
579#ifdef FULL_MEMORY_TEST 579#ifdef FULL_MEMORY_TEST
580 int result; 580 int result;
@@ -860,7 +860,7 @@ static inline void aal0_buffer_free(struct lanai_dev *lanai)
860#ifndef READ_EEPROM 860#ifndef READ_EEPROM
861 861
862/* Stub functions to use if EEPROM reading is disabled */ 862/* Stub functions to use if EEPROM reading is disabled */
863static int __devinit eeprom_read(struct lanai_dev *lanai) 863static int eeprom_read(struct lanai_dev *lanai)
864{ 864{
865 printk(KERN_INFO DEV_LABEL "(itf %d): *NOT* reading EEPROM\n", 865 printk(KERN_INFO DEV_LABEL "(itf %d): *NOT* reading EEPROM\n",
866 lanai->number); 866 lanai->number);
@@ -868,7 +868,7 @@ static int __devinit eeprom_read(struct lanai_dev *lanai)
868 return 0; 868 return 0;
869} 869}
870 870
871static int __devinit eeprom_validate(struct lanai_dev *lanai) 871static int eeprom_validate(struct lanai_dev *lanai)
872{ 872{
873 lanai->serialno = 0; 873 lanai->serialno = 0;
874 lanai->magicno = EEPROM_MAGIC_VALUE; 874 lanai->magicno = EEPROM_MAGIC_VALUE;
@@ -877,7 +877,7 @@ static int __devinit eeprom_validate(struct lanai_dev *lanai)
877 877
878#else /* READ_EEPROM */ 878#else /* READ_EEPROM */
879 879
880static int __devinit eeprom_read(struct lanai_dev *lanai) 880static int eeprom_read(struct lanai_dev *lanai)
881{ 881{
882 int i, address; 882 int i, address;
883 u8 data; 883 u8 data;
@@ -953,7 +953,7 @@ static inline u32 eeprom_be4(const struct lanai_dev *lanai, int address)
953} 953}
954 954
955/* Checksum/validate EEPROM contents */ 955/* Checksum/validate EEPROM contents */
956static int __devinit eeprom_validate(struct lanai_dev *lanai) 956static int eeprom_validate(struct lanai_dev *lanai)
957{ 957{
958 int i, s; 958 int i, s;
959 u32 v; 959 u32 v;
@@ -1448,7 +1448,7 @@ static void vcc_rx_aal0(struct lanai_dev *lanai)
1448#include <linux/vmalloc.h> 1448#include <linux/vmalloc.h>
1449#endif 1449#endif
1450 1450
1451static int __devinit vcc_table_allocate(struct lanai_dev *lanai) 1451static int vcc_table_allocate(struct lanai_dev *lanai)
1452{ 1452{
1453#ifdef VCCTABLE_GETFREEPAGE 1453#ifdef VCCTABLE_GETFREEPAGE
1454 APRINTK((lanai->num_vci) * sizeof(struct lanai_vcc *) <= PAGE_SIZE, 1454 APRINTK((lanai->num_vci) * sizeof(struct lanai_vcc *) <= PAGE_SIZE,
@@ -1588,7 +1588,7 @@ static void lanai_reset(struct lanai_dev *lanai)
1588/* 1588/*
1589 * Allocate service buffer and tell card about it 1589 * Allocate service buffer and tell card about it
1590 */ 1590 */
1591static int __devinit service_buffer_allocate(struct lanai_dev *lanai) 1591static int service_buffer_allocate(struct lanai_dev *lanai)
1592{ 1592{
1593 lanai_buf_allocate(&lanai->service, SERVICE_ENTRIES * 4, 8, 1593 lanai_buf_allocate(&lanai->service, SERVICE_ENTRIES * 4, 8,
1594 lanai->pci); 1594 lanai->pci);
@@ -1942,7 +1942,7 @@ static int check_board_id_and_rev(const char *name, u32 val, int *revp)
1942 1942
1943/* -------------------- PCI INITIALIZATION/SHUTDOWN: */ 1943/* -------------------- PCI INITIALIZATION/SHUTDOWN: */
1944 1944
1945static int __devinit lanai_pci_start(struct lanai_dev *lanai) 1945static int lanai_pci_start(struct lanai_dev *lanai)
1946{ 1946{
1947 struct pci_dev *pci = lanai->pci; 1947 struct pci_dev *pci = lanai->pci;
1948 int result; 1948 int result;
@@ -2123,7 +2123,7 @@ static inline void lanai_cbr_shutdown(struct lanai_dev *lanai)
2123/* -------------------- OPERATIONS: */ 2123/* -------------------- OPERATIONS: */
2124 2124
2125/* setup a newly detected device */ 2125/* setup a newly detected device */
2126static int __devinit lanai_dev_open(struct atm_dev *atmdev) 2126static int lanai_dev_open(struct atm_dev *atmdev)
2127{ 2127{
2128 struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data; 2128 struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data;
2129 unsigned long raw_base; 2129 unsigned long raw_base;
@@ -2566,8 +2566,8 @@ static const struct atmdev_ops ops = {
2566}; 2566};
2567 2567
2568/* initialize one probed card */ 2568/* initialize one probed card */
2569static int __devinit lanai_init_one(struct pci_dev *pci, 2569static int lanai_init_one(struct pci_dev *pci,
2570 const struct pci_device_id *ident) 2570 const struct pci_device_id *ident)
2571{ 2571{
2572 struct lanai_dev *lanai; 2572 struct lanai_dev *lanai;
2573 struct atm_dev *atmdev; 2573 struct atm_dev *atmdev;
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 1c70c45fa044..ed1d2b7f923b 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -121,8 +121,8 @@
121static u32 ns_read_sram(ns_dev * card, u32 sram_address); 121static u32 ns_read_sram(ns_dev * card, u32 sram_address);
122static void ns_write_sram(ns_dev * card, u32 sram_address, u32 * value, 122static void ns_write_sram(ns_dev * card, u32 sram_address, u32 * value,
123 int count); 123 int count);
124static int __devinit ns_init_card(int i, struct pci_dev *pcidev); 124static int ns_init_card(int i, struct pci_dev *pcidev);
125static void __devinit ns_init_card_error(ns_dev * card, int error); 125static void ns_init_card_error(ns_dev * card, int error);
126static scq_info *get_scq(ns_dev *card, int size, u32 scd); 126static scq_info *get_scq(ns_dev *card, int size, u32 scd);
127static void free_scq(ns_dev *card, scq_info * scq, struct atm_vcc *vcc); 127static void free_scq(ns_dev *card, scq_info * scq, struct atm_vcc *vcc);
128static void push_rxbufs(ns_dev *, struct sk_buff *); 128static void push_rxbufs(ns_dev *, struct sk_buff *);
@@ -180,8 +180,8 @@ MODULE_LICENSE("GPL");
180 180
181/* Functions */ 181/* Functions */
182 182
183static int __devinit nicstar_init_one(struct pci_dev *pcidev, 183static int nicstar_init_one(struct pci_dev *pcidev,
184 const struct pci_device_id *ent) 184 const struct pci_device_id *ent)
185{ 185{
186 static int index = -1; 186 static int index = -1;
187 unsigned int error; 187 unsigned int error;
@@ -200,7 +200,7 @@ err_out:
200 return -ENODEV; 200 return -ENODEV;
201} 201}
202 202
203static void __devexit nicstar_remove_one(struct pci_dev *pcidev) 203static void nicstar_remove_one(struct pci_dev *pcidev)
204{ 204{
205 int i, j; 205 int i, j;
206 ns_dev *card = pci_get_drvdata(pcidev); 206 ns_dev *card = pci_get_drvdata(pcidev);
@@ -262,7 +262,7 @@ static void __devexit nicstar_remove_one(struct pci_dev *pcidev)
262 kfree(card); 262 kfree(card);
263} 263}
264 264
265static struct pci_device_id nicstar_pci_tbl[] __devinitdata = { 265static struct pci_device_id nicstar_pci_tbl[] = {
266 { PCI_VDEVICE(IDT, PCI_DEVICE_ID_IDT_IDT77201), 0 }, 266 { PCI_VDEVICE(IDT, PCI_DEVICE_ID_IDT_IDT77201), 0 },
267 {0,} /* terminate list */ 267 {0,} /* terminate list */
268}; 268};
@@ -273,7 +273,7 @@ static struct pci_driver nicstar_driver = {
273 .name = "nicstar", 273 .name = "nicstar",
274 .id_table = nicstar_pci_tbl, 274 .id_table = nicstar_pci_tbl,
275 .probe = nicstar_init_one, 275 .probe = nicstar_init_one,
276 .remove = __devexit_p(nicstar_remove_one), 276 .remove = nicstar_remove_one,
277}; 277};
278 278
279static int __init nicstar_init(void) 279static int __init nicstar_init(void)
@@ -351,7 +351,7 @@ static void ns_write_sram(ns_dev * card, u32 sram_address, u32 * value,
351 spin_unlock_irqrestore(&card->res_lock, flags); 351 spin_unlock_irqrestore(&card->res_lock, flags);
352} 352}
353 353
354static int __devinit ns_init_card(int i, struct pci_dev *pcidev) 354static int ns_init_card(int i, struct pci_dev *pcidev)
355{ 355{
356 int j; 356 int j;
357 struct ns_dev *card = NULL; 357 struct ns_dev *card = NULL;
@@ -821,7 +821,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
821 return error; 821 return error;
822} 822}
823 823
824static void __devinit ns_init_card_error(ns_dev * card, int error) 824static void ns_init_card_error(ns_dev *card, int error)
825{ 825{
826 if (error >= 17) { 826 if (error >= 17) {
827 writel(0x00000000, card->membase + CFG); 827 writel(0x00000000, card->membase + CFG);
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index d70abe77f737..0474a89170b9 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -538,7 +538,7 @@ static ssize_t geos_gpio_store(struct device *dev, struct device_attribute *attr
538 } else { 538 } else {
539 count = -EINVAL; 539 count = -EINVAL;
540 } 540 }
541 spin_lock_irq(&card->param_queue_lock); 541 spin_unlock_irq(&card->param_queue_lock);
542 return count; 542 return count;
543} 543}
544 544
@@ -1462,7 +1462,7 @@ static void fpga_remove(struct pci_dev *dev)
1462 kfree(card); 1462 kfree(card);
1463} 1463}
1464 1464
1465static struct pci_device_id fpga_pci_tbl[] __devinitdata = { 1465static struct pci_device_id fpga_pci_tbl[] = {
1466 { 0x10ee, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 1466 { 0x10ee, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
1467 { 0, } 1467 { 0, }
1468}; 1468};
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index abe4e20b0766..969c3c29000c 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -1094,8 +1094,8 @@ static irqreturn_t zatm_int(int irq,void *dev_id)
1094/*----------------------------- (E)EPROM access -----------------------------*/ 1094/*----------------------------- (E)EPROM access -----------------------------*/
1095 1095
1096 1096
1097static void __devinit eprom_set(struct zatm_dev *zatm_dev,unsigned long value, 1097static void eprom_set(struct zatm_dev *zatm_dev, unsigned long value,
1098 unsigned short cmd) 1098 unsigned short cmd)
1099{ 1099{
1100 int error; 1100 int error;
1101 1101
@@ -1105,8 +1105,7 @@ static void __devinit eprom_set(struct zatm_dev *zatm_dev,unsigned long value,
1105} 1105}
1106 1106
1107 1107
1108static unsigned long __devinit eprom_get(struct zatm_dev *zatm_dev, 1108static unsigned long eprom_get(struct zatm_dev *zatm_dev, unsigned short cmd)
1109 unsigned short cmd)
1110{ 1109{
1111 unsigned int value; 1110 unsigned int value;
1112 int error; 1111 int error;
@@ -1118,8 +1117,8 @@ static unsigned long __devinit eprom_get(struct zatm_dev *zatm_dev,
1118} 1117}
1119 1118
1120 1119
1121static void __devinit eprom_put_bits(struct zatm_dev *zatm_dev, 1120static void eprom_put_bits(struct zatm_dev *zatm_dev, unsigned long data,
1122 unsigned long data,int bits,unsigned short cmd) 1121 int bits, unsigned short cmd)
1123{ 1122{
1124 unsigned long value; 1123 unsigned long value;
1125 int i; 1124 int i;
@@ -1133,8 +1132,8 @@ static void __devinit eprom_put_bits(struct zatm_dev *zatm_dev,
1133} 1132}
1134 1133
1135 1134
1136static void __devinit eprom_get_byte(struct zatm_dev *zatm_dev, 1135static void eprom_get_byte(struct zatm_dev *zatm_dev, unsigned char *byte,
1137 unsigned char *byte,unsigned short cmd) 1136 unsigned short cmd)
1138{ 1137{
1139 int i; 1138 int i;
1140 1139
@@ -1149,8 +1148,8 @@ static void __devinit eprom_get_byte(struct zatm_dev *zatm_dev,
1149} 1148}
1150 1149
1151 1150
1152static unsigned char __devinit eprom_try_esi(struct atm_dev *dev, 1151static unsigned char eprom_try_esi(struct atm_dev *dev, unsigned short cmd,
1153 unsigned short cmd,int offset,int swap) 1152 int offset, int swap)
1154{ 1153{
1155 unsigned char buf[ZEPROM_SIZE]; 1154 unsigned char buf[ZEPROM_SIZE];
1156 struct zatm_dev *zatm_dev; 1155 struct zatm_dev *zatm_dev;
@@ -1170,7 +1169,7 @@ static unsigned char __devinit eprom_try_esi(struct atm_dev *dev,
1170} 1169}
1171 1170
1172 1171
1173static void __devinit eprom_get_esi(struct atm_dev *dev) 1172static void eprom_get_esi(struct atm_dev *dev)
1174{ 1173{
1175 if (eprom_try_esi(dev,ZEPROM_V1_REG,ZEPROM_V1_ESI_OFF,1)) return; 1174 if (eprom_try_esi(dev,ZEPROM_V1_REG,ZEPROM_V1_ESI_OFF,1)) return;
1176 (void) eprom_try_esi(dev,ZEPROM_V2_REG,ZEPROM_V2_ESI_OFF,0); 1175 (void) eprom_try_esi(dev,ZEPROM_V2_REG,ZEPROM_V2_ESI_OFF,0);
@@ -1180,7 +1179,7 @@ static void __devinit eprom_get_esi(struct atm_dev *dev)
1180/*--------------------------------- entries ---------------------------------*/ 1179/*--------------------------------- entries ---------------------------------*/
1181 1180
1182 1181
1183static int __devinit zatm_init(struct atm_dev *dev) 1182static int zatm_init(struct atm_dev *dev)
1184{ 1183{
1185 struct zatm_dev *zatm_dev; 1184 struct zatm_dev *zatm_dev;
1186 struct pci_dev *pci_dev; 1185 struct pci_dev *pci_dev;
@@ -1257,7 +1256,7 @@ static int __devinit zatm_init(struct atm_dev *dev)
1257} 1256}
1258 1257
1259 1258
1260static int __devinit zatm_start(struct atm_dev *dev) 1259static int zatm_start(struct atm_dev *dev)
1261{ 1260{
1262 struct zatm_dev *zatm_dev = ZATM_DEV(dev); 1261 struct zatm_dev *zatm_dev = ZATM_DEV(dev);
1263 struct pci_dev *pdev = zatm_dev->pci_dev; 1262 struct pci_dev *pdev = zatm_dev->pci_dev;
@@ -1584,8 +1583,8 @@ static const struct atmdev_ops ops = {
1584 .change_qos = zatm_change_qos, 1583 .change_qos = zatm_change_qos,
1585}; 1584};
1586 1585
1587static int __devinit zatm_init_one(struct pci_dev *pci_dev, 1586static int zatm_init_one(struct pci_dev *pci_dev,
1588 const struct pci_device_id *ent) 1587 const struct pci_device_id *ent)
1589{ 1588{
1590 struct atm_dev *dev; 1589 struct atm_dev *dev;
1591 struct zatm_dev *zatm_dev; 1590 struct zatm_dev *zatm_dev;
@@ -1636,7 +1635,7 @@ out_free:
1636 1635
1637MODULE_LICENSE("GPL"); 1636MODULE_LICENSE("GPL");
1638 1637
1639static struct pci_device_id zatm_pci_tbl[] __devinitdata = { 1638static struct pci_device_id zatm_pci_tbl[] = {
1640 { PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1221), ZATM_COPPER }, 1639 { PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1221), ZATM_COPPER },
1641 { PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1225), 0 }, 1640 { PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1225), 0 },
1642 { 0, } 1641 { 0, }
diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c
index 5ad3bad2b0a5..d585735430dd 100644
--- a/drivers/auxdisplay/cfag12864bfb.c
+++ b/drivers/auxdisplay/cfag12864bfb.c
@@ -37,7 +37,7 @@
37 37
38#define CFAG12864BFB_NAME "cfag12864bfb" 38#define CFAG12864BFB_NAME "cfag12864bfb"
39 39
40static struct fb_fix_screeninfo cfag12864bfb_fix __devinitdata = { 40static struct fb_fix_screeninfo cfag12864bfb_fix = {
41 .id = "cfag12864b", 41 .id = "cfag12864b",
42 .type = FB_TYPE_PACKED_PIXELS, 42 .type = FB_TYPE_PACKED_PIXELS,
43 .visual = FB_VISUAL_MONO10, 43 .visual = FB_VISUAL_MONO10,
@@ -48,7 +48,7 @@ static struct fb_fix_screeninfo cfag12864bfb_fix __devinitdata = {
48 .accel = FB_ACCEL_NONE, 48 .accel = FB_ACCEL_NONE,
49}; 49};
50 50
51static struct fb_var_screeninfo cfag12864bfb_var __devinitdata = { 51static struct fb_var_screeninfo cfag12864bfb_var = {
52 .xres = CFAG12864B_WIDTH, 52 .xres = CFAG12864B_WIDTH,
53 .yres = CFAG12864B_HEIGHT, 53 .yres = CFAG12864B_HEIGHT,
54 .xres_virtual = CFAG12864B_WIDTH, 54 .xres_virtual = CFAG12864B_WIDTH,
@@ -80,7 +80,7 @@ static struct fb_ops cfag12864bfb_ops = {
80 .fb_mmap = cfag12864bfb_mmap, 80 .fb_mmap = cfag12864bfb_mmap,
81}; 81};
82 82
83static int __devinit cfag12864bfb_probe(struct platform_device *device) 83static int cfag12864bfb_probe(struct platform_device *device)
84{ 84{
85 int ret = -EINVAL; 85 int ret = -EINVAL;
86 struct fb_info *info = framebuffer_alloc(0, &device->dev); 86 struct fb_info *info = framebuffer_alloc(0, &device->dev);
@@ -114,7 +114,7 @@ none:
114 return ret; 114 return ret;
115} 115}
116 116
117static int __devexit cfag12864bfb_remove(struct platform_device *device) 117static int cfag12864bfb_remove(struct platform_device *device)
118{ 118{
119 struct fb_info *info = platform_get_drvdata(device); 119 struct fb_info *info = platform_get_drvdata(device);
120 120
@@ -128,7 +128,7 @@ static int __devexit cfag12864bfb_remove(struct platform_device *device)
128 128
129static struct platform_driver cfag12864bfb_driver = { 129static struct platform_driver cfag12864bfb_driver = {
130 .probe = cfag12864bfb_probe, 130 .probe = cfag12864bfb_probe,
131 .remove = __devexit_p(cfag12864bfb_remove), 131 .remove = cfag12864bfb_remove,
132 .driver = { 132 .driver = {
133 .name = CFAG12864BFB_NAME, 133 .name = CFAG12864BFB_NAME,
134 }, 134 },
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index a3c1404c7933..2b7f77d3fcb0 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -513,6 +513,8 @@ static int device_resume_early(struct device *dev, pm_message_t state)
513 513
514 Out: 514 Out:
515 TRACE_RESUME(error); 515 TRACE_RESUME(error);
516
517 pm_runtime_enable(dev);
516 return error; 518 return error;
517} 519}
518 520
@@ -589,8 +591,6 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
589 if (!dev->power.is_suspended) 591 if (!dev->power.is_suspended)
590 goto Unlock; 592 goto Unlock;
591 593
592 pm_runtime_enable(dev);
593
594 if (dev->pm_domain) { 594 if (dev->pm_domain) {
595 info = "power domain "; 595 info = "power domain ";
596 callback = pm_op(&dev->pm_domain->ops, state); 596 callback = pm_op(&dev->pm_domain->ops, state);
@@ -930,6 +930,8 @@ static int device_suspend_late(struct device *dev, pm_message_t state)
930 pm_callback_t callback = NULL; 930 pm_callback_t callback = NULL;
931 char *info = NULL; 931 char *info = NULL;
932 932
933 __pm_runtime_disable(dev, false);
934
933 if (dev->power.syscore) 935 if (dev->power.syscore)
934 return 0; 936 return 0;
935 937
@@ -1133,11 +1135,8 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
1133 1135
1134 Complete: 1136 Complete:
1135 complete_all(&dev->power.completion); 1137 complete_all(&dev->power.completion);
1136
1137 if (error) 1138 if (error)
1138 async_error = error; 1139 async_error = error;
1139 else if (dev->power.is_suspended)
1140 __pm_runtime_disable(dev, false);
1141 1140
1142 return error; 1141 return error;
1143} 1142}
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c
index ff46387f5308..d21349544ce5 100644
--- a/drivers/base/power/qos.c
+++ b/drivers/base/power/qos.c
@@ -542,19 +542,19 @@ int dev_pm_qos_add_ancestor_request(struct device *dev,
542 struct dev_pm_qos_request *req, s32 value) 542 struct dev_pm_qos_request *req, s32 value)
543{ 543{
544 struct device *ancestor = dev->parent; 544 struct device *ancestor = dev->parent;
545 int error = -ENODEV; 545 int ret = -ENODEV;
546 546
547 while (ancestor && !ancestor->power.ignore_children) 547 while (ancestor && !ancestor->power.ignore_children)
548 ancestor = ancestor->parent; 548 ancestor = ancestor->parent;
549 549
550 if (ancestor) 550 if (ancestor)
551 error = dev_pm_qos_add_request(ancestor, req, 551 ret = dev_pm_qos_add_request(ancestor, req,
552 DEV_PM_QOS_LATENCY, value); 552 DEV_PM_QOS_LATENCY, value);
553 553
554 if (error < 0) 554 if (ret < 0)
555 req->dev = NULL; 555 req->dev = NULL;
556 556
557 return error; 557 return ret;
558} 558}
559EXPORT_SYMBOL_GPL(dev_pm_qos_add_ancestor_request); 559EXPORT_SYMBOL_GPL(dev_pm_qos_add_ancestor_request);
560 560
diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
index d7b56a88c9f4..8b4221cfd118 100644
--- a/drivers/bcma/Kconfig
+++ b/drivers/bcma/Kconfig
@@ -67,8 +67,7 @@ config BCMA_DRIVER_GMAC_CMN
67 67
68config BCMA_DRIVER_GPIO 68config BCMA_DRIVER_GPIO
69 bool "BCMA GPIO driver" 69 bool "BCMA GPIO driver"
70 depends on BCMA 70 depends on BCMA && GPIOLIB
71 select GPIOLIB
72 help 71 help
73 Driver to provide access to the GPIO pins of the bcma bus. 72 Driver to provide access to the GPIO pins of the bcma bus.
74 73
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index 4a2d72ec6d43..19e3fbfd5757 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -22,7 +22,7 @@
22struct bcma_bus; 22struct bcma_bus;
23 23
24/* main.c */ 24/* main.c */
25int __devinit bcma_bus_register(struct bcma_bus *bus); 25int bcma_bus_register(struct bcma_bus *bus);
26void bcma_bus_unregister(struct bcma_bus *bus); 26void bcma_bus_unregister(struct bcma_bus *bus);
27int __init bcma_bus_early_register(struct bcma_bus *bus, 27int __init bcma_bus_early_register(struct bcma_bus *bus,
28 struct bcma_device *core_cc, 28 struct bcma_device *core_cc,
@@ -87,8 +87,8 @@ u32 bcma_pcie_read(struct bcma_drv_pci *pc, u32 address);
87extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc); 87extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc);
88 88
89#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE 89#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
90bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc); 90bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc);
91void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc); 91void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
92#endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */ 92#endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
93 93
94#ifdef CONFIG_BCMA_DRIVER_GPIO 94#ifdef CONFIG_BCMA_DRIVER_GPIO
diff --git a/drivers/bcma/driver_chipcommon_sflash.c b/drivers/bcma/driver_chipcommon_sflash.c
index 63e688393825..1e694db4532d 100644
--- a/drivers/bcma/driver_chipcommon_sflash.c
+++ b/drivers/bcma/driver_chipcommon_sflash.c
@@ -35,7 +35,7 @@ static struct bcma_sflash_tbl_e bcma_sflash_st_tbl[] = {
35 { "M25P40", 0x12, 0x10000, 8, }, 35 { "M25P40", 0x12, 0x10000, 8, },
36 36
37 { "M25P16", 0x14, 0x10000, 32, }, 37 { "M25P16", 0x14, 0x10000, 32, },
38 { "M25P32", 0x14, 0x10000, 64, }, 38 { "M25P32", 0x15, 0x10000, 64, },
39 { "M25P64", 0x16, 0x10000, 128, }, 39 { "M25P64", 0x16, 0x10000, 128, },
40 { "M25FL128", 0x17, 0x10000, 256, }, 40 { "M25FL128", 0x17, 0x10000, 256, },
41 { 0 }, 41 { 0 },
diff --git a/drivers/bcma/driver_gmac_cmn.c b/drivers/bcma/driver_gmac_cmn.c
index 834225f65e8f..dcb137926d31 100644
--- a/drivers/bcma/driver_gmac_cmn.c
+++ b/drivers/bcma/driver_gmac_cmn.c
@@ -8,7 +8,7 @@
8#include "bcma_private.h" 8#include "bcma_private.h"
9#include <linux/bcma/bcma.h> 9#include <linux/bcma/bcma.h>
10 10
11void __devinit bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) 11void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc)
12{ 12{
13 mutex_init(&gc->phy_mutex); 13 mutex_init(&gc->phy_mutex);
14} 14}
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
index c39ee6d45850..cf7a476a519f 100644
--- a/drivers/bcma/driver_pci.c
+++ b/drivers/bcma/driver_pci.c
@@ -207,14 +207,14 @@ static void bcma_core_pci_config_fixup(struct bcma_drv_pci *pc)
207 * Init. 207 * Init.
208 **************************************************/ 208 **************************************************/
209 209
210static void __devinit bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc) 210static void bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc)
211{ 211{
212 bcma_core_pci_fixcfg(pc); 212 bcma_core_pci_fixcfg(pc);
213 bcma_pcicore_serdes_workaround(pc); 213 bcma_pcicore_serdes_workaround(pc);
214 bcma_core_pci_config_fixup(pc); 214 bcma_core_pci_config_fixup(pc);
215} 215}
216 216
217void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc) 217void bcma_core_pci_init(struct bcma_drv_pci *pc)
218{ 218{
219 if (pc->setup_done) 219 if (pc->setup_done)
220 return; 220 return;
diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c
index e6b5c89469dc..af0c9fabee54 100644
--- a/drivers/bcma/driver_pci_host.c
+++ b/drivers/bcma/driver_pci_host.c
@@ -24,7 +24,7 @@
24#define BCMA_PCI_SLOT_MAX 16 24#define BCMA_PCI_SLOT_MAX 16
25#define PCI_CONFIG_SPACE_SIZE 256 25#define PCI_CONFIG_SPACE_SIZE 256
26 26
27bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc) 27bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
28{ 28{
29 struct bcma_bus *bus = pc->core->bus; 29 struct bcma_bus *bus = pc->core->bus;
30 u16 chipid_top; 30 u16 chipid_top;
@@ -264,10 +264,9 @@ static int bcma_core_pci_hostmode_write_config(struct pci_bus *bus,
264} 264}
265 265
266/* return cap_offset if requested capability exists in the PCI config space */ 266/* return cap_offset if requested capability exists in the PCI config space */
267static u8 __devinit bcma_find_pci_capability(struct bcma_drv_pci *pc, 267static u8 bcma_find_pci_capability(struct bcma_drv_pci *pc, unsigned int dev,
268 unsigned int dev, 268 unsigned int func, u8 req_cap_id,
269 unsigned int func, u8 req_cap_id, 269 unsigned char *buf, u32 *buflen)
270 unsigned char *buf, u32 *buflen)
271{ 270{
272 u8 cap_id; 271 u8 cap_id;
273 u8 cap_ptr = 0; 272 u8 cap_ptr = 0;
@@ -334,7 +333,7 @@ static u8 __devinit bcma_find_pci_capability(struct bcma_drv_pci *pc,
334 * Retry Status (CRS) Completion Status to software then 333 * Retry Status (CRS) Completion Status to software then
335 * enable the feature. 334 * enable the feature.
336 */ 335 */
337static void __devinit bcma_core_pci_enable_crs(struct bcma_drv_pci *pc) 336static void bcma_core_pci_enable_crs(struct bcma_drv_pci *pc)
338{ 337{
339 struct bcma_bus *bus = pc->core->bus; 338 struct bcma_bus *bus = pc->core->bus;
340 u8 cap_ptr, root_ctrl, root_cap, dev; 339 u8 cap_ptr, root_ctrl, root_cap, dev;
@@ -381,7 +380,7 @@ static void __devinit bcma_core_pci_enable_crs(struct bcma_drv_pci *pc)
381 } 380 }
382} 381}
383 382
384void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc) 383void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
385{ 384{
386 struct bcma_bus *bus = pc->core->bus; 385 struct bcma_bus *bus = pc->core->bus;
387 struct bcma_drv_pci_host *pc_host; 386 struct bcma_drv_pci_host *pc_host;
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 98fdc3e014e7..fbf2759e7e4e 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -155,8 +155,8 @@ static const struct bcma_host_ops bcma_host_pci_ops = {
155 .awrite32 = bcma_host_pci_awrite32, 155 .awrite32 = bcma_host_pci_awrite32,
156}; 156};
157 157
158static int __devinit bcma_host_pci_probe(struct pci_dev *dev, 158static int bcma_host_pci_probe(struct pci_dev *dev,
159 const struct pci_device_id *id) 159 const struct pci_device_id *id)
160{ 160{
161 struct bcma_bus *bus; 161 struct bcma_bus *bus;
162 int err = -ENOMEM; 162 int err = -ENOMEM;
@@ -226,7 +226,7 @@ err_kfree_bus:
226 return err; 226 return err;
227} 227}
228 228
229static void __devexit bcma_host_pci_remove(struct pci_dev *dev) 229static void bcma_host_pci_remove(struct pci_dev *dev)
230{ 230{
231 struct bcma_bus *bus = pci_get_drvdata(dev); 231 struct bcma_bus *bus = pci_get_drvdata(dev);
232 232
@@ -284,7 +284,7 @@ static struct pci_driver bcma_pci_bridge_driver = {
284 .name = "bcma-pci-bridge", 284 .name = "bcma-pci-bridge",
285 .id_table = bcma_pci_bridge_tbl, 285 .id_table = bcma_pci_bridge_tbl,
286 .probe = bcma_host_pci_probe, 286 .probe = bcma_host_pci_probe,
287 .remove = __devexit_p(bcma_host_pci_remove), 287 .remove = bcma_host_pci_remove,
288 .driver.pm = BCMA_PM_OPS, 288 .driver.pm = BCMA_PM_OPS,
289}; 289};
290 290
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 53ba20ca17e0..4a92f647b58b 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -192,7 +192,7 @@ static void bcma_unregister_cores(struct bcma_bus *bus)
192 platform_device_unregister(bus->drv_cc.watchdog); 192 platform_device_unregister(bus->drv_cc.watchdog);
193} 193}
194 194
195int __devinit bcma_bus_register(struct bcma_bus *bus) 195int bcma_bus_register(struct bcma_bus *bus)
196{ 196{
197 int err; 197 int err;
198 struct bcma_device *core; 198 struct bcma_device *core;
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 6526157edafc..ade58bc8f3c4 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -181,8 +181,8 @@ static void cciss_geometry_inquiry(ctlr_info_t *h, int logvol,
181 sector_t total_size, 181 sector_t total_size,
182 unsigned int block_size, InquiryData_struct *inq_buff, 182 unsigned int block_size, InquiryData_struct *inq_buff,
183 drive_info_struct *drv); 183 drive_info_struct *drv);
184static void __devinit cciss_interrupt_mode(ctlr_info_t *); 184static void cciss_interrupt_mode(ctlr_info_t *);
185static int __devinit cciss_enter_simple_mode(struct ctlr_info *h); 185static int cciss_enter_simple_mode(struct ctlr_info *h);
186static void start_io(ctlr_info_t *h); 186static void start_io(ctlr_info_t *h);
187static int sendcmd_withirq(ctlr_info_t *h, __u8 cmd, void *buff, size_t size, 187static int sendcmd_withirq(ctlr_info_t *h, __u8 cmd, void *buff, size_t size,
188 __u8 page_code, unsigned char scsi3addr[], 188 __u8 page_code, unsigned char scsi3addr[],
@@ -199,14 +199,13 @@ static void cciss_device_release(struct device *dev);
199static void cciss_free_gendisk(ctlr_info_t *h, int drv_index); 199static void cciss_free_gendisk(ctlr_info_t *h, int drv_index);
200static void cciss_free_drive_info(ctlr_info_t *h, int drv_index); 200static void cciss_free_drive_info(ctlr_info_t *h, int drv_index);
201static inline u32 next_command(ctlr_info_t *h); 201static inline u32 next_command(ctlr_info_t *h);
202static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev, 202static int cciss_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr,
203 void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index, 203 u32 *cfg_base_addr, u64 *cfg_base_addr_index,
204 u64 *cfg_offset); 204 u64 *cfg_offset);
205static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev, 205static int cciss_pci_find_memory_BAR(struct pci_dev *pdev,
206 unsigned long *memory_bar); 206 unsigned long *memory_bar);
207static inline u32 cciss_tag_discard_error_bits(ctlr_info_t *h, u32 tag); 207static inline u32 cciss_tag_discard_error_bits(ctlr_info_t *h, u32 tag);
208static __devinit int write_driver_ver_to_cfgtable( 208static int write_driver_ver_to_cfgtable(CfgTable_struct __iomem *cfgtable);
209 CfgTable_struct __iomem *cfgtable);
210 209
211/* performant mode helper functions */ 210/* performant mode helper functions */
212static void calc_bucket_map(int *bucket, int num_buckets, int nsgs, 211static void calc_bucket_map(int *bucket, int num_buckets, int nsgs,
@@ -550,7 +549,7 @@ static const struct file_operations cciss_proc_fops = {
550 .write = cciss_proc_write, 549 .write = cciss_proc_write,
551}; 550};
552 551
553static void __devinit cciss_procinit(ctlr_info_t *h) 552static void cciss_procinit(ctlr_info_t *h)
554{ 553{
555 struct proc_dir_entry *pde; 554 struct proc_dir_entry *pde;
556 555
@@ -2663,8 +2662,8 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff,
2663 return status; 2662 return status;
2664} 2663}
2665 2664
2666static int __devinit cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr, 2665static int cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
2667 u8 reset_type) 2666 u8 reset_type)
2668{ 2667{
2669 CommandList_struct *c; 2668 CommandList_struct *c;
2670 int return_status; 2669 int return_status;
@@ -3919,7 +3918,7 @@ static void calc_bucket_map(int bucket[], int num_buckets,
3919 } 3918 }
3920} 3919}
3921 3920
3922static void __devinit cciss_wait_for_mode_change_ack(ctlr_info_t *h) 3921static void cciss_wait_for_mode_change_ack(ctlr_info_t *h)
3923{ 3922{
3924 int i; 3923 int i;
3925 3924
@@ -3933,8 +3932,7 @@ static void __devinit cciss_wait_for_mode_change_ack(ctlr_info_t *h)
3933 } 3932 }
3934} 3933}
3935 3934
3936static __devinit void cciss_enter_performant_mode(ctlr_info_t *h, 3935static void cciss_enter_performant_mode(ctlr_info_t *h, u32 use_short_tags)
3937 u32 use_short_tags)
3938{ 3936{
3939 /* This is a bit complicated. There are 8 registers on 3937 /* This is a bit complicated. There are 8 registers on
3940 * the controller which we write to to tell it 8 different 3938 * the controller which we write to to tell it 8 different
@@ -4000,7 +3998,7 @@ static __devinit void cciss_enter_performant_mode(ctlr_info_t *h,
4000 " performant mode\n"); 3998 " performant mode\n");
4001} 3999}
4002 4000
4003static void __devinit cciss_put_controller_into_performant_mode(ctlr_info_t *h) 4001static void cciss_put_controller_into_performant_mode(ctlr_info_t *h)
4004{ 4002{
4005 __u32 trans_support; 4003 __u32 trans_support;
4006 4004
@@ -4062,7 +4060,7 @@ clean_up:
4062 * controllers that are capable. If not, we use IO-APIC mode. 4060 * controllers that are capable. If not, we use IO-APIC mode.
4063 */ 4061 */
4064 4062
4065static void __devinit cciss_interrupt_mode(ctlr_info_t *h) 4063static void cciss_interrupt_mode(ctlr_info_t *h)
4066{ 4064{
4067#ifdef CONFIG_PCI_MSI 4065#ifdef CONFIG_PCI_MSI
4068 int err; 4066 int err;
@@ -4108,7 +4106,7 @@ default_int_mode:
4108 return; 4106 return;
4109} 4107}
4110 4108
4111static int __devinit cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id) 4109static int cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
4112{ 4110{
4113 int i; 4111 int i;
4114 u32 subsystem_vendor_id, subsystem_device_id; 4112 u32 subsystem_vendor_id, subsystem_device_id;
@@ -4134,8 +4132,8 @@ static inline bool cciss_board_disabled(ctlr_info_t *h)
4134 return ((command & PCI_COMMAND_MEMORY) == 0); 4132 return ((command & PCI_COMMAND_MEMORY) == 0);
4135} 4133}
4136 4134
4137static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev, 4135static int cciss_pci_find_memory_BAR(struct pci_dev *pdev,
4138 unsigned long *memory_bar) 4136 unsigned long *memory_bar)
4139{ 4137{
4140 int i; 4138 int i;
4141 4139
@@ -4151,8 +4149,8 @@ static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev,
4151 return -ENODEV; 4149 return -ENODEV;
4152} 4150}
4153 4151
4154static int __devinit cciss_wait_for_board_state(struct pci_dev *pdev, 4152static int cciss_wait_for_board_state(struct pci_dev *pdev,
4155 void __iomem *vaddr, int wait_for_ready) 4153 void __iomem *vaddr, int wait_for_ready)
4156#define BOARD_READY 1 4154#define BOARD_READY 1
4157#define BOARD_NOT_READY 0 4155#define BOARD_NOT_READY 0
4158{ 4156{
@@ -4179,9 +4177,9 @@ static int __devinit cciss_wait_for_board_state(struct pci_dev *pdev,
4179 return -ENODEV; 4177 return -ENODEV;
4180} 4178}
4181 4179
4182static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev, 4180static int cciss_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr,
4183 void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index, 4181 u32 *cfg_base_addr, u64 *cfg_base_addr_index,
4184 u64 *cfg_offset) 4182 u64 *cfg_offset)
4185{ 4183{
4186 *cfg_base_addr = readl(vaddr + SA5_CTCFG_OFFSET); 4184 *cfg_base_addr = readl(vaddr + SA5_CTCFG_OFFSET);
4187 *cfg_offset = readl(vaddr + SA5_CTMEM_OFFSET); 4185 *cfg_offset = readl(vaddr + SA5_CTMEM_OFFSET);
@@ -4195,7 +4193,7 @@ static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev,
4195 return 0; 4193 return 0;
4196} 4194}
4197 4195
4198static int __devinit cciss_find_cfgtables(ctlr_info_t *h) 4196static int cciss_find_cfgtables(ctlr_info_t *h)
4199{ 4197{
4200 u64 cfg_offset; 4198 u64 cfg_offset;
4201 u32 cfg_base_addr; 4199 u32 cfg_base_addr;
@@ -4224,7 +4222,7 @@ static int __devinit cciss_find_cfgtables(ctlr_info_t *h)
4224 return 0; 4222 return 0;
4225} 4223}
4226 4224
4227static void __devinit cciss_get_max_perf_mode_cmds(struct ctlr_info *h) 4225static void cciss_get_max_perf_mode_cmds(struct ctlr_info *h)
4228{ 4226{
4229 h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands)); 4227 h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands));
4230 4228
@@ -4245,7 +4243,7 @@ static void __devinit cciss_get_max_perf_mode_cmds(struct ctlr_info *h)
4245 * max commands, max SG elements without chaining, and with chaining, 4243 * max commands, max SG elements without chaining, and with chaining,
4246 * SG chain block size, etc. 4244 * SG chain block size, etc.
4247 */ 4245 */
4248static void __devinit cciss_find_board_params(ctlr_info_t *h) 4246static void cciss_find_board_params(ctlr_info_t *h)
4249{ 4247{
4250 cciss_get_max_perf_mode_cmds(h); 4248 cciss_get_max_perf_mode_cmds(h);
4251 h->nr_cmds = h->max_commands - 4 - cciss_tape_cmds; 4249 h->nr_cmds = h->max_commands - 4 - cciss_tape_cmds;
@@ -4304,7 +4302,7 @@ static inline void cciss_p600_dma_prefetch_quirk(ctlr_info_t *h)
4304 pci_write_config_dword(h->pdev, PCI_COMMAND_PARITY, dma_refetch); 4302 pci_write_config_dword(h->pdev, PCI_COMMAND_PARITY, dma_refetch);
4305} 4303}
4306 4304
4307static int __devinit cciss_pci_init(ctlr_info_t *h) 4305static int cciss_pci_init(ctlr_info_t *h)
4308{ 4306{
4309 int prod_index, err; 4307 int prod_index, err;
4310 4308
@@ -4424,7 +4422,8 @@ static void free_hba(ctlr_info_t *h)
4424} 4422}
4425 4423
4426/* Send a message CDB to the firmware. */ 4424/* Send a message CDB to the firmware. */
4427static __devinit int cciss_message(struct pci_dev *pdev, unsigned char opcode, unsigned char type) 4425static int cciss_message(struct pci_dev *pdev, unsigned char opcode,
4426 unsigned char type)
4428{ 4427{
4429 typedef struct { 4428 typedef struct {
4430 CommandListHeader_struct CommandHeader; 4429 CommandListHeader_struct CommandHeader;
@@ -4571,14 +4570,13 @@ static int cciss_controller_hard_reset(struct pci_dev *pdev,
4571 return 0; 4570 return 0;
4572} 4571}
4573 4572
4574static __devinit void init_driver_version(char *driver_version, int len) 4573static void init_driver_version(char *driver_version, int len)
4575{ 4574{
4576 memset(driver_version, 0, len); 4575 memset(driver_version, 0, len);
4577 strncpy(driver_version, "cciss " DRIVER_NAME, len - 1); 4576 strncpy(driver_version, "cciss " DRIVER_NAME, len - 1);
4578} 4577}
4579 4578
4580static __devinit int write_driver_ver_to_cfgtable( 4579static int write_driver_ver_to_cfgtable(CfgTable_struct __iomem *cfgtable)
4581 CfgTable_struct __iomem *cfgtable)
4582{ 4580{
4583 char *driver_version; 4581 char *driver_version;
4584 int i, size = sizeof(cfgtable->driver_version); 4582 int i, size = sizeof(cfgtable->driver_version);
@@ -4594,8 +4592,8 @@ static __devinit int write_driver_ver_to_cfgtable(
4594 return 0; 4592 return 0;
4595} 4593}
4596 4594
4597static __devinit void read_driver_ver_from_cfgtable( 4595static void read_driver_ver_from_cfgtable(CfgTable_struct __iomem *cfgtable,
4598 CfgTable_struct __iomem *cfgtable, unsigned char *driver_ver) 4596 unsigned char *driver_ver)
4599{ 4597{
4600 int i; 4598 int i;
4601 4599
@@ -4603,8 +4601,7 @@ static __devinit void read_driver_ver_from_cfgtable(
4603 driver_ver[i] = readb(&cfgtable->driver_version[i]); 4601 driver_ver[i] = readb(&cfgtable->driver_version[i]);
4604} 4602}
4605 4603
4606static __devinit int controller_reset_failed( 4604static int controller_reset_failed(CfgTable_struct __iomem *cfgtable)
4607 CfgTable_struct __iomem *cfgtable)
4608{ 4605{
4609 4606
4610 char *driver_ver, *old_driver_ver; 4607 char *driver_ver, *old_driver_ver;
@@ -4627,7 +4624,7 @@ static __devinit int controller_reset_failed(
4627 4624
4628/* This does a hard reset of the controller using PCI power management 4625/* This does a hard reset of the controller using PCI power management
4629 * states or using the doorbell register. */ 4626 * states or using the doorbell register. */
4630static __devinit int cciss_kdump_hard_reset_controller(struct pci_dev *pdev) 4627static int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
4631{ 4628{
4632 u64 cfg_offset; 4629 u64 cfg_offset;
4633 u32 cfg_base_addr; 4630 u32 cfg_base_addr;
@@ -4772,7 +4769,7 @@ unmap_vaddr:
4772 return rc; 4769 return rc;
4773} 4770}
4774 4771
4775static __devinit int cciss_init_reset_devices(struct pci_dev *pdev) 4772static int cciss_init_reset_devices(struct pci_dev *pdev)
4776{ 4773{
4777 int rc, i; 4774 int rc, i;
4778 4775
@@ -4806,7 +4803,7 @@ static __devinit int cciss_init_reset_devices(struct pci_dev *pdev)
4806 return 0; 4803 return 0;
4807} 4804}
4808 4805
4809static __devinit int cciss_allocate_cmd_pool(ctlr_info_t *h) 4806static int cciss_allocate_cmd_pool(ctlr_info_t *h)
4810{ 4807{
4811 h->cmd_pool_bits = kmalloc(BITS_TO_LONGS(h->nr_cmds) * 4808 h->cmd_pool_bits = kmalloc(BITS_TO_LONGS(h->nr_cmds) *
4812 sizeof(unsigned long), GFP_KERNEL); 4809 sizeof(unsigned long), GFP_KERNEL);
@@ -4825,7 +4822,7 @@ static __devinit int cciss_allocate_cmd_pool(ctlr_info_t *h)
4825 return 0; 4822 return 0;
4826} 4823}
4827 4824
4828static __devinit int cciss_allocate_scatterlists(ctlr_info_t *h) 4825static int cciss_allocate_scatterlists(ctlr_info_t *h)
4829{ 4826{
4830 int i; 4827 int i;
4831 4828
@@ -4893,7 +4890,7 @@ static int cciss_request_irq(ctlr_info_t *h,
4893 return -1; 4890 return -1;
4894} 4891}
4895 4892
4896static int __devinit cciss_kdump_soft_reset(ctlr_info_t *h) 4893static int cciss_kdump_soft_reset(ctlr_info_t *h)
4897{ 4894{
4898 if (cciss_send_reset(h, CTLR_LUNID, CCISS_RESET_TYPE_CONTROLLER)) { 4895 if (cciss_send_reset(h, CTLR_LUNID, CCISS_RESET_TYPE_CONTROLLER)) {
4899 dev_warn(&h->pdev->dev, "Resetting array controller failed.\n"); 4896 dev_warn(&h->pdev->dev, "Resetting array controller failed.\n");
@@ -4952,8 +4949,7 @@ static void cciss_undo_allocations_after_kdump_soft_reset(ctlr_info_t *h)
4952 * stealing all these major device numbers. 4949 * stealing all these major device numbers.
4953 * returns the number of block devices registered. 4950 * returns the number of block devices registered.
4954 */ 4951 */
4955static int __devinit cciss_init_one(struct pci_dev *pdev, 4952static int cciss_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
4956 const struct pci_device_id *ent)
4957{ 4953{
4958 int i; 4954 int i;
4959 int j = 0; 4955 int j = 0;
@@ -5207,7 +5203,7 @@ static void cciss_shutdown(struct pci_dev *pdev)
5207 free_irq(h->intr[h->intr_mode], h); 5203 free_irq(h->intr[h->intr_mode], h);
5208} 5204}
5209 5205
5210static int __devinit cciss_enter_simple_mode(struct ctlr_info *h) 5206static int cciss_enter_simple_mode(struct ctlr_info *h)
5211{ 5207{
5212 u32 trans_support; 5208 u32 trans_support;
5213 5209
@@ -5229,7 +5225,7 @@ static int __devinit cciss_enter_simple_mode(struct ctlr_info *h)
5229} 5225}
5230 5226
5231 5227
5232static void __devexit cciss_remove_one(struct pci_dev *pdev) 5228static void cciss_remove_one(struct pci_dev *pdev)
5233{ 5229{
5234 ctlr_info_t *h; 5230 ctlr_info_t *h;
5235 int i, j; 5231 int i, j;
@@ -5308,7 +5304,7 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
5308static struct pci_driver cciss_pci_driver = { 5304static struct pci_driver cciss_pci_driver = {
5309 .name = "cciss", 5305 .name = "cciss",
5310 .probe = cciss_init_one, 5306 .probe = cciss_init_one,
5311 .remove = __devexit_p(cciss_remove_one), 5307 .remove = cciss_remove_one,
5312 .id_table = cciss_pci_device_id, /* id_table */ 5308 .id_table = cciss_pci_device_id, /* id_table */
5313 .shutdown = cciss_shutdown, 5309 .shutdown = cciss_shutdown,
5314}; 5310};
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 9125bbeacd4d..3f087133a25a 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -320,7 +320,7 @@ static void release_io_mem(ctlr_info_t *c)
320 c->io_mem_length = 0; 320 c->io_mem_length = 0;
321} 321}
322 322
323static void __devexit cpqarray_remove_one(int i) 323static void cpqarray_remove_one(int i)
324{ 324{
325 int j; 325 int j;
326 char buff[4]; 326 char buff[4];
@@ -352,7 +352,7 @@ static void __devexit cpqarray_remove_one(int i)
352 free_hba(i); 352 free_hba(i);
353} 353}
354 354
355static void __devexit cpqarray_remove_one_pci (struct pci_dev *pdev) 355static void cpqarray_remove_one_pci(struct pci_dev *pdev)
356{ 356{
357 int i; 357 int i;
358 ctlr_info_t *tmp_ptr; 358 ctlr_info_t *tmp_ptr;
@@ -377,7 +377,7 @@ static void __devexit cpqarray_remove_one_pci (struct pci_dev *pdev)
377/* removing an instance that was not removed automatically.. 377/* removing an instance that was not removed automatically..
378 * must be an eisa card. 378 * must be an eisa card.
379 */ 379 */
380static void __devexit cpqarray_remove_one_eisa (int i) 380static void cpqarray_remove_one_eisa(int i)
381{ 381{
382 if (hba[i] == NULL) { 382 if (hba[i] == NULL) {
383 printk(KERN_ERR "cpqarray: controller %d appears to have" 383 printk(KERN_ERR "cpqarray: controller %d appears to have"
@@ -388,7 +388,7 @@ static void __devexit cpqarray_remove_one_eisa (int i)
388} 388}
389 389
390/* pdev is NULL for eisa */ 390/* pdev is NULL for eisa */
391static int __devinit cpqarray_register_ctlr( int i, struct pci_dev *pdev) 391static int cpqarray_register_ctlr(int i, struct pci_dev *pdev)
392{ 392{
393 struct request_queue *q; 393 struct request_queue *q;
394 int j; 394 int j;
@@ -505,8 +505,8 @@ Enomem4:
505 return -1; 505 return -1;
506} 506}
507 507
508static int __devinit cpqarray_init_one( struct pci_dev *pdev, 508static int cpqarray_init_one(struct pci_dev *pdev,
509 const struct pci_device_id *ent) 509 const struct pci_device_id *ent)
510{ 510{
511 int i; 511 int i;
512 512
@@ -536,7 +536,7 @@ static int __devinit cpqarray_init_one( struct pci_dev *pdev,
536static struct pci_driver cpqarray_pci_driver = { 536static struct pci_driver cpqarray_pci_driver = {
537 .name = "cpqarray", 537 .name = "cpqarray",
538 .probe = cpqarray_init_one, 538 .probe = cpqarray_init_one,
539 .remove = __devexit_p(cpqarray_remove_one_pci), 539 .remove = cpqarray_remove_one_pci,
540 .id_table = cpqarray_pci_device_id, 540 .id_table = cpqarray_pci_device_id,
541}; 541};
542 542
@@ -742,7 +742,7 @@ __setup("smart2=", cpqarray_setup);
742/* 742/*
743 * Find an EISA controller's signature. Set up an hba if we find it. 743 * Find an EISA controller's signature. Set up an hba if we find it.
744 */ 744 */
745static int __devinit cpqarray_eisa_detect(void) 745static int cpqarray_eisa_detect(void)
746{ 746{
747 int i=0, j; 747 int i=0, j;
748 __u32 board_id; 748 __u32 board_id;
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 931769e133e5..07fb2dfaae13 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -975,8 +975,8 @@ static int queue_request_irq(struct nvme_dev *dev, struct nvme_queue *nvmeq,
975 IRQF_DISABLED | IRQF_SHARED, name, nvmeq); 975 IRQF_DISABLED | IRQF_SHARED, name, nvmeq);
976} 976}
977 977
978static __devinit struct nvme_queue *nvme_create_queue(struct nvme_dev *dev, 978static struct nvme_queue *nvme_create_queue(struct nvme_dev *dev, int qid,
979 int qid, int cq_size, int vector) 979 int cq_size, int vector)
980{ 980{
981 int result; 981 int result;
982 struct nvme_queue *nvmeq = nvme_alloc_queue(dev, qid, cq_size, vector); 982 struct nvme_queue *nvmeq = nvme_alloc_queue(dev, qid, cq_size, vector);
@@ -1011,7 +1011,7 @@ static __devinit struct nvme_queue *nvme_create_queue(struct nvme_dev *dev,
1011 return ERR_PTR(result); 1011 return ERR_PTR(result);
1012} 1012}
1013 1013
1014static int __devinit nvme_configure_admin_queue(struct nvme_dev *dev) 1014static int nvme_configure_admin_queue(struct nvme_dev *dev)
1015{ 1015{
1016 int result = 0; 1016 int result = 0;
1017 u32 aqa; 1017 u32 aqa;
@@ -1408,7 +1408,7 @@ static int set_queue_count(struct nvme_dev *dev, int count)
1408 return min(result & 0xffff, result >> 16) + 1; 1408 return min(result & 0xffff, result >> 16) + 1;
1409} 1409}
1410 1410
1411static int __devinit nvme_setup_io_queues(struct nvme_dev *dev) 1411static int nvme_setup_io_queues(struct nvme_dev *dev)
1412{ 1412{
1413 int result, cpu, i, nr_io_queues, db_bar_size, q_depth; 1413 int result, cpu, i, nr_io_queues, db_bar_size, q_depth;
1414 1414
@@ -1481,7 +1481,7 @@ static void nvme_free_queues(struct nvme_dev *dev)
1481 nvme_free_queue(dev, i); 1481 nvme_free_queue(dev, i);
1482} 1482}
1483 1483
1484static int __devinit nvme_dev_add(struct nvme_dev *dev) 1484static int nvme_dev_add(struct nvme_dev *dev)
1485{ 1485{
1486 int res, nn, i; 1486 int res, nn, i;
1487 struct nvme_ns *ns, *next; 1487 struct nvme_ns *ns, *next;
@@ -1619,8 +1619,7 @@ static void nvme_release_instance(struct nvme_dev *dev)
1619 spin_unlock(&dev_list_lock); 1619 spin_unlock(&dev_list_lock);
1620} 1620}
1621 1621
1622static int __devinit nvme_probe(struct pci_dev *pdev, 1622static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1623 const struct pci_device_id *id)
1624{ 1623{
1625 int bars, result = -ENOMEM; 1624 int bars, result = -ENOMEM;
1626 struct nvme_dev *dev; 1625 struct nvme_dev *dev;
@@ -1702,7 +1701,7 @@ static int __devinit nvme_probe(struct pci_dev *pdev,
1702 return result; 1701 return result;
1703} 1702}
1704 1703
1705static void __devexit nvme_remove(struct pci_dev *pdev) 1704static void nvme_remove(struct pci_dev *pdev)
1706{ 1705{
1707 struct nvme_dev *dev = pci_get_drvdata(pdev); 1706 struct nvme_dev *dev = pci_get_drvdata(pdev);
1708 nvme_dev_remove(dev); 1707 nvme_dev_remove(dev);
@@ -1747,7 +1746,7 @@ static struct pci_driver nvme_driver = {
1747 .name = "nvme", 1746 .name = "nvme",
1748 .id_table = nvme_id_table, 1747 .id_table = nvme_id_table,
1749 .probe = nvme_probe, 1748 .probe = nvme_probe,
1750 .remove = __devexit_p(nvme_remove), 1749 .remove = nvme_remove,
1751 .suspend = nvme_suspend, 1750 .suspend = nvme_suspend,
1752 .resume = nvme_resume, 1751 .resume = nvme_resume,
1753 .err_handler = &nvme_err_handler, 1752 .err_handler = &nvme_err_handler,
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index da0abc1838c1..d754a88d7585 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -401,7 +401,7 @@ static unsigned long ps3disk_mask;
401 401
402static DEFINE_MUTEX(ps3disk_mask_mutex); 402static DEFINE_MUTEX(ps3disk_mask_mutex);
403 403
404static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev) 404static int ps3disk_probe(struct ps3_system_bus_device *_dev)
405{ 405{
406 struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); 406 struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
407 struct ps3disk_private *priv; 407 struct ps3disk_private *priv;
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index f58cdcfb305f..75e112d66006 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -536,7 +536,7 @@ static const struct file_operations ps3vram_proc_fops = {
536 .release = single_release, 536 .release = single_release,
537}; 537};
538 538
539static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev) 539static void ps3vram_proc_init(struct ps3_system_bus_device *dev)
540{ 540{
541 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); 541 struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
542 struct proc_dir_entry *pde; 542 struct proc_dir_entry *pde;
@@ -618,7 +618,7 @@ static void ps3vram_make_request(struct request_queue *q, struct bio *bio)
618 } while (bio); 618 } while (bio);
619} 619}
620 620
621static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev) 621static int ps3vram_probe(struct ps3_system_bus_device *dev)
622{ 622{
623 struct ps3vram_priv *priv; 623 struct ps3vram_priv *priv;
624 int error, status; 624 int error, status;
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 9dcf76a10bb6..564156a8e572 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -25,7 +25,7 @@
25#define DRV_MODULE_VERSION "1.0" 25#define DRV_MODULE_VERSION "1.0"
26#define DRV_MODULE_RELDATE "June 25, 2007" 26#define DRV_MODULE_RELDATE "June 25, 2007"
27 27
28static char version[] __devinitdata = 28static char version[] =
29 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 29 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
30MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); 30MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
31MODULE_DESCRIPTION("Sun LDOM virtual disk client driver"); 31MODULE_DESCRIPTION("Sun LDOM virtual disk client driver");
@@ -592,7 +592,7 @@ static int generic_request(struct vdc_port *port, u8 op, void *buf, int len)
592 return err; 592 return err;
593} 593}
594 594
595static int __devinit vdc_alloc_tx_ring(struct vdc_port *port) 595static int vdc_alloc_tx_ring(struct vdc_port *port)
596{ 596{
597 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; 597 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING];
598 unsigned long len, entry_size; 598 unsigned long len, entry_size;
@@ -725,7 +725,7 @@ static struct vio_driver_ops vdc_vio_ops = {
725 .handshake_complete = vdc_handshake_complete, 725 .handshake_complete = vdc_handshake_complete,
726}; 726};
727 727
728static void __devinit print_version(void) 728static void print_version(void)
729{ 729{
730 static int version_printed; 730 static int version_printed;
731 731
@@ -733,8 +733,7 @@ static void __devinit print_version(void)
733 printk(KERN_INFO "%s", version); 733 printk(KERN_INFO "%s", version);
734} 734}
735 735
736static int __devinit vdc_port_probe(struct vio_dev *vdev, 736static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
737 const struct vio_device_id *id)
738{ 737{
739 struct mdesc_handle *hp; 738 struct mdesc_handle *hp;
740 struct vdc_port *port; 739 struct vdc_port *port;
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 6d5a914b9619..765fa2b3d337 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -788,8 +788,7 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data)
788 return get_disk(swd->unit[drive].disk); 788 return get_disk(swd->unit[drive].disk);
789} 789}
790 790
791static int __devinit swim_add_floppy(struct swim_priv *swd, 791static int swim_add_floppy(struct swim_priv *swd, enum drive_location location)
792 enum drive_location location)
793{ 792{
794 struct floppy_state *fs = &swd->unit[swd->floppy_count]; 793 struct floppy_state *fs = &swd->unit[swd->floppy_count];
795 struct swim __iomem *base = swd->base; 794 struct swim __iomem *base = swd->base;
@@ -812,7 +811,7 @@ static int __devinit swim_add_floppy(struct swim_priv *swd,
812 return 0; 811 return 0;
813} 812}
814 813
815static int __devinit swim_floppy_init(struct swim_priv *swd) 814static int swim_floppy_init(struct swim_priv *swd)
816{ 815{
817 int err; 816 int err;
818 int drive; 817 int drive;
@@ -875,7 +874,7 @@ exit_put_disks:
875 return err; 874 return err;
876} 875}
877 876
878static int __devinit swim_probe(struct platform_device *dev) 877static int swim_probe(struct platform_device *dev)
879{ 878{
880 struct resource *res; 879 struct resource *res;
881 struct swim __iomem *swim_base; 880 struct swim __iomem *swim_base;
@@ -936,7 +935,7 @@ out:
936 return ret; 935 return ret;
937} 936}
938 937
939static int __devexit swim_remove(struct platform_device *dev) 938static int swim_remove(struct platform_device *dev)
940{ 939{
941 struct swim_priv *swd = platform_get_drvdata(dev); 940 struct swim_priv *swd = platform_get_drvdata(dev);
942 int drive; 941 int drive;
@@ -972,7 +971,7 @@ static int __devexit swim_remove(struct platform_device *dev)
972 971
973static struct platform_driver swim_driver = { 972static struct platform_driver swim_driver = {
974 .probe = swim_probe, 973 .probe = swim_probe,
975 .remove = __devexit_p(swim_remove), 974 .remove = swim_remove,
976 .driver = { 975 .driver = {
977 .name = CARDNAME, 976 .name = CARDNAME,
978 .owner = THIS_MODULE, 977 .owner = THIS_MODULE,
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 89ddab127e33..57763c54363a 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -1194,7 +1194,8 @@ static int swim3_add_device(struct macio_dev *mdev, int index)
1194 return rc; 1194 return rc;
1195} 1195}
1196 1196
1197static int __devinit swim3_attach(struct macio_dev *mdev, const struct of_device_id *match) 1197static int swim3_attach(struct macio_dev *mdev,
1198 const struct of_device_id *match)
1198{ 1199{
1199 struct gendisk *disk; 1200 struct gendisk *disk;
1200 int index, rc; 1201 int index, rc;
diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index eb0d8216f557..ad70868f8a96 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -789,8 +789,7 @@ static const struct block_device_operations mm_fops = {
789 .revalidate_disk = mm_revalidate, 789 .revalidate_disk = mm_revalidate,
790}; 790};
791 791
792static int __devinit mm_pci_probe(struct pci_dev *dev, 792static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
793 const struct pci_device_id *id)
794{ 793{
795 int ret = -ENODEV; 794 int ret = -ENODEV;
796 struct cardinfo *card = &cards[num_cards]; 795 struct cardinfo *card = &cards[num_cards];
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 0bdde8fba397..9d8409c02082 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -696,7 +696,7 @@ static const struct device_attribute dev_attr_cache_type_rw =
696 __ATTR(cache_type, S_IRUGO|S_IWUSR, 696 __ATTR(cache_type, S_IRUGO|S_IWUSR,
697 virtblk_cache_type_show, virtblk_cache_type_store); 697 virtblk_cache_type_show, virtblk_cache_type_store);
698 698
699static int __devinit virtblk_probe(struct virtio_device *vdev) 699static int virtblk_probe(struct virtio_device *vdev)
700{ 700{
701 struct virtio_blk *vblk; 701 struct virtio_blk *vblk;
702 struct request_queue *q; 702 struct request_queue *q;
@@ -885,7 +885,7 @@ out:
885 return err; 885 return err;
886} 886}
887 887
888static void __devexit virtblk_remove(struct virtio_device *vdev) 888static void virtblk_remove(struct virtio_device *vdev)
889{ 889{
890 struct virtio_blk *vblk = vdev->priv; 890 struct virtio_blk *vblk = vdev->priv;
891 int index = vblk->index; 891 int index = vblk->index;
@@ -961,19 +961,14 @@ static unsigned int features[] = {
961 VIRTIO_BLK_F_WCE, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_CONFIG_WCE 961 VIRTIO_BLK_F_WCE, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_CONFIG_WCE
962}; 962};
963 963
964/* 964static struct virtio_driver virtio_blk = {
965 * virtio_blk causes spurious section mismatch warning by
966 * simultaneously referring to a __devinit and a __devexit function.
967 * Use __refdata to avoid this warning.
968 */
969static struct virtio_driver __refdata virtio_blk = {
970 .feature_table = features, 965 .feature_table = features,
971 .feature_table_size = ARRAY_SIZE(features), 966 .feature_table_size = ARRAY_SIZE(features),
972 .driver.name = KBUILD_MODNAME, 967 .driver.name = KBUILD_MODNAME,
973 .driver.owner = THIS_MODULE, 968 .driver.owner = THIS_MODULE,
974 .id_table = id_table, 969 .id_table = id_table,
975 .probe = virtblk_probe, 970 .probe = virtblk_probe,
976 .remove = __devexit_p(virtblk_remove), 971 .remove = virtblk_remove,
977 .config_changed = virtblk_config_changed, 972 .config_changed = virtblk_config_changed,
978#ifdef CONFIG_PM 973#ifdef CONFIG_PM
979 .freeze = virtblk_freeze, 974 .freeze = virtblk_freeze,
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 1a17e338735e..1f38643173ca 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -961,7 +961,7 @@ static const struct block_device_operations ace_fops = {
961/* -------------------------------------------------------------------- 961/* --------------------------------------------------------------------
962 * SystemACE device setup/teardown code 962 * SystemACE device setup/teardown code
963 */ 963 */
964static int __devinit ace_setup(struct ace_device *ace) 964static int ace_setup(struct ace_device *ace)
965{ 965{
966 u16 version; 966 u16 version;
967 u16 val; 967 u16 val;
@@ -1074,7 +1074,7 @@ err_ioremap:
1074 return -ENOMEM; 1074 return -ENOMEM;
1075} 1075}
1076 1076
1077static void __devexit ace_teardown(struct ace_device *ace) 1077static void ace_teardown(struct ace_device *ace)
1078{ 1078{
1079 if (ace->gd) { 1079 if (ace->gd) {
1080 del_gendisk(ace->gd); 1080 del_gendisk(ace->gd);
@@ -1092,9 +1092,8 @@ static void __devexit ace_teardown(struct ace_device *ace)
1092 iounmap(ace->baseaddr); 1092 iounmap(ace->baseaddr);
1093} 1093}
1094 1094
1095static int __devinit 1095static int ace_alloc(struct device *dev, int id, resource_size_t physaddr,
1096ace_alloc(struct device *dev, int id, resource_size_t physaddr, 1096 int irq, int bus_width)
1097 int irq, int bus_width)
1098{ 1097{
1099 struct ace_device *ace; 1098 struct ace_device *ace;
1100 int rc; 1099 int rc;
@@ -1135,7 +1134,7 @@ err_noreg:
1135 return rc; 1134 return rc;
1136} 1135}
1137 1136
1138static void __devexit ace_free(struct device *dev) 1137static void ace_free(struct device *dev)
1139{ 1138{
1140 struct ace_device *ace = dev_get_drvdata(dev); 1139 struct ace_device *ace = dev_get_drvdata(dev);
1141 dev_dbg(dev, "ace_free(%p)\n", dev); 1140 dev_dbg(dev, "ace_free(%p)\n", dev);
@@ -1151,7 +1150,7 @@ static void __devexit ace_free(struct device *dev)
1151 * Platform Bus Support 1150 * Platform Bus Support
1152 */ 1151 */
1153 1152
1154static int __devinit ace_probe(struct platform_device *dev) 1153static int ace_probe(struct platform_device *dev)
1155{ 1154{
1156 resource_size_t physaddr = 0; 1155 resource_size_t physaddr = 0;
1157 int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */ 1156 int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */
@@ -1182,7 +1181,7 @@ static int __devinit ace_probe(struct platform_device *dev)
1182/* 1181/*
1183 * Platform bus remove() method 1182 * Platform bus remove() method
1184 */ 1183 */
1185static int __devexit ace_remove(struct platform_device *dev) 1184static int ace_remove(struct platform_device *dev)
1186{ 1185{
1187 ace_free(&dev->dev); 1186 ace_free(&dev->dev);
1188 return 0; 1187 return 0;
@@ -1190,7 +1189,7 @@ static int __devexit ace_remove(struct platform_device *dev)
1190 1189
1191#if defined(CONFIG_OF) 1190#if defined(CONFIG_OF)
1192/* Match table for of_platform binding */ 1191/* Match table for of_platform binding */
1193static const struct of_device_id ace_of_match[] __devinitconst = { 1192static const struct of_device_id ace_of_match[] = {
1194 { .compatible = "xlnx,opb-sysace-1.00.b", }, 1193 { .compatible = "xlnx,opb-sysace-1.00.b", },
1195 { .compatible = "xlnx,opb-sysace-1.00.c", }, 1194 { .compatible = "xlnx,opb-sysace-1.00.c", },
1196 { .compatible = "xlnx,xps-sysace-1.00.a", }, 1195 { .compatible = "xlnx,xps-sysace-1.00.a", },
@@ -1204,7 +1203,7 @@ MODULE_DEVICE_TABLE(of, ace_of_match);
1204 1203
1205static struct platform_driver ace_platform_driver = { 1204static struct platform_driver ace_platform_driver = {
1206 .probe = ace_probe, 1205 .probe = ace_probe,
1207 .remove = __devexit_p(ace_remove), 1206 .remove = ace_remove,
1208 .driver = { 1207 .driver = {
1209 .owner = THIS_MODULE, 1208 .owner = THIS_MODULE,
1210 .name = "xsysace", 1209 .name = "xsysace",
diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c
index 0c48b0e05ed6..fe7191663bbd 100644
--- a/drivers/bus/omap-ocp2scp.c
+++ b/drivers/bus/omap-ocp2scp.c
@@ -52,7 +52,7 @@ static int ocp2scp_remove_devices(struct device *dev, void *c)
52 return 0; 52 return 0;
53} 53}
54 54
55static int __devinit omap_ocp2scp_probe(struct platform_device *pdev) 55static int omap_ocp2scp_probe(struct platform_device *pdev)
56{ 56{
57 int ret; 57 int ret;
58 unsigned res_cnt, i; 58 unsigned res_cnt, i;
@@ -116,7 +116,7 @@ err0:
116 return ret; 116 return ret;
117} 117}
118 118
119static int __devexit omap_ocp2scp_remove(struct platform_device *pdev) 119static int omap_ocp2scp_remove(struct platform_device *pdev)
120{ 120{
121 pm_runtime_disable(&pdev->dev); 121 pm_runtime_disable(&pdev->dev);
122 device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); 122 device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices);
@@ -134,7 +134,7 @@ MODULE_DEVICE_TABLE(of, omap_ocp2scp_id_table);
134 134
135static struct platform_driver omap_ocp2scp_driver = { 135static struct platform_driver omap_ocp2scp_driver = {
136 .probe = omap_ocp2scp_probe, 136 .probe = omap_ocp2scp_probe,
137 .remove = __devexit_p(omap_ocp2scp_remove), 137 .remove = omap_ocp2scp_remove,
138 .driver = { 138 .driver = {
139 .name = "omap-ocp2scp", 139 .name = "omap-ocp2scp",
140 .owner = THIS_MODULE, 140 .owner = THIS_MODULE,
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index ab911a33f8a8..feeecae623f6 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -128,7 +128,7 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)
128 return IRQ_HANDLED; 128 return IRQ_HANDLED;
129} 129}
130 130
131static int __devinit omap4_l3_probe(struct platform_device *pdev) 131static int omap4_l3_probe(struct platform_device *pdev)
132{ 132{
133 static struct omap4_l3 *l3; 133 static struct omap4_l3 *l3;
134 struct resource *res; 134 struct resource *res;
@@ -219,7 +219,7 @@ err0:
219 return ret; 219 return ret;
220} 220}
221 221
222static int __devexit omap4_l3_remove(struct platform_device *pdev) 222static int omap4_l3_remove(struct platform_device *pdev)
223{ 223{
224 struct omap4_l3 *l3 = platform_get_drvdata(pdev); 224 struct omap4_l3 *l3 = platform_get_drvdata(pdev);
225 225
@@ -245,7 +245,7 @@ MODULE_DEVICE_TABLE(of, l3_noc_match);
245 245
246static struct platform_driver omap4_l3_driver = { 246static struct platform_driver omap4_l3_driver = {
247 .probe = omap4_l3_probe, 247 .probe = omap4_l3_probe,
248 .remove = __devexit_p(omap4_l3_remove), 248 .remove = omap4_l3_remove,
249 .driver = { 249 .driver = {
250 .name = "omap_l3_noc", 250 .name = "omap_l3_noc",
251 .owner = THIS_MODULE, 251 .owner = THIS_MODULE,
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index 75d485afe56c..d59cdcb8fe39 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -557,7 +557,7 @@ static irqreturn_t gdrom_dma_interrupt(int irq, void *dev_id)
557 return IRQ_HANDLED; 557 return IRQ_HANDLED;
558} 558}
559 559
560static int __devinit gdrom_set_interrupt_handlers(void) 560static int gdrom_set_interrupt_handlers(void)
561{ 561{
562 int err; 562 int err;
563 563
@@ -681,7 +681,7 @@ static void gdrom_request(struct request_queue *rq)
681} 681}
682 682
683/* Print string identifying GD ROM device */ 683/* Print string identifying GD ROM device */
684static int __devinit gdrom_outputversion(void) 684static int gdrom_outputversion(void)
685{ 685{
686 struct gdrom_id *id; 686 struct gdrom_id *id;
687 char *model_name, *manuf_name, *firmw_ver; 687 char *model_name, *manuf_name, *firmw_ver;
@@ -715,7 +715,7 @@ free_id:
715} 715}
716 716
717/* set the default mode for DMA transfer */ 717/* set the default mode for DMA transfer */
718static int __devinit gdrom_init_dma_mode(void) 718static int gdrom_init_dma_mode(void)
719{ 719{
720 __raw_writeb(0x13, GDROM_ERROR_REG); 720 __raw_writeb(0x13, GDROM_ERROR_REG);
721 __raw_writeb(0x22, GDROM_INTSEC_REG); 721 __raw_writeb(0x22, GDROM_INTSEC_REG);
@@ -736,7 +736,7 @@ static int __devinit gdrom_init_dma_mode(void)
736 return 0; 736 return 0;
737} 737}
738 738
739static void __devinit probe_gdrom_setupcd(void) 739static void probe_gdrom_setupcd(void)
740{ 740{
741 gd.cd_info->ops = &gdrom_ops; 741 gd.cd_info->ops = &gdrom_ops;
742 gd.cd_info->capacity = 1; 742 gd.cd_info->capacity = 1;
@@ -745,7 +745,7 @@ static void __devinit probe_gdrom_setupcd(void)
745 CDC_SELECT_DISC; 745 CDC_SELECT_DISC;
746} 746}
747 747
748static void __devinit probe_gdrom_setupdisk(void) 748static void probe_gdrom_setupdisk(void)
749{ 749{
750 gd.disk->major = gdrom_major; 750 gd.disk->major = gdrom_major;
751 gd.disk->first_minor = 1; 751 gd.disk->first_minor = 1;
@@ -753,7 +753,7 @@ static void __devinit probe_gdrom_setupdisk(void)
753 strcpy(gd.disk->disk_name, GDROM_DEV_NAME); 753 strcpy(gd.disk->disk_name, GDROM_DEV_NAME);
754} 754}
755 755
756static int __devinit probe_gdrom_setupqueue(void) 756static int probe_gdrom_setupqueue(void)
757{ 757{
758 blk_queue_logical_block_size(gd.gdrom_rq, GDROM_HARD_SECTOR); 758 blk_queue_logical_block_size(gd.gdrom_rq, GDROM_HARD_SECTOR);
759 /* using DMA so memory will need to be contiguous */ 759 /* using DMA so memory will need to be contiguous */
@@ -768,7 +768,7 @@ static int __devinit probe_gdrom_setupqueue(void)
768 * register this as a block device and as compliant with the 768 * register this as a block device and as compliant with the
769 * universal CD Rom driver interface 769 * universal CD Rom driver interface
770 */ 770 */
771static int __devinit probe_gdrom(struct platform_device *devptr) 771static int probe_gdrom(struct platform_device *devptr)
772{ 772{
773 int err; 773 int err;
774 /* Start the device */ 774 /* Start the device */
@@ -838,7 +838,7 @@ probe_fail_no_mem:
838 return err; 838 return err;
839} 839}
840 840
841static int __devexit remove_gdrom(struct platform_device *devptr) 841static int remove_gdrom(struct platform_device *devptr)
842{ 842{
843 flush_work(&work); 843 flush_work(&work);
844 blk_cleanup_queue(gd.gdrom_rq); 844 blk_cleanup_queue(gd.gdrom_rq);
@@ -854,7 +854,7 @@ static int __devexit remove_gdrom(struct platform_device *devptr)
854 854
855static struct platform_driver gdrom_driver = { 855static struct platform_driver gdrom_driver = {
856 .probe = probe_gdrom, 856 .probe = probe_gdrom,
857 .remove = __devexit_p(remove_gdrom), 857 .remove = remove_gdrom,
858 .driver = { 858 .driver = {
859 .name = GDROM_DEV_NAME, 859 .name = GDROM_DEV_NAME,
860 }, 860 },
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c
index 478493543b32..443cd6751ca2 100644
--- a/drivers/char/agp/ali-agp.c
+++ b/drivers/char/agp/ali-agp.c
@@ -299,8 +299,7 @@ static struct agp_device_ids ali_agp_device_ids[] =
299 { }, /* dummy final entry, always present */ 299 { }, /* dummy final entry, always present */
300}; 300};
301 301
302static int __devinit agp_ali_probe(struct pci_dev *pdev, 302static int agp_ali_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
303 const struct pci_device_id *ent)
304{ 303{
305 struct agp_device_ids *devs = ali_agp_device_ids; 304 struct agp_device_ids *devs = ali_agp_device_ids;
306 struct agp_bridge_data *bridge; 305 struct agp_bridge_data *bridge;
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index 1b2101160e98..779f0ab845a9 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -405,8 +405,8 @@ static struct agp_device_ids amd_agp_device_ids[] =
405 { }, /* dummy final entry, always present */ 405 { }, /* dummy final entry, always present */
406}; 406};
407 407
408static int __devinit agp_amdk7_probe(struct pci_dev *pdev, 408static int agp_amdk7_probe(struct pci_dev *pdev,
409 const struct pci_device_id *ent) 409 const struct pci_device_id *ent)
410{ 410{
411 struct agp_bridge_data *bridge; 411 struct agp_bridge_data *bridge;
412 u8 cap_ptr; 412 u8 cap_ptr;
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 061d46209b1a..d79d692d05b8 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -240,7 +240,7 @@ static const struct agp_bridge_driver amd_8151_driver = {
240}; 240};
241 241
242/* Some basic sanity checks for the aperture. */ 242/* Some basic sanity checks for the aperture. */
243static int __devinit agp_aperture_valid(u64 aper, u32 size) 243static int agp_aperture_valid(u64 aper, u32 size)
244{ 244{
245 if (!aperture_valid(aper, size, 32*1024*1024)) 245 if (!aperture_valid(aper, size, 32*1024*1024))
246 return 0; 246 return 0;
@@ -267,8 +267,7 @@ static int __devinit agp_aperture_valid(u64 aper, u32 size)
267 * to allocate that much memory. But at least error out cleanly instead of 267 * to allocate that much memory. But at least error out cleanly instead of
268 * crashing. 268 * crashing.
269 */ 269 */
270static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, 270static int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, u16 cap)
271 u16 cap)
272{ 271{
273 u32 aper_low, aper_hi; 272 u32 aper_low, aper_hi;
274 u64 aper, nb_aper; 273 u64 aper, nb_aper;
@@ -326,7 +325,7 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
326 return 0; 325 return 0;
327} 326}
328 327
329static __devinit int cache_nbs(struct pci_dev *pdev, u32 cap_ptr) 328static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
330{ 329{
331 int i; 330 int i;
332 331
@@ -352,7 +351,7 @@ static __devinit int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
352} 351}
353 352
354/* Handle AMD 8151 quirks */ 353/* Handle AMD 8151 quirks */
355static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge) 354static void amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge)
356{ 355{
357 char *revstring; 356 char *revstring;
358 357
@@ -390,7 +389,7 @@ static const struct aper_size_info_32 uli_sizes[7] =
390 {8, 2048, 1, 4}, 389 {8, 2048, 1, 4},
391 {4, 1024, 0, 3} 390 {4, 1024, 0, 3}
392}; 391};
393static int __devinit uli_agp_init(struct pci_dev *pdev) 392static int uli_agp_init(struct pci_dev *pdev)
394{ 393{
395 u32 httfea,baseaddr,enuscr; 394 u32 httfea,baseaddr,enuscr;
396 struct pci_dev *dev1; 395 struct pci_dev *dev1;
@@ -513,8 +512,8 @@ put:
513 return ret; 512 return ret;
514} 513}
515 514
516static int __devinit agp_amd64_probe(struct pci_dev *pdev, 515static int agp_amd64_probe(struct pci_dev *pdev,
517 const struct pci_device_id *ent) 516 const struct pci_device_id *ent)
518{ 517{
519 struct agp_bridge_data *bridge; 518 struct agp_bridge_data *bridge;
520 u8 cap_ptr; 519 u8 cap_ptr;
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index ed0433576e74..0628d7b65c71 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -490,8 +490,7 @@ static struct agp_device_ids ati_agp_device_ids[] =
490 { }, /* dummy final entry, always present */ 490 { }, /* dummy final entry, always present */
491}; 491};
492 492
493static int __devinit agp_ati_probe(struct pci_dev *pdev, 493static int agp_ati_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
494 const struct pci_device_id *ent)
495{ 494{
496 struct agp_device_ids *devs = ati_agp_device_ids; 495 struct agp_device_ids *devs = ati_agp_device_ids;
497 struct agp_bridge_data *bridge; 496 struct agp_bridge_data *bridge;
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c
index 55f3e33a309f..6974d5032053 100644
--- a/drivers/char/agp/efficeon-agp.c
+++ b/drivers/char/agp/efficeon-agp.c
@@ -343,8 +343,8 @@ static const struct agp_bridge_driver efficeon_driver = {
343 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 343 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
344}; 344};
345 345
346static int __devinit agp_efficeon_probe(struct pci_dev *pdev, 346static int agp_efficeon_probe(struct pci_dev *pdev,
347 const struct pci_device_id *ent) 347 const struct pci_device_id *ent)
348{ 348{
349 struct agp_bridge_data *bridge; 349 struct agp_bridge_data *bridge;
350 u8 cap_ptr; 350 u8 cap_ptr;
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index d328b662e50d..15b240ea4848 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -587,8 +587,8 @@ const struct agp_bridge_driver intel_i460_driver = {
587 .cant_use_aperture = true, 587 .cant_use_aperture = true,
588}; 588};
589 589
590static int __devinit agp_intel_i460_probe(struct pci_dev *pdev, 590static int agp_intel_i460_probe(struct pci_dev *pdev,
591 const struct pci_device_id *ent) 591 const struct pci_device_id *ent)
592{ 592{
593 struct agp_bridge_data *bridge; 593 struct agp_bridge_data *bridge;
594 u8 cap_ptr; 594 u8 cap_ptr;
@@ -637,7 +637,7 @@ static struct pci_driver agp_intel_i460_pci_driver = {
637 .name = "agpgart-intel-i460", 637 .name = "agpgart-intel-i460",
638 .id_table = agp_intel_i460_pci_table, 638 .id_table = agp_intel_i460_pci_table,
639 .probe = agp_intel_i460_probe, 639 .probe = agp_intel_i460_probe,
640 .remove = __devexit_p(agp_intel_i460_remove), 640 .remove = agp_intel_i460_remove,
641}; 641};
642 642
643static int __init agp_intel_i460_init(void) 643static int __init agp_intel_i460_init(void)
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index f3a8f52b5a00..a426ee1f57a6 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -732,8 +732,8 @@ static const struct intel_agp_driver_description {
732 { 0, NULL, NULL } 732 { 0, NULL, NULL }
733}; 733};
734 734
735static int __devinit agp_intel_probe(struct pci_dev *pdev, 735static int agp_intel_probe(struct pci_dev *pdev,
736 const struct pci_device_id *ent) 736 const struct pci_device_id *ent)
737{ 737{
738 struct agp_bridge_data *bridge; 738 struct agp_bridge_data *bridge;
739 u8 cap_ptr = 0; 739 u8 cap_ptr = 0;
@@ -912,7 +912,7 @@ static struct pci_driver agp_intel_pci_driver = {
912 .name = "agpgart-intel", 912 .name = "agpgart-intel",
913 .id_table = agp_intel_pci_table, 913 .id_table = agp_intel_pci_table,
914 .probe = agp_intel_probe, 914 .probe = agp_intel_probe,
915 .remove = __devexit_p(agp_intel_remove), 915 .remove = agp_intel_remove,
916#ifdef CONFIG_PM 916#ifdef CONFIG_PM
917 .resume = agp_intel_resume, 917 .resume = agp_intel_resume,
918#endif 918#endif
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c
index 66e0868000f4..62be3ec0da4b 100644
--- a/drivers/char/agp/nvidia-agp.c
+++ b/drivers/char/agp/nvidia-agp.c
@@ -332,8 +332,8 @@ static const struct agp_bridge_driver nvidia_driver = {
332 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 332 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
333}; 333};
334 334
335static int __devinit agp_nvidia_probe(struct pci_dev *pdev, 335static int agp_nvidia_probe(struct pci_dev *pdev,
336 const struct pci_device_id *ent) 336 const struct pci_device_id *ent)
337{ 337{
338 struct agp_bridge_data *bridge; 338 struct agp_bridge_data *bridge;
339 u8 cap_ptr; 339 u8 cap_ptr;
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c
index a18791d7718a..05b8d0241bde 100644
--- a/drivers/char/agp/sgi-agp.c
+++ b/drivers/char/agp/sgi-agp.c
@@ -270,7 +270,7 @@ const struct agp_bridge_driver sgi_tioca_driver = {
270 .num_aperture_sizes = 1, 270 .num_aperture_sizes = 1,
271}; 271};
272 272
273static int __devinit agp_sgi_init(void) 273static int agp_sgi_init(void)
274{ 274{
275 unsigned int j; 275 unsigned int j;
276 struct tioca_kernel *info; 276 struct tioca_kernel *info;
diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c
index 93d1d31f9d0c..79c838c434bc 100644
--- a/drivers/char/agp/sis-agp.c
+++ b/drivers/char/agp/sis-agp.c
@@ -154,7 +154,7 @@ static int sis_broken_chipsets[] = {
154 0 // terminator 154 0 // terminator
155}; 155};
156 156
157static void __devinit sis_get_driver(struct agp_bridge_data *bridge) 157static void sis_get_driver(struct agp_bridge_data *bridge)
158{ 158{
159 int i; 159 int i;
160 160
@@ -180,8 +180,7 @@ static void __devinit sis_get_driver(struct agp_bridge_data *bridge)
180} 180}
181 181
182 182
183static int __devinit agp_sis_probe(struct pci_dev *pdev, 183static int agp_sis_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
184 const struct pci_device_id *ent)
185{ 184{
186 struct agp_bridge_data *bridge; 185 struct agp_bridge_data *bridge;
187 u8 cap_ptr; 186 u8 cap_ptr;
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
index 26020fb8d7a9..9b163b49d976 100644
--- a/drivers/char/agp/sworks-agp.c
+++ b/drivers/char/agp/sworks-agp.c
@@ -445,8 +445,8 @@ static const struct agp_bridge_driver sworks_driver = {
445 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 445 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
446}; 446};
447 447
448static int __devinit agp_serverworks_probe(struct pci_dev *pdev, 448static int agp_serverworks_probe(struct pci_dev *pdev,
449 const struct pci_device_id *ent) 449 const struct pci_device_id *ent)
450{ 450{
451 struct agp_bridge_data *bridge; 451 struct agp_bridge_data *bridge;
452 struct pci_dev *bridge_dev; 452 struct pci_dev *bridge_dev;
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index 011967ad3eed..a56ee9bedd11 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -592,8 +592,8 @@ static struct agp_device_ids uninorth_agp_device_ids[] = {
592 }, 592 },
593}; 593};
594 594
595static int __devinit agp_uninorth_probe(struct pci_dev *pdev, 595static int agp_uninorth_probe(struct pci_dev *pdev,
596 const struct pci_device_id *ent) 596 const struct pci_device_id *ent)
597{ 597{
598 struct agp_device_ids *devs = uninorth_agp_device_ids; 598 struct agp_device_ids *devs = uninorth_agp_device_ids;
599 struct agp_bridge_data *bridge; 599 struct agp_bridge_data *bridge;
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c
index 6818595bb863..74d3aa3773bf 100644
--- a/drivers/char/agp/via-agp.c
+++ b/drivers/char/agp/via-agp.c
@@ -438,8 +438,7 @@ static void check_via_agp3 (struct agp_bridge_data *bridge)
438} 438}
439 439
440 440
441static int __devinit agp_via_probe(struct pci_dev *pdev, 441static int agp_via_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
442 const struct pci_device_id *ent)
443{ 442{
444 struct agp_device_ids *devs = via_agp_device_ids; 443 struct agp_device_ids *devs = via_agp_device_ids;
445 struct agp_bridge_data *bridge; 444 struct agp_bridge_data *bridge;
diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index 5a4a6e70478b..7c73d4aca36b 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -138,7 +138,7 @@ static const struct dev_pm_ops atmel_trng_pm_ops = {
138 138
139static struct platform_driver atmel_trng_driver = { 139static struct platform_driver atmel_trng_driver = {
140 .probe = atmel_trng_probe, 140 .probe = atmel_trng_probe,
141 .remove = __devexit_p(atmel_trng_remove), 141 .remove = atmel_trng_remove,
142 .driver = { 142 .driver = {
143 .name = "atmel-trng", 143 .name = "atmel-trng",
144 .owner = THIS_MODULE, 144 .owner = THIS_MODULE,
diff --git a/drivers/char/hw_random/bcm63xx-rng.c b/drivers/char/hw_random/bcm63xx-rng.c
index ae95bcb18d4a..f343b7d0dfa1 100644
--- a/drivers/char/hw_random/bcm63xx-rng.c
+++ b/drivers/char/hw_random/bcm63xx-rng.c
@@ -61,7 +61,7 @@ static int bcm63xx_rng_data_read(struct hwrng *rng, u32 *data)
61 return 4; 61 return 4;
62} 62}
63 63
64static int __devinit bcm63xx_rng_probe(struct platform_device *pdev) 64static int bcm63xx_rng_probe(struct platform_device *pdev)
65{ 65{
66 struct resource *r; 66 struct resource *r;
67 struct clk *clk; 67 struct clk *clk;
@@ -161,7 +161,7 @@ static int bcm63xx_rng_remove(struct platform_device *pdev)
161 161
162static struct platform_driver bcm63xx_rng_driver = { 162static struct platform_driver bcm63xx_rng_driver = {
163 .probe = bcm63xx_rng_probe, 163 .probe = bcm63xx_rng_probe,
164 .remove = __devexit_p(bcm63xx_rng_remove), 164 .remove = bcm63xx_rng_remove,
165 .driver = { 165 .driver = {
166 .name = "bcm63xx-rng", 166 .name = "bcm63xx-rng",
167 .owner = THIS_MODULE, 167 .owner = THIS_MODULE,
diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c
index bdc852ea7632..48bbfeca4b5d 100644
--- a/drivers/char/hw_random/exynos-rng.c
+++ b/drivers/char/hw_random/exynos-rng.c
@@ -101,7 +101,7 @@ static int exynos_read(struct hwrng *rng, void *buf,
101 return 4; 101 return 4;
102} 102}
103 103
104static int __devinit exynos_rng_probe(struct platform_device *pdev) 104static int exynos_rng_probe(struct platform_device *pdev)
105{ 105{
106 struct exynos_rng *exynos_rng; 106 struct exynos_rng *exynos_rng;
107 107
@@ -172,7 +172,7 @@ static struct platform_driver exynos_rng_driver = {
172 .pm = &exynos_rng_pm_ops, 172 .pm = &exynos_rng_pm_ops,
173 }, 173 },
174 .probe = exynos_rng_probe, 174 .probe = exynos_rng_probe,
175 .remove = __devexit_p(exynos_rng_remove), 175 .remove = exynos_rng_remove,
176}; 176};
177 177
178module_platform_driver(exynos_rng_driver); 178module_platform_driver(exynos_rng_driver);
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c
index d68a72a08b51..20b962e1d832 100644
--- a/drivers/char/hw_random/n2-drv.c
+++ b/drivers/char/hw_random/n2-drv.c
@@ -611,7 +611,7 @@ static void n2rng_work(struct work_struct *work)
611 schedule_delayed_work(&np->work, HZ * 2); 611 schedule_delayed_work(&np->work, HZ * 2);
612} 612}
613 613
614static void __devinit n2rng_driver_version(void) 614static void n2rng_driver_version(void)
615{ 615{
616 static int n2rng_version_printed; 616 static int n2rng_version_printed;
617 617
@@ -620,7 +620,7 @@ static void __devinit n2rng_driver_version(void)
620} 620}
621 621
622static const struct of_device_id n2rng_match[]; 622static const struct of_device_id n2rng_match[];
623static int __devinit n2rng_probe(struct platform_device *op) 623static int n2rng_probe(struct platform_device *op)
624{ 624{
625 const struct of_device_id *match; 625 const struct of_device_id *match;
626 int multi_capable; 626 int multi_capable;
@@ -767,7 +767,7 @@ static struct platform_driver n2rng_driver = {
767 .of_match_table = n2rng_match, 767 .of_match_table = n2rng_match,
768 }, 768 },
769 .probe = n2rng_probe, 769 .probe = n2rng_probe,
770 .remove = __devexit_p(n2rng_remove), 770 .remove = n2rng_remove,
771}; 771};
772 772
773module_platform_driver(n2rng_driver); 773module_platform_driver(n2rng_driver);
diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/char/hw_random/octeon-rng.c
index 5c34c092af71..1eada566ca70 100644
--- a/drivers/char/hw_random/octeon-rng.c
+++ b/drivers/char/hw_random/octeon-rng.c
@@ -56,7 +56,7 @@ static int octeon_rng_data_read(struct hwrng *rng, u32 *data)
56 return sizeof(u32); 56 return sizeof(u32);
57} 57}
58 58
59static int __devinit octeon_rng_probe(struct platform_device *pdev) 59static int octeon_rng_probe(struct platform_device *pdev)
60{ 60{
61 struct resource *res_ports; 61 struct resource *res_ports;
62 struct resource *res_result; 62 struct resource *res_result;
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 45e467dcc8c8..d8c54e253761 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -104,7 +104,7 @@ static struct hwrng omap_rng_ops = {
104 .data_read = omap_rng_data_read, 104 .data_read = omap_rng_data_read,
105}; 105};
106 106
107static int __devinit omap_rng_probe(struct platform_device *pdev) 107static int omap_rng_probe(struct platform_device *pdev)
108{ 108{
109 struct omap_rng_private_data *priv; 109 struct omap_rng_private_data *priv;
110 int ret; 110 int ret;
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c
index a1f70407cc9e..c6df5b29af08 100644
--- a/drivers/char/hw_random/pasemi-rng.c
+++ b/drivers/char/hw_random/pasemi-rng.c
@@ -94,7 +94,7 @@ static struct hwrng pasemi_rng = {
94 .data_read = pasemi_rng_data_read, 94 .data_read = pasemi_rng_data_read,
95}; 95};
96 96
97static int __devinit rng_probe(struct platform_device *ofdev) 97static int rng_probe(struct platform_device *ofdev)
98{ 98{
99 void __iomem *rng_regs; 99 void __iomem *rng_regs;
100 struct device_node *rng_np = ofdev->dev.of_node; 100 struct device_node *rng_np = ofdev->dev.of_node;
diff --git a/drivers/char/hw_random/picoxcell-rng.c b/drivers/char/hw_random/picoxcell-rng.c
index d4b24c1dd48e..973b95113edf 100644
--- a/drivers/char/hw_random/picoxcell-rng.c
+++ b/drivers/char/hw_random/picoxcell-rng.c
@@ -181,7 +181,7 @@ static const struct dev_pm_ops picoxcell_trng_pm_ops = {
181 181
182static struct platform_driver picoxcell_trng_driver = { 182static struct platform_driver picoxcell_trng_driver = {
183 .probe = picoxcell_trng_probe, 183 .probe = picoxcell_trng_probe,
184 .remove = __devexit_p(picoxcell_trng_remove), 184 .remove = picoxcell_trng_remove,
185 .driver = { 185 .driver = {
186 .name = "picoxcell-trng", 186 .name = "picoxcell-trng",
187 .owner = THIS_MODULE, 187 .owner = THIS_MODULE,
diff --git a/drivers/char/hw_random/ppc4xx-rng.c b/drivers/char/hw_random/ppc4xx-rng.c
index af6506a69cd9..732c330805fd 100644
--- a/drivers/char/hw_random/ppc4xx-rng.c
+++ b/drivers/char/hw_random/ppc4xx-rng.c
@@ -90,7 +90,7 @@ static struct hwrng ppc4xx_rng = {
90 .data_read = ppc4xx_rng_data_read, 90 .data_read = ppc4xx_rng_data_read,
91}; 91};
92 92
93static int __devinit ppc4xx_rng_probe(struct platform_device *dev) 93static int ppc4xx_rng_probe(struct platform_device *dev)
94{ 94{
95 void __iomem *rng_regs; 95 void __iomem *rng_regs;
96 int err = 0; 96 int err = 0;
diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c
index 3a1abc9417e4..849db199c02c 100644
--- a/drivers/char/hw_random/timeriomem-rng.c
+++ b/drivers/char/hw_random/timeriomem-rng.c
@@ -88,7 +88,7 @@ static struct hwrng timeriomem_rng_ops = {
88 .priv = 0, 88 .priv = 0,
89}; 89};
90 90
91static int __devinit timeriomem_rng_probe(struct platform_device *pdev) 91static int timeriomem_rng_probe(struct platform_device *pdev)
92{ 92{
93 struct resource *res; 93 struct resource *res;
94 int ret; 94 int ret;
@@ -146,7 +146,7 @@ static struct platform_driver timeriomem_rng_driver = {
146 .owner = THIS_MODULE, 146 .owner = THIS_MODULE,
147 }, 147 },
148 .probe = timeriomem_rng_probe, 148 .probe = timeriomem_rng_probe,
149 .remove = __devexit_p(timeriomem_rng_remove), 149 .remove = timeriomem_rng_remove,
150}; 150};
151 151
152module_platform_driver(timeriomem_rng_driver); 152module_platform_driver(timeriomem_rng_driver);
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index 621f595f1a98..b65c10395959 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -147,7 +147,7 @@ static struct virtio_driver virtio_rng_driver = {
147 .driver.owner = THIS_MODULE, 147 .driver.owner = THIS_MODULE,
148 .id_table = id_table, 148 .id_table = id_table,
149 .probe = virtrng_probe, 149 .probe = virtrng_probe,
150 .remove = __devexit_p(virtrng_remove), 150 .remove = virtrng_remove,
151#ifdef CONFIG_PM 151#ifdef CONFIG_PM
152 .freeze = virtrng_freeze, 152 .freeze = virtrng_freeze,
153 .restore = virtrng_restore, 153 .restore = virtrng_restore,
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index cfdfecd5bc76..1c7fdcd22a98 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2243,7 +2243,7 @@ static const struct pnp_device_id pnp_dev_table[] = {
2243static struct pnp_driver ipmi_pnp_driver = { 2243static struct pnp_driver ipmi_pnp_driver = {
2244 .name = DEVICE_NAME, 2244 .name = DEVICE_NAME,
2245 .probe = ipmi_pnp_probe, 2245 .probe = ipmi_pnp_probe,
2246 .remove = __devexit_p(ipmi_pnp_remove), 2246 .remove = ipmi_pnp_remove,
2247 .id_table = pnp_dev_table, 2247 .id_table = pnp_dev_table,
2248}; 2248};
2249#endif 2249#endif
@@ -2546,7 +2546,7 @@ static struct pci_driver ipmi_pci_driver = {
2546 .name = DEVICE_NAME, 2546 .name = DEVICE_NAME,
2547 .id_table = ipmi_pci_devices, 2547 .id_table = ipmi_pci_devices,
2548 .probe = ipmi_pci_probe, 2548 .probe = ipmi_pci_probe,
2549 .remove = __devexit_p(ipmi_pci_remove), 2549 .remove = ipmi_pci_remove,
2550}; 2550};
2551#endif /* CONFIG_PCI */ 2551#endif /* CONFIG_PCI */
2552 2552
@@ -2661,7 +2661,7 @@ static struct platform_driver ipmi_driver = {
2661 .of_match_table = ipmi_match, 2661 .of_match_table = ipmi_match,
2662 }, 2662 },
2663 .probe = ipmi_probe, 2663 .probe = ipmi_probe,
2664 .remove = __devexit_p(ipmi_remove), 2664 .remove = ipmi_remove,
2665}; 2665};
2666 2666
2667static int wait_for_msg_done(struct smi_info *smi_info) 2667static int wait_for_msg_done(struct smi_info *smi_info)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index c594cb16c37b..684b0d53764f 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2186,11 +2186,7 @@ static struct virtio_driver virtio_console = {
2186#endif 2186#endif
2187}; 2187};
2188 2188
2189/* 2189static struct virtio_driver virtio_rproc_serial = {
2190 * virtio_rproc_serial refers to __devinit function which causes
2191 * section mismatch warnings. So use __refdata to silence warnings.
2192 */
2193static struct virtio_driver __refdata virtio_rproc_serial = {
2194 .feature_table = rproc_serial_features, 2190 .feature_table = rproc_serial_features,
2195 .feature_table_size = ARRAY_SIZE(rproc_serial_features), 2191 .feature_table_size = ARRAY_SIZE(rproc_serial_features),
2196 .driver.name = "virtio_rproc_serial", 2192 .driver.name = "virtio_rproc_serial",
diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c
index bc1e713e7b9c..3af729b1b89d 100644
--- a/drivers/clk/clk-twl6040.c
+++ b/drivers/clk/clk-twl6040.c
@@ -78,7 +78,7 @@ static struct clk_init_data wm831x_clkout_init = {
78 .flags = CLK_IS_ROOT, 78 .flags = CLK_IS_ROOT,
79}; 79};
80 80
81static int __devinit twl6040_clk_probe(struct platform_device *pdev) 81static int twl6040_clk_probe(struct platform_device *pdev)
82{ 82{
83 struct twl6040 *twl6040 = dev_get_drvdata(pdev->dev.parent); 83 struct twl6040 *twl6040 = dev_get_drvdata(pdev->dev.parent);
84 struct twl6040_clk *clkdata; 84 struct twl6040_clk *clkdata;
@@ -100,7 +100,7 @@ static int __devinit twl6040_clk_probe(struct platform_device *pdev)
100 return 0; 100 return 0;
101} 101}
102 102
103static int __devexit twl6040_clk_remove(struct platform_device *pdev) 103static int twl6040_clk_remove(struct platform_device *pdev)
104{ 104{
105 struct twl6040_clk *clkdata = dev_get_drvdata(&pdev->dev); 105 struct twl6040_clk *clkdata = dev_get_drvdata(&pdev->dev);
106 106
@@ -115,7 +115,7 @@ static struct platform_driver twl6040_clk_driver = {
115 .owner = THIS_MODULE, 115 .owner = THIS_MODULE,
116 }, 116 },
117 .probe = twl6040_clk_probe, 117 .probe = twl6040_clk_probe,
118 .remove = __devexit_p(twl6040_clk_remove), 118 .remove = twl6040_clk_remove,
119}; 119};
120 120
121module_platform_driver(twl6040_clk_driver); 121module_platform_driver(twl6040_clk_driver);
diff --git a/drivers/clk/mvebu/clk-gating-ctrl.c b/drivers/clk/mvebu/clk-gating-ctrl.c
index c6d3c263b070..8fa5408b6c7d 100644
--- a/drivers/clk/mvebu/clk-gating-ctrl.c
+++ b/drivers/clk/mvebu/clk-gating-ctrl.c
@@ -32,7 +32,7 @@ struct mvebu_soc_descr {
32 32
33#define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) 33#define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw)
34 34
35static struct clk __init *mvebu_clk_gating_get_src( 35static struct clk *mvebu_clk_gating_get_src(
36 struct of_phandle_args *clkspec, void *data) 36 struct of_phandle_args *clkspec, void *data)
37{ 37{
38 struct mvebu_gating_ctrl *ctrl = (struct mvebu_gating_ctrl *)data; 38 struct mvebu_gating_ctrl *ctrl = (struct mvebu_gating_ctrl *)data;
diff --git a/drivers/clk/ux500/abx500-clk.c b/drivers/clk/ux500/abx500-clk.c
index e27c52317ffe..9f7400d74fa7 100644
--- a/drivers/clk/ux500/abx500-clk.c
+++ b/drivers/clk/ux500/abx500-clk.c
@@ -34,7 +34,7 @@ static int ab9540_reg_clks(struct device *dev)
34 return 0; 34 return 0;
35} 35}
36 36
37static int __devinit abx500_clk_probe(struct platform_device *pdev) 37static int abx500_clk_probe(struct platform_device *pdev)
38{ 38{
39 struct ab8500 *parent = dev_get_drvdata(pdev->dev.parent); 39 struct ab8500 *parent = dev_get_drvdata(pdev->dev.parent);
40 int ret; 40 int ret;
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index 5d1b9268bcaf..6efe4d1ab3aa 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -73,7 +73,7 @@ static struct clocksource clocksource_acpi_pm = {
73 73
74 74
75#ifdef CONFIG_PCI 75#ifdef CONFIG_PCI
76static int __devinitdata acpi_pm_good; 76static int acpi_pm_good;
77static int __init acpi_pm_good_setup(char *__str) 77static int __init acpi_pm_good_setup(char *__str)
78{ 78{
79 acpi_pm_good = 1; 79 acpi_pm_good = 1;
@@ -102,7 +102,7 @@ static inline void acpi_pm_need_workaround(void)
102 * incorrect when read). As a result, the ACPI free running count up 102 * incorrect when read). As a result, the ACPI free running count up
103 * timer specification is violated due to erroneous reads. 103 * timer specification is violated due to erroneous reads.
104 */ 104 */
105static void __devinit acpi_pm_check_blacklist(struct pci_dev *dev) 105static void acpi_pm_check_blacklist(struct pci_dev *dev)
106{ 106{
107 if (acpi_pm_good) 107 if (acpi_pm_good)
108 return; 108 return;
@@ -120,7 +120,7 @@ static void __devinit acpi_pm_check_blacklist(struct pci_dev *dev)
120DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, 120DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3,
121 acpi_pm_check_blacklist); 121 acpi_pm_check_blacklist);
122 122
123static void __devinit acpi_pm_check_graylist(struct pci_dev *dev) 123static void acpi_pm_check_graylist(struct pci_dev *dev)
124{ 124{
125 if (acpi_pm_good) 125 if (acpi_pm_good)
126 return; 126 return;
diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c
index 372051d1bba8..e6a553cb73e8 100644
--- a/drivers/clocksource/em_sti.c
+++ b/drivers/clocksource/em_sti.c
@@ -311,7 +311,7 @@ static void em_sti_register_clockevent(struct em_sti_priv *p)
311 clockevents_config_and_register(ced, 1, 2, 0xffffffff); 311 clockevents_config_and_register(ced, 1, 2, 0xffffffff);
312} 312}
313 313
314static int __devinit em_sti_probe(struct platform_device *pdev) 314static int em_sti_probe(struct platform_device *pdev)
315{ 315{
316 struct em_sti_priv *p; 316 struct em_sti_priv *p;
317 struct resource *res; 317 struct resource *res;
@@ -379,12 +379,12 @@ err0:
379 return ret; 379 return ret;
380} 380}
381 381
382static int __devexit em_sti_remove(struct platform_device *pdev) 382static int em_sti_remove(struct platform_device *pdev)
383{ 383{
384 return -EBUSY; /* cannot unregister clockevent and clocksource */ 384 return -EBUSY; /* cannot unregister clockevent and clocksource */
385} 385}
386 386
387static const struct of_device_id em_sti_dt_ids[] __devinitconst = { 387static const struct of_device_id em_sti_dt_ids[] = {
388 { .compatible = "renesas,em-sti", }, 388 { .compatible = "renesas,em-sti", },
389 {}, 389 {},
390}; 390};
@@ -392,7 +392,7 @@ MODULE_DEVICE_TABLE(of, em_sti_dt_ids);
392 392
393static struct platform_driver em_sti_device_driver = { 393static struct platform_driver em_sti_device_driver = {
394 .probe = em_sti_probe, 394 .probe = em_sti_probe,
395 .remove = __devexit_p(em_sti_remove), 395 .remove = em_sti_remove,
396 .driver = { 396 .driver = {
397 .name = "em_sti", 397 .name = "em_sti",
398 .of_match_table = em_sti_dt_ids, 398 .of_match_table = em_sti_dt_ids,
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index a5f7829f2799..488c14cc8dbf 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -726,7 +726,7 @@ err0:
726 return ret; 726 return ret;
727} 727}
728 728
729static int __devinit sh_cmt_probe(struct platform_device *pdev) 729static int sh_cmt_probe(struct platform_device *pdev)
730{ 730{
731 struct sh_cmt_priv *p = platform_get_drvdata(pdev); 731 struct sh_cmt_priv *p = platform_get_drvdata(pdev);
732 struct sh_timer_config *cfg = pdev->dev.platform_data; 732 struct sh_timer_config *cfg = pdev->dev.platform_data;
@@ -767,14 +767,14 @@ static int __devinit sh_cmt_probe(struct platform_device *pdev)
767 return 0; 767 return 0;
768} 768}
769 769
770static int __devexit sh_cmt_remove(struct platform_device *pdev) 770static int sh_cmt_remove(struct platform_device *pdev)
771{ 771{
772 return -EBUSY; /* cannot unregister clockevent and clocksource */ 772 return -EBUSY; /* cannot unregister clockevent and clocksource */
773} 773}
774 774
775static struct platform_driver sh_cmt_device_driver = { 775static struct platform_driver sh_cmt_device_driver = {
776 .probe = sh_cmt_probe, 776 .probe = sh_cmt_probe,
777 .remove = __devexit_p(sh_cmt_remove), 777 .remove = sh_cmt_remove,
778 .driver = { 778 .driver = {
779 .name = "sh_cmt", 779 .name = "sh_cmt",
780 } 780 }
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index c5eea858054a..83943e27cfac 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -321,7 +321,7 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
321 return ret; 321 return ret;
322} 322}
323 323
324static int __devinit sh_mtu2_probe(struct platform_device *pdev) 324static int sh_mtu2_probe(struct platform_device *pdev)
325{ 325{
326 struct sh_mtu2_priv *p = platform_get_drvdata(pdev); 326 struct sh_mtu2_priv *p = platform_get_drvdata(pdev);
327 struct sh_timer_config *cfg = pdev->dev.platform_data; 327 struct sh_timer_config *cfg = pdev->dev.platform_data;
@@ -362,14 +362,14 @@ static int __devinit sh_mtu2_probe(struct platform_device *pdev)
362 return 0; 362 return 0;
363} 363}
364 364
365static int __devexit sh_mtu2_remove(struct platform_device *pdev) 365static int sh_mtu2_remove(struct platform_device *pdev)
366{ 366{
367 return -EBUSY; /* cannot unregister clockevent */ 367 return -EBUSY; /* cannot unregister clockevent */
368} 368}
369 369
370static struct platform_driver sh_mtu2_device_driver = { 370static struct platform_driver sh_mtu2_device_driver = {
371 .probe = sh_mtu2_probe, 371 .probe = sh_mtu2_probe,
372 .remove = __devexit_p(sh_mtu2_remove), 372 .remove = sh_mtu2_remove,
373 .driver = { 373 .driver = {
374 .name = "sh_mtu2", 374 .name = "sh_mtu2",
375 } 375 }
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 0cc4add88279..b4502edce2a1 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -484,7 +484,7 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
484 return ret; 484 return ret;
485} 485}
486 486
487static int __devinit sh_tmu_probe(struct platform_device *pdev) 487static int sh_tmu_probe(struct platform_device *pdev)
488{ 488{
489 struct sh_tmu_priv *p = platform_get_drvdata(pdev); 489 struct sh_tmu_priv *p = platform_get_drvdata(pdev);
490 struct sh_timer_config *cfg = pdev->dev.platform_data; 490 struct sh_timer_config *cfg = pdev->dev.platform_data;
@@ -525,14 +525,14 @@ static int __devinit sh_tmu_probe(struct platform_device *pdev)
525 return 0; 525 return 0;
526} 526}
527 527
528static int __devexit sh_tmu_remove(struct platform_device *pdev) 528static int sh_tmu_remove(struct platform_device *pdev)
529{ 529{
530 return -EBUSY; /* cannot unregister clockevent and clocksource */ 530 return -EBUSY; /* cannot unregister clockevent and clocksource */
531} 531}
532 532
533static struct platform_driver sh_tmu_device_driver = { 533static struct platform_driver sh_tmu_device_driver = {
534 .probe = sh_tmu_probe, 534 .probe = sh_tmu_probe,
535 .remove = __devexit_p(sh_tmu_remove), 535 .remove = sh_tmu_remove,
536 .driver = { 536 .driver = {
537 .name = "sh_tmu", 537 .name = "sh_tmu",
538 } 538 }
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 965b7811e04f..7b695913cb30 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -256,7 +256,7 @@ static struct cn_dev cdev = {
256 .input = cn_rx_skb, 256 .input = cn_rx_skb,
257}; 257};
258 258
259static int __devinit cn_init(void) 259static int cn_init(void)
260{ 260{
261 struct cn_dev *dev = &cdev; 261 struct cn_dev *dev = &cdev;
262 struct netlink_kernel_cfg cfg = { 262 struct netlink_kernel_cfg cfg = {
@@ -281,7 +281,7 @@ static int __devinit cn_init(void)
281 return 0; 281 return 0;
282} 282}
283 283
284static void __devexit cn_fini(void) 284static void cn_fini(void)
285{ 285{
286 struct cn_dev *dev = &cdev; 286 struct cn_dev *dev = &cdev;
287 287
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index ea512f47b789..e0a899f25e37 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -20,6 +20,9 @@ if CPU_FREQ
20config CPU_FREQ_TABLE 20config CPU_FREQ_TABLE
21 tristate 21 tristate
22 22
23config CPU_FREQ_GOV_COMMON
24 bool
25
23config CPU_FREQ_STAT 26config CPU_FREQ_STAT
24 tristate "CPU frequency translation statistics" 27 tristate "CPU frequency translation statistics"
25 select CPU_FREQ_TABLE 28 select CPU_FREQ_TABLE
@@ -141,6 +144,7 @@ config CPU_FREQ_GOV_USERSPACE
141config CPU_FREQ_GOV_ONDEMAND 144config CPU_FREQ_GOV_ONDEMAND
142 tristate "'ondemand' cpufreq policy governor" 145 tristate "'ondemand' cpufreq policy governor"
143 select CPU_FREQ_TABLE 146 select CPU_FREQ_TABLE
147 select CPU_FREQ_GOV_COMMON
144 help 148 help
145 'ondemand' - This driver adds a dynamic cpufreq policy governor. 149 'ondemand' - This driver adds a dynamic cpufreq policy governor.
146 The governor does a periodic polling and 150 The governor does a periodic polling and
@@ -159,6 +163,7 @@ config CPU_FREQ_GOV_ONDEMAND
159config CPU_FREQ_GOV_CONSERVATIVE 163config CPU_FREQ_GOV_CONSERVATIVE
160 tristate "'conservative' cpufreq governor" 164 tristate "'conservative' cpufreq governor"
161 depends on CPU_FREQ 165 depends on CPU_FREQ
166 select CPU_FREQ_GOV_COMMON
162 help 167 help
163 'conservative' - this driver is rather similar to the 'ondemand' 168 'conservative' - this driver is rather similar to the 'ondemand'
164 governor both in its source code and its purpose, the difference is 169 governor both in its source code and its purpose, the difference is
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 1f254ec087c1..fadc4d496e2f 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -7,8 +7,9 @@ obj-$(CONFIG_CPU_FREQ_STAT) += cpufreq_stats.o
7obj-$(CONFIG_CPU_FREQ_GOV_PERFORMANCE) += cpufreq_performance.o 7obj-$(CONFIG_CPU_FREQ_GOV_PERFORMANCE) += cpufreq_performance.o
8obj-$(CONFIG_CPU_FREQ_GOV_POWERSAVE) += cpufreq_powersave.o 8obj-$(CONFIG_CPU_FREQ_GOV_POWERSAVE) += cpufreq_powersave.o
9obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE) += cpufreq_userspace.o 9obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE) += cpufreq_userspace.o
10obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o cpufreq_governor.o 10obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o
11obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o cpufreq_governor.o 11obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o
12obj-$(CONFIG_CPU_FREQ_GOV_COMMON) += cpufreq_governor.o
12 13
13# CPUfreq cross-arch helpers 14# CPUfreq cross-arch helpers
14obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o 15obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index e40e50809644..9d7732b81044 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -364,18 +364,21 @@ static int __init cpufreq_stats_init(void)
364 if (ret) 364 if (ret)
365 return ret; 365 return ret;
366 366
367 register_hotcpu_notifier(&cpufreq_stat_cpu_notifier);
368 for_each_online_cpu(cpu)
369 cpufreq_update_policy(cpu);
370
367 ret = cpufreq_register_notifier(&notifier_trans_block, 371 ret = cpufreq_register_notifier(&notifier_trans_block,
368 CPUFREQ_TRANSITION_NOTIFIER); 372 CPUFREQ_TRANSITION_NOTIFIER);
369 if (ret) { 373 if (ret) {
370 cpufreq_unregister_notifier(&notifier_policy_block, 374 cpufreq_unregister_notifier(&notifier_policy_block,
371 CPUFREQ_POLICY_NOTIFIER); 375 CPUFREQ_POLICY_NOTIFIER);
376 unregister_hotcpu_notifier(&cpufreq_stat_cpu_notifier);
377 for_each_online_cpu(cpu)
378 cpufreq_stats_free_table(cpu);
372 return ret; 379 return ret;
373 } 380 }
374 381
375 register_hotcpu_notifier(&cpufreq_stat_cpu_notifier);
376 for_each_online_cpu(cpu) {
377 cpufreq_update_policy(cpu);
378 }
379 return 0; 382 return 0;
380} 383}
381static void __exit cpufreq_stats_exit(void) 384static void __exit cpufreq_stats_exit(void)
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
index f1fa500ac105..1180d536d1eb 100644
--- a/drivers/cpufreq/longhaul.c
+++ b/drivers/cpufreq/longhaul.c
@@ -77,7 +77,7 @@ static unsigned int longhaul_index;
77static int scale_voltage; 77static int scale_voltage;
78static int disable_acpi_c3; 78static int disable_acpi_c3;
79static int revid_errata; 79static int revid_errata;
80 80static int enable;
81 81
82/* Clock ratios multiplied by 10 */ 82/* Clock ratios multiplied by 10 */
83static int mults[32]; 83static int mults[32];
@@ -965,6 +965,10 @@ static int __init longhaul_init(void)
965 if (!x86_match_cpu(longhaul_id)) 965 if (!x86_match_cpu(longhaul_id))
966 return -ENODEV; 966 return -ENODEV;
967 967
968 if (!enable) {
969 printk(KERN_ERR PFX "Option \"enable\" not set. Aborting.\n");
970 return -ENODEV;
971 }
968#ifdef CONFIG_SMP 972#ifdef CONFIG_SMP
969 if (num_online_cpus() > 1) { 973 if (num_online_cpus() > 1) {
970 printk(KERN_ERR PFX "More than 1 CPU detected, " 974 printk(KERN_ERR PFX "More than 1 CPU detected, "
@@ -1021,6 +1025,10 @@ MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor");
1021 * such. */ 1025 * such. */
1022module_param(revid_errata, int, 0644); 1026module_param(revid_errata, int, 0644);
1023MODULE_PARM_DESC(revid_errata, "Ignore CPU Revision ID"); 1027MODULE_PARM_DESC(revid_errata, "Ignore CPU Revision ID");
1028/* By default driver is disabled to prevent incompatible
1029 * system freeze. */
1030module_param(enable, int, 0644);
1031MODULE_PARM_DESC(enable, "Enable driver");
1024 1032
1025MODULE_AUTHOR("Dave Jones <davej@redhat.com>"); 1033MODULE_AUTHOR("Dave Jones <davej@redhat.com>");
1026MODULE_DESCRIPTION("Longhaul driver for VIA Cyrix processors."); 1034MODULE_DESCRIPTION("Longhaul driver for VIA Cyrix processors.");
diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c
index 3265844839bf..2a297f86dbad 100644
--- a/drivers/cpuidle/coupled.c
+++ b/drivers/cpuidle/coupled.c
@@ -209,7 +209,7 @@ inline int cpuidle_coupled_set_not_ready(struct cpuidle_coupled *coupled)
209 int all; 209 int all;
210 int ret; 210 int ret;
211 211
212 all = coupled->online_count || (coupled->online_count << WAITING_BITS); 212 all = coupled->online_count | (coupled->online_count << WAITING_BITS);
213 ret = atomic_add_unless(&coupled->ready_waiting_counts, 213 ret = atomic_add_unless(&coupled->ready_waiting_counts,
214 -MAX_WAITING_CPUS, all); 214 -MAX_WAITING_CPUS, all);
215 215
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 8df53dd8dbe1..fb4a7dd57f94 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -70,7 +70,7 @@ int cpuidle_play_dead(void)
70 struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices); 70 struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices);
71 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); 71 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev);
72 int i, dead_state = -1; 72 int i, dead_state = -1;
73 int power_usage = -1; 73 int power_usage = INT_MAX;
74 74
75 if (!drv) 75 if (!drv)
76 return -ENODEV; 76 return -ENODEV;
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 3af841fb397a..c2b281afe0ed 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -235,16 +235,10 @@ EXPORT_SYMBOL_GPL(cpuidle_get_driver);
235 */ 235 */
236struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev) 236struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev)
237{ 237{
238 struct cpuidle_driver *drv;
239
240 if (!dev) 238 if (!dev)
241 return NULL; 239 return NULL;
242 240
243 spin_lock(&cpuidle_driver_lock); 241 return __cpuidle_get_cpu_driver(dev->cpu);
244 drv = __cpuidle_get_cpu_driver(dev->cpu);
245 spin_unlock(&cpuidle_driver_lock);
246
247 return drv;
248} 242}
249EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver); 243EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver);
250 244
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index bd40b943b6db..20ea33afdda1 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -312,7 +312,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
312{ 312{
313 struct menu_device *data = &__get_cpu_var(menu_devices); 313 struct menu_device *data = &__get_cpu_var(menu_devices);
314 int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); 314 int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
315 int power_usage = -1; 315 int power_usage = INT_MAX;
316 int i; 316 int i;
317 int multiplier; 317 int multiplier;
318 struct timespec t; 318 struct timespec t;
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index 8061336e07e7..c9d9d5c16f94 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -1036,7 +1036,7 @@ err_aes_algs:
1036 return err; 1036 return err;
1037} 1037}
1038 1038
1039static int __devinit atmel_aes_probe(struct platform_device *pdev) 1039static int atmel_aes_probe(struct platform_device *pdev)
1040{ 1040{
1041 struct atmel_aes_dev *aes_dd; 1041 struct atmel_aes_dev *aes_dd;
1042 struct aes_platform_data *pdata; 1042 struct aes_platform_data *pdata;
@@ -1152,7 +1152,7 @@ aes_dd_err:
1152 return err; 1152 return err;
1153} 1153}
1154 1154
1155static int __devexit atmel_aes_remove(struct platform_device *pdev) 1155static int atmel_aes_remove(struct platform_device *pdev)
1156{ 1156{
1157 static struct atmel_aes_dev *aes_dd; 1157 static struct atmel_aes_dev *aes_dd;
1158 1158
@@ -1185,7 +1185,7 @@ static int __devexit atmel_aes_remove(struct platform_device *pdev)
1185 1185
1186static struct platform_driver atmel_aes_driver = { 1186static struct platform_driver atmel_aes_driver = {
1187 .probe = atmel_aes_probe, 1187 .probe = atmel_aes_probe,
1188 .remove = __devexit_p(atmel_aes_remove), 1188 .remove = atmel_aes_remove,
1189 .driver = { 1189 .driver = {
1190 .name = "atmel_aes", 1190 .name = "atmel_aes",
1191 .owner = THIS_MODULE, 1191 .owner = THIS_MODULE,
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
index bcdf55fdc623..4918e9424d31 100644
--- a/drivers/crypto/atmel-sha.c
+++ b/drivers/crypto/atmel-sha.c
@@ -964,7 +964,7 @@ err_sha_algs:
964 return err; 964 return err;
965} 965}
966 966
967static int __devinit atmel_sha_probe(struct platform_device *pdev) 967static int atmel_sha_probe(struct platform_device *pdev)
968{ 968{
969 struct atmel_sha_dev *sha_dd; 969 struct atmel_sha_dev *sha_dd;
970 struct device *dev = &pdev->dev; 970 struct device *dev = &pdev->dev;
@@ -1063,7 +1063,7 @@ sha_dd_err:
1063 return err; 1063 return err;
1064} 1064}
1065 1065
1066static int __devexit atmel_sha_remove(struct platform_device *pdev) 1066static int atmel_sha_remove(struct platform_device *pdev)
1067{ 1067{
1068 static struct atmel_sha_dev *sha_dd; 1068 static struct atmel_sha_dev *sha_dd;
1069 1069
@@ -1093,7 +1093,7 @@ static int __devexit atmel_sha_remove(struct platform_device *pdev)
1093 1093
1094static struct platform_driver atmel_sha_driver = { 1094static struct platform_driver atmel_sha_driver = {
1095 .probe = atmel_sha_probe, 1095 .probe = atmel_sha_probe,
1096 .remove = __devexit_p(atmel_sha_remove), 1096 .remove = atmel_sha_remove,
1097 .driver = { 1097 .driver = {
1098 .name = "atmel_sha", 1098 .name = "atmel_sha",
1099 .owner = THIS_MODULE, 1099 .owner = THIS_MODULE,
diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c
index 7495f98c7221..7c73fbb17538 100644
--- a/drivers/crypto/atmel-tdes.c
+++ b/drivers/crypto/atmel-tdes.c
@@ -1053,7 +1053,7 @@ err_tdes_algs:
1053 return err; 1053 return err;
1054} 1054}
1055 1055
1056static int __devinit atmel_tdes_probe(struct platform_device *pdev) 1056static int atmel_tdes_probe(struct platform_device *pdev)
1057{ 1057{
1058 struct atmel_tdes_dev *tdes_dd; 1058 struct atmel_tdes_dev *tdes_dd;
1059 struct device *dev = &pdev->dev; 1059 struct device *dev = &pdev->dev;
@@ -1162,7 +1162,7 @@ tdes_dd_err:
1162 return err; 1162 return err;
1163} 1163}
1164 1164
1165static int __devexit atmel_tdes_remove(struct platform_device *pdev) 1165static int atmel_tdes_remove(struct platform_device *pdev)
1166{ 1166{
1167 static struct atmel_tdes_dev *tdes_dd; 1167 static struct atmel_tdes_dev *tdes_dd;
1168 1168
@@ -1195,7 +1195,7 @@ static int __devexit atmel_tdes_remove(struct platform_device *pdev)
1195 1195
1196static struct platform_driver atmel_tdes_driver = { 1196static struct platform_driver atmel_tdes_driver = {
1197 .probe = atmel_tdes_probe, 1197 .probe = atmel_tdes_probe,
1198 .remove = __devexit_p(atmel_tdes_remove), 1198 .remove = atmel_tdes_remove,
1199 .driver = { 1199 .driver = {
1200 .name = "atmel_tdes", 1200 .name = "atmel_tdes",
1201 .owner = THIS_MODULE, 1201 .owner = THIS_MODULE,
diff --git a/drivers/crypto/bfin_crc.c b/drivers/crypto/bfin_crc.c
index 5398580b4313..a22f1a9f895f 100644
--- a/drivers/crypto/bfin_crc.c
+++ b/drivers/crypto/bfin_crc.c
@@ -586,7 +586,7 @@ static int bfin_crypto_crc_suspend(struct platform_device *pdev, pm_message_t st
586 * bfin_crypto_crc_probe - Initialize module 586 * bfin_crypto_crc_probe - Initialize module
587 * 587 *
588 */ 588 */
589static int __devinit bfin_crypto_crc_probe(struct platform_device *pdev) 589static int bfin_crypto_crc_probe(struct platform_device *pdev)
590{ 590{
591 struct device *dev = &pdev->dev; 591 struct device *dev = &pdev->dev;
592 struct resource *res; 592 struct resource *res;
@@ -707,7 +707,7 @@ out_error_free_mem:
707 * bfin_crypto_crc_remove - Initialize module 707 * bfin_crypto_crc_remove - Initialize module
708 * 708 *
709 */ 709 */
710static int __devexit bfin_crypto_crc_remove(struct platform_device *pdev) 710static int bfin_crypto_crc_remove(struct platform_device *pdev)
711{ 711{
712 struct bfin_crypto_crc *crc = platform_get_drvdata(pdev); 712 struct bfin_crypto_crc *crc = platform_get_drvdata(pdev);
713 713
@@ -731,7 +731,7 @@ static int __devexit bfin_crypto_crc_remove(struct platform_device *pdev)
731 731
732static struct platform_driver bfin_crypto_crc_driver = { 732static struct platform_driver bfin_crypto_crc_driver = {
733 .probe = bfin_crypto_crc_probe, 733 .probe = bfin_crypto_crc_probe,
734 .remove = __devexit_p(bfin_crypto_crc_remove), 734 .remove = bfin_crypto_crc_remove,
735 .suspend = bfin_crypto_crc_suspend, 735 .suspend = bfin_crypto_crc_suspend,
736 .resume = bfin_crypto_crc_resume, 736 .resume = bfin_crypto_crc_resume,
737 .driver = { 737 .driver = {
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index bf20dd891705..1c56f63524f2 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -420,7 +420,7 @@ static struct platform_driver caam_driver = {
420 .of_match_table = caam_match, 420 .of_match_table = caam_match,
421 }, 421 },
422 .probe = caam_probe, 422 .probe = caam_probe,
423 .remove = __devexit_p(caam_remove), 423 .remove = caam_remove,
424}; 424};
425 425
426module_platform_driver(caam_driver); 426module_platform_driver(caam_driver);
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 51f196d77f21..0c9ff4971724 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -498,8 +498,7 @@ static struct crypto_alg geode_ecb_alg = {
498 } 498 }
499}; 499};
500 500
501static void __devexit 501static void geode_aes_remove(struct pci_dev *dev)
502geode_aes_remove(struct pci_dev *dev)
503{ 502{
504 crypto_unregister_alg(&geode_alg); 503 crypto_unregister_alg(&geode_alg);
505 crypto_unregister_alg(&geode_ecb_alg); 504 crypto_unregister_alg(&geode_ecb_alg);
@@ -513,8 +512,7 @@ geode_aes_remove(struct pci_dev *dev)
513} 512}
514 513
515 514
516static int __devinit 515static int geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id)
517geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id)
518{ 516{
519 int ret; 517 int ret;
520 ret = pci_enable_device(dev); 518 ret = pci_enable_device(dev);
@@ -582,7 +580,7 @@ static struct pci_driver geode_aes_driver = {
582 .name = "Geode LX AES", 580 .name = "Geode LX AES",
583 .id_table = geode_aes_tbl, 581 .id_table = geode_aes_tbl,
584 .probe = geode_aes_probe, 582 .probe = geode_aes_probe,
585 .remove = __devexit_p(geode_aes_remove) 583 .remove = geode_aes_remove,
586}; 584};
587 585
588module_pci_driver(geode_aes_driver); 586module_pci_driver(geode_aes_driver);
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index fda32968a66b..ebf130e894b5 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -2561,7 +2561,7 @@ static void hifn_tasklet_callback(unsigned long data)
2561 hifn_process_queue(dev); 2561 hifn_process_queue(dev);
2562} 2562}
2563 2563
2564static int __devinit hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) 2564static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
2565{ 2565{
2566 int err, i; 2566 int err, i;
2567 struct hifn_device *dev; 2567 struct hifn_device *dev;
@@ -2696,7 +2696,7 @@ err_out_disable_pci_device:
2696 return err; 2696 return err;
2697} 2697}
2698 2698
2699static void __devexit hifn_remove(struct pci_dev *pdev) 2699static void hifn_remove(struct pci_dev *pdev)
2700{ 2700{
2701 int i; 2701 int i;
2702 struct hifn_device *dev; 2702 struct hifn_device *dev;
@@ -2740,7 +2740,7 @@ static struct pci_driver hifn_pci_driver = {
2740 .name = "hifn795x", 2740 .name = "hifn795x",
2741 .id_table = hifn_pci_tbl, 2741 .id_table = hifn_pci_tbl,
2742 .probe = hifn_probe, 2742 .probe = hifn_probe,
2743 .remove = __devexit_p(hifn_remove), 2743 .remove = hifn_remove,
2744}; 2744};
2745 2745
2746static int __init hifn_init(void) 2746static int __init hifn_init(void)
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index 24ccae453e79..ce6290e5471a 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -1184,7 +1184,7 @@ MODULE_DEVICE_TABLE(of, mv_cesa_of_match_table);
1184 1184
1185static struct platform_driver marvell_crypto = { 1185static struct platform_driver marvell_crypto = {
1186 .probe = mv_probe, 1186 .probe = mv_probe,
1187 .remove = __devexit_p(mv_remove), 1187 .remove = mv_remove,
1188 .driver = { 1188 .driver = {
1189 .owner = THIS_MODULE, 1189 .owner = THIS_MODULE,
1190 .name = "mv_crypto", 1190 .name = "mv_crypto",
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index aab257403b4a..e1f0ab413c3b 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -34,7 +34,7 @@
34#define DRV_MODULE_VERSION "0.2" 34#define DRV_MODULE_VERSION "0.2"
35#define DRV_MODULE_RELDATE "July 28, 2011" 35#define DRV_MODULE_RELDATE "July 28, 2011"
36 36
37static char version[] __devinitdata = 37static char version[] =
38 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 38 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
39 39
40MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); 40MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
@@ -1388,7 +1388,7 @@ static int n2_cipher_cra_init(struct crypto_tfm *tfm)
1388 return 0; 1388 return 0;
1389} 1389}
1390 1390
1391static int __devinit __n2_register_one_cipher(const struct n2_cipher_tmpl *tmpl) 1391static int __n2_register_one_cipher(const struct n2_cipher_tmpl *tmpl)
1392{ 1392{
1393 struct n2_cipher_alg *p = kzalloc(sizeof(*p), GFP_KERNEL); 1393 struct n2_cipher_alg *p = kzalloc(sizeof(*p), GFP_KERNEL);
1394 struct crypto_alg *alg; 1394 struct crypto_alg *alg;
@@ -1424,7 +1424,7 @@ static int __devinit __n2_register_one_cipher(const struct n2_cipher_tmpl *tmpl)
1424 return err; 1424 return err;
1425} 1425}
1426 1426
1427static int __devinit __n2_register_one_hmac(struct n2_ahash_alg *n2ahash) 1427static int __n2_register_one_hmac(struct n2_ahash_alg *n2ahash)
1428{ 1428{
1429 struct n2_hmac_alg *p = kzalloc(sizeof(*p), GFP_KERNEL); 1429 struct n2_hmac_alg *p = kzalloc(sizeof(*p), GFP_KERNEL);
1430 struct ahash_alg *ahash; 1430 struct ahash_alg *ahash;
@@ -1462,7 +1462,7 @@ static int __devinit __n2_register_one_hmac(struct n2_ahash_alg *n2ahash)
1462 return err; 1462 return err;
1463} 1463}
1464 1464
1465static int __devinit __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl) 1465static int __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl)
1466{ 1466{
1467 struct n2_ahash_alg *p = kzalloc(sizeof(*p), GFP_KERNEL); 1467 struct n2_ahash_alg *p = kzalloc(sizeof(*p), GFP_KERNEL);
1468 struct hash_alg_common *halg; 1468 struct hash_alg_common *halg;
@@ -1517,7 +1517,7 @@ static int __devinit __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl)
1517 return err; 1517 return err;
1518} 1518}
1519 1519
1520static int __devinit n2_register_algs(void) 1520static int n2_register_algs(void)
1521{ 1521{
1522 int i, err = 0; 1522 int i, err = 0;
1523 1523
@@ -1545,7 +1545,7 @@ out:
1545 return err; 1545 return err;
1546} 1546}
1547 1547
1548static void __devexit n2_unregister_algs(void) 1548static void n2_unregister_algs(void)
1549{ 1549{
1550 mutex_lock(&spu_lock); 1550 mutex_lock(&spu_lock);
1551 if (!--algs_registered) 1551 if (!--algs_registered)
@@ -1822,8 +1822,8 @@ static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct platform_device *de
1822 return err; 1822 return err;
1823} 1823}
1824 1824
1825static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node, 1825static int get_irq_props(struct mdesc_handle *mdesc, u64 node,
1826 struct spu_mdesc_info *ip) 1826 struct spu_mdesc_info *ip)
1827{ 1827{
1828 const u64 *ino; 1828 const u64 *ino;
1829 int ino_len; 1829 int ino_len;
@@ -1851,10 +1851,10 @@ static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
1851 return 0; 1851 return 0;
1852} 1852}
1853 1853
1854static int __devinit grab_mdesc_irq_props(struct mdesc_handle *mdesc, 1854static int grab_mdesc_irq_props(struct mdesc_handle *mdesc,
1855 struct platform_device *dev, 1855 struct platform_device *dev,
1856 struct spu_mdesc_info *ip, 1856 struct spu_mdesc_info *ip,
1857 const char *node_name) 1857 const char *node_name)
1858{ 1858{
1859 const unsigned int *reg; 1859 const unsigned int *reg;
1860 u64 node; 1860 u64 node;
@@ -1883,7 +1883,7 @@ static int __devinit grab_mdesc_irq_props(struct mdesc_handle *mdesc,
1883static unsigned long n2_spu_hvapi_major; 1883static unsigned long n2_spu_hvapi_major;
1884static unsigned long n2_spu_hvapi_minor; 1884static unsigned long n2_spu_hvapi_minor;
1885 1885
1886static int __devinit n2_spu_hvapi_register(void) 1886static int n2_spu_hvapi_register(void)
1887{ 1887{
1888 int err; 1888 int err;
1889 1889
@@ -1909,7 +1909,7 @@ static void n2_spu_hvapi_unregister(void)
1909 1909
1910static int global_ref; 1910static int global_ref;
1911 1911
1912static int __devinit grab_global_resources(void) 1912static int grab_global_resources(void)
1913{ 1913{
1914 int err = 0; 1914 int err = 0;
1915 1915
@@ -1973,7 +1973,7 @@ static void release_global_resources(void)
1973 mutex_unlock(&spu_lock); 1973 mutex_unlock(&spu_lock);
1974} 1974}
1975 1975
1976static struct n2_crypto * __devinit alloc_n2cp(void) 1976static struct n2_crypto *alloc_n2cp(void)
1977{ 1977{
1978 struct n2_crypto *np = kzalloc(sizeof(struct n2_crypto), GFP_KERNEL); 1978 struct n2_crypto *np = kzalloc(sizeof(struct n2_crypto), GFP_KERNEL);
1979 1979
@@ -1993,7 +1993,7 @@ static void free_n2cp(struct n2_crypto *np)
1993 kfree(np); 1993 kfree(np);
1994} 1994}
1995 1995
1996static void __devinit n2_spu_driver_version(void) 1996static void n2_spu_driver_version(void)
1997{ 1997{
1998 static int n2_spu_version_printed; 1998 static int n2_spu_version_printed;
1999 1999
@@ -2001,7 +2001,7 @@ static void __devinit n2_spu_driver_version(void)
2001 pr_info("%s", version); 2001 pr_info("%s", version);
2002} 2002}
2003 2003
2004static int __devinit n2_crypto_probe(struct platform_device *dev) 2004static int n2_crypto_probe(struct platform_device *dev)
2005{ 2005{
2006 struct mdesc_handle *mdesc; 2006 struct mdesc_handle *mdesc;
2007 const char *full_name; 2007 const char *full_name;
@@ -2077,7 +2077,7 @@ out_free_n2cp:
2077 return err; 2077 return err;
2078} 2078}
2079 2079
2080static int __devexit n2_crypto_remove(struct platform_device *dev) 2080static int n2_crypto_remove(struct platform_device *dev)
2081{ 2081{
2082 struct n2_crypto *np = dev_get_drvdata(&dev->dev); 2082 struct n2_crypto *np = dev_get_drvdata(&dev->dev);
2083 2083
@@ -2092,7 +2092,7 @@ static int __devexit n2_crypto_remove(struct platform_device *dev)
2092 return 0; 2092 return 0;
2093} 2093}
2094 2094
2095static struct n2_mau * __devinit alloc_ncp(void) 2095static struct n2_mau *alloc_ncp(void)
2096{ 2096{
2097 struct n2_mau *mp = kzalloc(sizeof(struct n2_mau), GFP_KERNEL); 2097 struct n2_mau *mp = kzalloc(sizeof(struct n2_mau), GFP_KERNEL);
2098 2098
@@ -2112,7 +2112,7 @@ static void free_ncp(struct n2_mau *mp)
2112 kfree(mp); 2112 kfree(mp);
2113} 2113}
2114 2114
2115static int __devinit n2_mau_probe(struct platform_device *dev) 2115static int n2_mau_probe(struct platform_device *dev)
2116{ 2116{
2117 struct mdesc_handle *mdesc; 2117 struct mdesc_handle *mdesc;
2118 const char *full_name; 2118 const char *full_name;
@@ -2179,7 +2179,7 @@ out_free_ncp:
2179 return err; 2179 return err;
2180} 2180}
2181 2181
2182static int __devexit n2_mau_remove(struct platform_device *dev) 2182static int n2_mau_remove(struct platform_device *dev)
2183{ 2183{
2184 struct n2_mau *mp = dev_get_drvdata(&dev->dev); 2184 struct n2_mau *mp = dev_get_drvdata(&dev->dev);
2185 2185
@@ -2217,7 +2217,7 @@ static struct platform_driver n2_crypto_driver = {
2217 .of_match_table = n2_crypto_match, 2217 .of_match_table = n2_crypto_match,
2218 }, 2218 },
2219 .probe = n2_crypto_probe, 2219 .probe = n2_crypto_probe,
2220 .remove = __devexit_p(n2_crypto_remove), 2220 .remove = n2_crypto_remove,
2221}; 2221};
2222 2222
2223static struct of_device_id n2_mau_match[] = { 2223static struct of_device_id n2_mau_match[] = {
@@ -2245,7 +2245,7 @@ static struct platform_driver n2_mau_driver = {
2245 .of_match_table = n2_mau_match, 2245 .of_match_table = n2_mau_match,
2246 }, 2246 },
2247 .probe = n2_mau_probe, 2247 .probe = n2_mau_probe,
2248 .remove = __devexit_p(n2_mau_remove), 2248 .remove = n2_mau_remove,
2249}; 2249};
2250 2250
2251static int __init n2_init(void) 2251static int __init n2_init(void)
diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c
index f7a8a16aa7d3..c767f232e693 100644
--- a/drivers/crypto/nx/nx.c
+++ b/drivers/crypto/nx/nx.c
@@ -634,8 +634,7 @@ void nx_crypto_ctx_exit(struct crypto_tfm *tfm)
634 nx_ctx->out_sg = NULL; 634 nx_ctx->out_sg = NULL;
635} 635}
636 636
637static int __devinit nx_probe(struct vio_dev *viodev, 637static int nx_probe(struct vio_dev *viodev, const struct vio_device_id *id)
638 const struct vio_device_id *id)
639{ 638{
640 dev_dbg(&viodev->dev, "driver probed: %s resource id: 0x%x\n", 639 dev_dbg(&viodev->dev, "driver probed: %s resource id: 0x%x\n",
641 viodev->name, viodev->resource_id); 640 viodev->name, viodev->resource_id);
@@ -653,7 +652,7 @@ static int __devinit nx_probe(struct vio_dev *viodev,
653 return nx_register_algs(); 652 return nx_register_algs();
654} 653}
655 654
656static int __devexit nx_remove(struct vio_dev *viodev) 655static int nx_remove(struct vio_dev *viodev)
657{ 656{
658 dev_dbg(&viodev->dev, "entering nx_remove for UA 0x%x\n", 657 dev_dbg(&viodev->dev, "entering nx_remove for UA 0x%x\n",
659 viodev->unit_address); 658 viodev->unit_address);
@@ -689,7 +688,7 @@ static void __exit nx_fini(void)
689 vio_unregister_driver(&nx_driver.viodriver); 688 vio_unregister_driver(&nx_driver.viodriver);
690} 689}
691 690
692static struct vio_device_id nx_crypto_driver_ids[] __devinitdata = { 691static struct vio_device_id nx_crypto_driver_ids[] = {
693 { "ibm,sym-encryption-v1", "ibm,sym-encryption" }, 692 { "ibm,sym-encryption-v1", "ibm,sym-encryption" },
694 { "", "" } 693 { "", "" }
695}; 694};
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 1d75e6f95a58..90d34adc2a66 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1137,7 +1137,7 @@ static void omap_sham_dma_cleanup(struct omap_sham_dev *dd)
1137 } 1137 }
1138} 1138}
1139 1139
1140static int __devinit omap_sham_probe(struct platform_device *pdev) 1140static int omap_sham_probe(struct platform_device *pdev)
1141{ 1141{
1142 struct omap_sham_dev *dd; 1142 struct omap_sham_dev *dd;
1143 struct device *dev = &pdev->dev; 1143 struct device *dev = &pdev->dev;
@@ -1250,7 +1250,7 @@ data_err:
1250 return err; 1250 return err;
1251} 1251}
1252 1252
1253static int __devexit omap_sham_remove(struct platform_device *pdev) 1253static int omap_sham_remove(struct platform_device *pdev)
1254{ 1254{
1255 static struct omap_sham_dev *dd; 1255 static struct omap_sham_dev *dd;
1256 int i; 1256 int i;
diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c
index c983f869d2b7..2096d4685a9e 100644
--- a/drivers/crypto/picoxcell_crypto.c
+++ b/drivers/crypto/picoxcell_crypto.c
@@ -1708,7 +1708,7 @@ static bool spacc_is_compatible(struct platform_device *pdev,
1708 return false; 1708 return false;
1709} 1709}
1710 1710
1711static int __devinit spacc_probe(struct platform_device *pdev) 1711static int spacc_probe(struct platform_device *pdev)
1712{ 1712{
1713 int i, err, ret = -EINVAL; 1713 int i, err, ret = -EINVAL;
1714 struct resource *mem, *irq; 1714 struct resource *mem, *irq;
@@ -1841,7 +1841,7 @@ static int __devinit spacc_probe(struct platform_device *pdev)
1841 return ret; 1841 return ret;
1842} 1842}
1843 1843
1844static int __devexit spacc_remove(struct platform_device *pdev) 1844static int spacc_remove(struct platform_device *pdev)
1845{ 1845{
1846 struct spacc_alg *alg, *next; 1846 struct spacc_alg *alg, *next;
1847 struct spacc_engine *engine = platform_get_drvdata(pdev); 1847 struct spacc_engine *engine = platform_get_drvdata(pdev);
@@ -1868,7 +1868,7 @@ static const struct platform_device_id spacc_id_table[] = {
1868 1868
1869static struct platform_driver spacc_driver = { 1869static struct platform_driver spacc_driver = {
1870 .probe = spacc_probe, 1870 .probe = spacc_probe,
1871 .remove = __devexit_p(spacc_remove), 1871 .remove = spacc_remove,
1872 .driver = { 1872 .driver = {
1873 .name = "picochip,spacc", 1873 .name = "picochip,spacc",
1874#ifdef CONFIG_PM 1874#ifdef CONFIG_PM
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c
index eb32fd8cad14..85ea7525fa36 100644
--- a/drivers/crypto/tegra-aes.c
+++ b/drivers/crypto/tegra-aes.c
@@ -1047,7 +1047,7 @@ out:
1047 return err; 1047 return err;
1048} 1048}
1049 1049
1050static int __devexit tegra_aes_remove(struct platform_device *pdev) 1050static int tegra_aes_remove(struct platform_device *pdev)
1051{ 1051{
1052 struct device *dev = &pdev->dev; 1052 struct device *dev = &pdev->dev;
1053 struct tegra_aes_dev *dd = platform_get_drvdata(pdev); 1053 struct tegra_aes_dev *dd = platform_get_drvdata(pdev);
@@ -1074,7 +1074,7 @@ static int __devexit tegra_aes_remove(struct platform_device *pdev)
1074 return 0; 1074 return 0;
1075} 1075}
1076 1076
1077static struct of_device_id tegra_aes_of_match[] __devinitdata = { 1077static struct of_device_id tegra_aes_of_match[] = {
1078 { .compatible = "nvidia,tegra20-aes", }, 1078 { .compatible = "nvidia,tegra20-aes", },
1079 { .compatible = "nvidia,tegra30-aes", }, 1079 { .compatible = "nvidia,tegra30-aes", },
1080 { }, 1080 { },
@@ -1082,7 +1082,7 @@ static struct of_device_id tegra_aes_of_match[] __devinitdata = {
1082 1082
1083static struct platform_driver tegra_aes_driver = { 1083static struct platform_driver tegra_aes_driver = {
1084 .probe = tegra_aes_probe, 1084 .probe = tegra_aes_probe,
1085 .remove = __devexit_p(tegra_aes_remove), 1085 .remove = tegra_aes_remove,
1086 .driver = { 1086 .driver = {
1087 .name = "tegra-aes", 1087 .name = "tegra-aes",
1088 .owner = THIS_MODULE, 1088 .owner = THIS_MODULE,
diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
index 741837208716..80c745e83082 100644
--- a/drivers/devfreq/exynos4_bus.c
+++ b/drivers/devfreq/exynos4_bus.c
@@ -980,7 +980,7 @@ unlock:
980 return NOTIFY_DONE; 980 return NOTIFY_DONE;
981} 981}
982 982
983static __devinit int exynos4_busfreq_probe(struct platform_device *pdev) 983static int exynos4_busfreq_probe(struct platform_device *pdev)
984{ 984{
985 struct busfreq_data *data; 985 struct busfreq_data *data;
986 struct opp *opp; 986 struct opp *opp;
@@ -1056,7 +1056,7 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
1056 return 0; 1056 return 0;
1057} 1057}
1058 1058
1059static __devexit int exynos4_busfreq_remove(struct platform_device *pdev) 1059static int exynos4_busfreq_remove(struct platform_device *pdev)
1060{ 1060{
1061 struct busfreq_data *data = platform_get_drvdata(pdev); 1061 struct busfreq_data *data = platform_get_drvdata(pdev);
1062 1062
@@ -1087,7 +1087,7 @@ static const struct platform_device_id exynos4_busfreq_id[] = {
1087 1087
1088static struct platform_driver exynos4_busfreq_driver = { 1088static struct platform_driver exynos4_busfreq_driver = {
1089 .probe = exynos4_busfreq_probe, 1089 .probe = exynos4_busfreq_probe,
1090 .remove = __devexit_p(exynos4_busfreq_remove), 1090 .remove = exynos4_busfreq_remove,
1091 .id_table = exynos4_busfreq_id, 1091 .id_table = exynos4_busfreq_id,
1092 .driver = { 1092 .driver = {
1093 .name = "exynos4-busfreq", 1093 .name = "exynos4-busfreq",
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 8f0b111af4de..3e8ba02ba292 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1634,7 +1634,7 @@ static int dw_probe(struct platform_device *pdev)
1634 return 0; 1634 return 0;
1635} 1635}
1636 1636
1637static int __devexit dw_remove(struct platform_device *pdev) 1637static int dw_remove(struct platform_device *pdev)
1638{ 1638{
1639 struct dw_dma *dw = platform_get_drvdata(pdev); 1639 struct dw_dma *dw = platform_get_drvdata(pdev);
1640 struct dw_dma_chan *dwc, *_dwc; 1640 struct dw_dma_chan *dwc, *_dwc;
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 232b4583ae93..f424298f1ac5 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -585,7 +585,7 @@ err_reg1:
585 return ret; 585 return ret;
586} 586}
587 587
588static int __devexit edma_remove(struct platform_device *pdev) 588static int edma_remove(struct platform_device *pdev)
589{ 589{
590 struct device *dev = &pdev->dev; 590 struct device *dev = &pdev->dev;
591 struct edma_cc *ecc = dev_get_drvdata(dev); 591 struct edma_cc *ecc = dev_get_drvdata(dev);
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index bc764afacd9b..a0de82e21a7c 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -1308,7 +1308,7 @@ err_enable_device:
1308 * Free up all resources and data 1308 * Free up all resources and data
1309 * Call shutdown_dma to complete contoller and chan cleanup 1309 * Call shutdown_dma to complete contoller and chan cleanup
1310 */ 1310 */
1311static void __devexit intel_mid_dma_remove(struct pci_dev *pdev) 1311static void intel_mid_dma_remove(struct pci_dev *pdev)
1312{ 1312{
1313 struct middma_device *device = pci_get_drvdata(pdev); 1313 struct middma_device *device = pci_get_drvdata(pdev);
1314 1314
diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat/dca.c
index d6668071bd0d..9b041858d10d 100644
--- a/drivers/dma/ioat/dca.c
+++ b/drivers/dma/ioat/dca.c
@@ -242,8 +242,7 @@ static struct dca_ops ioat_dca_ops = {
242}; 242};
243 243
244 244
245struct dca_provider * __devinit 245struct dca_provider *ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase)
246ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase)
247{ 246{
248 struct dca_provider *dca; 247 struct dca_provider *dca;
249 struct ioat_dca_priv *ioatdca; 248 struct ioat_dca_priv *ioatdca;
@@ -408,8 +407,7 @@ static int ioat2_dca_count_dca_slots(void __iomem *iobase, u16 dca_offset)
408 return slots; 407 return slots;
409} 408}
410 409
411struct dca_provider * __devinit 410struct dca_provider *ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase)
412ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase)
413{ 411{
414 struct dca_provider *dca; 412 struct dca_provider *dca;
415 struct ioat_dca_priv *ioatdca; 413 struct ioat_dca_priv *ioatdca;
@@ -621,8 +619,7 @@ static inline int dca3_tag_map_invalid(u8 *tag_map)
621 (tag_map[4] == DCA_TAG_MAP_VALID)); 619 (tag_map[4] == DCA_TAG_MAP_VALID));
622} 620}
623 621
624struct dca_provider * __devinit 622struct dca_provider *ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase)
625ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase)
626{ 623{
627 struct dca_provider *dca; 624 struct dca_provider *dca;
628 struct ioat_dca_priv *ioatdca; 625 struct ioat_dca_priv *ioatdca;
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index 73b2b65cb1de..1a68a8ba87e6 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -782,7 +782,7 @@ static void ioat1_dma_start_null_desc(struct ioat_dma_chan *ioat)
782 */ 782 */
783#define IOAT_TEST_SIZE 2000 783#define IOAT_TEST_SIZE 2000
784 784
785static void __devinit ioat_dma_test_callback(void *dma_async_param) 785static void ioat_dma_test_callback(void *dma_async_param)
786{ 786{
787 struct completion *cmp = dma_async_param; 787 struct completion *cmp = dma_async_param;
788 788
@@ -793,7 +793,7 @@ static void __devinit ioat_dma_test_callback(void *dma_async_param)
793 * ioat_dma_self_test - Perform a IOAT transaction to verify the HW works. 793 * ioat_dma_self_test - Perform a IOAT transaction to verify the HW works.
794 * @device: device to be tested 794 * @device: device to be tested
795 */ 795 */
796int __devinit ioat_dma_self_test(struct ioatdma_device *device) 796int ioat_dma_self_test(struct ioatdma_device *device)
797{ 797{
798 int i; 798 int i;
799 u8 *src; 799 u8 *src;
@@ -994,7 +994,7 @@ static void ioat_disable_interrupts(struct ioatdma_device *device)
994 writeb(0, device->reg_base + IOAT_INTRCTRL_OFFSET); 994 writeb(0, device->reg_base + IOAT_INTRCTRL_OFFSET);
995} 995}
996 996
997int __devinit ioat_probe(struct ioatdma_device *device) 997int ioat_probe(struct ioatdma_device *device)
998{ 998{
999 int err = -ENODEV; 999 int err = -ENODEV;
1000 struct dma_device *dma = &device->common; 1000 struct dma_device *dma = &device->common;
@@ -1049,7 +1049,7 @@ err_dma_pool:
1049 return err; 1049 return err;
1050} 1050}
1051 1051
1052int __devinit ioat_register(struct ioatdma_device *device) 1052int ioat_register(struct ioatdma_device *device)
1053{ 1053{
1054 int err = dma_async_device_register(&device->common); 1054 int err = dma_async_device_register(&device->common);
1055 1055
@@ -1183,7 +1183,7 @@ void ioat_kobject_del(struct ioatdma_device *device)
1183 } 1183 }
1184} 1184}
1185 1185
1186int __devinit ioat1_dma_probe(struct ioatdma_device *device, int dca) 1186int ioat1_dma_probe(struct ioatdma_device *device, int dca)
1187{ 1187{
1188 struct pci_dev *pdev = device->pdev; 1188 struct pci_dev *pdev = device->pdev;
1189 struct dma_device *dma; 1189 struct dma_device *dma;
@@ -1216,7 +1216,7 @@ int __devinit ioat1_dma_probe(struct ioatdma_device *device, int dca)
1216 return err; 1216 return err;
1217} 1217}
1218 1218
1219void __devexit ioat_dma_remove(struct ioatdma_device *device) 1219void ioat_dma_remove(struct ioatdma_device *device)
1220{ 1220{
1221 struct dma_device *dma = &device->common; 1221 struct dma_device *dma = &device->common;
1222 1222
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
index 5e8fe01ba69d..087935f1565f 100644
--- a/drivers/dma/ioat/dma.h
+++ b/drivers/dma/ioat/dma.h
@@ -303,13 +303,12 @@ static inline void ioat_unmap(struct pci_dev *pdev, dma_addr_t addr, size_t len,
303 pci_unmap_page(pdev, addr, len, direction); 303 pci_unmap_page(pdev, addr, len, direction);
304} 304}
305 305
306int __devinit ioat_probe(struct ioatdma_device *device); 306int ioat_probe(struct ioatdma_device *device);
307int __devinit ioat_register(struct ioatdma_device *device); 307int ioat_register(struct ioatdma_device *device);
308int __devinit ioat1_dma_probe(struct ioatdma_device *dev, int dca); 308int ioat1_dma_probe(struct ioatdma_device *dev, int dca);
309int __devinit ioat_dma_self_test(struct ioatdma_device *device); 309int ioat_dma_self_test(struct ioatdma_device *device);
310void __devexit ioat_dma_remove(struct ioatdma_device *device); 310void ioat_dma_remove(struct ioatdma_device *device);
311struct dca_provider * __devinit ioat_dca_init(struct pci_dev *pdev, 311struct dca_provider *ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase);
312 void __iomem *iobase);
313dma_addr_t ioat_get_current_completion(struct ioat_chan_common *chan); 312dma_addr_t ioat_get_current_completion(struct ioat_chan_common *chan);
314void ioat_init_channel(struct ioatdma_device *device, 313void ioat_init_channel(struct ioatdma_device *device,
315 struct ioat_chan_common *chan, int idx); 314 struct ioat_chan_common *chan, int idx);
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c
index b9d667851445..82d4e306c32e 100644
--- a/drivers/dma/ioat/dma_v2.c
+++ b/drivers/dma/ioat/dma_v2.c
@@ -862,7 +862,7 @@ struct kobj_type ioat2_ktype = {
862 .default_attrs = ioat2_attrs, 862 .default_attrs = ioat2_attrs,
863}; 863};
864 864
865int __devinit ioat2_dma_probe(struct ioatdma_device *device, int dca) 865int ioat2_dma_probe(struct ioatdma_device *device, int dca)
866{ 866{
867 struct pci_dev *pdev = device->pdev; 867 struct pci_dev *pdev = device->pdev;
868 struct dma_device *dma; 868 struct dma_device *dma;
diff --git a/drivers/dma/ioat/dma_v2.h b/drivers/dma/ioat/dma_v2.h
index be2a55b95c23..e100f644e344 100644
--- a/drivers/dma/ioat/dma_v2.h
+++ b/drivers/dma/ioat/dma_v2.h
@@ -155,10 +155,10 @@ static inline void ioat2_set_chainaddr(struct ioat2_dma_chan *ioat, u64 addr)
155 chan->reg_base + IOAT2_CHAINADDR_OFFSET_HIGH); 155 chan->reg_base + IOAT2_CHAINADDR_OFFSET_HIGH);
156} 156}
157 157
158int __devinit ioat2_dma_probe(struct ioatdma_device *dev, int dca); 158int ioat2_dma_probe(struct ioatdma_device *dev, int dca);
159int __devinit ioat3_dma_probe(struct ioatdma_device *dev, int dca); 159int ioat3_dma_probe(struct ioatdma_device *dev, int dca);
160struct dca_provider * __devinit ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase); 160struct dca_provider *ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase);
161struct dca_provider * __devinit ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase); 161struct dca_provider *ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase);
162int ioat2_check_space_lock(struct ioat2_dma_chan *ioat, int num_descs); 162int ioat2_check_space_lock(struct ioat2_dma_chan *ioat, int num_descs);
163int ioat2_enumerate_channels(struct ioatdma_device *device); 163int ioat2_enumerate_channels(struct ioatdma_device *device);
164struct dma_async_tx_descriptor * 164struct dma_async_tx_descriptor *
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index f7f1dc62c15c..e5fc944de1f0 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -836,7 +836,7 @@ ioat3_prep_interrupt_lock(struct dma_chan *c, unsigned long flags)
836 return &desc->txd; 836 return &desc->txd;
837} 837}
838 838
839static void __devinit ioat3_dma_test_callback(void *dma_async_param) 839static void ioat3_dma_test_callback(void *dma_async_param)
840{ 840{
841 struct completion *cmp = dma_async_param; 841 struct completion *cmp = dma_async_param;
842 842
@@ -844,7 +844,7 @@ static void __devinit ioat3_dma_test_callback(void *dma_async_param)
844} 844}
845 845
846#define IOAT_NUM_SRC_TEST 6 /* must be <= 8 */ 846#define IOAT_NUM_SRC_TEST 6 /* must be <= 8 */
847static int __devinit ioat_xor_val_self_test(struct ioatdma_device *device) 847static int ioat_xor_val_self_test(struct ioatdma_device *device)
848{ 848{
849 int i, src_idx; 849 int i, src_idx;
850 struct page *dest; 850 struct page *dest;
@@ -1096,7 +1096,7 @@ out:
1096 return err; 1096 return err;
1097} 1097}
1098 1098
1099static int __devinit ioat3_dma_self_test(struct ioatdma_device *device) 1099static int ioat3_dma_self_test(struct ioatdma_device *device)
1100{ 1100{
1101 int rc = ioat_dma_self_test(device); 1101 int rc = ioat_dma_self_test(device);
1102 1102
@@ -1187,7 +1187,7 @@ static bool is_snb_ioat(struct pci_dev *pdev)
1187 } 1187 }
1188} 1188}
1189 1189
1190int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) 1190int ioat3_dma_probe(struct ioatdma_device *device, int dca)
1191{ 1191{
1192 struct pci_dev *pdev = device->pdev; 1192 struct pci_dev *pdev = device->pdev;
1193 int dca_en = system_has_dca_enabled(pdev); 1193 int dca_en = system_has_dca_enabled(pdev);
diff --git a/drivers/dma/ioat/pci.c b/drivers/dma/ioat/pci.c
index bfa9a3536e09..4f686c527ab6 100644
--- a/drivers/dma/ioat/pci.c
+++ b/drivers/dma/ioat/pci.c
@@ -109,9 +109,8 @@ static struct pci_device_id ioat_pci_tbl[] = {
109}; 109};
110MODULE_DEVICE_TABLE(pci, ioat_pci_tbl); 110MODULE_DEVICE_TABLE(pci, ioat_pci_tbl);
111 111
112static int __devinit ioat_pci_probe(struct pci_dev *pdev, 112static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id);
113 const struct pci_device_id *id); 113static void ioat_remove(struct pci_dev *pdev);
114static void __devexit ioat_remove(struct pci_dev *pdev);
115 114
116static int ioat_dca_enabled = 1; 115static int ioat_dca_enabled = 1;
117module_param(ioat_dca_enabled, int, 0644); 116module_param(ioat_dca_enabled, int, 0644);
@@ -141,7 +140,7 @@ alloc_ioatdma(struct pci_dev *pdev, void __iomem *iobase)
141 return d; 140 return d;
142} 141}
143 142
144static int __devinit ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) 143static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
145{ 144{
146 void __iomem * const *iomap; 145 void __iomem * const *iomap;
147 struct device *dev = &pdev->dev; 146 struct device *dev = &pdev->dev;
@@ -195,7 +194,7 @@ static int __devinit ioat_pci_probe(struct pci_dev *pdev, const struct pci_devic
195 return 0; 194 return 0;
196} 195}
197 196
198static void __devexit ioat_remove(struct pci_dev *pdev) 197static void ioat_remove(struct pci_dev *pdev)
199{ 198{
200 struct ioatdma_device *device = pci_get_drvdata(pdev); 199 struct ioatdma_device *device = pci_get_drvdata(pdev);
201 200
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c
index 9072e173b860..eacb8be99812 100644
--- a/drivers/dma/iop-adma.c
+++ b/drivers/dma/iop-adma.c
@@ -1406,7 +1406,7 @@ out:
1406} 1406}
1407#endif 1407#endif
1408 1408
1409static int __devexit iop_adma_remove(struct platform_device *dev) 1409static int iop_adma_remove(struct platform_device *dev)
1410{ 1410{
1411 struct iop_adma_device *device = platform_get_drvdata(dev); 1411 struct iop_adma_device *device = platform_get_drvdata(dev);
1412 struct dma_chan *chan, *_chan; 1412 struct dma_chan *chan, *_chan;
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index 13bdf4a7e1ec..c6d98c00f05c 100644
--- a/drivers/dma/mmp_pdma.c
+++ b/drivers/dma/mmp_pdma.c
@@ -712,7 +712,7 @@ static void dma_do_tasklet(unsigned long data)
712 } 712 }
713} 713}
714 714
715static int __devexit mmp_pdma_remove(struct platform_device *op) 715static int mmp_pdma_remove(struct platform_device *op)
716{ 716{
717 struct mmp_pdma_device *pdev = platform_get_drvdata(op); 717 struct mmp_pdma_device *pdev = platform_get_drvdata(op);
718 718
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 323821c0c095..a9f1cd56689c 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -467,7 +467,7 @@ static void mmp_tdma_issue_pending(struct dma_chan *chan)
467 mmp_tdma_enable_chan(tdmac); 467 mmp_tdma_enable_chan(tdmac);
468} 468}
469 469
470static int __devexit mmp_tdma_remove(struct platform_device *pdev) 470static int mmp_tdma_remove(struct platform_device *pdev)
471{ 471{
472 struct mmp_tdma_device *tdev = platform_get_drvdata(pdev); 472 struct mmp_tdma_device *tdev = platform_get_drvdata(pdev);
473 473
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c
index 2cd024a91d40..2d956732aa3d 100644
--- a/drivers/dma/mpc512x_dma.c
+++ b/drivers/dma/mpc512x_dma.c
@@ -799,7 +799,7 @@ static int mpc_dma_probe(struct platform_device *op)
799 return retval; 799 return retval;
800} 800}
801 801
802static int __devexit mpc_dma_remove(struct platform_device *op) 802static int mpc_dma_remove(struct platform_device *op)
803{ 803{
804 struct device *dev = &op->dev; 804 struct device *dev = &op->dev;
805 struct mpc_dma *mdma = dev_get_drvdata(dev); 805 struct mpc_dma *mdma = dev_get_drvdata(dev);
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index ac71f555dd72..e17fad03cb80 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1361,13 +1361,16 @@ static int mv_xor_probe(struct platform_device *pdev)
1361err_channel_add: 1361err_channel_add:
1362 for (i = 0; i < MV_XOR_MAX_CHANNELS; i++) 1362 for (i = 0; i < MV_XOR_MAX_CHANNELS; i++)
1363 if (xordev->channels[i]) { 1363 if (xordev->channels[i]) {
1364 mv_xor_channel_remove(xordev->channels[i]);
1364 if (pdev->dev.of_node) 1365 if (pdev->dev.of_node)
1365 irq_dispose_mapping(xordev->channels[i]->irq); 1366 irq_dispose_mapping(xordev->channels[i]->irq);
1366 mv_xor_channel_remove(xordev->channels[i]);
1367 } 1367 }
1368 1368
1369 clk_disable_unprepare(xordev->clk); 1369 if (!IS_ERR(xordev->clk)) {
1370 clk_put(xordev->clk); 1370 clk_disable_unprepare(xordev->clk);
1371 clk_put(xordev->clk);
1372 }
1373
1371 return ret; 1374 return ret;
1372} 1375}
1373 1376
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index eca1c4ddf039..3f2617255ef2 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -961,7 +961,7 @@ err_free_mem:
961 return err; 961 return err;
962} 962}
963 963
964static void __devexit pch_dma_remove(struct pci_dev *pdev) 964static void pch_dma_remove(struct pci_dev *pdev)
965{ 965{
966 struct pch_dma *pd = pci_get_drvdata(pdev); 966 struct pch_dma *pd = pci_get_drvdata(pdev);
967 struct pch_dma_chan *pd_chan; 967 struct pch_dma_chan *pd_chan;
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 95555f37ea6d..80680eee0171 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2988,7 +2988,7 @@ probe_err1:
2988 return ret; 2988 return ret;
2989} 2989}
2990 2990
2991static int __devexit pl330_remove(struct amba_device *adev) 2991static int pl330_remove(struct amba_device *adev)
2992{ 2992{
2993 struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev); 2993 struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev);
2994 struct dma_pl330_chan *pch, *_p; 2994 struct dma_pl330_chan *pch, *_p;
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index b94afc339e7f..5d3d95569a1e 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -4592,7 +4592,7 @@ out:
4592/** 4592/**
4593 * ppc440spe_adma_remove - remove the asynch device 4593 * ppc440spe_adma_remove - remove the asynch device
4594 */ 4594 */
4595static int __devexit ppc440spe_adma_remove(struct platform_device *ofdev) 4595static int ppc440spe_adma_remove(struct platform_device *ofdev)
4596{ 4596{
4597 struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev); 4597 struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev);
4598 struct device_node *np = ofdev->dev.of_node; 4598 struct device_node *np = ofdev->dev.of_node;
@@ -4905,7 +4905,7 @@ out_free:
4905 return ret; 4905 return ret;
4906} 4906}
4907 4907
4908static const struct of_device_id ppc440spe_adma_of_match[] __devinitconst = { 4908static const struct of_device_id ppc440spe_adma_of_match[] = {
4909 { .compatible = "ibm,dma-440spe", }, 4909 { .compatible = "ibm,dma-440spe", },
4910 { .compatible = "amcc,xor-accelerator", }, 4910 { .compatible = "amcc,xor-accelerator", },
4911 {}, 4911 {},
diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c
index 2ad628df8223..461a91ab70bb 100644
--- a/drivers/dma/sa11x0-dma.c
+++ b/drivers/dma/sa11x0-dma.c
@@ -967,7 +967,7 @@ static int sa11x0_dma_probe(struct platform_device *pdev)
967 return ret; 967 return ret;
968} 968}
969 969
970static int __devexit sa11x0_dma_remove(struct platform_device *pdev) 970static int sa11x0_dma_remove(struct platform_device *pdev)
971{ 971{
972 struct sa11x0_dma_dev *d = platform_get_drvdata(pdev); 972 struct sa11x0_dma_dev *d = platform_get_drvdata(pdev);
973 unsigned pch; 973 unsigned pch;
diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
index 8201bb4e0cd7..3315e4be9b85 100644
--- a/drivers/dma/sh/shdma.c
+++ b/drivers/dma/sh/shdma.c
@@ -880,7 +880,7 @@ ermrdmars:
880 return err; 880 return err;
881} 881}
882 882
883static int __devexit sh_dmae_remove(struct platform_device *pdev) 883static int sh_dmae_remove(struct platform_device *pdev)
884{ 884{
885 struct sh_dmae_device *shdev = platform_get_drvdata(pdev); 885 struct sh_dmae_device *shdev = platform_get_drvdata(pdev);
886 struct dma_device *dma_dev = &shdev->shdma_dev.dma_dev; 886 struct dma_device *dma_dev = &shdev->shdma_dev.dma_dev;
diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c
index c3de6edb9651..94674a96c646 100644
--- a/drivers/dma/sirf-dma.c
+++ b/drivers/dma/sirf-dma.c
@@ -655,7 +655,7 @@ irq_dispose:
655 return ret; 655 return ret;
656} 656}
657 657
658static int __devexit sirfsoc_dma_remove(struct platform_device *op) 658static int sirfsoc_dma_remove(struct platform_device *op)
659{ 659{
660 struct device *dev = &op->dev; 660 struct device *dev = &op->dev;
661 struct sirfsoc_dma *sdma = dev_get_drvdata(dev); 661 struct sirfsoc_dma *sdma = dev_get_drvdata(dev);
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index efdfffa13349..c39e61bc8172 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1184,7 +1184,7 @@ static const struct tegra_dma_chip_data tegra30_dma_chip_data = {
1184 .max_dma_count = 1024UL * 64, 1184 .max_dma_count = 1024UL * 64,
1185}; 1185};
1186 1186
1187static const struct of_device_id tegra_dma_of_match[] __devinitconst = { 1187static const struct of_device_id tegra_dma_of_match[] = {
1188 { 1188 {
1189 .compatible = "nvidia,tegra30-apbdma", 1189 .compatible = "nvidia,tegra30-apbdma",
1190 .data = &tegra30_dma_chip_data, 1190 .data = &tegra30_dma_chip_data,
@@ -1360,7 +1360,7 @@ err_pm_disable:
1360 return ret; 1360 return ret;
1361} 1361}
1362 1362
1363static int __devexit tegra_dma_remove(struct platform_device *pdev) 1363static int tegra_dma_remove(struct platform_device *pdev)
1364{ 1364{
1365 struct tegra_dma *tdma = platform_get_drvdata(pdev); 1365 struct tegra_dma *tdma = platform_get_drvdata(pdev);
1366 int i; 1366 int i;
@@ -1403,7 +1403,7 @@ static int tegra_dma_runtime_resume(struct device *dev)
1403 return 0; 1403 return 0;
1404} 1404}
1405 1405
1406static const struct dev_pm_ops tegra_dma_dev_pm_ops __devinitconst = { 1406static const struct dev_pm_ops tegra_dma_dev_pm_ops = {
1407#ifdef CONFIG_PM_RUNTIME 1407#ifdef CONFIG_PM_RUNTIME
1408 .runtime_suspend = tegra_dma_runtime_suspend, 1408 .runtime_suspend = tegra_dma_runtime_suspend,
1409 .runtime_resume = tegra_dma_runtime_resume, 1409 .runtime_resume = tegra_dma_runtime_resume,
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 98cf51e1544c..952f823901a6 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -798,7 +798,7 @@ err_release_region:
798 798
799} 799}
800 800
801static int __devexit td_remove(struct platform_device *pdev) 801static int td_remove(struct platform_device *pdev)
802{ 802{
803 struct timb_dma *td = platform_get_drvdata(pdev); 803 struct timb_dma *td = platform_get_drvdata(pdev);
804 struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 804 struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index 4c6c876d9dc3..66719925970f 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -4,6 +4,9 @@
4# Licensed and distributed under the GPL 4# Licensed and distributed under the GPL
5# 5#
6 6
7config EDAC_SUPPORT
8 bool
9
7menuconfig EDAC 10menuconfig EDAC
8 bool "EDAC (Error Detection And Correction) reporting" 11 bool "EDAC (Error Detection And Correction) reporting"
9 depends on HAS_IOMEM 12 depends on HAS_IOMEM
@@ -27,13 +30,8 @@ menuconfig EDAC
27 There is also a mailing list for the EDAC project, which can 30 There is also a mailing list for the EDAC project, which can
28 be found via the sourceforge page. 31 be found via the sourceforge page.
29 32
30config EDAC_SUPPORT
31 bool
32
33if EDAC 33if EDAC
34 34
35comment "Reporting subsystems"
36
37config EDAC_LEGACY_SYSFS 35config EDAC_LEGACY_SYSFS
38 bool "EDAC legacy sysfs" 36 bool "EDAC legacy sysfs"
39 default y 37 default y
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index f74a684269ff..ad8bf2aa629d 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2563,8 +2563,8 @@ err_ret:
2563 return ret; 2563 return ret;
2564} 2564}
2565 2565
2566static int __devinit amd64_probe_one_instance(struct pci_dev *pdev, 2566static int amd64_probe_one_instance(struct pci_dev *pdev,
2567 const struct pci_device_id *mc_type) 2567 const struct pci_device_id *mc_type)
2568{ 2568{
2569 u8 nid = get_node_id(pdev); 2569 u8 nid = get_node_id(pdev);
2570 struct pci_dev *F3 = node_to_amd_nb(nid)->misc; 2570 struct pci_dev *F3 = node_to_amd_nb(nid)->misc;
@@ -2612,7 +2612,7 @@ err_out:
2612 return ret; 2612 return ret;
2613} 2613}
2614 2614
2615static void __devexit amd64_remove_one_instance(struct pci_dev *pdev) 2615static void amd64_remove_one_instance(struct pci_dev *pdev)
2616{ 2616{
2617 struct mem_ctl_info *mci; 2617 struct mem_ctl_info *mci;
2618 struct amd64_pvt *pvt; 2618 struct amd64_pvt *pvt;
@@ -2686,7 +2686,7 @@ MODULE_DEVICE_TABLE(pci, amd64_pci_table);
2686static struct pci_driver amd64_pci_driver = { 2686static struct pci_driver amd64_pci_driver = {
2687 .name = EDAC_MOD_STR, 2687 .name = EDAC_MOD_STR,
2688 .probe = amd64_probe_one_instance, 2688 .probe = amd64_probe_one_instance,
2689 .remove = __devexit_p(amd64_remove_one_instance), 2689 .remove = amd64_remove_one_instance,
2690 .id_table = amd64_pci_table, 2690 .id_table = amd64_pci_table,
2691}; 2691};
2692 2692
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
index 29eeb68a200c..96e3ee3460a5 100644
--- a/drivers/edac/amd76x_edac.c
+++ b/drivers/edac/amd76x_edac.c
@@ -301,8 +301,8 @@ fail:
301} 301}
302 302
303/* returns count (>= 0), or negative on error */ 303/* returns count (>= 0), or negative on error */
304static int __devinit amd76x_init_one(struct pci_dev *pdev, 304static int amd76x_init_one(struct pci_dev *pdev,
305 const struct pci_device_id *ent) 305 const struct pci_device_id *ent)
306{ 306{
307 edac_dbg(0, "\n"); 307 edac_dbg(0, "\n");
308 308
@@ -318,7 +318,7 @@ static int __devinit amd76x_init_one(struct pci_dev *pdev,
318 * structure for the device then delete the mci and free the 318 * structure for the device then delete the mci and free the
319 * resources. 319 * resources.
320 */ 320 */
321static void __devexit amd76x_remove_one(struct pci_dev *pdev) 321static void amd76x_remove_one(struct pci_dev *pdev)
322{ 322{
323 struct mem_ctl_info *mci; 323 struct mem_ctl_info *mci;
324 324
@@ -350,7 +350,7 @@ MODULE_DEVICE_TABLE(pci, amd76x_pci_tbl);
350static struct pci_driver amd76x_driver = { 350static struct pci_driver amd76x_driver = {
351 .name = EDAC_MOD_STR, 351 .name = EDAC_MOD_STR,
352 .probe = amd76x_init_one, 352 .probe = amd76x_init_one,
353 .remove = __devexit_p(amd76x_remove_one), 353 .remove = amd76x_remove_one,
354 .id_table = amd76x_pci_tbl, 354 .id_table = amd76x_pci_tbl,
355}; 355};
356 356
diff --git a/drivers/edac/cell_edac.c b/drivers/edac/cell_edac.c
index a1bbd8edd257..c2eaf334b90b 100644
--- a/drivers/edac/cell_edac.c
+++ b/drivers/edac/cell_edac.c
@@ -124,7 +124,7 @@ static void cell_edac_check(struct mem_ctl_info *mci)
124 } 124 }
125} 125}
126 126
127static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci) 127static void cell_edac_init_csrows(struct mem_ctl_info *mci)
128{ 128{
129 struct csrow_info *csrow = mci->csrows[0]; 129 struct csrow_info *csrow = mci->csrows[0];
130 struct dimm_info *dimm; 130 struct dimm_info *dimm;
@@ -164,7 +164,7 @@ static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci)
164 } 164 }
165} 165}
166 166
167static int __devinit cell_edac_probe(struct platform_device *pdev) 167static int cell_edac_probe(struct platform_device *pdev)
168{ 168{
169 struct cbe_mic_tm_regs __iomem *regs; 169 struct cbe_mic_tm_regs __iomem *regs;
170 struct mem_ctl_info *mci; 170 struct mem_ctl_info *mci;
@@ -233,7 +233,7 @@ static int __devinit cell_edac_probe(struct platform_device *pdev)
233 return 0; 233 return 0;
234} 234}
235 235
236static int __devexit cell_edac_remove(struct platform_device *pdev) 236static int cell_edac_remove(struct platform_device *pdev)
237{ 237{
238 struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev); 238 struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev);
239 if (mci) 239 if (mci)
@@ -247,7 +247,7 @@ static struct platform_driver cell_edac_driver = {
247 .owner = THIS_MODULE, 247 .owner = THIS_MODULE,
248 }, 248 },
249 .probe = cell_edac_probe, 249 .probe = cell_edac_probe,
250 .remove = __devexit_p(cell_edac_remove), 250 .remove = cell_edac_remove,
251}; 251};
252 252
253static int __init cell_edac_init(void) 253static int __init cell_edac_init(void)
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c
index c2ef13495873..7f3c57113ba1 100644
--- a/drivers/edac/cpc925_edac.c
+++ b/drivers/edac/cpc925_edac.c
@@ -932,7 +932,7 @@ static int cpc925_mc_get_channels(void __iomem *vbase)
932 return dual; 932 return dual;
933} 933}
934 934
935static int __devinit cpc925_probe(struct platform_device *pdev) 935static int cpc925_probe(struct platform_device *pdev)
936{ 936{
937 static int edac_mc_idx; 937 static int edac_mc_idx;
938 struct mem_ctl_info *mci; 938 struct mem_ctl_info *mci;
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index a5ed6b795fd4..644fec54681f 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -1390,8 +1390,7 @@ fail:
1390} 1390}
1391 1391
1392/* returns count (>= 0), or negative on error */ 1392/* returns count (>= 0), or negative on error */
1393static int __devinit e752x_init_one(struct pci_dev *pdev, 1393static int e752x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1394 const struct pci_device_id *ent)
1395{ 1394{
1396 edac_dbg(0, "\n"); 1395 edac_dbg(0, "\n");
1397 1396
@@ -1402,7 +1401,7 @@ static int __devinit e752x_init_one(struct pci_dev *pdev,
1402 return e752x_probe1(pdev, ent->driver_data); 1401 return e752x_probe1(pdev, ent->driver_data);
1403} 1402}
1404 1403
1405static void __devexit e752x_remove_one(struct pci_dev *pdev) 1404static void e752x_remove_one(struct pci_dev *pdev)
1406{ 1405{
1407 struct mem_ctl_info *mci; 1406 struct mem_ctl_info *mci;
1408 struct e752x_pvt *pvt; 1407 struct e752x_pvt *pvt;
@@ -1445,7 +1444,7 @@ MODULE_DEVICE_TABLE(pci, e752x_pci_tbl);
1445static struct pci_driver e752x_driver = { 1444static struct pci_driver e752x_driver = {
1446 .name = EDAC_MOD_STR, 1445 .name = EDAC_MOD_STR,
1447 .probe = e752x_init_one, 1446 .probe = e752x_init_one,
1448 .remove = __devexit_p(e752x_remove_one), 1447 .remove = e752x_remove_one,
1449 .id_table = e752x_pci_tbl, 1448 .id_table = e752x_pci_tbl,
1450}; 1449};
1451 1450
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index 9ff57f361a43..1c4056a50383 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -528,8 +528,7 @@ fail0:
528} 528}
529 529
530/* returns count (>= 0), or negative on error */ 530/* returns count (>= 0), or negative on error */
531static int __devinit e7xxx_init_one(struct pci_dev *pdev, 531static int e7xxx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
532 const struct pci_device_id *ent)
533{ 532{
534 edac_dbg(0, "\n"); 533 edac_dbg(0, "\n");
535 534
@@ -538,7 +537,7 @@ static int __devinit e7xxx_init_one(struct pci_dev *pdev,
538 -EIO : e7xxx_probe1(pdev, ent->driver_data); 537 -EIO : e7xxx_probe1(pdev, ent->driver_data);
539} 538}
540 539
541static void __devexit e7xxx_remove_one(struct pci_dev *pdev) 540static void e7xxx_remove_one(struct pci_dev *pdev)
542{ 541{
543 struct mem_ctl_info *mci; 542 struct mem_ctl_info *mci;
544 struct e7xxx_pvt *pvt; 543 struct e7xxx_pvt *pvt;
@@ -579,7 +578,7 @@ MODULE_DEVICE_TABLE(pci, e7xxx_pci_tbl);
579static struct pci_driver e7xxx_driver = { 578static struct pci_driver e7xxx_driver = {
580 .name = EDAC_MOD_STR, 579 .name = EDAC_MOD_STR,
581 .probe = e7xxx_init_one, 580 .probe = e7xxx_init_one,
582 .remove = __devexit_p(e7xxx_remove_one), 581 .remove = e7xxx_remove_one,
583 .id_table = e7xxx_pci_tbl, 582 .id_table = e7xxx_pci_tbl,
584}; 583};
585 584
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index de2df92f9c77..0ca1ca71157f 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -472,8 +472,7 @@ static void edac_delete_csrow_objects(struct mem_ctl_info *mci)
472 device_remove_file(&csrow->dev, 472 device_remove_file(&csrow->dev,
473 dynamic_csrow_ce_count_attr[chan]); 473 dynamic_csrow_ce_count_attr[chan]);
474 } 474 }
475 put_device(&mci->csrows[i]->dev); 475 device_unregister(&mci->csrows[i]->dev);
476 device_del(&mci->csrows[i]->dev);
477 } 476 }
478} 477}
479#endif 478#endif
@@ -1055,11 +1054,9 @@ fail:
1055 struct dimm_info *dimm = mci->dimms[i]; 1054 struct dimm_info *dimm = mci->dimms[i];
1056 if (dimm->nr_pages == 0) 1055 if (dimm->nr_pages == 0)
1057 continue; 1056 continue;
1058 put_device(&dimm->dev); 1057 device_unregister(&dimm->dev);
1059 device_del(&dimm->dev);
1060 } 1058 }
1061 put_device(&mci->dev); 1059 device_unregister(&mci->dev);
1062 device_del(&mci->dev);
1063 bus_unregister(&mci->bus); 1060 bus_unregister(&mci->bus);
1064 kfree(mci->bus.name); 1061 kfree(mci->bus.name);
1065 return err; 1062 return err;
@@ -1086,16 +1083,14 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
1086 if (dimm->nr_pages == 0) 1083 if (dimm->nr_pages == 0)
1087 continue; 1084 continue;
1088 edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev)); 1085 edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev));
1089 put_device(&dimm->dev); 1086 device_unregister(&dimm->dev);
1090 device_del(&dimm->dev);
1091 } 1087 }
1092} 1088}
1093 1089
1094void edac_unregister_sysfs(struct mem_ctl_info *mci) 1090void edac_unregister_sysfs(struct mem_ctl_info *mci)
1095{ 1091{
1096 edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev)); 1092 edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev));
1097 put_device(&mci->dev); 1093 device_unregister(&mci->dev);
1098 device_del(&mci->dev);
1099 bus_unregister(&mci->bus); 1094 bus_unregister(&mci->bus);
1100 kfree(mci->bus.name); 1095 kfree(mci->bus.name);
1101} 1096}
@@ -1159,8 +1154,6 @@ int __init edac_mc_sysfs_init(void)
1159 1154
1160void __exit edac_mc_sysfs_exit(void) 1155void __exit edac_mc_sysfs_exit(void)
1161{ 1156{
1162 put_device(mci_pdev); 1157 device_unregister(mci_pdev);
1163 device_del(mci_pdev);
1164 edac_put_sysfs_subsys(); 1158 edac_put_sysfs_subsys();
1165 kfree(mci_pdev);
1166} 1159}
diff --git a/drivers/edac/highbank_l2_edac.c b/drivers/edac/highbank_l2_edac.c
index e599b00c05a8..c2bd8c6a4349 100644
--- a/drivers/edac/highbank_l2_edac.c
+++ b/drivers/edac/highbank_l2_edac.c
@@ -50,7 +50,7 @@ static irqreturn_t highbank_l2_err_handler(int irq, void *dev_id)
50 return IRQ_HANDLED; 50 return IRQ_HANDLED;
51} 51}
52 52
53static int __devinit highbank_l2_err_probe(struct platform_device *pdev) 53static int highbank_l2_err_probe(struct platform_device *pdev)
54{ 54{
55 struct edac_device_ctl_info *dci; 55 struct edac_device_ctl_info *dci;
56 struct hb_l2_drvdata *drvdata; 56 struct hb_l2_drvdata *drvdata;
diff --git a/drivers/edac/highbank_mc_edac.c b/drivers/edac/highbank_mc_edac.c
index 7ea4cc2e8bd2..4695dd2d71fd 100644
--- a/drivers/edac/highbank_mc_edac.c
+++ b/drivers/edac/highbank_mc_edac.c
@@ -119,7 +119,7 @@ static const struct file_operations highbank_mc_debug_inject_fops = {
119 .llseek = generic_file_llseek, 119 .llseek = generic_file_llseek,
120}; 120};
121 121
122static void __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci) 122static void highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci)
123{ 123{
124 if (mci->debugfs) 124 if (mci->debugfs)
125 debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs, mci, 125 debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs, mci,
@@ -127,11 +127,11 @@ static void __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci)
127; 127;
128} 128}
129#else 129#else
130static void __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci) 130static void highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci)
131{} 131{}
132#endif 132#endif
133 133
134static int __devinit highbank_mc_probe(struct platform_device *pdev) 134static int highbank_mc_probe(struct platform_device *pdev)
135{ 135{
136 struct edac_mc_layer layers[2]; 136 struct edac_mc_layer layers[2];
137 struct mem_ctl_info *mci; 137 struct mem_ctl_info *mci;
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c
index d3d19cc4e9a1..694efcbf19c0 100644
--- a/drivers/edac/i3000_edac.c
+++ b/drivers/edac/i3000_edac.c
@@ -455,8 +455,7 @@ fail:
455} 455}
456 456
457/* returns count (>= 0), or negative on error */ 457/* returns count (>= 0), or negative on error */
458static int __devinit i3000_init_one(struct pci_dev *pdev, 458static int i3000_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
459 const struct pci_device_id *ent)
460{ 459{
461 int rc; 460 int rc;
462 461
@@ -472,7 +471,7 @@ static int __devinit i3000_init_one(struct pci_dev *pdev,
472 return rc; 471 return rc;
473} 472}
474 473
475static void __devexit i3000_remove_one(struct pci_dev *pdev) 474static void i3000_remove_one(struct pci_dev *pdev)
476{ 475{
477 struct mem_ctl_info *mci; 476 struct mem_ctl_info *mci;
478 477
@@ -502,7 +501,7 @@ MODULE_DEVICE_TABLE(pci, i3000_pci_tbl);
502static struct pci_driver i3000_driver = { 501static struct pci_driver i3000_driver = {
503 .name = EDAC_MOD_STR, 502 .name = EDAC_MOD_STR,
504 .probe = i3000_init_one, 503 .probe = i3000_init_one,
505 .remove = __devexit_p(i3000_remove_one), 504 .remove = i3000_remove_one,
506 .id_table = i3000_pci_tbl, 505 .id_table = i3000_pci_tbl,
507}; 506};
508 507
diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
index b6653a6fc5d5..4e8337602e78 100644
--- a/drivers/edac/i3200_edac.c
+++ b/drivers/edac/i3200_edac.c
@@ -419,8 +419,7 @@ fail:
419 return rc; 419 return rc;
420} 420}
421 421
422static int __devinit i3200_init_one(struct pci_dev *pdev, 422static int i3200_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
423 const struct pci_device_id *ent)
424{ 423{
425 int rc; 424 int rc;
426 425
@@ -436,7 +435,7 @@ static int __devinit i3200_init_one(struct pci_dev *pdev,
436 return rc; 435 return rc;
437} 436}
438 437
439static void __devexit i3200_remove_one(struct pci_dev *pdev) 438static void i3200_remove_one(struct pci_dev *pdev)
440{ 439{
441 struct mem_ctl_info *mci; 440 struct mem_ctl_info *mci;
442 struct i3200_priv *priv; 441 struct i3200_priv *priv;
@@ -467,7 +466,7 @@ MODULE_DEVICE_TABLE(pci, i3200_pci_tbl);
467static struct pci_driver i3200_driver = { 466static struct pci_driver i3200_driver = {
468 .name = EDAC_MOD_STR, 467 .name = EDAC_MOD_STR,
469 .probe = i3200_init_one, 468 .probe = i3200_init_one,
470 .remove = __devexit_p(i3200_remove_one), 469 .remove = i3200_remove_one,
471 .id_table = i3200_pci_tbl, 470 .id_table = i3200_pci_tbl,
472}; 471};
473 472
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index 6a49dd00b81b..63b2194e8c20 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -1489,8 +1489,7 @@ fail0:
1489 * negative on error 1489 * negative on error
1490 * count (>= 0) 1490 * count (>= 0)
1491 */ 1491 */
1492static int __devinit i5000_init_one(struct pci_dev *pdev, 1492static int i5000_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1493 const struct pci_device_id *id)
1494{ 1493{
1495 int rc; 1494 int rc;
1496 1495
@@ -1509,7 +1508,7 @@ static int __devinit i5000_init_one(struct pci_dev *pdev,
1509 * i5000_remove_one destructor for one instance of device 1508 * i5000_remove_one destructor for one instance of device
1510 * 1509 *
1511 */ 1510 */
1512static void __devexit i5000_remove_one(struct pci_dev *pdev) 1511static void i5000_remove_one(struct pci_dev *pdev)
1513{ 1512{
1514 struct mem_ctl_info *mci; 1513 struct mem_ctl_info *mci;
1515 1514
@@ -1547,7 +1546,7 @@ MODULE_DEVICE_TABLE(pci, i5000_pci_tbl);
1547static struct pci_driver i5000_driver = { 1546static struct pci_driver i5000_driver = {
1548 .name = KBUILD_BASENAME, 1547 .name = KBUILD_BASENAME,
1549 .probe = i5000_init_one, 1548 .probe = i5000_init_one,
1550 .remove = __devexit_p(i5000_remove_one), 1549 .remove = i5000_remove_one,
1551 .id_table = i5000_pci_tbl, 1550 .id_table = i5000_pci_tbl,
1552}; 1551};
1553 1552
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c
index c4b5e5f868e8..d6955b2cc99f 100644
--- a/drivers/edac/i5100_edac.c
+++ b/drivers/edac/i5100_edac.c
@@ -638,8 +638,7 @@ static struct pci_dev *pci_get_device_func(unsigned vendor,
638 return ret; 638 return ret;
639} 639}
640 640
641static unsigned long __devinit i5100_npages(struct mem_ctl_info *mci, 641static unsigned long i5100_npages(struct mem_ctl_info *mci, int csrow)
642 int csrow)
643{ 642{
644 struct i5100_priv *priv = mci->pvt_info; 643 struct i5100_priv *priv = mci->pvt_info;
645 const unsigned chan_rank = i5100_csrow_to_rank(mci, csrow); 644 const unsigned chan_rank = i5100_csrow_to_rank(mci, csrow);
@@ -660,7 +659,7 @@ static unsigned long __devinit i5100_npages(struct mem_ctl_info *mci,
660 ((unsigned long long) (1ULL << addr_lines) / PAGE_SIZE); 659 ((unsigned long long) (1ULL << addr_lines) / PAGE_SIZE);
661} 660}
662 661
663static void __devinit i5100_init_mtr(struct mem_ctl_info *mci) 662static void i5100_init_mtr(struct mem_ctl_info *mci)
664{ 663{
665 struct i5100_priv *priv = mci->pvt_info; 664 struct i5100_priv *priv = mci->pvt_info;
666 struct pci_dev *mms[2] = { priv->ch0mm, priv->ch1mm }; 665 struct pci_dev *mms[2] = { priv->ch0mm, priv->ch1mm };
@@ -732,7 +731,7 @@ static int i5100_read_spd_byte(const struct mem_ctl_info *mci,
732 * o not the only way to may chip selects to dimm slots 731 * o not the only way to may chip selects to dimm slots
733 * o investigate if there is some way to obtain this map from the bios 732 * o investigate if there is some way to obtain this map from the bios
734 */ 733 */
735static void __devinit i5100_init_dimm_csmap(struct mem_ctl_info *mci) 734static void i5100_init_dimm_csmap(struct mem_ctl_info *mci)
736{ 735{
737 struct i5100_priv *priv = mci->pvt_info; 736 struct i5100_priv *priv = mci->pvt_info;
738 int i; 737 int i;
@@ -762,8 +761,8 @@ static void __devinit i5100_init_dimm_csmap(struct mem_ctl_info *mci)
762 } 761 }
763} 762}
764 763
765static void __devinit i5100_init_dimm_layout(struct pci_dev *pdev, 764static void i5100_init_dimm_layout(struct pci_dev *pdev,
766 struct mem_ctl_info *mci) 765 struct mem_ctl_info *mci)
767{ 766{
768 struct i5100_priv *priv = mci->pvt_info; 767 struct i5100_priv *priv = mci->pvt_info;
769 int i; 768 int i;
@@ -784,8 +783,8 @@ static void __devinit i5100_init_dimm_layout(struct pci_dev *pdev,
784 i5100_init_dimm_csmap(mci); 783 i5100_init_dimm_csmap(mci);
785} 784}
786 785
787static void __devinit i5100_init_interleaving(struct pci_dev *pdev, 786static void i5100_init_interleaving(struct pci_dev *pdev,
788 struct mem_ctl_info *mci) 787 struct mem_ctl_info *mci)
789{ 788{
790 u16 w; 789 u16 w;
791 u32 dw; 790 u32 dw;
@@ -830,7 +829,7 @@ static void __devinit i5100_init_interleaving(struct pci_dev *pdev,
830 i5100_init_mtr(mci); 829 i5100_init_mtr(mci);
831} 830}
832 831
833static void __devinit i5100_init_csrows(struct mem_ctl_info *mci) 832static void i5100_init_csrows(struct mem_ctl_info *mci)
834{ 833{
835 int i; 834 int i;
836 struct i5100_priv *priv = mci->pvt_info; 835 struct i5100_priv *priv = mci->pvt_info;
@@ -864,8 +863,7 @@ static void __devinit i5100_init_csrows(struct mem_ctl_info *mci)
864 } 863 }
865} 864}
866 865
867static int __devinit i5100_init_one(struct pci_dev *pdev, 866static int i5100_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
868 const struct pci_device_id *id)
869{ 867{
870 int rc; 868 int rc;
871 struct mem_ctl_info *mci; 869 struct mem_ctl_info *mci;
@@ -1020,7 +1018,7 @@ bail:
1020 return ret; 1018 return ret;
1021} 1019}
1022 1020
1023static void __devexit i5100_remove_one(struct pci_dev *pdev) 1021static void i5100_remove_one(struct pci_dev *pdev)
1024{ 1022{
1025 struct mem_ctl_info *mci; 1023 struct mem_ctl_info *mci;
1026 struct i5100_priv *priv; 1024 struct i5100_priv *priv;
@@ -1054,7 +1052,7 @@ MODULE_DEVICE_TABLE(pci, i5100_pci_tbl);
1054static struct pci_driver i5100_driver = { 1052static struct pci_driver i5100_driver = {
1055 .name = KBUILD_BASENAME, 1053 .name = KBUILD_BASENAME,
1056 .probe = i5100_init_one, 1054 .probe = i5100_init_one,
1057 .remove = __devexit_p(i5100_remove_one), 1055 .remove = i5100_remove_one,
1058 .id_table = i5100_pci_tbl, 1056 .id_table = i5100_pci_tbl,
1059}; 1057};
1060 1058
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
index 277246998b80..0a05bbceb08f 100644
--- a/drivers/edac/i5400_edac.c
+++ b/drivers/edac/i5400_edac.c
@@ -1373,8 +1373,7 @@ fail0:
1373 * negative on error 1373 * negative on error
1374 * count (>= 0) 1374 * count (>= 0)
1375 */ 1375 */
1376static int __devinit i5400_init_one(struct pci_dev *pdev, 1376static int i5400_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1377 const struct pci_device_id *id)
1378{ 1377{
1379 int rc; 1378 int rc;
1380 1379
@@ -1393,7 +1392,7 @@ static int __devinit i5400_init_one(struct pci_dev *pdev,
1393 * i5400_remove_one destructor for one instance of device 1392 * i5400_remove_one destructor for one instance of device
1394 * 1393 *
1395 */ 1394 */
1396static void __devexit i5400_remove_one(struct pci_dev *pdev) 1395static void i5400_remove_one(struct pci_dev *pdev)
1397{ 1396{
1398 struct mem_ctl_info *mci; 1397 struct mem_ctl_info *mci;
1399 1398
@@ -1431,7 +1430,7 @@ MODULE_DEVICE_TABLE(pci, i5400_pci_tbl);
1431static struct pci_driver i5400_driver = { 1430static struct pci_driver i5400_driver = {
1432 .name = "i5400_edac", 1431 .name = "i5400_edac",
1433 .probe = i5400_init_one, 1432 .probe = i5400_init_one,
1434 .remove = __devexit_p(i5400_remove_one), 1433 .remove = i5400_remove_one,
1435 .id_table = i5400_pci_tbl, 1434 .id_table = i5400_pci_tbl,
1436}; 1435};
1437 1436
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c
index 9d669cd43618..087c27bc5d42 100644
--- a/drivers/edac/i7300_edac.c
+++ b/drivers/edac/i7300_edac.c
@@ -923,7 +923,7 @@ static void i7300_put_devices(struct mem_ctl_info *mci)
923 * Device 21 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB0 923 * Device 21 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB0
924 * Device 22 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB1 924 * Device 22 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB1
925 */ 925 */
926static int __devinit i7300_get_devices(struct mem_ctl_info *mci) 926static int i7300_get_devices(struct mem_ctl_info *mci)
927{ 927{
928 struct i7300_pvt *pvt; 928 struct i7300_pvt *pvt;
929 struct pci_dev *pdev; 929 struct pci_dev *pdev;
@@ -1008,8 +1008,7 @@ error:
1008 * @pdev: struct pci_dev pointer 1008 * @pdev: struct pci_dev pointer
1009 * @id: struct pci_device_id pointer - currently unused 1009 * @id: struct pci_device_id pointer - currently unused
1010 */ 1010 */
1011static int __devinit i7300_init_one(struct pci_dev *pdev, 1011static int i7300_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1012 const struct pci_device_id *id)
1013{ 1012{
1014 struct mem_ctl_info *mci; 1013 struct mem_ctl_info *mci;
1015 struct edac_mc_layer layers[3]; 1014 struct edac_mc_layer layers[3];
@@ -1122,7 +1121,7 @@ fail0:
1122 * i7300_remove_one() - Remove the driver 1121 * i7300_remove_one() - Remove the driver
1123 * @pdev: struct pci_dev pointer 1122 * @pdev: struct pci_dev pointer
1124 */ 1123 */
1125static void __devexit i7300_remove_one(struct pci_dev *pdev) 1124static void i7300_remove_one(struct pci_dev *pdev)
1126{ 1125{
1127 struct mem_ctl_info *mci; 1126 struct mem_ctl_info *mci;
1128 char *tmp; 1127 char *tmp;
@@ -1163,7 +1162,7 @@ MODULE_DEVICE_TABLE(pci, i7300_pci_tbl);
1163static struct pci_driver i7300_driver = { 1162static struct pci_driver i7300_driver = {
1164 .name = "i7300_edac", 1163 .name = "i7300_edac",
1165 .probe = i7300_init_one, 1164 .probe = i7300_init_one,
1166 .remove = __devexit_p(i7300_remove_one), 1165 .remove = i7300_remove_one,
1167 .id_table = i7300_pci_tbl, 1166 .id_table = i7300_pci_tbl,
1168}; 1167};
1169 1168
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 10c8c00d6469..e213d030b0dd 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -2305,8 +2305,7 @@ fail0:
2305 * < 0 for error code 2305 * < 0 for error code
2306 */ 2306 */
2307 2307
2308static int __devinit i7core_probe(struct pci_dev *pdev, 2308static int i7core_probe(struct pci_dev *pdev, const struct pci_device_id *id)
2309 const struct pci_device_id *id)
2310{ 2309{
2311 int rc, count = 0; 2310 int rc, count = 0;
2312 struct i7core_dev *i7core_dev; 2311 struct i7core_dev *i7core_dev;
@@ -2368,7 +2367,7 @@ fail0:
2368 * i7core_remove destructor for one instance of device 2367 * i7core_remove destructor for one instance of device
2369 * 2368 *
2370 */ 2369 */
2371static void __devexit i7core_remove(struct pci_dev *pdev) 2370static void i7core_remove(struct pci_dev *pdev)
2372{ 2371{
2373 struct i7core_dev *i7core_dev; 2372 struct i7core_dev *i7core_dev;
2374 2373
@@ -2409,7 +2408,7 @@ MODULE_DEVICE_TABLE(pci, i7core_pci_tbl);
2409static struct pci_driver i7core_driver = { 2408static struct pci_driver i7core_driver = {
2410 .name = "i7core_edac", 2409 .name = "i7core_edac",
2411 .probe = i7core_probe, 2410 .probe = i7core_probe,
2412 .remove = __devexit_p(i7core_remove), 2411 .remove = i7core_remove,
2413 .id_table = i7core_pci_tbl, 2412 .id_table = i7core_pci_tbl,
2414}; 2413};
2415 2414
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c
index 90f303db5d1d..57fdb77903ba 100644
--- a/drivers/edac/i82443bxgx_edac.c
+++ b/drivers/edac/i82443bxgx_edac.c
@@ -353,8 +353,8 @@ fail:
353EXPORT_SYMBOL_GPL(i82443bxgx_edacmc_probe1); 353EXPORT_SYMBOL_GPL(i82443bxgx_edacmc_probe1);
354 354
355/* returns count (>= 0), or negative on error */ 355/* returns count (>= 0), or negative on error */
356static int __devinit i82443bxgx_edacmc_init_one(struct pci_dev *pdev, 356static int i82443bxgx_edacmc_init_one(struct pci_dev *pdev,
357 const struct pci_device_id *ent) 357 const struct pci_device_id *ent)
358{ 358{
359 int rc; 359 int rc;
360 360
@@ -369,7 +369,7 @@ static int __devinit i82443bxgx_edacmc_init_one(struct pci_dev *pdev,
369 return rc; 369 return rc;
370} 370}
371 371
372static void __devexit i82443bxgx_edacmc_remove_one(struct pci_dev *pdev) 372static void i82443bxgx_edacmc_remove_one(struct pci_dev *pdev)
373{ 373{
374 struct mem_ctl_info *mci; 374 struct mem_ctl_info *mci;
375 375
@@ -399,7 +399,7 @@ MODULE_DEVICE_TABLE(pci, i82443bxgx_pci_tbl);
399static struct pci_driver i82443bxgx_edacmc_driver = { 399static struct pci_driver i82443bxgx_edacmc_driver = {
400 .name = EDAC_MOD_STR, 400 .name = EDAC_MOD_STR,
401 .probe = i82443bxgx_edacmc_init_one, 401 .probe = i82443bxgx_edacmc_init_one,
402 .remove = __devexit_p(i82443bxgx_edacmc_remove_one), 402 .remove = i82443bxgx_edacmc_remove_one,
403 .id_table = i82443bxgx_pci_tbl, 403 .id_table = i82443bxgx_pci_tbl,
404}; 404};
405 405
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c
index 1faa74971513..3e3e431c8301 100644
--- a/drivers/edac/i82860_edac.c
+++ b/drivers/edac/i82860_edac.c
@@ -254,8 +254,8 @@ fail:
254} 254}
255 255
256/* returns count (>= 0), or negative on error */ 256/* returns count (>= 0), or negative on error */
257static int __devinit i82860_init_one(struct pci_dev *pdev, 257static int i82860_init_one(struct pci_dev *pdev,
258 const struct pci_device_id *ent) 258 const struct pci_device_id *ent)
259{ 259{
260 int rc; 260 int rc;
261 261
@@ -273,7 +273,7 @@ static int __devinit i82860_init_one(struct pci_dev *pdev,
273 return rc; 273 return rc;
274} 274}
275 275
276static void __devexit i82860_remove_one(struct pci_dev *pdev) 276static void i82860_remove_one(struct pci_dev *pdev)
277{ 277{
278 struct mem_ctl_info *mci; 278 struct mem_ctl_info *mci;
279 279
@@ -302,7 +302,7 @@ MODULE_DEVICE_TABLE(pci, i82860_pci_tbl);
302static struct pci_driver i82860_driver = { 302static struct pci_driver i82860_driver = {
303 .name = EDAC_MOD_STR, 303 .name = EDAC_MOD_STR,
304 .probe = i82860_init_one, 304 .probe = i82860_init_one,
305 .remove = __devexit_p(i82860_remove_one), 305 .remove = i82860_remove_one,
306 .id_table = i82860_pci_tbl, 306 .id_table = i82860_pci_tbl,
307}; 307};
308 308
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index 3e416b1a6b53..2f8535fc451e 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -479,8 +479,8 @@ fail0:
479} 479}
480 480
481/* returns count (>= 0), or negative on error */ 481/* returns count (>= 0), or negative on error */
482static int __devinit i82875p_init_one(struct pci_dev *pdev, 482static int i82875p_init_one(struct pci_dev *pdev,
483 const struct pci_device_id *ent) 483 const struct pci_device_id *ent)
484{ 484{
485 int rc; 485 int rc;
486 486
@@ -498,7 +498,7 @@ static int __devinit i82875p_init_one(struct pci_dev *pdev,
498 return rc; 498 return rc;
499} 499}
500 500
501static void __devexit i82875p_remove_one(struct pci_dev *pdev) 501static void i82875p_remove_one(struct pci_dev *pdev)
502{ 502{
503 struct mem_ctl_info *mci; 503 struct mem_ctl_info *mci;
504 struct i82875p_pvt *pvt = NULL; 504 struct i82875p_pvt *pvt = NULL;
@@ -541,7 +541,7 @@ MODULE_DEVICE_TABLE(pci, i82875p_pci_tbl);
541static struct pci_driver i82875p_driver = { 541static struct pci_driver i82875p_driver = {
542 .name = EDAC_MOD_STR, 542 .name = EDAC_MOD_STR,
543 .probe = i82875p_init_one, 543 .probe = i82875p_init_one,
544 .remove = __devexit_p(i82875p_remove_one), 544 .remove = i82875p_remove_one,
545 .id_table = i82875p_pci_tbl, 545 .id_table = i82875p_pci_tbl,
546}; 546};
547 547
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
index a98020409fa9..0c8d4b0eaa32 100644
--- a/drivers/edac/i82975x_edac.c
+++ b/drivers/edac/i82975x_edac.c
@@ -592,8 +592,8 @@ fail0:
592} 592}
593 593
594/* returns count (>= 0), or negative on error */ 594/* returns count (>= 0), or negative on error */
595static int __devinit i82975x_init_one(struct pci_dev *pdev, 595static int i82975x_init_one(struct pci_dev *pdev,
596 const struct pci_device_id *ent) 596 const struct pci_device_id *ent)
597{ 597{
598 int rc; 598 int rc;
599 599
@@ -610,7 +610,7 @@ static int __devinit i82975x_init_one(struct pci_dev *pdev,
610 return rc; 610 return rc;
611} 611}
612 612
613static void __devexit i82975x_remove_one(struct pci_dev *pdev) 613static void i82975x_remove_one(struct pci_dev *pdev)
614{ 614{
615 struct mem_ctl_info *mci; 615 struct mem_ctl_info *mci;
616 struct i82975x_pvt *pvt; 616 struct i82975x_pvt *pvt;
@@ -643,7 +643,7 @@ MODULE_DEVICE_TABLE(pci, i82975x_pci_tbl);
643static struct pci_driver i82975x_driver = { 643static struct pci_driver i82975x_driver = {
644 .name = EDAC_MOD_STR, 644 .name = EDAC_MOD_STR,
645 .probe = i82975x_init_one, 645 .probe = i82975x_init_one,
646 .remove = __devexit_p(i82975x_remove_one), 646 .remove = i82975x_remove_one,
647 .id_table = i82975x_pci_tbl, 647 .id_table = i82975x_pci_tbl,
648}; 648};
649 649
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 4fe66fa183ec..42a840d530a5 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -212,7 +212,7 @@ static irqreturn_t mpc85xx_pci_isr(int irq, void *dev_id)
212 return IRQ_HANDLED; 212 return IRQ_HANDLED;
213} 213}
214 214
215int __devinit mpc85xx_pci_err_probe(struct platform_device *op) 215int mpc85xx_pci_err_probe(struct platform_device *op)
216{ 216{
217 struct edac_pci_ctl_info *pci; 217 struct edac_pci_ctl_info *pci;
218 struct mpc85xx_pci_pdata *pdata; 218 struct mpc85xx_pci_pdata *pdata;
@@ -504,7 +504,7 @@ static irqreturn_t mpc85xx_l2_isr(int irq, void *dev_id)
504 return IRQ_HANDLED; 504 return IRQ_HANDLED;
505} 505}
506 506
507static int __devinit mpc85xx_l2_err_probe(struct platform_device *op) 507static int mpc85xx_l2_err_probe(struct platform_device *op)
508{ 508{
509 struct edac_device_ctl_info *edac_dev; 509 struct edac_device_ctl_info *edac_dev;
510 struct mpc85xx_l2_pdata *pdata; 510 struct mpc85xx_l2_pdata *pdata;
@@ -885,7 +885,7 @@ static irqreturn_t mpc85xx_mc_isr(int irq, void *dev_id)
885 return IRQ_HANDLED; 885 return IRQ_HANDLED;
886} 886}
887 887
888static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci) 888static void mpc85xx_init_csrows(struct mem_ctl_info *mci)
889{ 889{
890 struct mpc85xx_mc_pdata *pdata = mci->pvt_info; 890 struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
891 struct csrow_info *csrow; 891 struct csrow_info *csrow;
@@ -964,7 +964,7 @@ static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci)
964 } 964 }
965} 965}
966 966
967static int __devinit mpc85xx_mc_err_probe(struct platform_device *op) 967static int mpc85xx_mc_err_probe(struct platform_device *op)
968{ 968{
969 struct mem_ctl_info *mci; 969 struct mem_ctl_info *mci;
970 struct edac_mc_layer layers[2]; 970 struct edac_mc_layer layers[2];
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c
index 2b315c2edc3c..542fad70e360 100644
--- a/drivers/edac/mv64x60_edac.c
+++ b/drivers/edac/mv64x60_edac.c
@@ -100,7 +100,7 @@ static int __init mv64x60_pci_fixup(struct platform_device *pdev)
100 return 0; 100 return 0;
101} 101}
102 102
103static int __devinit mv64x60_pci_err_probe(struct platform_device *pdev) 103static int mv64x60_pci_err_probe(struct platform_device *pdev)
104{ 104{
105 struct edac_pci_ctl_info *pci; 105 struct edac_pci_ctl_info *pci;
106 struct mv64x60_pci_pdata *pdata; 106 struct mv64x60_pci_pdata *pdata;
@@ -221,7 +221,7 @@ static int mv64x60_pci_err_remove(struct platform_device *pdev)
221 221
222static struct platform_driver mv64x60_pci_err_driver = { 222static struct platform_driver mv64x60_pci_err_driver = {
223 .probe = mv64x60_pci_err_probe, 223 .probe = mv64x60_pci_err_probe,
224 .remove = __devexit_p(mv64x60_pci_err_remove), 224 .remove = mv64x60_pci_err_remove,
225 .driver = { 225 .driver = {
226 .name = "mv64x60_pci_err", 226 .name = "mv64x60_pci_err",
227 } 227 }
@@ -271,7 +271,7 @@ static irqreturn_t mv64x60_sram_isr(int irq, void *dev_id)
271 return IRQ_HANDLED; 271 return IRQ_HANDLED;
272} 272}
273 273
274static int __devinit mv64x60_sram_err_probe(struct platform_device *pdev) 274static int mv64x60_sram_err_probe(struct platform_device *pdev)
275{ 275{
276 struct edac_device_ctl_info *edac_dev; 276 struct edac_device_ctl_info *edac_dev;
277 struct mv64x60_sram_pdata *pdata; 277 struct mv64x60_sram_pdata *pdata;
@@ -439,7 +439,7 @@ static irqreturn_t mv64x60_cpu_isr(int irq, void *dev_id)
439 return IRQ_HANDLED; 439 return IRQ_HANDLED;
440} 440}
441 441
442static int __devinit mv64x60_cpu_err_probe(struct platform_device *pdev) 442static int mv64x60_cpu_err_probe(struct platform_device *pdev)
443{ 443{
444 struct edac_device_ctl_info *edac_dev; 444 struct edac_device_ctl_info *edac_dev;
445 struct resource *r; 445 struct resource *r;
@@ -697,7 +697,7 @@ static void mv64x60_init_csrows(struct mem_ctl_info *mci,
697 dimm->edac_mode = EDAC_SECDED; 697 dimm->edac_mode = EDAC_SECDED;
698} 698}
699 699
700static int __devinit mv64x60_mc_err_probe(struct platform_device *pdev) 700static int mv64x60_mc_err_probe(struct platform_device *pdev)
701{ 701{
702 struct mem_ctl_info *mci; 702 struct mem_ctl_info *mci;
703 struct edac_mc_layer layers[2]; 703 struct edac_mc_layer layers[2];
diff --git a/drivers/edac/octeon_edac-l2c.c b/drivers/edac/octeon_edac-l2c.c
index 40fde6a51ed6..7e98084d3645 100644
--- a/drivers/edac/octeon_edac-l2c.c
+++ b/drivers/edac/octeon_edac-l2c.c
@@ -131,7 +131,7 @@ static void octeon_l2c_poll_oct2(struct edac_device_ctl_info *l2c)
131 _octeon_l2c_poll_oct2(l2c, i); 131 _octeon_l2c_poll_oct2(l2c, i);
132} 132}
133 133
134static int __devinit octeon_l2c_probe(struct platform_device *pdev) 134static int octeon_l2c_probe(struct platform_device *pdev)
135{ 135{
136 struct edac_device_ctl_info *l2c; 136 struct edac_device_ctl_info *l2c;
137 137
diff --git a/drivers/edac/octeon_edac-lmc.c b/drivers/edac/octeon_edac-lmc.c
index 33bca766e37d..93412d6b3af1 100644
--- a/drivers/edac/octeon_edac-lmc.c
+++ b/drivers/edac/octeon_edac-lmc.c
@@ -86,7 +86,7 @@ static void octeon_lmc_edac_poll_o2(struct mem_ctl_info *mci)
86 cvmx_write_csr(CVMX_LMCX_INT(mci->mc_idx), int_reg.u64); 86 cvmx_write_csr(CVMX_LMCX_INT(mci->mc_idx), int_reg.u64);
87} 87}
88 88
89static int __devinit octeon_lmc_edac_probe(struct platform_device *pdev) 89static int octeon_lmc_edac_probe(struct platform_device *pdev)
90{ 90{
91 struct mem_ctl_info *mci; 91 struct mem_ctl_info *mci;
92 struct edac_mc_layer layers[1]; 92 struct edac_mc_layer layers[1];
diff --git a/drivers/edac/octeon_edac-pc.c b/drivers/edac/octeon_edac-pc.c
index 14a5e57f2b32..0f83c33a7d1f 100644
--- a/drivers/edac/octeon_edac-pc.c
+++ b/drivers/edac/octeon_edac-pc.c
@@ -82,7 +82,7 @@ static int co_cache_error_event(struct notifier_block *this,
82 return NOTIFY_STOP; 82 return NOTIFY_STOP;
83} 83}
84 84
85static int __devinit co_cache_error_probe(struct platform_device *pdev) 85static int co_cache_error_probe(struct platform_device *pdev)
86{ 86{
87 struct co_cache_error *p = devm_kzalloc(&pdev->dev, sizeof(*p), 87 struct co_cache_error *p = devm_kzalloc(&pdev->dev, sizeof(*p),
88 GFP_KERNEL); 88 GFP_KERNEL);
diff --git a/drivers/edac/octeon_edac-pci.c b/drivers/edac/octeon_edac-pci.c
index 758c1ef5fc9e..9ca73cec74e7 100644
--- a/drivers/edac/octeon_edac-pci.c
+++ b/drivers/edac/octeon_edac-pci.c
@@ -58,7 +58,7 @@ static void octeon_pci_poll(struct edac_pci_ctl_info *pci)
58 } 58 }
59} 59}
60 60
61static int __devinit octeon_pci_probe(struct platform_device *pdev) 61static int octeon_pci_probe(struct platform_device *pdev)
62{ 62{
63 struct edac_pci_ctl_info *pci; 63 struct edac_pci_ctl_info *pci;
64 int res = 0; 64 int res = 0;
diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c
index 2d35b78ada3c..9c971b575530 100644
--- a/drivers/edac/pasemi_edac.c
+++ b/drivers/edac/pasemi_edac.c
@@ -188,8 +188,8 @@ static int pasemi_edac_init_csrows(struct mem_ctl_info *mci,
188 return 0; 188 return 0;
189} 189}
190 190
191static int __devinit pasemi_edac_probe(struct pci_dev *pdev, 191static int pasemi_edac_probe(struct pci_dev *pdev,
192 const struct pci_device_id *ent) 192 const struct pci_device_id *ent)
193{ 193{
194 struct mem_ctl_info *mci = NULL; 194 struct mem_ctl_info *mci = NULL;
195 struct edac_mc_layer layers[2]; 195 struct edac_mc_layer layers[2];
@@ -266,7 +266,7 @@ fail:
266 return -ENODEV; 266 return -ENODEV;
267} 267}
268 268
269static void __devexit pasemi_edac_remove(struct pci_dev *pdev) 269static void pasemi_edac_remove(struct pci_dev *pdev)
270{ 270{
271 struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev); 271 struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev);
272 272
@@ -287,7 +287,7 @@ MODULE_DEVICE_TABLE(pci, pasemi_edac_pci_tbl);
287static struct pci_driver pasemi_edac_driver = { 287static struct pci_driver pasemi_edac_driver = {
288 .name = MODULE_NAME, 288 .name = MODULE_NAME,
289 .probe = pasemi_edac_probe, 289 .probe = pasemi_edac_probe,
290 .remove = __devexit_p(pasemi_edac_remove), 290 .remove = pasemi_edac_remove,
291 .id_table = pasemi_edac_pci_tbl, 291 .id_table = pasemi_edac_pci_tbl,
292}; 292};
293 293
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index bf0957635991..ef6b7e08f485 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -838,8 +838,7 @@ ppc4xx_edac_isr(int irq, void *dev_id)
838 * 838 *
839 * Returns a device type width enumeration. 839 * Returns a device type width enumeration.
840 */ 840 */
841static enum dev_type __devinit 841static enum dev_type ppc4xx_edac_get_dtype(u32 mcopt1)
842ppc4xx_edac_get_dtype(u32 mcopt1)
843{ 842{
844 switch (mcopt1 & SDRAM_MCOPT1_WDTH_MASK) { 843 switch (mcopt1 & SDRAM_MCOPT1_WDTH_MASK) {
845 case SDRAM_MCOPT1_WDTH_16: 844 case SDRAM_MCOPT1_WDTH_16:
@@ -862,8 +861,7 @@ ppc4xx_edac_get_dtype(u32 mcopt1)
862 * 861 *
863 * Returns a memory type enumeration. 862 * Returns a memory type enumeration.
864 */ 863 */
865static enum mem_type __devinit 864static enum mem_type ppc4xx_edac_get_mtype(u32 mcopt1)
866ppc4xx_edac_get_mtype(u32 mcopt1)
867{ 865{
868 bool rden = ((mcopt1 & SDRAM_MCOPT1_RDEN_MASK) == SDRAM_MCOPT1_RDEN); 866 bool rden = ((mcopt1 & SDRAM_MCOPT1_RDEN_MASK) == SDRAM_MCOPT1_RDEN);
869 867
@@ -893,8 +891,7 @@ ppc4xx_edac_get_mtype(u32 mcopt1)
893 * Returns 0 if OK; otherwise, -EINVAL if the memory bank size 891 * Returns 0 if OK; otherwise, -EINVAL if the memory bank size
894 * configuration cannot be determined. 892 * configuration cannot be determined.
895 */ 893 */
896static int __devinit 894static int ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
897ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
898{ 895{
899 const struct ppc4xx_edac_pdata *pdata = mci->pvt_info; 896 const struct ppc4xx_edac_pdata *pdata = mci->pvt_info;
900 int status = 0; 897 int status = 0;
@@ -1011,11 +1008,9 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
1011 * 1008 *
1012 * Returns 0 if OK; otherwise, < 0 on error. 1009 * Returns 0 if OK; otherwise, < 0 on error.
1013 */ 1010 */
1014static int __devinit 1011static int ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1015ppc4xx_edac_mc_init(struct mem_ctl_info *mci, 1012 struct platform_device *op,
1016 struct platform_device *op, 1013 const dcr_host_t *dcr_host, u32 mcopt1)
1017 const dcr_host_t *dcr_host,
1018 u32 mcopt1)
1019{ 1014{
1020 int status = 0; 1015 int status = 0;
1021 const u32 memcheck = (mcopt1 & SDRAM_MCOPT1_MCHK_MASK); 1016 const u32 memcheck = (mcopt1 & SDRAM_MCOPT1_MCHK_MASK);
@@ -1105,8 +1100,8 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1105 * Returns 0 if OK; otherwise, -ENODEV if the interrupts could not be 1100 * Returns 0 if OK; otherwise, -ENODEV if the interrupts could not be
1106 * mapped and assigned. 1101 * mapped and assigned.
1107 */ 1102 */
1108static int __devinit 1103static int ppc4xx_edac_register_irq(struct platform_device *op,
1109ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci) 1104 struct mem_ctl_info *mci)
1110{ 1105{
1111 int status = 0; 1106 int status = 0;
1112 int ded_irq, sec_irq; 1107 int ded_irq, sec_irq;
@@ -1183,8 +1178,8 @@ ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci)
1183 * Returns 0 if the DCRs were successfully mapped; otherwise, < 0 on 1178 * Returns 0 if the DCRs were successfully mapped; otherwise, < 0 on
1184 * error. 1179 * error.
1185 */ 1180 */
1186static int __devinit 1181static int ppc4xx_edac_map_dcrs(const struct device_node *np,
1187ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host) 1182 dcr_host_t *dcr_host)
1188{ 1183{
1189 unsigned int dcr_base, dcr_len; 1184 unsigned int dcr_base, dcr_len;
1190 1185
@@ -1232,7 +1227,7 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host)
1232 * Returns 0 if the controller instance was successfully bound to the 1227 * Returns 0 if the controller instance was successfully bound to the
1233 * driver; otherwise, < 0 on error. 1228 * driver; otherwise, < 0 on error.
1234 */ 1229 */
1235static int __devinit ppc4xx_edac_probe(struct platform_device *op) 1230static int ppc4xx_edac_probe(struct platform_device *op)
1236{ 1231{
1237 int status = 0; 1232 int status = 0;
1238 u32 mcopt1, memcheck; 1233 u32 mcopt1, memcheck;
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
index f854debd5533..2fd6a5490905 100644
--- a/drivers/edac/r82600_edac.c
+++ b/drivers/edac/r82600_edac.c
@@ -359,8 +359,8 @@ fail:
359} 359}
360 360
361/* returns count (>= 0), or negative on error */ 361/* returns count (>= 0), or negative on error */
362static int __devinit r82600_init_one(struct pci_dev *pdev, 362static int r82600_init_one(struct pci_dev *pdev,
363 const struct pci_device_id *ent) 363 const struct pci_device_id *ent)
364{ 364{
365 edac_dbg(0, "\n"); 365 edac_dbg(0, "\n");
366 366
@@ -368,7 +368,7 @@ static int __devinit r82600_init_one(struct pci_dev *pdev,
368 return r82600_probe1(pdev, ent->driver_data); 368 return r82600_probe1(pdev, ent->driver_data);
369} 369}
370 370
371static void __devexit r82600_remove_one(struct pci_dev *pdev) 371static void r82600_remove_one(struct pci_dev *pdev)
372{ 372{
373 struct mem_ctl_info *mci; 373 struct mem_ctl_info *mci;
374 374
@@ -397,7 +397,7 @@ MODULE_DEVICE_TABLE(pci, r82600_pci_tbl);
397static struct pci_driver r82600_driver = { 397static struct pci_driver r82600_driver = {
398 .name = EDAC_MOD_STR, 398 .name = EDAC_MOD_STR,
399 .probe = r82600_init_one, 399 .probe = r82600_init_one,
400 .remove = __devexit_p(r82600_remove_one), 400 .remove = r82600_remove_one,
401 .id_table = r82600_pci_tbl, 401 .id_table = r82600_pci_tbl,
402}; 402};
403 403
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 5715b7c2c517..da7e2986e3d5 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -1692,8 +1692,7 @@ fail0:
1692 * < 0 for error code 1692 * < 0 for error code
1693 */ 1693 */
1694 1694
1695static int __devinit sbridge_probe(struct pci_dev *pdev, 1695static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1696 const struct pci_device_id *id)
1697{ 1696{
1698 int rc; 1697 int rc;
1699 u8 mc, num_mc = 0; 1698 u8 mc, num_mc = 0;
@@ -1744,7 +1743,7 @@ fail0:
1744 * sbridge_remove destructor for one instance of device 1743 * sbridge_remove destructor for one instance of device
1745 * 1744 *
1746 */ 1745 */
1747static void __devexit sbridge_remove(struct pci_dev *pdev) 1746static void sbridge_remove(struct pci_dev *pdev)
1748{ 1747{
1749 struct sbridge_dev *sbridge_dev; 1748 struct sbridge_dev *sbridge_dev;
1750 1749
@@ -1785,7 +1784,7 @@ MODULE_DEVICE_TABLE(pci, sbridge_pci_tbl);
1785static struct pci_driver sbridge_driver = { 1784static struct pci_driver sbridge_driver = {
1786 .name = "sbridge_edac", 1785 .name = "sbridge_edac",
1787 .probe = sbridge_probe, 1786 .probe = sbridge_probe,
1788 .remove = __devexit_p(sbridge_remove), 1787 .remove = sbridge_remove,
1789 .id_table = sbridge_pci_tbl, 1788 .id_table = sbridge_pci_tbl,
1790}; 1789};
1791 1790
diff --git a/drivers/edac/tile_edac.c b/drivers/edac/tile_edac.c
index 1e904b7b79a0..a0820536b7d9 100644
--- a/drivers/edac/tile_edac.c
+++ b/drivers/edac/tile_edac.c
@@ -82,7 +82,7 @@ static void tile_edac_check(struct mem_ctl_info *mci)
82 * Initialize the 'csrows' table within the mci control structure with the 82 * Initialize the 'csrows' table within the mci control structure with the
83 * addressing of memory. 83 * addressing of memory.
84 */ 84 */
85static int __devinit tile_edac_init_csrows(struct mem_ctl_info *mci) 85static int tile_edac_init_csrows(struct mem_ctl_info *mci)
86{ 86{
87 struct csrow_info *csrow = mci->csrows[0]; 87 struct csrow_info *csrow = mci->csrows[0];
88 struct tile_edac_priv *priv = mci->pvt_info; 88 struct tile_edac_priv *priv = mci->pvt_info;
@@ -120,7 +120,7 @@ static int __devinit tile_edac_init_csrows(struct mem_ctl_info *mci)
120 return 0; 120 return 0;
121} 121}
122 122
123static int __devinit tile_edac_mc_probe(struct platform_device *pdev) 123static int tile_edac_mc_probe(struct platform_device *pdev)
124{ 124{
125 char hv_file[32]; 125 char hv_file[32];
126 int hv_devhdl; 126 int hv_devhdl;
@@ -186,7 +186,7 @@ static int __devinit tile_edac_mc_probe(struct platform_device *pdev)
186 return 0; 186 return 0;
187} 187}
188 188
189static int __devexit tile_edac_mc_remove(struct platform_device *pdev) 189static int tile_edac_mc_remove(struct platform_device *pdev)
190{ 190{
191 struct mem_ctl_info *mci = platform_get_drvdata(pdev); 191 struct mem_ctl_info *mci = platform_get_drvdata(pdev);
192 192
@@ -202,7 +202,7 @@ static struct platform_driver tile_edac_mc_driver = {
202 .owner = THIS_MODULE, 202 .owner = THIS_MODULE,
203 }, 203 },
204 .probe = tile_edac_mc_probe, 204 .probe = tile_edac_mc_probe,
205 .remove = __devexit_p(tile_edac_mc_remove), 205 .remove = tile_edac_mc_remove,
206}; 206};
207 207
208/* 208/*
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c
index 08a992693e62..c9db24d95caa 100644
--- a/drivers/edac/x38_edac.c
+++ b/drivers/edac/x38_edac.c
@@ -418,8 +418,7 @@ fail:
418 return rc; 418 return rc;
419} 419}
420 420
421static int __devinit x38_init_one(struct pci_dev *pdev, 421static int x38_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
422 const struct pci_device_id *ent)
423{ 422{
424 int rc; 423 int rc;
425 424
@@ -435,7 +434,7 @@ static int __devinit x38_init_one(struct pci_dev *pdev,
435 return rc; 434 return rc;
436} 435}
437 436
438static void __devexit x38_remove_one(struct pci_dev *pdev) 437static void x38_remove_one(struct pci_dev *pdev)
439{ 438{
440 struct mem_ctl_info *mci; 439 struct mem_ctl_info *mci;
441 440
@@ -464,7 +463,7 @@ MODULE_DEVICE_TABLE(pci, x38_pci_tbl);
464static struct pci_driver x38_driver = { 463static struct pci_driver x38_driver = {
465 .name = EDAC_MOD_STR, 464 .name = EDAC_MOD_STR,
466 .probe = x38_init_one, 465 .probe = x38_init_one,
467 .remove = __devexit_p(x38_remove_one), 466 .remove = x38_remove_one,
468 .id_table = x38_pci_tbl, 467 .id_table = x38_pci_tbl,
469}; 468};
470 469
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index ea5ac2dc1233..8e77c02edb24 100644
--- a/drivers/firmware/dcdbas.c
+++ b/drivers/firmware/dcdbas.c
@@ -537,7 +537,7 @@ static struct attribute_group dcdbas_attr_group = {
537 .attrs = dcdbas_dev_attrs, 537 .attrs = dcdbas_dev_attrs,
538}; 538};
539 539
540static int __devinit dcdbas_probe(struct platform_device *dev) 540static int dcdbas_probe(struct platform_device *dev)
541{ 541{
542 int i, error; 542 int i, error;
543 543
@@ -575,7 +575,7 @@ static int __devinit dcdbas_probe(struct platform_device *dev)
575 return 0; 575 return 0;
576} 576}
577 577
578static int __devexit dcdbas_remove(struct platform_device *dev) 578static int dcdbas_remove(struct platform_device *dev)
579{ 579{
580 int i; 580 int i;
581 581
@@ -593,7 +593,7 @@ static struct platform_driver dcdbas_driver = {
593 .owner = THIS_MODULE, 593 .owner = THIS_MODULE,
594 }, 594 },
595 .probe = dcdbas_probe, 595 .probe = dcdbas_probe,
596 .remove = __devexit_p(dcdbas_remove), 596 .remove = dcdbas_remove,
597}; 597};
598 598
599/** 599/**
diff --git a/drivers/gpio/gpio-da9055.c b/drivers/gpio/gpio-da9055.c
index 55d83c7d9c7f..fd6dfe382f13 100644
--- a/drivers/gpio/gpio-da9055.c
+++ b/drivers/gpio/gpio-da9055.c
@@ -126,7 +126,7 @@ static int da9055_gpio_to_irq(struct gpio_chip *gc, u32 offset)
126 DA9055_IRQ_GPI0 + offset); 126 DA9055_IRQ_GPI0 + offset);
127} 127}
128 128
129static struct gpio_chip reference_gp __devinitdata = { 129static struct gpio_chip reference_gp = {
130 .label = "da9055-gpio", 130 .label = "da9055-gpio",
131 .owner = THIS_MODULE, 131 .owner = THIS_MODULE,
132 .get = da9055_gpio_get, 132 .get = da9055_gpio_get,
@@ -139,7 +139,7 @@ static struct gpio_chip reference_gp __devinitdata = {
139 .base = -1, 139 .base = -1,
140}; 140};
141 141
142static int __devinit da9055_gpio_probe(struct platform_device *pdev) 142static int da9055_gpio_probe(struct platform_device *pdev)
143{ 143{
144 struct da9055_gpio *gpio; 144 struct da9055_gpio *gpio;
145 struct da9055_pdata *pdata; 145 struct da9055_pdata *pdata;
@@ -170,7 +170,7 @@ err_mem:
170 return ret; 170 return ret;
171} 171}
172 172
173static int __devexit da9055_gpio_remove(struct platform_device *pdev) 173static int da9055_gpio_remove(struct platform_device *pdev)
174{ 174{
175 struct da9055_gpio *gpio = platform_get_drvdata(pdev); 175 struct da9055_gpio *gpio = platform_get_drvdata(pdev);
176 176
@@ -179,7 +179,7 @@ static int __devexit da9055_gpio_remove(struct platform_device *pdev)
179 179
180static struct platform_driver da9055_gpio_driver = { 180static struct platform_driver da9055_gpio_driver = {
181 .probe = da9055_gpio_probe, 181 .probe = da9055_gpio_probe,
182 .remove = __devexit_p(da9055_gpio_remove), 182 .remove = da9055_gpio_remove,
183 .driver = { 183 .driver = {
184 .name = "da9055-gpio", 184 .name = "da9055-gpio",
185 .owner = THIS_MODULE, 185 .owner = THIS_MODULE,
diff --git a/drivers/gpio/gpio-ts5500.c b/drivers/gpio/gpio-ts5500.c
index 0634ceea3c24..cc53cab8df2a 100644
--- a/drivers/gpio/gpio-ts5500.c
+++ b/drivers/gpio/gpio-ts5500.c
@@ -319,7 +319,7 @@ static void ts5500_disable_irq(struct ts5500_priv *priv)
319 spin_unlock_irqrestore(&priv->lock, flags); 319 spin_unlock_irqrestore(&priv->lock, flags);
320} 320}
321 321
322static int __devinit ts5500_dio_probe(struct platform_device *pdev) 322static int ts5500_dio_probe(struct platform_device *pdev)
323{ 323{
324 enum ts5500_blocks block = platform_get_device_id(pdev)->driver_data; 324 enum ts5500_blocks block = platform_get_device_id(pdev)->driver_data;
325 struct ts5500_dio_platform_data *pdata = pdev->dev.platform_data; 325 struct ts5500_dio_platform_data *pdata = pdev->dev.platform_data;
@@ -432,7 +432,7 @@ cleanup:
432 return ret; 432 return ret;
433} 433}
434 434
435static int __devexit ts5500_dio_remove(struct platform_device *pdev) 435static int ts5500_dio_remove(struct platform_device *pdev)
436{ 436{
437 struct ts5500_priv *priv = platform_get_drvdata(pdev); 437 struct ts5500_priv *priv = platform_get_drvdata(pdev);
438 438
@@ -455,7 +455,7 @@ static struct platform_driver ts5500_dio_driver = {
455 .owner = THIS_MODULE, 455 .owner = THIS_MODULE,
456 }, 456 },
457 .probe = ts5500_dio_probe, 457 .probe = ts5500_dio_probe,
458 .remove = __devexit_p(ts5500_dio_remove), 458 .remove = ts5500_dio_remove,
459 .id_table = ts5500_dio_ids, 459 .id_table = ts5500_dio_ids,
460}; 460};
461 461
diff --git a/drivers/gpio/gpio-viperboard.c b/drivers/gpio/gpio-viperboard.c
index 13772996cf24..59d72391de26 100644
--- a/drivers/gpio/gpio-viperboard.c
+++ b/drivers/gpio/gpio-viperboard.c
@@ -400,7 +400,7 @@ static int vprbrd_gpiob_direction_output(struct gpio_chip *chip,
400 400
401/* ----- end of gpio b chip ---------------------------------------------- */ 401/* ----- end of gpio b chip ---------------------------------------------- */
402 402
403static int __devinit vprbrd_gpio_probe(struct platform_device *pdev) 403static int vprbrd_gpio_probe(struct platform_device *pdev)
404{ 404{
405 struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); 405 struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent);
406 struct vprbrd_gpio *vb_gpio; 406 struct vprbrd_gpio *vb_gpio;
@@ -456,7 +456,7 @@ err_gpioa:
456 return ret; 456 return ret;
457} 457}
458 458
459static int __devexit vprbrd_gpio_remove(struct platform_device *pdev) 459static int vprbrd_gpio_remove(struct platform_device *pdev)
460{ 460{
461 struct vprbrd_gpio *vb_gpio = platform_get_drvdata(pdev); 461 struct vprbrd_gpio *vb_gpio = platform_get_drvdata(pdev);
462 int ret; 462 int ret;
@@ -472,7 +472,7 @@ static struct platform_driver vprbrd_gpio_driver = {
472 .driver.name = "viperboard-gpio", 472 .driver.name = "viperboard-gpio",
473 .driver.owner = THIS_MODULE, 473 .driver.owner = THIS_MODULE,
474 .probe = vprbrd_gpio_probe, 474 .probe = vprbrd_gpio_probe,
475 .remove = __devexit_p(vprbrd_gpio_remove), 475 .remove = vprbrd_gpio_remove,
476}; 476};
477 477
478static int __init vprbrd_gpio_init(void) 478static int __init vprbrd_gpio_init(void)
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index 31123b6a0be5..2d2c2f8d6dc6 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -60,8 +60,7 @@ static DEFINE_PCI_DEVICE_TABLE(pciidlist) = {
60 60
61MODULE_DEVICE_TABLE(pci, pciidlist); 61MODULE_DEVICE_TABLE(pci, pciidlist);
62 62
63static int __devinit 63static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
64ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
65{ 64{
66 return drm_get_pci_dev(pdev, ent, &driver); 65 return drm_get_pci_dev(pdev, ent, &driver);
67} 66}
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c b/drivers/gpu/drm/cirrus/cirrus_drv.c
index dcd1a8c029eb..8ecb601152ef 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.c
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.c
@@ -56,8 +56,8 @@ static int cirrus_kick_out_firmware_fb(struct pci_dev *pdev)
56 return 0; 56 return 0;
57} 57}
58 58
59static int __devinit 59static int cirrus_pci_probe(struct pci_dev *pdev,
60cirrus_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 60 const struct pci_device_id *ent)
61{ 61{
62 int ret; 62 int ret;
63 63
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 0761a03cdbb2..2bf9670ba29b 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -184,19 +184,27 @@ EXPORT_SYMBOL(drm_mm_get_block_generic);
184 * -ENOSPC if no suitable free area is available. The preallocated memory node 184 * -ENOSPC if no suitable free area is available. The preallocated memory node
185 * must be cleared. 185 * must be cleared.
186 */ 186 */
187int drm_mm_insert_node(struct drm_mm *mm, struct drm_mm_node *node, 187int drm_mm_insert_node_generic(struct drm_mm *mm, struct drm_mm_node *node,
188 unsigned long size, unsigned alignment) 188 unsigned long size, unsigned alignment,
189 unsigned long color)
189{ 190{
190 struct drm_mm_node *hole_node; 191 struct drm_mm_node *hole_node;
191 192
192 hole_node = drm_mm_search_free(mm, size, alignment, false); 193 hole_node = drm_mm_search_free_generic(mm, size, alignment,
194 color, 0);
193 if (!hole_node) 195 if (!hole_node)
194 return -ENOSPC; 196 return -ENOSPC;
195 197
196 drm_mm_insert_helper(hole_node, node, size, alignment, 0); 198 drm_mm_insert_helper(hole_node, node, size, alignment, color);
197
198 return 0; 199 return 0;
199} 200}
201EXPORT_SYMBOL(drm_mm_insert_node_generic);
202
203int drm_mm_insert_node(struct drm_mm *mm, struct drm_mm_node *node,
204 unsigned long size, unsigned alignment)
205{
206 return drm_mm_insert_node_generic(mm, node, size, alignment, 0);
207}
200EXPORT_SYMBOL(drm_mm_insert_node); 208EXPORT_SYMBOL(drm_mm_insert_node);
201 209
202static void drm_mm_insert_helper_range(struct drm_mm_node *hole_node, 210static void drm_mm_insert_helper_range(struct drm_mm_node *hole_node,
@@ -275,22 +283,31 @@ EXPORT_SYMBOL(drm_mm_get_block_range_generic);
275 * -ENOSPC if no suitable free area is available. This is for range 283 * -ENOSPC if no suitable free area is available. This is for range
276 * restricted allocations. The preallocated memory node must be cleared. 284 * restricted allocations. The preallocated memory node must be cleared.
277 */ 285 */
278int drm_mm_insert_node_in_range(struct drm_mm *mm, struct drm_mm_node *node, 286int drm_mm_insert_node_in_range_generic(struct drm_mm *mm, struct drm_mm_node *node,
279 unsigned long size, unsigned alignment, 287 unsigned long size, unsigned alignment, unsigned long color,
280 unsigned long start, unsigned long end) 288 unsigned long start, unsigned long end)
281{ 289{
282 struct drm_mm_node *hole_node; 290 struct drm_mm_node *hole_node;
283 291
284 hole_node = drm_mm_search_free_in_range(mm, size, alignment, 292 hole_node = drm_mm_search_free_in_range_generic(mm,
285 start, end, false); 293 size, alignment, color,
294 start, end, 0);
286 if (!hole_node) 295 if (!hole_node)
287 return -ENOSPC; 296 return -ENOSPC;
288 297
289 drm_mm_insert_helper_range(hole_node, node, size, alignment, 0, 298 drm_mm_insert_helper_range(hole_node, node,
299 size, alignment, color,
290 start, end); 300 start, end);
291
292 return 0; 301 return 0;
293} 302}
303EXPORT_SYMBOL(drm_mm_insert_node_in_range_generic);
304
305int drm_mm_insert_node_in_range(struct drm_mm *mm, struct drm_mm_node *node,
306 unsigned long size, unsigned alignment,
307 unsigned long start, unsigned long end)
308{
309 return drm_mm_insert_node_in_range_generic(mm, node, size, alignment, 0, start, end);
310}
294EXPORT_SYMBOL(drm_mm_insert_node_in_range); 311EXPORT_SYMBOL(drm_mm_insert_node_in_range);
295 312
296/** 313/**
diff --git a/drivers/gpu/drm/exynos/exynos_ddc.c b/drivers/gpu/drm/exynos/exynos_ddc.c
index bef43e0342a6..4e9b5ba8edff 100644
--- a/drivers/gpu/drm/exynos/exynos_ddc.c
+++ b/drivers/gpu/drm/exynos/exynos_ddc.c
@@ -66,6 +66,6 @@ struct i2c_driver ddc_driver = {
66 }, 66 },
67 .id_table = ddc_idtable, 67 .id_table = ddc_idtable,
68 .probe = s5p_ddc_probe, 68 .probe = s5p_ddc_probe,
69 .remove = __devexit_p(s5p_ddc_remove), 69 .remove = s5p_ddc_remove,
70 .command = NULL, 70 .command = NULL,
71}; 71};
diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.c b/drivers/gpu/drm/exynos/exynos_drm_buf.c
index 9601bad47a2e..57affae9568b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_buf.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_buf.c
@@ -3,24 +3,10 @@
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * Author: Inki Dae <inki.dae@samsung.com> 4 * Author: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#include <drm/drmP.h> 12#include <drm/drmP.h>
@@ -29,6 +15,7 @@
29#include "exynos_drm_drv.h" 15#include "exynos_drm_drv.h"
30#include "exynos_drm_gem.h" 16#include "exynos_drm_gem.h"
31#include "exynos_drm_buf.h" 17#include "exynos_drm_buf.h"
18#include "exynos_drm_iommu.h"
32 19
33static int lowlevel_buffer_allocate(struct drm_device *dev, 20static int lowlevel_buffer_allocate(struct drm_device *dev,
34 unsigned int flags, struct exynos_drm_gem_buf *buf) 21 unsigned int flags, struct exynos_drm_gem_buf *buf)
@@ -51,7 +38,7 @@ static int lowlevel_buffer_allocate(struct drm_device *dev,
51 * region will be allocated else physically contiguous 38 * region will be allocated else physically contiguous
52 * as possible. 39 * as possible.
53 */ 40 */
54 if (flags & EXYNOS_BO_CONTIG) 41 if (!(flags & EXYNOS_BO_NONCONTIG))
55 dma_set_attr(DMA_ATTR_FORCE_CONTIGUOUS, &buf->dma_attrs); 42 dma_set_attr(DMA_ATTR_FORCE_CONTIGUOUS, &buf->dma_attrs);
56 43
57 /* 44 /*
@@ -66,14 +53,45 @@ static int lowlevel_buffer_allocate(struct drm_device *dev,
66 dma_set_attr(attr, &buf->dma_attrs); 53 dma_set_attr(attr, &buf->dma_attrs);
67 dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &buf->dma_attrs); 54 dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &buf->dma_attrs);
68 55
69 buf->pages = dma_alloc_attrs(dev->dev, buf->size, 56 nr_pages = buf->size >> PAGE_SHIFT;
70 &buf->dma_addr, GFP_KERNEL, &buf->dma_attrs); 57
71 if (!buf->pages) { 58 if (!is_drm_iommu_supported(dev)) {
72 DRM_ERROR("failed to allocate buffer.\n"); 59 dma_addr_t start_addr;
73 return -ENOMEM; 60 unsigned int i = 0;
61
62 buf->pages = kzalloc(sizeof(struct page) * nr_pages,
63 GFP_KERNEL);
64 if (!buf->pages) {
65 DRM_ERROR("failed to allocate pages.\n");
66 return -ENOMEM;
67 }
68
69 buf->kvaddr = dma_alloc_attrs(dev->dev, buf->size,
70 &buf->dma_addr, GFP_KERNEL,
71 &buf->dma_attrs);
72 if (!buf->kvaddr) {
73 DRM_ERROR("failed to allocate buffer.\n");
74 kfree(buf->pages);
75 return -ENOMEM;
76 }
77
78 start_addr = buf->dma_addr;
79 while (i < nr_pages) {
80 buf->pages[i] = phys_to_page(start_addr);
81 start_addr += PAGE_SIZE;
82 i++;
83 }
84 } else {
85
86 buf->pages = dma_alloc_attrs(dev->dev, buf->size,
87 &buf->dma_addr, GFP_KERNEL,
88 &buf->dma_attrs);
89 if (!buf->pages) {
90 DRM_ERROR("failed to allocate buffer.\n");
91 return -ENOMEM;
92 }
74 } 93 }
75 94
76 nr_pages = buf->size >> PAGE_SHIFT;
77 buf->sgt = drm_prime_pages_to_sg(buf->pages, nr_pages); 95 buf->sgt = drm_prime_pages_to_sg(buf->pages, nr_pages);
78 if (!buf->sgt) { 96 if (!buf->sgt) {
79 DRM_ERROR("failed to get sg table.\n"); 97 DRM_ERROR("failed to get sg table.\n");
@@ -92,6 +110,9 @@ err_free_attrs:
92 (dma_addr_t)buf->dma_addr, &buf->dma_attrs); 110 (dma_addr_t)buf->dma_addr, &buf->dma_attrs);
93 buf->dma_addr = (dma_addr_t)NULL; 111 buf->dma_addr = (dma_addr_t)NULL;
94 112
113 if (!is_drm_iommu_supported(dev))
114 kfree(buf->pages);
115
95 return ret; 116 return ret;
96} 117}
97 118
@@ -114,8 +135,14 @@ static void lowlevel_buffer_deallocate(struct drm_device *dev,
114 kfree(buf->sgt); 135 kfree(buf->sgt);
115 buf->sgt = NULL; 136 buf->sgt = NULL;
116 137
117 dma_free_attrs(dev->dev, buf->size, buf->pages, 138 if (!is_drm_iommu_supported(dev)) {
139 dma_free_attrs(dev->dev, buf->size, buf->kvaddr,
118 (dma_addr_t)buf->dma_addr, &buf->dma_attrs); 140 (dma_addr_t)buf->dma_addr, &buf->dma_attrs);
141 kfree(buf->pages);
142 } else
143 dma_free_attrs(dev->dev, buf->size, buf->pages,
144 (dma_addr_t)buf->dma_addr, &buf->dma_attrs);
145
119 buf->dma_addr = (dma_addr_t)NULL; 146 buf->dma_addr = (dma_addr_t)NULL;
120} 147}
121 148
diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.h b/drivers/gpu/drm/exynos/exynos_drm_buf.h
index 25cf16285033..a6412f19673c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_buf.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_buf.h
@@ -3,24 +3,10 @@
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * Author: Inki Dae <inki.dae@samsung.com> 4 * Author: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#ifndef _EXYNOS_DRM_BUF_H_ 12#ifndef _EXYNOS_DRM_BUF_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c
index 0f68a2872673..ab37437bad8a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_connector.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c
@@ -5,24 +5,10 @@
5 * Joonyoung Shim <jy0922.shim@samsung.com> 5 * Joonyoung Shim <jy0922.shim@samsung.com>
6 * Seung-Woo Kim <sw0312.kim@samsung.com> 6 * Seung-Woo Kim <sw0312.kim@samsung.com>
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * This program is free software; you can redistribute it and/or modify it
9 * copy of this software and associated documentation files (the "Software"), 9 * under the terms of the GNU General Public License as published by the
10 * to deal in the Software without restriction, including without limitation 10 * Free Software Foundation; either version 2 of the License, or (at your
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * option) any later version.
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the next
16 * paragraph) shall be included in all copies or substantial portions of the
17 * Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 */ 12 */
27 13
28#include <drm/drmP.h> 14#include <drm/drmP.h>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.h b/drivers/gpu/drm/exynos/exynos_drm_connector.h
index 22f6cc442c3d..547c6b590357 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_connector.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_connector.h
@@ -5,24 +5,10 @@
5 * Joonyoung Shim <jy0922.shim@samsung.com> 5 * Joonyoung Shim <jy0922.shim@samsung.com>
6 * Seung-Woo Kim <sw0312.kim@samsung.com> 6 * Seung-Woo Kim <sw0312.kim@samsung.com>
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * This program is free software; you can redistribute it and/or modify it
9 * copy of this software and associated documentation files (the "Software"), 9 * under the terms of the GNU General Public License as published by the
10 * to deal in the Software without restriction, including without limitation 10 * Free Software Foundation; either version 2 of the License, or (at your
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * option) any later version.
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the next
16 * paragraph) shall be included in all copies or substantial portions of the
17 * Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 */ 12 */
27 13
28#ifndef _EXYNOS_DRM_CONNECTOR_H_ 14#ifndef _EXYNOS_DRM_CONNECTOR_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_core.c b/drivers/gpu/drm/exynos/exynos_drm_core.c
index 94026ad76a77..4667c9f67acd 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_core.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_core.c
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#include <drm/drmP.h> 15#include <drm/drmP.h>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 2efa4b031d73..e8894bc9e6d5 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#include <drm/drmP.h> 15#include <drm/drmP.h>
@@ -407,3 +393,33 @@ void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int crtc)
407 exynos_drm_fn_encoder(private->crtc[crtc], &crtc, 393 exynos_drm_fn_encoder(private->crtc[crtc], &crtc,
408 exynos_drm_disable_vblank); 394 exynos_drm_disable_vblank);
409} 395}
396
397void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int crtc)
398{
399 struct exynos_drm_private *dev_priv = dev->dev_private;
400 struct drm_pending_vblank_event *e, *t;
401 struct timeval now;
402 unsigned long flags;
403
404 DRM_DEBUG_KMS("%s\n", __FILE__);
405
406 spin_lock_irqsave(&dev->event_lock, flags);
407
408 list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list,
409 base.link) {
410 /* if event's pipe isn't same as crtc then ignore it. */
411 if (crtc != e->pipe)
412 continue;
413
414 do_gettimeofday(&now);
415 e->event.sequence = 0;
416 e->event.tv_sec = now.tv_sec;
417 e->event.tv_usec = now.tv_usec;
418
419 list_move_tail(&e->base.link, &e->base.file_priv->event_list);
420 wake_up_interruptible(&e->base.file_priv->event_wait);
421 drm_vblank_put(dev, crtc);
422 }
423
424 spin_unlock_irqrestore(&dev->event_lock, flags);
425}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.h b/drivers/gpu/drm/exynos/exynos_drm_crtc.h
index 6bae8d8c250e..3e197e6ae7d9 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.h
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#ifndef _EXYNOS_DRM_CRTC_H_ 15#ifndef _EXYNOS_DRM_CRTC_H_
@@ -32,5 +18,6 @@
32int exynos_drm_crtc_create(struct drm_device *dev, unsigned int nr); 18int exynos_drm_crtc_create(struct drm_device *dev, unsigned int nr);
33int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int crtc); 19int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int crtc);
34void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int crtc); 20void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int crtc);
21void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int crtc);
35 22
36#endif 23#endif
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
index 61d5a8402eb8..9df97714b6c0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
@@ -3,24 +3,10 @@
3 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 * Author: Inki Dae <inki.dae@samsung.com> 4 * Author: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#include <drm/drmP.h> 12#include <drm/drmP.h>
@@ -222,7 +208,7 @@ struct dma_buf *exynos_dmabuf_prime_export(struct drm_device *drm_dev,
222 struct exynos_drm_gem_obj *exynos_gem_obj = to_exynos_gem_obj(obj); 208 struct exynos_drm_gem_obj *exynos_gem_obj = to_exynos_gem_obj(obj);
223 209
224 return dma_buf_export(exynos_gem_obj, &exynos_dmabuf_ops, 210 return dma_buf_export(exynos_gem_obj, &exynos_dmabuf_ops,
225 exynos_gem_obj->base.size, 0600); 211 exynos_gem_obj->base.size, flags);
226} 212}
227 213
228struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev, 214struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev,
@@ -246,7 +232,12 @@ struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev,
246 232
247 /* is it from our device? */ 233 /* is it from our device? */
248 if (obj->dev == drm_dev) { 234 if (obj->dev == drm_dev) {
235 /*
236 * Importing dmabuf exported from out own gem increases
237 * refcount on gem itself instead of f_count of dmabuf.
238 */
249 drm_gem_object_reference(obj); 239 drm_gem_object_reference(obj);
240 dma_buf_put(dma_buf);
250 return obj; 241 return obj;
251 } 242 }
252 } 243 }
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.h b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.h
index 662a8f98ccdb..49acfafb4fdb 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.h
@@ -3,24 +3,10 @@
3 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 * Author: Inki Dae <inki.dae@samsung.com> 4 * Author: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#ifndef _EXYNOS_DRM_DMABUF_H_ 12#ifndef _EXYNOS_DRM_DMABUF_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index e0a8e8024b01..3da5c2d214d8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -5,24 +5,10 @@
5 * Joonyoung Shim <jy0922.shim@samsung.com> 5 * Joonyoung Shim <jy0922.shim@samsung.com>
6 * Seung-Woo Kim <sw0312.kim@samsung.com> 6 * Seung-Woo Kim <sw0312.kim@samsung.com>
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * This program is free software; you can redistribute it and/or modify it
9 * copy of this software and associated documentation files (the "Software"), 9 * under the terms of the GNU General Public License as published by the
10 * to deal in the Software without restriction, including without limitation 10 * Free Software Foundation; either version 2 of the License, or (at your
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * option) any later version.
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the next
16 * paragraph) shall be included in all copies or substantial portions of the
17 * Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 */ 12 */
27 13
28#include <drm/drmP.h> 14#include <drm/drmP.h>
@@ -325,7 +311,7 @@ static int exynos_drm_platform_remove(struct platform_device *pdev)
325 311
326static struct platform_driver exynos_drm_platform_driver = { 312static struct platform_driver exynos_drm_platform_driver = {
327 .probe = exynos_drm_platform_probe, 313 .probe = exynos_drm_platform_probe,
328 .remove = __devexit_p(exynos_drm_platform_remove), 314 .remove = exynos_drm_platform_remove,
329 .driver = { 315 .driver = {
330 .owner = THIS_MODULE, 316 .owner = THIS_MODULE,
331 .name = "exynos-drm", 317 .name = "exynos-drm",
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index f5a97745bf93..b9e51bc09e81 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#ifndef _EXYNOS_DRM_DRV_H_ 15#ifndef _EXYNOS_DRM_DRV_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index 301485215a70..c63721f64aec 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#include <drm/drmP.h> 15#include <drm/drmP.h>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.h b/drivers/gpu/drm/exynos/exynos_drm_encoder.h
index 88bb25a2a917..89e2fb0770af 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.h
@@ -5,24 +5,10 @@
5 * Joonyoung Shim <jy0922.shim@samsung.com> 5 * Joonyoung Shim <jy0922.shim@samsung.com>
6 * Seung-Woo Kim <sw0312.kim@samsung.com> 6 * Seung-Woo Kim <sw0312.kim@samsung.com>
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * This program is free software; you can redistribute it and/or modify it
9 * copy of this software and associated documentation files (the "Software"), 9 * under the terms of the GNU General Public License as published by the
10 * to deal in the Software without restriction, including without limitation 10 * Free Software Foundation; either version 2 of the License, or (at your
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * option) any later version.
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the next
16 * paragraph) shall be included in all copies or substantial portions of the
17 * Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 */ 12 */
27 13
28#ifndef _EXYNOS_DRM_ENCODER_H_ 14#ifndef _EXYNOS_DRM_ENCODER_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index 5426cc5a5e8d..294c0513f587 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#include <drm/drmP.h> 15#include <drm/drmP.h>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.h b/drivers/gpu/drm/exynos/exynos_drm_fb.h
index 96262e54f76d..517471b37566 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h
@@ -5,24 +5,10 @@
5 * Joonyoung Shim <jy0922.shim@samsung.com> 5 * Joonyoung Shim <jy0922.shim@samsung.com>
6 * Seung-Woo Kim <sw0312.kim@samsung.com> 6 * Seung-Woo Kim <sw0312.kim@samsung.com>
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * This program is free software; you can redistribute it and/or modify it
9 * copy of this software and associated documentation files (the "Software"), 9 * under the terms of the GNU General Public License as published by the
10 * to deal in the Software without restriction, including without limitation 10 * Free Software Foundation; either version 2 of the License, or (at your
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * option) any later version.
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the next
16 * paragraph) shall be included in all copies or substantial portions of the
17 * Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 */ 12 */
27 13
28#ifndef _EXYNOS_DRM_FB_H_ 14#ifndef _EXYNOS_DRM_FB_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index f433eb7533a9..71f867340a88 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#include <drm/drmP.h> 15#include <drm/drmP.h>
@@ -34,6 +20,7 @@
34#include "exynos_drm_drv.h" 20#include "exynos_drm_drv.h"
35#include "exynos_drm_fb.h" 21#include "exynos_drm_fb.h"
36#include "exynos_drm_gem.h" 22#include "exynos_drm_gem.h"
23#include "exynos_drm_iommu.h"
37 24
38#define MAX_CONNECTOR 4 25#define MAX_CONNECTOR 4
39#define PREFERRED_BPP 32 26#define PREFERRED_BPP 32
@@ -111,9 +98,18 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
111 98
112 /* map pages with kernel virtual space. */ 99 /* map pages with kernel virtual space. */
113 if (!buffer->kvaddr) { 100 if (!buffer->kvaddr) {
114 unsigned int nr_pages = buffer->size >> PAGE_SHIFT; 101 if (is_drm_iommu_supported(dev)) {
115 buffer->kvaddr = vmap(buffer->pages, nr_pages, VM_MAP, 102 unsigned int nr_pages = buffer->size >> PAGE_SHIFT;
103
104 buffer->kvaddr = vmap(buffer->pages, nr_pages, VM_MAP,
116 pgprot_writecombine(PAGE_KERNEL)); 105 pgprot_writecombine(PAGE_KERNEL));
106 } else {
107 phys_addr_t dma_addr = buffer->dma_addr;
108 if (dma_addr)
109 buffer->kvaddr = phys_to_virt(dma_addr);
110 else
111 buffer->kvaddr = (void __iomem *)NULL;
112 }
117 if (!buffer->kvaddr) { 113 if (!buffer->kvaddr) {
118 DRM_ERROR("failed to map pages to kernel space.\n"); 114 DRM_ERROR("failed to map pages to kernel space.\n");
119 return -EIO; 115 return -EIO;
@@ -128,8 +124,12 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
128 124
129 dev->mode_config.fb_base = (resource_size_t)buffer->dma_addr; 125 dev->mode_config.fb_base = (resource_size_t)buffer->dma_addr;
130 fbi->screen_base = buffer->kvaddr + offset; 126 fbi->screen_base = buffer->kvaddr + offset;
131 fbi->fix.smem_start = (unsigned long) 127 if (is_drm_iommu_supported(dev))
128 fbi->fix.smem_start = (unsigned long)
132 (page_to_phys(sg_page(buffer->sgt->sgl)) + offset); 129 (page_to_phys(sg_page(buffer->sgt->sgl)) + offset);
130 else
131 fbi->fix.smem_start = (unsigned long)buffer->dma_addr;
132
133 fbi->screen_size = size; 133 fbi->screen_size = size;
134 fbi->fix.smem_len = size; 134 fbi->fix.smem_len = size;
135 135
@@ -320,7 +320,7 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,
320 struct exynos_drm_gem_obj *exynos_gem_obj = exynos_fbd->exynos_gem_obj; 320 struct exynos_drm_gem_obj *exynos_gem_obj = exynos_fbd->exynos_gem_obj;
321 struct drm_framebuffer *fb; 321 struct drm_framebuffer *fb;
322 322
323 if (exynos_gem_obj->buffer->kvaddr) 323 if (is_drm_iommu_supported(dev) && exynos_gem_obj->buffer->kvaddr)
324 vunmap(exynos_gem_obj->buffer->kvaddr); 324 vunmap(exynos_gem_obj->buffer->kvaddr);
325 325
326 /* release drm framebuffer and real buffer */ 326 /* release drm framebuffer and real buffer */
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h
index ccfce8a1a451..e16d7f0ae192 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#ifndef _EXYNOS_DRM_FBDEV_H_ 15#ifndef _EXYNOS_DRM_FBDEV_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 61ea24296b52..67a83e69544b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -25,7 +25,7 @@
25#include "exynos_drm_fimc.h" 25#include "exynos_drm_fimc.h"
26 26
27/* 27/*
28 * FIMC is stand for Fully Interactive Mobile Camera and 28 * FIMC stands for Fully Interactive Mobile Camera and
29 * supports image scaler/rotator and input/output DMA operations. 29 * supports image scaler/rotator and input/output DMA operations.
30 * input DMA reads image data from the memory. 30 * input DMA reads image data from the memory.
31 * output DMA writes image data to memory. 31 * output DMA writes image data to memory.
@@ -163,19 +163,29 @@ struct fimc_context {
163 bool suspended; 163 bool suspended;
164}; 164};
165 165
166static void fimc_sw_reset(struct fimc_context *ctx, bool pattern) 166static void fimc_sw_reset(struct fimc_context *ctx)
167{ 167{
168 u32 cfg; 168 u32 cfg;
169 169
170 DRM_DEBUG_KMS("%s:pattern[%d]\n", __func__, pattern); 170 DRM_DEBUG_KMS("%s\n", __func__);
171
172 /* stop dma operation */
173 cfg = fimc_read(EXYNOS_CISTATUS);
174 if (EXYNOS_CISTATUS_GET_ENVID_STATUS(cfg)) {
175 cfg = fimc_read(EXYNOS_MSCTRL);
176 cfg &= ~EXYNOS_MSCTRL_ENVID;
177 fimc_write(cfg, EXYNOS_MSCTRL);
178 }
171 179
172 cfg = fimc_read(EXYNOS_CISRCFMT); 180 cfg = fimc_read(EXYNOS_CISRCFMT);
173 cfg |= EXYNOS_CISRCFMT_ITU601_8BIT; 181 cfg |= EXYNOS_CISRCFMT_ITU601_8BIT;
174 if (pattern)
175 cfg |= EXYNOS_CIGCTRL_TESTPATTERN_COLOR_BAR;
176
177 fimc_write(cfg, EXYNOS_CISRCFMT); 182 fimc_write(cfg, EXYNOS_CISRCFMT);
178 183
184 /* disable image capture */
185 cfg = fimc_read(EXYNOS_CIIMGCPT);
186 cfg &= ~(EXYNOS_CIIMGCPT_IMGCPTEN_SC | EXYNOS_CIIMGCPT_IMGCPTEN);
187 fimc_write(cfg, EXYNOS_CIIMGCPT);
188
179 /* s/w reset */ 189 /* s/w reset */
180 cfg = fimc_read(EXYNOS_CIGCTRL); 190 cfg = fimc_read(EXYNOS_CIGCTRL);
181 cfg |= (EXYNOS_CIGCTRL_SWRST); 191 cfg |= (EXYNOS_CIGCTRL_SWRST);
@@ -695,7 +705,7 @@ static int fimc_src_set_addr(struct device *dev,
695{ 705{
696 struct fimc_context *ctx = get_fimc_context(dev); 706 struct fimc_context *ctx = get_fimc_context(dev);
697 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 707 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
698 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; 708 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
699 struct drm_exynos_ipp_property *property; 709 struct drm_exynos_ipp_property *property;
700 struct drm_exynos_ipp_config *config; 710 struct drm_exynos_ipp_config *config;
701 711
@@ -705,10 +715,6 @@ static int fimc_src_set_addr(struct device *dev,
705 } 715 }
706 716
707 property = &c_node->property; 717 property = &c_node->property;
708 if (!property) {
709 DRM_ERROR("failed to get property.\n");
710 return -EINVAL;
711 }
712 718
713 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, 719 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__,
714 property->prop_id, buf_id, buf_type); 720 property->prop_id, buf_id, buf_type);
@@ -1206,7 +1212,7 @@ static int fimc_dst_set_buf_seq(struct fimc_context *ctx, u32 buf_id,
1206 } 1212 }
1207 1213
1208 /* sequence id */ 1214 /* sequence id */
1209 cfg &= (~mask); 1215 cfg &= ~mask;
1210 cfg |= (enable << buf_id); 1216 cfg |= (enable << buf_id);
1211 fimc_write(cfg, EXYNOS_CIFCNTSEQ); 1217 fimc_write(cfg, EXYNOS_CIFCNTSEQ);
1212 1218
@@ -1231,7 +1237,7 @@ static int fimc_dst_set_addr(struct device *dev,
1231{ 1237{
1232 struct fimc_context *ctx = get_fimc_context(dev); 1238 struct fimc_context *ctx = get_fimc_context(dev);
1233 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 1239 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
1234 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; 1240 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
1235 struct drm_exynos_ipp_property *property; 1241 struct drm_exynos_ipp_property *property;
1236 struct drm_exynos_ipp_config *config; 1242 struct drm_exynos_ipp_config *config;
1237 1243
@@ -1241,10 +1247,6 @@ static int fimc_dst_set_addr(struct device *dev,
1241 } 1247 }
1242 1248
1243 property = &c_node->property; 1249 property = &c_node->property;
1244 if (!property) {
1245 DRM_ERROR("failed to get property.\n");
1246 return -EINVAL;
1247 }
1248 1250
1249 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, 1251 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__,
1250 property->prop_id, buf_id, buf_type); 1252 property->prop_id, buf_id, buf_type);
@@ -1317,7 +1319,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
1317{ 1319{
1318 struct fimc_context *ctx = dev_id; 1320 struct fimc_context *ctx = dev_id;
1319 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 1321 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
1320 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; 1322 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
1321 struct drm_exynos_ipp_event_work *event_work = 1323 struct drm_exynos_ipp_event_work *event_work =
1322 c_node->event_work; 1324 c_node->event_work;
1323 int buf_id; 1325 int buf_id;
@@ -1395,6 +1397,7 @@ static inline bool fimc_check_drm_flip(enum drm_exynos_flip flip)
1395 case EXYNOS_DRM_FLIP_NONE: 1397 case EXYNOS_DRM_FLIP_NONE:
1396 case EXYNOS_DRM_FLIP_VERTICAL: 1398 case EXYNOS_DRM_FLIP_VERTICAL:
1397 case EXYNOS_DRM_FLIP_HORIZONTAL: 1399 case EXYNOS_DRM_FLIP_HORIZONTAL:
1400 case EXYNOS_DRM_FLIP_BOTH:
1398 return true; 1401 return true;
1399 default: 1402 default:
1400 DRM_DEBUG_KMS("%s:invalid flip\n", __func__); 1403 DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
@@ -1543,7 +1546,7 @@ static int fimc_ippdrv_reset(struct device *dev)
1543 DRM_DEBUG_KMS("%s\n", __func__); 1546 DRM_DEBUG_KMS("%s\n", __func__);
1544 1547
1545 /* reset h/w block */ 1548 /* reset h/w block */
1546 fimc_sw_reset(ctx, false); 1549 fimc_sw_reset(ctx);
1547 1550
1548 /* reset scaler capability */ 1551 /* reset scaler capability */
1549 memset(&ctx->sc, 0x0, sizeof(ctx->sc)); 1552 memset(&ctx->sc, 0x0, sizeof(ctx->sc));
@@ -1557,7 +1560,7 @@ static int fimc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1557{ 1560{
1558 struct fimc_context *ctx = get_fimc_context(dev); 1561 struct fimc_context *ctx = get_fimc_context(dev);
1559 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 1562 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
1560 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; 1563 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
1561 struct drm_exynos_ipp_property *property; 1564 struct drm_exynos_ipp_property *property;
1562 struct drm_exynos_ipp_config *config; 1565 struct drm_exynos_ipp_config *config;
1563 struct drm_exynos_pos img_pos[EXYNOS_DRM_OPS_MAX]; 1566 struct drm_exynos_pos img_pos[EXYNOS_DRM_OPS_MAX];
@@ -1573,10 +1576,6 @@ static int fimc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1573 } 1576 }
1574 1577
1575 property = &c_node->property; 1578 property = &c_node->property;
1576 if (!property) {
1577 DRM_ERROR("failed to get property.\n");
1578 return -EINVAL;
1579 }
1580 1579
1581 fimc_handle_irq(ctx, true, false, true); 1580 fimc_handle_irq(ctx, true, false, true);
1582 1581
@@ -1714,7 +1713,7 @@ static void fimc_ippdrv_stop(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1714 fimc_write(cfg, EXYNOS_CIGCTRL); 1713 fimc_write(cfg, EXYNOS_CIGCTRL);
1715} 1714}
1716 1715
1717static int __devinit fimc_probe(struct platform_device *pdev) 1716static int fimc_probe(struct platform_device *pdev)
1718{ 1717{
1719 struct device *dev = &pdev->dev; 1718 struct device *dev = &pdev->dev;
1720 struct fimc_context *ctx; 1719 struct fimc_context *ctx;
@@ -1739,93 +1738,64 @@ static int __devinit fimc_probe(struct platform_device *pdev)
1739 platform_get_device_id(pdev)->driver_data; 1738 platform_get_device_id(pdev)->driver_data;
1740 1739
1741 /* clock control */ 1740 /* clock control */
1742 ctx->sclk_fimc_clk = clk_get(dev, "sclk_fimc"); 1741 ctx->sclk_fimc_clk = devm_clk_get(dev, "sclk_fimc");
1743 if (IS_ERR(ctx->sclk_fimc_clk)) { 1742 if (IS_ERR(ctx->sclk_fimc_clk)) {
1744 dev_err(dev, "failed to get src fimc clock.\n"); 1743 dev_err(dev, "failed to get src fimc clock.\n");
1745 ret = PTR_ERR(ctx->sclk_fimc_clk); 1744 return PTR_ERR(ctx->sclk_fimc_clk);
1746 goto err_ctx;
1747 } 1745 }
1748 clk_enable(ctx->sclk_fimc_clk); 1746 clk_enable(ctx->sclk_fimc_clk);
1749 1747
1750 ctx->fimc_clk = clk_get(dev, "fimc"); 1748 ctx->fimc_clk = devm_clk_get(dev, "fimc");
1751 if (IS_ERR(ctx->fimc_clk)) { 1749 if (IS_ERR(ctx->fimc_clk)) {
1752 dev_err(dev, "failed to get fimc clock.\n"); 1750 dev_err(dev, "failed to get fimc clock.\n");
1753 ret = PTR_ERR(ctx->fimc_clk);
1754 clk_disable(ctx->sclk_fimc_clk); 1751 clk_disable(ctx->sclk_fimc_clk);
1755 clk_put(ctx->sclk_fimc_clk); 1752 return PTR_ERR(ctx->fimc_clk);
1756 goto err_ctx;
1757 } 1753 }
1758 1754
1759 ctx->wb_clk = clk_get(dev, "pxl_async0"); 1755 ctx->wb_clk = devm_clk_get(dev, "pxl_async0");
1760 if (IS_ERR(ctx->wb_clk)) { 1756 if (IS_ERR(ctx->wb_clk)) {
1761 dev_err(dev, "failed to get writeback a clock.\n"); 1757 dev_err(dev, "failed to get writeback a clock.\n");
1762 ret = PTR_ERR(ctx->wb_clk);
1763 clk_disable(ctx->sclk_fimc_clk); 1758 clk_disable(ctx->sclk_fimc_clk);
1764 clk_put(ctx->sclk_fimc_clk); 1759 return PTR_ERR(ctx->wb_clk);
1765 clk_put(ctx->fimc_clk);
1766 goto err_ctx;
1767 } 1760 }
1768 1761
1769 ctx->wb_b_clk = clk_get(dev, "pxl_async1"); 1762 ctx->wb_b_clk = devm_clk_get(dev, "pxl_async1");
1770 if (IS_ERR(ctx->wb_b_clk)) { 1763 if (IS_ERR(ctx->wb_b_clk)) {
1771 dev_err(dev, "failed to get writeback b clock.\n"); 1764 dev_err(dev, "failed to get writeback b clock.\n");
1772 ret = PTR_ERR(ctx->wb_b_clk);
1773 clk_disable(ctx->sclk_fimc_clk); 1765 clk_disable(ctx->sclk_fimc_clk);
1774 clk_put(ctx->sclk_fimc_clk); 1766 return PTR_ERR(ctx->wb_b_clk);
1775 clk_put(ctx->fimc_clk);
1776 clk_put(ctx->wb_clk);
1777 goto err_ctx;
1778 } 1767 }
1779 1768
1780 parent_clk = clk_get(dev, ddata->parent_clk); 1769 parent_clk = devm_clk_get(dev, ddata->parent_clk);
1781 1770
1782 if (IS_ERR(parent_clk)) { 1771 if (IS_ERR(parent_clk)) {
1783 dev_err(dev, "failed to get parent clock.\n"); 1772 dev_err(dev, "failed to get parent clock.\n");
1784 ret = PTR_ERR(parent_clk);
1785 clk_disable(ctx->sclk_fimc_clk); 1773 clk_disable(ctx->sclk_fimc_clk);
1786 clk_put(ctx->sclk_fimc_clk); 1774 return PTR_ERR(parent_clk);
1787 clk_put(ctx->fimc_clk);
1788 clk_put(ctx->wb_clk);
1789 clk_put(ctx->wb_b_clk);
1790 goto err_ctx;
1791 } 1775 }
1792 1776
1793 if (clk_set_parent(ctx->sclk_fimc_clk, parent_clk)) { 1777 if (clk_set_parent(ctx->sclk_fimc_clk, parent_clk)) {
1794 dev_err(dev, "failed to set parent.\n"); 1778 dev_err(dev, "failed to set parent.\n");
1795 ret = -EINVAL;
1796 clk_put(parent_clk);
1797 clk_disable(ctx->sclk_fimc_clk); 1779 clk_disable(ctx->sclk_fimc_clk);
1798 clk_put(ctx->sclk_fimc_clk); 1780 return -EINVAL;
1799 clk_put(ctx->fimc_clk);
1800 clk_put(ctx->wb_clk);
1801 clk_put(ctx->wb_b_clk);
1802 goto err_ctx;
1803 } 1781 }
1804 1782
1805 clk_put(parent_clk); 1783 devm_clk_put(dev, parent_clk);
1806 clk_set_rate(ctx->sclk_fimc_clk, pdata->clk_rate); 1784 clk_set_rate(ctx->sclk_fimc_clk, pdata->clk_rate);
1807 1785
1808 /* resource memory */ 1786 /* resource memory */
1809 ctx->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1787 ctx->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1810 if (!ctx->regs_res) {
1811 dev_err(dev, "failed to find registers.\n");
1812 ret = -ENOENT;
1813 goto err_clk;
1814 }
1815
1816 ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res); 1788 ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res);
1817 if (!ctx->regs) { 1789 if (!ctx->regs) {
1818 dev_err(dev, "failed to map registers.\n"); 1790 dev_err(dev, "failed to map registers.\n");
1819 ret = -ENXIO; 1791 return -ENXIO;
1820 goto err_clk;
1821 } 1792 }
1822 1793
1823 /* resource irq */ 1794 /* resource irq */
1824 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 1795 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
1825 if (!res) { 1796 if (!res) {
1826 dev_err(dev, "failed to request irq resource.\n"); 1797 dev_err(dev, "failed to request irq resource.\n");
1827 ret = -ENOENT; 1798 return -ENOENT;
1828 goto err_get_regs;
1829 } 1799 }
1830 1800
1831 ctx->irq = res->start; 1801 ctx->irq = res->start;
@@ -1833,7 +1803,7 @@ static int __devinit fimc_probe(struct platform_device *pdev)
1833 IRQF_ONESHOT, "drm_fimc", ctx); 1803 IRQF_ONESHOT, "drm_fimc", ctx);
1834 if (ret < 0) { 1804 if (ret < 0) {
1835 dev_err(dev, "failed to request irq.\n"); 1805 dev_err(dev, "failed to request irq.\n");
1836 goto err_get_regs; 1806 return ret;
1837 } 1807 }
1838 1808
1839 /* context initailization */ 1809 /* context initailization */
@@ -1879,19 +1849,11 @@ err_ippdrv_register:
1879 pm_runtime_disable(dev); 1849 pm_runtime_disable(dev);
1880err_get_irq: 1850err_get_irq:
1881 free_irq(ctx->irq, ctx); 1851 free_irq(ctx->irq, ctx);
1882err_get_regs: 1852
1883 devm_iounmap(dev, ctx->regs);
1884err_clk:
1885 clk_put(ctx->sclk_fimc_clk);
1886 clk_put(ctx->fimc_clk);
1887 clk_put(ctx->wb_clk);
1888 clk_put(ctx->wb_b_clk);
1889err_ctx:
1890 devm_kfree(dev, ctx);
1891 return ret; 1853 return ret;
1892} 1854}
1893 1855
1894static int __devexit fimc_remove(struct platform_device *pdev) 1856static int fimc_remove(struct platform_device *pdev)
1895{ 1857{
1896 struct device *dev = &pdev->dev; 1858 struct device *dev = &pdev->dev;
1897 struct fimc_context *ctx = get_fimc_context(dev); 1859 struct fimc_context *ctx = get_fimc_context(dev);
@@ -1905,14 +1867,6 @@ static int __devexit fimc_remove(struct platform_device *pdev)
1905 pm_runtime_disable(dev); 1867 pm_runtime_disable(dev);
1906 1868
1907 free_irq(ctx->irq, ctx); 1869 free_irq(ctx->irq, ctx);
1908 devm_iounmap(dev, ctx->regs);
1909
1910 clk_put(ctx->sclk_fimc_clk);
1911 clk_put(ctx->fimc_clk);
1912 clk_put(ctx->wb_clk);
1913 clk_put(ctx->wb_b_clk);
1914
1915 devm_kfree(dev, ctx);
1916 1870
1917 return 0; 1871 return 0;
1918} 1872}
@@ -1990,7 +1944,7 @@ static const struct dev_pm_ops fimc_pm_ops = {
1990 1944
1991struct platform_driver fimc_driver = { 1945struct platform_driver fimc_driver = {
1992 .probe = fimc_probe, 1946 .probe = fimc_probe,
1993 .remove = __devexit_p(fimc_remove), 1947 .remove = fimc_remove,
1994 .id_table = fimc_driver_ids, 1948 .id_table = fimc_driver_ids,
1995 .driver = { 1949 .driver = {
1996 .name = "exynos-drm-fimc", 1950 .name = "exynos-drm-fimc",
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.h b/drivers/gpu/drm/exynos/exynos_drm_fimc.h
index dc970fa0d888..127a424c5fdf 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.h
@@ -6,24 +6,10 @@
6 * Jinyoung Jeon <jy0.jeon@samsung.com> 6 * Jinyoung Jeon <jy0.jeon@samsung.com>
7 * Sangmin Lee <lsmin.lee@samsung.com> 7 * Sangmin Lee <lsmin.lee@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#ifndef _EXYNOS_DRM_FIMC_H_ 15#ifndef _EXYNOS_DRM_FIMC_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index bf0d9baca2bc..9537761931ee 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -663,34 +663,6 @@ static struct exynos_drm_manager fimd_manager = {
663 .display_ops = &fimd_display_ops, 663 .display_ops = &fimd_display_ops,
664}; 664};
665 665
666static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
667{
668 struct exynos_drm_private *dev_priv = drm_dev->dev_private;
669 struct drm_pending_vblank_event *e, *t;
670 struct timeval now;
671 unsigned long flags;
672
673 spin_lock_irqsave(&drm_dev->event_lock, flags);
674
675 list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list,
676 base.link) {
677 /* if event's pipe isn't same as crtc then ignore it. */
678 if (crtc != e->pipe)
679 continue;
680
681 do_gettimeofday(&now);
682 e->event.sequence = 0;
683 e->event.tv_sec = now.tv_sec;
684 e->event.tv_usec = now.tv_usec;
685
686 list_move_tail(&e->base.link, &e->base.file_priv->event_list);
687 wake_up_interruptible(&e->base.file_priv->event_wait);
688 drm_vblank_put(drm_dev, crtc);
689 }
690
691 spin_unlock_irqrestore(&drm_dev->event_lock, flags);
692}
693
694static irqreturn_t fimd_irq_handler(int irq, void *dev_id) 666static irqreturn_t fimd_irq_handler(int irq, void *dev_id)
695{ 667{
696 struct fimd_context *ctx = (struct fimd_context *)dev_id; 668 struct fimd_context *ctx = (struct fimd_context *)dev_id;
@@ -710,7 +682,7 @@ static irqreturn_t fimd_irq_handler(int irq, void *dev_id)
710 goto out; 682 goto out;
711 683
712 drm_handle_vblank(drm_dev, manager->pipe); 684 drm_handle_vblank(drm_dev, manager->pipe);
713 fimd_finish_pageflip(drm_dev, manager->pipe); 685 exynos_drm_crtc_finish_pageflip(drm_dev, manager->pipe);
714 686
715 /* set wait vsync event to zero and wake up queue. */ 687 /* set wait vsync event to zero and wake up queue. */
716 if (atomic_read(&ctx->wait_vsync_event)) { 688 if (atomic_read(&ctx->wait_vsync_event)) {
@@ -898,7 +870,7 @@ static int fimd_activate(struct fimd_context *ctx, bool enable)
898 return 0; 870 return 0;
899} 871}
900 872
901static int __devinit fimd_probe(struct platform_device *pdev) 873static int fimd_probe(struct platform_device *pdev)
902{ 874{
903 struct device *dev = &pdev->dev; 875 struct device *dev = &pdev->dev;
904 struct fimd_context *ctx; 876 struct fimd_context *ctx;
@@ -997,7 +969,7 @@ static int __devinit fimd_probe(struct platform_device *pdev)
997 return 0; 969 return 0;
998} 970}
999 971
1000static int __devexit fimd_remove(struct platform_device *pdev) 972static int fimd_remove(struct platform_device *pdev)
1001{ 973{
1002 struct device *dev = &pdev->dev; 974 struct device *dev = &pdev->dev;
1003 struct fimd_context *ctx = platform_get_drvdata(pdev); 975 struct fimd_context *ctx = platform_get_drvdata(pdev);
@@ -1046,7 +1018,7 @@ static int fimd_resume(struct device *dev)
1046 * of pm runtime would still be 1 so in this case, fimd driver 1018 * of pm runtime would still be 1 so in this case, fimd driver
1047 * should be on directly not drawing on pm runtime interface. 1019 * should be on directly not drawing on pm runtime interface.
1048 */ 1020 */
1049 if (pm_runtime_suspended(dev)) { 1021 if (!pm_runtime_suspended(dev)) {
1050 int ret; 1022 int ret;
1051 1023
1052 ret = fimd_activate(ctx, true); 1024 ret = fimd_activate(ctx, true);
@@ -1105,7 +1077,7 @@ static const struct dev_pm_ops fimd_pm_ops = {
1105 1077
1106struct platform_driver fimd_driver = { 1078struct platform_driver fimd_driver = {
1107 .probe = fimd_probe, 1079 .probe = fimd_probe,
1108 .remove = __devexit_p(fimd_remove), 1080 .remove = fimd_remove,
1109 .id_table = fimd_driver_ids, 1081 .id_table = fimd_driver_ids,
1110 .driver = { 1082 .driver = {
1111 .name = "exynos4-fb", 1083 .name = "exynos4-fb",
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index 6ffa0763c078..36c3905536a6 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -1090,7 +1090,7 @@ static void g2d_close(struct drm_device *drm_dev, struct device *dev,
1090 kfree(file_priv->g2d_priv); 1090 kfree(file_priv->g2d_priv);
1091} 1091}
1092 1092
1093static int __devinit g2d_probe(struct platform_device *pdev) 1093static int g2d_probe(struct platform_device *pdev)
1094{ 1094{
1095 struct device *dev = &pdev->dev; 1095 struct device *dev = &pdev->dev;
1096 struct resource *res; 1096 struct resource *res;
@@ -1188,7 +1188,7 @@ err_destroy_slab:
1188 return ret; 1188 return ret;
1189} 1189}
1190 1190
1191static int __devexit g2d_remove(struct platform_device *pdev) 1191static int g2d_remove(struct platform_device *pdev)
1192{ 1192{
1193 struct g2d_data *g2d = platform_get_drvdata(pdev); 1193 struct g2d_data *g2d = platform_get_drvdata(pdev);
1194 1194
@@ -1242,7 +1242,7 @@ static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume);
1242 1242
1243struct platform_driver g2d_driver = { 1243struct platform_driver g2d_driver = {
1244 .probe = g2d_probe, 1244 .probe = g2d_probe,
1245 .remove = __devexit_p(g2d_remove), 1245 .remove = g2d_remove,
1246 .driver = { 1246 .driver = {
1247 .name = "s5p-g2d", 1247 .name = "s5p-g2d",
1248 .owner = THIS_MODULE, 1248 .owner = THIS_MODULE,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
index d48183e7e056..473180776528 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
@@ -3,24 +3,10 @@
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * Author: Inki Dae <inki.dae@samsung.com> 4 * Author: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#include <drm/drmP.h> 12#include <drm/drmP.h>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.h b/drivers/gpu/drm/exynos/exynos_drm_gem.h
index f11f2afd5bfc..35ebac47dc2b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.h
@@ -3,24 +3,10 @@
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * Authoer: Inki Dae <inki.dae@samsung.com> 4 * Authoer: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#ifndef _EXYNOS_DRM_GEM_H_ 12#ifndef _EXYNOS_DRM_GEM_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index 5639353d47b9..8140753ec9c8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -25,7 +25,7 @@
25#include "exynos_drm_gsc.h" 25#include "exynos_drm_gsc.h"
26 26
27/* 27/*
28 * GSC is stand for General SCaler and 28 * GSC stands for General SCaler and
29 * supports image scaler/rotator and input/output DMA operations. 29 * supports image scaler/rotator and input/output DMA operations.
30 * input DMA reads image data from the memory. 30 * input DMA reads image data from the memory.
31 * output DMA writes image data to memory. 31 * output DMA writes image data to memory.
@@ -711,7 +711,7 @@ static int gsc_src_set_addr(struct device *dev,
711{ 711{
712 struct gsc_context *ctx = get_gsc_context(dev); 712 struct gsc_context *ctx = get_gsc_context(dev);
713 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 713 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
714 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; 714 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
715 struct drm_exynos_ipp_property *property; 715 struct drm_exynos_ipp_property *property;
716 716
717 if (!c_node) { 717 if (!c_node) {
@@ -720,10 +720,6 @@ static int gsc_src_set_addr(struct device *dev,
720 } 720 }
721 721
722 property = &c_node->property; 722 property = &c_node->property;
723 if (!property) {
724 DRM_ERROR("failed to get property.\n");
725 return -EFAULT;
726 }
727 723
728 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, 724 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__,
729 property->prop_id, buf_id, buf_type); 725 property->prop_id, buf_id, buf_type);
@@ -1171,7 +1167,7 @@ static int gsc_dst_set_addr(struct device *dev,
1171{ 1167{
1172 struct gsc_context *ctx = get_gsc_context(dev); 1168 struct gsc_context *ctx = get_gsc_context(dev);
1173 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 1169 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
1174 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; 1170 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
1175 struct drm_exynos_ipp_property *property; 1171 struct drm_exynos_ipp_property *property;
1176 1172
1177 if (!c_node) { 1173 if (!c_node) {
@@ -1180,10 +1176,6 @@ static int gsc_dst_set_addr(struct device *dev,
1180 } 1176 }
1181 1177
1182 property = &c_node->property; 1178 property = &c_node->property;
1183 if (!property) {
1184 DRM_ERROR("failed to get property.\n");
1185 return -EFAULT;
1186 }
1187 1179
1188 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, 1180 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__,
1189 property->prop_id, buf_id, buf_type); 1181 property->prop_id, buf_id, buf_type);
@@ -1312,7 +1304,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
1312{ 1304{
1313 struct gsc_context *ctx = dev_id; 1305 struct gsc_context *ctx = dev_id;
1314 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 1306 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
1315 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; 1307 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
1316 struct drm_exynos_ipp_event_work *event_work = 1308 struct drm_exynos_ipp_event_work *event_work =
1317 c_node->event_work; 1309 c_node->event_work;
1318 u32 status; 1310 u32 status;
@@ -1399,7 +1391,7 @@ static inline bool gsc_check_drm_flip(enum drm_exynos_flip flip)
1399 case EXYNOS_DRM_FLIP_NONE: 1391 case EXYNOS_DRM_FLIP_NONE:
1400 case EXYNOS_DRM_FLIP_VERTICAL: 1392 case EXYNOS_DRM_FLIP_VERTICAL:
1401 case EXYNOS_DRM_FLIP_HORIZONTAL: 1393 case EXYNOS_DRM_FLIP_HORIZONTAL:
1402 case EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL: 1394 case EXYNOS_DRM_FLIP_BOTH:
1403 return true; 1395 return true;
1404 default: 1396 default:
1405 DRM_DEBUG_KMS("%s:invalid flip\n", __func__); 1397 DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
@@ -1549,7 +1541,7 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1549{ 1541{
1550 struct gsc_context *ctx = get_gsc_context(dev); 1542 struct gsc_context *ctx = get_gsc_context(dev);
1551 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 1543 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
1552 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; 1544 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
1553 struct drm_exynos_ipp_property *property; 1545 struct drm_exynos_ipp_property *property;
1554 struct drm_exynos_ipp_config *config; 1546 struct drm_exynos_ipp_config *config;
1555 struct drm_exynos_pos img_pos[EXYNOS_DRM_OPS_MAX]; 1547 struct drm_exynos_pos img_pos[EXYNOS_DRM_OPS_MAX];
@@ -1565,10 +1557,6 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1565 } 1557 }
1566 1558
1567 property = &c_node->property; 1559 property = &c_node->property;
1568 if (!property) {
1569 DRM_ERROR("failed to get property.\n");
1570 return -EINVAL;
1571 }
1572 1560
1573 gsc_handle_irq(ctx, true, false, true); 1561 gsc_handle_irq(ctx, true, false, true);
1574 1562
@@ -1604,7 +1592,7 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1604 exynos_drm_ippnb_send_event(IPP_SET_WRITEBACK, (void *)&set_wb); 1592 exynos_drm_ippnb_send_event(IPP_SET_WRITEBACK, (void *)&set_wb);
1605 1593
1606 /* src local path */ 1594 /* src local path */
1607 cfg = readl(GSC_IN_CON); 1595 cfg = gsc_read(GSC_IN_CON);
1608 cfg &= ~(GSC_IN_PATH_MASK | GSC_IN_LOCAL_SEL_MASK); 1596 cfg &= ~(GSC_IN_PATH_MASK | GSC_IN_LOCAL_SEL_MASK);
1609 cfg |= (GSC_IN_PATH_LOCAL | GSC_IN_LOCAL_FIMD_WB); 1597 cfg |= (GSC_IN_PATH_LOCAL | GSC_IN_LOCAL_FIMD_WB);
1610 gsc_write(cfg, GSC_IN_CON); 1598 gsc_write(cfg, GSC_IN_CON);
@@ -1683,7 +1671,7 @@ static void gsc_ippdrv_stop(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1683 gsc_write(cfg, GSC_ENABLE); 1671 gsc_write(cfg, GSC_ENABLE);
1684} 1672}
1685 1673
1686static int __devinit gsc_probe(struct platform_device *pdev) 1674static int gsc_probe(struct platform_device *pdev)
1687{ 1675{
1688 struct device *dev = &pdev->dev; 1676 struct device *dev = &pdev->dev;
1689 struct gsc_context *ctx; 1677 struct gsc_context *ctx;
@@ -1696,34 +1684,25 @@ static int __devinit gsc_probe(struct platform_device *pdev)
1696 return -ENOMEM; 1684 return -ENOMEM;
1697 1685
1698 /* clock control */ 1686 /* clock control */
1699 ctx->gsc_clk = clk_get(dev, "gscl"); 1687 ctx->gsc_clk = devm_clk_get(dev, "gscl");
1700 if (IS_ERR(ctx->gsc_clk)) { 1688 if (IS_ERR(ctx->gsc_clk)) {
1701 dev_err(dev, "failed to get gsc clock.\n"); 1689 dev_err(dev, "failed to get gsc clock.\n");
1702 ret = PTR_ERR(ctx->gsc_clk); 1690 return PTR_ERR(ctx->gsc_clk);
1703 goto err_ctx;
1704 } 1691 }
1705 1692
1706 /* resource memory */ 1693 /* resource memory */
1707 ctx->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1694 ctx->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1708 if (!ctx->regs_res) {
1709 dev_err(dev, "failed to find registers.\n");
1710 ret = -ENOENT;
1711 goto err_clk;
1712 }
1713
1714 ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res); 1695 ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res);
1715 if (!ctx->regs) { 1696 if (!ctx->regs) {
1716 dev_err(dev, "failed to map registers.\n"); 1697 dev_err(dev, "failed to map registers.\n");
1717 ret = -ENXIO; 1698 return -ENXIO;
1718 goto err_clk;
1719 } 1699 }
1720 1700
1721 /* resource irq */ 1701 /* resource irq */
1722 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 1702 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
1723 if (!res) { 1703 if (!res) {
1724 dev_err(dev, "failed to request irq resource.\n"); 1704 dev_err(dev, "failed to request irq resource.\n");
1725 ret = -ENOENT; 1705 return -ENOENT;
1726 goto err_get_regs;
1727 } 1706 }
1728 1707
1729 ctx->irq = res->start; 1708 ctx->irq = res->start;
@@ -1731,7 +1710,7 @@ static int __devinit gsc_probe(struct platform_device *pdev)
1731 IRQF_ONESHOT, "drm_gsc", ctx); 1710 IRQF_ONESHOT, "drm_gsc", ctx);
1732 if (ret < 0) { 1711 if (ret < 0) {
1733 dev_err(dev, "failed to request irq.\n"); 1712 dev_err(dev, "failed to request irq.\n");
1734 goto err_get_regs; 1713 return ret;
1735 } 1714 }
1736 1715
1737 /* context initailization */ 1716 /* context initailization */
@@ -1775,16 +1754,10 @@ err_ippdrv_register:
1775 pm_runtime_disable(dev); 1754 pm_runtime_disable(dev);
1776err_get_irq: 1755err_get_irq:
1777 free_irq(ctx->irq, ctx); 1756 free_irq(ctx->irq, ctx);
1778err_get_regs:
1779 devm_iounmap(dev, ctx->regs);
1780err_clk:
1781 clk_put(ctx->gsc_clk);
1782err_ctx:
1783 devm_kfree(dev, ctx);
1784 return ret; 1757 return ret;
1785} 1758}
1786 1759
1787static int __devexit gsc_remove(struct platform_device *pdev) 1760static int gsc_remove(struct platform_device *pdev)
1788{ 1761{
1789 struct device *dev = &pdev->dev; 1762 struct device *dev = &pdev->dev;
1790 struct gsc_context *ctx = get_gsc_context(dev); 1763 struct gsc_context *ctx = get_gsc_context(dev);
@@ -1798,11 +1771,6 @@ static int __devexit gsc_remove(struct platform_device *pdev)
1798 pm_runtime_disable(dev); 1771 pm_runtime_disable(dev);
1799 1772
1800 free_irq(ctx->irq, ctx); 1773 free_irq(ctx->irq, ctx);
1801 devm_iounmap(dev, ctx->regs);
1802
1803 clk_put(ctx->gsc_clk);
1804
1805 devm_kfree(dev, ctx);
1806 1774
1807 return 0; 1775 return 0;
1808} 1776}
@@ -1860,7 +1828,7 @@ static const struct dev_pm_ops gsc_pm_ops = {
1860 1828
1861struct platform_driver gsc_driver = { 1829struct platform_driver gsc_driver = {
1862 .probe = gsc_probe, 1830 .probe = gsc_probe,
1863 .remove = __devexit_p(gsc_remove), 1831 .remove = gsc_remove,
1864 .driver = { 1832 .driver = {
1865 .name = "exynos-drm-gsc", 1833 .name = "exynos-drm-gsc",
1866 .owner = THIS_MODULE, 1834 .owner = THIS_MODULE,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.h b/drivers/gpu/drm/exynos/exynos_drm_gsc.h
index b3c3bc618c0f..29ec1c5efcf2 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.h
@@ -6,24 +6,10 @@
6 * Jinyoung Jeon <jy0.jeon@samsung.com> 6 * Jinyoung Jeon <jy0.jeon@samsung.com>
7 * Sangmin Lee <lsmin.lee@samsung.com> 7 * Sangmin Lee <lsmin.lee@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#ifndef _EXYNOS_DRM_GSC_H_ 15#ifndef _EXYNOS_DRM_GSC_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
index 55793c46e3c2..850e9950b7da 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
@@ -385,7 +385,7 @@ static void hdmi_subdrv_remove(struct drm_device *drm_dev, struct device *dev)
385 mixer_ops->iommu_on(ctx->mixer_ctx->ctx, false); 385 mixer_ops->iommu_on(ctx->mixer_ctx->ctx, false);
386} 386}
387 387
388static int __devinit exynos_drm_hdmi_probe(struct platform_device *pdev) 388static int exynos_drm_hdmi_probe(struct platform_device *pdev)
389{ 389{
390 struct device *dev = &pdev->dev; 390 struct device *dev = &pdev->dev;
391 struct exynos_drm_subdrv *subdrv; 391 struct exynos_drm_subdrv *subdrv;
@@ -413,7 +413,7 @@ static int __devinit exynos_drm_hdmi_probe(struct platform_device *pdev)
413 return 0; 413 return 0;
414} 414}
415 415
416static int __devexit exynos_drm_hdmi_remove(struct platform_device *pdev) 416static int exynos_drm_hdmi_remove(struct platform_device *pdev)
417{ 417{
418 struct drm_hdmi_context *ctx = platform_get_drvdata(pdev); 418 struct drm_hdmi_context *ctx = platform_get_drvdata(pdev);
419 419
@@ -426,7 +426,7 @@ static int __devexit exynos_drm_hdmi_remove(struct platform_device *pdev)
426 426
427struct platform_driver exynos_drm_common_hdmi_driver = { 427struct platform_driver exynos_drm_common_hdmi_driver = {
428 .probe = exynos_drm_hdmi_probe, 428 .probe = exynos_drm_hdmi_probe,
429 .remove = __devexit_p(exynos_drm_hdmi_remove), 429 .remove = exynos_drm_hdmi_remove,
430 .driver = { 430 .driver = {
431 .name = "exynos-drm-hdmi", 431 .name = "exynos-drm-hdmi",
432 .owner = THIS_MODULE, 432 .owner = THIS_MODULE,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
index fcc3093ec8fe..784a7e9a766c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
@@ -3,24 +3,10 @@
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * Authoer: Inki Dae <inki.dae@samsung.com> 4 * Authoer: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#ifndef _EXYNOS_DRM_HDMI_H_ 12#ifndef _EXYNOS_DRM_HDMI_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers/gpu/drm/exynos/exynos_drm_iommu.c
index 2482b7f96341..3799d5c2b5df 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_iommu.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.c
@@ -3,24 +3,10 @@
3 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 * Author: Inki Dae <inki.dae@samsung.com> 4 * Author: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#include <drmP.h> 12#include <drmP.h>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.h b/drivers/gpu/drm/exynos/exynos_drm_iommu.h
index 18a0ca190b98..53b7deea8ab7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_iommu.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.h
@@ -3,24 +3,10 @@
3 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 * Authoer: Inki Dae <inki.dae@samsung.com> 4 * Authoer: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#ifndef _EXYNOS_DRM_IOMMU_H_ 12#ifndef _EXYNOS_DRM_IOMMU_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 49eebe948ed2..0bda96454a02 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -27,7 +27,7 @@
27#include "exynos_drm_iommu.h" 27#include "exynos_drm_iommu.h"
28 28
29/* 29/*
30 * IPP is stand for Image Post Processing and 30 * IPP stands for Image Post Processing and
31 * supports image scaler/rotator and input/output DMA operations. 31 * supports image scaler/rotator and input/output DMA operations.
32 * using FIMC, GSC, Rotator, so on. 32 * using FIMC, GSC, Rotator, so on.
33 * IPP is integration device driver of same attribute h/w 33 * IPP is integration device driver of same attribute h/w
@@ -1292,7 +1292,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
1292 DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id); 1292 DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id);
1293 1293
1294 /* store command info in ippdrv */ 1294 /* store command info in ippdrv */
1295 ippdrv->cmd = c_node; 1295 ippdrv->c_node = c_node;
1296 1296
1297 if (!ipp_check_mem_list(c_node)) { 1297 if (!ipp_check_mem_list(c_node)) {
1298 DRM_DEBUG_KMS("%s:empty memory.\n", __func__); 1298 DRM_DEBUG_KMS("%s:empty memory.\n", __func__);
@@ -1303,7 +1303,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
1303 ret = ipp_set_property(ippdrv, property); 1303 ret = ipp_set_property(ippdrv, property);
1304 if (ret) { 1304 if (ret) {
1305 DRM_ERROR("failed to set property.\n"); 1305 DRM_ERROR("failed to set property.\n");
1306 ippdrv->cmd = NULL; 1306 ippdrv->c_node = NULL;
1307 return ret; 1307 return ret;
1308 } 1308 }
1309 1309
@@ -1487,11 +1487,6 @@ void ipp_sched_cmd(struct work_struct *work)
1487 mutex_lock(&c_node->cmd_lock); 1487 mutex_lock(&c_node->cmd_lock);
1488 1488
1489 property = &c_node->property; 1489 property = &c_node->property;
1490 if (!property) {
1491 DRM_ERROR("failed to get property:prop_id[%d]\n",
1492 c_node->property.prop_id);
1493 goto err_unlock;
1494 }
1495 1490
1496 switch (cmd_work->ctrl) { 1491 switch (cmd_work->ctrl) {
1497 case IPP_CTRL_PLAY: 1492 case IPP_CTRL_PLAY:
@@ -1704,7 +1699,7 @@ void ipp_sched_event(struct work_struct *work)
1704 return; 1699 return;
1705 } 1700 }
1706 1701
1707 c_node = ippdrv->cmd; 1702 c_node = ippdrv->c_node;
1708 if (!c_node) { 1703 if (!c_node) {
1709 DRM_ERROR("failed to get command node.\n"); 1704 DRM_ERROR("failed to get command node.\n");
1710 return; 1705 return;
@@ -1888,14 +1883,14 @@ err_clear:
1888 return; 1883 return;
1889} 1884}
1890 1885
1891static int __devinit ipp_probe(struct platform_device *pdev) 1886static int ipp_probe(struct platform_device *pdev)
1892{ 1887{
1893 struct device *dev = &pdev->dev; 1888 struct device *dev = &pdev->dev;
1894 struct ipp_context *ctx; 1889 struct ipp_context *ctx;
1895 struct exynos_drm_subdrv *subdrv; 1890 struct exynos_drm_subdrv *subdrv;
1896 int ret; 1891 int ret;
1897 1892
1898 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); 1893 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
1899 if (!ctx) 1894 if (!ctx)
1900 return -ENOMEM; 1895 return -ENOMEM;
1901 1896
@@ -1916,8 +1911,7 @@ static int __devinit ipp_probe(struct platform_device *pdev)
1916 ctx->event_workq = create_singlethread_workqueue("ipp_event"); 1911 ctx->event_workq = create_singlethread_workqueue("ipp_event");
1917 if (!ctx->event_workq) { 1912 if (!ctx->event_workq) {
1918 dev_err(dev, "failed to create event workqueue\n"); 1913 dev_err(dev, "failed to create event workqueue\n");
1919 ret = -EINVAL; 1914 return -EINVAL;
1920 goto err_clear;
1921 } 1915 }
1922 1916
1923 /* 1917 /*
@@ -1958,12 +1952,10 @@ err_cmd_workq:
1958 destroy_workqueue(ctx->cmd_workq); 1952 destroy_workqueue(ctx->cmd_workq);
1959err_event_workq: 1953err_event_workq:
1960 destroy_workqueue(ctx->event_workq); 1954 destroy_workqueue(ctx->event_workq);
1961err_clear:
1962 kfree(ctx);
1963 return ret; 1955 return ret;
1964} 1956}
1965 1957
1966static int __devexit ipp_remove(struct platform_device *pdev) 1958static int ipp_remove(struct platform_device *pdev)
1967{ 1959{
1968 struct ipp_context *ctx = platform_get_drvdata(pdev); 1960 struct ipp_context *ctx = platform_get_drvdata(pdev);
1969 1961
@@ -1985,8 +1977,6 @@ static int __devexit ipp_remove(struct platform_device *pdev)
1985 destroy_workqueue(ctx->cmd_workq); 1977 destroy_workqueue(ctx->cmd_workq);
1986 destroy_workqueue(ctx->event_workq); 1978 destroy_workqueue(ctx->event_workq);
1987 1979
1988 kfree(ctx);
1989
1990 return 0; 1980 return 0;
1991} 1981}
1992 1982
@@ -2050,7 +2040,7 @@ static const struct dev_pm_ops ipp_pm_ops = {
2050 2040
2051struct platform_driver ipp_driver = { 2041struct platform_driver ipp_driver = {
2052 .probe = ipp_probe, 2042 .probe = ipp_probe,
2053 .remove = __devexit_p(ipp_remove), 2043 .remove = ipp_remove,
2054 .driver = { 2044 .driver = {
2055 .name = "exynos-drm-ipp", 2045 .name = "exynos-drm-ipp",
2056 .owner = THIS_MODULE, 2046 .owner = THIS_MODULE,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.h b/drivers/gpu/drm/exynos/exynos_drm_ipp.h
index 28ffac95386c..4cadbea7dbde 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.h
@@ -6,24 +6,10 @@
6 * Jinyoung Jeon <jy0.jeon@samsung.com> 6 * Jinyoung Jeon <jy0.jeon@samsung.com>
7 * Sangmin Lee <lsmin.lee@samsung.com> 7 * Sangmin Lee <lsmin.lee@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#ifndef _EXYNOS_DRM_IPP_H_ 15#ifndef _EXYNOS_DRM_IPP_H_
@@ -160,7 +146,7 @@ struct exynos_drm_ipp_ops {
160 * @dedicated: dedicated ipp device. 146 * @dedicated: dedicated ipp device.
161 * @ops: source, destination operations. 147 * @ops: source, destination operations.
162 * @event_workq: event work queue. 148 * @event_workq: event work queue.
163 * @cmd: current command information. 149 * @c_node: current command information.
164 * @cmd_list: list head for command information. 150 * @cmd_list: list head for command information.
165 * @prop_list: property informations of current ipp driver. 151 * @prop_list: property informations of current ipp driver.
166 * @check_property: check property about format, size, buffer. 152 * @check_property: check property about format, size, buffer.
@@ -178,7 +164,7 @@ struct exynos_drm_ippdrv {
178 bool dedicated; 164 bool dedicated;
179 struct exynos_drm_ipp_ops *ops[EXYNOS_DRM_OPS_MAX]; 165 struct exynos_drm_ipp_ops *ops[EXYNOS_DRM_OPS_MAX];
180 struct workqueue_struct *event_workq; 166 struct workqueue_struct *event_workq;
181 struct drm_exynos_ipp_cmd_node *cmd; 167 struct drm_exynos_ipp_cmd_node *c_node;
182 struct list_head cmd_list; 168 struct list_head cmd_list;
183 struct drm_exynos_ipp_prop_list *prop_list; 169 struct drm_exynos_ipp_prop_list *prop_list;
184 170
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 1c2366083c70..e9e83ef688f0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -139,7 +139,7 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg)
139{ 139{
140 struct rot_context *rot = arg; 140 struct rot_context *rot = arg;
141 struct exynos_drm_ippdrv *ippdrv = &rot->ippdrv; 141 struct exynos_drm_ippdrv *ippdrv = &rot->ippdrv;
142 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; 142 struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
143 struct drm_exynos_ipp_event_work *event_work = c_node->event_work; 143 struct drm_exynos_ipp_event_work *event_work = c_node->event_work;
144 enum rot_irq_status irq_status; 144 enum rot_irq_status irq_status;
145 u32 val; 145 u32 val;
@@ -513,6 +513,7 @@ static inline bool rotator_check_drm_flip(enum drm_exynos_flip flip)
513 case EXYNOS_DRM_FLIP_NONE: 513 case EXYNOS_DRM_FLIP_NONE:
514 case EXYNOS_DRM_FLIP_VERTICAL: 514 case EXYNOS_DRM_FLIP_VERTICAL:
515 case EXYNOS_DRM_FLIP_HORIZONTAL: 515 case EXYNOS_DRM_FLIP_HORIZONTAL:
516 case EXYNOS_DRM_FLIP_BOTH:
516 return true; 517 return true;
517 default: 518 default:
518 DRM_DEBUG_KMS("%s:invalid flip\n", __func__); 519 DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
@@ -638,7 +639,7 @@ static int rotator_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
638 return 0; 639 return 0;
639} 640}
640 641
641static int __devinit rotator_probe(struct platform_device *pdev) 642static int rotator_probe(struct platform_device *pdev)
642{ 643{
643 struct device *dev = &pdev->dev; 644 struct device *dev = &pdev->dev;
644 struct rot_context *rot; 645 struct rot_context *rot;
@@ -655,34 +656,26 @@ static int __devinit rotator_probe(struct platform_device *pdev)
655 platform_get_device_id(pdev)->driver_data; 656 platform_get_device_id(pdev)->driver_data;
656 657
657 rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 658 rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
658 if (!rot->regs_res) {
659 dev_err(dev, "failed to find registers\n");
660 ret = -ENOENT;
661 goto err_get_resource;
662 }
663
664 rot->regs = devm_request_and_ioremap(dev, rot->regs_res); 659 rot->regs = devm_request_and_ioremap(dev, rot->regs_res);
665 if (!rot->regs) { 660 if (!rot->regs) {
666 dev_err(dev, "failed to map register\n"); 661 dev_err(dev, "failed to map register\n");
667 ret = -ENXIO; 662 return -ENXIO;
668 goto err_get_resource;
669 } 663 }
670 664
671 rot->irq = platform_get_irq(pdev, 0); 665 rot->irq = platform_get_irq(pdev, 0);
672 if (rot->irq < 0) { 666 if (rot->irq < 0) {
673 dev_err(dev, "failed to get irq\n"); 667 dev_err(dev, "failed to get irq\n");
674 ret = rot->irq; 668 return rot->irq;
675 goto err_get_irq;
676 } 669 }
677 670
678 ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler, 671 ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler,
679 IRQF_ONESHOT, "drm_rotator", rot); 672 IRQF_ONESHOT, "drm_rotator", rot);
680 if (ret < 0) { 673 if (ret < 0) {
681 dev_err(dev, "failed to request irq\n"); 674 dev_err(dev, "failed to request irq\n");
682 goto err_get_irq; 675 return ret;
683 } 676 }
684 677
685 rot->clock = clk_get(dev, "rotator"); 678 rot->clock = devm_clk_get(dev, "rotator");
686 if (IS_ERR_OR_NULL(rot->clock)) { 679 if (IS_ERR_OR_NULL(rot->clock)) {
687 dev_err(dev, "failed to get clock\n"); 680 dev_err(dev, "failed to get clock\n");
688 ret = PTR_ERR(rot->clock); 681 ret = PTR_ERR(rot->clock);
@@ -720,17 +713,12 @@ static int __devinit rotator_probe(struct platform_device *pdev)
720err_ippdrv_register: 713err_ippdrv_register:
721 devm_kfree(dev, ippdrv->prop_list); 714 devm_kfree(dev, ippdrv->prop_list);
722 pm_runtime_disable(dev); 715 pm_runtime_disable(dev);
723 clk_put(rot->clock);
724err_clk_get: 716err_clk_get:
725 free_irq(rot->irq, rot); 717 free_irq(rot->irq, rot);
726err_get_irq:
727 devm_iounmap(dev, rot->regs);
728err_get_resource:
729 devm_kfree(dev, rot);
730 return ret; 718 return ret;
731} 719}
732 720
733static int __devexit rotator_remove(struct platform_device *pdev) 721static int rotator_remove(struct platform_device *pdev)
734{ 722{
735 struct device *dev = &pdev->dev; 723 struct device *dev = &pdev->dev;
736 struct rot_context *rot = dev_get_drvdata(dev); 724 struct rot_context *rot = dev_get_drvdata(dev);
@@ -740,12 +728,8 @@ static int __devexit rotator_remove(struct platform_device *pdev)
740 exynos_drm_ippdrv_unregister(ippdrv); 728 exynos_drm_ippdrv_unregister(ippdrv);
741 729
742 pm_runtime_disable(dev); 730 pm_runtime_disable(dev);
743 clk_put(rot->clock);
744 731
745 free_irq(rot->irq, rot); 732 free_irq(rot->irq, rot);
746 devm_iounmap(dev, rot->regs);
747
748 devm_kfree(dev, rot);
749 733
750 return 0; 734 return 0;
751} 735}
@@ -845,7 +829,7 @@ static const struct dev_pm_ops rotator_pm_ops = {
845 829
846struct platform_driver rotator_driver = { 830struct platform_driver rotator_driver = {
847 .probe = rotator_probe, 831 .probe = rotator_probe,
848 .remove = __devexit_p(rotator_remove), 832 .remove = rotator_remove,
849 .id_table = rotator_driver_ids, 833 .id_table = rotator_driver_ids,
850 .driver = { 834 .driver = {
851 .name = "exynos-rot", 835 .name = "exynos-rot",
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.h b/drivers/gpu/drm/exynos/exynos_drm_rotator.h
index a2d7a14a52b6..71a0b4c0c1e8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.h
@@ -5,24 +5,10 @@
5 * YoungJun Cho <yj44.cho@samsung.com> 5 * YoungJun Cho <yj44.cho@samsung.com>
6 * Eunchul Kim <chulspro.kim@samsung.com> 6 * Eunchul Kim <chulspro.kim@samsung.com>
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * This program is free software; you can redistribute it and/or modify it
9 * copy of this software and associated documentation files (the "Software"), 9 * under the terms of the GNU General Public License as published by the
10 * to deal in the Software without restriction, including without limitation 10 * Free Software Foundation; either version 2 of the License, or (at your
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * option) any later version.
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the next
16 * paragraph) shall be included in all copies or substantial portions of the
17 * Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 */ 12 */
27 13
28#ifndef _EXYNOS_DRM_ROTATOR_H_ 14#ifndef _EXYNOS_DRM_ROTATOR_H_
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 99bfc38dfaa2..d0ca3c4e06c6 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -372,34 +372,6 @@ static struct exynos_drm_manager vidi_manager = {
372 .display_ops = &vidi_display_ops, 372 .display_ops = &vidi_display_ops,
373}; 373};
374 374
375static void vidi_finish_pageflip(struct drm_device *drm_dev, int crtc)
376{
377 struct exynos_drm_private *dev_priv = drm_dev->dev_private;
378 struct drm_pending_vblank_event *e, *t;
379 struct timeval now;
380 unsigned long flags;
381
382 spin_lock_irqsave(&drm_dev->event_lock, flags);
383
384 list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list,
385 base.link) {
386 /* if event's pipe isn't same as crtc then ignore it. */
387 if (crtc != e->pipe)
388 continue;
389
390 do_gettimeofday(&now);
391 e->event.sequence = 0;
392 e->event.tv_sec = now.tv_sec;
393 e->event.tv_usec = now.tv_usec;
394
395 list_move_tail(&e->base.link, &e->base.file_priv->event_list);
396 wake_up_interruptible(&e->base.file_priv->event_wait);
397 drm_vblank_put(drm_dev, crtc);
398 }
399
400 spin_unlock_irqrestore(&drm_dev->event_lock, flags);
401}
402
403static void vidi_fake_vblank_handler(struct work_struct *work) 375static void vidi_fake_vblank_handler(struct work_struct *work)
404{ 376{
405 struct vidi_context *ctx = container_of(work, struct vidi_context, 377 struct vidi_context *ctx = container_of(work, struct vidi_context,
@@ -424,7 +396,7 @@ static void vidi_fake_vblank_handler(struct work_struct *work)
424 396
425 mutex_unlock(&ctx->lock); 397 mutex_unlock(&ctx->lock);
426 398
427 vidi_finish_pageflip(subdrv->drm_dev, manager->pipe); 399 exynos_drm_crtc_finish_pageflip(subdrv->drm_dev, manager->pipe);
428} 400}
429 401
430static int vidi_subdrv_probe(struct drm_device *drm_dev, struct device *dev) 402static int vidi_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
@@ -609,7 +581,7 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data,
609 return 0; 581 return 0;
610} 582}
611 583
612static int __devinit vidi_probe(struct platform_device *pdev) 584static int vidi_probe(struct platform_device *pdev)
613{ 585{
614 struct device *dev = &pdev->dev; 586 struct device *dev = &pdev->dev;
615 struct vidi_context *ctx; 587 struct vidi_context *ctx;
@@ -645,7 +617,7 @@ static int __devinit vidi_probe(struct platform_device *pdev)
645 return 0; 617 return 0;
646} 618}
647 619
648static int __devexit vidi_remove(struct platform_device *pdev) 620static int vidi_remove(struct platform_device *pdev)
649{ 621{
650 struct vidi_context *ctx = platform_get_drvdata(pdev); 622 struct vidi_context *ctx = platform_get_drvdata(pdev);
651 623
@@ -683,7 +655,7 @@ static const struct dev_pm_ops vidi_pm_ops = {
683 655
684struct platform_driver vidi_driver = { 656struct platform_driver vidi_driver = {
685 .probe = vidi_probe, 657 .probe = vidi_probe,
686 .remove = __devexit_p(vidi_remove), 658 .remove = vidi_remove,
687 .driver = { 659 .driver = {
688 .name = "exynos-drm-vidi", 660 .name = "exynos-drm-vidi",
689 .owner = THIS_MODULE, 661 .owner = THIS_MODULE,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.h b/drivers/gpu/drm/exynos/exynos_drm_vidi.h
index a4babe4e65d7..1e5fdaa36ccc 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.h
@@ -3,24 +3,10 @@
3 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 * Author: Inki Dae <inki.dae@samsung.com> 4 * Author: Inki Dae <inki.dae@samsung.com>
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * This program is free software; you can redistribute it and/or modify it
7 * copy of this software and associated documentation files (the "Software"), 7 * under the terms of the GNU General Public License as published by the
8 * to deal in the Software without restriction, including without limitation 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * option) any later version.
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */ 10 */
25 11
26#ifndef _EXYNOS_DRM_VIDI_H_ 12#ifndef _EXYNOS_DRM_VIDI_H_
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 2c46b6c0b82c..41ff79d8ac8e 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2305,7 +2305,7 @@ static irqreturn_t hdmi_internal_irq_thread(int irq, void *arg)
2305 return IRQ_HANDLED; 2305 return IRQ_HANDLED;
2306} 2306}
2307 2307
2308static int __devinit hdmi_resources_init(struct hdmi_context *hdata) 2308static int hdmi_resources_init(struct hdmi_context *hdata)
2309{ 2309{
2310 struct device *dev = hdata->dev; 2310 struct device *dev = hdata->dev;
2311 struct hdmi_resources *res = &hdata->res; 2311 struct hdmi_resources *res = &hdata->res;
@@ -2451,7 +2451,7 @@ static struct of_device_id hdmi_match_types[] = {
2451}; 2451};
2452#endif 2452#endif
2453 2453
2454static int __devinit hdmi_probe(struct platform_device *pdev) 2454static int hdmi_probe(struct platform_device *pdev)
2455{ 2455{
2456 struct device *dev = &pdev->dev; 2456 struct device *dev = &pdev->dev;
2457 struct exynos_drm_hdmi_context *drm_hdmi_ctx; 2457 struct exynos_drm_hdmi_context *drm_hdmi_ctx;
@@ -2607,7 +2607,7 @@ err_ddc:
2607 return ret; 2607 return ret;
2608} 2608}
2609 2609
2610static int __devexit hdmi_remove(struct platform_device *pdev) 2610static int hdmi_remove(struct platform_device *pdev)
2611{ 2611{
2612 struct device *dev = &pdev->dev; 2612 struct device *dev = &pdev->dev;
2613 struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev); 2613 struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev);
@@ -2708,7 +2708,7 @@ static const struct dev_pm_ops hdmi_pm_ops = {
2708 2708
2709struct platform_driver hdmi_driver = { 2709struct platform_driver hdmi_driver = {
2710 .probe = hdmi_probe, 2710 .probe = hdmi_probe,
2711 .remove = __devexit_p(hdmi_remove), 2711 .remove = hdmi_remove,
2712 .id_table = hdmi_driver_types, 2712 .id_table = hdmi_driver_types,
2713 .driver = { 2713 .driver = {
2714 .name = "exynos-hdmi", 2714 .name = "exynos-hdmi",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.h b/drivers/gpu/drm/exynos/exynos_hdmi.h
index 1c3b6d8f1fe7..0ddf3957de15 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.h
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.h
@@ -5,24 +5,10 @@
5 * Inki Dae <inki.dae@samsung.com> 5 * Inki Dae <inki.dae@samsung.com>
6 * Seung-Woo Kim <sw0312.kim@samsung.com> 6 * Seung-Woo Kim <sw0312.kim@samsung.com>
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * This program is free software; you can redistribute it and/or modify it
9 * copy of this software and associated documentation files (the "Software"), 9 * under the terms of the GNU General Public License as published by the
10 * to deal in the Software without restriction, including without limitation 10 * Free Software Foundation; either version 2 of the License, or (at your
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * option) any later version.
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the next
16 * paragraph) shall be included in all copies or substantial portions of the
17 * Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 */ 12 */
27 13
28#ifndef _EXYNOS_HDMI_H_ 14#ifndef _EXYNOS_HDMI_H_
diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c b/drivers/gpu/drm/exynos/exynos_hdmiphy.c
index 6206056f4a33..ea49d132ecf6 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmiphy.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmiphy.c
@@ -64,7 +64,7 @@ struct i2c_driver hdmiphy_driver = {
64 }, 64 },
65 .id_table = hdmiphy_id, 65 .id_table = hdmiphy_id,
66 .probe = hdmiphy_probe, 66 .probe = hdmiphy_probe,
67 .remove = __devexit_p(hdmiphy_remove), 67 .remove = hdmiphy_remove,
68 .command = NULL, 68 .command = NULL,
69}; 69};
70EXPORT_SYMBOL(hdmiphy_driver); 70EXPORT_SYMBOL(hdmiphy_driver);
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index 21db89530fc7..c187ea33b748 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -35,6 +35,7 @@
35#include <drm/exynos_drm.h> 35#include <drm/exynos_drm.h>
36 36
37#include "exynos_drm_drv.h" 37#include "exynos_drm_drv.h"
38#include "exynos_drm_crtc.h"
38#include "exynos_drm_hdmi.h" 39#include "exynos_drm_hdmi.h"
39#include "exynos_drm_iommu.h" 40#include "exynos_drm_iommu.h"
40 41
@@ -949,35 +950,6 @@ static struct exynos_mixer_ops mixer_ops = {
949 .win_disable = mixer_win_disable, 950 .win_disable = mixer_win_disable,
950}; 951};
951 952
952/* for pageflip event */
953static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc)
954{
955 struct exynos_drm_private *dev_priv = drm_dev->dev_private;
956 struct drm_pending_vblank_event *e, *t;
957 struct timeval now;
958 unsigned long flags;
959
960 spin_lock_irqsave(&drm_dev->event_lock, flags);
961
962 list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list,
963 base.link) {
964 /* if event's pipe isn't same as crtc then ignore it. */
965 if (crtc != e->pipe)
966 continue;
967
968 do_gettimeofday(&now);
969 e->event.sequence = 0;
970 e->event.tv_sec = now.tv_sec;
971 e->event.tv_usec = now.tv_usec;
972
973 list_move_tail(&e->base.link, &e->base.file_priv->event_list);
974 wake_up_interruptible(&e->base.file_priv->event_wait);
975 drm_vblank_put(drm_dev, crtc);
976 }
977
978 spin_unlock_irqrestore(&drm_dev->event_lock, flags);
979}
980
981static irqreturn_t mixer_irq_handler(int irq, void *arg) 953static irqreturn_t mixer_irq_handler(int irq, void *arg)
982{ 954{
983 struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg; 955 struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg;
@@ -1006,7 +978,8 @@ static irqreturn_t mixer_irq_handler(int irq, void *arg)
1006 } 978 }
1007 979
1008 drm_handle_vblank(drm_hdmi_ctx->drm_dev, ctx->pipe); 980 drm_handle_vblank(drm_hdmi_ctx->drm_dev, ctx->pipe);
1009 mixer_finish_pageflip(drm_hdmi_ctx->drm_dev, ctx->pipe); 981 exynos_drm_crtc_finish_pageflip(drm_hdmi_ctx->drm_dev,
982 ctx->pipe);
1010 983
1011 /* set wait vsync event to zero and wake up queue. */ 984 /* set wait vsync event to zero and wake up queue. */
1012 if (atomic_read(&ctx->wait_vsync_event)) { 985 if (atomic_read(&ctx->wait_vsync_event)) {
@@ -1029,8 +1002,8 @@ out:
1029 return IRQ_HANDLED; 1002 return IRQ_HANDLED;
1030} 1003}
1031 1004
1032static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx, 1005static int mixer_resources_init(struct exynos_drm_hdmi_context *ctx,
1033 struct platform_device *pdev) 1006 struct platform_device *pdev)
1034{ 1007{
1035 struct mixer_context *mixer_ctx = ctx->ctx; 1008 struct mixer_context *mixer_ctx = ctx->ctx;
1036 struct device *dev = &pdev->dev; 1009 struct device *dev = &pdev->dev;
@@ -1081,8 +1054,8 @@ static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx,
1081 return 0; 1054 return 0;
1082} 1055}
1083 1056
1084static int __devinit vp_resources_init(struct exynos_drm_hdmi_context *ctx, 1057static int vp_resources_init(struct exynos_drm_hdmi_context *ctx,
1085 struct platform_device *pdev) 1058 struct platform_device *pdev)
1086{ 1059{
1087 struct mixer_context *mixer_ctx = ctx->ctx; 1060 struct mixer_context *mixer_ctx = ctx->ctx;
1088 struct device *dev = &pdev->dev; 1061 struct device *dev = &pdev->dev;
@@ -1155,7 +1128,7 @@ static struct of_device_id mixer_match_types[] = {
1155 } 1128 }
1156}; 1129};
1157 1130
1158static int __devinit mixer_probe(struct platform_device *pdev) 1131static int mixer_probe(struct platform_device *pdev)
1159{ 1132{
1160 struct device *dev = &pdev->dev; 1133 struct device *dev = &pdev->dev;
1161 struct exynos_drm_hdmi_context *drm_hdmi_ctx; 1134 struct exynos_drm_hdmi_context *drm_hdmi_ctx;
@@ -1316,6 +1289,6 @@ struct platform_driver mixer_driver = {
1316 .of_match_table = mixer_match_types, 1289 .of_match_table = mixer_match_types,
1317 }, 1290 },
1318 .probe = mixer_probe, 1291 .probe = mixer_probe,
1319 .remove = __devexit_p(mixer_remove), 1292 .remove = mixer_remove,
1320 .id_table = mixer_driver_types, 1293 .id_table = mixer_driver_types,
1321}; 1294};
diff --git a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c
index 4a07ab596174..771ff66711af 100644
--- a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c
+++ b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c
@@ -700,7 +700,7 @@ static struct i2c_driver tc35876x_bridge_i2c_driver = {
700 }, 700 },
701 .id_table = tc35876x_bridge_id, 701 .id_table = tc35876x_bridge_id,
702 .probe = tc35876x_bridge_probe, 702 .probe = tc35876x_bridge_probe,
703 .remove = __devexit_p(tc35876x_bridge_remove), 703 .remove = tc35876x_bridge_remove,
704}; 704};
705 705
706/* LCD panel I2C */ 706/* LCD panel I2C */
@@ -741,7 +741,7 @@ static struct i2c_driver cmi_lcd_i2c_driver = {
741 }, 741 },
742 .id_table = cmi_lcd_i2c_id, 742 .id_table = cmi_lcd_i2c_id,
743 .probe = cmi_lcd_i2c_probe, 743 .probe = cmi_lcd_i2c_probe,
744 .remove = __devexit_p(cmi_lcd_i2c_remove), 744 .remove = cmi_lcd_i2c_remove,
745}; 745};
746 746
747/* HACK to create I2C device while it's not created by platform code */ 747/* HACK to create I2C device while it's not created by platform code */
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 8f63cd5de4b4..99daa896105d 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -989,6 +989,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
989 case I915_PARAM_HAS_SECURE_BATCHES: 989 case I915_PARAM_HAS_SECURE_BATCHES:
990 value = capable(CAP_SYS_ADMIN); 990 value = capable(CAP_SYS_ADMIN);
991 break; 991 break;
992 case I915_PARAM_HAS_PINNED_BATCHES:
993 value = 1;
994 break;
992 default: 995 default:
993 DRM_DEBUG_DRIVER("Unknown parameter %d\n", 996 DRM_DEBUG_DRIVER("Unknown parameter %d\n",
994 param->param); 997 param->param);
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 530db83ef320..117265840b1f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -877,8 +877,7 @@ int i915_reset(struct drm_device *dev)
877 return 0; 877 return 0;
878} 878}
879 879
880static int __devinit 880static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
881i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
882{ 881{
883 struct intel_device_info *intel_info = 882 struct intel_device_info *intel_info =
884 (struct intel_device_info *) ent->driver_data; 883 (struct intel_device_info *) ent->driver_data;
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 557843dd4b2e..ed3059575576 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -780,6 +780,7 @@ typedef struct drm_i915_private {
780 struct i915_hw_ppgtt *aliasing_ppgtt; 780 struct i915_hw_ppgtt *aliasing_ppgtt;
781 781
782 struct shrinker inactive_shrinker; 782 struct shrinker inactive_shrinker;
783 bool shrinker_no_lock_stealing;
783 784
784 /** 785 /**
785 * List of objects currently involved in rendering. 786 * List of objects currently involved in rendering.
@@ -1100,6 +1101,7 @@ struct drm_i915_gem_object {
1100 */ 1101 */
1101 atomic_t pending_flip; 1102 atomic_t pending_flip;
1102}; 1103};
1104#define to_gem_object(obj) (&((struct drm_i915_gem_object *)(obj))->base)
1103 1105
1104#define to_intel_bo(x) container_of(x, struct drm_i915_gem_object, base) 1106#define to_intel_bo(x) container_of(x, struct drm_i915_gem_object, base)
1105 1107
@@ -1166,6 +1168,9 @@ struct drm_i915_file_private {
1166#define IS_IVB_GT1(dev) ((dev)->pci_device == 0x0156 || \ 1168#define IS_IVB_GT1(dev) ((dev)->pci_device == 0x0156 || \
1167 (dev)->pci_device == 0x0152 || \ 1169 (dev)->pci_device == 0x0152 || \
1168 (dev)->pci_device == 0x015a) 1170 (dev)->pci_device == 0x015a)
1171#define IS_SNB_GT1(dev) ((dev)->pci_device == 0x0102 || \
1172 (dev)->pci_device == 0x0106 || \
1173 (dev)->pci_device == 0x010A)
1169#define IS_VALLEYVIEW(dev) (INTEL_INFO(dev)->is_valleyview) 1174#define IS_VALLEYVIEW(dev) (INTEL_INFO(dev)->is_valleyview)
1170#define IS_HASWELL(dev) (INTEL_INFO(dev)->is_haswell) 1175#define IS_HASWELL(dev) (INTEL_INFO(dev)->is_haswell)
1171#define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) 1176#define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile)
@@ -1196,6 +1201,9 @@ struct drm_i915_file_private {
1196#define HAS_OVERLAY(dev) (INTEL_INFO(dev)->has_overlay) 1201#define HAS_OVERLAY(dev) (INTEL_INFO(dev)->has_overlay)
1197#define OVERLAY_NEEDS_PHYSICAL(dev) (INTEL_INFO(dev)->overlay_needs_physical) 1202#define OVERLAY_NEEDS_PHYSICAL(dev) (INTEL_INFO(dev)->overlay_needs_physical)
1198 1203
1204/* Early gen2 have a totally busted CS tlb and require pinned batches. */
1205#define HAS_BROKEN_CS_TLB(dev) (IS_I830(dev) || IS_845G(dev))
1206
1199/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte 1207/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
1200 * rows, which changed the alignment requirements and fence programming. 1208 * rows, which changed the alignment requirements and fence programming.
1201 */ 1209 */
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 742206e45103..da3c82e301b1 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1517,9 +1517,11 @@ static int i915_gem_object_create_mmap_offset(struct drm_i915_gem_object *obj)
1517 if (obj->base.map_list.map) 1517 if (obj->base.map_list.map)
1518 return 0; 1518 return 0;
1519 1519
1520 dev_priv->mm.shrinker_no_lock_stealing = true;
1521
1520 ret = drm_gem_create_mmap_offset(&obj->base); 1522 ret = drm_gem_create_mmap_offset(&obj->base);
1521 if (ret != -ENOSPC) 1523 if (ret != -ENOSPC)
1522 return ret; 1524 goto out;
1523 1525
1524 /* Badly fragmented mmap space? The only way we can recover 1526 /* Badly fragmented mmap space? The only way we can recover
1525 * space is by destroying unwanted objects. We can't randomly release 1527 * space is by destroying unwanted objects. We can't randomly release
@@ -1531,10 +1533,14 @@ static int i915_gem_object_create_mmap_offset(struct drm_i915_gem_object *obj)
1531 i915_gem_purge(dev_priv, obj->base.size >> PAGE_SHIFT); 1533 i915_gem_purge(dev_priv, obj->base.size >> PAGE_SHIFT);
1532 ret = drm_gem_create_mmap_offset(&obj->base); 1534 ret = drm_gem_create_mmap_offset(&obj->base);
1533 if (ret != -ENOSPC) 1535 if (ret != -ENOSPC)
1534 return ret; 1536 goto out;
1535 1537
1536 i915_gem_shrink_all(dev_priv); 1538 i915_gem_shrink_all(dev_priv);
1537 return drm_gem_create_mmap_offset(&obj->base); 1539 ret = drm_gem_create_mmap_offset(&obj->base);
1540out:
1541 dev_priv->mm.shrinker_no_lock_stealing = false;
1542
1543 return ret;
1538} 1544}
1539 1545
1540static void i915_gem_object_free_mmap_offset(struct drm_i915_gem_object *obj) 1546static void i915_gem_object_free_mmap_offset(struct drm_i915_gem_object *obj)
@@ -2890,7 +2896,7 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
2890{ 2896{
2891 struct drm_device *dev = obj->base.dev; 2897 struct drm_device *dev = obj->base.dev;
2892 drm_i915_private_t *dev_priv = dev->dev_private; 2898 drm_i915_private_t *dev_priv = dev->dev_private;
2893 struct drm_mm_node *free_space; 2899 struct drm_mm_node *node;
2894 u32 size, fence_size, fence_alignment, unfenced_alignment; 2900 u32 size, fence_size, fence_alignment, unfenced_alignment;
2895 bool mappable, fenceable; 2901 bool mappable, fenceable;
2896 int ret; 2902 int ret;
@@ -2936,66 +2942,54 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
2936 2942
2937 i915_gem_object_pin_pages(obj); 2943 i915_gem_object_pin_pages(obj);
2938 2944
2945 node = kzalloc(sizeof(*node), GFP_KERNEL);
2946 if (node == NULL) {
2947 i915_gem_object_unpin_pages(obj);
2948 return -ENOMEM;
2949 }
2950
2939 search_free: 2951 search_free:
2940 if (map_and_fenceable) 2952 if (map_and_fenceable)
2941 free_space = drm_mm_search_free_in_range_color(&dev_priv->mm.gtt_space, 2953 ret = drm_mm_insert_node_in_range_generic(&dev_priv->mm.gtt_space, node,
2942 size, alignment, obj->cache_level, 2954 size, alignment, obj->cache_level,
2943 0, dev_priv->mm.gtt_mappable_end, 2955 0, dev_priv->mm.gtt_mappable_end);
2944 false);
2945 else 2956 else
2946 free_space = drm_mm_search_free_color(&dev_priv->mm.gtt_space, 2957 ret = drm_mm_insert_node_generic(&dev_priv->mm.gtt_space, node,
2947 size, alignment, obj->cache_level, 2958 size, alignment, obj->cache_level);
2948 false); 2959 if (ret) {
2949
2950 if (free_space != NULL) {
2951 if (map_and_fenceable)
2952 free_space =
2953 drm_mm_get_block_range_generic(free_space,
2954 size, alignment, obj->cache_level,
2955 0, dev_priv->mm.gtt_mappable_end,
2956 false);
2957 else
2958 free_space =
2959 drm_mm_get_block_generic(free_space,
2960 size, alignment, obj->cache_level,
2961 false);
2962 }
2963 if (free_space == NULL) {
2964 ret = i915_gem_evict_something(dev, size, alignment, 2960 ret = i915_gem_evict_something(dev, size, alignment,
2965 obj->cache_level, 2961 obj->cache_level,
2966 map_and_fenceable, 2962 map_and_fenceable,
2967 nonblocking); 2963 nonblocking);
2968 if (ret) { 2964 if (ret == 0)
2969 i915_gem_object_unpin_pages(obj); 2965 goto search_free;
2970 return ret;
2971 }
2972 2966
2973 goto search_free; 2967 i915_gem_object_unpin_pages(obj);
2968 kfree(node);
2969 return ret;
2974 } 2970 }
2975 if (WARN_ON(!i915_gem_valid_gtt_space(dev, 2971 if (WARN_ON(!i915_gem_valid_gtt_space(dev, node, obj->cache_level))) {
2976 free_space,
2977 obj->cache_level))) {
2978 i915_gem_object_unpin_pages(obj); 2972 i915_gem_object_unpin_pages(obj);
2979 drm_mm_put_block(free_space); 2973 drm_mm_put_block(node);
2980 return -EINVAL; 2974 return -EINVAL;
2981 } 2975 }
2982 2976
2983 ret = i915_gem_gtt_prepare_object(obj); 2977 ret = i915_gem_gtt_prepare_object(obj);
2984 if (ret) { 2978 if (ret) {
2985 i915_gem_object_unpin_pages(obj); 2979 i915_gem_object_unpin_pages(obj);
2986 drm_mm_put_block(free_space); 2980 drm_mm_put_block(node);
2987 return ret; 2981 return ret;
2988 } 2982 }
2989 2983
2990 list_move_tail(&obj->gtt_list, &dev_priv->mm.bound_list); 2984 list_move_tail(&obj->gtt_list, &dev_priv->mm.bound_list);
2991 list_add_tail(&obj->mm_list, &dev_priv->mm.inactive_list); 2985 list_add_tail(&obj->mm_list, &dev_priv->mm.inactive_list);
2992 2986
2993 obj->gtt_space = free_space; 2987 obj->gtt_space = node;
2994 obj->gtt_offset = free_space->start; 2988 obj->gtt_offset = node->start;
2995 2989
2996 fenceable = 2990 fenceable =
2997 free_space->size == fence_size && 2991 node->size == fence_size &&
2998 (free_space->start & (fence_alignment - 1)) == 0; 2992 (node->start & (fence_alignment - 1)) == 0;
2999 2993
3000 mappable = 2994 mappable =
3001 obj->gtt_offset + obj->base.size <= dev_priv->mm.gtt_mappable_end; 2995 obj->gtt_offset + obj->base.size <= dev_priv->mm.gtt_mappable_end;
@@ -4392,6 +4386,9 @@ i915_gem_inactive_shrink(struct shrinker *shrinker, struct shrink_control *sc)
4392 if (!mutex_is_locked_by(&dev->struct_mutex, current)) 4386 if (!mutex_is_locked_by(&dev->struct_mutex, current))
4393 return 0; 4387 return 0;
4394 4388
4389 if (dev_priv->mm.shrinker_no_lock_stealing)
4390 return 0;
4391
4395 unlock = false; 4392 unlock = false;
4396 } 4393 }
4397 4394
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
index 773ef77b6c22..abeaafef6d7e 100644
--- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
@@ -226,7 +226,7 @@ struct dma_buf *i915_gem_prime_export(struct drm_device *dev,
226{ 226{
227 struct drm_i915_gem_object *obj = to_intel_bo(gem_obj); 227 struct drm_i915_gem_object *obj = to_intel_bo(gem_obj);
228 228
229 return dma_buf_export(obj, &i915_dmabuf_ops, obj->base.size, 0600); 229 return dma_buf_export(obj, &i915_dmabuf_ops, obj->base.size, flags);
230} 230}
231 231
232static int i915_gem_object_get_pages_dmabuf(struct drm_i915_gem_object *obj) 232static int i915_gem_object_get_pages_dmabuf(struct drm_i915_gem_object *obj)
@@ -266,7 +266,12 @@ struct drm_gem_object *i915_gem_prime_import(struct drm_device *dev,
266 obj = dma_buf->priv; 266 obj = dma_buf->priv;
267 /* is it from our device? */ 267 /* is it from our device? */
268 if (obj->base.dev == dev) { 268 if (obj->base.dev == dev) {
269 /*
270 * Importing dmabuf exported from out own gem increases
271 * refcount on gem itself instead of f_count of dmabuf.
272 */
269 drm_gem_object_reference(&obj->base); 273 drm_gem_object_reference(&obj->base);
274 dma_buf_put(dma_buf);
270 return &obj->base; 275 return &obj->base;
271 } 276 }
272 } 277 }
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index ee8f97f0539e..d6a994a07393 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -808,6 +808,8 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
808 808
809 flags |= I915_DISPATCH_SECURE; 809 flags |= I915_DISPATCH_SECURE;
810 } 810 }
811 if (args->flags & I915_EXEC_IS_PINNED)
812 flags |= I915_DISPATCH_PINNED;
811 813
812 switch (args->flags & I915_EXEC_RING_MASK) { 814 switch (args->flags & I915_EXEC_RING_MASK) {
813 case I915_EXEC_DEFAULT: 815 case I915_EXEC_DEFAULT:
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index a4dc97f8b9f0..2220dec3e5d9 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1087,6 +1087,18 @@ i915_error_first_batchbuffer(struct drm_i915_private *dev_priv,
1087 if (!ring->get_seqno) 1087 if (!ring->get_seqno)
1088 return NULL; 1088 return NULL;
1089 1089
1090 if (HAS_BROKEN_CS_TLB(dev_priv->dev)) {
1091 u32 acthd = I915_READ(ACTHD);
1092
1093 if (WARN_ON(ring->id != RCS))
1094 return NULL;
1095
1096 obj = ring->private;
1097 if (acthd >= obj->gtt_offset &&
1098 acthd < obj->gtt_offset + obj->base.size)
1099 return i915_error_object_create(dev_priv, obj);
1100 }
1101
1090 seqno = ring->get_seqno(ring, false); 1102 seqno = ring->get_seqno(ring, false);
1091 list_for_each_entry(obj, &dev_priv->mm.active_list, mm_list) { 1103 list_for_each_entry(obj, &dev_priv->mm.active_list, mm_list) {
1092 if (obj->ring != ring) 1104 if (obj->ring != ring)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 3f75cfaf1c3f..186ee5c85b51 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -517,6 +517,7 @@
517 * the enables for writing to the corresponding low bit. 517 * the enables for writing to the corresponding low bit.
518 */ 518 */
519#define _3D_CHICKEN 0x02084 519#define _3D_CHICKEN 0x02084
520#define _3D_CHICKEN_HIZ_PLANE_DISABLE_MSAA_4X_SNB (1 << 10)
520#define _3D_CHICKEN2 0x0208c 521#define _3D_CHICKEN2 0x0208c
521/* Disables pipelining of read flushes past the SF-WIZ interface. 522/* Disables pipelining of read flushes past the SF-WIZ interface.
522 * Required on all Ironlake steppings according to the B-Spec, but the 523 * Required on all Ironlake steppings according to the B-Spec, but the
@@ -532,7 +533,8 @@
532# define MI_FLUSH_ENABLE (1 << 12) 533# define MI_FLUSH_ENABLE (1 << 12)
533 534
534#define GEN6_GT_MODE 0x20d0 535#define GEN6_GT_MODE 0x20d0
535#define GEN6_GT_MODE_HI (1 << 9) 536#define GEN6_GT_MODE_HI (1 << 9)
537#define GEN6_TD_FOUR_ROW_DISPATCH_DISABLE (1 << 5)
536 538
537#define GFX_MODE 0x02520 539#define GFX_MODE 0x02520
538#define GFX_MODE_GEN7 0x0229c 540#define GFX_MODE_GEN7 0x0229c
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5d127e068950..a9fb046b94a1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8144,10 +8144,6 @@ intel_modeset_stage_output_state(struct drm_device *dev,
8144 DRM_DEBUG_KMS("encoder changed, full mode switch\n"); 8144 DRM_DEBUG_KMS("encoder changed, full mode switch\n");
8145 config->mode_changed = true; 8145 config->mode_changed = true;
8146 } 8146 }
8147
8148 /* Disable all disconnected encoders. */
8149 if (connector->base.status == connector_status_disconnected)
8150 connector->new_encoder = NULL;
8151 } 8147 }
8152 /* connector->new_encoder is now updated for all connectors. */ 8148 /* connector->new_encoder is now updated for all connectors. */
8153 8149
@@ -9167,6 +9163,23 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
9167 * the crtc fixup. */ 9163 * the crtc fixup. */
9168} 9164}
9169 9165
9166static void i915_redisable_vga(struct drm_device *dev)
9167{
9168 struct drm_i915_private *dev_priv = dev->dev_private;
9169 u32 vga_reg;
9170
9171 if (HAS_PCH_SPLIT(dev))
9172 vga_reg = CPU_VGACNTRL;
9173 else
9174 vga_reg = VGACNTRL;
9175
9176 if (I915_READ(vga_reg) != VGA_DISP_DISABLE) {
9177 DRM_DEBUG_KMS("Something enabled VGA plane, disabling it\n");
9178 I915_WRITE(vga_reg, VGA_DISP_DISABLE);
9179 POSTING_READ(vga_reg);
9180 }
9181}
9182
9170/* Scan out the current hw modeset state, sanitizes it and maps it into the drm 9183/* Scan out the current hw modeset state, sanitizes it and maps it into the drm
9171 * and i915 state tracking structures. */ 9184 * and i915 state tracking structures. */
9172void intel_modeset_setup_hw_state(struct drm_device *dev, 9185void intel_modeset_setup_hw_state(struct drm_device *dev,
@@ -9275,6 +9288,8 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
9275 intel_set_mode(&crtc->base, &crtc->base.mode, 9288 intel_set_mode(&crtc->base, &crtc->base.mode,
9276 crtc->base.x, crtc->base.y, crtc->base.fb); 9289 crtc->base.x, crtc->base.y, crtc->base.fb);
9277 } 9290 }
9291
9292 i915_redisable_vga(dev);
9278 } else { 9293 } else {
9279 intel_modeset_update_staged_output_state(dev); 9294 intel_modeset_update_staged_output_state(dev);
9280 } 9295 }
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 496caa73eb70..e6f54ffab3ba 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -405,7 +405,7 @@ void intel_update_fbc(struct drm_device *dev)
405 * - going to an unsupported config (interlace, pixel multiply, etc.) 405 * - going to an unsupported config (interlace, pixel multiply, etc.)
406 */ 406 */
407 list_for_each_entry(tmp_crtc, &dev->mode_config.crtc_list, head) { 407 list_for_each_entry(tmp_crtc, &dev->mode_config.crtc_list, head) {
408 if (tmp_crtc->enabled && 408 if (to_intel_crtc(tmp_crtc)->active &&
409 !to_intel_crtc(tmp_crtc)->primary_disabled && 409 !to_intel_crtc(tmp_crtc)->primary_disabled &&
410 tmp_crtc->fb) { 410 tmp_crtc->fb) {
411 if (crtc) { 411 if (crtc) {
@@ -992,7 +992,7 @@ static struct drm_crtc *single_enabled_crtc(struct drm_device *dev)
992 struct drm_crtc *crtc, *enabled = NULL; 992 struct drm_crtc *crtc, *enabled = NULL;
993 993
994 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { 994 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
995 if (crtc->enabled && crtc->fb) { 995 if (to_intel_crtc(crtc)->active && crtc->fb) {
996 if (enabled) 996 if (enabled)
997 return NULL; 997 return NULL;
998 enabled = crtc; 998 enabled = crtc;
@@ -1086,7 +1086,7 @@ static bool g4x_compute_wm0(struct drm_device *dev,
1086 int entries, tlb_miss; 1086 int entries, tlb_miss;
1087 1087
1088 crtc = intel_get_crtc_for_plane(dev, plane); 1088 crtc = intel_get_crtc_for_plane(dev, plane);
1089 if (crtc->fb == NULL || !crtc->enabled) { 1089 if (crtc->fb == NULL || !to_intel_crtc(crtc)->active) {
1090 *cursor_wm = cursor->guard_size; 1090 *cursor_wm = cursor->guard_size;
1091 *plane_wm = display->guard_size; 1091 *plane_wm = display->guard_size;
1092 return false; 1092 return false;
@@ -1215,7 +1215,7 @@ static bool vlv_compute_drain_latency(struct drm_device *dev,
1215 int entries; 1215 int entries;
1216 1216
1217 crtc = intel_get_crtc_for_plane(dev, plane); 1217 crtc = intel_get_crtc_for_plane(dev, plane);
1218 if (crtc->fb == NULL || !crtc->enabled) 1218 if (crtc->fb == NULL || !to_intel_crtc(crtc)->active)
1219 return false; 1219 return false;
1220 1220
1221 clock = crtc->mode.clock; /* VESA DOT Clock */ 1221 clock = crtc->mode.clock; /* VESA DOT Clock */
@@ -1286,6 +1286,7 @@ static void valleyview_update_wm(struct drm_device *dev)
1286 struct drm_i915_private *dev_priv = dev->dev_private; 1286 struct drm_i915_private *dev_priv = dev->dev_private;
1287 int planea_wm, planeb_wm, cursora_wm, cursorb_wm; 1287 int planea_wm, planeb_wm, cursora_wm, cursorb_wm;
1288 int plane_sr, cursor_sr; 1288 int plane_sr, cursor_sr;
1289 int ignore_plane_sr, ignore_cursor_sr;
1289 unsigned int enabled = 0; 1290 unsigned int enabled = 0;
1290 1291
1291 vlv_update_drain_latency(dev); 1292 vlv_update_drain_latency(dev);
@@ -1302,17 +1303,23 @@ static void valleyview_update_wm(struct drm_device *dev)
1302 &planeb_wm, &cursorb_wm)) 1303 &planeb_wm, &cursorb_wm))
1303 enabled |= 2; 1304 enabled |= 2;
1304 1305
1305 plane_sr = cursor_sr = 0;
1306 if (single_plane_enabled(enabled) && 1306 if (single_plane_enabled(enabled) &&
1307 g4x_compute_srwm(dev, ffs(enabled) - 1, 1307 g4x_compute_srwm(dev, ffs(enabled) - 1,
1308 sr_latency_ns, 1308 sr_latency_ns,
1309 &valleyview_wm_info, 1309 &valleyview_wm_info,
1310 &valleyview_cursor_wm_info, 1310 &valleyview_cursor_wm_info,
1311 &plane_sr, &cursor_sr)) 1311 &plane_sr, &ignore_cursor_sr) &&
1312 g4x_compute_srwm(dev, ffs(enabled) - 1,
1313 2*sr_latency_ns,
1314 &valleyview_wm_info,
1315 &valleyview_cursor_wm_info,
1316 &ignore_plane_sr, &cursor_sr)) {
1312 I915_WRITE(FW_BLC_SELF_VLV, FW_CSPWRDWNEN); 1317 I915_WRITE(FW_BLC_SELF_VLV, FW_CSPWRDWNEN);
1313 else 1318 } else {
1314 I915_WRITE(FW_BLC_SELF_VLV, 1319 I915_WRITE(FW_BLC_SELF_VLV,
1315 I915_READ(FW_BLC_SELF_VLV) & ~FW_CSPWRDWNEN); 1320 I915_READ(FW_BLC_SELF_VLV) & ~FW_CSPWRDWNEN);
1321 plane_sr = cursor_sr = 0;
1322 }
1316 1323
1317 DRM_DEBUG_KMS("Setting FIFO watermarks - A: plane=%d, cursor=%d, B: plane=%d, cursor=%d, SR: plane=%d, cursor=%d\n", 1324 DRM_DEBUG_KMS("Setting FIFO watermarks - A: plane=%d, cursor=%d, B: plane=%d, cursor=%d, SR: plane=%d, cursor=%d\n",
1318 planea_wm, cursora_wm, 1325 planea_wm, cursora_wm,
@@ -1352,17 +1359,18 @@ static void g4x_update_wm(struct drm_device *dev)
1352 &planeb_wm, &cursorb_wm)) 1359 &planeb_wm, &cursorb_wm))
1353 enabled |= 2; 1360 enabled |= 2;
1354 1361
1355 plane_sr = cursor_sr = 0;
1356 if (single_plane_enabled(enabled) && 1362 if (single_plane_enabled(enabled) &&
1357 g4x_compute_srwm(dev, ffs(enabled) - 1, 1363 g4x_compute_srwm(dev, ffs(enabled) - 1,
1358 sr_latency_ns, 1364 sr_latency_ns,
1359 &g4x_wm_info, 1365 &g4x_wm_info,
1360 &g4x_cursor_wm_info, 1366 &g4x_cursor_wm_info,
1361 &plane_sr, &cursor_sr)) 1367 &plane_sr, &cursor_sr)) {
1362 I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN); 1368 I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN);
1363 else 1369 } else {
1364 I915_WRITE(FW_BLC_SELF, 1370 I915_WRITE(FW_BLC_SELF,
1365 I915_READ(FW_BLC_SELF) & ~FW_BLC_SELF_EN); 1371 I915_READ(FW_BLC_SELF) & ~FW_BLC_SELF_EN);
1372 plane_sr = cursor_sr = 0;
1373 }
1366 1374
1367 DRM_DEBUG_KMS("Setting FIFO watermarks - A: plane=%d, cursor=%d, B: plane=%d, cursor=%d, SR: plane=%d, cursor=%d\n", 1375 DRM_DEBUG_KMS("Setting FIFO watermarks - A: plane=%d, cursor=%d, B: plane=%d, cursor=%d, SR: plane=%d, cursor=%d\n",
1368 planea_wm, cursora_wm, 1376 planea_wm, cursora_wm,
@@ -1468,7 +1476,7 @@ static void i9xx_update_wm(struct drm_device *dev)
1468 1476
1469 fifo_size = dev_priv->display.get_fifo_size(dev, 0); 1477 fifo_size = dev_priv->display.get_fifo_size(dev, 0);
1470 crtc = intel_get_crtc_for_plane(dev, 0); 1478 crtc = intel_get_crtc_for_plane(dev, 0);
1471 if (crtc->enabled && crtc->fb) { 1479 if (to_intel_crtc(crtc)->active && crtc->fb) {
1472 int cpp = crtc->fb->bits_per_pixel / 8; 1480 int cpp = crtc->fb->bits_per_pixel / 8;
1473 if (IS_GEN2(dev)) 1481 if (IS_GEN2(dev))
1474 cpp = 4; 1482 cpp = 4;
@@ -1482,7 +1490,7 @@ static void i9xx_update_wm(struct drm_device *dev)
1482 1490
1483 fifo_size = dev_priv->display.get_fifo_size(dev, 1); 1491 fifo_size = dev_priv->display.get_fifo_size(dev, 1);
1484 crtc = intel_get_crtc_for_plane(dev, 1); 1492 crtc = intel_get_crtc_for_plane(dev, 1);
1485 if (crtc->enabled && crtc->fb) { 1493 if (to_intel_crtc(crtc)->active && crtc->fb) {
1486 int cpp = crtc->fb->bits_per_pixel / 8; 1494 int cpp = crtc->fb->bits_per_pixel / 8;
1487 if (IS_GEN2(dev)) 1495 if (IS_GEN2(dev))
1488 cpp = 4; 1496 cpp = 4;
@@ -1811,8 +1819,110 @@ static void sandybridge_update_wm(struct drm_device *dev)
1811 enabled |= 2; 1819 enabled |= 2;
1812 } 1820 }
1813 1821
1814 if ((dev_priv->num_pipe == 3) && 1822 /*
1815 g4x_compute_wm0(dev, 2, 1823 * Calculate and update the self-refresh watermark only when one
1824 * display plane is used.
1825 *
1826 * SNB support 3 levels of watermark.
1827 *
1828 * WM1/WM2/WM2 watermarks have to be enabled in the ascending order,
1829 * and disabled in the descending order
1830 *
1831 */
1832 I915_WRITE(WM3_LP_ILK, 0);
1833 I915_WRITE(WM2_LP_ILK, 0);
1834 I915_WRITE(WM1_LP_ILK, 0);
1835
1836 if (!single_plane_enabled(enabled) ||
1837 dev_priv->sprite_scaling_enabled)
1838 return;
1839 enabled = ffs(enabled) - 1;
1840
1841 /* WM1 */
1842 if (!ironlake_compute_srwm(dev, 1, enabled,
1843 SNB_READ_WM1_LATENCY() * 500,
1844 &sandybridge_display_srwm_info,
1845 &sandybridge_cursor_srwm_info,
1846 &fbc_wm, &plane_wm, &cursor_wm))
1847 return;
1848
1849 I915_WRITE(WM1_LP_ILK,
1850 WM1_LP_SR_EN |
1851 (SNB_READ_WM1_LATENCY() << WM1_LP_LATENCY_SHIFT) |
1852 (fbc_wm << WM1_LP_FBC_SHIFT) |
1853 (plane_wm << WM1_LP_SR_SHIFT) |
1854 cursor_wm);
1855
1856 /* WM2 */
1857 if (!ironlake_compute_srwm(dev, 2, enabled,
1858 SNB_READ_WM2_LATENCY() * 500,
1859 &sandybridge_display_srwm_info,
1860 &sandybridge_cursor_srwm_info,
1861 &fbc_wm, &plane_wm, &cursor_wm))
1862 return;
1863
1864 I915_WRITE(WM2_LP_ILK,
1865 WM2_LP_EN |
1866 (SNB_READ_WM2_LATENCY() << WM1_LP_LATENCY_SHIFT) |
1867 (fbc_wm << WM1_LP_FBC_SHIFT) |
1868 (plane_wm << WM1_LP_SR_SHIFT) |
1869 cursor_wm);
1870
1871 /* WM3 */
1872 if (!ironlake_compute_srwm(dev, 3, enabled,
1873 SNB_READ_WM3_LATENCY() * 500,
1874 &sandybridge_display_srwm_info,
1875 &sandybridge_cursor_srwm_info,
1876 &fbc_wm, &plane_wm, &cursor_wm))
1877 return;
1878
1879 I915_WRITE(WM3_LP_ILK,
1880 WM3_LP_EN |
1881 (SNB_READ_WM3_LATENCY() << WM1_LP_LATENCY_SHIFT) |
1882 (fbc_wm << WM1_LP_FBC_SHIFT) |
1883 (plane_wm << WM1_LP_SR_SHIFT) |
1884 cursor_wm);
1885}
1886
1887static void ivybridge_update_wm(struct drm_device *dev)
1888{
1889 struct drm_i915_private *dev_priv = dev->dev_private;
1890 int latency = SNB_READ_WM0_LATENCY() * 100; /* In unit 0.1us */
1891 u32 val;
1892 int fbc_wm, plane_wm, cursor_wm;
1893 int ignore_fbc_wm, ignore_plane_wm, ignore_cursor_wm;
1894 unsigned int enabled;
1895
1896 enabled = 0;
1897 if (g4x_compute_wm0(dev, 0,
1898 &sandybridge_display_wm_info, latency,
1899 &sandybridge_cursor_wm_info, latency,
1900 &plane_wm, &cursor_wm)) {
1901 val = I915_READ(WM0_PIPEA_ILK);
1902 val &= ~(WM0_PIPE_PLANE_MASK | WM0_PIPE_CURSOR_MASK);
1903 I915_WRITE(WM0_PIPEA_ILK, val |
1904 ((plane_wm << WM0_PIPE_PLANE_SHIFT) | cursor_wm));
1905 DRM_DEBUG_KMS("FIFO watermarks For pipe A -"
1906 " plane %d, " "cursor: %d\n",
1907 plane_wm, cursor_wm);
1908 enabled |= 1;
1909 }
1910
1911 if (g4x_compute_wm0(dev, 1,
1912 &sandybridge_display_wm_info, latency,
1913 &sandybridge_cursor_wm_info, latency,
1914 &plane_wm, &cursor_wm)) {
1915 val = I915_READ(WM0_PIPEB_ILK);
1916 val &= ~(WM0_PIPE_PLANE_MASK | WM0_PIPE_CURSOR_MASK);
1917 I915_WRITE(WM0_PIPEB_ILK, val |
1918 ((plane_wm << WM0_PIPE_PLANE_SHIFT) | cursor_wm));
1919 DRM_DEBUG_KMS("FIFO watermarks For pipe B -"
1920 " plane %d, cursor: %d\n",
1921 plane_wm, cursor_wm);
1922 enabled |= 2;
1923 }
1924
1925 if (g4x_compute_wm0(dev, 2,
1816 &sandybridge_display_wm_info, latency, 1926 &sandybridge_display_wm_info, latency,
1817 &sandybridge_cursor_wm_info, latency, 1927 &sandybridge_cursor_wm_info, latency,
1818 &plane_wm, &cursor_wm)) { 1928 &plane_wm, &cursor_wm)) {
@@ -1875,12 +1985,17 @@ static void sandybridge_update_wm(struct drm_device *dev)
1875 (plane_wm << WM1_LP_SR_SHIFT) | 1985 (plane_wm << WM1_LP_SR_SHIFT) |
1876 cursor_wm); 1986 cursor_wm);
1877 1987
1878 /* WM3 */ 1988 /* WM3, note we have to correct the cursor latency */
1879 if (!ironlake_compute_srwm(dev, 3, enabled, 1989 if (!ironlake_compute_srwm(dev, 3, enabled,
1880 SNB_READ_WM3_LATENCY() * 500, 1990 SNB_READ_WM3_LATENCY() * 500,
1881 &sandybridge_display_srwm_info, 1991 &sandybridge_display_srwm_info,
1882 &sandybridge_cursor_srwm_info, 1992 &sandybridge_cursor_srwm_info,
1883 &fbc_wm, &plane_wm, &cursor_wm)) 1993 &fbc_wm, &plane_wm, &ignore_cursor_wm) ||
1994 !ironlake_compute_srwm(dev, 3, enabled,
1995 2 * SNB_READ_WM3_LATENCY() * 500,
1996 &sandybridge_display_srwm_info,
1997 &sandybridge_cursor_srwm_info,
1998 &ignore_fbc_wm, &ignore_plane_wm, &cursor_wm))
1884 return; 1999 return;
1885 2000
1886 I915_WRITE(WM3_LP_ILK, 2001 I915_WRITE(WM3_LP_ILK,
@@ -1929,7 +2044,7 @@ sandybridge_compute_sprite_wm(struct drm_device *dev, int plane,
1929 int entries, tlb_miss; 2044 int entries, tlb_miss;
1930 2045
1931 crtc = intel_get_crtc_for_plane(dev, plane); 2046 crtc = intel_get_crtc_for_plane(dev, plane);
1932 if (crtc->fb == NULL || !crtc->enabled) { 2047 if (crtc->fb == NULL || !to_intel_crtc(crtc)->active) {
1933 *sprite_wm = display->guard_size; 2048 *sprite_wm = display->guard_size;
1934 return false; 2049 return false;
1935 } 2050 }
@@ -3471,6 +3586,15 @@ static void gen6_init_clock_gating(struct drm_device *dev)
3471 I915_READ(ILK_DISPLAY_CHICKEN2) | 3586 I915_READ(ILK_DISPLAY_CHICKEN2) |
3472 ILK_ELPIN_409_SELECT); 3587 ILK_ELPIN_409_SELECT);
3473 3588
3589 /* WaDisableHiZPlanesWhenMSAAEnabled */
3590 I915_WRITE(_3D_CHICKEN,
3591 _MASKED_BIT_ENABLE(_3D_CHICKEN_HIZ_PLANE_DISABLE_MSAA_4X_SNB));
3592
3593 /* WaSetupGtModeTdRowDispatch */
3594 if (IS_SNB_GT1(dev))
3595 I915_WRITE(GEN6_GT_MODE,
3596 _MASKED_BIT_ENABLE(GEN6_TD_FOUR_ROW_DISPATCH_DISABLE));
3597
3474 I915_WRITE(WM3_LP_ILK, 0); 3598 I915_WRITE(WM3_LP_ILK, 0);
3475 I915_WRITE(WM2_LP_ILK, 0); 3599 I915_WRITE(WM2_LP_ILK, 0);
3476 I915_WRITE(WM1_LP_ILK, 0); 3600 I915_WRITE(WM1_LP_ILK, 0);
@@ -3999,7 +4123,7 @@ void intel_init_pm(struct drm_device *dev)
3999 } else if (IS_IVYBRIDGE(dev)) { 4123 } else if (IS_IVYBRIDGE(dev)) {
4000 /* FIXME: detect B0+ stepping and use auto training */ 4124 /* FIXME: detect B0+ stepping and use auto training */
4001 if (SNB_READ_WM0_LATENCY()) { 4125 if (SNB_READ_WM0_LATENCY()) {
4002 dev_priv->display.update_wm = sandybridge_update_wm; 4126 dev_priv->display.update_wm = ivybridge_update_wm;
4003 dev_priv->display.update_sprite_wm = sandybridge_update_sprite_wm; 4127 dev_priv->display.update_sprite_wm = sandybridge_update_sprite_wm;
4004 } else { 4128 } else {
4005 DRM_DEBUG_KMS("Failed to read display plane latency. " 4129 DRM_DEBUG_KMS("Failed to read display plane latency. "
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 2346b920bd86..ae253e04c391 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -547,9 +547,14 @@ static int init_render_ring(struct intel_ring_buffer *ring)
547 547
548static void render_ring_cleanup(struct intel_ring_buffer *ring) 548static void render_ring_cleanup(struct intel_ring_buffer *ring)
549{ 549{
550 struct drm_device *dev = ring->dev;
551
550 if (!ring->private) 552 if (!ring->private)
551 return; 553 return;
552 554
555 if (HAS_BROKEN_CS_TLB(dev))
556 drm_gem_object_unreference(to_gem_object(ring->private));
557
553 cleanup_pipe_control(ring); 558 cleanup_pipe_control(ring);
554} 559}
555 560
@@ -969,6 +974,8 @@ i965_dispatch_execbuffer(struct intel_ring_buffer *ring,
969 return 0; 974 return 0;
970} 975}
971 976
977/* Just userspace ABI convention to limit the wa batch bo to a resonable size */
978#define I830_BATCH_LIMIT (256*1024)
972static int 979static int
973i830_dispatch_execbuffer(struct intel_ring_buffer *ring, 980i830_dispatch_execbuffer(struct intel_ring_buffer *ring,
974 u32 offset, u32 len, 981 u32 offset, u32 len,
@@ -976,15 +983,47 @@ i830_dispatch_execbuffer(struct intel_ring_buffer *ring,
976{ 983{
977 int ret; 984 int ret;
978 985
979 ret = intel_ring_begin(ring, 4); 986 if (flags & I915_DISPATCH_PINNED) {
980 if (ret) 987 ret = intel_ring_begin(ring, 4);
981 return ret; 988 if (ret)
989 return ret;
982 990
983 intel_ring_emit(ring, MI_BATCH_BUFFER); 991 intel_ring_emit(ring, MI_BATCH_BUFFER);
984 intel_ring_emit(ring, offset | (flags & I915_DISPATCH_SECURE ? 0 : MI_BATCH_NON_SECURE)); 992 intel_ring_emit(ring, offset | (flags & I915_DISPATCH_SECURE ? 0 : MI_BATCH_NON_SECURE));
985 intel_ring_emit(ring, offset + len - 8); 993 intel_ring_emit(ring, offset + len - 8);
986 intel_ring_emit(ring, 0); 994 intel_ring_emit(ring, MI_NOOP);
987 intel_ring_advance(ring); 995 intel_ring_advance(ring);
996 } else {
997 struct drm_i915_gem_object *obj = ring->private;
998 u32 cs_offset = obj->gtt_offset;
999
1000 if (len > I830_BATCH_LIMIT)
1001 return -ENOSPC;
1002
1003 ret = intel_ring_begin(ring, 9+3);
1004 if (ret)
1005 return ret;
1006 /* Blit the batch (which has now all relocs applied) to the stable batch
1007 * scratch bo area (so that the CS never stumbles over its tlb
1008 * invalidation bug) ... */
1009 intel_ring_emit(ring, XY_SRC_COPY_BLT_CMD |
1010 XY_SRC_COPY_BLT_WRITE_ALPHA |
1011 XY_SRC_COPY_BLT_WRITE_RGB);
1012 intel_ring_emit(ring, BLT_DEPTH_32 | BLT_ROP_GXCOPY | 4096);
1013 intel_ring_emit(ring, 0);
1014 intel_ring_emit(ring, (DIV_ROUND_UP(len, 4096) << 16) | 1024);
1015 intel_ring_emit(ring, cs_offset);
1016 intel_ring_emit(ring, 0);
1017 intel_ring_emit(ring, 4096);
1018 intel_ring_emit(ring, offset);
1019 intel_ring_emit(ring, MI_FLUSH);
1020
1021 /* ... and execute it. */
1022 intel_ring_emit(ring, MI_BATCH_BUFFER);
1023 intel_ring_emit(ring, cs_offset | (flags & I915_DISPATCH_SECURE ? 0 : MI_BATCH_NON_SECURE));
1024 intel_ring_emit(ring, cs_offset + len - 8);
1025 intel_ring_advance(ring);
1026 }
988 1027
989 return 0; 1028 return 0;
990} 1029}
@@ -1596,6 +1635,27 @@ int intel_init_render_ring_buffer(struct drm_device *dev)
1596 ring->init = init_render_ring; 1635 ring->init = init_render_ring;
1597 ring->cleanup = render_ring_cleanup; 1636 ring->cleanup = render_ring_cleanup;
1598 1637
1638 /* Workaround batchbuffer to combat CS tlb bug. */
1639 if (HAS_BROKEN_CS_TLB(dev)) {
1640 struct drm_i915_gem_object *obj;
1641 int ret;
1642
1643 obj = i915_gem_alloc_object(dev, I830_BATCH_LIMIT);
1644 if (obj == NULL) {
1645 DRM_ERROR("Failed to allocate batch bo\n");
1646 return -ENOMEM;
1647 }
1648
1649 ret = i915_gem_object_pin(obj, 0, true, false);
1650 if (ret != 0) {
1651 drm_gem_object_unreference(&obj->base);
1652 DRM_ERROR("Failed to ping batch bo\n");
1653 return ret;
1654 }
1655
1656 ring->private = obj;
1657 }
1658
1599 return intel_init_ring_buffer(dev, ring); 1659 return intel_init_ring_buffer(dev, ring);
1600} 1660}
1601 1661
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index 526182ed0c6d..6af87cd05725 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -94,6 +94,7 @@ struct intel_ring_buffer {
94 u32 offset, u32 length, 94 u32 offset, u32 length,
95 unsigned flags); 95 unsigned flags);
96#define I915_DISPATCH_SECURE 0x1 96#define I915_DISPATCH_SECURE 0x1
97#define I915_DISPATCH_PINNED 0x2
97 void (*cleanup)(struct intel_ring_buffer *ring); 98 void (*cleanup)(struct intel_ring_buffer *ring);
98 int (*sync_to)(struct intel_ring_buffer *ring, 99 int (*sync_to)(struct intel_ring_buffer *ring,
99 struct intel_ring_buffer *to, 100 struct intel_ring_buffer *to,
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index 1e910117b0a2..122b571ccc7c 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -60,8 +60,7 @@ static void mgag200_kick_out_firmware_fb(struct pci_dev *pdev)
60} 60}
61 61
62 62
63static int __devinit 63static int mga_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
64mga_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
65{ 64{
66 mgag200_kick_out_firmware_fb(pdev); 65 mgag200_kick_out_firmware_fb(pdev);
67 66
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc
index 7b715fda2763..62ab231cd6b6 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc
@@ -57,6 +57,11 @@ chipsets:
57.b16 #nve4_gpc_mmio_tail 57.b16 #nve4_gpc_mmio_tail
58.b16 #nve4_tpc_mmio_head 58.b16 #nve4_tpc_mmio_head
59.b16 #nve4_tpc_mmio_tail 59.b16 #nve4_tpc_mmio_tail
60.b8 0xe6 0 0 0
61.b16 #nve4_gpc_mmio_head
62.b16 #nve4_gpc_mmio_tail
63.b16 #nve4_tpc_mmio_head
64.b16 #nve4_tpc_mmio_tail
60.b8 0 0 0 0 65.b8 0 0 0 0
61 66
62// GPC mmio lists 67// GPC mmio lists
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h
index 26c2165bad0f..09ee4702c8b2 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h
@@ -34,13 +34,16 @@ uint32_t nve0_grgpc_data[] = {
34 0x00000000, 34 0x00000000,
35/* 0x0064: chipsets */ 35/* 0x0064: chipsets */
36 0x000000e4, 36 0x000000e4,
37 0x01040080, 37 0x0110008c,
38 0x014c0104, 38 0x01580110,
39 0x000000e7, 39 0x000000e7,
40 0x01040080, 40 0x0110008c,
41 0x014c0104, 41 0x01580110,
42 0x000000e6,
43 0x0110008c,
44 0x01580110,
42 0x00000000, 45 0x00000000,
43/* 0x0080: nve4_gpc_mmio_head */ 46/* 0x008c: nve4_gpc_mmio_head */
44 0x00000380, 47 0x00000380,
45 0x04000400, 48 0x04000400,
46 0x0800040c, 49 0x0800040c,
@@ -74,8 +77,8 @@ uint32_t nve0_grgpc_data[] = {
74 0x14003100, 77 0x14003100,
75 0x000031d0, 78 0x000031d0,
76 0x040031e0, 79 0x040031e0,
77/* 0x0104: nve4_gpc_mmio_tail */ 80/* 0x0110: nve4_gpc_mmio_tail */
78/* 0x0104: nve4_tpc_mmio_head */ 81/* 0x0110: nve4_tpc_mmio_head */
79 0x00000048, 82 0x00000048,
80 0x00000064, 83 0x00000064,
81 0x00000088, 84 0x00000088,
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc
index acfc457654bd..0bcfa4d447e5 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc
@@ -754,6 +754,16 @@ ctx_mmio_exec:
754// on load it means: "a save preceeded this load" 754// on load it means: "a save preceeded this load"
755// 755//
756ctx_xfer: 756ctx_xfer:
757 // according to mwk, some kind of wait for idle
758 mov $r15 0xc00
759 shl b32 $r15 6
760 mov $r14 4
761 iowr I[$r15 + 0x200] $r14
762 ctx_xfer_idle:
763 iord $r14 I[$r15 + 0x000]
764 and $r14 0x2000
765 bra ne #ctx_xfer_idle
766
757 bra not $p1 #ctx_xfer_pre 767 bra not $p1 #ctx_xfer_pre
758 bra $p2 #ctx_xfer_pre_load 768 bra $p2 #ctx_xfer_pre_load
759 ctx_xfer_pre: 769 ctx_xfer_pre:
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h
index 85a8d556f484..bb03d2a1d57b 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h
@@ -799,79 +799,80 @@ uint32_t nvc0_grhub_code[] = {
799 0x01fa0613, 799 0x01fa0613,
800 0xf803f806, 800 0xf803f806,
801/* 0x0829: ctx_xfer */ 801/* 0x0829: ctx_xfer */
802 0x0611f400, 802 0x00f7f100,
803/* 0x082f: ctx_xfer_pre */ 803 0x06f4b60c,
804 0xf01102f4, 804 0xd004e7f0,
805 0x21f510f7, 805/* 0x0836: ctx_xfer_idle */
806 0x21f50698, 806 0xfecf80fe,
807 0x11f40631, 807 0x00e4f100,
808/* 0x083d: ctx_xfer_pre_load */ 808 0xf91bf420,
809 0x02f7f01c, 809 0xf40611f4,
810 0x065721f5, 810/* 0x0846: ctx_xfer_pre */
811 0x066621f5, 811 0xf7f01102,
812 0x067821f5, 812 0x9821f510,
813 0x21f5f4bd, 813 0x3121f506,
814 0x21f50657, 814 0x1c11f406,
815/* 0x0856: ctx_xfer_exec */ 815/* 0x0854: ctx_xfer_pre_load */
816 0x019806b8, 816 0xf502f7f0,
817 0x1427f116, 817 0xf5065721,
818 0x0624b604, 818 0xf5066621,
819 0xf10020d0, 819 0xbd067821,
820 0xf0a500e7, 820 0x5721f5f4,
821 0x1fb941e3, 821 0xb821f506,
822 0x8d21f402, 822/* 0x086d: ctx_xfer_exec */
823 0xf004e0b6, 823 0x16019806,
824 0x2cf001fc, 824 0x041427f1,
825 0x0124b602, 825 0xd00624b6,
826 0xf405f2fd, 826 0xe7f10020,
827 0x17f18d21, 827 0xe3f0a500,
828 0x13f04afc, 828 0x021fb941,
829 0x0c27f002, 829 0xb68d21f4,
830 0xf50012d0, 830 0xfcf004e0,
831 0xf1020721, 831 0x022cf001,
832 0xf047fc27, 832 0xfd0124b6,
833 0x20d00223, 833 0x21f405f2,
834 0x012cf000, 834 0xfc17f18d,
835 0xd00320b6, 835 0x0213f04a,
836 0xacf00012, 836 0xd00c27f0,
837 0x06a5f001, 837 0x21f50012,
838 0x9800b7f0, 838 0x27f10207,
839 0x0d98140c, 839 0x23f047fc,
840 0x00e7f015, 840 0x0020d002,
841 0x015c21f5, 841 0xb6012cf0,
842 0xf508a7f0, 842 0x12d00320,
843 0xf5010321, 843 0x01acf000,
844 0xf4020721, 844 0xf006a5f0,
845 0xa7f02201, 845 0x0c9800b7,
846 0xc921f40c, 846 0x150d9814,
847 0x0a1017f1, 847 0xf500e7f0,
848 0xf00614b6, 848 0xf0015c21,
849 0x12d00527, 849 0x21f508a7,
850/* 0x08dd: ctx_xfer_post_save_wait */ 850 0x21f50103,
851 0x0012cf00, 851 0x01f40207,
852 0xf40522fd, 852 0x0ca7f022,
853 0x02f4fa1b, 853 0xf1c921f4,
854/* 0x08e9: ctx_xfer_post */ 854 0xb60a1017,
855 0x02f7f032, 855 0x27f00614,
856 0x065721f5, 856 0x0012d005,
857 0x21f5f4bd, 857/* 0x08f4: ctx_xfer_post_save_wait */
858 0x21f50698, 858 0xfd0012cf,
859 0x21f50226, 859 0x1bf40522,
860 0xf4bd0666, 860 0x3202f4fa,
861 0x065721f5, 861/* 0x0900: ctx_xfer_post */
862 0x981011f4, 862 0xf502f7f0,
863 0x11fd8001, 863 0xbd065721,
864 0x070bf405, 864 0x9821f5f4,
865 0x07df21f5, 865 0x2621f506,
866/* 0x0914: ctx_xfer_no_post_mmio */ 866 0x6621f502,
867 0x064921f5, 867 0xf5f4bd06,
868/* 0x0918: ctx_xfer_done */ 868 0xf4065721,
869 0x000000f8, 869 0x01981011,
870 0x00000000, 870 0x0511fd80,
871 0x00000000, 871 0xf5070bf4,
872 0x00000000, 872/* 0x092b: ctx_xfer_no_post_mmio */
873 0x00000000, 873 0xf507df21,
874 0x00000000, 874/* 0x092f: ctx_xfer_done */
875 0xf8064921,
875 0x00000000, 876 0x00000000,
876 0x00000000, 877 0x00000000,
877 0x00000000, 878 0x00000000,
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc
index 138eeaa28665..7fe9d7cf486b 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc
@@ -44,6 +44,9 @@ chipsets:
44.b8 0xe7 0 0 0 44.b8 0xe7 0 0 0
45.b16 #nve4_hub_mmio_head 45.b16 #nve4_hub_mmio_head
46.b16 #nve4_hub_mmio_tail 46.b16 #nve4_hub_mmio_tail
47.b8 0xe6 0 0 0
48.b16 #nve4_hub_mmio_head
49.b16 #nve4_hub_mmio_tail
47.b8 0 0 0 0 50.b8 0 0 0 0
48 51
49nve4_hub_mmio_head: 52nve4_hub_mmio_head:
@@ -680,6 +683,16 @@ ctx_mmio_exec:
680// on load it means: "a save preceeded this load" 683// on load it means: "a save preceeded this load"
681// 684//
682ctx_xfer: 685ctx_xfer:
686 // according to mwk, some kind of wait for idle
687 mov $r15 0xc00
688 shl b32 $r15 6
689 mov $r14 4
690 iowr I[$r15 + 0x200] $r14
691 ctx_xfer_idle:
692 iord $r14 I[$r15 + 0x000]
693 and $r14 0x2000
694 bra ne #ctx_xfer_idle
695
683 bra not $p1 #ctx_xfer_pre 696 bra not $p1 #ctx_xfer_pre
684 bra $p2 #ctx_xfer_pre_load 697 bra $p2 #ctx_xfer_pre_load
685 ctx_xfer_pre: 698 ctx_xfer_pre:
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h
index decf0c60ca3b..e3421af68ab9 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h
@@ -30,11 +30,13 @@ uint32_t nve0_grhub_data[] = {
30 0x00000000, 30 0x00000000,
31/* 0x005c: chipsets */ 31/* 0x005c: chipsets */
32 0x000000e4, 32 0x000000e4,
33 0x013c0070, 33 0x01440078,
34 0x000000e7, 34 0x000000e7,
35 0x013c0070, 35 0x01440078,
36 0x000000e6,
37 0x01440078,
36 0x00000000, 38 0x00000000,
37/* 0x0070: nve4_hub_mmio_head */ 39/* 0x0078: nve4_hub_mmio_head */
38 0x0417e91c, 40 0x0417e91c,
39 0x04400204, 41 0x04400204,
40 0x18404010, 42 0x18404010,
@@ -86,9 +88,7 @@ uint32_t nve0_grhub_data[] = {
86 0x00408840, 88 0x00408840,
87 0x08408900, 89 0x08408900,
88 0x00408980, 90 0x00408980,
89/* 0x013c: nve4_hub_mmio_tail */ 91/* 0x0144: nve4_hub_mmio_tail */
90 0x00000000,
91 0x00000000,
92 0x00000000, 92 0x00000000,
93 0x00000000, 93 0x00000000,
94 0x00000000, 94 0x00000000,
@@ -781,77 +781,78 @@ uint32_t nve0_grhub_code[] = {
781 0x0613f002, 781 0x0613f002,
782 0xf80601fa, 782 0xf80601fa,
783/* 0x07fb: ctx_xfer */ 783/* 0x07fb: ctx_xfer */
784 0xf400f803, 784 0xf100f803,
785 0x02f40611, 785 0xb60c00f7,
786/* 0x0801: ctx_xfer_pre */ 786 0xe7f006f4,
787 0x10f7f00d, 787 0x80fed004,
788 0x067221f5, 788/* 0x0808: ctx_xfer_idle */
789/* 0x080b: ctx_xfer_pre_load */ 789 0xf100fecf,
790 0xf01c11f4, 790 0xf42000e4,
791 0x21f502f7, 791 0x11f4f91b,
792 0x21f50631, 792 0x0d02f406,
793 0x21f50640, 793/* 0x0818: ctx_xfer_pre */
794 0xf4bd0652, 794 0xf510f7f0,
795 0x063121f5, 795 0xf4067221,
796 0x069221f5, 796/* 0x0822: ctx_xfer_pre_load */
797/* 0x0824: ctx_xfer_exec */ 797 0xf7f01c11,
798 0xf1160198, 798 0x3121f502,
799 0xb6041427, 799 0x4021f506,
800 0x20d00624, 800 0x5221f506,
801 0x00e7f100, 801 0xf5f4bd06,
802 0x41e3f0a5, 802 0xf5063121,
803 0xf4021fb9, 803/* 0x083b: ctx_xfer_exec */
804 0xe0b68d21, 804 0x98069221,
805 0x01fcf004, 805 0x27f11601,
806 0xb6022cf0, 806 0x24b60414,
807 0xf2fd0124, 807 0x0020d006,
808 0x8d21f405, 808 0xa500e7f1,
809 0x4afc17f1, 809 0xb941e3f0,
810 0xf00213f0, 810 0x21f4021f,
811 0x12d00c27, 811 0x04e0b68d,
812 0x0721f500, 812 0xf001fcf0,
813 0xfc27f102, 813 0x24b6022c,
814 0x0223f047, 814 0x05f2fd01,
815 0xf00020d0, 815 0xf18d21f4,
816 0x20b6012c, 816 0xf04afc17,
817 0x0012d003, 817 0x27f00213,
818 0xf001acf0, 818 0x0012d00c,
819 0xb7f006a5, 819 0x020721f5,
820 0x140c9800, 820 0x47fc27f1,
821 0xf0150d98, 821 0xd00223f0,
822 0x21f500e7, 822 0x2cf00020,
823 0xa7f0015c, 823 0x0320b601,
824 0x0321f508, 824 0xf00012d0,
825 0x0721f501, 825 0xa5f001ac,
826 0x2201f402, 826 0x00b7f006,
827 0xf40ca7f0, 827 0x98140c98,
828 0x17f1c921, 828 0xe7f0150d,
829 0x14b60a10, 829 0x5c21f500,
830 0x0527f006, 830 0x08a7f001,
831/* 0x08ab: ctx_xfer_post_save_wait */ 831 0x010321f5,
832 0xcf0012d0, 832 0x020721f5,
833 0x22fd0012, 833 0xf02201f4,
834 0xfa1bf405, 834 0x21f40ca7,
835/* 0x08b7: ctx_xfer_post */ 835 0x1017f1c9,
836 0xf02e02f4, 836 0x0614b60a,
837 0x21f502f7, 837 0xd00527f0,
838 0xf4bd0631, 838/* 0x08c2: ctx_xfer_post_save_wait */
839 0x067221f5, 839 0x12cf0012,
840 0x022621f5, 840 0x0522fd00,
841 0x064021f5, 841 0xf4fa1bf4,
842 0x21f5f4bd, 842/* 0x08ce: ctx_xfer_post */
843 0x11f40631, 843 0xf7f02e02,
844 0x80019810, 844 0x3121f502,
845 0xf40511fd, 845 0xf5f4bd06,
846 0x21f5070b, 846 0xf5067221,
847/* 0x08e2: ctx_xfer_no_post_mmio */ 847 0xf5022621,
848/* 0x08e2: ctx_xfer_done */ 848 0xbd064021,
849 0x00f807b1, 849 0x3121f5f4,
850 0x00000000, 850 0x1011f406,
851 0x00000000, 851 0xfd800198,
852 0x00000000, 852 0x0bf40511,
853 0x00000000, 853 0xb121f507,
854 0x00000000, 854/* 0x08f9: ctx_xfer_no_post_mmio */
855 0x00000000, 855/* 0x08f9: ctx_xfer_done */
856 0x0000f807,
856 0x00000000, 857 0x00000000,
857}; 858};
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
index 47a02081d708..45aff5f5085a 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
@@ -516,18 +516,9 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
516{ 516{
517 struct nouveau_device *device = nv_device(parent); 517 struct nouveau_device *device = nv_device(parent);
518 struct nvc0_graph_priv *priv; 518 struct nvc0_graph_priv *priv;
519 bool enable = true;
520 int ret, i; 519 int ret, i;
521 520
522 switch (device->chipset) { 521 ret = nouveau_graph_create(parent, engine, oclass, true, &priv);
523 case 0xd9: /* known broken without binary driver firmware */
524 enable = false;
525 break;
526 default:
527 break;
528 }
529
530 ret = nouveau_graph_create(parent, engine, oclass, enable, &priv);
531 *pobject = nv_object(priv); 522 *pobject = nv_object(priv);
532 if (ret) 523 if (ret)
533 return ret; 524 return ret;
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h
index 18d2210e12eb..a1e78de46456 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h
@@ -121,6 +121,7 @@ nvc0_graph_class(void *obj)
121 return 0x9297; 121 return 0x9297;
122 case 0xe4: 122 case 0xe4:
123 case 0xe7: 123 case 0xe7:
124 case 0xe6:
124 return 0xa097; 125 return 0xa097;
125 default: 126 default:
126 return 0; 127 return 0;
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c
index 539d4c72f192..9f82e9702b46 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c
@@ -203,7 +203,7 @@ nve0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
203 struct nvc0_graph_priv *priv; 203 struct nvc0_graph_priv *priv;
204 int ret, i; 204 int ret, i;
205 205
206 ret = nouveau_graph_create(parent, engine, oclass, false, &priv); 206 ret = nouveau_graph_create(parent, engine, oclass, true, &priv);
207 *pobject = nv_object(priv); 207 *pobject = nv_object(priv);
208 if (ret) 208 if (ret)
209 return ret; 209 return ret;
@@ -252,6 +252,7 @@ nve0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
252 priv->magic_not_rop_nr = 1; 252 priv->magic_not_rop_nr = 1;
253 break; 253 break;
254 case 0xe7: 254 case 0xe7:
255 case 0xe6:
255 priv->magic_not_rop_nr = 1; 256 priv->magic_not_rop_nr = 1;
256 break; 257 break;
257 default: 258 default:
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/bios.h b/drivers/gpu/drm/nouveau/core/include/subdev/bios.h
index d145b25e6be4..5bd1ca8cd20d 100644
--- a/drivers/gpu/drm/nouveau/core/include/subdev/bios.h
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/bios.h
@@ -17,6 +17,7 @@ struct nouveau_bios {
17 u8 chip; 17 u8 chip;
18 u8 minor; 18 u8 minor;
19 u8 micro; 19 u8 micro;
20 u8 patch;
20 } version; 21 } version;
21}; 22};
22 23
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/bios/gpio.h b/drivers/gpu/drm/nouveau/core/include/subdev/bios/gpio.h
index 2bf178082a36..e6563b5cb08e 100644
--- a/drivers/gpu/drm/nouveau/core/include/subdev/bios/gpio.h
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/bios/gpio.h
@@ -25,9 +25,11 @@ struct dcb_gpio_func {
25 u8 param; 25 u8 param;
26}; 26};
27 27
28u16 dcb_gpio_table(struct nouveau_bios *); 28u16 dcb_gpio_table(struct nouveau_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len);
29u16 dcb_gpio_entry(struct nouveau_bios *, int idx, int ent, u8 *ver); 29u16 dcb_gpio_entry(struct nouveau_bios *, int idx, int ent, u8 *ver, u8 *len);
30int dcb_gpio_parse(struct nouveau_bios *, int idx, u8 func, u8 line, 30u16 dcb_gpio_parse(struct nouveau_bios *, int idx, int ent, u8 *ver, u8 *len,
31 struct dcb_gpio_func *); 31 struct dcb_gpio_func *);
32u16 dcb_gpio_match(struct nouveau_bios *, int idx, u8 func, u8 line,
33 u8 *ver, u8 *len, struct dcb_gpio_func *);
32 34
33#endif 35#endif
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/bios/init.h b/drivers/gpu/drm/nouveau/core/include/subdev/bios/init.h
index e69a8bdc6e97..ca2f6bf37f46 100644
--- a/drivers/gpu/drm/nouveau/core/include/subdev/bios/init.h
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/bios/init.h
@@ -13,6 +13,7 @@ struct nvbios_init {
13 u32 nested; 13 u32 nested;
14 u16 repeat; 14 u16 repeat;
15 u16 repend; 15 u16 repend;
16 u32 ramcfg;
16}; 17};
17 18
18int nvbios_exec(struct nvbios_init *); 19int nvbios_exec(struct nvbios_init *);
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/gpio.h b/drivers/gpu/drm/nouveau/core/include/subdev/gpio.h
index 9ea2b12cc15d..b75e8f18e52c 100644
--- a/drivers/gpu/drm/nouveau/core/include/subdev/gpio.h
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/gpio.h
@@ -11,7 +11,7 @@ struct nouveau_gpio {
11 struct nouveau_subdev base; 11 struct nouveau_subdev base;
12 12
13 /* hardware interfaces */ 13 /* hardware interfaces */
14 void (*reset)(struct nouveau_gpio *); 14 void (*reset)(struct nouveau_gpio *, u8 func);
15 int (*drive)(struct nouveau_gpio *, int line, int dir, int out); 15 int (*drive)(struct nouveau_gpio *, int line, int dir, int out);
16 int (*sense)(struct nouveau_gpio *, int line); 16 int (*sense)(struct nouveau_gpio *, int line);
17 void (*irq_enable)(struct nouveau_gpio *, int line, bool); 17 void (*irq_enable)(struct nouveau_gpio *, int line, bool);
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c b/drivers/gpu/drm/nouveau/core/subdev/bios/base.c
index dd111947eb86..f621f69fa1a2 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/bios/base.c
@@ -447,6 +447,7 @@ nouveau_bios_ctor(struct nouveau_object *parent,
447 bios->version.chip = nv_ro08(bios, bit_i.offset + 2); 447 bios->version.chip = nv_ro08(bios, bit_i.offset + 2);
448 bios->version.minor = nv_ro08(bios, bit_i.offset + 1); 448 bios->version.minor = nv_ro08(bios, bit_i.offset + 1);
449 bios->version.micro = nv_ro08(bios, bit_i.offset + 0); 449 bios->version.micro = nv_ro08(bios, bit_i.offset + 0);
450 bios->version.patch = nv_ro08(bios, bit_i.offset + 4);
450 } else 451 } else
451 if (bmp_version(bios)) { 452 if (bmp_version(bios)) {
452 bios->version.major = nv_ro08(bios, bios->bmp_offset + 13); 453 bios->version.major = nv_ro08(bios, bios->bmp_offset + 13);
@@ -455,9 +456,9 @@ nouveau_bios_ctor(struct nouveau_object *parent,
455 bios->version.micro = nv_ro08(bios, bios->bmp_offset + 10); 456 bios->version.micro = nv_ro08(bios, bios->bmp_offset + 10);
456 } 457 }
457 458
458 nv_info(bios, "version %02x.%02x.%02x.%02x\n", 459 nv_info(bios, "version %02x.%02x.%02x.%02x.%02x\n",
459 bios->version.major, bios->version.chip, 460 bios->version.major, bios->version.chip,
460 bios->version.minor, bios->version.micro); 461 bios->version.minor, bios->version.micro, bios->version.patch);
461 462
462 return 0; 463 return 0;
463} 464}
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c b/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c
index c90d4aa3ae4f..c84e93fa6d95 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c
@@ -27,84 +27,105 @@
27#include <subdev/bios/gpio.h> 27#include <subdev/bios/gpio.h>
28 28
29u16 29u16
30dcb_gpio_table(struct nouveau_bios *bios) 30dcb_gpio_table(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
31{ 31{
32 u8 ver, hdr, cnt, len; 32 u16 data = 0x0000;
33 u16 dcb = dcb_table(bios, &ver, &hdr, &cnt, &len); 33 u16 dcb = dcb_table(bios, ver, hdr, cnt, len);
34 if (dcb) { 34 if (dcb) {
35 if (ver >= 0x30 && hdr >= 0x0c) 35 if (*ver >= 0x30 && *hdr >= 0x0c)
36 return nv_ro16(bios, dcb + 0x0a); 36 data = nv_ro16(bios, dcb + 0x0a);
37 if (ver >= 0x22 && nv_ro08(bios, dcb - 1) >= 0x13) 37 else
38 return nv_ro16(bios, dcb - 0x0f); 38 if (*ver >= 0x22 && nv_ro08(bios, dcb - 1) >= 0x13)
39 data = nv_ro16(bios, dcb - 0x0f);
40
41 if (data) {
42 *ver = nv_ro08(bios, data + 0x00);
43 if (*ver < 0x30) {
44 *hdr = 3;
45 *cnt = nv_ro08(bios, data + 0x02);
46 *len = nv_ro08(bios, data + 0x01);
47 } else
48 if (*ver <= 0x41) {
49 *hdr = nv_ro08(bios, data + 0x01);
50 *cnt = nv_ro08(bios, data + 0x02);
51 *len = nv_ro08(bios, data + 0x03);
52 } else {
53 data = 0x0000;
54 }
55 }
39 } 56 }
40 return 0x0000; 57 return data;
41} 58}
42 59
43u16 60u16
44dcb_gpio_entry(struct nouveau_bios *bios, int idx, int ent, u8 *ver) 61dcb_gpio_entry(struct nouveau_bios *bios, int idx, int ent, u8 *ver, u8 *len)
45{ 62{
46 u16 gpio = dcb_gpio_table(bios); 63 u8 hdr, cnt;
47 if (gpio) { 64 u16 gpio = !idx ? dcb_gpio_table(bios, ver, &hdr, &cnt, len) : 0x0000;
48 *ver = nv_ro08(bios, gpio); 65 if (gpio && ent < cnt)
49 if (*ver < 0x30 && ent < nv_ro08(bios, gpio + 2)) 66 return gpio + hdr + (ent * *len);
50 return gpio + 3 + (ent * nv_ro08(bios, gpio + 1));
51 else if (ent < nv_ro08(bios, gpio + 2))
52 return gpio + nv_ro08(bios, gpio + 1) +
53 (ent * nv_ro08(bios, gpio + 3));
54 }
55 return 0x0000; 67 return 0x0000;
56} 68}
57 69
58int 70u16
59dcb_gpio_parse(struct nouveau_bios *bios, int idx, u8 func, u8 line, 71dcb_gpio_parse(struct nouveau_bios *bios, int idx, int ent, u8 *ver, u8 *len,
60 struct dcb_gpio_func *gpio) 72 struct dcb_gpio_func *gpio)
61{ 73{
62 u8 ver, hdr, cnt, len; 74 u16 data = dcb_gpio_entry(bios, idx, ent, ver, len);
63 u16 entry; 75 if (data) {
64 int i = -1; 76 if (*ver < 0x40) {
65 77 u16 info = nv_ro16(bios, data);
66 while ((entry = dcb_gpio_entry(bios, idx, ++i, &ver))) {
67 if (ver < 0x40) {
68 u16 data = nv_ro16(bios, entry);
69 *gpio = (struct dcb_gpio_func) { 78 *gpio = (struct dcb_gpio_func) {
70 .line = (data & 0x001f) >> 0, 79 .line = (info & 0x001f) >> 0,
71 .func = (data & 0x07e0) >> 5, 80 .func = (info & 0x07e0) >> 5,
72 .log[0] = (data & 0x1800) >> 11, 81 .log[0] = (info & 0x1800) >> 11,
73 .log[1] = (data & 0x6000) >> 13, 82 .log[1] = (info & 0x6000) >> 13,
74 .param = !!(data & 0x8000), 83 .param = !!(info & 0x8000),
75 }; 84 };
76 } else 85 } else
77 if (ver < 0x41) { 86 if (*ver < 0x41) {
78 u32 data = nv_ro32(bios, entry); 87 u32 info = nv_ro32(bios, data);
79 *gpio = (struct dcb_gpio_func) { 88 *gpio = (struct dcb_gpio_func) {
80 .line = (data & 0x0000001f) >> 0, 89 .line = (info & 0x0000001f) >> 0,
81 .func = (data & 0x0000ff00) >> 8, 90 .func = (info & 0x0000ff00) >> 8,
82 .log[0] = (data & 0x18000000) >> 27, 91 .log[0] = (info & 0x18000000) >> 27,
83 .log[1] = (data & 0x60000000) >> 29, 92 .log[1] = (info & 0x60000000) >> 29,
84 .param = !!(data & 0x80000000), 93 .param = !!(info & 0x80000000),
85 }; 94 };
86 } else { 95 } else {
87 u32 data = nv_ro32(bios, entry + 0); 96 u32 info = nv_ro32(bios, data + 0);
88 u8 data1 = nv_ro32(bios, entry + 4); 97 u8 info1 = nv_ro32(bios, data + 4);
89 *gpio = (struct dcb_gpio_func) { 98 *gpio = (struct dcb_gpio_func) {
90 .line = (data & 0x0000003f) >> 0, 99 .line = (info & 0x0000003f) >> 0,
91 .func = (data & 0x0000ff00) >> 8, 100 .func = (info & 0x0000ff00) >> 8,
92 .log[0] = (data1 & 0x30) >> 4, 101 .log[0] = (info1 & 0x30) >> 4,
93 .log[1] = (data1 & 0xc0) >> 6, 102 .log[1] = (info1 & 0xc0) >> 6,
94 .param = !!(data & 0x80000000), 103 .param = !!(info & 0x80000000),
95 }; 104 };
96 } 105 }
106 }
107
108 return data;
109}
97 110
111u16
112dcb_gpio_match(struct nouveau_bios *bios, int idx, u8 func, u8 line,
113 u8 *ver, u8 *len, struct dcb_gpio_func *gpio)
114{
115 u8 hdr, cnt, i = 0;
116 u16 data;
117
118 while ((data = dcb_gpio_parse(bios, idx, i++, ver, len, gpio))) {
98 if ((line == 0xff || line == gpio->line) && 119 if ((line == 0xff || line == gpio->line) &&
99 (func == 0xff || func == gpio->func)) 120 (func == 0xff || func == gpio->func))
100 return 0; 121 return data;
101 } 122 }
102 123
103 /* DCB 2.2, fixed TVDAC GPIO data */ 124 /* DCB 2.2, fixed TVDAC GPIO data */
104 if ((entry = dcb_table(bios, &ver, &hdr, &cnt, &len))) { 125 if ((data = dcb_table(bios, ver, &hdr, &cnt, len))) {
105 if (ver >= 0x22 && ver < 0x30 && func == DCB_GPIO_TVDAC0) { 126 if (*ver >= 0x22 && *ver < 0x30 && func == DCB_GPIO_TVDAC0) {
106 u8 conf = nv_ro08(bios, entry - 5); 127 u8 conf = nv_ro08(bios, data - 5);
107 u8 addr = nv_ro08(bios, entry - 4); 128 u8 addr = nv_ro08(bios, data - 4);
108 if (conf & 0x01) { 129 if (conf & 0x01) {
109 *gpio = (struct dcb_gpio_func) { 130 *gpio = (struct dcb_gpio_func) {
110 .func = DCB_GPIO_TVDAC0, 131 .func = DCB_GPIO_TVDAC0,
@@ -112,10 +133,11 @@ dcb_gpio_parse(struct nouveau_bios *bios, int idx, u8 func, u8 line,
112 .log[0] = !!(conf & 0x02), 133 .log[0] = !!(conf & 0x02),
113 .log[1] = !(conf & 0x02), 134 .log[1] = !(conf & 0x02),
114 }; 135 };
115 return 0; 136 *ver = 0x00;
137 return data;
116 } 138 }
117 } 139 }
118 } 140 }
119 141
120 return -EINVAL; 142 return 0x0000;
121} 143}
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c
index ae168bbb86d8..2917d552689b 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c
@@ -2,11 +2,12 @@
2#include <core/device.h> 2#include <core/device.h>
3 3
4#include <subdev/bios.h> 4#include <subdev/bios.h>
5#include <subdev/bios/conn.h>
6#include <subdev/bios/bmp.h> 5#include <subdev/bios/bmp.h>
7#include <subdev/bios/bit.h> 6#include <subdev/bios/bit.h>
7#include <subdev/bios/conn.h>
8#include <subdev/bios/dcb.h> 8#include <subdev/bios/dcb.h>
9#include <subdev/bios/dp.h> 9#include <subdev/bios/dp.h>
10#include <subdev/bios/gpio.h>
10#include <subdev/bios/init.h> 11#include <subdev/bios/init.h>
11#include <subdev/devinit.h> 12#include <subdev/devinit.h>
12#include <subdev/clock.h> 13#include <subdev/clock.h>
@@ -410,9 +411,25 @@ init_ram_restrict_group_count(struct nvbios_init *init)
410} 411}
411 412
412static u8 413static u8
414init_ram_restrict_strap(struct nvbios_init *init)
415{
416 /* This appears to be the behaviour of the VBIOS parser, and *is*
417 * important to cache the NV_PEXTDEV_BOOT0 on later chipsets to
418 * avoid fucking up the memory controller (somehow) by reading it
419 * on every INIT_RAM_RESTRICT_ZM_GROUP opcode.
420 *
421 * Preserving the non-caching behaviour on earlier chipsets just
422 * in case *not* re-reading the strap causes similar breakage.
423 */
424 if (!init->ramcfg || init->bios->version.major < 0x70)
425 init->ramcfg = init_rd32(init, 0x101000);
426 return (init->ramcfg & 0x00000003c) >> 2;
427}
428
429static u8
413init_ram_restrict(struct nvbios_init *init) 430init_ram_restrict(struct nvbios_init *init)
414{ 431{
415 u32 strap = (init_rd32(init, 0x101000) & 0x0000003c) >> 2; 432 u8 strap = init_ram_restrict_strap(init);
416 u16 table = init_ram_restrict_table(init); 433 u16 table = init_ram_restrict_table(init);
417 if (table) 434 if (table)
418 return nv_ro08(init->bios, table + strap); 435 return nv_ro08(init->bios, table + strap);
@@ -1781,7 +1798,7 @@ init_gpio(struct nvbios_init *init)
1781 init->offset += 1; 1798 init->offset += 1;
1782 1799
1783 if (init_exec(init) && gpio && gpio->reset) 1800 if (init_exec(init) && gpio && gpio->reset)
1784 gpio->reset(gpio); 1801 gpio->reset(gpio, DCB_GPIO_UNUSED);
1785} 1802}
1786 1803
1787/** 1804/**
@@ -1995,6 +2012,47 @@ init_i2c_long_if(struct nvbios_init *init)
1995 init_exec_set(init, false); 2012 init_exec_set(init, false);
1996} 2013}
1997 2014
2015/**
2016 * INIT_GPIO_NE - opcode 0xa9
2017 *
2018 */
2019static void
2020init_gpio_ne(struct nvbios_init *init)
2021{
2022 struct nouveau_bios *bios = init->bios;
2023 struct nouveau_gpio *gpio = nouveau_gpio(bios);
2024 struct dcb_gpio_func func;
2025 u8 count = nv_ro08(bios, init->offset + 1);
2026 u8 idx = 0, ver, len;
2027 u16 data, i;
2028
2029 trace("GPIO_NE\t");
2030 init->offset += 2;
2031
2032 for (i = init->offset; i < init->offset + count; i++)
2033 cont("0x%02x ", nv_ro08(bios, i));
2034 cont("\n");
2035
2036 while ((data = dcb_gpio_parse(bios, 0, idx++, &ver, &len, &func))) {
2037 if (func.func != DCB_GPIO_UNUSED) {
2038 for (i = init->offset; i < init->offset + count; i++) {
2039 if (func.func == nv_ro08(bios, i))
2040 break;
2041 }
2042
2043 trace("\tFUNC[0x%02x]", func.func);
2044 if (i == (init->offset + count)) {
2045 cont(" *");
2046 if (init_exec(init) && gpio && gpio->reset)
2047 gpio->reset(gpio, func.func);
2048 }
2049 cont("\n");
2050 }
2051 }
2052
2053 init->offset += count;
2054}
2055
1998static struct nvbios_init_opcode { 2056static struct nvbios_init_opcode {
1999 void (*exec)(struct nvbios_init *); 2057 void (*exec)(struct nvbios_init *);
2000} init_opcode[] = { 2058} init_opcode[] = {
@@ -2059,6 +2117,7 @@ static struct nvbios_init_opcode {
2059 [0x98] = { init_auxch }, 2117 [0x98] = { init_auxch },
2060 [0x99] = { init_zm_auxch }, 2118 [0x99] = { init_zm_auxch },
2061 [0x9a] = { init_i2c_long_if }, 2119 [0x9a] = { init_i2c_long_if },
2120 [0xa9] = { init_gpio_ne },
2062}; 2121};
2063 2122
2064#define init_opcode_nr (sizeof(init_opcode) / sizeof(init_opcode[0])) 2123#define init_opcode_nr (sizeof(init_opcode) / sizeof(init_opcode[0]))
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nve0.c b/drivers/gpu/drm/nouveau/core/subdev/device/nve0.c
index 9b7881e76634..03a652876e73 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/device/nve0.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/device/nve0.c
@@ -109,6 +109,34 @@ nve0_identify(struct nouveau_device *device)
109 device->oclass[NVDEV_ENGINE_VP ] = &nve0_vp_oclass; 109 device->oclass[NVDEV_ENGINE_VP ] = &nve0_vp_oclass;
110 device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; 110 device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass;
111 break; 111 break;
112 case 0xe6:
113 device->cname = "GK106";
114 device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass;
115 device->oclass[NVDEV_SUBDEV_GPIO ] = &nvd0_gpio_oclass;
116 device->oclass[NVDEV_SUBDEV_I2C ] = &nouveau_i2c_oclass;
117 device->oclass[NVDEV_SUBDEV_CLOCK ] = &nvc0_clock_oclass;
118 device->oclass[NVDEV_SUBDEV_THERM ] = &nv50_therm_oclass;
119 device->oclass[NVDEV_SUBDEV_MXM ] = &nv50_mxm_oclass;
120 device->oclass[NVDEV_SUBDEV_DEVINIT] = &nv50_devinit_oclass;
121 device->oclass[NVDEV_SUBDEV_MC ] = &nvc0_mc_oclass;
122 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass;
123 device->oclass[NVDEV_SUBDEV_FB ] = &nvc0_fb_oclass;
124 device->oclass[NVDEV_SUBDEV_LTCG ] = &nvc0_ltcg_oclass;
125 device->oclass[NVDEV_SUBDEV_IBUS ] = &nve0_ibus_oclass;
126 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv50_instmem_oclass;
127 device->oclass[NVDEV_SUBDEV_VM ] = &nvc0_vmmgr_oclass;
128 device->oclass[NVDEV_SUBDEV_BAR ] = &nvc0_bar_oclass;
129 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nvd0_dmaeng_oclass;
130 device->oclass[NVDEV_ENGINE_FIFO ] = &nve0_fifo_oclass;
131 device->oclass[NVDEV_ENGINE_SW ] = &nvc0_software_oclass;
132 device->oclass[NVDEV_ENGINE_GR ] = &nve0_graph_oclass;
133 device->oclass[NVDEV_ENGINE_DISP ] = &nve0_disp_oclass;
134 device->oclass[NVDEV_ENGINE_COPY0 ] = &nve0_copy0_oclass;
135 device->oclass[NVDEV_ENGINE_COPY1 ] = &nve0_copy1_oclass;
136 device->oclass[NVDEV_ENGINE_BSP ] = &nve0_bsp_oclass;
137 device->oclass[NVDEV_ENGINE_VP ] = &nve0_vp_oclass;
138 device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass;
139 break;
112 default: 140 default:
113 nv_fatal(device, "unknown Kepler chipset\n"); 141 nv_fatal(device, "unknown Kepler chipset\n");
114 return -EINVAL; 142 return -EINVAL;
diff --git a/drivers/gpu/drm/nouveau/core/subdev/gpio/base.c b/drivers/gpu/drm/nouveau/core/subdev/gpio/base.c
index acf818c58bf0..9fb0f9b92d49 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/gpio/base.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/gpio/base.c
@@ -43,10 +43,15 @@ static int
43nouveau_gpio_find(struct nouveau_gpio *gpio, int idx, u8 tag, u8 line, 43nouveau_gpio_find(struct nouveau_gpio *gpio, int idx, u8 tag, u8 line,
44 struct dcb_gpio_func *func) 44 struct dcb_gpio_func *func)
45{ 45{
46 struct nouveau_bios *bios = nouveau_bios(gpio);
47 u8 ver, len;
48 u16 data;
49
46 if (line == 0xff && tag == 0xff) 50 if (line == 0xff && tag == 0xff)
47 return -EINVAL; 51 return -EINVAL;
48 52
49 if (!dcb_gpio_parse(nouveau_bios(gpio), idx, tag, line, func)) 53 data = dcb_gpio_match(bios, idx, tag, line, &ver, &len, func);
54 if (data)
50 return 0; 55 return 0;
51 56
52 /* Apple iMac G4 NV18 */ 57 /* Apple iMac G4 NV18 */
@@ -265,7 +270,7 @@ nouveau_gpio_init(struct nouveau_gpio *gpio)
265 int ret = nouveau_subdev_init(&gpio->base); 270 int ret = nouveau_subdev_init(&gpio->base);
266 if (ret == 0 && gpio->reset) { 271 if (ret == 0 && gpio->reset) {
267 if (dmi_check_system(gpio_reset_ids)) 272 if (dmi_check_system(gpio_reset_ids))
268 gpio->reset(gpio); 273 gpio->reset(gpio, DCB_GPIO_UNUSED);
269 } 274 }
270 return ret; 275 return ret;
271} 276}
diff --git a/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c
index f3502c961cd9..bf13a1200f26 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c
@@ -29,15 +29,15 @@ struct nv50_gpio_priv {
29}; 29};
30 30
31static void 31static void
32nv50_gpio_reset(struct nouveau_gpio *gpio) 32nv50_gpio_reset(struct nouveau_gpio *gpio, u8 match)
33{ 33{
34 struct nouveau_bios *bios = nouveau_bios(gpio); 34 struct nouveau_bios *bios = nouveau_bios(gpio);
35 struct nv50_gpio_priv *priv = (void *)gpio; 35 struct nv50_gpio_priv *priv = (void *)gpio;
36 u8 ver, len;
36 u16 entry; 37 u16 entry;
37 u8 ver;
38 int ent = -1; 38 int ent = -1;
39 39
40 while ((entry = dcb_gpio_entry(bios, 0, ++ent, &ver))) { 40 while ((entry = dcb_gpio_entry(bios, 0, ++ent, &ver, &len))) {
41 static const u32 regs[] = { 0xe100, 0xe28c }; 41 static const u32 regs[] = { 0xe100, 0xe28c };
42 u32 data = nv_ro32(bios, entry); 42 u32 data = nv_ro32(bios, entry);
43 u8 line = (data & 0x0000001f); 43 u8 line = (data & 0x0000001f);
@@ -48,7 +48,8 @@ nv50_gpio_reset(struct nouveau_gpio *gpio)
48 u32 val = (unk1 << 16) | unk0; 48 u32 val = (unk1 << 16) | unk0;
49 u32 reg = regs[line >> 4]; line &= 0x0f; 49 u32 reg = regs[line >> 4]; line &= 0x0f;
50 50
51 if (func == 0xff) 51 if ( func == DCB_GPIO_UNUSED ||
52 (match != DCB_GPIO_UNUSED && match != func))
52 continue; 53 continue;
53 54
54 gpio->set(gpio, 0, func, line, defs); 55 gpio->set(gpio, 0, func, line, defs);
diff --git a/drivers/gpu/drm/nouveau/core/subdev/gpio/nvd0.c b/drivers/gpu/drm/nouveau/core/subdev/gpio/nvd0.c
index 8d18fcad26e0..83e8b8f16e6a 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/gpio/nvd0.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/gpio/nvd0.c
@@ -29,15 +29,15 @@ struct nvd0_gpio_priv {
29}; 29};
30 30
31static void 31static void
32nvd0_gpio_reset(struct nouveau_gpio *gpio) 32nvd0_gpio_reset(struct nouveau_gpio *gpio, u8 match)
33{ 33{
34 struct nouveau_bios *bios = nouveau_bios(gpio); 34 struct nouveau_bios *bios = nouveau_bios(gpio);
35 struct nvd0_gpio_priv *priv = (void *)gpio; 35 struct nvd0_gpio_priv *priv = (void *)gpio;
36 u8 ver, len;
36 u16 entry; 37 u16 entry;
37 u8 ver;
38 int ent = -1; 38 int ent = -1;
39 39
40 while ((entry = dcb_gpio_entry(bios, 0, ++ent, &ver))) { 40 while ((entry = dcb_gpio_entry(bios, 0, ++ent, &ver, &len))) {
41 u32 data = nv_ro32(bios, entry); 41 u32 data = nv_ro32(bios, entry);
42 u8 line = (data & 0x0000003f); 42 u8 line = (data & 0x0000003f);
43 u8 defs = !!(data & 0x00000080); 43 u8 defs = !!(data & 0x00000080);
@@ -45,7 +45,8 @@ nvd0_gpio_reset(struct nouveau_gpio *gpio)
45 u8 unk0 = (data & 0x00ff0000) >> 16; 45 u8 unk0 = (data & 0x00ff0000) >> 16;
46 u8 unk1 = (data & 0x1f000000) >> 24; 46 u8 unk1 = (data & 0x1f000000) >> 24;
47 47
48 if (func == 0xff) 48 if ( func == DCB_GPIO_UNUSED ||
49 (match != DCB_GPIO_UNUSED && match != func))
49 continue; 50 continue;
50 51
51 gpio->set(gpio, 0, func, line, defs); 52 gpio->set(gpio, 0, func, line, defs);
diff --git a/drivers/gpu/drm/nouveau/core/subdev/mxm/base.c b/drivers/gpu/drm/nouveau/core/subdev/mxm/base.c
index 93e3ddf7303a..e286e132c7e7 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/mxm/base.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/mxm/base.c
@@ -260,7 +260,7 @@ nouveau_mxm_create_(struct nouveau_object *parent,
260 260
261 data = mxm_table(bios, &ver, &len); 261 data = mxm_table(bios, &ver, &len);
262 if (!data || !(ver = nv_ro08(bios, data))) { 262 if (!data || !(ver = nv_ro08(bios, data))) {
263 nv_info(mxm, "no VBIOS data, nothing to do\n"); 263 nv_debug(mxm, "no VBIOS data, nothing to do\n");
264 return 0; 264 return 0;
265 } 265 }
266 266
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 5614c89148cb..69d7b1d0b9d6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1276,7 +1276,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
1276 if (drm->agp.stat == ENABLED) { 1276 if (drm->agp.stat == ENABLED) {
1277 mem->bus.offset = mem->start << PAGE_SHIFT; 1277 mem->bus.offset = mem->start << PAGE_SHIFT;
1278 mem->bus.base = drm->agp.base; 1278 mem->bus.base = drm->agp.base;
1279 mem->bus.is_iomem = true; 1279 mem->bus.is_iomem = !dev->agp->cant_use_aperture;
1280 } 1280 }
1281#endif 1281#endif
1282 break; 1282 break;
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 01c403ddb99b..180a45e3b525 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -189,8 +189,8 @@ nouveau_accel_init(struct nouveau_drm *drm)
189 nouveau_bo_move_init(drm); 189 nouveau_bo_move_init(drm);
190} 190}
191 191
192static int __devinit 192static int nouveau_drm_probe(struct pci_dev *pdev,
193nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) 193 const struct pci_device_id *pent)
194{ 194{
195 struct nouveau_device *device; 195 struct nouveau_device *device;
196 struct apertures_struct *aper; 196 struct apertures_struct *aper;
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index 5566172774df..a701ff5ffa5b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -698,10 +698,10 @@ static int
698nouveau_hwmon_init(struct drm_device *dev) 698nouveau_hwmon_init(struct drm_device *dev)
699{ 699{
700 struct nouveau_pm *pm = nouveau_pm(dev); 700 struct nouveau_pm *pm = nouveau_pm(dev);
701 struct nouveau_drm *drm = nouveau_drm(dev);
702 struct nouveau_therm *therm = nouveau_therm(drm->device);
703 701
704#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) 702#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
703 struct nouveau_drm *drm = nouveau_drm(dev);
704 struct nouveau_therm *therm = nouveau_therm(drm->device);
705 struct device *hwmon_dev; 705 struct device *hwmon_dev;
706 int ret = 0; 706 int ret = 0;
707 707
diff --git a/drivers/gpu/drm/nouveau/nouveau_prime.c b/drivers/gpu/drm/nouveau/nouveau_prime.c
index 3543fec2355e..b8e05ae38212 100644
--- a/drivers/gpu/drm/nouveau/nouveau_prime.c
+++ b/drivers/gpu/drm/nouveau/nouveau_prime.c
@@ -193,6 +193,7 @@ struct drm_gem_object *nouveau_gem_prime_import(struct drm_device *dev,
193 if (nvbo->gem) { 193 if (nvbo->gem) {
194 if (nvbo->gem->dev == dev) { 194 if (nvbo->gem->dev == dev) {
195 drm_gem_object_reference(nvbo->gem); 195 drm_gem_object_reference(nvbo->gem);
196 dma_buf_put(dma_buf);
196 return nvbo->gem; 197 return nvbo->gem;
197 } 198 }
198 } 199 }
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index f95d7fc1f5e0..061fa0a28900 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2306,22 +2306,20 @@ bool evergreen_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *rin
2306 return radeon_ring_test_lockup(rdev, ring); 2306 return radeon_ring_test_lockup(rdev, ring);
2307} 2307}
2308 2308
2309static int evergreen_gpu_soft_reset(struct radeon_device *rdev) 2309static void evergreen_gpu_soft_reset_gfx(struct radeon_device *rdev)
2310{ 2310{
2311 struct evergreen_mc_save save;
2312 u32 grbm_reset = 0; 2311 u32 grbm_reset = 0;
2313 2312
2314 if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) 2313 if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE))
2315 return 0; 2314 return;
2316 2315
2317 dev_info(rdev->dev, "GPU softreset \n"); 2316 dev_info(rdev->dev, " GRBM_STATUS = 0x%08X\n",
2318 dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n",
2319 RREG32(GRBM_STATUS)); 2317 RREG32(GRBM_STATUS));
2320 dev_info(rdev->dev, " GRBM_STATUS_SE0=0x%08X\n", 2318 dev_info(rdev->dev, " GRBM_STATUS_SE0 = 0x%08X\n",
2321 RREG32(GRBM_STATUS_SE0)); 2319 RREG32(GRBM_STATUS_SE0));
2322 dev_info(rdev->dev, " GRBM_STATUS_SE1=0x%08X\n", 2320 dev_info(rdev->dev, " GRBM_STATUS_SE1 = 0x%08X\n",
2323 RREG32(GRBM_STATUS_SE1)); 2321 RREG32(GRBM_STATUS_SE1));
2324 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", 2322 dev_info(rdev->dev, " SRBM_STATUS = 0x%08X\n",
2325 RREG32(SRBM_STATUS)); 2323 RREG32(SRBM_STATUS));
2326 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", 2324 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n",
2327 RREG32(CP_STALLED_STAT1)); 2325 RREG32(CP_STALLED_STAT1));
@@ -2331,10 +2329,7 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
2331 RREG32(CP_BUSY_STAT)); 2329 RREG32(CP_BUSY_STAT));
2332 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 2330 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
2333 RREG32(CP_STAT)); 2331 RREG32(CP_STAT));
2334 evergreen_mc_stop(rdev, &save); 2332
2335 if (evergreen_mc_wait_for_idle(rdev)) {
2336 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
2337 }
2338 /* Disable CP parsing/prefetching */ 2333 /* Disable CP parsing/prefetching */
2339 WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT); 2334 WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT);
2340 2335
@@ -2358,15 +2353,14 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
2358 udelay(50); 2353 udelay(50);
2359 WREG32(GRBM_SOFT_RESET, 0); 2354 WREG32(GRBM_SOFT_RESET, 0);
2360 (void)RREG32(GRBM_SOFT_RESET); 2355 (void)RREG32(GRBM_SOFT_RESET);
2361 /* Wait a little for things to settle down */ 2356
2362 udelay(50); 2357 dev_info(rdev->dev, " GRBM_STATUS = 0x%08X\n",
2363 dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n",
2364 RREG32(GRBM_STATUS)); 2358 RREG32(GRBM_STATUS));
2365 dev_info(rdev->dev, " GRBM_STATUS_SE0=0x%08X\n", 2359 dev_info(rdev->dev, " GRBM_STATUS_SE0 = 0x%08X\n",
2366 RREG32(GRBM_STATUS_SE0)); 2360 RREG32(GRBM_STATUS_SE0));
2367 dev_info(rdev->dev, " GRBM_STATUS_SE1=0x%08X\n", 2361 dev_info(rdev->dev, " GRBM_STATUS_SE1 = 0x%08X\n",
2368 RREG32(GRBM_STATUS_SE1)); 2362 RREG32(GRBM_STATUS_SE1));
2369 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", 2363 dev_info(rdev->dev, " SRBM_STATUS = 0x%08X\n",
2370 RREG32(SRBM_STATUS)); 2364 RREG32(SRBM_STATUS));
2371 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", 2365 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n",
2372 RREG32(CP_STALLED_STAT1)); 2366 RREG32(CP_STALLED_STAT1));
@@ -2376,13 +2370,65 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
2376 RREG32(CP_BUSY_STAT)); 2370 RREG32(CP_BUSY_STAT));
2377 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 2371 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
2378 RREG32(CP_STAT)); 2372 RREG32(CP_STAT));
2373}
2374
2375static void evergreen_gpu_soft_reset_dma(struct radeon_device *rdev)
2376{
2377 u32 tmp;
2378
2379 if (RREG32(DMA_STATUS_REG) & DMA_IDLE)
2380 return;
2381
2382 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
2383 RREG32(DMA_STATUS_REG));
2384
2385 /* Disable DMA */
2386 tmp = RREG32(DMA_RB_CNTL);
2387 tmp &= ~DMA_RB_ENABLE;
2388 WREG32(DMA_RB_CNTL, tmp);
2389
2390 /* Reset dma */
2391 WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA);
2392 RREG32(SRBM_SOFT_RESET);
2393 udelay(50);
2394 WREG32(SRBM_SOFT_RESET, 0);
2395
2396 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
2397 RREG32(DMA_STATUS_REG));
2398}
2399
2400static int evergreen_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask)
2401{
2402 struct evergreen_mc_save save;
2403
2404 if (reset_mask == 0)
2405 return 0;
2406
2407 dev_info(rdev->dev, "GPU softreset: 0x%08X\n", reset_mask);
2408
2409 evergreen_mc_stop(rdev, &save);
2410 if (evergreen_mc_wait_for_idle(rdev)) {
2411 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
2412 }
2413
2414 if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE))
2415 evergreen_gpu_soft_reset_gfx(rdev);
2416
2417 if (reset_mask & RADEON_RESET_DMA)
2418 evergreen_gpu_soft_reset_dma(rdev);
2419
2420 /* Wait a little for things to settle down */
2421 udelay(50);
2422
2379 evergreen_mc_resume(rdev, &save); 2423 evergreen_mc_resume(rdev, &save);
2380 return 0; 2424 return 0;
2381} 2425}
2382 2426
2383int evergreen_asic_reset(struct radeon_device *rdev) 2427int evergreen_asic_reset(struct radeon_device *rdev)
2384{ 2428{
2385 return evergreen_gpu_soft_reset(rdev); 2429 return evergreen_gpu_soft_reset(rdev, (RADEON_RESET_GFX |
2430 RADEON_RESET_COMPUTE |
2431 RADEON_RESET_DMA));
2386} 2432}
2387 2433
2388/* Interrupts */ 2434/* Interrupts */
@@ -3215,7 +3261,7 @@ void evergreen_dma_fence_ring_emit(struct radeon_device *rdev,
3215 radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_TRAP, 0, 0, 0)); 3261 radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_TRAP, 0, 0, 0));
3216 /* flush HDP */ 3262 /* flush HDP */
3217 radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_SRBM_WRITE, 0, 0, 0)); 3263 radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_SRBM_WRITE, 0, 0, 0));
3218 radeon_ring_write(ring, (0xf << 16) | HDP_MEM_COHERENCY_FLUSH_CNTL); 3264 radeon_ring_write(ring, (0xf << 16) | (HDP_MEM_COHERENCY_FLUSH_CNTL >> 2));
3219 radeon_ring_write(ring, 1); 3265 radeon_ring_write(ring, 1);
3220} 3266}
3221 3267
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c
index 74c6b42d2597..7a445666e71f 100644
--- a/drivers/gpu/drm/radeon/evergreen_cs.c
+++ b/drivers/gpu/drm/radeon/evergreen_cs.c
@@ -2654,6 +2654,35 @@ static int evergreen_packet3_check(struct radeon_cs_parser *p,
2654 ib[idx+4] = upper_32_bits(offset) & 0xff; 2654 ib[idx+4] = upper_32_bits(offset) & 0xff;
2655 } 2655 }
2656 break; 2656 break;
2657 case PACKET3_MEM_WRITE:
2658 {
2659 u64 offset;
2660
2661 if (pkt->count != 3) {
2662 DRM_ERROR("bad MEM_WRITE (invalid count)\n");
2663 return -EINVAL;
2664 }
2665 r = evergreen_cs_packet_next_reloc(p, &reloc);
2666 if (r) {
2667 DRM_ERROR("bad MEM_WRITE (missing reloc)\n");
2668 return -EINVAL;
2669 }
2670 offset = radeon_get_ib_value(p, idx+0);
2671 offset += ((u64)(radeon_get_ib_value(p, idx+1) & 0xff)) << 32UL;
2672 if (offset & 0x7) {
2673 DRM_ERROR("bad MEM_WRITE (address not qwords aligned)\n");
2674 return -EINVAL;
2675 }
2676 if ((offset + 8) > radeon_bo_size(reloc->robj)) {
2677 DRM_ERROR("bad MEM_WRITE bo too small: 0x%llx, 0x%lx\n",
2678 offset + 8, radeon_bo_size(reloc->robj));
2679 return -EINVAL;
2680 }
2681 offset += reloc->lobj.gpu_offset;
2682 ib[idx+0] = offset;
2683 ib[idx+1] = upper_32_bits(offset) & 0xff;
2684 break;
2685 }
2657 case PACKET3_COPY_DW: 2686 case PACKET3_COPY_DW:
2658 if (pkt->count != 4) { 2687 if (pkt->count != 4) {
2659 DRM_ERROR("bad COPY_DW (invalid count)\n"); 2688 DRM_ERROR("bad COPY_DW (invalid count)\n");
@@ -3287,6 +3316,7 @@ static bool evergreen_vm_reg_valid(u32 reg)
3287 3316
3288 /* check config regs */ 3317 /* check config regs */
3289 switch (reg) { 3318 switch (reg) {
3319 case WAIT_UNTIL:
3290 case GRBM_GFX_INDEX: 3320 case GRBM_GFX_INDEX:
3291 case CP_STRMOUT_CNTL: 3321 case CP_STRMOUT_CNTL:
3292 case CP_COHER_CNTL: 3322 case CP_COHER_CNTL:
diff --git a/drivers/gpu/drm/radeon/evergreend.h b/drivers/gpu/drm/radeon/evergreend.h
index cb9baaac9e85..0bfd0e9e469b 100644
--- a/drivers/gpu/drm/radeon/evergreend.h
+++ b/drivers/gpu/drm/radeon/evergreend.h
@@ -742,8 +742,9 @@
742#define SOFT_RESET_ROM (1 << 14) 742#define SOFT_RESET_ROM (1 << 14)
743#define SOFT_RESET_SEM (1 << 15) 743#define SOFT_RESET_SEM (1 << 15)
744#define SOFT_RESET_VMC (1 << 17) 744#define SOFT_RESET_VMC (1 << 17)
745#define SOFT_RESET_DMA (1 << 20)
745#define SOFT_RESET_TST (1 << 21) 746#define SOFT_RESET_TST (1 << 21)
746#define SOFT_RESET_REGBB (1 << 22) 747#define SOFT_RESET_REGBB (1 << 22)
747#define SOFT_RESET_ORB (1 << 23) 748#define SOFT_RESET_ORB (1 << 23)
748 749
749/* display watermarks */ 750/* display watermarks */
@@ -2027,4 +2028,15 @@
2027/* cayman packet3 addition */ 2028/* cayman packet3 addition */
2028#define CAYMAN_PACKET3_DEALLOC_STATE 0x14 2029#define CAYMAN_PACKET3_DEALLOC_STATE 0x14
2029 2030
2031/* DMA regs common on r6xx/r7xx/evergreen/ni */
2032#define DMA_RB_CNTL 0xd000
2033# define DMA_RB_ENABLE (1 << 0)
2034# define DMA_RB_SIZE(x) ((x) << 1) /* log2 */
2035# define DMA_RB_SWAP_ENABLE (1 << 9) /* 8IN32 */
2036# define DMA_RPTR_WRITEBACK_ENABLE (1 << 12)
2037# define DMA_RPTR_WRITEBACK_SWAP_ENABLE (1 << 13) /* 8IN32 */
2038# define DMA_RPTR_WRITEBACK_TIMER(x) ((x) << 16) /* log2 */
2039#define DMA_STATUS_REG 0xd034
2040# define DMA_IDLE (1 << 0)
2041
2030#endif 2042#endif
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 7bdbcb00aaf2..896f1cbc58a5 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -1306,22 +1306,20 @@ void cayman_dma_fini(struct radeon_device *rdev)
1306 radeon_ring_fini(rdev, &rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX]); 1306 radeon_ring_fini(rdev, &rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX]);
1307} 1307}
1308 1308
1309static int cayman_gpu_soft_reset(struct radeon_device *rdev) 1309static void cayman_gpu_soft_reset_gfx(struct radeon_device *rdev)
1310{ 1310{
1311 struct evergreen_mc_save save;
1312 u32 grbm_reset = 0; 1311 u32 grbm_reset = 0;
1313 1312
1314 if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) 1313 if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE))
1315 return 0; 1314 return;
1316 1315
1317 dev_info(rdev->dev, "GPU softreset \n"); 1316 dev_info(rdev->dev, " GRBM_STATUS = 0x%08X\n",
1318 dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n",
1319 RREG32(GRBM_STATUS)); 1317 RREG32(GRBM_STATUS));
1320 dev_info(rdev->dev, " GRBM_STATUS_SE0=0x%08X\n", 1318 dev_info(rdev->dev, " GRBM_STATUS_SE0 = 0x%08X\n",
1321 RREG32(GRBM_STATUS_SE0)); 1319 RREG32(GRBM_STATUS_SE0));
1322 dev_info(rdev->dev, " GRBM_STATUS_SE1=0x%08X\n", 1320 dev_info(rdev->dev, " GRBM_STATUS_SE1 = 0x%08X\n",
1323 RREG32(GRBM_STATUS_SE1)); 1321 RREG32(GRBM_STATUS_SE1));
1324 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", 1322 dev_info(rdev->dev, " SRBM_STATUS = 0x%08X\n",
1325 RREG32(SRBM_STATUS)); 1323 RREG32(SRBM_STATUS));
1326 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", 1324 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n",
1327 RREG32(CP_STALLED_STAT1)); 1325 RREG32(CP_STALLED_STAT1));
@@ -1331,19 +1329,7 @@ static int cayman_gpu_soft_reset(struct radeon_device *rdev)
1331 RREG32(CP_BUSY_STAT)); 1329 RREG32(CP_BUSY_STAT));
1332 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 1330 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
1333 RREG32(CP_STAT)); 1331 RREG32(CP_STAT));
1334 dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_ADDR 0x%08X\n",
1335 RREG32(0x14F8));
1336 dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_STATUS 0x%08X\n",
1337 RREG32(0x14D8));
1338 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n",
1339 RREG32(0x14FC));
1340 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
1341 RREG32(0x14DC));
1342 1332
1343 evergreen_mc_stop(rdev, &save);
1344 if (evergreen_mc_wait_for_idle(rdev)) {
1345 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
1346 }
1347 /* Disable CP parsing/prefetching */ 1333 /* Disable CP parsing/prefetching */
1348 WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT); 1334 WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT);
1349 1335
@@ -1368,16 +1354,14 @@ static int cayman_gpu_soft_reset(struct radeon_device *rdev)
1368 udelay(50); 1354 udelay(50);
1369 WREG32(GRBM_SOFT_RESET, 0); 1355 WREG32(GRBM_SOFT_RESET, 0);
1370 (void)RREG32(GRBM_SOFT_RESET); 1356 (void)RREG32(GRBM_SOFT_RESET);
1371 /* Wait a little for things to settle down */
1372 udelay(50);
1373 1357
1374 dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", 1358 dev_info(rdev->dev, " GRBM_STATUS = 0x%08X\n",
1375 RREG32(GRBM_STATUS)); 1359 RREG32(GRBM_STATUS));
1376 dev_info(rdev->dev, " GRBM_STATUS_SE0=0x%08X\n", 1360 dev_info(rdev->dev, " GRBM_STATUS_SE0 = 0x%08X\n",
1377 RREG32(GRBM_STATUS_SE0)); 1361 RREG32(GRBM_STATUS_SE0));
1378 dev_info(rdev->dev, " GRBM_STATUS_SE1=0x%08X\n", 1362 dev_info(rdev->dev, " GRBM_STATUS_SE1 = 0x%08X\n",
1379 RREG32(GRBM_STATUS_SE1)); 1363 RREG32(GRBM_STATUS_SE1));
1380 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", 1364 dev_info(rdev->dev, " SRBM_STATUS = 0x%08X\n",
1381 RREG32(SRBM_STATUS)); 1365 RREG32(SRBM_STATUS));
1382 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", 1366 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n",
1383 RREG32(CP_STALLED_STAT1)); 1367 RREG32(CP_STALLED_STAT1));
@@ -1387,13 +1371,81 @@ static int cayman_gpu_soft_reset(struct radeon_device *rdev)
1387 RREG32(CP_BUSY_STAT)); 1371 RREG32(CP_BUSY_STAT));
1388 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 1372 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
1389 RREG32(CP_STAT)); 1373 RREG32(CP_STAT));
1374
1375}
1376
1377static void cayman_gpu_soft_reset_dma(struct radeon_device *rdev)
1378{
1379 u32 tmp;
1380
1381 if (RREG32(DMA_STATUS_REG) & DMA_IDLE)
1382 return;
1383
1384 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
1385 RREG32(DMA_STATUS_REG));
1386
1387 /* dma0 */
1388 tmp = RREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET);
1389 tmp &= ~DMA_RB_ENABLE;
1390 WREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET, tmp);
1391
1392 /* dma1 */
1393 tmp = RREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET);
1394 tmp &= ~DMA_RB_ENABLE;
1395 WREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET, tmp);
1396
1397 /* Reset dma */
1398 WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1);
1399 RREG32(SRBM_SOFT_RESET);
1400 udelay(50);
1401 WREG32(SRBM_SOFT_RESET, 0);
1402
1403 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
1404 RREG32(DMA_STATUS_REG));
1405
1406}
1407
1408static int cayman_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask)
1409{
1410 struct evergreen_mc_save save;
1411
1412 if (reset_mask == 0)
1413 return 0;
1414
1415 dev_info(rdev->dev, "GPU softreset: 0x%08X\n", reset_mask);
1416
1417 dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_ADDR 0x%08X\n",
1418 RREG32(0x14F8));
1419 dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_STATUS 0x%08X\n",
1420 RREG32(0x14D8));
1421 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n",
1422 RREG32(0x14FC));
1423 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
1424 RREG32(0x14DC));
1425
1426 evergreen_mc_stop(rdev, &save);
1427 if (evergreen_mc_wait_for_idle(rdev)) {
1428 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
1429 }
1430
1431 if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE))
1432 cayman_gpu_soft_reset_gfx(rdev);
1433
1434 if (reset_mask & RADEON_RESET_DMA)
1435 cayman_gpu_soft_reset_dma(rdev);
1436
1437 /* Wait a little for things to settle down */
1438 udelay(50);
1439
1390 evergreen_mc_resume(rdev, &save); 1440 evergreen_mc_resume(rdev, &save);
1391 return 0; 1441 return 0;
1392} 1442}
1393 1443
1394int cayman_asic_reset(struct radeon_device *rdev) 1444int cayman_asic_reset(struct radeon_device *rdev)
1395{ 1445{
1396 return cayman_gpu_soft_reset(rdev); 1446 return cayman_gpu_soft_reset(rdev, (RADEON_RESET_GFX |
1447 RADEON_RESET_COMPUTE |
1448 RADEON_RESET_DMA));
1397} 1449}
1398 1450
1399/** 1451/**
diff --git a/drivers/gpu/drm/radeon/nid.h b/drivers/gpu/drm/radeon/nid.h
index b93186b8ee4b..48e5022ee921 100644
--- a/drivers/gpu/drm/radeon/nid.h
+++ b/drivers/gpu/drm/radeon/nid.h
@@ -65,7 +65,7 @@
65#define SOFT_RESET_VMC (1 << 17) 65#define SOFT_RESET_VMC (1 << 17)
66#define SOFT_RESET_DMA (1 << 20) 66#define SOFT_RESET_DMA (1 << 20)
67#define SOFT_RESET_TST (1 << 21) 67#define SOFT_RESET_TST (1 << 21)
68#define SOFT_RESET_REGBB (1 << 22) 68#define SOFT_RESET_REGBB (1 << 22)
69#define SOFT_RESET_ORB (1 << 23) 69#define SOFT_RESET_ORB (1 << 23)
70 70
71#define VM_CONTEXT0_REQUEST_RESPONSE 0x1470 71#define VM_CONTEXT0_REQUEST_RESPONSE 0x1470
@@ -675,4 +675,3 @@
675#define DMA_PACKET_NOP 0xf 675#define DMA_PACKET_NOP 0xf
676 676
677#endif 677#endif
678
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 2aaf147969bd..537e259b3837 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1258,9 +1258,8 @@ void r600_vram_scratch_fini(struct radeon_device *rdev)
1258 * reset, it's up to the caller to determine if the GPU needs one. We 1258 * reset, it's up to the caller to determine if the GPU needs one. We
1259 * might add an helper function to check that. 1259 * might add an helper function to check that.
1260 */ 1260 */
1261static int r600_gpu_soft_reset(struct radeon_device *rdev) 1261static void r600_gpu_soft_reset_gfx(struct radeon_device *rdev)
1262{ 1262{
1263 struct rv515_mc_save save;
1264 u32 grbm_busy_mask = S_008010_VC_BUSY(1) | S_008010_VGT_BUSY_NO_DMA(1) | 1263 u32 grbm_busy_mask = S_008010_VC_BUSY(1) | S_008010_VGT_BUSY_NO_DMA(1) |
1265 S_008010_VGT_BUSY(1) | S_008010_TA03_BUSY(1) | 1264 S_008010_VGT_BUSY(1) | S_008010_TA03_BUSY(1) |
1266 S_008010_TC_BUSY(1) | S_008010_SX_BUSY(1) | 1265 S_008010_TC_BUSY(1) | S_008010_SX_BUSY(1) |
@@ -1280,14 +1279,13 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev)
1280 u32 tmp; 1279 u32 tmp;
1281 1280
1282 if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) 1281 if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE))
1283 return 0; 1282 return;
1284 1283
1285 dev_info(rdev->dev, "GPU softreset \n"); 1284 dev_info(rdev->dev, " R_008010_GRBM_STATUS = 0x%08X\n",
1286 dev_info(rdev->dev, " R_008010_GRBM_STATUS=0x%08X\n",
1287 RREG32(R_008010_GRBM_STATUS)); 1285 RREG32(R_008010_GRBM_STATUS));
1288 dev_info(rdev->dev, " R_008014_GRBM_STATUS2=0x%08X\n", 1286 dev_info(rdev->dev, " R_008014_GRBM_STATUS2 = 0x%08X\n",
1289 RREG32(R_008014_GRBM_STATUS2)); 1287 RREG32(R_008014_GRBM_STATUS2));
1290 dev_info(rdev->dev, " R_000E50_SRBM_STATUS=0x%08X\n", 1288 dev_info(rdev->dev, " R_000E50_SRBM_STATUS = 0x%08X\n",
1291 RREG32(R_000E50_SRBM_STATUS)); 1289 RREG32(R_000E50_SRBM_STATUS));
1292 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", 1290 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n",
1293 RREG32(CP_STALLED_STAT1)); 1291 RREG32(CP_STALLED_STAT1));
@@ -1297,12 +1295,10 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev)
1297 RREG32(CP_BUSY_STAT)); 1295 RREG32(CP_BUSY_STAT));
1298 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 1296 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
1299 RREG32(CP_STAT)); 1297 RREG32(CP_STAT));
1300 rv515_mc_stop(rdev, &save); 1298
1301 if (r600_mc_wait_for_idle(rdev)) {
1302 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
1303 }
1304 /* Disable CP parsing/prefetching */ 1299 /* Disable CP parsing/prefetching */
1305 WREG32(R_0086D8_CP_ME_CNTL, S_0086D8_CP_ME_HALT(1)); 1300 WREG32(R_0086D8_CP_ME_CNTL, S_0086D8_CP_ME_HALT(1));
1301
1306 /* Check if any of the rendering block is busy and reset it */ 1302 /* Check if any of the rendering block is busy and reset it */
1307 if ((RREG32(R_008010_GRBM_STATUS) & grbm_busy_mask) || 1303 if ((RREG32(R_008010_GRBM_STATUS) & grbm_busy_mask) ||
1308 (RREG32(R_008014_GRBM_STATUS2) & grbm2_busy_mask)) { 1304 (RREG32(R_008014_GRBM_STATUS2) & grbm2_busy_mask)) {
@@ -1332,13 +1328,12 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev)
1332 RREG32(R_008020_GRBM_SOFT_RESET); 1328 RREG32(R_008020_GRBM_SOFT_RESET);
1333 mdelay(15); 1329 mdelay(15);
1334 WREG32(R_008020_GRBM_SOFT_RESET, 0); 1330 WREG32(R_008020_GRBM_SOFT_RESET, 0);
1335 /* Wait a little for things to settle down */ 1331
1336 mdelay(1); 1332 dev_info(rdev->dev, " R_008010_GRBM_STATUS = 0x%08X\n",
1337 dev_info(rdev->dev, " R_008010_GRBM_STATUS=0x%08X\n",
1338 RREG32(R_008010_GRBM_STATUS)); 1333 RREG32(R_008010_GRBM_STATUS));
1339 dev_info(rdev->dev, " R_008014_GRBM_STATUS2=0x%08X\n", 1334 dev_info(rdev->dev, " R_008014_GRBM_STATUS2 = 0x%08X\n",
1340 RREG32(R_008014_GRBM_STATUS2)); 1335 RREG32(R_008014_GRBM_STATUS2));
1341 dev_info(rdev->dev, " R_000E50_SRBM_STATUS=0x%08X\n", 1336 dev_info(rdev->dev, " R_000E50_SRBM_STATUS = 0x%08X\n",
1342 RREG32(R_000E50_SRBM_STATUS)); 1337 RREG32(R_000E50_SRBM_STATUS));
1343 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", 1338 dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n",
1344 RREG32(CP_STALLED_STAT1)); 1339 RREG32(CP_STALLED_STAT1));
@@ -1348,6 +1343,60 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev)
1348 RREG32(CP_BUSY_STAT)); 1343 RREG32(CP_BUSY_STAT));
1349 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", 1344 dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n",
1350 RREG32(CP_STAT)); 1345 RREG32(CP_STAT));
1346
1347}
1348
1349static void r600_gpu_soft_reset_dma(struct radeon_device *rdev)
1350{
1351 u32 tmp;
1352
1353 if (RREG32(DMA_STATUS_REG) & DMA_IDLE)
1354 return;
1355
1356 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
1357 RREG32(DMA_STATUS_REG));
1358
1359 /* Disable DMA */
1360 tmp = RREG32(DMA_RB_CNTL);
1361 tmp &= ~DMA_RB_ENABLE;
1362 WREG32(DMA_RB_CNTL, tmp);
1363
1364 /* Reset dma */
1365 if (rdev->family >= CHIP_RV770)
1366 WREG32(SRBM_SOFT_RESET, RV770_SOFT_RESET_DMA);
1367 else
1368 WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA);
1369 RREG32(SRBM_SOFT_RESET);
1370 udelay(50);
1371 WREG32(SRBM_SOFT_RESET, 0);
1372
1373 dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n",
1374 RREG32(DMA_STATUS_REG));
1375}
1376
1377static int r600_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask)
1378{
1379 struct rv515_mc_save save;
1380
1381 if (reset_mask == 0)
1382 return 0;
1383
1384 dev_info(rdev->dev, "GPU softreset: 0x%08X\n", reset_mask);
1385
1386 rv515_mc_stop(rdev, &save);
1387 if (r600_mc_wait_for_idle(rdev)) {
1388 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
1389 }
1390
1391 if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE))
1392 r600_gpu_soft_reset_gfx(rdev);
1393
1394 if (reset_mask & RADEON_RESET_DMA)
1395 r600_gpu_soft_reset_dma(rdev);
1396
1397 /* Wait a little for things to settle down */
1398 mdelay(1);
1399
1351 rv515_mc_resume(rdev, &save); 1400 rv515_mc_resume(rdev, &save);
1352 return 0; 1401 return 0;
1353} 1402}
@@ -1395,7 +1444,9 @@ bool r600_dma_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
1395 1444
1396int r600_asic_reset(struct radeon_device *rdev) 1445int r600_asic_reset(struct radeon_device *rdev)
1397{ 1446{
1398 return r600_gpu_soft_reset(rdev); 1447 return r600_gpu_soft_reset(rdev, (RADEON_RESET_GFX |
1448 RADEON_RESET_COMPUTE |
1449 RADEON_RESET_DMA));
1399} 1450}
1400 1451
1401u32 r6xx_remap_render_backend(struct radeon_device *rdev, 1452u32 r6xx_remap_render_backend(struct radeon_device *rdev,
@@ -2595,7 +2646,7 @@ int r600_copy_blit(struct radeon_device *rdev,
2595 * @num_gpu_pages: number of GPU pages to xfer 2646 * @num_gpu_pages: number of GPU pages to xfer
2596 * @fence: radeon fence object 2647 * @fence: radeon fence object
2597 * 2648 *
2598 * Copy GPU paging using the DMA engine (r6xx-r7xx). 2649 * Copy GPU paging using the DMA engine (r6xx).
2599 * Used by the radeon ttm implementation to move pages if 2650 * Used by the radeon ttm implementation to move pages if
2600 * registered as the asic copy callback. 2651 * registered as the asic copy callback.
2601 */ 2652 */
@@ -2618,8 +2669,8 @@ int r600_copy_dma(struct radeon_device *rdev,
2618 } 2669 }
2619 2670
2620 size_in_dw = (num_gpu_pages << RADEON_GPU_PAGE_SHIFT) / 4; 2671 size_in_dw = (num_gpu_pages << RADEON_GPU_PAGE_SHIFT) / 4;
2621 num_loops = DIV_ROUND_UP(size_in_dw, 0xffff); 2672 num_loops = DIV_ROUND_UP(size_in_dw, 0xFFFE);
2622 r = radeon_ring_lock(rdev, ring, num_loops * 5 + 8); 2673 r = radeon_ring_lock(rdev, ring, num_loops * 4 + 8);
2623 if (r) { 2674 if (r) {
2624 DRM_ERROR("radeon: moving bo (%d).\n", r); 2675 DRM_ERROR("radeon: moving bo (%d).\n", r);
2625 radeon_semaphore_free(rdev, &sem, NULL); 2676 radeon_semaphore_free(rdev, &sem, NULL);
@@ -2636,14 +2687,14 @@ int r600_copy_dma(struct radeon_device *rdev,
2636 2687
2637 for (i = 0; i < num_loops; i++) { 2688 for (i = 0; i < num_loops; i++) {
2638 cur_size_in_dw = size_in_dw; 2689 cur_size_in_dw = size_in_dw;
2639 if (cur_size_in_dw > 0xFFFF) 2690 if (cur_size_in_dw > 0xFFFE)
2640 cur_size_in_dw = 0xFFFF; 2691 cur_size_in_dw = 0xFFFE;
2641 size_in_dw -= cur_size_in_dw; 2692 size_in_dw -= cur_size_in_dw;
2642 radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw)); 2693 radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw));
2643 radeon_ring_write(ring, dst_offset & 0xfffffffc); 2694 radeon_ring_write(ring, dst_offset & 0xfffffffc);
2644 radeon_ring_write(ring, src_offset & 0xfffffffc); 2695 radeon_ring_write(ring, src_offset & 0xfffffffc);
2645 radeon_ring_write(ring, upper_32_bits(dst_offset) & 0xff); 2696 radeon_ring_write(ring, (((upper_32_bits(dst_offset) & 0xff) << 16) |
2646 radeon_ring_write(ring, upper_32_bits(src_offset) & 0xff); 2697 (upper_32_bits(src_offset) & 0xff)));
2647 src_offset += cur_size_in_dw * 4; 2698 src_offset += cur_size_in_dw * 4;
2648 dst_offset += cur_size_in_dw * 4; 2699 dst_offset += cur_size_in_dw * 4;
2649 } 2700 }
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index 0be768be530c..03191a56eb44 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -2294,6 +2294,35 @@ static int r600_packet3_check(struct radeon_cs_parser *p,
2294 ib[idx+4] = upper_32_bits(offset) & 0xff; 2294 ib[idx+4] = upper_32_bits(offset) & 0xff;
2295 } 2295 }
2296 break; 2296 break;
2297 case PACKET3_MEM_WRITE:
2298 {
2299 u64 offset;
2300
2301 if (pkt->count != 3) {
2302 DRM_ERROR("bad MEM_WRITE (invalid count)\n");
2303 return -EINVAL;
2304 }
2305 r = r600_cs_packet_next_reloc(p, &reloc);
2306 if (r) {
2307 DRM_ERROR("bad MEM_WRITE (missing reloc)\n");
2308 return -EINVAL;
2309 }
2310 offset = radeon_get_ib_value(p, idx+0);
2311 offset += ((u64)(radeon_get_ib_value(p, idx+1) & 0xff)) << 32UL;
2312 if (offset & 0x7) {
2313 DRM_ERROR("bad MEM_WRITE (address not qwords aligned)\n");
2314 return -EINVAL;
2315 }
2316 if ((offset + 8) > radeon_bo_size(reloc->robj)) {
2317 DRM_ERROR("bad MEM_WRITE bo too small: 0x%llx, 0x%lx\n",
2318 offset + 8, radeon_bo_size(reloc->robj));
2319 return -EINVAL;
2320 }
2321 offset += reloc->lobj.gpu_offset;
2322 ib[idx+0] = offset;
2323 ib[idx+1] = upper_32_bits(offset) & 0xff;
2324 break;
2325 }
2297 case PACKET3_COPY_DW: 2326 case PACKET3_COPY_DW:
2298 if (pkt->count != 4) { 2327 if (pkt->count != 4) {
2299 DRM_ERROR("bad COPY_DW (invalid count)\n"); 2328 DRM_ERROR("bad COPY_DW (invalid count)\n");
@@ -2648,16 +2677,29 @@ int r600_dma_cs_parse(struct radeon_cs_parser *p)
2648 } 2677 }
2649 p->idx += 7; 2678 p->idx += 7;
2650 } else { 2679 } else {
2651 src_offset = ib[idx+2]; 2680 if (p->family >= CHIP_RV770) {
2652 src_offset |= ((u64)(ib[idx+4] & 0xff)) << 32; 2681 src_offset = ib[idx+2];
2653 dst_offset = ib[idx+1]; 2682 src_offset |= ((u64)(ib[idx+4] & 0xff)) << 32;
2654 dst_offset |= ((u64)(ib[idx+3] & 0xff)) << 32; 2683 dst_offset = ib[idx+1];
2684 dst_offset |= ((u64)(ib[idx+3] & 0xff)) << 32;
2655 2685
2656 ib[idx+1] += (u32)(dst_reloc->lobj.gpu_offset & 0xfffffffc); 2686 ib[idx+1] += (u32)(dst_reloc->lobj.gpu_offset & 0xfffffffc);
2657 ib[idx+2] += (u32)(src_reloc->lobj.gpu_offset & 0xfffffffc); 2687 ib[idx+2] += (u32)(src_reloc->lobj.gpu_offset & 0xfffffffc);
2658 ib[idx+3] += upper_32_bits(dst_reloc->lobj.gpu_offset) & 0xff; 2688 ib[idx+3] += upper_32_bits(dst_reloc->lobj.gpu_offset) & 0xff;
2659 ib[idx+4] += upper_32_bits(src_reloc->lobj.gpu_offset) & 0xff; 2689 ib[idx+4] += upper_32_bits(src_reloc->lobj.gpu_offset) & 0xff;
2660 p->idx += 5; 2690 p->idx += 5;
2691 } else {
2692 src_offset = ib[idx+2];
2693 src_offset |= ((u64)(ib[idx+3] & 0xff)) << 32;
2694 dst_offset = ib[idx+1];
2695 dst_offset |= ((u64)(ib[idx+3] & 0xff0000)) << 16;
2696
2697 ib[idx+1] += (u32)(dst_reloc->lobj.gpu_offset & 0xfffffffc);
2698 ib[idx+2] += (u32)(src_reloc->lobj.gpu_offset & 0xfffffffc);
2699 ib[idx+3] += upper_32_bits(src_reloc->lobj.gpu_offset) & 0xff;
2700 ib[idx+3] += (upper_32_bits(dst_reloc->lobj.gpu_offset) & 0xff) << 16;
2701 p->idx += 4;
2702 }
2661 } 2703 }
2662 if ((src_offset + (count * 4)) > radeon_bo_size(src_reloc->robj)) { 2704 if ((src_offset + (count * 4)) > radeon_bo_size(src_reloc->robj)) {
2663 dev_warn(p->dev, "DMA copy src buffer too small (%llu %lu)\n", 2705 dev_warn(p->dev, "DMA copy src buffer too small (%llu %lu)\n",
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 5dc744d43d12..34e52304a525 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -132,6 +132,11 @@ extern int radeon_lockup_timeout;
132#define RADEON_VA_RESERVED_SIZE (8 << 20) 132#define RADEON_VA_RESERVED_SIZE (8 << 20)
133#define RADEON_IB_VM_MAX_SIZE (64 << 10) 133#define RADEON_IB_VM_MAX_SIZE (64 << 10)
134 134
135/* reset flags */
136#define RADEON_RESET_GFX (1 << 0)
137#define RADEON_RESET_COMPUTE (1 << 1)
138#define RADEON_RESET_DMA (1 << 2)
139
135/* 140/*
136 * Errata workarounds. 141 * Errata workarounds.
137 */ 142 */
@@ -225,12 +230,13 @@ struct radeon_fence {
225int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring); 230int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring);
226int radeon_fence_driver_init(struct radeon_device *rdev); 231int radeon_fence_driver_init(struct radeon_device *rdev);
227void radeon_fence_driver_fini(struct radeon_device *rdev); 232void radeon_fence_driver_fini(struct radeon_device *rdev);
233void radeon_fence_driver_force_completion(struct radeon_device *rdev);
228int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence **fence, int ring); 234int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence **fence, int ring);
229void radeon_fence_process(struct radeon_device *rdev, int ring); 235void radeon_fence_process(struct radeon_device *rdev, int ring);
230bool radeon_fence_signaled(struct radeon_fence *fence); 236bool radeon_fence_signaled(struct radeon_fence *fence);
231int radeon_fence_wait(struct radeon_fence *fence, bool interruptible); 237int radeon_fence_wait(struct radeon_fence *fence, bool interruptible);
232int radeon_fence_wait_next_locked(struct radeon_device *rdev, int ring); 238int radeon_fence_wait_next_locked(struct radeon_device *rdev, int ring);
233void radeon_fence_wait_empty_locked(struct radeon_device *rdev, int ring); 239int radeon_fence_wait_empty_locked(struct radeon_device *rdev, int ring);
234int radeon_fence_wait_any(struct radeon_device *rdev, 240int radeon_fence_wait_any(struct radeon_device *rdev,
235 struct radeon_fence **fences, 241 struct radeon_fence **fences,
236 bool intr); 242 bool intr);
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index 596bcbe80ed0..9056fafb00ea 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -1140,9 +1140,9 @@ static struct radeon_asic rv770_asic = {
1140 .copy = { 1140 .copy = {
1141 .blit = &r600_copy_blit, 1141 .blit = &r600_copy_blit,
1142 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 1142 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
1143 .dma = &r600_copy_dma, 1143 .dma = &rv770_copy_dma,
1144 .dma_ring_index = R600_RING_TYPE_DMA_INDEX, 1144 .dma_ring_index = R600_RING_TYPE_DMA_INDEX,
1145 .copy = &r600_copy_dma, 1145 .copy = &rv770_copy_dma,
1146 .copy_ring_index = R600_RING_TYPE_DMA_INDEX, 1146 .copy_ring_index = R600_RING_TYPE_DMA_INDEX,
1147 }, 1147 },
1148 .surface = { 1148 .surface = {
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index 5f4882cc2152..15d70e613076 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -403,6 +403,10 @@ u32 rv770_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
403void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc); 403void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
404void r700_cp_stop(struct radeon_device *rdev); 404void r700_cp_stop(struct radeon_device *rdev);
405void r700_cp_fini(struct radeon_device *rdev); 405void r700_cp_fini(struct radeon_device *rdev);
406int rv770_copy_dma(struct radeon_device *rdev,
407 uint64_t src_offset, uint64_t dst_offset,
408 unsigned num_gpu_pages,
409 struct radeon_fence **fence);
406 410
407/* 411/*
408 * evergreen 412 * evergreen
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 4af89126e223..33a56a09ff10 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -1548,6 +1548,9 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
1548 of_machine_is_compatible("PowerBook6,7")) { 1548 of_machine_is_compatible("PowerBook6,7")) {
1549 /* ibook */ 1549 /* ibook */
1550 rdev->mode_info.connector_table = CT_IBOOK; 1550 rdev->mode_info.connector_table = CT_IBOOK;
1551 } else if (of_machine_is_compatible("PowerMac3,5")) {
1552 /* PowerMac G4 Silver radeon 7500 */
1553 rdev->mode_info.connector_table = CT_MAC_G4_SILVER;
1551 } else if (of_machine_is_compatible("PowerMac4,4")) { 1554 } else if (of_machine_is_compatible("PowerMac4,4")) {
1552 /* emac */ 1555 /* emac */
1553 rdev->mode_info.connector_table = CT_EMAC; 1556 rdev->mode_info.connector_table = CT_EMAC;
@@ -2212,6 +2215,54 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
2212 CONNECTOR_OBJECT_ID_SVIDEO, 2215 CONNECTOR_OBJECT_ID_SVIDEO,
2213 &hpd); 2216 &hpd);
2214 break; 2217 break;
2218 case CT_MAC_G4_SILVER:
2219 DRM_INFO("Connector Table: %d (mac g4 silver)\n",
2220 rdev->mode_info.connector_table);
2221 /* DVI-I - tv dac, int tmds */
2222 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0);
2223 hpd.hpd = RADEON_HPD_1; /* ??? */
2224 radeon_add_legacy_encoder(dev,
2225 radeon_get_encoder_enum(dev,
2226 ATOM_DEVICE_DFP1_SUPPORT,
2227 0),
2228 ATOM_DEVICE_DFP1_SUPPORT);
2229 radeon_add_legacy_encoder(dev,
2230 radeon_get_encoder_enum(dev,
2231 ATOM_DEVICE_CRT2_SUPPORT,
2232 2),
2233 ATOM_DEVICE_CRT2_SUPPORT);
2234 radeon_add_legacy_connector(dev, 0,
2235 ATOM_DEVICE_DFP1_SUPPORT |
2236 ATOM_DEVICE_CRT2_SUPPORT,
2237 DRM_MODE_CONNECTOR_DVII, &ddc_i2c,
2238 CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I,
2239 &hpd);
2240 /* VGA - primary dac */
2241 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0);
2242 hpd.hpd = RADEON_HPD_NONE;
2243 radeon_add_legacy_encoder(dev,
2244 radeon_get_encoder_enum(dev,
2245 ATOM_DEVICE_CRT1_SUPPORT,
2246 1),
2247 ATOM_DEVICE_CRT1_SUPPORT);
2248 radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT1_SUPPORT,
2249 DRM_MODE_CONNECTOR_VGA, &ddc_i2c,
2250 CONNECTOR_OBJECT_ID_VGA,
2251 &hpd);
2252 /* TV - TV DAC */
2253 ddc_i2c.valid = false;
2254 hpd.hpd = RADEON_HPD_NONE;
2255 radeon_add_legacy_encoder(dev,
2256 radeon_get_encoder_enum(dev,
2257 ATOM_DEVICE_TV1_SUPPORT,
2258 2),
2259 ATOM_DEVICE_TV1_SUPPORT);
2260 radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT,
2261 DRM_MODE_CONNECTOR_SVIDEO,
2262 &ddc_i2c,
2263 CONNECTOR_OBJECT_ID_SVIDEO,
2264 &hpd);
2265 break;
2215 default: 2266 default:
2216 DRM_INFO("Connector table: %d (invalid)\n", 2267 DRM_INFO("Connector table: %d (invalid)\n",
2217 rdev->mode_info.connector_table); 2268 rdev->mode_info.connector_table);
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 47bf162ab9c6..2399f25ec037 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -741,7 +741,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
741 ret = connector_status_disconnected; 741 ret = connector_status_disconnected;
742 742
743 if (radeon_connector->ddc_bus) 743 if (radeon_connector->ddc_bus)
744 dret = radeon_ddc_probe(radeon_connector); 744 dret = radeon_ddc_probe(radeon_connector, false);
745 if (dret) { 745 if (dret) {
746 radeon_connector->detected_by_load = false; 746 radeon_connector->detected_by_load = false;
747 if (radeon_connector->edid) { 747 if (radeon_connector->edid) {
@@ -947,7 +947,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
947 return connector->status; 947 return connector->status;
948 948
949 if (radeon_connector->ddc_bus) 949 if (radeon_connector->ddc_bus)
950 dret = radeon_ddc_probe(radeon_connector); 950 dret = radeon_ddc_probe(radeon_connector, false);
951 if (dret) { 951 if (dret) {
952 radeon_connector->detected_by_load = false; 952 radeon_connector->detected_by_load = false;
953 if (radeon_connector->edid) { 953 if (radeon_connector->edid) {
@@ -1401,7 +1401,8 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
1401 if (encoder) { 1401 if (encoder) {
1402 /* setup ddc on the bridge */ 1402 /* setup ddc on the bridge */
1403 radeon_atom_ext_encoder_setup_ddc(encoder); 1403 radeon_atom_ext_encoder_setup_ddc(encoder);
1404 if (radeon_ddc_probe(radeon_connector)) /* try DDC */ 1404 /* bridge chips are always aux */
1405 if (radeon_ddc_probe(radeon_connector, true)) /* try DDC */
1405 ret = connector_status_connected; 1406 ret = connector_status_connected;
1406 else if (radeon_connector->dac_load_detect) { /* try load detection */ 1407 else if (radeon_connector->dac_load_detect) { /* try load detection */
1407 struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; 1408 struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
@@ -1419,7 +1420,8 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
1419 if (radeon_dp_getdpcd(radeon_connector)) 1420 if (radeon_dp_getdpcd(radeon_connector))
1420 ret = connector_status_connected; 1421 ret = connector_status_connected;
1421 } else { 1422 } else {
1422 if (radeon_ddc_probe(radeon_connector)) 1423 /* try non-aux ddc (DP to DVI/HMDI/etc. adapter) */
1424 if (radeon_ddc_probe(radeon_connector, false))
1423 ret = connector_status_connected; 1425 ret = connector_status_connected;
1424 } 1426 }
1425 } 1427 }
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 49b06590001e..edfc54e41842 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -897,6 +897,25 @@ static void radeon_check_arguments(struct radeon_device *rdev)
897} 897}
898 898
899/** 899/**
900 * radeon_switcheroo_quirk_long_wakeup - return true if longer d3 delay is
901 * needed for waking up.
902 *
903 * @pdev: pci dev pointer
904 */
905static bool radeon_switcheroo_quirk_long_wakeup(struct pci_dev *pdev)
906{
907
908 /* 6600m in a macbook pro */
909 if (pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE &&
910 pdev->subsystem_device == 0x00e2) {
911 printk(KERN_INFO "radeon: quirking longer d3 wakeup delay\n");
912 return true;
913 }
914
915 return false;
916}
917
918/**
900 * radeon_switcheroo_set_state - set switcheroo state 919 * radeon_switcheroo_set_state - set switcheroo state
901 * 920 *
902 * @pdev: pci dev pointer 921 * @pdev: pci dev pointer
@@ -910,10 +929,19 @@ static void radeon_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero
910 struct drm_device *dev = pci_get_drvdata(pdev); 929 struct drm_device *dev = pci_get_drvdata(pdev);
911 pm_message_t pmm = { .event = PM_EVENT_SUSPEND }; 930 pm_message_t pmm = { .event = PM_EVENT_SUSPEND };
912 if (state == VGA_SWITCHEROO_ON) { 931 if (state == VGA_SWITCHEROO_ON) {
932 unsigned d3_delay = dev->pdev->d3_delay;
933
913 printk(KERN_INFO "radeon: switched on\n"); 934 printk(KERN_INFO "radeon: switched on\n");
914 /* don't suspend or resume card normally */ 935 /* don't suspend or resume card normally */
915 dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; 936 dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
937
938 if (d3_delay < 20 && radeon_switcheroo_quirk_long_wakeup(pdev))
939 dev->pdev->d3_delay = 20;
940
916 radeon_resume_kms(dev); 941 radeon_resume_kms(dev);
942
943 dev->pdev->d3_delay = d3_delay;
944
917 dev->switch_power_state = DRM_SWITCH_POWER_ON; 945 dev->switch_power_state = DRM_SWITCH_POWER_ON;
918 drm_kms_helper_poll_enable(dev); 946 drm_kms_helper_poll_enable(dev);
919 } else { 947 } else {
@@ -1164,6 +1192,7 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state)
1164 struct drm_crtc *crtc; 1192 struct drm_crtc *crtc;
1165 struct drm_connector *connector; 1193 struct drm_connector *connector;
1166 int i, r; 1194 int i, r;
1195 bool force_completion = false;
1167 1196
1168 if (dev == NULL || dev->dev_private == NULL) { 1197 if (dev == NULL || dev->dev_private == NULL) {
1169 return -ENODEV; 1198 return -ENODEV;
@@ -1206,8 +1235,16 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state)
1206 1235
1207 mutex_lock(&rdev->ring_lock); 1236 mutex_lock(&rdev->ring_lock);
1208 /* wait for gpu to finish processing current batch */ 1237 /* wait for gpu to finish processing current batch */
1209 for (i = 0; i < RADEON_NUM_RINGS; i++) 1238 for (i = 0; i < RADEON_NUM_RINGS; i++) {
1210 radeon_fence_wait_empty_locked(rdev, i); 1239 r = radeon_fence_wait_empty_locked(rdev, i);
1240 if (r) {
1241 /* delay GPU reset to resume */
1242 force_completion = true;
1243 }
1244 }
1245 if (force_completion) {
1246 radeon_fence_driver_force_completion(rdev);
1247 }
1211 mutex_unlock(&rdev->ring_lock); 1248 mutex_unlock(&rdev->ring_lock);
1212 1249
1213 radeon_save_bios_scratch_regs(rdev); 1250 radeon_save_bios_scratch_regs(rdev);
@@ -1338,7 +1375,6 @@ retry:
1338 } 1375 }
1339 1376
1340 radeon_restore_bios_scratch_regs(rdev); 1377 radeon_restore_bios_scratch_regs(rdev);
1341 drm_helper_resume_force_mode(rdev->ddev);
1342 1378
1343 if (!r) { 1379 if (!r) {
1344 for (i = 0; i < RADEON_NUM_RINGS; ++i) { 1380 for (i = 0; i < RADEON_NUM_RINGS; ++i) {
@@ -1358,11 +1394,14 @@ retry:
1358 } 1394 }
1359 } 1395 }
1360 } else { 1396 } else {
1397 radeon_fence_driver_force_completion(rdev);
1361 for (i = 0; i < RADEON_NUM_RINGS; ++i) { 1398 for (i = 0; i < RADEON_NUM_RINGS; ++i) {
1362 kfree(ring_data[i]); 1399 kfree(ring_data[i]);
1363 } 1400 }
1364 } 1401 }
1365 1402
1403 drm_helper_resume_force_mode(rdev->ddev);
1404
1366 ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched); 1405 ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched);
1367 if (r) { 1406 if (r) {
1368 /* bad news, how to tell it to userspace ? */ 1407 /* bad news, how to tell it to userspace ? */
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 310c0e5254ba..1da2386d7cf7 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -699,10 +699,15 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector)
699 if (radeon_connector->router.ddc_valid) 699 if (radeon_connector->router.ddc_valid)
700 radeon_router_select_ddc_port(radeon_connector); 700 radeon_router_select_ddc_port(radeon_connector);
701 701
702 if ((radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) || 702 if (radeon_connector_encoder_get_dp_bridge_encoder_id(&radeon_connector->base) !=
703 (radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP) || 703 ENCODER_OBJECT_ID_NONE) {
704 (radeon_connector_encoder_get_dp_bridge_encoder_id(&radeon_connector->base) != 704 struct radeon_connector_atom_dig *dig = radeon_connector->con_priv;
705 ENCODER_OBJECT_ID_NONE)) { 705
706 if (dig->dp_i2c_bus)
707 radeon_connector->edid = drm_get_edid(&radeon_connector->base,
708 &dig->dp_i2c_bus->adapter);
709 } else if ((radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) ||
710 (radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP)) {
706 struct radeon_connector_atom_dig *dig = radeon_connector->con_priv; 711 struct radeon_connector_atom_dig *dig = radeon_connector->con_priv;
707 712
708 if ((dig->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT || 713 if ((dig->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT ||
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 9b1a727d3c9e..dff6cf77f953 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -68,9 +68,10 @@
68 * 2.25.0 - eg+: new info request for num SE and num SH 68 * 2.25.0 - eg+: new info request for num SE and num SH
69 * 2.26.0 - r600-eg: fix htile size computation 69 * 2.26.0 - r600-eg: fix htile size computation
70 * 2.27.0 - r600-SI: Add CS ioctl support for async DMA 70 * 2.27.0 - r600-SI: Add CS ioctl support for async DMA
71 * 2.28.0 - r600-eg: Add MEM_WRITE packet support
71 */ 72 */
72#define KMS_DRIVER_MAJOR 2 73#define KMS_DRIVER_MAJOR 2
73#define KMS_DRIVER_MINOR 27 74#define KMS_DRIVER_MINOR 28
74#define KMS_DRIVER_PATCHLEVEL 0 75#define KMS_DRIVER_PATCHLEVEL 0
75int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); 76int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
76int radeon_driver_unload_kms(struct drm_device *dev); 77int radeon_driver_unload_kms(struct drm_device *dev);
@@ -305,8 +306,8 @@ static int radeon_kick_out_firmware_fb(struct pci_dev *pdev)
305 return 0; 306 return 0;
306} 307}
307 308
308static int __devinit 309static int radeon_pci_probe(struct pci_dev *pdev,
309radeon_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 310 const struct pci_device_id *ent)
310{ 311{
311 int ret; 312 int ret;
312 313
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 410a975a8eec..34356252567a 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -609,26 +609,20 @@ int radeon_fence_wait_next_locked(struct radeon_device *rdev, int ring)
609 * Returns 0 if the fences have passed, error for all other cases. 609 * Returns 0 if the fences have passed, error for all other cases.
610 * Caller must hold ring lock. 610 * Caller must hold ring lock.
611 */ 611 */
612void radeon_fence_wait_empty_locked(struct radeon_device *rdev, int ring) 612int radeon_fence_wait_empty_locked(struct radeon_device *rdev, int ring)
613{ 613{
614 uint64_t seq = rdev->fence_drv[ring].sync_seq[ring]; 614 uint64_t seq = rdev->fence_drv[ring].sync_seq[ring];
615 int r;
615 616
616 while(1) { 617 r = radeon_fence_wait_seq(rdev, seq, ring, false, false);
617 int r; 618 if (r) {
618 r = radeon_fence_wait_seq(rdev, seq, ring, false, false);
619 if (r == -EDEADLK) { 619 if (r == -EDEADLK) {
620 mutex_unlock(&rdev->ring_lock); 620 return -EDEADLK;
621 r = radeon_gpu_reset(rdev);
622 mutex_lock(&rdev->ring_lock);
623 if (!r)
624 continue;
625 }
626 if (r) {
627 dev_err(rdev->dev, "error waiting for ring to become"
628 " idle (%d)\n", r);
629 } 621 }
630 return; 622 dev_err(rdev->dev, "error waiting for ring[%d] to become idle (%d)\n",
623 ring, r);
631 } 624 }
625 return 0;
632} 626}
633 627
634/** 628/**
@@ -854,13 +848,17 @@ int radeon_fence_driver_init(struct radeon_device *rdev)
854 */ 848 */
855void radeon_fence_driver_fini(struct radeon_device *rdev) 849void radeon_fence_driver_fini(struct radeon_device *rdev)
856{ 850{
857 int ring; 851 int ring, r;
858 852
859 mutex_lock(&rdev->ring_lock); 853 mutex_lock(&rdev->ring_lock);
860 for (ring = 0; ring < RADEON_NUM_RINGS; ring++) { 854 for (ring = 0; ring < RADEON_NUM_RINGS; ring++) {
861 if (!rdev->fence_drv[ring].initialized) 855 if (!rdev->fence_drv[ring].initialized)
862 continue; 856 continue;
863 radeon_fence_wait_empty_locked(rdev, ring); 857 r = radeon_fence_wait_empty_locked(rdev, ring);
858 if (r) {
859 /* no need to trigger GPU reset as we are unloading */
860 radeon_fence_driver_force_completion(rdev);
861 }
864 wake_up_all(&rdev->fence_queue); 862 wake_up_all(&rdev->fence_queue);
865 radeon_scratch_free(rdev, rdev->fence_drv[ring].scratch_reg); 863 radeon_scratch_free(rdev, rdev->fence_drv[ring].scratch_reg);
866 rdev->fence_drv[ring].initialized = false; 864 rdev->fence_drv[ring].initialized = false;
@@ -868,6 +866,25 @@ void radeon_fence_driver_fini(struct radeon_device *rdev)
868 mutex_unlock(&rdev->ring_lock); 866 mutex_unlock(&rdev->ring_lock);
869} 867}
870 868
869/**
870 * radeon_fence_driver_force_completion - force all fence waiter to complete
871 *
872 * @rdev: radeon device pointer
873 *
874 * In case of GPU reset failure make sure no process keep waiting on fence
875 * that will never complete.
876 */
877void radeon_fence_driver_force_completion(struct radeon_device *rdev)
878{
879 int ring;
880
881 for (ring = 0; ring < RADEON_NUM_RINGS; ring++) {
882 if (!rdev->fence_drv[ring].initialized)
883 continue;
884 radeon_fence_write(rdev, rdev->fence_drv[ring].sync_seq[ring], ring);
885 }
886}
887
871 888
872/* 889/*
873 * Fence debugfs 890 * Fence debugfs
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c
index c5bddd630eb9..fc60b74ee304 100644
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -39,7 +39,7 @@ extern u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap);
39 * radeon_ddc_probe 39 * radeon_ddc_probe
40 * 40 *
41 */ 41 */
42bool radeon_ddc_probe(struct radeon_connector *radeon_connector) 42bool radeon_ddc_probe(struct radeon_connector *radeon_connector, bool use_aux)
43{ 43{
44 u8 out = 0x0; 44 u8 out = 0x0;
45 u8 buf[8]; 45 u8 buf[8];
@@ -63,7 +63,13 @@ bool radeon_ddc_probe(struct radeon_connector *radeon_connector)
63 if (radeon_connector->router.ddc_valid) 63 if (radeon_connector->router.ddc_valid)
64 radeon_router_select_ddc_port(radeon_connector); 64 radeon_router_select_ddc_port(radeon_connector);
65 65
66 ret = i2c_transfer(&radeon_connector->ddc_bus->adapter, msgs, 2); 66 if (use_aux) {
67 struct radeon_connector_atom_dig *dig = radeon_connector->con_priv;
68 ret = i2c_transfer(&dig->dp_i2c_bus->adapter, msgs, 2);
69 } else {
70 ret = i2c_transfer(&radeon_connector->ddc_bus->adapter, msgs, 2);
71 }
72
67 if (ret != 2) 73 if (ret != 2)
68 /* Couldn't find an accessible DDC on this connector */ 74 /* Couldn't find an accessible DDC on this connector */
69 return false; 75 return false;
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index d818b503b42f..4003f5a68c09 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -209,7 +209,8 @@ enum radeon_connector_table {
209 CT_RN50_POWER, 209 CT_RN50_POWER,
210 CT_MAC_X800, 210 CT_MAC_X800,
211 CT_MAC_G5_9600, 211 CT_MAC_G5_9600,
212 CT_SAM440EP 212 CT_SAM440EP,
213 CT_MAC_G4_SILVER
213}; 214};
214 215
215enum radeon_dvo_chip { 216enum radeon_dvo_chip {
@@ -558,7 +559,7 @@ extern void radeon_i2c_put_byte(struct radeon_i2c_chan *i2c,
558 u8 val); 559 u8 val);
559extern void radeon_router_select_ddc_port(struct radeon_connector *radeon_connector); 560extern void radeon_router_select_ddc_port(struct radeon_connector *radeon_connector);
560extern void radeon_router_select_cd_port(struct radeon_connector *radeon_connector); 561extern void radeon_router_select_cd_port(struct radeon_connector *radeon_connector);
561extern bool radeon_ddc_probe(struct radeon_connector *radeon_connector); 562extern bool radeon_ddc_probe(struct radeon_connector *radeon_connector, bool use_aux);
562extern int radeon_ddc_get_modes(struct radeon_connector *radeon_connector); 563extern int radeon_ddc_get_modes(struct radeon_connector *radeon_connector);
563 564
564extern struct drm_encoder *radeon_best_encoder(struct drm_connector *connector); 565extern struct drm_encoder *radeon_best_encoder(struct drm_connector *connector);
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index aa14dbb7e4fb..0bfa656aa87d 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -234,7 +234,7 @@ static void radeon_set_power_state(struct radeon_device *rdev)
234 234
235static void radeon_pm_set_clocks(struct radeon_device *rdev) 235static void radeon_pm_set_clocks(struct radeon_device *rdev)
236{ 236{
237 int i; 237 int i, r;
238 238
239 /* no need to take locks, etc. if nothing's going to change */ 239 /* no need to take locks, etc. if nothing's going to change */
240 if ((rdev->pm.requested_clock_mode_index == rdev->pm.current_clock_mode_index) && 240 if ((rdev->pm.requested_clock_mode_index == rdev->pm.current_clock_mode_index) &&
@@ -248,8 +248,17 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev)
248 /* wait for the rings to drain */ 248 /* wait for the rings to drain */
249 for (i = 0; i < RADEON_NUM_RINGS; i++) { 249 for (i = 0; i < RADEON_NUM_RINGS; i++) {
250 struct radeon_ring *ring = &rdev->ring[i]; 250 struct radeon_ring *ring = &rdev->ring[i];
251 if (ring->ready) 251 if (!ring->ready) {
252 radeon_fence_wait_empty_locked(rdev, i); 252 continue;
253 }
254 r = radeon_fence_wait_empty_locked(rdev, i);
255 if (r) {
256 /* needs a GPU reset dont reset here */
257 mutex_unlock(&rdev->ring_lock);
258 up_write(&rdev->pm.mclk_lock);
259 mutex_unlock(&rdev->ddev->struct_mutex);
260 return;
261 }
253 } 262 }
254 263
255 radeon_unmap_vram_bos(rdev); 264 radeon_unmap_vram_bos(rdev);
diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c
index e09521858f64..26c23bb651c6 100644
--- a/drivers/gpu/drm/radeon/radeon_prime.c
+++ b/drivers/gpu/drm/radeon/radeon_prime.c
@@ -194,6 +194,7 @@ struct drm_gem_object *radeon_gem_prime_import(struct drm_device *dev,
194 bo = dma_buf->priv; 194 bo = dma_buf->priv;
195 if (bo->gem_base.dev == dev) { 195 if (bo->gem_base.dev == dev) {
196 drm_gem_object_reference(&bo->gem_base); 196 drm_gem_object_reference(&bo->gem_base);
197 dma_buf_put(dma_buf);
197 return &bo->gem_base; 198 return &bo->gem_base;
198 } 199 }
199 } 200 }
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index ebd69562ef6c..141f2b6a9cf2 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -770,22 +770,28 @@ static int radeon_debugfs_ring_info(struct seq_file *m, void *data)
770 int ridx = *(int*)node->info_ent->data; 770 int ridx = *(int*)node->info_ent->data;
771 struct radeon_ring *ring = &rdev->ring[ridx]; 771 struct radeon_ring *ring = &rdev->ring[ridx];
772 unsigned count, i, j; 772 unsigned count, i, j;
773 u32 tmp;
773 774
774 radeon_ring_free_size(rdev, ring); 775 radeon_ring_free_size(rdev, ring);
775 count = (ring->ring_size / 4) - ring->ring_free_dw; 776 count = (ring->ring_size / 4) - ring->ring_free_dw;
776 seq_printf(m, "wptr(0x%04x): 0x%08x\n", ring->wptr_reg, RREG32(ring->wptr_reg)); 777 tmp = RREG32(ring->wptr_reg) >> ring->ptr_reg_shift;
777 seq_printf(m, "rptr(0x%04x): 0x%08x\n", ring->rptr_reg, RREG32(ring->rptr_reg)); 778 seq_printf(m, "wptr(0x%04x): 0x%08x [%5d]\n", ring->wptr_reg, tmp, tmp);
779 tmp = RREG32(ring->rptr_reg) >> ring->ptr_reg_shift;
780 seq_printf(m, "rptr(0x%04x): 0x%08x [%5d]\n", ring->rptr_reg, tmp, tmp);
778 if (ring->rptr_save_reg) { 781 if (ring->rptr_save_reg) {
779 seq_printf(m, "rptr next(0x%04x): 0x%08x\n", ring->rptr_save_reg, 782 seq_printf(m, "rptr next(0x%04x): 0x%08x\n", ring->rptr_save_reg,
780 RREG32(ring->rptr_save_reg)); 783 RREG32(ring->rptr_save_reg));
781 } 784 }
782 seq_printf(m, "driver's copy of the wptr: 0x%08x\n", ring->wptr); 785 seq_printf(m, "driver's copy of the wptr: 0x%08x [%5d]\n", ring->wptr, ring->wptr);
783 seq_printf(m, "driver's copy of the rptr: 0x%08x\n", ring->rptr); 786 seq_printf(m, "driver's copy of the rptr: 0x%08x [%5d]\n", ring->rptr, ring->rptr);
784 seq_printf(m, "%u free dwords in ring\n", ring->ring_free_dw); 787 seq_printf(m, "%u free dwords in ring\n", ring->ring_free_dw);
785 seq_printf(m, "%u dwords in ring\n", count); 788 seq_printf(m, "%u dwords in ring\n", count);
786 i = ring->rptr; 789 /* print 8 dw before current rptr as often it's the last executed
787 for (j = 0; j <= count; j++) { 790 * packet that is the root issue
788 seq_printf(m, "r[%04d]=0x%08x\n", i, ring->ring[i]); 791 */
792 i = (ring->rptr + ring->ptr_mask + 1 - 32) & ring->ptr_mask;
793 for (j = 0; j <= (count + 32); j++) {
794 seq_printf(m, "r[%5d]=0x%08x\n", i, ring->ring[i]);
789 i = (i + 1) & ring->ptr_mask; 795 i = (i + 1) & ring->ptr_mask;
790 } 796 }
791 return 0; 797 return 0;
@@ -794,11 +800,15 @@ static int radeon_debugfs_ring_info(struct seq_file *m, void *data)
794static int radeon_ring_type_gfx_index = RADEON_RING_TYPE_GFX_INDEX; 800static int radeon_ring_type_gfx_index = RADEON_RING_TYPE_GFX_INDEX;
795static int cayman_ring_type_cp1_index = CAYMAN_RING_TYPE_CP1_INDEX; 801static int cayman_ring_type_cp1_index = CAYMAN_RING_TYPE_CP1_INDEX;
796static int cayman_ring_type_cp2_index = CAYMAN_RING_TYPE_CP2_INDEX; 802static int cayman_ring_type_cp2_index = CAYMAN_RING_TYPE_CP2_INDEX;
803static int radeon_ring_type_dma1_index = R600_RING_TYPE_DMA_INDEX;
804static int radeon_ring_type_dma2_index = CAYMAN_RING_TYPE_DMA1_INDEX;
797 805
798static struct drm_info_list radeon_debugfs_ring_info_list[] = { 806static struct drm_info_list radeon_debugfs_ring_info_list[] = {
799 {"radeon_ring_gfx", radeon_debugfs_ring_info, 0, &radeon_ring_type_gfx_index}, 807 {"radeon_ring_gfx", radeon_debugfs_ring_info, 0, &radeon_ring_type_gfx_index},
800 {"radeon_ring_cp1", radeon_debugfs_ring_info, 0, &cayman_ring_type_cp1_index}, 808 {"radeon_ring_cp1", radeon_debugfs_ring_info, 0, &cayman_ring_type_cp1_index},
801 {"radeon_ring_cp2", radeon_debugfs_ring_info, 0, &cayman_ring_type_cp2_index}, 809 {"radeon_ring_cp2", radeon_debugfs_ring_info, 0, &cayman_ring_type_cp2_index},
810 {"radeon_ring_dma1", radeon_debugfs_ring_info, 0, &radeon_ring_type_dma1_index},
811 {"radeon_ring_dma2", radeon_debugfs_ring_info, 0, &radeon_ring_type_dma2_index},
802}; 812};
803 813
804static int radeon_debugfs_sa_info(struct seq_file *m, void *data) 814static int radeon_debugfs_sa_info(struct seq_file *m, void *data)
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 87c979c4f721..1b2444f4d8f4 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -887,6 +887,80 @@ static int rv770_mc_init(struct radeon_device *rdev)
887 return 0; 887 return 0;
888} 888}
889 889
890/**
891 * rv770_copy_dma - copy pages using the DMA engine
892 *
893 * @rdev: radeon_device pointer
894 * @src_offset: src GPU address
895 * @dst_offset: dst GPU address
896 * @num_gpu_pages: number of GPU pages to xfer
897 * @fence: radeon fence object
898 *
899 * Copy GPU paging using the DMA engine (r7xx).
900 * Used by the radeon ttm implementation to move pages if
901 * registered as the asic copy callback.
902 */
903int rv770_copy_dma(struct radeon_device *rdev,
904 uint64_t src_offset, uint64_t dst_offset,
905 unsigned num_gpu_pages,
906 struct radeon_fence **fence)
907{
908 struct radeon_semaphore *sem = NULL;
909 int ring_index = rdev->asic->copy.dma_ring_index;
910 struct radeon_ring *ring = &rdev->ring[ring_index];
911 u32 size_in_dw, cur_size_in_dw;
912 int i, num_loops;
913 int r = 0;
914
915 r = radeon_semaphore_create(rdev, &sem);
916 if (r) {
917 DRM_ERROR("radeon: moving bo (%d).\n", r);
918 return r;
919 }
920
921 size_in_dw = (num_gpu_pages << RADEON_GPU_PAGE_SHIFT) / 4;
922 num_loops = DIV_ROUND_UP(size_in_dw, 0xFFFF);
923 r = radeon_ring_lock(rdev, ring, num_loops * 5 + 8);
924 if (r) {
925 DRM_ERROR("radeon: moving bo (%d).\n", r);
926 radeon_semaphore_free(rdev, &sem, NULL);
927 return r;
928 }
929
930 if (radeon_fence_need_sync(*fence, ring->idx)) {
931 radeon_semaphore_sync_rings(rdev, sem, (*fence)->ring,
932 ring->idx);
933 radeon_fence_note_sync(*fence, ring->idx);
934 } else {
935 radeon_semaphore_free(rdev, &sem, NULL);
936 }
937
938 for (i = 0; i < num_loops; i++) {
939 cur_size_in_dw = size_in_dw;
940 if (cur_size_in_dw > 0xFFFF)
941 cur_size_in_dw = 0xFFFF;
942 size_in_dw -= cur_size_in_dw;
943 radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw));
944 radeon_ring_write(ring, dst_offset & 0xfffffffc);
945 radeon_ring_write(ring, src_offset & 0xfffffffc);
946 radeon_ring_write(ring, upper_32_bits(dst_offset) & 0xff);
947 radeon_ring_write(ring, upper_32_bits(src_offset) & 0xff);
948 src_offset += cur_size_in_dw * 4;
949 dst_offset += cur_size_in_dw * 4;
950 }
951
952 r = radeon_fence_emit(rdev, fence, ring->idx);
953 if (r) {
954 radeon_ring_unlock_undo(rdev, ring);
955 return r;
956 }
957
958 radeon_ring_unlock_commit(rdev, ring);
959 radeon_semaphore_free(rdev, &sem, *fence);
960
961 return r;
962}
963
890static int rv770_startup(struct radeon_device *rdev) 964static int rv770_startup(struct radeon_device *rdev)
891{ 965{
892 struct radeon_ring *ring; 966 struct radeon_ring *ring;
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index ef683653f0b7..3240a3d64f30 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -2126,15 +2126,13 @@ bool si_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
2126 return radeon_ring_test_lockup(rdev, ring); 2126 return radeon_ring_test_lockup(rdev, ring);
2127} 2127}
2128 2128
2129static int si_gpu_soft_reset(struct radeon_device *rdev) 2129static void si_gpu_soft_reset_gfx(struct radeon_device *rdev)
2130{ 2130{
2131 struct evergreen_mc_save save;
2132 u32 grbm_reset = 0; 2131 u32 grbm_reset = 0;
2133 2132
2134 if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) 2133 if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE))
2135 return 0; 2134 return;
2136 2135
2137 dev_info(rdev->dev, "GPU softreset \n");
2138 dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", 2136 dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n",
2139 RREG32(GRBM_STATUS)); 2137 RREG32(GRBM_STATUS));
2140 dev_info(rdev->dev, " GRBM_STATUS2=0x%08X\n", 2138 dev_info(rdev->dev, " GRBM_STATUS2=0x%08X\n",
@@ -2145,10 +2143,7 @@ static int si_gpu_soft_reset(struct radeon_device *rdev)
2145 RREG32(GRBM_STATUS_SE1)); 2143 RREG32(GRBM_STATUS_SE1));
2146 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", 2144 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n",
2147 RREG32(SRBM_STATUS)); 2145 RREG32(SRBM_STATUS));
2148 evergreen_mc_stop(rdev, &save); 2146
2149 if (radeon_mc_wait_for_idle(rdev)) {
2150 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
2151 }
2152 /* Disable CP parsing/prefetching */ 2147 /* Disable CP parsing/prefetching */
2153 WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT); 2148 WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT);
2154 2149
@@ -2173,8 +2168,7 @@ static int si_gpu_soft_reset(struct radeon_device *rdev)
2173 udelay(50); 2168 udelay(50);
2174 WREG32(GRBM_SOFT_RESET, 0); 2169 WREG32(GRBM_SOFT_RESET, 0);
2175 (void)RREG32(GRBM_SOFT_RESET); 2170 (void)RREG32(GRBM_SOFT_RESET);
2176 /* Wait a little for things to settle down */ 2171
2177 udelay(50);
2178 dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", 2172 dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n",
2179 RREG32(GRBM_STATUS)); 2173 RREG32(GRBM_STATUS));
2180 dev_info(rdev->dev, " GRBM_STATUS2=0x%08X\n", 2174 dev_info(rdev->dev, " GRBM_STATUS2=0x%08X\n",
@@ -2185,13 +2179,75 @@ static int si_gpu_soft_reset(struct radeon_device *rdev)
2185 RREG32(GRBM_STATUS_SE1)); 2179 RREG32(GRBM_STATUS_SE1));
2186 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", 2180 dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n",
2187 RREG32(SRBM_STATUS)); 2181 RREG32(SRBM_STATUS));
2182}
2183
2184static void si_gpu_soft_reset_dma(struct radeon_device *rdev)
2185{
2186 u32 tmp;
2187
2188 if (RREG32(DMA_STATUS_REG) & DMA_IDLE)
2189 return;
2190
2191 dev_info(rdev->dev, " DMA_STATUS_REG = 0x%08X\n",
2192 RREG32(DMA_STATUS_REG));
2193
2194 /* dma0 */
2195 tmp = RREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET);
2196 tmp &= ~DMA_RB_ENABLE;
2197 WREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET, tmp);
2198
2199 /* dma1 */
2200 tmp = RREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET);
2201 tmp &= ~DMA_RB_ENABLE;
2202 WREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET, tmp);
2203
2204 /* Reset dma */
2205 WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1);
2206 RREG32(SRBM_SOFT_RESET);
2207 udelay(50);
2208 WREG32(SRBM_SOFT_RESET, 0);
2209
2210 dev_info(rdev->dev, " DMA_STATUS_REG = 0x%08X\n",
2211 RREG32(DMA_STATUS_REG));
2212}
2213
2214static int si_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask)
2215{
2216 struct evergreen_mc_save save;
2217
2218 if (reset_mask == 0)
2219 return 0;
2220
2221 dev_info(rdev->dev, "GPU softreset: 0x%08X\n", reset_mask);
2222
2223 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n",
2224 RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR));
2225 dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
2226 RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS));
2227
2228 evergreen_mc_stop(rdev, &save);
2229 if (radeon_mc_wait_for_idle(rdev)) {
2230 dev_warn(rdev->dev, "Wait for MC idle timedout !\n");
2231 }
2232
2233 if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE))
2234 si_gpu_soft_reset_gfx(rdev);
2235
2236 if (reset_mask & RADEON_RESET_DMA)
2237 si_gpu_soft_reset_dma(rdev);
2238
2239 /* Wait a little for things to settle down */
2240 udelay(50);
2241
2188 evergreen_mc_resume(rdev, &save); 2242 evergreen_mc_resume(rdev, &save);
2189 return 0; 2243 return 0;
2190} 2244}
2191 2245
2192int si_asic_reset(struct radeon_device *rdev) 2246int si_asic_reset(struct radeon_device *rdev)
2193{ 2247{
2194 return si_gpu_soft_reset(rdev); 2248 return si_gpu_soft_reset(rdev, (RADEON_RESET_GFX |
2249 RADEON_RESET_COMPUTE |
2250 RADEON_RESET_DMA));
2195} 2251}
2196 2252
2197/* MC */ 2253/* MC */
diff --git a/drivers/gpu/drm/radeon/sid.h b/drivers/gpu/drm/radeon/sid.h
index 62b46215d423..c056aae814f0 100644
--- a/drivers/gpu/drm/radeon/sid.h
+++ b/drivers/gpu/drm/radeon/sid.h
@@ -62,6 +62,22 @@
62 62
63#define SRBM_STATUS 0xE50 63#define SRBM_STATUS 0xE50
64 64
65#define SRBM_SOFT_RESET 0x0E60
66#define SOFT_RESET_BIF (1 << 1)
67#define SOFT_RESET_DC (1 << 5)
68#define SOFT_RESET_DMA1 (1 << 6)
69#define SOFT_RESET_GRBM (1 << 8)
70#define SOFT_RESET_HDP (1 << 9)
71#define SOFT_RESET_IH (1 << 10)
72#define SOFT_RESET_MC (1 << 11)
73#define SOFT_RESET_ROM (1 << 14)
74#define SOFT_RESET_SEM (1 << 15)
75#define SOFT_RESET_VMC (1 << 17)
76#define SOFT_RESET_DMA (1 << 20)
77#define SOFT_RESET_TST (1 << 21)
78#define SOFT_RESET_REGBB (1 << 22)
79#define SOFT_RESET_ORB (1 << 23)
80
65#define CC_SYS_RB_BACKEND_DISABLE 0xe80 81#define CC_SYS_RB_BACKEND_DISABLE 0xe80
66#define GC_USER_SYS_RB_BACKEND_DISABLE 0xe84 82#define GC_USER_SYS_RB_BACKEND_DISABLE 0xe84
67 83
@@ -1013,6 +1029,8 @@
1013# define DATA_SWAP_ENABLE (1 << 3) 1029# define DATA_SWAP_ENABLE (1 << 3)
1014# define FENCE_SWAP_ENABLE (1 << 4) 1030# define FENCE_SWAP_ENABLE (1 << 4)
1015# define CTXEMPTY_INT_ENABLE (1 << 28) 1031# define CTXEMPTY_INT_ENABLE (1 << 28)
1032#define DMA_STATUS_REG 0xd034
1033# define DMA_IDLE (1 << 0)
1016#define DMA_TILING_CONFIG 0xd0b8 1034#define DMA_TILING_CONFIG 0xd0b8
1017 1035
1018#define DMA_PACKET(cmd, b, t, s, n) ((((cmd) & 0xF) << 28) | \ 1036#define DMA_PACKET(cmd, b, t, s, n) ((((cmd) & 0xF) << 28) | \
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
index 1c350fc4e449..d1d5306ebf24 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
@@ -33,7 +33,7 @@
33 * Hardware initialization 33 * Hardware initialization
34 */ 34 */
35 35
36static int __devinit shmob_drm_init_interface(struct shmob_drm_device *sdev) 36static int shmob_drm_init_interface(struct shmob_drm_device *sdev)
37{ 37{
38 static const u32 ldmt1r[] = { 38 static const u32 ldmt1r[] = {
39 [SHMOB_DRM_IFACE_RGB8] = LDMT1R_MIFTYP_RGB8, 39 [SHMOB_DRM_IFACE_RGB8] = LDMT1R_MIFTYP_RGB8,
@@ -67,7 +67,7 @@ static int __devinit shmob_drm_init_interface(struct shmob_drm_device *sdev)
67 return 0; 67 return 0;
68} 68}
69 69
70static int __devinit shmob_drm_setup_clocks(struct shmob_drm_device *sdev, 70static int shmob_drm_setup_clocks(struct shmob_drm_device *sdev,
71 enum shmob_drm_clk_source clksrc) 71 enum shmob_drm_clk_source clksrc)
72{ 72{
73 struct clk *clk; 73 struct clk *clk;
@@ -330,12 +330,12 @@ static const struct dev_pm_ops shmob_drm_pm_ops = {
330 * Platform driver 330 * Platform driver
331 */ 331 */
332 332
333static int __devinit shmob_drm_probe(struct platform_device *pdev) 333static int shmob_drm_probe(struct platform_device *pdev)
334{ 334{
335 return drm_platform_init(&shmob_drm_driver, pdev); 335 return drm_platform_init(&shmob_drm_driver, pdev);
336} 336}
337 337
338static int __devexit shmob_drm_remove(struct platform_device *pdev) 338static int shmob_drm_remove(struct platform_device *pdev)
339{ 339{
340 drm_platform_exit(&shmob_drm_driver, pdev); 340 drm_platform_exit(&shmob_drm_driver, pdev);
341 341
@@ -344,7 +344,7 @@ static int __devexit shmob_drm_remove(struct platform_device *pdev)
344 344
345static struct platform_driver shmob_drm_platform_driver = { 345static struct platform_driver shmob_drm_platform_driver = {
346 .probe = shmob_drm_probe, 346 .probe = shmob_drm_probe,
347 .remove = __devexit_p(shmob_drm_remove), 347 .remove = shmob_drm_remove,
348 .driver = { 348 .driver = {
349 .owner = THIS_MODULE, 349 .owner = THIS_MODULE,
350 .name = "shmob-drm", 350 .name = "shmob-drm",
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 074410371e2a..656b2e3334a6 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -102,12 +102,12 @@ static int tegra_dc_set_timings(struct tegra_dc *dc,
102 ((mode->hsync_end - mode->hsync_start) << 0); 102 ((mode->hsync_end - mode->hsync_start) << 0);
103 tegra_dc_writel(dc, value, DC_DISP_SYNC_WIDTH); 103 tegra_dc_writel(dc, value, DC_DISP_SYNC_WIDTH);
104 104
105 value = ((mode->vsync_start - mode->vdisplay) << 16) |
106 ((mode->hsync_start - mode->hdisplay) << 0);
107 tegra_dc_writel(dc, value, DC_DISP_BACK_PORCH);
108
109 value = ((mode->vtotal - mode->vsync_end) << 16) | 105 value = ((mode->vtotal - mode->vsync_end) << 16) |
110 ((mode->htotal - mode->hsync_end) << 0); 106 ((mode->htotal - mode->hsync_end) << 0);
107 tegra_dc_writel(dc, value, DC_DISP_BACK_PORCH);
108
109 value = ((mode->vsync_start - mode->vdisplay) << 16) |
110 ((mode->hsync_start - mode->hdisplay) << 0);
111 tegra_dc_writel(dc, value, DC_DISP_FRONT_PORCH); 111 tegra_dc_writel(dc, value, DC_DISP_FRONT_PORCH);
112 112
113 value = (mode->vdisplay << 16) | mode->hdisplay; 113 value = (mode->vdisplay << 16) | mode->hdisplay;
@@ -221,8 +221,7 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc,
221 win.stride = crtc->fb->pitches[0]; 221 win.stride = crtc->fb->pitches[0];
222 222
223 /* program window registers */ 223 /* program window registers */
224 value = tegra_dc_readl(dc, DC_CMD_DISPLAY_WINDOW_HEADER); 224 value = WINDOW_A_SELECT;
225 value |= WINDOW_A_SELECT;
226 tegra_dc_writel(dc, value, DC_CMD_DISPLAY_WINDOW_HEADER); 225 tegra_dc_writel(dc, value, DC_CMD_DISPLAY_WINDOW_HEADER);
227 226
228 tegra_dc_writel(dc, win.fmt, DC_WIN_COLOR_DEPTH); 227 tegra_dc_writel(dc, win.fmt, DC_WIN_COLOR_DEPTH);
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index 3a843a77ddc7..741b5dc2742c 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -204,24 +204,6 @@ extern int tegra_output_parse_dt(struct tegra_output *output);
204extern int tegra_output_init(struct drm_device *drm, struct tegra_output *output); 204extern int tegra_output_init(struct drm_device *drm, struct tegra_output *output);
205extern int tegra_output_exit(struct tegra_output *output); 205extern int tegra_output_exit(struct tegra_output *output);
206 206
207/* from gem.c */
208extern struct tegra_gem_object *tegra_gem_alloc(struct drm_device *drm,
209 size_t size);
210extern int tegra_gem_handle_create(struct drm_device *drm,
211 struct drm_file *file, size_t size,
212 unsigned long flags, uint32_t *handle);
213extern int tegra_gem_dumb_create(struct drm_file *file, struct drm_device *drm,
214 struct drm_mode_create_dumb *args);
215extern int tegra_gem_dumb_map_offset(struct drm_file *file,
216 struct drm_device *drm, uint32_t handle,
217 uint64_t *offset);
218extern int tegra_gem_dumb_destroy(struct drm_file *file,
219 struct drm_device *drm, uint32_t handle);
220extern int tegra_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
221extern int tegra_gem_init_object(struct drm_gem_object *obj);
222extern void tegra_gem_free_object(struct drm_gem_object *obj);
223extern struct vm_operations_struct tegra_gem_vm_ops;
224
225/* from fb.c */ 207/* from fb.c */
226extern int tegra_drm_fb_init(struct drm_device *drm); 208extern int tegra_drm_fb_init(struct drm_device *drm);
227extern void tegra_drm_fb_exit(struct drm_device *drm); 209extern void tegra_drm_fb_exit(struct drm_device *drm);
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index ab4016412bbf..e060c7e6434d 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -149,7 +149,7 @@ struct tmds_config {
149}; 149};
150 150
151static const struct tmds_config tegra2_tmds_config[] = { 151static const struct tmds_config tegra2_tmds_config[] = {
152 { /* 480p modes */ 152 { /* slow pixel clock modes */
153 .pclk = 27000000, 153 .pclk = 27000000,
154 .pll0 = SOR_PLL_BG_V17_S(3) | SOR_PLL_ICHPMP(1) | 154 .pll0 = SOR_PLL_BG_V17_S(3) | SOR_PLL_ICHPMP(1) |
155 SOR_PLL_RESISTORSEL | SOR_PLL_VCOCAP(0) | 155 SOR_PLL_RESISTORSEL | SOR_PLL_VCOCAP(0) |
@@ -163,21 +163,8 @@ static const struct tmds_config tegra2_tmds_config[] = {
163 DRIVE_CURRENT_LANE1(DRIVE_CURRENT_7_125_mA) | 163 DRIVE_CURRENT_LANE1(DRIVE_CURRENT_7_125_mA) |
164 DRIVE_CURRENT_LANE2(DRIVE_CURRENT_7_125_mA) | 164 DRIVE_CURRENT_LANE2(DRIVE_CURRENT_7_125_mA) |
165 DRIVE_CURRENT_LANE3(DRIVE_CURRENT_7_125_mA), 165 DRIVE_CURRENT_LANE3(DRIVE_CURRENT_7_125_mA),
166 }, { /* 720p modes */ 166 },
167 .pclk = 74250000, 167 { /* high pixel clock modes */
168 .pll0 = SOR_PLL_BG_V17_S(3) | SOR_PLL_ICHPMP(1) |
169 SOR_PLL_RESISTORSEL | SOR_PLL_VCOCAP(1) |
170 SOR_PLL_TX_REG_LOAD(3),
171 .pll1 = SOR_PLL_TMDS_TERM_ENABLE | SOR_PLL_PE_EN,
172 .pe_current = PE_CURRENT0(PE_CURRENT_6_0_mA) |
173 PE_CURRENT1(PE_CURRENT_6_0_mA) |
174 PE_CURRENT2(PE_CURRENT_6_0_mA) |
175 PE_CURRENT3(PE_CURRENT_6_0_mA),
176 .drive_current = DRIVE_CURRENT_LANE0(DRIVE_CURRENT_7_125_mA) |
177 DRIVE_CURRENT_LANE1(DRIVE_CURRENT_7_125_mA) |
178 DRIVE_CURRENT_LANE2(DRIVE_CURRENT_7_125_mA) |
179 DRIVE_CURRENT_LANE3(DRIVE_CURRENT_7_125_mA),
180 }, { /* 1080p modes */
181 .pclk = UINT_MAX, 168 .pclk = UINT_MAX,
182 .pll0 = SOR_PLL_BG_V17_S(3) | SOR_PLL_ICHPMP(1) | 169 .pll0 = SOR_PLL_BG_V17_S(3) | SOR_PLL_ICHPMP(1) |
183 SOR_PLL_RESISTORSEL | SOR_PLL_VCOCAP(1) | 170 SOR_PLL_RESISTORSEL | SOR_PLL_VCOCAP(1) |
@@ -479,7 +466,7 @@ static void tegra_hdmi_setup_avi_infoframe(struct tegra_hdmi *hdmi,
479 return; 466 return;
480 } 467 }
481 468
482 h_front_porch = mode->htotal - mode->hsync_end; 469 h_front_porch = mode->hsync_start - mode->hdisplay;
483 memset(&frame, 0, sizeof(frame)); 470 memset(&frame, 0, sizeof(frame));
484 frame.r = HDMI_AVI_R_SAME; 471 frame.r = HDMI_AVI_R_SAME;
485 472
@@ -634,8 +621,8 @@ static int tegra_output_hdmi_enable(struct tegra_output *output)
634 621
635 pclk = mode->clock * 1000; 622 pclk = mode->clock * 1000;
636 h_sync_width = mode->hsync_end - mode->hsync_start; 623 h_sync_width = mode->hsync_end - mode->hsync_start;
637 h_front_porch = mode->htotal - mode->hsync_end; 624 h_back_porch = mode->htotal - mode->hsync_end;
638 h_back_porch = mode->hsync_start - mode->hdisplay; 625 h_front_porch = mode->hsync_start - mode->hdisplay;
639 626
640 err = regulator_enable(hdmi->vdd); 627 err = regulator_enable(hdmi->vdd);
641 if (err < 0) { 628 if (err < 0) {
diff --git a/drivers/gpu/drm/tegra/host1x.c b/drivers/gpu/drm/tegra/host1x.c
index bdb97a564d82..5d17b113a6fc 100644
--- a/drivers/gpu/drm/tegra/host1x.c
+++ b/drivers/gpu/drm/tegra/host1x.c
@@ -239,6 +239,8 @@ int host1x_register_client(struct host1x *host1x, struct host1x_client *client)
239 } 239 }
240 } 240 }
241 241
242 client->host1x = host1x;
243
242 return 0; 244 return 0;
243} 245}
244 246
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 9e9c5d2a5c74..d73d6e3e17b2 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -654,11 +654,13 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
654 */ 654 */
655 655
656 set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); 656 set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags);
657
658 /* ttm_buffer_object_transfer accesses bo->sync_obj */
659 ret = ttm_buffer_object_transfer(bo, &ghost_obj);
657 spin_unlock(&bdev->fence_lock); 660 spin_unlock(&bdev->fence_lock);
658 if (tmp_obj) 661 if (tmp_obj)
659 driver->sync_obj_unref(&tmp_obj); 662 driver->sync_obj_unref(&tmp_obj);
660 663
661 ret = ttm_buffer_object_transfer(bo, &ghost_obj);
662 if (ret) 664 if (ret)
663 return ret; 665 return ret;
664 666
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 9ef222442ca0..12e4fdc810bf 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -731,7 +731,7 @@ static struct hid_ll_driver i2c_hid_ll_driver = {
731 .hidinput_input_event = i2c_hid_hidinput_input_event, 731 .hidinput_input_event = i2c_hid_hidinput_input_event,
732}; 732};
733 733
734static int __devinit i2c_hid_init_irq(struct i2c_client *client) 734static int i2c_hid_init_irq(struct i2c_client *client)
735{ 735{
736 struct i2c_hid *ihid = i2c_get_clientdata(client); 736 struct i2c_hid *ihid = i2c_get_clientdata(client);
737 int ret; 737 int ret;
@@ -753,7 +753,7 @@ static int __devinit i2c_hid_init_irq(struct i2c_client *client)
753 return 0; 753 return 0;
754} 754}
755 755
756static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) 756static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
757{ 757{
758 struct i2c_client *client = ihid->client; 758 struct i2c_client *client = ihid->client;
759 struct i2c_hid_desc *hdesc = &ihid->hdesc; 759 struct i2c_hid_desc *hdesc = &ihid->hdesc;
@@ -810,8 +810,8 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
810 return 0; 810 return 0;
811} 811}
812 812
813static int __devinit i2c_hid_probe(struct i2c_client *client, 813static int i2c_hid_probe(struct i2c_client *client,
814 const struct i2c_device_id *dev_id) 814 const struct i2c_device_id *dev_id)
815{ 815{
816 int ret; 816 int ret;
817 struct i2c_hid *ihid; 817 struct i2c_hid *ihid;
@@ -902,7 +902,7 @@ err:
902 return ret; 902 return ret;
903} 903}
904 904
905static int __devexit i2c_hid_remove(struct i2c_client *client) 905static int i2c_hid_remove(struct i2c_client *client)
906{ 906{
907 struct i2c_hid *ihid = i2c_get_clientdata(client); 907 struct i2c_hid *ihid = i2c_get_clientdata(client);
908 struct hid_device *hid; 908 struct hid_device *hid;
@@ -967,7 +967,7 @@ static struct i2c_driver i2c_hid_driver = {
967 }, 967 },
968 968
969 .probe = i2c_hid_probe, 969 .probe = i2c_hid_probe,
970 .remove = __devexit_p(i2c_hid_remove), 970 .remove = i2c_hid_remove,
971 971
972 .id_table = i2c_hid_id_table, 972 .id_table = i2c_hid_id_table,
973}; 973};
diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c
index 3ad91f6447d8..e61e5f991aa5 100644
--- a/drivers/hsi/clients/hsi_char.c
+++ b/drivers/hsi/clients/hsi_char.c
@@ -675,7 +675,7 @@ static const struct file_operations hsc_fops = {
675 .release = hsc_release, 675 .release = hsc_release,
676}; 676};
677 677
678static void __devinit hsc_channel_init(struct hsc_channel *channel) 678static void hsc_channel_init(struct hsc_channel *channel)
679{ 679{
680 init_waitqueue_head(&channel->rx_wait); 680 init_waitqueue_head(&channel->rx_wait);
681 init_waitqueue_head(&channel->tx_wait); 681 init_waitqueue_head(&channel->tx_wait);
@@ -685,7 +685,7 @@ static void __devinit hsc_channel_init(struct hsc_channel *channel)
685 INIT_LIST_HEAD(&channel->tx_msgs_queue); 685 INIT_LIST_HEAD(&channel->tx_msgs_queue);
686} 686}
687 687
688static int __devinit hsc_probe(struct device *dev) 688static int hsc_probe(struct device *dev)
689{ 689{
690 const char devname[] = "hsi_char"; 690 const char devname[] = "hsi_char";
691 struct hsc_client_data *cl_data; 691 struct hsc_client_data *cl_data;
@@ -744,7 +744,7 @@ out1:
744 return ret; 744 return ret;
745} 745}
746 746
747static int __devexit hsc_remove(struct device *dev) 747static int hsc_remove(struct device *dev)
748{ 748{
749 struct hsi_client *cl = to_hsi_client(dev); 749 struct hsi_client *cl = to_hsi_client(dev);
750 struct hsc_client_data *cl_data = hsi_client_drvdata(cl); 750 struct hsc_client_data *cl_data = hsi_client_drvdata(cl);
@@ -763,7 +763,7 @@ static struct hsi_client_driver hsc_driver = {
763 .name = "hsi_char", 763 .name = "hsi_char",
764 .owner = THIS_MODULE, 764 .owner = THIS_MODULE,
765 .probe = hsc_probe, 765 .probe = hsc_probe,
766 .remove = __devexit_p(hsc_remove), 766 .remove = hsc_remove,
767 }, 767 },
768}; 768};
769 769
diff --git a/drivers/hwmon/emc6w201.c b/drivers/hwmon/emc6w201.c
index a98c917b5888..789bd4fb329b 100644
--- a/drivers/hwmon/emc6w201.c
+++ b/drivers/hwmon/emc6w201.c
@@ -187,7 +187,7 @@ static struct emc6w201_data *emc6w201_update_device(struct device *dev)
187 * Sysfs callback functions 187 * Sysfs callback functions
188 */ 188 */
189 189
190static const u16 nominal_mv[6] = { 2500, 1500, 3300, 5000, 1500, 1500 }; 190static const s16 nominal_mv[6] = { 2500, 1500, 3300, 5000, 1500, 1500 };
191 191
192static ssize_t show_in(struct device *dev, struct device_attribute *devattr, 192static ssize_t show_in(struct device *dev, struct device_attribute *devattr,
193 char *buf) 193 char *buf)
diff --git a/drivers/hwmon/lm73.c b/drivers/hwmon/lm73.c
index 8fa2632cbbaf..7272176a9ec7 100644
--- a/drivers/hwmon/lm73.c
+++ b/drivers/hwmon/lm73.c
@@ -49,6 +49,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da,
49 struct i2c_client *client = to_i2c_client(dev); 49 struct i2c_client *client = to_i2c_client(dev);
50 long temp; 50 long temp;
51 short value; 51 short value;
52 s32 err;
52 53
53 int status = kstrtol(buf, 10, &temp); 54 int status = kstrtol(buf, 10, &temp);
54 if (status < 0) 55 if (status < 0)
@@ -57,8 +58,8 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da,
57 /* Write value */ 58 /* Write value */
58 value = (short) SENSORS_LIMIT(temp/250, (LM73_TEMP_MIN*4), 59 value = (short) SENSORS_LIMIT(temp/250, (LM73_TEMP_MIN*4),
59 (LM73_TEMP_MAX*4)) << 5; 60 (LM73_TEMP_MAX*4)) << 5;
60 i2c_smbus_write_word_swapped(client, attr->index, value); 61 err = i2c_smbus_write_word_swapped(client, attr->index, value);
61 return count; 62 return (err < 0) ? err : count;
62} 63}
63 64
64static ssize_t show_temp(struct device *dev, struct device_attribute *da, 65static ssize_t show_temp(struct device *dev, struct device_attribute *da,
@@ -66,11 +67,16 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *da,
66{ 67{
67 struct sensor_device_attribute *attr = to_sensor_dev_attr(da); 68 struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
68 struct i2c_client *client = to_i2c_client(dev); 69 struct i2c_client *client = to_i2c_client(dev);
70 int temp;
71
72 s32 err = i2c_smbus_read_word_swapped(client, attr->index);
73 if (err < 0)
74 return err;
75
69 /* use integer division instead of equivalent right shift to 76 /* use integer division instead of equivalent right shift to
70 guarantee arithmetic shift and preserve the sign */ 77 guarantee arithmetic shift and preserve the sign */
71 int temp = ((s16) (i2c_smbus_read_word_swapped(client, 78 temp = (((s16) err) * 250) / 32;
72 attr->index))*250) / 32; 79 return scnprintf(buf, PAGE_SIZE, "%d\n", temp);
73 return sprintf(buf, "%d\n", temp);
74} 80}
75 81
76 82
diff --git a/drivers/hwmon/vexpress.c b/drivers/hwmon/vexpress.c
index 59fd1268e58a..86d7f6d858b1 100644
--- a/drivers/hwmon/vexpress.c
+++ b/drivers/hwmon/vexpress.c
@@ -196,7 +196,7 @@ error:
196 return err; 196 return err;
197} 197}
198 198
199static int __devexit vexpress_hwmon_remove(struct platform_device *pdev) 199static int vexpress_hwmon_remove(struct platform_device *pdev)
200{ 200{
201 struct vexpress_hwmon_data *data = platform_get_drvdata(pdev); 201 struct vexpress_hwmon_data *data = platform_get_drvdata(pdev);
202 const struct of_device_id *match; 202 const struct of_device_id *match;
@@ -213,7 +213,7 @@ static int __devexit vexpress_hwmon_remove(struct platform_device *pdev)
213 213
214static struct platform_driver vexpress_hwmon_driver = { 214static struct platform_driver vexpress_hwmon_driver = {
215 .probe = vexpress_hwmon_probe, 215 .probe = vexpress_hwmon_probe,
216 .remove = __devexit_p(vexpress_hwmon_remove), 216 .remove = vexpress_hwmon_remove,
217 .driver = { 217 .driver = {
218 .name = DRVNAME, 218 .name = DRVNAME,
219 .owner = THIS_MODULE, 219 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
index 125cd8e0ad25..3f491815e2c4 100644
--- a/drivers/i2c/busses/i2c-ali1535.c
+++ b/drivers/i2c/busses/i2c-ali1535.c
@@ -139,7 +139,7 @@ static unsigned short ali1535_offset;
139 Note the differences between kernels with the old PCI BIOS interface and 139 Note the differences between kernels with the old PCI BIOS interface and
140 newer kernels with the real PCI interface. In compat.h some things are 140 newer kernels with the real PCI interface. In compat.h some things are
141 defined to make the transition easier. */ 141 defined to make the transition easier. */
142static int __devinit ali1535_setup(struct pci_dev *dev) 142static int ali1535_setup(struct pci_dev *dev)
143{ 143{
144 int retval; 144 int retval;
145 unsigned char temp; 145 unsigned char temp;
@@ -502,7 +502,7 @@ static DEFINE_PCI_DEVICE_TABLE(ali1535_ids) = {
502 502
503MODULE_DEVICE_TABLE(pci, ali1535_ids); 503MODULE_DEVICE_TABLE(pci, ali1535_ids);
504 504
505static int __devinit ali1535_probe(struct pci_dev *dev, const struct pci_device_id *id) 505static int ali1535_probe(struct pci_dev *dev, const struct pci_device_id *id)
506{ 506{
507 if (ali1535_setup(dev)) { 507 if (ali1535_setup(dev)) {
508 dev_warn(&dev->dev, 508 dev_warn(&dev->dev,
@@ -518,7 +518,7 @@ static int __devinit ali1535_probe(struct pci_dev *dev, const struct pci_device_
518 return i2c_add_adapter(&ali1535_adapter); 518 return i2c_add_adapter(&ali1535_adapter);
519} 519}
520 520
521static void __devexit ali1535_remove(struct pci_dev *dev) 521static void ali1535_remove(struct pci_dev *dev)
522{ 522{
523 i2c_del_adapter(&ali1535_adapter); 523 i2c_del_adapter(&ali1535_adapter);
524 release_region(ali1535_smba, ALI1535_SMB_IOSIZE); 524 release_region(ali1535_smba, ALI1535_SMB_IOSIZE);
@@ -528,7 +528,7 @@ static struct pci_driver ali1535_driver = {
528 .name = "ali1535_smbus", 528 .name = "ali1535_smbus",
529 .id_table = ali1535_ids, 529 .id_table = ali1535_ids,
530 .probe = ali1535_probe, 530 .probe = ali1535_probe,
531 .remove = __devexit_p(ali1535_remove), 531 .remove = ali1535_remove,
532}; 532};
533 533
534module_pci_driver(ali1535_driver); 534module_pci_driver(ali1535_driver);
diff --git a/drivers/i2c/busses/i2c-ali1563.c b/drivers/i2c/busses/i2c-ali1563.c
index e02d9f86c6a0..84ccd9496a5e 100644
--- a/drivers/i2c/busses/i2c-ali1563.c
+++ b/drivers/i2c/busses/i2c-ali1563.c
@@ -326,7 +326,7 @@ static u32 ali1563_func(struct i2c_adapter * a)
326} 326}
327 327
328 328
329static int __devinit ali1563_setup(struct pci_dev * dev) 329static int ali1563_setup(struct pci_dev *dev)
330{ 330{
331 u16 ctrl; 331 u16 ctrl;
332 332
@@ -390,8 +390,8 @@ static struct i2c_adapter ali1563_adapter = {
390 .algo = &ali1563_algorithm, 390 .algo = &ali1563_algorithm,
391}; 391};
392 392
393static int __devinit ali1563_probe(struct pci_dev * dev, 393static int ali1563_probe(struct pci_dev *dev,
394 const struct pci_device_id * id_table) 394 const struct pci_device_id *id_table)
395{ 395{
396 int error; 396 int error;
397 397
@@ -411,7 +411,7 @@ exit:
411 return error; 411 return error;
412} 412}
413 413
414static void __devexit ali1563_remove(struct pci_dev * dev) 414static void ali1563_remove(struct pci_dev *dev)
415{ 415{
416 i2c_del_adapter(&ali1563_adapter); 416 i2c_del_adapter(&ali1563_adapter);
417 ali1563_shutdown(dev); 417 ali1563_shutdown(dev);
@@ -428,7 +428,7 @@ static struct pci_driver ali1563_pci_driver = {
428 .name = "ali1563_smbus", 428 .name = "ali1563_smbus",
429 .id_table = ali1563_id_table, 429 .id_table = ali1563_id_table,
430 .probe = ali1563_probe, 430 .probe = ali1563_probe,
431 .remove = __devexit_p(ali1563_remove), 431 .remove = ali1563_remove,
432}; 432};
433 433
434module_pci_driver(ali1563_pci_driver); 434module_pci_driver(ali1563_pci_driver);
diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
index ce8d26d053a5..26bcc6127cee 100644
--- a/drivers/i2c/busses/i2c-ali15x3.c
+++ b/drivers/i2c/busses/i2c-ali15x3.c
@@ -131,7 +131,7 @@ MODULE_PARM_DESC(force_addr,
131static struct pci_driver ali15x3_driver; 131static struct pci_driver ali15x3_driver;
132static unsigned short ali15x3_smba; 132static unsigned short ali15x3_smba;
133 133
134static int __devinit ali15x3_setup(struct pci_dev *ALI15X3_dev) 134static int ali15x3_setup(struct pci_dev *ALI15X3_dev)
135{ 135{
136 u16 a; 136 u16 a;
137 unsigned char temp; 137 unsigned char temp;
@@ -484,7 +484,7 @@ static DEFINE_PCI_DEVICE_TABLE(ali15x3_ids) = {
484 484
485MODULE_DEVICE_TABLE (pci, ali15x3_ids); 485MODULE_DEVICE_TABLE (pci, ali15x3_ids);
486 486
487static int __devinit ali15x3_probe(struct pci_dev *dev, const struct pci_device_id *id) 487static int ali15x3_probe(struct pci_dev *dev, const struct pci_device_id *id)
488{ 488{
489 if (ali15x3_setup(dev)) { 489 if (ali15x3_setup(dev)) {
490 dev_err(&dev->dev, 490 dev_err(&dev->dev,
@@ -500,7 +500,7 @@ static int __devinit ali15x3_probe(struct pci_dev *dev, const struct pci_device_
500 return i2c_add_adapter(&ali15x3_adapter); 500 return i2c_add_adapter(&ali15x3_adapter);
501} 501}
502 502
503static void __devexit ali15x3_remove(struct pci_dev *dev) 503static void ali15x3_remove(struct pci_dev *dev)
504{ 504{
505 i2c_del_adapter(&ali15x3_adapter); 505 i2c_del_adapter(&ali15x3_adapter);
506 release_region(ali15x3_smba, ALI15X3_SMB_IOSIZE); 506 release_region(ali15x3_smba, ALI15X3_SMB_IOSIZE);
@@ -510,7 +510,7 @@ static struct pci_driver ali15x3_driver = {
510 .name = "ali15x3_smbus", 510 .name = "ali15x3_smbus",
511 .id_table = ali15x3_ids, 511 .id_table = ali15x3_ids,
512 .probe = ali15x3_probe, 512 .probe = ali15x3_probe,
513 .remove = __devexit_p(ali15x3_remove), 513 .remove = ali15x3_remove,
514}; 514};
515 515
516module_pci_driver(ali15x3_driver); 516module_pci_driver(ali15x3_driver);
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
index 304aa03b57b2..e13e2aa2d05d 100644
--- a/drivers/i2c/busses/i2c-amd756.c
+++ b/drivers/i2c/busses/i2c-amd756.c
@@ -324,8 +324,7 @@ static DEFINE_PCI_DEVICE_TABLE(amd756_ids) = {
324 324
325MODULE_DEVICE_TABLE (pci, amd756_ids); 325MODULE_DEVICE_TABLE (pci, amd756_ids);
326 326
327static int __devinit amd756_probe(struct pci_dev *pdev, 327static int amd756_probe(struct pci_dev *pdev, const struct pci_device_id *id)
328 const struct pci_device_id *id)
329{ 328{
330 int nforce = (id->driver_data == NFORCE); 329 int nforce = (id->driver_data == NFORCE);
331 int error; 330 int error;
@@ -397,7 +396,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
397 return error; 396 return error;
398} 397}
399 398
400static void __devexit amd756_remove(struct pci_dev *dev) 399static void amd756_remove(struct pci_dev *dev)
401{ 400{
402 i2c_del_adapter(&amd756_smbus); 401 i2c_del_adapter(&amd756_smbus);
403 release_region(amd756_ioport, SMB_IOSIZE); 402 release_region(amd756_ioport, SMB_IOSIZE);
@@ -407,7 +406,7 @@ static struct pci_driver amd756_driver = {
407 .name = "amd756_smbus", 406 .name = "amd756_smbus",
408 .id_table = amd756_ids, 407 .id_table = amd756_ids,
409 .probe = amd756_probe, 408 .probe = amd756_probe,
410 .remove = __devexit_p(amd756_remove), 409 .remove = amd756_remove,
411}; 410};
412 411
413module_pci_driver(amd756_driver); 412module_pci_driver(amd756_driver);
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
index 0919ac1d99aa..a44e6e77c5a1 100644
--- a/drivers/i2c/busses/i2c-amd8111.c
+++ b/drivers/i2c/busses/i2c-amd8111.c
@@ -422,8 +422,7 @@ static DEFINE_PCI_DEVICE_TABLE(amd8111_ids) = {
422 422
423MODULE_DEVICE_TABLE (pci, amd8111_ids); 423MODULE_DEVICE_TABLE (pci, amd8111_ids);
424 424
425static int __devinit amd8111_probe(struct pci_dev *dev, 425static int amd8111_probe(struct pci_dev *dev, const struct pci_device_id *id)
426 const struct pci_device_id *id)
427{ 426{
428 struct amd_smbus *smbus; 427 struct amd_smbus *smbus;
429 int error; 428 int error;
@@ -475,7 +474,7 @@ static int __devinit amd8111_probe(struct pci_dev *dev,
475 return error; 474 return error;
476} 475}
477 476
478static void __devexit amd8111_remove(struct pci_dev *dev) 477static void amd8111_remove(struct pci_dev *dev)
479{ 478{
480 struct amd_smbus *smbus = pci_get_drvdata(dev); 479 struct amd_smbus *smbus = pci_get_drvdata(dev);
481 480
@@ -488,7 +487,7 @@ static struct pci_driver amd8111_driver = {
488 .name = "amd8111_smbus2", 487 .name = "amd8111_smbus2",
489 .id_table = amd8111_ids, 488 .id_table = amd8111_ids,
490 .probe = amd8111_probe, 489 .probe = amd8111_probe,
491 .remove = __devexit_p(amd8111_remove), 490 .remove = amd8111_remove,
492}; 491};
493 492
494module_pci_driver(amd8111_driver); 493module_pci_driver(amd8111_driver);
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index b4575ee4bdf3..2bfc04d0a1b1 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -145,7 +145,7 @@ static void at91_init_twi_bus(struct at91_twi_dev *dev)
145 * Calculate symmetric clock as stated in datasheet: 145 * Calculate symmetric clock as stated in datasheet:
146 * twi_clk = F_MAIN / (2 * (cdiv * (1 << ckdiv) + offset)) 146 * twi_clk = F_MAIN / (2 * (cdiv * (1 << ckdiv) + offset))
147 */ 147 */
148static void __devinit at91_calc_twi_clock(struct at91_twi_dev *dev, int twi_clk) 148static void at91_calc_twi_clock(struct at91_twi_dev *dev, int twi_clk)
149{ 149{
150 int ckdiv, cdiv, div; 150 int ckdiv, cdiv, div;
151 struct at91_twi_pdata *pdata = dev->pdata; 151 struct at91_twi_pdata *pdata = dev->pdata;
@@ -604,7 +604,7 @@ MODULE_DEVICE_TABLE(of, atmel_twi_dt_ids);
604#define atmel_twi_dt_ids NULL 604#define atmel_twi_dt_ids NULL
605#endif 605#endif
606 606
607static bool __devinit filter(struct dma_chan *chan, void *slave) 607static bool filter(struct dma_chan *chan, void *slave)
608{ 608{
609 struct at_dma_slave *sl = slave; 609 struct at_dma_slave *sl = slave;
610 610
@@ -616,7 +616,7 @@ static bool __devinit filter(struct dma_chan *chan, void *slave)
616 } 616 }
617} 617}
618 618
619static int __devinit at91_twi_configure_dma(struct at91_twi_dev *dev, u32 phy_addr) 619static int at91_twi_configure_dma(struct at91_twi_dev *dev, u32 phy_addr)
620{ 620{
621 int ret = 0; 621 int ret = 0;
622 struct at_dma_slave *sdata; 622 struct at_dma_slave *sdata;
@@ -688,7 +688,7 @@ error:
688 return ret; 688 return ret;
689} 689}
690 690
691static struct at91_twi_pdata * __devinit at91_twi_get_driver_data( 691static struct at91_twi_pdata *at91_twi_get_driver_data(
692 struct platform_device *pdev) 692 struct platform_device *pdev)
693{ 693{
694 if (pdev->dev.of_node) { 694 if (pdev->dev.of_node) {
@@ -701,7 +701,7 @@ static struct at91_twi_pdata * __devinit at91_twi_get_driver_data(
701 return (struct at91_twi_pdata *) platform_get_device_id(pdev)->driver_data; 701 return (struct at91_twi_pdata *) platform_get_device_id(pdev)->driver_data;
702} 702}
703 703
704static int __devinit at91_twi_probe(struct platform_device *pdev) 704static int at91_twi_probe(struct platform_device *pdev)
705{ 705{
706 struct at91_twi_dev *dev; 706 struct at91_twi_dev *dev;
707 struct resource *mem; 707 struct resource *mem;
@@ -779,7 +779,7 @@ static int __devinit at91_twi_probe(struct platform_device *pdev)
779 return 0; 779 return 0;
780} 780}
781 781
782static int __devexit at91_twi_remove(struct platform_device *pdev) 782static int at91_twi_remove(struct platform_device *pdev)
783{ 783{
784 struct at91_twi_dev *dev = platform_get_drvdata(pdev); 784 struct at91_twi_dev *dev = platform_get_drvdata(pdev);
785 int rc; 785 int rc;
@@ -820,7 +820,7 @@ static const struct dev_pm_ops at91_twi_pm = {
820 820
821static struct platform_driver at91_twi_driver = { 821static struct platform_driver at91_twi_driver = {
822 .probe = at91_twi_probe, 822 .probe = at91_twi_probe,
823 .remove = __devexit_p(at91_twi_remove), 823 .remove = at91_twi_remove,
824 .id_table = at91_twi_devtypes, 824 .id_table = at91_twi_devtypes,
825 .driver = { 825 .driver = {
826 .name = "at91_i2c", 826 .name = "at91_i2c",
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index 582d616db346..b278298787d7 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -313,7 +313,7 @@ static void i2c_au1550_disable(struct i2c_au1550_data *priv)
313 * Prior to calling us, the 50MHz clock frequency and routing 313 * Prior to calling us, the 50MHz clock frequency and routing
314 * must have been set up for the PSC indicated by the adapter. 314 * must have been set up for the PSC indicated by the adapter.
315 */ 315 */
316static int __devinit 316static int
317i2c_au1550_probe(struct platform_device *pdev) 317i2c_au1550_probe(struct platform_device *pdev)
318{ 318{
319 struct i2c_au1550_data *priv; 319 struct i2c_au1550_data *priv;
@@ -372,7 +372,7 @@ out:
372 return ret; 372 return ret;
373} 373}
374 374
375static int __devexit i2c_au1550_remove(struct platform_device *pdev) 375static int i2c_au1550_remove(struct platform_device *pdev)
376{ 376{
377 struct i2c_au1550_data *priv = platform_get_drvdata(pdev); 377 struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
378 378
@@ -423,7 +423,7 @@ static struct platform_driver au1xpsc_smbus_driver = {
423 .pm = AU1XPSC_SMBUS_PMOPS, 423 .pm = AU1XPSC_SMBUS_PMOPS,
424 }, 424 },
425 .probe = i2c_au1550_probe, 425 .probe = i2c_au1550_probe,
426 .remove = __devexit_p(i2c_au1550_remove), 426 .remove = i2c_au1550_remove,
427}; 427};
428 428
429module_platform_driver(au1xpsc_smbus_driver); 429module_platform_driver(au1xpsc_smbus_driver);
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index c1e1096ba069..2e79c1024191 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -426,7 +426,7 @@ static const struct i2c_adapter cpm_ops = {
426 .algo = &cpm_i2c_algo, 426 .algo = &cpm_i2c_algo,
427}; 427};
428 428
429static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) 429static int cpm_i2c_setup(struct cpm_i2c *cpm)
430{ 430{
431 struct platform_device *ofdev = cpm->ofdev; 431 struct platform_device *ofdev = cpm->ofdev;
432 const u32 *data; 432 const u32 *data;
@@ -634,7 +634,7 @@ static void cpm_i2c_shutdown(struct cpm_i2c *cpm)
634 cpm_muram_free(cpm->i2c_addr); 634 cpm_muram_free(cpm->i2c_addr);
635} 635}
636 636
637static int __devinit cpm_i2c_probe(struct platform_device *ofdev) 637static int cpm_i2c_probe(struct platform_device *ofdev)
638{ 638{
639 int result, len; 639 int result, len;
640 struct cpm_i2c *cpm; 640 struct cpm_i2c *cpm;
@@ -688,7 +688,7 @@ out_free:
688 return result; 688 return result;
689} 689}
690 690
691static int __devexit cpm_i2c_remove(struct platform_device *ofdev) 691static int cpm_i2c_remove(struct platform_device *ofdev)
692{ 692{
693 struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev); 693 struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev);
694 694
@@ -716,7 +716,7 @@ MODULE_DEVICE_TABLE(of, cpm_i2c_match);
716 716
717static struct platform_driver cpm_i2c_driver = { 717static struct platform_driver cpm_i2c_driver = {
718 .probe = cpm_i2c_probe, 718 .probe = cpm_i2c_probe,
719 .remove = __devexit_p(cpm_i2c_remove), 719 .remove = cpm_i2c_remove,
720 .driver = { 720 .driver = {
721 .name = "fsl-i2c-cpm", 721 .name = "fsl-i2c-cpm",
722 .owner = THIS_MODULE, 722 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 92a1e2c15baa..6add851e9dee 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -207,7 +207,7 @@ static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev)
207 return dev->controller->clk_khz; 207 return dev->controller->clk_khz;
208} 208}
209 209
210static int __devinit i2c_dw_pci_probe(struct pci_dev *pdev, 210static int i2c_dw_pci_probe(struct pci_dev *pdev,
211const struct pci_device_id *id) 211const struct pci_device_id *id)
212{ 212{
213 struct dw_i2c_dev *dev; 213 struct dw_i2c_dev *dev;
@@ -328,7 +328,7 @@ exit:
328 return r; 328 return r;
329} 329}
330 330
331static void __devexit i2c_dw_pci_remove(struct pci_dev *pdev) 331static void i2c_dw_pci_remove(struct pci_dev *pdev)
332{ 332{
333 struct dw_i2c_dev *dev = pci_get_drvdata(pdev); 333 struct dw_i2c_dev *dev = pci_get_drvdata(pdev);
334 334
@@ -368,7 +368,7 @@ static struct pci_driver dw_i2c_driver = {
368 .name = DRIVER_NAME, 368 .name = DRIVER_NAME,
369 .id_table = i2_designware_pci_ids, 369 .id_table = i2_designware_pci_ids,
370 .probe = i2c_dw_pci_probe, 370 .probe = i2c_dw_pci_probe,
371 .remove = __devexit_p(i2c_dw_pci_remove), 371 .remove = i2c_dw_pci_remove,
372 .driver = { 372 .driver = {
373 .pm = &i2c_dw_pm_ops, 373 .pm = &i2c_dw_pm_ops,
374 }, 374 },
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 0506fef8dc00..343357a2b5b4 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -50,7 +50,7 @@ static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev)
50 return clk_get_rate(dev->clk)/1000; 50 return clk_get_rate(dev->clk)/1000;
51} 51}
52 52
53static int __devinit dw_i2c_probe(struct platform_device *pdev) 53static int dw_i2c_probe(struct platform_device *pdev)
54{ 54{
55 struct dw_i2c_dev *dev; 55 struct dw_i2c_dev *dev;
56 struct i2c_adapter *adap; 56 struct i2c_adapter *adap;
@@ -169,7 +169,7 @@ err_release_region:
169 return r; 169 return r;
170} 170}
171 171
172static int __devexit dw_i2c_remove(struct platform_device *pdev) 172static int dw_i2c_remove(struct platform_device *pdev)
173{ 173{
174 struct dw_i2c_dev *dev = platform_get_drvdata(pdev); 174 struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
175 struct resource *mem; 175 struct resource *mem;
@@ -228,7 +228,7 @@ static SIMPLE_DEV_PM_OPS(dw_i2c_dev_pm_ops, dw_i2c_suspend, dw_i2c_resume);
228MODULE_ALIAS("platform:i2c_designware"); 228MODULE_ALIAS("platform:i2c_designware");
229 229
230static struct platform_driver dw_i2c_driver = { 230static struct platform_driver dw_i2c_driver = {
231 .remove = __devexit_p(dw_i2c_remove), 231 .remove = dw_i2c_remove,
232 .driver = { 232 .driver = {
233 .name = "i2c_designware", 233 .name = "i2c_designware",
234 .owner = THIS_MODULE, 234 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index 259f7697bf25..5e7886e7136e 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -758,7 +758,7 @@ static void pch_i2c_disbl_int(struct i2c_algo_pch_data *adap)
758 iowrite32(BUFFER_MODE_INTR_DISBL, p + PCH_I2CBUFMSK); 758 iowrite32(BUFFER_MODE_INTR_DISBL, p + PCH_I2CBUFMSK);
759} 759}
760 760
761static int __devinit pch_i2c_probe(struct pci_dev *pdev, 761static int pch_i2c_probe(struct pci_dev *pdev,
762 const struct pci_device_id *id) 762 const struct pci_device_id *id)
763{ 763{
764 void __iomem *base_addr; 764 void __iomem *base_addr;
@@ -851,7 +851,7 @@ err_pci_enable:
851 return ret; 851 return ret;
852} 852}
853 853
854static void __devexit pch_i2c_remove(struct pci_dev *pdev) 854static void pch_i2c_remove(struct pci_dev *pdev)
855{ 855{
856 int i; 856 int i;
857 struct adapter_info *adap_info = pci_get_drvdata(pdev); 857 struct adapter_info *adap_info = pci_get_drvdata(pdev);
@@ -948,7 +948,7 @@ static struct pci_driver pch_pcidriver = {
948 .name = KBUILD_MODNAME, 948 .name = KBUILD_MODNAME,
949 .id_table = pch_pcidev_id, 949 .id_table = pch_pcidev_id,
950 .probe = pch_i2c_probe, 950 .probe = pch_i2c_probe,
951 .remove = __devexit_p(pch_i2c_remove), 951 .remove = pch_i2c_remove,
952 .suspend = pch_i2c_suspend, 952 .suspend = pch_i2c_suspend,
953 .resume = pch_i2c_resume 953 .resume = pch_i2c_resume
954}; 954};
diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c
index 37e2e82a9c88..485497066ed7 100644
--- a/drivers/i2c/busses/i2c-elektor.c
+++ b/drivers/i2c/busses/i2c-elektor.c
@@ -205,7 +205,7 @@ static struct i2c_adapter pcf_isa_ops = {
205 .name = "i2c-elektor", 205 .name = "i2c-elektor",
206}; 206};
207 207
208static int __devinit elektor_match(struct device *dev, unsigned int id) 208static int elektor_match(struct device *dev, unsigned int id)
209{ 209{
210#ifdef __alpha__ 210#ifdef __alpha__
211 /* check to see we have memory mapped PCF8584 connected to the 211 /* check to see we have memory mapped PCF8584 connected to the
@@ -264,7 +264,7 @@ static int __devinit elektor_match(struct device *dev, unsigned int id)
264 return 1; 264 return 1;
265} 265}
266 266
267static int __devinit elektor_probe(struct device *dev, unsigned int id) 267static int elektor_probe(struct device *dev, unsigned int id)
268{ 268{
269 init_waitqueue_head(&pcf_wait); 269 init_waitqueue_head(&pcf_wait);
270 if (pcf_isa_init()) 270 if (pcf_isa_init())
@@ -293,7 +293,7 @@ static int __devinit elektor_probe(struct device *dev, unsigned int id)
293 return -ENODEV; 293 return -ENODEV;
294} 294}
295 295
296static int __devexit elektor_remove(struct device *dev, unsigned int id) 296static int elektor_remove(struct device *dev, unsigned int id)
297{ 297{
298 i2c_del_adapter(&pcf_isa_ops); 298 i2c_del_adapter(&pcf_isa_ops);
299 299
@@ -316,7 +316,7 @@ static int __devexit elektor_remove(struct device *dev, unsigned int id)
316static struct isa_driver i2c_elektor_driver = { 316static struct isa_driver i2c_elektor_driver = {
317 .match = elektor_match, 317 .match = elektor_match,
318 .probe = elektor_probe, 318 .probe = elektor_probe,
319 .remove = __devexit_p(elektor_remove), 319 .remove = elektor_remove,
320 .driver = { 320 .driver = {
321 .owner = THIS_MODULE, 321 .owner = THIS_MODULE,
322 .name = "i2c-elektor", 322 .name = "i2c-elektor",
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 257299a92df3..f3fa4332bbdf 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -85,7 +85,7 @@ static int i2c_gpio_getscl(void *data)
85 return gpio_get_value(pdata->scl_pin); 85 return gpio_get_value(pdata->scl_pin);
86} 86}
87 87
88static int __devinit of_i2c_gpio_probe(struct device_node *np, 88static int of_i2c_gpio_probe(struct device_node *np,
89 struct i2c_gpio_platform_data *pdata) 89 struct i2c_gpio_platform_data *pdata)
90{ 90{
91 u32 reg; 91 u32 reg;
@@ -117,7 +117,7 @@ static int __devinit of_i2c_gpio_probe(struct device_node *np,
117 return 0; 117 return 0;
118} 118}
119 119
120static int __devinit i2c_gpio_probe(struct platform_device *pdev) 120static int i2c_gpio_probe(struct platform_device *pdev)
121{ 121{
122 struct i2c_gpio_private_data *priv; 122 struct i2c_gpio_private_data *priv;
123 struct i2c_gpio_platform_data *pdata; 123 struct i2c_gpio_platform_data *pdata;
@@ -218,7 +218,7 @@ err_request_sda:
218 return ret; 218 return ret;
219} 219}
220 220
221static int __devexit i2c_gpio_remove(struct platform_device *pdev) 221static int i2c_gpio_remove(struct platform_device *pdev)
222{ 222{
223 struct i2c_gpio_private_data *priv; 223 struct i2c_gpio_private_data *priv;
224 struct i2c_gpio_platform_data *pdata; 224 struct i2c_gpio_platform_data *pdata;
@@ -251,7 +251,7 @@ static struct platform_driver i2c_gpio_driver = {
251 .of_match_table = of_match_ptr(i2c_gpio_dt_ids), 251 .of_match_table = of_match_ptr(i2c_gpio_dt_ids),
252 }, 252 },
253 .probe = i2c_gpio_probe, 253 .probe = i2c_gpio_probe,
254 .remove = __devexit_p(i2c_gpio_remove), 254 .remove = i2c_gpio_remove,
255}; 255};
256 256
257static int __init i2c_gpio_init(void) 257static int __init i2c_gpio_init(void)
diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
index 19515df61021..3351cc7ed11f 100644
--- a/drivers/i2c/busses/i2c-highlander.c
+++ b/drivers/i2c/busses/i2c-highlander.c
@@ -356,7 +356,7 @@ static const struct i2c_algorithm highlander_i2c_algo = {
356 .functionality = highlander_i2c_func, 356 .functionality = highlander_i2c_func,
357}; 357};
358 358
359static int __devinit highlander_i2c_probe(struct platform_device *pdev) 359static int highlander_i2c_probe(struct platform_device *pdev)
360{ 360{
361 struct highlander_i2c_dev *dev; 361 struct highlander_i2c_dev *dev;
362 struct i2c_adapter *adap; 362 struct i2c_adapter *adap;
@@ -441,7 +441,7 @@ err:
441 return ret; 441 return ret;
442} 442}
443 443
444static int __devexit highlander_i2c_remove(struct platform_device *pdev) 444static int highlander_i2c_remove(struct platform_device *pdev)
445{ 445{
446 struct highlander_i2c_dev *dev = platform_get_drvdata(pdev); 446 struct highlander_i2c_dev *dev = platform_get_drvdata(pdev);
447 447
@@ -465,7 +465,7 @@ static struct platform_driver highlander_i2c_driver = {
465 }, 465 },
466 466
467 .probe = highlander_i2c_probe, 467 .probe = highlander_i2c_probe,
468 .remove = __devexit_p(highlander_i2c_remove), 468 .remove = highlander_i2c_remove,
469}; 469};
470 470
471module_platform_driver(highlander_i2c_driver); 471module_platform_driver(highlander_i2c_driver);
diff --git a/drivers/i2c/busses/i2c-hydra.c b/drivers/i2c/busses/i2c-hydra.c
index c9f95e1666a8..79c3d9069a48 100644
--- a/drivers/i2c/busses/i2c-hydra.c
+++ b/drivers/i2c/busses/i2c-hydra.c
@@ -112,7 +112,7 @@ static DEFINE_PCI_DEVICE_TABLE(hydra_ids) = {
112 112
113MODULE_DEVICE_TABLE (pci, hydra_ids); 113MODULE_DEVICE_TABLE (pci, hydra_ids);
114 114
115static int __devinit hydra_probe(struct pci_dev *dev, 115static int hydra_probe(struct pci_dev *dev,
116 const struct pci_device_id *id) 116 const struct pci_device_id *id)
117{ 117{
118 unsigned long base = pci_resource_start(dev, 0); 118 unsigned long base = pci_resource_start(dev, 0);
@@ -139,7 +139,7 @@ static int __devinit hydra_probe(struct pci_dev *dev,
139 return 0; 139 return 0;
140} 140}
141 141
142static void __devexit hydra_remove(struct pci_dev *dev) 142static void hydra_remove(struct pci_dev *dev)
143{ 143{
144 pdregw(hydra_bit_data.data, 0); /* clear SCLK_OE and SDAT_OE */ 144 pdregw(hydra_bit_data.data, 0); /* clear SCLK_OE and SDAT_OE */
145 i2c_del_adapter(&hydra_adap); 145 i2c_del_adapter(&hydra_adap);
@@ -153,7 +153,7 @@ static struct pci_driver hydra_driver = {
153 .name = "hydra_smbus", 153 .name = "hydra_smbus",
154 .id_table = hydra_ids, 154 .id_table = hydra_ids,
155 .probe = hydra_probe, 155 .probe = hydra_probe,
156 .remove = __devexit_p(hydra_remove), 156 .remove = hydra_remove,
157}; 157};
158 158
159module_pci_driver(hydra_driver); 159module_pci_driver(hydra_driver);
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 1e73638225e1..3092387f6ef4 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -841,14 +841,14 @@ struct dmi_onboard_device_info {
841 const char *i2c_type; 841 const char *i2c_type;
842}; 842};
843 843
844static struct dmi_onboard_device_info __devinitdata dmi_devices[] = { 844static const struct dmi_onboard_device_info dmi_devices[] = {
845 { "Syleus", DMI_DEV_TYPE_OTHER, 0x73, "fscsyl" }, 845 { "Syleus", DMI_DEV_TYPE_OTHER, 0x73, "fscsyl" },
846 { "Hermes", DMI_DEV_TYPE_OTHER, 0x73, "fscher" }, 846 { "Hermes", DMI_DEV_TYPE_OTHER, 0x73, "fscher" },
847 { "Hades", DMI_DEV_TYPE_OTHER, 0x73, "fschds" }, 847 { "Hades", DMI_DEV_TYPE_OTHER, 0x73, "fschds" },
848}; 848};
849 849
850static void __devinit dmi_check_onboard_device(u8 type, const char *name, 850static void dmi_check_onboard_device(u8 type, const char *name,
851 struct i2c_adapter *adap) 851 struct i2c_adapter *adap)
852{ 852{
853 int i; 853 int i;
854 struct i2c_board_info info; 854 struct i2c_board_info info;
@@ -871,8 +871,7 @@ static void __devinit dmi_check_onboard_device(u8 type, const char *name,
871/* We use our own function to check for onboard devices instead of 871/* We use our own function to check for onboard devices instead of
872 dmi_find_device() as some buggy BIOS's have the devices we are interested 872 dmi_find_device() as some buggy BIOS's have the devices we are interested
873 in marked as disabled */ 873 in marked as disabled */
874static void __devinit dmi_check_onboard_devices(const struct dmi_header *dm, 874static void dmi_check_onboard_devices(const struct dmi_header *dm, void *adap)
875 void *adap)
876{ 875{
877 int i, count; 876 int i, count;
878 877
@@ -901,7 +900,7 @@ static void __devinit dmi_check_onboard_devices(const struct dmi_header *dm,
901} 900}
902 901
903/* Register optional slaves */ 902/* Register optional slaves */
904static void __devinit i801_probe_optional_slaves(struct i801_priv *priv) 903static void i801_probe_optional_slaves(struct i801_priv *priv)
905{ 904{
906 /* Only register slaves on main SMBus channel */ 905 /* Only register slaves on main SMBus channel */
907 if (priv->features & FEATURE_IDF) 906 if (priv->features & FEATURE_IDF)
@@ -921,7 +920,7 @@ static void __devinit i801_probe_optional_slaves(struct i801_priv *priv)
921} 920}
922#else 921#else
923static void __init input_apanel_init(void) {} 922static void __init input_apanel_init(void) {}
924static void __devinit i801_probe_optional_slaves(struct i801_priv *priv) {} 923static void i801_probe_optional_slaves(struct i801_priv *priv) {}
925#endif /* CONFIG_X86 && CONFIG_DMI */ 924#endif /* CONFIG_X86 && CONFIG_DMI */
926 925
927#if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ 926#if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \
@@ -944,7 +943,7 @@ static struct i801_mux_config i801_mux_config_asus_z8_d18 = {
944 .n_gpios = 2, 943 .n_gpios = 2,
945}; 944};
946 945
947static struct dmi_system_id __devinitdata mux_dmi_table[] = { 946static const struct dmi_system_id mux_dmi_table[] = {
948 { 947 {
949 .matches = { 948 .matches = {
950 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), 949 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
@@ -1012,7 +1011,7 @@ static struct dmi_system_id __devinitdata mux_dmi_table[] = {
1012}; 1011};
1013 1012
1014/* Setup multiplexing if needed */ 1013/* Setup multiplexing if needed */
1015static int __devinit i801_add_mux(struct i801_priv *priv) 1014static int i801_add_mux(struct i801_priv *priv)
1016{ 1015{
1017 struct device *dev = &priv->adapter.dev; 1016 struct device *dev = &priv->adapter.dev;
1018 const struct i801_mux_config *mux_config; 1017 const struct i801_mux_config *mux_config;
@@ -1048,13 +1047,13 @@ static int __devinit i801_add_mux(struct i801_priv *priv)
1048 return 0; 1047 return 0;
1049} 1048}
1050 1049
1051static void __devexit i801_del_mux(struct i801_priv *priv) 1050static void i801_del_mux(struct i801_priv *priv)
1052{ 1051{
1053 if (priv->mux_pdev) 1052 if (priv->mux_pdev)
1054 platform_device_unregister(priv->mux_pdev); 1053 platform_device_unregister(priv->mux_pdev);
1055} 1054}
1056 1055
1057static unsigned int __devinit i801_get_adapter_class(struct i801_priv *priv) 1056static unsigned int i801_get_adapter_class(struct i801_priv *priv)
1058{ 1057{
1059 const struct dmi_system_id *id; 1058 const struct dmi_system_id *id;
1060 const struct i801_mux_config *mux_config; 1059 const struct i801_mux_config *mux_config;
@@ -1084,8 +1083,7 @@ static inline unsigned int i801_get_adapter_class(struct i801_priv *priv)
1084} 1083}
1085#endif 1084#endif
1086 1085
1087static int __devinit i801_probe(struct pci_dev *dev, 1086static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
1088 const struct pci_device_id *id)
1089{ 1087{
1090 unsigned char temp; 1088 unsigned char temp;
1091 int err, i; 1089 int err, i;
@@ -1226,7 +1224,7 @@ exit:
1226 return err; 1224 return err;
1227} 1225}
1228 1226
1229static void __devexit i801_remove(struct pci_dev *dev) 1227static void i801_remove(struct pci_dev *dev)
1230{ 1228{
1231 struct i801_priv *priv = pci_get_drvdata(dev); 1229 struct i801_priv *priv = pci_get_drvdata(dev);
1232 1230
@@ -1272,7 +1270,7 @@ static struct pci_driver i801_driver = {
1272 .name = "i801_smbus", 1270 .name = "i801_smbus",
1273 .id_table = i801_ids, 1271 .id_table = i801_ids,
1274 .probe = i801_probe, 1272 .probe = i801_probe,
1275 .remove = __devexit_p(i801_remove), 1273 .remove = i801_remove,
1276 .suspend = i801_suspend, 1274 .suspend = i801_suspend,
1277 .resume = i801_resume, 1275 .resume = i801_resume,
1278}; 1276};
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 806e225f3de7..33a2abb6c063 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -660,7 +660,7 @@ static inline u8 iic_clckdiv(unsigned int opb)
660 return (u8)((opb + 9) / 10 - 1); 660 return (u8)((opb + 9) / 10 - 1);
661} 661}
662 662
663static int __devinit iic_request_irq(struct platform_device *ofdev, 663static int iic_request_irq(struct platform_device *ofdev,
664 struct ibm_iic_private *dev) 664 struct ibm_iic_private *dev)
665{ 665{
666 struct device_node *np = ofdev->dev.of_node; 666 struct device_node *np = ofdev->dev.of_node;
@@ -691,7 +691,7 @@ static int __devinit iic_request_irq(struct platform_device *ofdev,
691/* 691/*
692 * Register single IIC interface 692 * Register single IIC interface
693 */ 693 */
694static int __devinit iic_probe(struct platform_device *ofdev) 694static int iic_probe(struct platform_device *ofdev)
695{ 695{
696 struct device_node *np = ofdev->dev.of_node; 696 struct device_node *np = ofdev->dev.of_node;
697 struct ibm_iic_private *dev; 697 struct ibm_iic_private *dev;
@@ -781,7 +781,7 @@ error_cleanup:
781/* 781/*
782 * Cleanup initialized IIC interface 782 * Cleanup initialized IIC interface
783 */ 783 */
784static int __devexit iic_remove(struct platform_device *ofdev) 784static int iic_remove(struct platform_device *ofdev)
785{ 785{
786 struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev); 786 struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev);
787 787
@@ -812,7 +812,7 @@ static struct platform_driver ibm_iic_driver = {
812 .of_match_table = ibm_iic_match, 812 .of_match_table = ibm_iic_match,
813 }, 813 },
814 .probe = iic_probe, 814 .probe = iic_probe,
815 .remove = __devexit_p(iic_remove), 815 .remove = iic_remove,
816}; 816};
817 817
818module_platform_driver(ibm_iic_driver); 818module_platform_driver(ibm_iic_driver);
diff --git a/drivers/i2c/busses/i2c-intel-mid.c b/drivers/i2c/busses/i2c-intel-mid.c
index 7c28f10f95ca..de3736bf6465 100644
--- a/drivers/i2c/busses/i2c-intel-mid.c
+++ b/drivers/i2c/busses/i2c-intel-mid.c
@@ -947,7 +947,7 @@ static const struct dev_pm_ops intel_mid_i2c_pm_ops = {
947 * 5. Call intel_mid_i2c_hwinit() for hardware initialization 947 * 5. Call intel_mid_i2c_hwinit() for hardware initialization
948 * 6. Register I2C adapter in i2c-core 948 * 6. Register I2C adapter in i2c-core
949 */ 949 */
950static int __devinit intel_mid_i2c_probe(struct pci_dev *dev, 950static int intel_mid_i2c_probe(struct pci_dev *dev,
951 const struct pci_device_id *id) 951 const struct pci_device_id *id)
952{ 952{
953 struct intel_mid_i2c_private *mrst; 953 struct intel_mid_i2c_private *mrst;
@@ -1079,7 +1079,7 @@ exit:
1079 return err; 1079 return err;
1080} 1080}
1081 1081
1082static void __devexit intel_mid_i2c_remove(struct pci_dev *dev) 1082static void intel_mid_i2c_remove(struct pci_dev *dev)
1083{ 1083{
1084 struct intel_mid_i2c_private *mrst = pci_get_drvdata(dev); 1084 struct intel_mid_i2c_private *mrst = pci_get_drvdata(dev);
1085 intel_mid_i2c_disable(&mrst->adap); 1085 intel_mid_i2c_disable(&mrst->adap);
@@ -1113,7 +1113,7 @@ static struct pci_driver intel_mid_i2c_driver = {
1113 .name = DRIVER_NAME, 1113 .name = DRIVER_NAME,
1114 .id_table = intel_mid_i2c_ids, 1114 .id_table = intel_mid_i2c_ids,
1115 .probe = intel_mid_i2c_probe, 1115 .probe = intel_mid_i2c_probe,
1116 .remove = __devexit_p(intel_mid_i2c_remove), 1116 .remove = intel_mid_i2c_remove,
1117}; 1117};
1118 1118
1119module_pci_driver(intel_mid_i2c_driver); 1119module_pci_driver(intel_mid_i2c_driver);
diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c
index f90a6057508d..4099f79c2280 100644
--- a/drivers/i2c/busses/i2c-isch.c
+++ b/drivers/i2c/busses/i2c-isch.c
@@ -249,7 +249,7 @@ static struct i2c_adapter sch_adapter = {
249 .algo = &smbus_algorithm, 249 .algo = &smbus_algorithm,
250}; 250};
251 251
252static int __devinit smbus_sch_probe(struct platform_device *dev) 252static int smbus_sch_probe(struct platform_device *dev)
253{ 253{
254 struct resource *res; 254 struct resource *res;
255 int retval; 255 int retval;
@@ -284,7 +284,7 @@ static int __devinit smbus_sch_probe(struct platform_device *dev)
284 return retval; 284 return retval;
285} 285}
286 286
287static int __devexit smbus_sch_remove(struct platform_device *pdev) 287static int smbus_sch_remove(struct platform_device *pdev)
288{ 288{
289 struct resource *res; 289 struct resource *res;
290 if (sch_smba) { 290 if (sch_smba) {
@@ -303,7 +303,7 @@ static struct platform_driver smbus_sch_driver = {
303 .owner = THIS_MODULE, 303 .owner = THIS_MODULE,
304 }, 304 },
305 .probe = smbus_sch_probe, 305 .probe = smbus_sch_probe,
306 .remove = __devexit_p(smbus_sch_remove), 306 .remove = smbus_sch_remove,
307}; 307};
308 308
309module_platform_driver(smbus_sch_driver); 309module_platform_driver(smbus_sch_driver);
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index ca86430cb4a2..a69459e5c3f3 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -175,7 +175,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
175} 175}
176 176
177#if defined(CONFIG_PPC_MPC52xx) || defined(CONFIG_PPC_MPC512x) 177#if defined(CONFIG_PPC_MPC52xx) || defined(CONFIG_PPC_MPC512x)
178static const struct mpc_i2c_divider mpc_i2c_dividers_52xx[] __devinitconst = { 178static const struct mpc_i2c_divider mpc_i2c_dividers_52xx[] = {
179 {20, 0x20}, {22, 0x21}, {24, 0x22}, {26, 0x23}, 179 {20, 0x20}, {22, 0x21}, {24, 0x22}, {26, 0x23},
180 {28, 0x24}, {30, 0x01}, {32, 0x25}, {34, 0x02}, 180 {28, 0x24}, {30, 0x01}, {32, 0x25}, {34, 0x02},
181 {36, 0x26}, {40, 0x27}, {44, 0x04}, {48, 0x28}, 181 {36, 0x26}, {40, 0x27}, {44, 0x04}, {48, 0x28},
@@ -196,7 +196,7 @@ static const struct mpc_i2c_divider mpc_i2c_dividers_52xx[] __devinitconst = {
196 {10240, 0x9d}, {12288, 0x9e}, {15360, 0x9f} 196 {10240, 0x9d}, {12288, 0x9e}, {15360, 0x9f}
197}; 197};
198 198
199static int __devinit mpc_i2c_get_fdr_52xx(struct device_node *node, u32 clock, 199static int mpc_i2c_get_fdr_52xx(struct device_node *node, u32 clock,
200 int prescaler, u32 *real_clk) 200 int prescaler, u32 *real_clk)
201{ 201{
202 const struct mpc_i2c_divider *div = NULL; 202 const struct mpc_i2c_divider *div = NULL;
@@ -230,7 +230,7 @@ static int __devinit mpc_i2c_get_fdr_52xx(struct device_node *node, u32 clock,
230 return (int)div->fdr; 230 return (int)div->fdr;
231} 231}
232 232
233static void __devinit mpc_i2c_setup_52xx(struct device_node *node, 233static void mpc_i2c_setup_52xx(struct device_node *node,
234 struct mpc_i2c *i2c, 234 struct mpc_i2c *i2c,
235 u32 clock, u32 prescaler) 235 u32 clock, u32 prescaler)
236{ 236{
@@ -252,7 +252,7 @@ static void __devinit mpc_i2c_setup_52xx(struct device_node *node,
252 fdr); 252 fdr);
253} 253}
254#else /* !(CONFIG_PPC_MPC52xx || CONFIG_PPC_MPC512x) */ 254#else /* !(CONFIG_PPC_MPC52xx || CONFIG_PPC_MPC512x) */
255static void __devinit mpc_i2c_setup_52xx(struct device_node *node, 255static void mpc_i2c_setup_52xx(struct device_node *node,
256 struct mpc_i2c *i2c, 256 struct mpc_i2c *i2c,
257 u32 clock, u32 prescaler) 257 u32 clock, u32 prescaler)
258{ 258{
@@ -260,7 +260,7 @@ static void __devinit mpc_i2c_setup_52xx(struct device_node *node,
260#endif /* CONFIG_PPC_MPC52xx || CONFIG_PPC_MPC512x */ 260#endif /* CONFIG_PPC_MPC52xx || CONFIG_PPC_MPC512x */
261 261
262#ifdef CONFIG_PPC_MPC512x 262#ifdef CONFIG_PPC_MPC512x
263static void __devinit mpc_i2c_setup_512x(struct device_node *node, 263static void mpc_i2c_setup_512x(struct device_node *node,
264 struct mpc_i2c *i2c, 264 struct mpc_i2c *i2c,
265 u32 clock, u32 prescaler) 265 u32 clock, u32 prescaler)
266{ 266{
@@ -288,7 +288,7 @@ static void __devinit mpc_i2c_setup_512x(struct device_node *node,
288 mpc_i2c_setup_52xx(node, i2c, clock, prescaler); 288 mpc_i2c_setup_52xx(node, i2c, clock, prescaler);
289} 289}
290#else /* CONFIG_PPC_MPC512x */ 290#else /* CONFIG_PPC_MPC512x */
291static void __devinit mpc_i2c_setup_512x(struct device_node *node, 291static void mpc_i2c_setup_512x(struct device_node *node,
292 struct mpc_i2c *i2c, 292 struct mpc_i2c *i2c,
293 u32 clock, u32 prescaler) 293 u32 clock, u32 prescaler)
294{ 294{
@@ -296,7 +296,7 @@ static void __devinit mpc_i2c_setup_512x(struct device_node *node,
296#endif /* CONFIG_PPC_MPC512x */ 296#endif /* CONFIG_PPC_MPC512x */
297 297
298#ifdef CONFIG_FSL_SOC 298#ifdef CONFIG_FSL_SOC
299static const struct mpc_i2c_divider mpc_i2c_dividers_8xxx[] __devinitconst = { 299static const struct mpc_i2c_divider mpc_i2c_dividers_8xxx[] = {
300 {160, 0x0120}, {192, 0x0121}, {224, 0x0122}, {256, 0x0123}, 300 {160, 0x0120}, {192, 0x0121}, {224, 0x0122}, {256, 0x0123},
301 {288, 0x0100}, {320, 0x0101}, {352, 0x0601}, {384, 0x0102}, 301 {288, 0x0100}, {320, 0x0101}, {352, 0x0601}, {384, 0x0102},
302 {416, 0x0602}, {448, 0x0126}, {480, 0x0103}, {512, 0x0127}, 302 {416, 0x0602}, {448, 0x0126}, {480, 0x0103}, {512, 0x0127},
@@ -316,7 +316,7 @@ static const struct mpc_i2c_divider mpc_i2c_dividers_8xxx[] __devinitconst = {
316 {49152, 0x011e}, {61440, 0x011f} 316 {49152, 0x011e}, {61440, 0x011f}
317}; 317};
318 318
319static u32 __devinit mpc_i2c_get_sec_cfg_8xxx(void) 319static u32 mpc_i2c_get_sec_cfg_8xxx(void)
320{ 320{
321 struct device_node *node = NULL; 321 struct device_node *node = NULL;
322 u32 __iomem *reg; 322 u32 __iomem *reg;
@@ -345,7 +345,7 @@ static u32 __devinit mpc_i2c_get_sec_cfg_8xxx(void)
345 return val; 345 return val;
346} 346}
347 347
348static int __devinit mpc_i2c_get_fdr_8xxx(struct device_node *node, u32 clock, 348static int mpc_i2c_get_fdr_8xxx(struct device_node *node, u32 clock,
349 u32 prescaler, u32 *real_clk) 349 u32 prescaler, u32 *real_clk)
350{ 350{
351 const struct mpc_i2c_divider *div = NULL; 351 const struct mpc_i2c_divider *div = NULL;
@@ -383,7 +383,7 @@ static int __devinit mpc_i2c_get_fdr_8xxx(struct device_node *node, u32 clock,
383 return div ? (int)div->fdr : -EINVAL; 383 return div ? (int)div->fdr : -EINVAL;
384} 384}
385 385
386static void __devinit mpc_i2c_setup_8xxx(struct device_node *node, 386static void mpc_i2c_setup_8xxx(struct device_node *node,
387 struct mpc_i2c *i2c, 387 struct mpc_i2c *i2c,
388 u32 clock, u32 prescaler) 388 u32 clock, u32 prescaler)
389{ 389{
@@ -408,7 +408,7 @@ static void __devinit mpc_i2c_setup_8xxx(struct device_node *node,
408} 408}
409 409
410#else /* !CONFIG_FSL_SOC */ 410#else /* !CONFIG_FSL_SOC */
411static void __devinit mpc_i2c_setup_8xxx(struct device_node *node, 411static void mpc_i2c_setup_8xxx(struct device_node *node,
412 struct mpc_i2c *i2c, 412 struct mpc_i2c *i2c,
413 u32 clock, u32 prescaler) 413 u32 clock, u32 prescaler)
414{ 414{
@@ -615,7 +615,7 @@ static struct i2c_adapter mpc_ops = {
615}; 615};
616 616
617static const struct of_device_id mpc_i2c_of_match[]; 617static const struct of_device_id mpc_i2c_of_match[];
618static int __devinit fsl_i2c_probe(struct platform_device *op) 618static int fsl_i2c_probe(struct platform_device *op)
619{ 619{
620 const struct of_device_id *match; 620 const struct of_device_id *match;
621 struct mpc_i2c *i2c; 621 struct mpc_i2c *i2c;
@@ -706,7 +706,7 @@ static int __devinit fsl_i2c_probe(struct platform_device *op)
706 return result; 706 return result;
707}; 707};
708 708
709static int __devexit fsl_i2c_remove(struct platform_device *op) 709static int fsl_i2c_remove(struct platform_device *op)
710{ 710{
711 struct mpc_i2c *i2c = dev_get_drvdata(&op->dev); 711 struct mpc_i2c *i2c = dev_get_drvdata(&op->dev);
712 712
@@ -746,24 +746,24 @@ static int mpc_i2c_resume(struct device *dev)
746SIMPLE_DEV_PM_OPS(mpc_i2c_pm_ops, mpc_i2c_suspend, mpc_i2c_resume); 746SIMPLE_DEV_PM_OPS(mpc_i2c_pm_ops, mpc_i2c_suspend, mpc_i2c_resume);
747#endif 747#endif
748 748
749static const struct mpc_i2c_data mpc_i2c_data_512x __devinitdata = { 749static const struct mpc_i2c_data mpc_i2c_data_512x = {
750 .setup = mpc_i2c_setup_512x, 750 .setup = mpc_i2c_setup_512x,
751}; 751};
752 752
753static const struct mpc_i2c_data mpc_i2c_data_52xx __devinitdata = { 753static const struct mpc_i2c_data mpc_i2c_data_52xx = {
754 .setup = mpc_i2c_setup_52xx, 754 .setup = mpc_i2c_setup_52xx,
755}; 755};
756 756
757static const struct mpc_i2c_data mpc_i2c_data_8313 __devinitdata = { 757static const struct mpc_i2c_data mpc_i2c_data_8313 = {
758 .setup = mpc_i2c_setup_8xxx, 758 .setup = mpc_i2c_setup_8xxx,
759}; 759};
760 760
761static const struct mpc_i2c_data mpc_i2c_data_8543 __devinitdata = { 761static const struct mpc_i2c_data mpc_i2c_data_8543 = {
762 .setup = mpc_i2c_setup_8xxx, 762 .setup = mpc_i2c_setup_8xxx,
763 .prescaler = 2, 763 .prescaler = 2,
764}; 764};
765 765
766static const struct mpc_i2c_data mpc_i2c_data_8544 __devinitdata = { 766static const struct mpc_i2c_data mpc_i2c_data_8544 = {
767 .setup = mpc_i2c_setup_8xxx, 767 .setup = mpc_i2c_setup_8xxx,
768 .prescaler = 3, 768 .prescaler = 3,
769}; 769};
@@ -785,7 +785,7 @@ MODULE_DEVICE_TABLE(of, mpc_i2c_of_match);
785/* Structure for a device driver */ 785/* Structure for a device driver */
786static struct platform_driver mpc_i2c_driver = { 786static struct platform_driver mpc_i2c_driver = {
787 .probe = fsl_i2c_probe, 787 .probe = fsl_i2c_probe,
788 .remove = __devexit_p(fsl_i2c_remove), 788 .remove = fsl_i2c_remove,
789 .driver = { 789 .driver = {
790 .owner = THIS_MODULE, 790 .owner = THIS_MODULE,
791 .name = DRV_NAME, 791 .name = DRV_NAME,
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 2e9d56719e99..8b20ef8524ac 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -495,7 +495,7 @@ static const struct i2c_algorithm mv64xxx_i2c_algo = {
495 * 495 *
496 ***************************************************************************** 496 *****************************************************************************
497 */ 497 */
498static int __devinit 498static int
499mv64xxx_i2c_map_regs(struct platform_device *pd, 499mv64xxx_i2c_map_regs(struct platform_device *pd,
500 struct mv64xxx_i2c_data *drv_data) 500 struct mv64xxx_i2c_data *drv_data)
501{ 501{
@@ -530,13 +530,13 @@ mv64xxx_i2c_unmap_regs(struct mv64xxx_i2c_data *drv_data)
530} 530}
531 531
532#ifdef CONFIG_OF 532#ifdef CONFIG_OF
533static int __devinit 533static int
534mv64xxx_calc_freq(const int tclk, const int n, const int m) 534mv64xxx_calc_freq(const int tclk, const int n, const int m)
535{ 535{
536 return tclk / (10 * (m + 1) * (2 << n)); 536 return tclk / (10 * (m + 1) * (2 << n));
537} 537}
538 538
539static bool __devinit 539static bool
540mv64xxx_find_baud_factors(const u32 req_freq, const u32 tclk, u32 *best_n, 540mv64xxx_find_baud_factors(const u32 req_freq, const u32 tclk, u32 *best_n,
541 u32 *best_m) 541 u32 *best_m)
542{ 542{
@@ -560,7 +560,7 @@ mv64xxx_find_baud_factors(const u32 req_freq, const u32 tclk, u32 *best_n,
560 return true; 560 return true;
561} 561}
562 562
563static int __devinit 563static int
564mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data, 564mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
565 struct device_node *np) 565 struct device_node *np)
566{ 566{
@@ -597,7 +597,7 @@ out:
597#endif 597#endif
598} 598}
599#else /* CONFIG_OF */ 599#else /* CONFIG_OF */
600static int __devinit 600static int
601mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data, 601mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
602 struct device_node *np) 602 struct device_node *np)
603{ 603{
@@ -605,7 +605,7 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
605} 605}
606#endif /* CONFIG_OF */ 606#endif /* CONFIG_OF */
607 607
608static int __devinit 608static int
609mv64xxx_i2c_probe(struct platform_device *pd) 609mv64xxx_i2c_probe(struct platform_device *pd)
610{ 610{
611 struct mv64xxx_i2c_data *drv_data; 611 struct mv64xxx_i2c_data *drv_data;
@@ -697,7 +697,7 @@ mv64xxx_i2c_probe(struct platform_device *pd)
697 return rc; 697 return rc;
698} 698}
699 699
700static int __devexit 700static int
701mv64xxx_i2c_remove(struct platform_device *dev) 701mv64xxx_i2c_remove(struct platform_device *dev)
702{ 702{
703 struct mv64xxx_i2c_data *drv_data = platform_get_drvdata(dev); 703 struct mv64xxx_i2c_data *drv_data = platform_get_drvdata(dev);
@@ -718,7 +718,7 @@ mv64xxx_i2c_remove(struct platform_device *dev)
718 return rc; 718 return rc;
719} 719}
720 720
721static const struct of_device_id mv64xxx_i2c_of_match_table[] __devinitdata = { 721static const struct of_device_id mv64xxx_i2c_of_match_table[] = {
722 { .compatible = "marvell,mv64xxx-i2c", }, 722 { .compatible = "marvell,mv64xxx-i2c", },
723 {} 723 {}
724}; 724};
@@ -726,7 +726,7 @@ MODULE_DEVICE_TABLE(of, mv64xxx_i2c_of_match_table);
726 726
727static struct platform_driver mv64xxx_i2c_driver = { 727static struct platform_driver mv64xxx_i2c_driver = {
728 .probe = mv64xxx_i2c_probe, 728 .probe = mv64xxx_i2c_probe,
729 .remove = __devexit_p(mv64xxx_i2c_remove), 729 .remove = mv64xxx_i2c_remove,
730 .driver = { 730 .driver = {
731 .owner = THIS_MODULE, 731 .owner = THIS_MODULE,
732 .name = MV64XXX_I2C_CTLR_NAME, 732 .name = MV64XXX_I2C_CTLR_NAME,
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 6ed53da9e1f4..1b1a936eccc9 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -432,7 +432,7 @@ static int mxs_i2c_get_ofdata(struct mxs_i2c_dev *i2c)
432 return 0; 432 return 0;
433} 433}
434 434
435static int __devinit mxs_i2c_probe(struct platform_device *pdev) 435static int mxs_i2c_probe(struct platform_device *pdev)
436{ 436{
437 struct device *dev = &pdev->dev; 437 struct device *dev = &pdev->dev;
438 struct mxs_i2c_dev *i2c; 438 struct mxs_i2c_dev *i2c;
@@ -515,7 +515,7 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev)
515 return 0; 515 return 0;
516} 516}
517 517
518static int __devexit mxs_i2c_remove(struct platform_device *pdev) 518static int mxs_i2c_remove(struct platform_device *pdev)
519{ 519{
520 struct mxs_i2c_dev *i2c = platform_get_drvdata(pdev); 520 struct mxs_i2c_dev *i2c = platform_get_drvdata(pdev);
521 int ret; 521 int ret;
@@ -546,7 +546,7 @@ static struct platform_driver mxs_i2c_driver = {
546 .owner = THIS_MODULE, 546 .owner = THIS_MODULE,
547 .of_match_table = mxs_i2c_dt_ids, 547 .of_match_table = mxs_i2c_dt_ids,
548 }, 548 },
549 .remove = __devexit_p(mxs_i2c_remove), 549 .remove = mxs_i2c_remove,
550}; 550};
551 551
552static int __init mxs_i2c_init(void) 552static int __init mxs_i2c_init(void)
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index 392303b4be07..adac8542771d 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -117,7 +117,7 @@ struct nforce2_smbus {
117#define MAX_TIMEOUT 100 117#define MAX_TIMEOUT 100
118 118
119/* We disable the second SMBus channel on these boards */ 119/* We disable the second SMBus channel on these boards */
120static struct dmi_system_id __devinitdata nforce2_dmi_blacklist2[] = { 120static const struct dmi_system_id nforce2_dmi_blacklist2[] = {
121 { 121 {
122 .ident = "DFI Lanparty NF4 Expert", 122 .ident = "DFI Lanparty NF4 Expert",
123 .matches = { 123 .matches = {
@@ -330,8 +330,8 @@ static DEFINE_PCI_DEVICE_TABLE(nforce2_ids) = {
330MODULE_DEVICE_TABLE (pci, nforce2_ids); 330MODULE_DEVICE_TABLE (pci, nforce2_ids);
331 331
332 332
333static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar, 333static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg,
334 int alt_reg, struct nforce2_smbus *smbus, const char *name) 334 struct nforce2_smbus *smbus, const char *name)
335{ 335{
336 int error; 336 int error;
337 337
@@ -382,7 +382,7 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar,
382} 382}
383 383
384 384
385static int __devinit nforce2_probe(struct pci_dev *dev, const struct pci_device_id *id) 385static int nforce2_probe(struct pci_dev *dev, const struct pci_device_id *id)
386{ 386{
387 struct nforce2_smbus *smbuses; 387 struct nforce2_smbus *smbuses;
388 int res1, res2; 388 int res1, res2;
@@ -430,7 +430,7 @@ static int __devinit nforce2_probe(struct pci_dev *dev, const struct pci_device_
430} 430}
431 431
432 432
433static void __devexit nforce2_remove(struct pci_dev *dev) 433static void nforce2_remove(struct pci_dev *dev)
434{ 434{
435 struct nforce2_smbus *smbuses = pci_get_drvdata(dev); 435 struct nforce2_smbus *smbuses = pci_get_drvdata(dev);
436 436
@@ -450,7 +450,7 @@ static struct pci_driver nforce2_driver = {
450 .name = "nForce2_smbus", 450 .name = "nForce2_smbus",
451 .id_table = nforce2_ids, 451 .id_table = nforce2_ids,
452 .probe = nforce2_probe, 452 .probe = nforce2_probe,
453 .remove = __devexit_p(nforce2_remove), 453 .remove = nforce2_remove,
454}; 454};
455 455
456module_pci_driver(nforce2_driver); 456module_pci_driver(nforce2_driver);
diff --git a/drivers/i2c/busses/i2c-nuc900.c b/drivers/i2c/busses/i2c-nuc900.c
index a23b91b0b738..865ee350adb3 100644
--- a/drivers/i2c/busses/i2c-nuc900.c
+++ b/drivers/i2c/busses/i2c-nuc900.c
@@ -518,7 +518,7 @@ static const struct i2c_algorithm nuc900_i2c_algorithm = {
518 * called by the bus driver when a suitable device is found 518 * called by the bus driver when a suitable device is found
519*/ 519*/
520 520
521static int __devinit nuc900_i2c_probe(struct platform_device *pdev) 521static int nuc900_i2c_probe(struct platform_device *pdev)
522{ 522{
523 struct nuc900_i2c *i2c; 523 struct nuc900_i2c *i2c;
524 struct nuc900_platform_i2c *pdata; 524 struct nuc900_platform_i2c *pdata;
@@ -663,7 +663,7 @@ static int __devinit nuc900_i2c_probe(struct platform_device *pdev)
663 * called when device is removed from the bus 663 * called when device is removed from the bus
664*/ 664*/
665 665
666static int __devexit nuc900_i2c_remove(struct platform_device *pdev) 666static int nuc900_i2c_remove(struct platform_device *pdev)
667{ 667{
668 struct nuc900_i2c *i2c = platform_get_drvdata(pdev); 668 struct nuc900_i2c *i2c = platform_get_drvdata(pdev);
669 669
@@ -684,7 +684,7 @@ static int __devexit nuc900_i2c_remove(struct platform_device *pdev)
684 684
685static struct platform_driver nuc900_i2c_driver = { 685static struct platform_driver nuc900_i2c_driver = {
686 .probe = nuc900_i2c_probe, 686 .probe = nuc900_i2c_probe,
687 .remove = __devexit_p(nuc900_i2c_remove), 687 .remove = nuc900_i2c_remove,
688 .driver = { 688 .driver = {
689 .owner = THIS_MODULE, 689 .owner = THIS_MODULE,
690 .name = "nuc900-i2c0", 690 .name = "nuc900-i2c0",
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index 9b35c9fbb2fe..a873d0ad1acb 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -343,7 +343,7 @@ static int ocores_i2c_of_probe(struct platform_device *pdev,
343#define ocores_i2c_of_probe(pdev,i2c) -ENODEV 343#define ocores_i2c_of_probe(pdev,i2c) -ENODEV
344#endif 344#endif
345 345
346static int __devinit ocores_i2c_probe(struct platform_device *pdev) 346static int ocores_i2c_probe(struct platform_device *pdev)
347{ 347{
348 struct ocores_i2c *i2c; 348 struct ocores_i2c *i2c;
349 struct ocores_i2c_platform_data *pdata; 349 struct ocores_i2c_platform_data *pdata;
@@ -441,7 +441,7 @@ static int __devinit ocores_i2c_probe(struct platform_device *pdev)
441 return 0; 441 return 0;
442} 442}
443 443
444static int __devexit ocores_i2c_remove(struct platform_device *pdev) 444static int ocores_i2c_remove(struct platform_device *pdev)
445{ 445{
446 struct ocores_i2c *i2c = platform_get_drvdata(pdev); 446 struct ocores_i2c *i2c = platform_get_drvdata(pdev);
447 447
@@ -485,7 +485,7 @@ static SIMPLE_DEV_PM_OPS(ocores_i2c_pm, ocores_i2c_suspend, ocores_i2c_resume);
485 485
486static struct platform_driver ocores_i2c_driver = { 486static struct platform_driver ocores_i2c_driver = {
487 .probe = ocores_i2c_probe, 487 .probe = ocores_i2c_probe,
488 .remove = __devexit_p(ocores_i2c_remove), 488 .remove = ocores_i2c_remove,
489 .driver = { 489 .driver = {
490 .owner = THIS_MODULE, 490 .owner = THIS_MODULE,
491 .name = "ocores-i2c", 491 .name = "ocores-i2c",
diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c
index f44c83549fe5..484ca771fdff 100644
--- a/drivers/i2c/busses/i2c-octeon.c
+++ b/drivers/i2c/busses/i2c-octeon.c
@@ -446,7 +446,7 @@ static struct i2c_adapter octeon_i2c_ops = {
446/** 446/**
447 * octeon_i2c_setclock - Calculate and set clock divisors. 447 * octeon_i2c_setclock - Calculate and set clock divisors.
448 */ 448 */
449static int __devinit octeon_i2c_setclock(struct octeon_i2c *i2c) 449static int octeon_i2c_setclock(struct octeon_i2c *i2c)
450{ 450{
451 int tclk, thp_base, inc, thp_idx, mdiv_idx, ndiv_idx, foscl, diff; 451 int tclk, thp_base, inc, thp_idx, mdiv_idx, ndiv_idx, foscl, diff;
452 int thp = 0x18, mdiv = 2, ndiv = 0, delta_hz = 1000000; 452 int thp = 0x18, mdiv = 2, ndiv = 0, delta_hz = 1000000;
@@ -489,7 +489,7 @@ static int __devinit octeon_i2c_setclock(struct octeon_i2c *i2c)
489 return 0; 489 return 0;
490} 490}
491 491
492static int __devinit octeon_i2c_initlowlevel(struct octeon_i2c *i2c) 492static int octeon_i2c_initlowlevel(struct octeon_i2c *i2c)
493{ 493{
494 u8 status; 494 u8 status;
495 int tries; 495 int tries;
@@ -510,7 +510,7 @@ static int __devinit octeon_i2c_initlowlevel(struct octeon_i2c *i2c)
510 return -EIO; 510 return -EIO;
511} 511}
512 512
513static int __devinit octeon_i2c_probe(struct platform_device *pdev) 513static int octeon_i2c_probe(struct platform_device *pdev)
514{ 514{
515 int irq, result = 0; 515 int irq, result = 0;
516 struct octeon_i2c *i2c; 516 struct octeon_i2c *i2c;
@@ -609,7 +609,7 @@ out:
609 return result; 609 return result;
610}; 610};
611 611
612static int __devexit octeon_i2c_remove(struct platform_device *pdev) 612static int octeon_i2c_remove(struct platform_device *pdev)
613{ 613{
614 struct octeon_i2c *i2c = platform_get_drvdata(pdev); 614 struct octeon_i2c *i2c = platform_get_drvdata(pdev);
615 615
@@ -628,7 +628,7 @@ MODULE_DEVICE_TABLE(of, octeon_i2c_match);
628 628
629static struct platform_driver octeon_i2c_driver = { 629static struct platform_driver octeon_i2c_driver = {
630 .probe = octeon_i2c_probe, 630 .probe = octeon_i2c_probe,
631 .remove = __devexit_p(octeon_i2c_remove), 631 .remove = octeon_i2c_remove,
632 .driver = { 632 .driver = {
633 .owner = THIS_MODULE, 633 .owner = THIS_MODULE,
634 .name = DRV_NAME, 634 .name = DRV_NAME,
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 7a62acb7d262..20d41bfa7c19 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1069,7 +1069,7 @@ MODULE_DEVICE_TABLE(of, omap_i2c_of_match);
1069#define OMAP_I2C_SCHEME_0 0 1069#define OMAP_I2C_SCHEME_0 0
1070#define OMAP_I2C_SCHEME_1 1 1070#define OMAP_I2C_SCHEME_1 1
1071 1071
1072static int __devinit 1072static int
1073omap_i2c_probe(struct platform_device *pdev) 1073omap_i2c_probe(struct platform_device *pdev)
1074{ 1074{
1075 struct omap_i2c_dev *dev; 1075 struct omap_i2c_dev *dev;
@@ -1267,7 +1267,7 @@ err_free_mem:
1267 return r; 1267 return r;
1268} 1268}
1269 1269
1270static int __devexit omap_i2c_remove(struct platform_device *pdev) 1270static int omap_i2c_remove(struct platform_device *pdev)
1271{ 1271{
1272 struct omap_i2c_dev *dev = platform_get_drvdata(pdev); 1272 struct omap_i2c_dev *dev = platform_get_drvdata(pdev);
1273 int ret; 1273 int ret;
@@ -1333,7 +1333,7 @@ static struct dev_pm_ops omap_i2c_pm_ops = {
1333 1333
1334static struct platform_driver omap_i2c_driver = { 1334static struct platform_driver omap_i2c_driver = {
1335 .probe = omap_i2c_probe, 1335 .probe = omap_i2c_probe,
1336 .remove = __devexit_p(omap_i2c_remove), 1336 .remove = omap_i2c_remove,
1337 .driver = { 1337 .driver = {
1338 .name = "omap_i2c", 1338 .name = "omap_i2c",
1339 .owner = THIS_MODULE, 1339 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/i2c-parport-light.c b/drivers/i2c/busses/i2c-parport-light.c
index 4b95f7a63a3b..aa9577881925 100644
--- a/drivers/i2c/busses/i2c-parport-light.c
+++ b/drivers/i2c/busses/i2c-parport-light.c
@@ -135,7 +135,7 @@ static struct lineop parport_ctrl_irq = {
135 .port = PORT_CTRL, 135 .port = PORT_CTRL,
136}; 136};
137 137
138static int __devinit i2c_parport_probe(struct platform_device *pdev) 138static int i2c_parport_probe(struct platform_device *pdev)
139{ 139{
140 int err; 140 int err;
141 141
@@ -169,7 +169,7 @@ static int __devinit i2c_parport_probe(struct platform_device *pdev)
169 return 0; 169 return 0;
170} 170}
171 171
172static int __devexit i2c_parport_remove(struct platform_device *pdev) 172static int i2c_parport_remove(struct platform_device *pdev)
173{ 173{
174 if (ara) { 174 if (ara) {
175 line_set(0, &parport_ctrl_irq); 175 line_set(0, &parport_ctrl_irq);
@@ -191,7 +191,7 @@ static struct platform_driver i2c_parport_driver = {
191 .name = DRVNAME, 191 .name = DRVNAME,
192 }, 192 },
193 .probe = i2c_parport_probe, 193 .probe = i2c_parport_probe,
194 .remove = __devexit_p(i2c_parport_remove), 194 .remove = i2c_parport_remove,
195}; 195};
196 196
197static int __init i2c_parport_device_add(u16 address) 197static int __init i2c_parport_device_add(u16 address)
diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c
index 12edefd4183a..615f632c846f 100644
--- a/drivers/i2c/busses/i2c-pasemi.c
+++ b/drivers/i2c/busses/i2c-pasemi.c
@@ -340,7 +340,7 @@ static const struct i2c_algorithm smbus_algorithm = {
340 .functionality = pasemi_smb_func, 340 .functionality = pasemi_smb_func,
341}; 341};
342 342
343static int __devinit pasemi_smb_probe(struct pci_dev *dev, 343static int pasemi_smb_probe(struct pci_dev *dev,
344 const struct pci_device_id *id) 344 const struct pci_device_id *id)
345{ 345{
346 struct pasemi_smbus *smbus; 346 struct pasemi_smbus *smbus;
@@ -392,7 +392,7 @@ static int __devinit pasemi_smb_probe(struct pci_dev *dev,
392 return error; 392 return error;
393} 393}
394 394
395static void __devexit pasemi_smb_remove(struct pci_dev *dev) 395static void pasemi_smb_remove(struct pci_dev *dev)
396{ 396{
397 struct pasemi_smbus *smbus = pci_get_drvdata(dev); 397 struct pasemi_smbus *smbus = pci_get_drvdata(dev);
398 398
@@ -412,7 +412,7 @@ static struct pci_driver pasemi_smb_driver = {
412 .name = "i2c-pasemi", 412 .name = "i2c-pasemi",
413 .id_table = pasemi_smb_ids, 413 .id_table = pasemi_smb_ids,
414 .probe = pasemi_smb_probe, 414 .probe = pasemi_smb_probe,
415 .remove = __devexit_p(pasemi_smb_remove), 415 .remove = pasemi_smb_remove,
416}; 416};
417 417
418module_pci_driver(pasemi_smb_driver); 418module_pci_driver(pasemi_smb_driver);
diff --git a/drivers/i2c/busses/i2c-pca-isa.c b/drivers/i2c/busses/i2c-pca-isa.c
index 29933f87d8fa..323f061a3163 100644
--- a/drivers/i2c/busses/i2c-pca-isa.c
+++ b/drivers/i2c/busses/i2c-pca-isa.c
@@ -119,7 +119,7 @@ static struct i2c_adapter pca_isa_ops = {
119 .timeout = HZ, 119 .timeout = HZ,
120}; 120};
121 121
122static int __devinit pca_isa_match(struct device *dev, unsigned int id) 122static int pca_isa_match(struct device *dev, unsigned int id)
123{ 123{
124 int match = base != 0; 124 int match = base != 0;
125 125
@@ -132,7 +132,7 @@ static int __devinit pca_isa_match(struct device *dev, unsigned int id)
132 return match; 132 return match;
133} 133}
134 134
135static int __devinit pca_isa_probe(struct device *dev, unsigned int id) 135static int pca_isa_probe(struct device *dev, unsigned int id)
136{ 136{
137 init_waitqueue_head(&pca_wait); 137 init_waitqueue_head(&pca_wait);
138 138
@@ -174,7 +174,7 @@ static int __devinit pca_isa_probe(struct device *dev, unsigned int id)
174 return -ENODEV; 174 return -ENODEV;
175} 175}
176 176
177static int __devexit pca_isa_remove(struct device *dev, unsigned int id) 177static int pca_isa_remove(struct device *dev, unsigned int id)
178{ 178{
179 i2c_del_adapter(&pca_isa_ops); 179 i2c_del_adapter(&pca_isa_ops);
180 180
@@ -190,7 +190,7 @@ static int __devexit pca_isa_remove(struct device *dev, unsigned int id)
190static struct isa_driver pca_isa_driver = { 190static struct isa_driver pca_isa_driver = {
191 .match = pca_isa_match, 191 .match = pca_isa_match,
192 .probe = pca_isa_probe, 192 .probe = pca_isa_probe,
193 .remove = __devexit_p(pca_isa_remove), 193 .remove = pca_isa_remove,
194 .driver = { 194 .driver = {
195 .owner = THIS_MODULE, 195 .owner = THIS_MODULE,
196 .name = DRIVER, 196 .name = DRIVER,
diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
index 675878f49f76..a30d2f613c03 100644
--- a/drivers/i2c/busses/i2c-pca-platform.c
+++ b/drivers/i2c/busses/i2c-pca-platform.c
@@ -131,7 +131,7 @@ static irqreturn_t i2c_pca_pf_handler(int this_irq, void *dev_id)
131} 131}
132 132
133 133
134static int __devinit i2c_pca_pf_probe(struct platform_device *pdev) 134static int i2c_pca_pf_probe(struct platform_device *pdev)
135{ 135{
136 struct i2c_pca_pf_data *i2c; 136 struct i2c_pca_pf_data *i2c;
137 struct resource *res; 137 struct resource *res;
@@ -257,7 +257,7 @@ e_print:
257 return ret; 257 return ret;
258} 258}
259 259
260static int __devexit i2c_pca_pf_remove(struct platform_device *pdev) 260static int i2c_pca_pf_remove(struct platform_device *pdev)
261{ 261{
262 struct i2c_pca_pf_data *i2c = platform_get_drvdata(pdev); 262 struct i2c_pca_pf_data *i2c = platform_get_drvdata(pdev);
263 platform_set_drvdata(pdev, NULL); 263 platform_set_drvdata(pdev, NULL);
@@ -279,7 +279,7 @@ static int __devexit i2c_pca_pf_remove(struct platform_device *pdev)
279 279
280static struct platform_driver i2c_pca_pf_driver = { 280static struct platform_driver i2c_pca_pf_driver = {
281 .probe = i2c_pca_pf_probe, 281 .probe = i2c_pca_pf_probe,
282 .remove = __devexit_p(i2c_pca_pf_remove), 282 .remove = i2c_pca_pf_remove,
283 .driver = { 283 .driver = {
284 .name = "i2c-pca-platform", 284 .name = "i2c-pca-platform",
285 .owner = THIS_MODULE, 285 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index f7216ed2f3a9..39ab78c1a02c 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -99,7 +99,7 @@ MODULE_PARM_DESC(force_addr,
99static int srvrworks_csb5_delay; 99static int srvrworks_csb5_delay;
100static struct pci_driver piix4_driver; 100static struct pci_driver piix4_driver;
101 101
102static struct dmi_system_id __devinitdata piix4_dmi_blacklist[] = { 102static const struct dmi_system_id piix4_dmi_blacklist[] = {
103 { 103 {
104 .ident = "Sapphire AM2RD790", 104 .ident = "Sapphire AM2RD790",
105 .matches = { 105 .matches = {
@@ -119,7 +119,7 @@ static struct dmi_system_id __devinitdata piix4_dmi_blacklist[] = {
119 119
120/* The IBM entry is in a separate table because we only check it 120/* The IBM entry is in a separate table because we only check it
121 on Intel-based systems */ 121 on Intel-based systems */
122static struct dmi_system_id __devinitdata piix4_dmi_ibm[] = { 122static const struct dmi_system_id piix4_dmi_ibm[] = {
123 { 123 {
124 .ident = "IBM", 124 .ident = "IBM",
125 .matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), }, 125 .matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
@@ -131,8 +131,8 @@ struct i2c_piix4_adapdata {
131 unsigned short smba; 131 unsigned short smba;
132}; 132};
133 133
134static int __devinit piix4_setup(struct pci_dev *PIIX4_dev, 134static int piix4_setup(struct pci_dev *PIIX4_dev,
135 const struct pci_device_id *id) 135 const struct pci_device_id *id)
136{ 136{
137 unsigned char temp; 137 unsigned char temp;
138 unsigned short piix4_smba; 138 unsigned short piix4_smba;
@@ -230,8 +230,8 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
230 return piix4_smba; 230 return piix4_smba;
231} 231}
232 232
233static int __devinit piix4_setup_sb800(struct pci_dev *PIIX4_dev, 233static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,
234 const struct pci_device_id *id) 234 const struct pci_device_id *id)
235{ 235{
236 unsigned short piix4_smba; 236 unsigned short piix4_smba;
237 unsigned short smba_idx = 0xcd6; 237 unsigned short smba_idx = 0xcd6;
@@ -294,9 +294,9 @@ static int __devinit piix4_setup_sb800(struct pci_dev *PIIX4_dev,
294 return piix4_smba; 294 return piix4_smba;
295} 295}
296 296
297static int __devinit piix4_setup_aux(struct pci_dev *PIIX4_dev, 297static int piix4_setup_aux(struct pci_dev *PIIX4_dev,
298 const struct pci_device_id *id, 298 const struct pci_device_id *id,
299 unsigned short base_reg_addr) 299 unsigned short base_reg_addr)
300{ 300{
301 /* Set up auxiliary SMBus controllers found on some 301 /* Set up auxiliary SMBus controllers found on some
302 * AMD chipsets e.g. SP5100 (SB700 derivative) */ 302 * AMD chipsets e.g. SP5100 (SB700 derivative) */
@@ -540,9 +540,8 @@ MODULE_DEVICE_TABLE (pci, piix4_ids);
540static struct i2c_adapter *piix4_main_adapter; 540static struct i2c_adapter *piix4_main_adapter;
541static struct i2c_adapter *piix4_aux_adapter; 541static struct i2c_adapter *piix4_aux_adapter;
542 542
543static int __devinit piix4_add_adapter(struct pci_dev *dev, 543static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
544 unsigned short smba, 544 struct i2c_adapter **padap)
545 struct i2c_adapter **padap)
546{ 545{
547 struct i2c_adapter *adap; 546 struct i2c_adapter *adap;
548 struct i2c_piix4_adapdata *adapdata; 547 struct i2c_piix4_adapdata *adapdata;
@@ -588,8 +587,7 @@ static int __devinit piix4_add_adapter(struct pci_dev *dev,
588 return 0; 587 return 0;
589} 588}
590 589
591static int __devinit piix4_probe(struct pci_dev *dev, 590static int piix4_probe(struct pci_dev *dev, const struct pci_device_id *id)
592 const struct pci_device_id *id)
593{ 591{
594 int retval; 592 int retval;
595 593
@@ -626,7 +624,7 @@ static int __devinit piix4_probe(struct pci_dev *dev,
626 return 0; 624 return 0;
627} 625}
628 626
629static void __devexit piix4_adap_remove(struct i2c_adapter *adap) 627static void piix4_adap_remove(struct i2c_adapter *adap)
630{ 628{
631 struct i2c_piix4_adapdata *adapdata = i2c_get_adapdata(adap); 629 struct i2c_piix4_adapdata *adapdata = i2c_get_adapdata(adap);
632 630
@@ -638,7 +636,7 @@ static void __devexit piix4_adap_remove(struct i2c_adapter *adap)
638 } 636 }
639} 637}
640 638
641static void __devexit piix4_remove(struct pci_dev *dev) 639static void piix4_remove(struct pci_dev *dev)
642{ 640{
643 if (piix4_main_adapter) { 641 if (piix4_main_adapter) {
644 piix4_adap_remove(piix4_main_adapter); 642 piix4_adap_remove(piix4_main_adapter);
@@ -655,7 +653,7 @@ static struct pci_driver piix4_driver = {
655 .name = "piix4_smbus", 653 .name = "piix4_smbus",
656 .id_table = piix4_ids, 654 .id_table = piix4_ids,
657 .probe = piix4_probe, 655 .probe = piix4_probe,
658 .remove = __devexit_p(piix4_remove), 656 .remove = piix4_remove,
659}; 657};
660 658
661module_pci_driver(piix4_driver); 659module_pci_driver(piix4_driver);
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c
index 3d71395ae1f7..083d68cfaf0b 100644
--- a/drivers/i2c/busses/i2c-pmcmsp.c
+++ b/drivers/i2c/busses/i2c-pmcmsp.c
@@ -270,7 +270,7 @@ static irqreturn_t pmcmsptwi_interrupt(int irq, void *ptr)
270/* 270/*
271 * Probe for and register the device and return 0 if there is one. 271 * Probe for and register the device and return 0 if there is one.
272 */ 272 */
273static int __devinit pmcmsptwi_probe(struct platform_device *pldev) 273static int pmcmsptwi_probe(struct platform_device *pldev)
274{ 274{
275 struct resource *res; 275 struct resource *res;
276 int rc = -ENODEV; 276 int rc = -ENODEV;
@@ -368,7 +368,7 @@ ret_err:
368/* 368/*
369 * Release the device and return 0 if there is one. 369 * Release the device and return 0 if there is one.
370 */ 370 */
371static int __devexit pmcmsptwi_remove(struct platform_device *pldev) 371static int pmcmsptwi_remove(struct platform_device *pldev)
372{ 372{
373 struct resource *res; 373 struct resource *res;
374 374
@@ -628,7 +628,7 @@ static struct i2c_adapter pmcmsptwi_adapter = {
628 628
629static struct platform_driver pmcmsptwi_driver = { 629static struct platform_driver pmcmsptwi_driver = {
630 .probe = pmcmsptwi_probe, 630 .probe = pmcmsptwi_probe,
631 .remove = __devexit_p(pmcmsptwi_remove), 631 .remove = pmcmsptwi_remove,
632 .driver = { 632 .driver = {
633 .name = DRV_NAME, 633 .name = DRV_NAME,
634 .owner = THIS_MODULE, 634 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 8488bddfe465..ce4097012e97 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -619,7 +619,7 @@ static SIMPLE_DEV_PM_OPS(i2c_pnx_pm,
619#define PNX_I2C_PM NULL 619#define PNX_I2C_PM NULL
620#endif 620#endif
621 621
622static int __devinit i2c_pnx_probe(struct platform_device *pdev) 622static int i2c_pnx_probe(struct platform_device *pdev)
623{ 623{
624 unsigned long tmp; 624 unsigned long tmp;
625 int ret = 0; 625 int ret = 0;
@@ -765,7 +765,7 @@ err_kzalloc:
765 return ret; 765 return ret;
766} 766}
767 767
768static int __devexit i2c_pnx_remove(struct platform_device *pdev) 768static int i2c_pnx_remove(struct platform_device *pdev)
769{ 769{
770 struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev); 770 struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev);
771 771
@@ -797,7 +797,7 @@ static struct platform_driver i2c_pnx_driver = {
797 .pm = PNX_I2C_PM, 797 .pm = PNX_I2C_PM,
798 }, 798 },
799 .probe = i2c_pnx_probe, 799 .probe = i2c_pnx_probe,
800 .remove = __devexit_p(i2c_pnx_remove), 800 .remove = i2c_pnx_remove,
801}; 801};
802 802
803static int __init i2c_adap_pnx_init(void) 803static int __init i2c_adap_pnx_init(void)
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index 5285f8565de4..0dd5b334d090 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -210,7 +210,7 @@ static const struct i2c_algorithm i2c_powermac_algorithm = {
210}; 210};
211 211
212 212
213static int __devexit i2c_powermac_remove(struct platform_device *dev) 213static int i2c_powermac_remove(struct platform_device *dev)
214{ 214{
215 struct i2c_adapter *adapter = platform_get_drvdata(dev); 215 struct i2c_adapter *adapter = platform_get_drvdata(dev);
216 int rc; 216 int rc;
@@ -227,7 +227,7 @@ static int __devexit i2c_powermac_remove(struct platform_device *dev)
227 return 0; 227 return 0;
228} 228}
229 229
230static u32 __devinit i2c_powermac_get_addr(struct i2c_adapter *adap, 230static u32 i2c_powermac_get_addr(struct i2c_adapter *adap,
231 struct pmac_i2c_bus *bus, 231 struct pmac_i2c_bus *bus,
232 struct device_node *node) 232 struct device_node *node)
233{ 233{
@@ -255,7 +255,7 @@ static u32 __devinit i2c_powermac_get_addr(struct i2c_adapter *adap,
255 return 0xffffffff; 255 return 0xffffffff;
256} 256}
257 257
258static void __devinit i2c_powermac_create_one(struct i2c_adapter *adap, 258static void i2c_powermac_create_one(struct i2c_adapter *adap,
259 const char *type, 259 const char *type,
260 u32 addr) 260 u32 addr)
261{ 261{
@@ -271,7 +271,7 @@ static void __devinit i2c_powermac_create_one(struct i2c_adapter *adap,
271 type); 271 type);
272} 272}
273 273
274static void __devinit i2c_powermac_add_missing(struct i2c_adapter *adap, 274static void i2c_powermac_add_missing(struct i2c_adapter *adap,
275 struct pmac_i2c_bus *bus, 275 struct pmac_i2c_bus *bus,
276 bool found_onyx) 276 bool found_onyx)
277{ 277{
@@ -297,7 +297,7 @@ static void __devinit i2c_powermac_add_missing(struct i2c_adapter *adap,
297 } 297 }
298} 298}
299 299
300static bool __devinit i2c_powermac_get_type(struct i2c_adapter *adap, 300static bool i2c_powermac_get_type(struct i2c_adapter *adap,
301 struct device_node *node, 301 struct device_node *node,
302 u32 addr, char *type, int type_size) 302 u32 addr, char *type, int type_size)
303{ 303{
@@ -336,7 +336,7 @@ static bool __devinit i2c_powermac_get_type(struct i2c_adapter *adap,
336 return false; 336 return false;
337} 337}
338 338
339static void __devinit i2c_powermac_register_devices(struct i2c_adapter *adap, 339static void i2c_powermac_register_devices(struct i2c_adapter *adap,
340 struct pmac_i2c_bus *bus) 340 struct pmac_i2c_bus *bus)
341{ 341{
342 struct i2c_client *newdev; 342 struct i2c_client *newdev;
@@ -403,7 +403,7 @@ static void __devinit i2c_powermac_register_devices(struct i2c_adapter *adap,
403 i2c_powermac_add_missing(adap, bus, found_onyx); 403 i2c_powermac_add_missing(adap, bus, found_onyx);
404} 404}
405 405
406static int __devinit i2c_powermac_probe(struct platform_device *dev) 406static int i2c_powermac_probe(struct platform_device *dev)
407{ 407{
408 struct pmac_i2c_bus *bus = dev->dev.platform_data; 408 struct pmac_i2c_bus *bus = dev->dev.platform_data;
409 struct device_node *parent = NULL; 409 struct device_node *parent = NULL;
@@ -467,7 +467,7 @@ static int __devinit i2c_powermac_probe(struct platform_device *dev)
467 467
468static struct platform_driver i2c_powermac_driver = { 468static struct platform_driver i2c_powermac_driver = {
469 .probe = i2c_powermac_probe, 469 .probe = i2c_powermac_probe,
470 .remove = __devexit_p(i2c_powermac_remove), 470 .remove = i2c_powermac_remove,
471 .driver = { 471 .driver = {
472 .name = "i2c-powermac", 472 .name = "i2c-powermac",
473 .bus = &platform_bus_type, 473 .bus = &platform_bus_type,
diff --git a/drivers/i2c/busses/i2c-puv3.c b/drivers/i2c/busses/i2c-puv3.c
index d8515be00b98..d7c512d717a7 100644
--- a/drivers/i2c/busses/i2c-puv3.c
+++ b/drivers/i2c/busses/i2c-puv3.c
@@ -184,7 +184,7 @@ static struct i2c_algorithm puv3_i2c_algorithm = {
184/* 184/*
185 * Main initialization routine. 185 * Main initialization routine.
186 */ 186 */
187static int __devinit puv3_i2c_probe(struct platform_device *pdev) 187static int puv3_i2c_probe(struct platform_device *pdev)
188{ 188{
189 struct i2c_adapter *adapter; 189 struct i2c_adapter *adapter;
190 struct resource *mem; 190 struct resource *mem;
@@ -231,7 +231,7 @@ fail_nomem:
231 return rc; 231 return rc;
232} 232}
233 233
234static int __devexit puv3_i2c_remove(struct platform_device *pdev) 234static int puv3_i2c_remove(struct platform_device *pdev)
235{ 235{
236 struct i2c_adapter *adapter = platform_get_drvdata(pdev); 236 struct i2c_adapter *adapter = platform_get_drvdata(pdev);
237 struct resource *mem; 237 struct resource *mem;
@@ -276,7 +276,7 @@ static SIMPLE_DEV_PM_OPS(puv3_i2c_pm, puv3_i2c_suspend, NULL);
276 276
277static struct platform_driver puv3_i2c_driver = { 277static struct platform_driver puv3_i2c_driver = {
278 .probe = puv3_i2c_probe, 278 .probe = puv3_i2c_probe,
279 .remove = __devexit_p(puv3_i2c_remove), 279 .remove = puv3_i2c_remove,
280 .driver = { 280 .driver = {
281 .name = "PKUnity-v3-I2C", 281 .name = "PKUnity-v3-I2C",
282 .owner = THIS_MODULE, 282 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/i2c-pxa-pci.c b/drivers/i2c/busses/i2c-pxa-pci.c
index 4dc9bef17d77..3d4985695aed 100644
--- a/drivers/i2c/busses/i2c-pxa-pci.c
+++ b/drivers/i2c/busses/i2c-pxa-pci.c
@@ -94,7 +94,7 @@ out:
94 return ERR_PTR(ret); 94 return ERR_PTR(ret);
95} 95}
96 96
97static int __devinit ce4100_i2c_probe(struct pci_dev *dev, 97static int ce4100_i2c_probe(struct pci_dev *dev,
98 const struct pci_device_id *ent) 98 const struct pci_device_id *ent)
99{ 99{
100 int ret; 100 int ret;
@@ -135,7 +135,7 @@ err_mem:
135 return ret; 135 return ret;
136} 136}
137 137
138static void __devexit ce4100_i2c_remove(struct pci_dev *dev) 138static void ce4100_i2c_remove(struct pci_dev *dev)
139{ 139{
140 struct ce4100_devices *sds; 140 struct ce4100_devices *sds;
141 unsigned int i; 141 unsigned int i;
@@ -160,7 +160,7 @@ static struct pci_driver ce4100_i2c_driver = {
160 .name = "ce4100_i2c", 160 .name = "ce4100_i2c",
161 .id_table = ce4100_i2c_devices, 161 .id_table = ce4100_i2c_devices,
162 .probe = ce4100_i2c_probe, 162 .probe = ce4100_i2c_probe,
163 .remove = __devexit_p(ce4100_i2c_remove), 163 .remove = ce4100_i2c_remove,
164}; 164};
165 165
166module_pci_driver(ce4100_i2c_driver); 166module_pci_driver(ce4100_i2c_driver);
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 72a8071a5556..9bd4d73d29e3 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -613,7 +613,7 @@ static const struct i2c_algorithm rcar_i2c_algo = {
613 .functionality = rcar_i2c_func, 613 .functionality = rcar_i2c_func,
614}; 614};
615 615
616static int __devinit rcar_i2c_probe(struct platform_device *pdev) 616static int rcar_i2c_probe(struct platform_device *pdev)
617{ 617{
618 struct i2c_rcar_platform_data *pdata = pdev->dev.platform_data; 618 struct i2c_rcar_platform_data *pdata = pdev->dev.platform_data;
619 struct rcar_i2c_priv *priv; 619 struct rcar_i2c_priv *priv;
@@ -682,7 +682,7 @@ static int __devinit rcar_i2c_probe(struct platform_device *pdev)
682 return 0; 682 return 0;
683} 683}
684 684
685static int __devexit rcar_i2c_remove(struct platform_device *pdev) 685static int rcar_i2c_remove(struct platform_device *pdev)
686{ 686{
687 struct rcar_i2c_priv *priv = platform_get_drvdata(pdev); 687 struct rcar_i2c_priv *priv = platform_get_drvdata(pdev);
688 struct device *dev = &pdev->dev; 688 struct device *dev = &pdev->dev;
@@ -699,7 +699,7 @@ static struct platform_driver rcar_i2c_driver = {
699 .owner = THIS_MODULE, 699 .owner = THIS_MODULE,
700 }, 700 },
701 .probe = rcar_i2c_probe, 701 .probe = rcar_i2c_probe,
702 .remove = __devexit_p(rcar_i2c_remove), 702 .remove = rcar_i2c_remove,
703}; 703};
704 704
705module_platform_driver(rcar_i2c_driver); 705module_platform_driver(rcar_i2c_driver);
diff --git a/drivers/i2c/busses/i2c-s6000.c b/drivers/i2c/busses/i2c-s6000.c
index b76a29d1f8e4..008836409efe 100644
--- a/drivers/i2c/busses/i2c-s6000.c
+++ b/drivers/i2c/busses/i2c-s6000.c
@@ -248,7 +248,7 @@ static struct i2c_algorithm s6i2c_algorithm = {
248 .functionality = s6i2c_functionality, 248 .functionality = s6i2c_functionality,
249}; 249};
250 250
251static u16 __devinit nanoseconds_on_clk(struct s6i2c_if *iface, u32 ns) 251static u16 nanoseconds_on_clk(struct s6i2c_if *iface, u32 ns)
252{ 252{
253 u32 dividend = ((clk_get_rate(iface->clk) / 1000) * ns) / 1000000; 253 u32 dividend = ((clk_get_rate(iface->clk) / 1000) * ns) / 1000000;
254 if (dividend > 0xffff) 254 if (dividend > 0xffff)
@@ -256,7 +256,7 @@ static u16 __devinit nanoseconds_on_clk(struct s6i2c_if *iface, u32 ns)
256 return dividend; 256 return dividend;
257} 257}
258 258
259static int __devinit s6i2c_probe(struct platform_device *dev) 259static int s6i2c_probe(struct platform_device *dev)
260{ 260{
261 struct s6i2c_if *iface = &s6i2c_if; 261 struct s6i2c_if *iface = &s6i2c_if;
262 struct i2c_adapter *p_adap; 262 struct i2c_adapter *p_adap;
@@ -361,7 +361,7 @@ err_out:
361 return rc; 361 return rc;
362} 362}
363 363
364static int __devexit s6i2c_remove(struct platform_device *pdev) 364static int s6i2c_remove(struct platform_device *pdev)
365{ 365{
366 struct s6i2c_if *iface = platform_get_drvdata(pdev); 366 struct s6i2c_if *iface = platform_get_drvdata(pdev);
367 i2c_wr16(iface, S6_I2C_ENABLE, 0); 367 i2c_wr16(iface, S6_I2C_ENABLE, 0);
@@ -378,7 +378,7 @@ static int __devexit s6i2c_remove(struct platform_device *pdev)
378 378
379static struct platform_driver s6i2c_driver = { 379static struct platform_driver s6i2c_driver = {
380 .probe = s6i2c_probe, 380 .probe = s6i2c_probe,
381 .remove = __devexit_p(s6i2c_remove), 381 .remove = s6i2c_remove,
382 .driver = { 382 .driver = {
383 .name = DRV_NAME, 383 .name = DRV_NAME,
384 .owner = THIS_MODULE, 384 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c
index c0c9dffbdb12..3a2253e1bf59 100644
--- a/drivers/i2c/busses/i2c-sh7760.c
+++ b/drivers/i2c/busses/i2c-sh7760.c
@@ -390,7 +390,7 @@ static const struct i2c_algorithm sh7760_i2c_algo = {
390 * iclk = mclk/(CDF + 1). iclk must be < 20MHz. 390 * iclk = mclk/(CDF + 1). iclk must be < 20MHz.
391 * scl = iclk/(SCGD*8 + 20). 391 * scl = iclk/(SCGD*8 + 20).
392 */ 392 */
393static int __devinit calc_CCR(unsigned long scl_hz) 393static int calc_CCR(unsigned long scl_hz)
394{ 394{
395 struct clk *mclk; 395 struct clk *mclk;
396 unsigned long mck, m1, dff, odff, iclk; 396 unsigned long mck, m1, dff, odff, iclk;
@@ -430,7 +430,7 @@ static int __devinit calc_CCR(unsigned long scl_hz)
430 return ((scgdm << 2) | cdfm); 430 return ((scgdm << 2) | cdfm);
431} 431}
432 432
433static int __devinit sh7760_i2c_probe(struct platform_device *pdev) 433static int sh7760_i2c_probe(struct platform_device *pdev)
434{ 434{
435 struct sh7760_i2c_platdata *pd; 435 struct sh7760_i2c_platdata *pd;
436 struct resource *res; 436 struct resource *res;
@@ -536,7 +536,7 @@ out0:
536 return ret; 536 return ret;
537} 537}
538 538
539static int __devexit sh7760_i2c_remove(struct platform_device *pdev) 539static int sh7760_i2c_remove(struct platform_device *pdev)
540{ 540{
541 struct cami2c *id = platform_get_drvdata(pdev); 541 struct cami2c *id = platform_get_drvdata(pdev);
542 542
@@ -557,7 +557,7 @@ static struct platform_driver sh7760_i2c_drv = {
557 .owner = THIS_MODULE, 557 .owner = THIS_MODULE,
558 }, 558 },
559 .probe = sh7760_i2c_probe, 559 .probe = sh7760_i2c_probe,
560 .remove = __devexit_p(sh7760_i2c_remove), 560 .remove = sh7760_i2c_remove,
561}; 561};
562 562
563module_platform_driver(sh7760_i2c_drv); 563module_platform_driver(sh7760_i2c_drv);
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 9411c1b892c0..b6e7a83a8296 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -758,7 +758,7 @@ static const struct dev_pm_ops sh_mobile_i2c_dev_pm_ops = {
758 .runtime_resume = sh_mobile_i2c_runtime_nop, 758 .runtime_resume = sh_mobile_i2c_runtime_nop,
759}; 759};
760 760
761static const struct of_device_id sh_mobile_i2c_dt_ids[] __devinitconst = { 761static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
762 { .compatible = "renesas,rmobile-iic", }, 762 { .compatible = "renesas,rmobile-iic", },
763 {}, 763 {},
764}; 764};
diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c
index 5574a47792fb..3f1818b87974 100644
--- a/drivers/i2c/busses/i2c-sirf.c
+++ b/drivers/i2c/busses/i2c-sirf.c
@@ -258,7 +258,7 @@ static const struct i2c_algorithm i2c_sirfsoc_algo = {
258 .functionality = i2c_sirfsoc_func, 258 .functionality = i2c_sirfsoc_func,
259}; 259};
260 260
261static int __devinit i2c_sirfsoc_probe(struct platform_device *pdev) 261static int i2c_sirfsoc_probe(struct platform_device *pdev)
262{ 262{
263 struct sirfsoc_i2c *siic; 263 struct sirfsoc_i2c *siic;
264 struct i2c_adapter *adap; 264 struct i2c_adapter *adap;
@@ -385,7 +385,7 @@ err_get_clk:
385 return err; 385 return err;
386} 386}
387 387
388static int __devexit i2c_sirfsoc_remove(struct platform_device *pdev) 388static int i2c_sirfsoc_remove(struct platform_device *pdev)
389{ 389{
390 struct i2c_adapter *adapter = platform_get_drvdata(pdev); 390 struct i2c_adapter *adapter = platform_get_drvdata(pdev);
391 struct sirfsoc_i2c *siic = adapter->algo_data; 391 struct sirfsoc_i2c *siic = adapter->algo_data;
@@ -433,7 +433,7 @@ static const struct dev_pm_ops i2c_sirfsoc_pm_ops = {
433}; 433};
434#endif 434#endif
435 435
436static const struct of_device_id sirfsoc_i2c_of_match[] __devinitconst = { 436static const struct of_device_id sirfsoc_i2c_of_match[] = {
437 { .compatible = "sirf,prima2-i2c", }, 437 { .compatible = "sirf,prima2-i2c", },
438 {}, 438 {},
439}; 439};
@@ -449,7 +449,7 @@ static struct platform_driver i2c_sirfsoc_driver = {
449 .of_match_table = sirfsoc_i2c_of_match, 449 .of_match_table = sirfsoc_i2c_of_match,
450 }, 450 },
451 .probe = i2c_sirfsoc_probe, 451 .probe = i2c_sirfsoc_probe,
452 .remove = __devexit_p(i2c_sirfsoc_remove), 452 .remove = i2c_sirfsoc_remove,
453}; 453};
454module_platform_driver(i2c_sirfsoc_driver); 454module_platform_driver(i2c_sirfsoc_driver);
455 455
diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c
index 87e5126d449c..79fd96a04386 100644
--- a/drivers/i2c/busses/i2c-sis5595.c
+++ b/drivers/i2c/busses/i2c-sis5595.c
@@ -142,7 +142,7 @@ static void sis5595_write(u8 reg, u8 data)
142 outb(data, sis5595_base + SMB_DAT); 142 outb(data, sis5595_base + SMB_DAT);
143} 143}
144 144
145static int __devinit sis5595_setup(struct pci_dev *SIS5595_dev) 145static int sis5595_setup(struct pci_dev *SIS5595_dev)
146{ 146{
147 u16 a; 147 u16 a;
148 u8 val; 148 u8 val;
@@ -376,7 +376,7 @@ static DEFINE_PCI_DEVICE_TABLE(sis5595_ids) = {
376 376
377MODULE_DEVICE_TABLE (pci, sis5595_ids); 377MODULE_DEVICE_TABLE (pci, sis5595_ids);
378 378
379static int __devinit sis5595_probe(struct pci_dev *dev, const struct pci_device_id *id) 379static int sis5595_probe(struct pci_dev *dev, const struct pci_device_id *id)
380{ 380{
381 int err; 381 int err;
382 382
diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
index 5d6723b7525e..de6dddb9f865 100644
--- a/drivers/i2c/busses/i2c-sis630.c
+++ b/drivers/i2c/busses/i2c-sis630.c
@@ -389,7 +389,7 @@ static u32 sis630_func(struct i2c_adapter *adapter)
389 I2C_FUNC_SMBUS_BLOCK_DATA; 389 I2C_FUNC_SMBUS_BLOCK_DATA;
390} 390}
391 391
392static int __devinit sis630_setup(struct pci_dev *sis630_dev) 392static int sis630_setup(struct pci_dev *sis630_dev)
393{ 393{
394 unsigned char b; 394 unsigned char b;
395 struct pci_dev *dummy = NULL; 395 struct pci_dev *dummy = NULL;
@@ -480,7 +480,7 @@ static DEFINE_PCI_DEVICE_TABLE(sis630_ids) = {
480 480
481MODULE_DEVICE_TABLE (pci, sis630_ids); 481MODULE_DEVICE_TABLE (pci, sis630_ids);
482 482
483static int __devinit sis630_probe(struct pci_dev *dev, const struct pci_device_id *id) 483static int sis630_probe(struct pci_dev *dev, const struct pci_device_id *id)
484{ 484{
485 if (sis630_setup(dev)) { 485 if (sis630_setup(dev)) {
486 dev_err(&dev->dev, "SIS630 comp. bus not detected, module not inserted.\n"); 486 dev_err(&dev->dev, "SIS630 comp. bus not detected, module not inserted.\n");
@@ -496,7 +496,7 @@ static int __devinit sis630_probe(struct pci_dev *dev, const struct pci_device_i
496 return i2c_add_adapter(&sis630_adapter); 496 return i2c_add_adapter(&sis630_adapter);
497} 497}
498 498
499static void __devexit sis630_remove(struct pci_dev *dev) 499static void sis630_remove(struct pci_dev *dev)
500{ 500{
501 if (acpi_base) { 501 if (acpi_base) {
502 i2c_del_adapter(&sis630_adapter); 502 i2c_del_adapter(&sis630_adapter);
@@ -510,7 +510,7 @@ static struct pci_driver sis630_driver = {
510 .name = "sis630_smbus", 510 .name = "sis630_smbus",
511 .id_table = sis630_ids, 511 .id_table = sis630_ids,
512 .probe = sis630_probe, 512 .probe = sis630_probe,
513 .remove = __devexit_p(sis630_remove), 513 .remove = sis630_remove,
514}; 514};
515 515
516module_pci_driver(sis630_driver); 516module_pci_driver(sis630_driver);
diff --git a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c
index 7b72614a9bc0..b9faf9b6002b 100644
--- a/drivers/i2c/busses/i2c-sis96x.c
+++ b/drivers/i2c/busses/i2c-sis96x.c
@@ -252,7 +252,7 @@ static DEFINE_PCI_DEVICE_TABLE(sis96x_ids) = {
252 252
253MODULE_DEVICE_TABLE (pci, sis96x_ids); 253MODULE_DEVICE_TABLE (pci, sis96x_ids);
254 254
255static int __devinit sis96x_probe(struct pci_dev *dev, 255static int sis96x_probe(struct pci_dev *dev,
256 const struct pci_device_id *id) 256 const struct pci_device_id *id)
257{ 257{
258 u16 ww = 0; 258 u16 ww = 0;
@@ -308,7 +308,7 @@ static int __devinit sis96x_probe(struct pci_dev *dev,
308 return retval; 308 return retval;
309} 309}
310 310
311static void __devexit sis96x_remove(struct pci_dev *dev) 311static void sis96x_remove(struct pci_dev *dev)
312{ 312{
313 if (sis96x_smbus_base) { 313 if (sis96x_smbus_base) {
314 i2c_del_adapter(&sis96x_adapter); 314 i2c_del_adapter(&sis96x_adapter);
@@ -321,7 +321,7 @@ static struct pci_driver sis96x_driver = {
321 .name = "sis96x_smbus", 321 .name = "sis96x_smbus",
322 .id_table = sis96x_ids, 322 .id_table = sis96x_ids,
323 .probe = sis96x_probe, 323 .probe = sis96x_probe,
324 .remove = __devexit_p(sis96x_remove), 324 .remove = sis96x_remove,
325}; 325};
326 326
327module_pci_driver(sis96x_driver); 327module_pci_driver(sis96x_driver);
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index dcea77bf6f50..7b38877ffec1 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -642,7 +642,7 @@ static const struct tegra_i2c_hw_feature tegra30_i2c_hw = {
642 642
643#if defined(CONFIG_OF) 643#if defined(CONFIG_OF)
644/* Match table for of_platform binding */ 644/* Match table for of_platform binding */
645static const struct of_device_id tegra_i2c_of_match[] __devinitconst = { 645static const struct of_device_id tegra_i2c_of_match[] = {
646 { .compatible = "nvidia,tegra30-i2c", .data = &tegra30_i2c_hw, }, 646 { .compatible = "nvidia,tegra30-i2c", .data = &tegra30_i2c_hw, },
647 { .compatible = "nvidia,tegra20-i2c", .data = &tegra20_i2c_hw, }, 647 { .compatible = "nvidia,tegra20-i2c", .data = &tegra20_i2c_hw, },
648 { .compatible = "nvidia,tegra20-i2c-dvc", .data = &tegra20_i2c_hw, }, 648 { .compatible = "nvidia,tegra20-i2c-dvc", .data = &tegra20_i2c_hw, },
@@ -651,7 +651,7 @@ static const struct of_device_id tegra_i2c_of_match[] __devinitconst = {
651MODULE_DEVICE_TABLE(of, tegra_i2c_of_match); 651MODULE_DEVICE_TABLE(of, tegra_i2c_of_match);
652#endif 652#endif
653 653
654static int __devinit tegra_i2c_probe(struct platform_device *pdev) 654static int tegra_i2c_probe(struct platform_device *pdev)
655{ 655{
656 struct tegra_i2c_dev *i2c_dev; 656 struct tegra_i2c_dev *i2c_dev;
657 struct tegra_i2c_platform_data *pdata = pdev->dev.platform_data; 657 struct tegra_i2c_platform_data *pdata = pdev->dev.platform_data;
@@ -769,7 +769,7 @@ static int __devinit tegra_i2c_probe(struct platform_device *pdev)
769 return 0; 769 return 0;
770} 770}
771 771
772static int __devexit tegra_i2c_remove(struct platform_device *pdev) 772static int tegra_i2c_remove(struct platform_device *pdev)
773{ 773{
774 struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev); 774 struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
775 i2c_del_adapter(&i2c_dev->adapter); 775 i2c_del_adapter(&i2c_dev->adapter);
@@ -817,7 +817,7 @@ static SIMPLE_DEV_PM_OPS(tegra_i2c_pm, tegra_i2c_suspend, tegra_i2c_resume);
817 817
818static struct platform_driver tegra_i2c_driver = { 818static struct platform_driver tegra_i2c_driver = {
819 .probe = tegra_i2c_probe, 819 .probe = tegra_i2c_probe,
820 .remove = __devexit_p(tegra_i2c_remove), 820 .remove = tegra_i2c_remove,
821 .driver = { 821 .driver = {
822 .name = "tegra-i2c", 822 .name = "tegra-i2c",
823 .owner = THIS_MODULE, 823 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/i2c-via.c b/drivers/i2c/busses/i2c-via.c
index 7ffee71ca190..be662511c58b 100644
--- a/drivers/i2c/busses/i2c-via.c
+++ b/drivers/i2c/busses/i2c-via.c
@@ -96,7 +96,7 @@ static DEFINE_PCI_DEVICE_TABLE(vt586b_ids) = {
96 96
97MODULE_DEVICE_TABLE (pci, vt586b_ids); 97MODULE_DEVICE_TABLE (pci, vt586b_ids);
98 98
99static int __devinit vt586b_probe(struct pci_dev *dev, const struct pci_device_id *id) 99static int vt586b_probe(struct pci_dev *dev, const struct pci_device_id *id)
100{ 100{
101 u16 base; 101 u16 base;
102 u8 rev; 102 u8 rev;
@@ -146,7 +146,7 @@ static int __devinit vt586b_probe(struct pci_dev *dev, const struct pci_device_i
146 return 0; 146 return 0;
147} 147}
148 148
149static void __devexit vt586b_remove(struct pci_dev *dev) 149static void vt586b_remove(struct pci_dev *dev)
150{ 150{
151 i2c_del_adapter(&vt586b_adapter); 151 i2c_del_adapter(&vt586b_adapter);
152 release_region(I2C_DIR, IOSPACE); 152 release_region(I2C_DIR, IOSPACE);
@@ -158,7 +158,7 @@ static struct pci_driver vt586b_driver = {
158 .name = "vt586b_smbus", 158 .name = "vt586b_smbus",
159 .id_table = vt586b_ids, 159 .id_table = vt586b_ids,
160 .probe = vt586b_probe, 160 .probe = vt586b_probe,
161 .remove = __devexit_p(vt586b_remove), 161 .remove = vt586b_remove,
162}; 162};
163 163
164module_pci_driver(vt586b_driver); 164module_pci_driver(vt586b_driver);
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
index 271c9a2b0fd7..b2d90e105f41 100644
--- a/drivers/i2c/busses/i2c-viapro.c
+++ b/drivers/i2c/busses/i2c-viapro.c
@@ -320,8 +320,8 @@ static struct i2c_adapter vt596_adapter = {
320 .algo = &smbus_algorithm, 320 .algo = &smbus_algorithm,
321}; 321};
322 322
323static int __devinit vt596_probe(struct pci_dev *pdev, 323static int vt596_probe(struct pci_dev *pdev,
324 const struct pci_device_id *id) 324 const struct pci_device_id *id)
325{ 325{
326 unsigned char temp; 326 unsigned char temp;
327 int error; 327 int error;
diff --git a/drivers/i2c/busses/i2c-viperboard.c b/drivers/i2c/busses/i2c-viperboard.c
index f5fa20dea906..f45c32c1ace6 100644
--- a/drivers/i2c/busses/i2c-viperboard.c
+++ b/drivers/i2c/busses/i2c-viperboard.c
@@ -360,7 +360,7 @@ static const struct i2c_algorithm vprbrd_algorithm = {
360 .functionality = vprbrd_i2c_func, 360 .functionality = vprbrd_i2c_func,
361}; 361};
362 362
363static int __devinit vprbrd_i2c_probe(struct platform_device *pdev) 363static int vprbrd_i2c_probe(struct platform_device *pdev)
364{ 364{
365 struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); 365 struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent);
366 struct vprbrd_i2c *vb_i2c; 366 struct vprbrd_i2c *vb_i2c;
@@ -418,7 +418,7 @@ error:
418 return ret; 418 return ret;
419} 419}
420 420
421static int __devexit vprbrd_i2c_remove(struct platform_device *pdev) 421static int vprbrd_i2c_remove(struct platform_device *pdev)
422{ 422{
423 struct vprbrd_i2c *vb_i2c = platform_get_drvdata(pdev); 423 struct vprbrd_i2c *vb_i2c = platform_get_drvdata(pdev);
424 int ret; 424 int ret;
@@ -432,7 +432,7 @@ static struct platform_driver vprbrd_i2c_driver = {
432 .driver.name = "viperboard-i2c", 432 .driver.name = "viperboard-i2c",
433 .driver.owner = THIS_MODULE, 433 .driver.owner = THIS_MODULE,
434 .probe = vprbrd_i2c_probe, 434 .probe = vprbrd_i2c_probe,
435 .remove = __devexit_p(vprbrd_i2c_remove), 435 .remove = vprbrd_i2c_remove,
436}; 436};
437 437
438static int __init vprbrd_i2c_init(void) 438static int __init vprbrd_i2c_init(void)
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index 641d0e5e3303..f042f6da0ace 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -689,7 +689,7 @@ static struct i2c_adapter xiic_adapter = {
689}; 689};
690 690
691 691
692static int __devinit xiic_i2c_probe(struct platform_device *pdev) 692static int xiic_i2c_probe(struct platform_device *pdev)
693{ 693{
694 struct xiic_i2c *i2c; 694 struct xiic_i2c *i2c;
695 struct xiic_i2c_platform_data *pdata; 695 struct xiic_i2c_platform_data *pdata;
@@ -774,7 +774,7 @@ resource_missing:
774 return -ENOENT; 774 return -ENOENT;
775} 775}
776 776
777static int __devexit xiic_i2c_remove(struct platform_device* pdev) 777static int xiic_i2c_remove(struct platform_device *pdev)
778{ 778{
779 struct xiic_i2c *i2c = platform_get_drvdata(pdev); 779 struct xiic_i2c *i2c = platform_get_drvdata(pdev);
780 struct resource *res; 780 struct resource *res;
@@ -800,7 +800,7 @@ static int __devexit xiic_i2c_remove(struct platform_device* pdev)
800} 800}
801 801
802#if defined(CONFIG_OF) 802#if defined(CONFIG_OF)
803static const struct of_device_id xiic_of_match[] __devinitconst = { 803static const struct of_device_id xiic_of_match[] = {
804 { .compatible = "xlnx,xps-iic-2.00.a", }, 804 { .compatible = "xlnx,xps-iic-2.00.a", },
805 {}, 805 {},
806}; 806};
@@ -809,7 +809,7 @@ MODULE_DEVICE_TABLE(of, xiic_of_match);
809 809
810static struct platform_driver xiic_i2c_driver = { 810static struct platform_driver xiic_i2c_driver = {
811 .probe = xiic_i2c_probe, 811 .probe = xiic_i2c_probe,
812 .remove = __devexit_p(xiic_i2c_remove), 812 .remove = xiic_i2c_remove,
813 .driver = { 813 .driver = {
814 .owner = THIS_MODULE, 814 .owner = THIS_MODULE,
815 .name = DRIVER_NAME, 815 .name = DRIVER_NAME,
diff --git a/drivers/i2c/busses/i2c-xlr.c b/drivers/i2c/busses/i2c-xlr.c
index 96d3fabd8883..a005265461da 100644
--- a/drivers/i2c/busses/i2c-xlr.c
+++ b/drivers/i2c/busses/i2c-xlr.c
@@ -214,7 +214,7 @@ static struct i2c_algorithm xlr_i2c_algo = {
214 .functionality = xlr_func, 214 .functionality = xlr_func,
215}; 215};
216 216
217static int __devinit xlr_i2c_probe(struct platform_device *pdev) 217static int xlr_i2c_probe(struct platform_device *pdev)
218{ 218{
219 struct xlr_i2c_private *priv; 219 struct xlr_i2c_private *priv;
220 struct resource *res; 220 struct resource *res;
@@ -251,7 +251,7 @@ static int __devinit xlr_i2c_probe(struct platform_device *pdev)
251 return 0; 251 return 0;
252} 252}
253 253
254static int __devexit xlr_i2c_remove(struct platform_device *pdev) 254static int xlr_i2c_remove(struct platform_device *pdev)
255{ 255{
256 struct xlr_i2c_private *priv; 256 struct xlr_i2c_private *priv;
257 257
@@ -263,7 +263,7 @@ static int __devexit xlr_i2c_remove(struct platform_device *pdev)
263 263
264static struct platform_driver xlr_i2c_driver = { 264static struct platform_driver xlr_i2c_driver = {
265 .probe = xlr_i2c_probe, 265 .probe = xlr_i2c_probe,
266 .remove = __devexit_p(xlr_i2c_remove), 266 .remove = xlr_i2c_remove,
267 .driver = { 267 .driver = {
268 .name = "xlr-i2cbus", 268 .name = "xlr-i2cbus",
269 .owner = THIS_MODULE, 269 .owner = THIS_MODULE,
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 08aab57337dd..3862a953239c 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -389,7 +389,7 @@ static const struct i2c_algorithm scx200_acb_algorithm = {
389static struct scx200_acb_iface *scx200_acb_list; 389static struct scx200_acb_iface *scx200_acb_list;
390static DEFINE_MUTEX(scx200_acb_list_mutex); 390static DEFINE_MUTEX(scx200_acb_list_mutex);
391 391
392static __devinit int scx200_acb_probe(struct scx200_acb_iface *iface) 392static int scx200_acb_probe(struct scx200_acb_iface *iface)
393{ 393{
394 u8 val; 394 u8 val;
395 395
@@ -424,7 +424,7 @@ static __devinit int scx200_acb_probe(struct scx200_acb_iface *iface)
424 return 0; 424 return 0;
425} 425}
426 426
427static __devinit struct scx200_acb_iface *scx200_create_iface(const char *text, 427static struct scx200_acb_iface *scx200_create_iface(const char *text,
428 struct device *dev, int index) 428 struct device *dev, int index)
429{ 429{
430 struct scx200_acb_iface *iface; 430 struct scx200_acb_iface *iface;
@@ -449,7 +449,7 @@ static __devinit struct scx200_acb_iface *scx200_create_iface(const char *text,
449 return iface; 449 return iface;
450} 450}
451 451
452static int __devinit scx200_acb_create(struct scx200_acb_iface *iface) 452static int scx200_acb_create(struct scx200_acb_iface *iface)
453{ 453{
454 struct i2c_adapter *adapter; 454 struct i2c_adapter *adapter;
455 int rc; 455 int rc;
@@ -480,7 +480,7 @@ static int __devinit scx200_acb_create(struct scx200_acb_iface *iface)
480 return 0; 480 return 0;
481} 481}
482 482
483static struct scx200_acb_iface * __devinit scx200_create_dev(const char *text, 483static struct scx200_acb_iface *scx200_create_dev(const char *text,
484 unsigned long base, int index, struct device *dev) 484 unsigned long base, int index, struct device *dev)
485{ 485{
486 struct scx200_acb_iface *iface; 486 struct scx200_acb_iface *iface;
@@ -508,7 +508,7 @@ static struct scx200_acb_iface * __devinit scx200_create_dev(const char *text,
508 return NULL; 508 return NULL;
509} 509}
510 510
511static int __devinit scx200_probe(struct platform_device *pdev) 511static int scx200_probe(struct platform_device *pdev)
512{ 512{
513 struct scx200_acb_iface *iface; 513 struct scx200_acb_iface *iface;
514 struct resource *res; 514 struct resource *res;
@@ -530,14 +530,14 @@ static int __devinit scx200_probe(struct platform_device *pdev)
530 return 0; 530 return 0;
531} 531}
532 532
533static void __devexit scx200_cleanup_iface(struct scx200_acb_iface *iface) 533static void scx200_cleanup_iface(struct scx200_acb_iface *iface)
534{ 534{
535 i2c_del_adapter(&iface->adapter); 535 i2c_del_adapter(&iface->adapter);
536 release_region(iface->base, 8); 536 release_region(iface->base, 8);
537 kfree(iface); 537 kfree(iface);
538} 538}
539 539
540static int __devexit scx200_remove(struct platform_device *pdev) 540static int scx200_remove(struct platform_device *pdev)
541{ 541{
542 struct scx200_acb_iface *iface; 542 struct scx200_acb_iface *iface;
543 543
@@ -554,7 +554,7 @@ static struct platform_driver scx200_pci_driver = {
554 .owner = THIS_MODULE, 554 .owner = THIS_MODULE,
555 }, 555 },
556 .probe = scx200_probe, 556 .probe = scx200_probe,
557 .remove = __devexit_p(scx200_remove), 557 .remove = scx200_remove,
558}; 558};
559 559
560static DEFINE_PCI_DEVICE_TABLE(scx200_isa) = { 560static DEFINE_PCI_DEVICE_TABLE(scx200_isa) = {
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 3b7bc06fe8a6..9f50ef04a4bd 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -53,14 +53,14 @@ static int i2c_mux_gpio_deselect(struct i2c_adapter *adap, void *data, u32 chan)
53 return 0; 53 return 0;
54} 54}
55 55
56static int __devinit match_gpio_chip_by_label(struct gpio_chip *chip, 56static int match_gpio_chip_by_label(struct gpio_chip *chip,
57 void *data) 57 void *data)
58{ 58{
59 return !strcmp(chip->label, data); 59 return !strcmp(chip->label, data);
60} 60}
61 61
62#ifdef CONFIG_OF 62#ifdef CONFIG_OF
63static int __devinit i2c_mux_gpio_probe_dt(struct gpiomux *mux, 63static int i2c_mux_gpio_probe_dt(struct gpiomux *mux,
64 struct platform_device *pdev) 64 struct platform_device *pdev)
65{ 65{
66 struct device_node *np = pdev->dev.of_node; 66 struct device_node *np = pdev->dev.of_node;
@@ -125,14 +125,14 @@ static int __devinit i2c_mux_gpio_probe_dt(struct gpiomux *mux,
125 return 0; 125 return 0;
126} 126}
127#else 127#else
128static int __devinit i2c_mux_gpio_probe_dt(struct gpiomux *mux, 128static int i2c_mux_gpio_probe_dt(struct gpiomux *mux,
129 struct platform_device *pdev) 129 struct platform_device *pdev)
130{ 130{
131 return 0; 131 return 0;
132} 132}
133#endif 133#endif
134 134
135static int __devinit i2c_mux_gpio_probe(struct platform_device *pdev) 135static int i2c_mux_gpio_probe(struct platform_device *pdev)
136{ 136{
137 struct gpiomux *mux; 137 struct gpiomux *mux;
138 struct i2c_adapter *parent; 138 struct i2c_adapter *parent;
@@ -239,7 +239,7 @@ alloc_failed:
239 return ret; 239 return ret;
240} 240}
241 241
242static int __devexit i2c_mux_gpio_remove(struct platform_device *pdev) 242static int i2c_mux_gpio_remove(struct platform_device *pdev)
243{ 243{
244 struct gpiomux *mux = platform_get_drvdata(pdev); 244 struct gpiomux *mux = platform_get_drvdata(pdev);
245 int i; 245 int i;
@@ -256,7 +256,7 @@ static int __devexit i2c_mux_gpio_remove(struct platform_device *pdev)
256 return 0; 256 return 0;
257} 257}
258 258
259static const struct of_device_id i2c_mux_gpio_of_match[] __devinitconst = { 259static const struct of_device_id i2c_mux_gpio_of_match[] = {
260 { .compatible = "i2c-mux-gpio", }, 260 { .compatible = "i2c-mux-gpio", },
261 {}, 261 {},
262}; 262};
@@ -264,7 +264,7 @@ MODULE_DEVICE_TABLE(of, i2c_mux_gpio_of_match);
264 264
265static struct platform_driver i2c_mux_gpio_driver = { 265static struct platform_driver i2c_mux_gpio_driver = {
266 .probe = i2c_mux_gpio_probe, 266 .probe = i2c_mux_gpio_probe,
267 .remove = __devexit_p(i2c_mux_gpio_remove), 267 .remove = i2c_mux_gpio_remove,
268 .driver = { 268 .driver = {
269 .owner = THIS_MODULE, 269 .owner = THIS_MODULE,
270 .name = "i2c-mux-gpio", 270 .name = "i2c-mux-gpio",
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c
index 7fa5b24b16db..1e44d04d1b22 100644
--- a/drivers/i2c/muxes/i2c-mux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c
@@ -129,7 +129,7 @@ static inline int i2c_mux_pinctrl_parse_dt(struct i2c_mux_pinctrl *mux,
129} 129}
130#endif 130#endif
131 131
132static int __devinit i2c_mux_pinctrl_probe(struct platform_device *pdev) 132static int i2c_mux_pinctrl_probe(struct platform_device *pdev)
133{ 133{
134 struct i2c_mux_pinctrl *mux; 134 struct i2c_mux_pinctrl *mux;
135 int (*deselect)(struct i2c_adapter *, void *, u32); 135 int (*deselect)(struct i2c_adapter *, void *, u32);
@@ -241,7 +241,7 @@ err:
241 return ret; 241 return ret;
242} 242}
243 243
244static int __devexit i2c_mux_pinctrl_remove(struct platform_device *pdev) 244static int i2c_mux_pinctrl_remove(struct platform_device *pdev)
245{ 245{
246 struct i2c_mux_pinctrl *mux = platform_get_drvdata(pdev); 246 struct i2c_mux_pinctrl *mux = platform_get_drvdata(pdev);
247 int i; 247 int i;
@@ -255,7 +255,7 @@ static int __devexit i2c_mux_pinctrl_remove(struct platform_device *pdev)
255} 255}
256 256
257#ifdef CONFIG_OF 257#ifdef CONFIG_OF
258static const struct of_device_id i2c_mux_pinctrl_of_match[] __devinitconst = { 258static const struct of_device_id i2c_mux_pinctrl_of_match[] = {
259 { .compatible = "i2c-mux-pinctrl", }, 259 { .compatible = "i2c-mux-pinctrl", },
260 {}, 260 {},
261}; 261};
@@ -269,7 +269,7 @@ static struct platform_driver i2c_mux_pinctrl_driver = {
269 .of_match_table = of_match_ptr(i2c_mux_pinctrl_of_match), 269 .of_match_table = of_match_ptr(i2c_mux_pinctrl_of_match),
270 }, 270 },
271 .probe = i2c_mux_pinctrl_probe, 271 .probe = i2c_mux_pinctrl_probe,
272 .remove = __devexit_p(i2c_mux_pinctrl_remove), 272 .remove = i2c_mux_pinctrl_remove,
273}; 273};
274module_platform_driver(i2c_mux_pinctrl_driver); 274module_platform_driver(i2c_mux_pinctrl_driver);
275 275
diff --git a/drivers/ide/aec62xx.c b/drivers/ide/aec62xx.c
index 01451940393b..c7eaf20af926 100644
--- a/drivers/ide/aec62xx.c
+++ b/drivers/ide/aec62xx.c
@@ -181,7 +181,7 @@ static const struct ide_port_ops atp86x_port_ops = {
181 .cable_detect = atp86x_cable_detect, 181 .cable_detect = atp86x_cable_detect,
182}; 182};
183 183
184static const struct ide_port_info aec62xx_chipsets[] __devinitconst = { 184static const struct ide_port_info aec62xx_chipsets[] = {
185 { /* 0: AEC6210 */ 185 { /* 0: AEC6210 */
186 .name = DRV_NAME, 186 .name = DRV_NAME,
187 .init_chipset = init_chipset_aec62xx, 187 .init_chipset = init_chipset_aec62xx,
@@ -251,7 +251,7 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitconst = {
251 * chips, pass a local copy of 'struct ide_port_info' down the call chain. 251 * chips, pass a local copy of 'struct ide_port_info' down the call chain.
252 */ 252 */
253 253
254static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) 254static int aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
255{ 255{
256 const struct chipset_bus_clock_list_entry *bus_clock; 256 const struct chipset_bus_clock_list_entry *bus_clock;
257 struct ide_port_info d; 257 struct ide_port_info d;
@@ -287,7 +287,7 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
287 return err; 287 return err;
288} 288}
289 289
290static void __devexit aec62xx_remove(struct pci_dev *dev) 290static void aec62xx_remove(struct pci_dev *dev)
291{ 291{
292 ide_pci_remove(dev); 292 ide_pci_remove(dev);
293 pci_disable_device(dev); 293 pci_disable_device(dev);
@@ -307,7 +307,7 @@ static struct pci_driver aec62xx_pci_driver = {
307 .name = "AEC62xx_IDE", 307 .name = "AEC62xx_IDE",
308 .id_table = aec62xx_pci_tbl, 308 .id_table = aec62xx_pci_tbl,
309 .probe = aec62xx_init_one, 309 .probe = aec62xx_init_one,
310 .remove = __devexit_p(aec62xx_remove), 310 .remove = aec62xx_remove,
311 .suspend = ide_pci_suspend, 311 .suspend = ide_pci_suspend,
312 .resume = ide_pci_resume, 312 .resume = ide_pci_resume,
313}; 313};
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
index 911a27ca356b..36f76e28a0bf 100644
--- a/drivers/ide/alim15x3.c
+++ b/drivers/ide/alim15x3.c
@@ -415,7 +415,7 @@ static u8 ali_cable_detect(ide_hwif_t *hwif)
415 * Sparc systems. 415 * Sparc systems.
416 */ 416 */
417 417
418static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) 418static void init_hwif_ali15x3(ide_hwif_t *hwif)
419{ 419{
420 u8 ideic, inmir; 420 u8 ideic, inmir;
421 s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, 421 s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6,
@@ -464,8 +464,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
464 * Set up the DMA functionality on the ALi 15x3. 464 * Set up the DMA functionality on the ALi 15x3.
465 */ 465 */
466 466
467static int __devinit init_dma_ali15x3(ide_hwif_t *hwif, 467static int init_dma_ali15x3(ide_hwif_t *hwif, const struct ide_port_info *d)
468 const struct ide_port_info *d)
469{ 468{
470 struct pci_dev *dev = to_pci_dev(hwif->dev); 469 struct pci_dev *dev = to_pci_dev(hwif->dev);
471 unsigned long base = ide_pci_dma_base(hwif, d); 470 unsigned long base = ide_pci_dma_base(hwif, d);
@@ -512,7 +511,7 @@ static const struct ide_dma_ops ali_dma_ops = {
512 .dma_sff_read_status = ide_dma_sff_read_status, 511 .dma_sff_read_status = ide_dma_sff_read_status,
513}; 512};
514 513
515static const struct ide_port_info ali15x3_chipset __devinitconst = { 514static const struct ide_port_info ali15x3_chipset = {
516 .name = DRV_NAME, 515 .name = DRV_NAME,
517 .init_chipset = init_chipset_ali15x3, 516 .init_chipset = init_chipset_ali15x3,
518 .init_hwif = init_hwif_ali15x3, 517 .init_hwif = init_hwif_ali15x3,
@@ -532,7 +531,8 @@ static const struct ide_port_info ali15x3_chipset __devinitconst = {
532 * hot plug layer. 531 * hot plug layer.
533 */ 532 */
534 533
535static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_device_id *id) 534static int alim15x3_init_one(struct pci_dev *dev,
535 const struct pci_device_id *id)
536{ 536{
537 struct ide_port_info d = ali15x3_chipset; 537 struct ide_port_info d = ali15x3_chipset;
538 u8 rev = dev->revision, idx = id->driver_data; 538 u8 rev = dev->revision, idx = id->driver_data;
diff --git a/drivers/ide/amd74xx.c b/drivers/ide/amd74xx.c
index 56fc99557ba2..cbfe846911d1 100644
--- a/drivers/ide/amd74xx.c
+++ b/drivers/ide/amd74xx.c
@@ -223,7 +223,7 @@ static const struct ide_port_ops amd_port_ops = {
223 .udma_mask = udma, \ 223 .udma_mask = udma, \
224 } 224 }
225 225
226static const struct ide_port_info amd74xx_chipsets[] __devinitconst = { 226static const struct ide_port_info amd74xx_chipsets[] = {
227 /* 0: AMD7401 */ DECLARE_AMD_DEV(0x00, ATA_UDMA2), 227 /* 0: AMD7401 */ DECLARE_AMD_DEV(0x00, ATA_UDMA2),
228 /* 1: AMD7409 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA4), 228 /* 1: AMD7409 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA4),
229 /* 2: AMD7411/7441 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5), 229 /* 2: AMD7411/7441 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5),
@@ -235,7 +235,7 @@ static const struct ide_port_info amd74xx_chipsets[] __devinitconst = {
235 /* 6: AMD5536 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5), 235 /* 6: AMD5536 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5),
236}; 236};
237 237
238static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) 238static int amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
239{ 239{
240 struct ide_port_info d; 240 struct ide_port_info d;
241 u8 idx = id->driver_data; 241 u8 idx = id->driver_data;
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c
index cb43480b1bd5..dbd0f242ec18 100644
--- a/drivers/ide/atiixp.c
+++ b/drivers/ide/atiixp.c
@@ -139,7 +139,7 @@ static const struct ide_port_ops atiixp_port_ops = {
139 .cable_detect = atiixp_cable_detect, 139 .cable_detect = atiixp_cable_detect,
140}; 140};
141 141
142static const struct ide_port_info atiixp_pci_info[] __devinitconst = { 142static const struct ide_port_info atiixp_pci_info[] = {
143 { /* 0: IXP200/300/400/700 */ 143 { /* 0: IXP200/300/400/700 */
144 .name = DRV_NAME, 144 .name = DRV_NAME,
145 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, 145 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
@@ -168,7 +168,7 @@ static const struct ide_port_info atiixp_pci_info[] __devinitconst = {
168 * finds a device matching our IDE device tables. 168 * finds a device matching our IDE device tables.
169 */ 169 */
170 170
171static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) 171static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
172{ 172{
173 return ide_pci_init_one(dev, &atiixp_pci_info[id->driver_data], NULL); 173 return ide_pci_init_one(dev, &atiixp_pci_info[id->driver_data], NULL);
174} 174}
diff --git a/drivers/ide/cmd64x.c b/drivers/ide/cmd64x.c
index d1fc43802f5d..b127ed60c733 100644
--- a/drivers/ide/cmd64x.c
+++ b/drivers/ide/cmd64x.c
@@ -327,7 +327,7 @@ static const struct ide_dma_ops cmd646_rev1_dma_ops = {
327 .dma_sff_read_status = ide_dma_sff_read_status, 327 .dma_sff_read_status = ide_dma_sff_read_status,
328}; 328};
329 329
330static const struct ide_port_info cmd64x_chipsets[] __devinitconst = { 330static const struct ide_port_info cmd64x_chipsets[] = {
331 { /* 0: CMD643 */ 331 { /* 0: CMD643 */
332 .name = DRV_NAME, 332 .name = DRV_NAME,
333 .init_chipset = init_chipset_cmd64x, 333 .init_chipset = init_chipset_cmd64x,
@@ -373,7 +373,7 @@ static const struct ide_port_info cmd64x_chipsets[] __devinitconst = {
373 } 373 }
374}; 374};
375 375
376static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id) 376static int cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
377{ 377{
378 struct ide_port_info d; 378 struct ide_port_info d;
379 u8 idx = id->driver_data; 379 u8 idx = id->driver_data;
diff --git a/drivers/ide/cs5520.c b/drivers/ide/cs5520.c
index 14447621e60b..6250aee30503 100644
--- a/drivers/ide/cs5520.c
+++ b/drivers/ide/cs5520.c
@@ -94,7 +94,7 @@ static const struct ide_port_ops cs5520_port_ops = {
94 .set_dma_mode = cs5520_set_dma_mode, 94 .set_dma_mode = cs5520_set_dma_mode,
95}; 95};
96 96
97static const struct ide_port_info cyrix_chipset __devinitconst = { 97static const struct ide_port_info cyrix_chipset = {
98 .name = DRV_NAME, 98 .name = DRV_NAME,
99 .enablebits = { { 0x60, 0x01, 0x01 }, { 0x60, 0x02, 0x02 } }, 99 .enablebits = { { 0x60, 0x01, 0x01 }, { 0x60, 0x02, 0x02 } },
100 .port_ops = &cs5520_port_ops, 100 .port_ops = &cs5520_port_ops,
@@ -108,7 +108,7 @@ static const struct ide_port_info cyrix_chipset __devinitconst = {
108 * work longhand. 108 * work longhand.
109 */ 109 */
110 110
111static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) 111static int cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
112{ 112{
113 const struct ide_port_info *d = &cyrix_chipset; 113 const struct ide_port_info *d = &cyrix_chipset;
114 struct ide_hw hw[2], *hws[] = { NULL, NULL }; 114 struct ide_hw hw[2], *hws[] = { NULL, NULL };
diff --git a/drivers/ide/cs5530.c b/drivers/ide/cs5530.c
index 49b40ad59d1a..65371599b976 100644
--- a/drivers/ide/cs5530.c
+++ b/drivers/ide/cs5530.c
@@ -226,7 +226,7 @@ out:
226 * performs channel-specific pre-initialization before drive probing. 226 * performs channel-specific pre-initialization before drive probing.
227 */ 227 */
228 228
229static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif) 229static void init_hwif_cs5530 (ide_hwif_t *hwif)
230{ 230{
231 unsigned long basereg; 231 unsigned long basereg;
232 u32 d0_timings; 232 u32 d0_timings;
@@ -245,7 +245,7 @@ static const struct ide_port_ops cs5530_port_ops = {
245 .udma_filter = cs5530_udma_filter, 245 .udma_filter = cs5530_udma_filter,
246}; 246};
247 247
248static const struct ide_port_info cs5530_chipset __devinitconst = { 248static const struct ide_port_info cs5530_chipset = {
249 .name = DRV_NAME, 249 .name = DRV_NAME,
250 .init_chipset = init_chipset_cs5530, 250 .init_chipset = init_chipset_cs5530,
251 .init_hwif = init_hwif_cs5530, 251 .init_hwif = init_hwif_cs5530,
@@ -257,7 +257,7 @@ static const struct ide_port_info cs5530_chipset __devinitconst = {
257 .udma_mask = ATA_UDMA2, 257 .udma_mask = ATA_UDMA2,
258}; 258};
259 259
260static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id) 260static int cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
261{ 261{
262 return ide_pci_init_one(dev, &cs5530_chipset, NULL); 262 return ide_pci_init_one(dev, &cs5530_chipset, NULL);
263} 263}
diff --git a/drivers/ide/cs5535.c b/drivers/ide/cs5535.c
index 18d4c852602b..3bc5b9a34013 100644
--- a/drivers/ide/cs5535.c
+++ b/drivers/ide/cs5535.c
@@ -170,7 +170,7 @@ static const struct ide_port_ops cs5535_port_ops = {
170 .cable_detect = cs5535_cable_detect, 170 .cable_detect = cs5535_cable_detect,
171}; 171};
172 172
173static const struct ide_port_info cs5535_chipset __devinitconst = { 173static const struct ide_port_info cs5535_chipset = {
174 .name = DRV_NAME, 174 .name = DRV_NAME,
175 .port_ops = &cs5535_port_ops, 175 .port_ops = &cs5535_port_ops,
176 .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE, 176 .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE,
@@ -179,8 +179,7 @@ static const struct ide_port_info cs5535_chipset __devinitconst = {
179 .udma_mask = ATA_UDMA4, 179 .udma_mask = ATA_UDMA4,
180}; 180};
181 181
182static int __devinit cs5535_init_one(struct pci_dev *dev, 182static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
183 const struct pci_device_id *id)
184{ 183{
185 return ide_pci_init_one(dev, &cs5535_chipset, NULL); 184 return ide_pci_init_one(dev, &cs5535_chipset, NULL);
186} 185}
diff --git a/drivers/ide/cy82c693.c b/drivers/ide/cy82c693.c
index 3ffb49dab574..f5820079a286 100644
--- a/drivers/ide/cy82c693.c
+++ b/drivers/ide/cy82c693.c
@@ -145,7 +145,7 @@ static void cy82c693_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
145 pci_dev_put(dev); 145 pci_dev_put(dev);
146} 146}
147 147
148static void __devinit init_iops_cy82c693(ide_hwif_t *hwif) 148static void init_iops_cy82c693(ide_hwif_t *hwif)
149{ 149{
150 static ide_hwif_t *primary; 150 static ide_hwif_t *primary;
151 struct pci_dev *dev = to_pci_dev(hwif->dev); 151 struct pci_dev *dev = to_pci_dev(hwif->dev);
@@ -163,7 +163,7 @@ static const struct ide_port_ops cy82c693_port_ops = {
163 .set_dma_mode = cy82c693_set_dma_mode, 163 .set_dma_mode = cy82c693_set_dma_mode,
164}; 164};
165 165
166static const struct ide_port_info cy82c693_chipset __devinitconst = { 166static const struct ide_port_info cy82c693_chipset = {
167 .name = DRV_NAME, 167 .name = DRV_NAME,
168 .init_iops = init_iops_cy82c693, 168 .init_iops = init_iops_cy82c693,
169 .port_ops = &cy82c693_port_ops, 169 .port_ops = &cy82c693_port_ops,
@@ -173,7 +173,8 @@ static const struct ide_port_info cy82c693_chipset __devinitconst = {
173 .mwdma_mask = ATA_MWDMA2, 173 .mwdma_mask = ATA_MWDMA2,
174}; 174};
175 175
176static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id) 176static int cy82c693_init_one(struct pci_dev *dev,
177 const struct pci_device_id *id)
177{ 178{
178 struct pci_dev *dev2; 179 struct pci_dev *dev2;
179 int ret = -ENODEV; 180 int ret = -ENODEV;
@@ -190,7 +191,7 @@ static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_dev
190 return ret; 191 return ret;
191} 192}
192 193
193static void __devexit cy82c693_remove(struct pci_dev *dev) 194static void cy82c693_remove(struct pci_dev *dev)
194{ 195{
195 struct ide_host *host = pci_get_drvdata(dev); 196 struct ide_host *host = pci_get_drvdata(dev);
196 struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; 197 struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL;
@@ -209,7 +210,7 @@ static struct pci_driver cy82c693_pci_driver = {
209 .name = "Cypress_IDE", 210 .name = "Cypress_IDE",
210 .id_table = cy82c693_pci_tbl, 211 .id_table = cy82c693_pci_tbl,
211 .probe = cy82c693_init_one, 212 .probe = cy82c693_init_one,
212 .remove = __devexit_p(cy82c693_remove), 213 .remove = cy82c693_remove,
213 .suspend = ide_pci_suspend, 214 .suspend = ide_pci_suspend,
214 .resume = ide_pci_resume, 215 .resume = ide_pci_resume,
215}; 216};
diff --git a/drivers/ide/delkin_cb.c b/drivers/ide/delkin_cb.c
index 1e10eba62ceb..7e27d3295e55 100644
--- a/drivers/ide/delkin_cb.c
+++ b/drivers/ide/delkin_cb.c
@@ -71,8 +71,7 @@ static const struct ide_port_info delkin_cb_port_info = {
71 .chipset = ide_pci, 71 .chipset = ide_pci,
72}; 72};
73 73
74static int __devinit 74static int delkin_cb_probe(struct pci_dev *dev, const struct pci_device_id *id)
75delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
76{ 75{
77 struct ide_host *host; 76 struct ide_host *host;
78 unsigned long base; 77 unsigned long base;
@@ -158,7 +157,7 @@ static int delkin_cb_resume(struct pci_dev *dev)
158#define delkin_cb_resume NULL 157#define delkin_cb_resume NULL
159#endif 158#endif
160 159
161static struct pci_device_id delkin_cb_pci_tbl[] __devinitdata = { 160static struct pci_device_id delkin_cb_pci_tbl[] = {
162 { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 161 { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
163 { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 162 { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
164 { 0, }, 163 { 0, },
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
index 4aec3b87ff91..696b6c1ec940 100644
--- a/drivers/ide/hpt366.c
+++ b/drivers/ide/hpt366.c
@@ -443,7 +443,7 @@ static struct hpt_timings hpt37x_timings = {
443 } 443 }
444}; 444};
445 445
446static const struct hpt_info hpt36x __devinitconst = { 446static const struct hpt_info hpt36x = {
447 .chip_name = "HPT36x", 447 .chip_name = "HPT36x",
448 .chip_type = HPT36x, 448 .chip_type = HPT36x,
449 .udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2, 449 .udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2,
@@ -451,7 +451,7 @@ static const struct hpt_info hpt36x __devinitconst = {
451 .timings = &hpt36x_timings 451 .timings = &hpt36x_timings
452}; 452};
453 453
454static const struct hpt_info hpt370 __devinitconst = { 454static const struct hpt_info hpt370 = {
455 .chip_name = "HPT370", 455 .chip_name = "HPT370",
456 .chip_type = HPT370, 456 .chip_type = HPT370,
457 .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, 457 .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4,
@@ -459,7 +459,7 @@ static const struct hpt_info hpt370 __devinitconst = {
459 .timings = &hpt37x_timings 459 .timings = &hpt37x_timings
460}; 460};
461 461
462static const struct hpt_info hpt370a __devinitconst = { 462static const struct hpt_info hpt370a = {
463 .chip_name = "HPT370A", 463 .chip_name = "HPT370A",
464 .chip_type = HPT370A, 464 .chip_type = HPT370A,
465 .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, 465 .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4,
@@ -467,7 +467,7 @@ static const struct hpt_info hpt370a __devinitconst = {
467 .timings = &hpt37x_timings 467 .timings = &hpt37x_timings
468}; 468};
469 469
470static const struct hpt_info hpt374 __devinitconst = { 470static const struct hpt_info hpt374 = {
471 .chip_name = "HPT374", 471 .chip_name = "HPT374",
472 .chip_type = HPT374, 472 .chip_type = HPT374,
473 .udma_mask = ATA_UDMA5, 473 .udma_mask = ATA_UDMA5,
@@ -475,7 +475,7 @@ static const struct hpt_info hpt374 __devinitconst = {
475 .timings = &hpt37x_timings 475 .timings = &hpt37x_timings
476}; 476};
477 477
478static const struct hpt_info hpt372 __devinitconst = { 478static const struct hpt_info hpt372 = {
479 .chip_name = "HPT372", 479 .chip_name = "HPT372",
480 .chip_type = HPT372, 480 .chip_type = HPT372,
481 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, 481 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
@@ -483,7 +483,7 @@ static const struct hpt_info hpt372 __devinitconst = {
483 .timings = &hpt37x_timings 483 .timings = &hpt37x_timings
484}; 484};
485 485
486static const struct hpt_info hpt372a __devinitconst = { 486static const struct hpt_info hpt372a = {
487 .chip_name = "HPT372A", 487 .chip_name = "HPT372A",
488 .chip_type = HPT372A, 488 .chip_type = HPT372A,
489 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, 489 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
@@ -491,7 +491,7 @@ static const struct hpt_info hpt372a __devinitconst = {
491 .timings = &hpt37x_timings 491 .timings = &hpt37x_timings
492}; 492};
493 493
494static const struct hpt_info hpt302 __devinitconst = { 494static const struct hpt_info hpt302 = {
495 .chip_name = "HPT302", 495 .chip_name = "HPT302",
496 .chip_type = HPT302, 496 .chip_type = HPT302,
497 .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, 497 .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
@@ -499,7 +499,7 @@ static const struct hpt_info hpt302 __devinitconst = {
499 .timings = &hpt37x_timings 499 .timings = &hpt37x_timings
500}; 500};
501 501
502static const struct hpt_info hpt371 __devinitconst = { 502static const struct hpt_info hpt371 = {
503 .chip_name = "HPT371", 503 .chip_name = "HPT371",
504 .chip_type = HPT371, 504 .chip_type = HPT371,
505 .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, 505 .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
@@ -507,7 +507,7 @@ static const struct hpt_info hpt371 __devinitconst = {
507 .timings = &hpt37x_timings 507 .timings = &hpt37x_timings
508}; 508};
509 509
510static const struct hpt_info hpt372n __devinitconst = { 510static const struct hpt_info hpt372n = {
511 .chip_name = "HPT372N", 511 .chip_name = "HPT372N",
512 .chip_type = HPT372N, 512 .chip_type = HPT372N,
513 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, 513 .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
@@ -515,7 +515,7 @@ static const struct hpt_info hpt372n __devinitconst = {
515 .timings = &hpt37x_timings 515 .timings = &hpt37x_timings
516}; 516};
517 517
518static const struct hpt_info hpt302n __devinitconst = { 518static const struct hpt_info hpt302n = {
519 .chip_name = "HPT302N", 519 .chip_name = "HPT302N",
520 .chip_type = HPT302N, 520 .chip_type = HPT302N,
521 .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, 521 .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
@@ -523,7 +523,7 @@ static const struct hpt_info hpt302n __devinitconst = {
523 .timings = &hpt37x_timings 523 .timings = &hpt37x_timings
524}; 524};
525 525
526static const struct hpt_info hpt371n __devinitconst = { 526static const struct hpt_info hpt371n = {
527 .chip_name = "HPT371N", 527 .chip_name = "HPT371N",
528 .chip_type = HPT371N, 528 .chip_type = HPT371N,
529 .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, 529 .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
@@ -1197,7 +1197,7 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif)
1197 return (scr1 & ata66) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; 1197 return (scr1 & ata66) ? ATA_CBL_PATA40 : ATA_CBL_PATA80;
1198} 1198}
1199 1199
1200static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) 1200static void init_hwif_hpt366(ide_hwif_t *hwif)
1201{ 1201{
1202 struct hpt_info *info = hpt3xx_get_info(hwif->dev); 1202 struct hpt_info *info = hpt3xx_get_info(hwif->dev);
1203 u8 chip_type = info->chip_type; 1203 u8 chip_type = info->chip_type;
@@ -1221,7 +1221,7 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
1221 } 1221 }
1222} 1222}
1223 1223
1224static int __devinit init_dma_hpt366(ide_hwif_t *hwif, 1224static int init_dma_hpt366(ide_hwif_t *hwif,
1225 const struct ide_port_info *d) 1225 const struct ide_port_info *d)
1226{ 1226{
1227 struct pci_dev *dev = to_pci_dev(hwif->dev); 1227 struct pci_dev *dev = to_pci_dev(hwif->dev);
@@ -1265,7 +1265,7 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif,
1265 return 0; 1265 return 0;
1266} 1266}
1267 1267
1268static void __devinit hpt374_init(struct pci_dev *dev, struct pci_dev *dev2) 1268static void hpt374_init(struct pci_dev *dev, struct pci_dev *dev2)
1269{ 1269{
1270 if (dev2->irq != dev->irq) { 1270 if (dev2->irq != dev->irq) {
1271 /* FIXME: we need a core pci_set_interrupt() */ 1271 /* FIXME: we need a core pci_set_interrupt() */
@@ -1275,7 +1275,7 @@ static void __devinit hpt374_init(struct pci_dev *dev, struct pci_dev *dev2)
1275 } 1275 }
1276} 1276}
1277 1277
1278static void __devinit hpt371_init(struct pci_dev *dev) 1278static void hpt371_init(struct pci_dev *dev)
1279{ 1279{
1280 u8 mcr1 = 0; 1280 u8 mcr1 = 0;
1281 1281
@@ -1290,7 +1290,7 @@ static void __devinit hpt371_init(struct pci_dev *dev)
1290 pci_write_config_byte(dev, 0x50, mcr1 & ~0x04); 1290 pci_write_config_byte(dev, 0x50, mcr1 & ~0x04);
1291} 1291}
1292 1292
1293static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2) 1293static int hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)
1294{ 1294{
1295 u8 mcr1 = 0, pin1 = 0, pin2 = 0; 1295 u8 mcr1 = 0, pin1 = 0, pin2 = 0;
1296 1296
@@ -1361,7 +1361,7 @@ static const struct ide_dma_ops hpt36x_dma_ops = {
1361 .dma_sff_read_status = ide_dma_sff_read_status, 1361 .dma_sff_read_status = ide_dma_sff_read_status,
1362}; 1362};
1363 1363
1364static const struct ide_port_info hpt366_chipsets[] __devinitconst = { 1364static const struct ide_port_info hpt366_chipsets[] = {
1365 { /* 0: HPT36x */ 1365 { /* 0: HPT36x */
1366 .name = DRV_NAME, 1366 .name = DRV_NAME,
1367 .init_chipset = init_chipset_hpt366, 1367 .init_chipset = init_chipset_hpt366,
@@ -1402,7 +1402,7 @@ static const struct ide_port_info hpt366_chipsets[] __devinitconst = {
1402 * Called when the PCI registration layer (or the IDE initialization) 1402 * Called when the PCI registration layer (or the IDE initialization)
1403 * finds a device matching our IDE device tables. 1403 * finds a device matching our IDE device tables.
1404 */ 1404 */
1405static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_device_id *id) 1405static int hpt366_init_one(struct pci_dev *dev, const struct pci_device_id *id)
1406{ 1406{
1407 const struct hpt_info *info = NULL; 1407 const struct hpt_info *info = NULL;
1408 struct hpt_info *dyn_info; 1408 struct hpt_info *dyn_info;
@@ -1499,7 +1499,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
1499 return ret; 1499 return ret;
1500} 1500}
1501 1501
1502static void __devexit hpt366_remove(struct pci_dev *dev) 1502static void hpt366_remove(struct pci_dev *dev)
1503{ 1503{
1504 struct ide_host *host = pci_get_drvdata(dev); 1504 struct ide_host *host = pci_get_drvdata(dev);
1505 struct ide_info *info = host->host_priv; 1505 struct ide_info *info = host->host_priv;
@@ -1510,7 +1510,7 @@ static void __devexit hpt366_remove(struct pci_dev *dev)
1510 kfree(info); 1510 kfree(info);
1511} 1511}
1512 1512
1513static const struct pci_device_id hpt366_pci_tbl[] __devinitconst = { 1513static const struct pci_device_id hpt366_pci_tbl[] = {
1514 { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), 0 }, 1514 { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), 0 },
1515 { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT372), 1 }, 1515 { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT372), 1 },
1516 { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT302), 2 }, 1516 { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT302), 2 },
@@ -1525,7 +1525,7 @@ static struct pci_driver hpt366_pci_driver = {
1525 .name = "HPT366_IDE", 1525 .name = "HPT366_IDE",
1526 .id_table = hpt366_pci_tbl, 1526 .id_table = hpt366_pci_tbl,
1527 .probe = hpt366_init_one, 1527 .probe = hpt366_init_one,
1528 .remove = __devexit_p(hpt366_remove), 1528 .remove = hpt366_remove,
1529 .suspend = ide_pci_suspend, 1529 .suspend = ide_pci_suspend,
1530 .resume = ide_pci_resume, 1530 .resume = ide_pci_resume,
1531}; 1531};
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index e640d0ac3af6..9f0a48e39b8a 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -406,8 +406,8 @@ static const struct ide_port_info icside_v5_port_info = {
406 .chipset = ide_acorn, 406 .chipset = ide_acorn,
407}; 407};
408 408
409static int __devinit 409static int icside_register_v5(struct icside_state *state,
410icside_register_v5(struct icside_state *state, struct expansion_card *ec) 410 struct expansion_card *ec)
411{ 411{
412 void __iomem *base; 412 void __iomem *base;
413 struct ide_host *host; 413 struct ide_host *host;
@@ -460,8 +460,8 @@ static const struct ide_port_info icside_v6_port_info __initconst = {
460 .chipset = ide_acorn, 460 .chipset = ide_acorn,
461}; 461};
462 462
463static int __devinit 463static int icside_register_v6(struct icside_state *state,
464icside_register_v6(struct icside_state *state, struct expansion_card *ec) 464 struct expansion_card *ec)
465{ 465{
466 void __iomem *ioc_base, *easi_base; 466 void __iomem *ioc_base, *easi_base;
467 struct ide_host *host; 467 struct ide_host *host;
@@ -537,8 +537,7 @@ out:
537 return ret; 537 return ret;
538} 538}
539 539
540static int __devinit 540static int icside_probe(struct expansion_card *ec, const struct ecard_id *id)
541icside_probe(struct expansion_card *ec, const struct ecard_id *id)
542{ 541{
543 struct icside_state *state; 542 struct icside_state *state;
544 void __iomem *idmem; 543 void __iomem *idmem;
@@ -604,7 +603,7 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id)
604 return ret; 603 return ret;
605} 604}
606 605
607static void __devexit icside_remove(struct expansion_card *ec) 606static void icside_remove(struct expansion_card *ec)
608{ 607{
609 struct icside_state *state = ecard_get_drvdata(ec); 608 struct icside_state *state = ecard_get_drvdata(ec);
610 609
@@ -666,7 +665,7 @@ static const struct ecard_id icside_ids[] = {
666 665
667static struct ecard_driver icside_driver = { 666static struct ecard_driver icside_driver = {
668 .probe = icside_probe, 667 .probe = icside_probe,
669 .remove = __devexit_p(icside_remove), 668 .remove = icside_remove,
670 .shutdown = icside_shutdown, 669 .shutdown = icside_shutdown,
671 .id_table = icside_ids, 670 .id_table = icside_ids,
672 .drv = { 671 .drv = {
diff --git a/drivers/ide/ide-pci-generic.c b/drivers/ide/ide-pci-generic.c
index dab5b670bfbf..673420db953f 100644
--- a/drivers/ide/ide-pci-generic.c
+++ b/drivers/ide/ide-pci-generic.c
@@ -53,7 +53,7 @@ static const struct ide_port_ops netcell_port_ops = {
53 .udma_mask = ATA_UDMA6, \ 53 .udma_mask = ATA_UDMA6, \
54 } 54 }
55 55
56static const struct ide_port_info generic_chipsets[] __devinitconst = { 56static const struct ide_port_info generic_chipsets[] = {
57 /* 0: Unknown */ 57 /* 0: Unknown */
58 DECLARE_GENERIC_PCI_DEV(0), 58 DECLARE_GENERIC_PCI_DEV(0),
59 59
@@ -103,7 +103,7 @@ static const struct ide_port_info generic_chipsets[] __devinitconst = {
103 * finds a device matching our IDE device tables. 103 * finds a device matching our IDE device tables.
104 */ 104 */
105 105
106static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id) 106static int generic_init_one(struct pci_dev *dev, const struct pci_device_id *id)
107{ 107{
108 const struct ide_port_info *d = &generic_chipsets[id->driver_data]; 108 const struct ide_port_info *d = &generic_chipsets[id->driver_data];
109 int ret = -ENODEV; 109 int ret = -ENODEV;
diff --git a/drivers/ide/ide_platform.c b/drivers/ide/ide_platform.c
index 962693b10a1c..ba4bfbead24b 100644
--- a/drivers/ide/ide_platform.c
+++ b/drivers/ide/ide_platform.c
@@ -22,11 +22,9 @@
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/io.h> 23#include <linux/io.h>
24 24
25static void __devinit plat_ide_setup_ports(struct ide_hw *hw, 25static void plat_ide_setup_ports(struct ide_hw *hw, void __iomem *base,
26 void __iomem *base, 26 void __iomem *ctrl,
27 void __iomem *ctrl, 27 struct pata_platform_info *pdata, int irq)
28 struct pata_platform_info *pdata,
29 int irq)
30{ 28{
31 unsigned long port = (unsigned long)base; 29 unsigned long port = (unsigned long)base;
32 int i; 30 int i;
@@ -48,7 +46,7 @@ static const struct ide_port_info platform_ide_port_info = {
48 .chipset = ide_generic, 46 .chipset = ide_generic,
49}; 47};
50 48
51static int __devinit plat_ide_probe(struct platform_device *pdev) 49static int plat_ide_probe(struct platform_device *pdev)
52{ 50{
53 struct resource *res_base, *res_alt, *res_irq; 51 struct resource *res_base, *res_alt, *res_irq;
54 void __iomem *base, *alt_base; 52 void __iomem *base, *alt_base;
@@ -115,7 +113,7 @@ out:
115 return ret; 113 return ret;
116} 114}
117 115
118static int __devexit plat_ide_remove(struct platform_device *pdev) 116static int plat_ide_remove(struct platform_device *pdev)
119{ 117{
120 struct ide_host *host = dev_get_drvdata(&pdev->dev); 118 struct ide_host *host = dev_get_drvdata(&pdev->dev);
121 119
@@ -130,7 +128,7 @@ static struct platform_driver platform_ide_driver = {
130 .owner = THIS_MODULE, 128 .owner = THIS_MODULE,
131 }, 129 },
132 .probe = plat_ide_probe, 130 .probe = plat_ide_probe,
133 .remove = __devexit_p(plat_ide_remove), 131 .remove = plat_ide_remove,
134}; 132};
135 133
136static int __init platform_ide_init(void) 134static int __init platform_ide_init(void)
diff --git a/drivers/ide/it8172.c b/drivers/ide/it8172.c
index d5dd180c4b85..b6f674ab4fb7 100644
--- a/drivers/ide/it8172.c
+++ b/drivers/ide/it8172.c
@@ -115,7 +115,7 @@ static const struct ide_port_ops it8172_port_ops = {
115 .set_dma_mode = it8172_set_dma_mode, 115 .set_dma_mode = it8172_set_dma_mode,
116}; 116};
117 117
118static const struct ide_port_info it8172_port_info __devinitconst = { 118static const struct ide_port_info it8172_port_info = {
119 .name = DRV_NAME, 119 .name = DRV_NAME,
120 .port_ops = &it8172_port_ops, 120 .port_ops = &it8172_port_ops,
121 .enablebits = { {0x41, 0x80, 0x80}, {0x00, 0x00, 0x00} }, 121 .enablebits = { {0x41, 0x80, 0x80}, {0x00, 0x00, 0x00} },
@@ -125,8 +125,7 @@ static const struct ide_port_info it8172_port_info __devinitconst = {
125 .udma_mask = ATA_UDMA2, 125 .udma_mask = ATA_UDMA2,
126}; 126};
127 127
128static int __devinit it8172_init_one(struct pci_dev *dev, 128static int it8172_init_one(struct pci_dev *dev, const struct pci_device_id *id)
129 const struct pci_device_id *id)
130{ 129{
131 if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) 130 if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
132 return -ENODEV; /* IT8172 is more than an IDE controller */ 131 return -ENODEV; /* IT8172 is more than an IDE controller */
diff --git a/drivers/ide/it8213.c b/drivers/ide/it8213.c
index 1847aeb5450a..6b92846682fc 100644
--- a/drivers/ide/it8213.c
+++ b/drivers/ide/it8213.c
@@ -156,7 +156,7 @@ static const struct ide_port_ops it8213_port_ops = {
156 .cable_detect = it8213_cable_detect, 156 .cable_detect = it8213_cable_detect,
157}; 157};
158 158
159static const struct ide_port_info it8213_chipset __devinitconst = { 159static const struct ide_port_info it8213_chipset = {
160 .name = DRV_NAME, 160 .name = DRV_NAME,
161 .enablebits = { {0x41, 0x80, 0x80} }, 161 .enablebits = { {0x41, 0x80, 0x80} },
162 .port_ops = &it8213_port_ops, 162 .port_ops = &it8213_port_ops,
@@ -177,7 +177,7 @@ static const struct ide_port_info it8213_chipset __devinitconst = {
177 * standard helper functions to do almost all the work for us. 177 * standard helper functions to do almost all the work for us.
178 */ 178 */
179 179
180static int __devinit it8213_init_one(struct pci_dev *dev, const struct pci_device_id *id) 180static int it8213_init_one(struct pci_dev *dev, const struct pci_device_id *id)
181{ 181{
182 return ide_pci_init_one(dev, &it8213_chipset, NULL); 182 return ide_pci_init_one(dev, &it8213_chipset, NULL);
183} 183}
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c
index c5611dbca342..f01ba4606be0 100644
--- a/drivers/ide/it821x.c
+++ b/drivers/ide/it821x.c
@@ -528,7 +528,7 @@ static struct ide_dma_ops it821x_pass_through_dma_ops = {
528 * ide DMA handlers appropriately 528 * ide DMA handlers appropriately
529 */ 529 */
530 530
531static void __devinit init_hwif_it821x(ide_hwif_t *hwif) 531static void init_hwif_it821x(ide_hwif_t *hwif)
532{ 532{
533 struct pci_dev *dev = to_pci_dev(hwif->dev); 533 struct pci_dev *dev = to_pci_dev(hwif->dev);
534 struct ide_host *host = pci_get_drvdata(dev); 534 struct ide_host *host = pci_get_drvdata(dev);
@@ -630,7 +630,7 @@ static const struct ide_port_ops it821x_port_ops = {
630 .cable_detect = it821x_cable_detect, 630 .cable_detect = it821x_cable_detect,
631}; 631};
632 632
633static const struct ide_port_info it821x_chipset __devinitconst = { 633static const struct ide_port_info it821x_chipset = {
634 .name = DRV_NAME, 634 .name = DRV_NAME,
635 .init_chipset = init_chipset_it821x, 635 .init_chipset = init_chipset_it821x,
636 .init_hwif = init_hwif_it821x, 636 .init_hwif = init_hwif_it821x,
@@ -647,7 +647,7 @@ static const struct ide_port_info it821x_chipset __devinitconst = {
647 * We then use the IDE PCI generic helper to do most of the work. 647 * We then use the IDE PCI generic helper to do most of the work.
648 */ 648 */
649 649
650static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_device_id *id) 650static int it821x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
651{ 651{
652 struct it821x_dev *itdevs; 652 struct it821x_dev *itdevs;
653 int rc; 653 int rc;
@@ -667,7 +667,7 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic
667 return rc; 667 return rc;
668} 668}
669 669
670static void __devexit it821x_remove(struct pci_dev *dev) 670static void it821x_remove(struct pci_dev *dev)
671{ 671{
672 struct ide_host *host = pci_get_drvdata(dev); 672 struct ide_host *host = pci_get_drvdata(dev);
673 struct it821x_dev *itdevs = host->host_priv; 673 struct it821x_dev *itdevs = host->host_priv;
@@ -689,7 +689,7 @@ static struct pci_driver it821x_pci_driver = {
689 .name = "ITE821x IDE", 689 .name = "ITE821x IDE",
690 .id_table = it821x_pci_tbl, 690 .id_table = it821x_pci_tbl,
691 .probe = it821x_init_one, 691 .probe = it821x_init_one,
692 .remove = __devexit_p(it821x_remove), 692 .remove = it821x_remove,
693 .suspend = ide_pci_suspend, 693 .suspend = ide_pci_suspend,
694 .resume = ide_pci_resume, 694 .resume = ide_pci_resume,
695}; 695};
diff --git a/drivers/ide/jmicron.c b/drivers/ide/jmicron.c
index efddd7d9f92d..ae6480dcbadf 100644
--- a/drivers/ide/jmicron.c
+++ b/drivers/ide/jmicron.c
@@ -102,7 +102,7 @@ static const struct ide_port_ops jmicron_port_ops = {
102 .cable_detect = jmicron_cable_detect, 102 .cable_detect = jmicron_cable_detect,
103}; 103};
104 104
105static const struct ide_port_info jmicron_chipset __devinitconst = { 105static const struct ide_port_info jmicron_chipset = {
106 .name = DRV_NAME, 106 .name = DRV_NAME,
107 .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } }, 107 .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } },
108 .port_ops = &jmicron_port_ops, 108 .port_ops = &jmicron_port_ops,
@@ -120,7 +120,7 @@ static const struct ide_port_info jmicron_chipset __devinitconst = {
120 * We then use the IDE PCI generic helper to do most of the work. 120 * We then use the IDE PCI generic helper to do most of the work.
121 */ 121 */
122 122
123static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_device_id *id) 123static int jmicron_init_one(struct pci_dev *dev, const struct pci_device_id *id)
124{ 124{
125 return ide_pci_init_one(dev, &jmicron_chipset, NULL); 125 return ide_pci_init_one(dev, &jmicron_chipset, NULL);
126} 126}
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c
index 73f78d872d55..392fd106edf1 100644
--- a/drivers/ide/ns87415.c
+++ b/drivers/ide/ns87415.c
@@ -96,7 +96,7 @@ static const struct ide_tp_ops superio_tp_ops = {
96 .output_data = ide_output_data, 96 .output_data = ide_output_data,
97}; 97};
98 98
99static void __devinit superio_init_iops(struct hwif_s *hwif) 99static void superio_init_iops(struct hwif_s *hwif)
100{ 100{
101 struct pci_dev *pdev = to_pci_dev(hwif->dev); 101 struct pci_dev *pdev = to_pci_dev(hwif->dev);
102 u32 dma_stat; 102 u32 dma_stat;
@@ -201,7 +201,7 @@ static int ns87415_dma_end(ide_drive_t *drive)
201 return (dma_stat & 7) != 4; 201 return (dma_stat & 7) != 4;
202} 202}
203 203
204static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) 204static void init_hwif_ns87415 (ide_hwif_t *hwif)
205{ 205{
206 struct pci_dev *dev = to_pci_dev(hwif->dev); 206 struct pci_dev *dev = to_pci_dev(hwif->dev);
207 unsigned int ctrl, using_inta; 207 unsigned int ctrl, using_inta;
@@ -293,7 +293,7 @@ static const struct ide_dma_ops ns87415_dma_ops = {
293 .dma_sff_read_status = superio_dma_sff_read_status, 293 .dma_sff_read_status = superio_dma_sff_read_status,
294}; 294};
295 295
296static const struct ide_port_info ns87415_chipset __devinitconst = { 296static const struct ide_port_info ns87415_chipset = {
297 .name = DRV_NAME, 297 .name = DRV_NAME,
298 .init_hwif = init_hwif_ns87415, 298 .init_hwif = init_hwif_ns87415,
299 .tp_ops = &ns87415_tp_ops, 299 .tp_ops = &ns87415_tp_ops,
@@ -302,7 +302,7 @@ static const struct ide_port_info ns87415_chipset __devinitconst = {
302 IDE_HFLAG_NO_ATAPI_DMA, 302 IDE_HFLAG_NO_ATAPI_DMA,
303}; 303};
304 304
305static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id) 305static int ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id)
306{ 306{
307 struct ide_port_info d = ns87415_chipset; 307 struct ide_port_info d = ns87415_chipset;
308 308
diff --git a/drivers/ide/opti621.c b/drivers/ide/opti621.c
index 39edc66cb96c..26a45007e535 100644
--- a/drivers/ide/opti621.c
+++ b/drivers/ide/opti621.c
@@ -131,7 +131,7 @@ static const struct ide_port_ops opti621_port_ops = {
131 .set_pio_mode = opti621_set_pio_mode, 131 .set_pio_mode = opti621_set_pio_mode,
132}; 132};
133 133
134static const struct ide_port_info opti621_chipset __devinitconst = { 134static const struct ide_port_info opti621_chipset = {
135 .name = DRV_NAME, 135 .name = DRV_NAME,
136 .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} }, 136 .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} },
137 .port_ops = &opti621_port_ops, 137 .port_ops = &opti621_port_ops,
@@ -139,7 +139,7 @@ static const struct ide_port_info opti621_chipset __devinitconst = {
139 .pio_mask = ATA_PIO4, 139 .pio_mask = ATA_PIO4,
140}; 140};
141 141
142static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) 142static int opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id)
143{ 143{
144 return ide_pci_init_one(dev, &opti621_chipset, NULL); 144 return ide_pci_init_one(dev, &opti621_chipset, NULL);
145} 145}
diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
index 712c7904d03e..6107cc4ee012 100644
--- a/drivers/ide/palm_bk3710.c
+++ b/drivers/ide/palm_bk3710.c
@@ -220,7 +220,7 @@ static void palm_bk3710_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
220 palm_bk3710_setpiomode(base, mate, is_slave, cycle_time, pio); 220 palm_bk3710_setpiomode(base, mate, is_slave, cycle_time, pio);
221} 221}
222 222
223static void __devinit palm_bk3710_chipinit(void __iomem *base) 223static void palm_bk3710_chipinit(void __iomem *base)
224{ 224{
225 /* 225 /*
226 * REVISIT: the ATA reset signal needs to be managed through a 226 * REVISIT: the ATA reset signal needs to be managed through a
@@ -282,8 +282,7 @@ static u8 palm_bk3710_cable_detect(ide_hwif_t *hwif)
282 return ATA_CBL_PATA80; 282 return ATA_CBL_PATA80;
283} 283}
284 284
285static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif, 285static int palm_bk3710_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
286 const struct ide_port_info *d)
287{ 286{
288 printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name); 287 printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name);
289 288
@@ -301,7 +300,7 @@ static const struct ide_port_ops palm_bk3710_ports_ops = {
301 .cable_detect = palm_bk3710_cable_detect, 300 .cable_detect = palm_bk3710_cable_detect,
302}; 301};
303 302
304static struct ide_port_info __devinitdata palm_bk3710_port_info = { 303static struct ide_port_info palm_bk3710_port_info = {
305 .init_dma = palm_bk3710_init_dma, 304 .init_dma = palm_bk3710_init_dma,
306 .port_ops = &palm_bk3710_ports_ops, 305 .port_ops = &palm_bk3710_ports_ops,
307 .dma_ops = &sff_dma_ops, 306 .dma_ops = &sff_dma_ops,
diff --git a/drivers/ide/pdc202xx_new.c b/drivers/ide/pdc202xx_new.c
index 2e5ceb62fb3b..df73cbd9387e 100644
--- a/drivers/ide/pdc202xx_new.c
+++ b/drivers/ide/pdc202xx_new.c
@@ -422,7 +422,7 @@ static int init_chipset_pdcnew(struct pci_dev *dev)
422 return 0; 422 return 0;
423} 423}
424 424
425static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev) 425static struct pci_dev *pdc20270_get_dev2(struct pci_dev *dev)
426{ 426{
427 struct pci_dev *dev2; 427 struct pci_dev *dev2;
428 428
@@ -465,7 +465,7 @@ static const struct ide_port_ops pdcnew_port_ops = {
465 .udma_mask = udma, \ 465 .udma_mask = udma, \
466 } 466 }
467 467
468static const struct ide_port_info pdcnew_chipsets[] __devinitconst = { 468static const struct ide_port_info pdcnew_chipsets[] = {
469 /* 0: PDC202{68,70} */ DECLARE_PDCNEW_DEV(ATA_UDMA5), 469 /* 0: PDC202{68,70} */ DECLARE_PDCNEW_DEV(ATA_UDMA5),
470 /* 1: PDC202{69,71,75,76,77} */ DECLARE_PDCNEW_DEV(ATA_UDMA6), 470 /* 1: PDC202{69,71,75,76,77} */ DECLARE_PDCNEW_DEV(ATA_UDMA6),
471}; 471};
@@ -479,7 +479,7 @@ static const struct ide_port_info pdcnew_chipsets[] __devinitconst = {
479 * finds a device matching our IDE device tables. 479 * finds a device matching our IDE device tables.
480 */ 480 */
481 481
482static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id) 482static int pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id)
483{ 483{
484 const struct ide_port_info *d = &pdcnew_chipsets[id->driver_data]; 484 const struct ide_port_info *d = &pdcnew_chipsets[id->driver_data];
485 struct pci_dev *bridge = dev->bus->self; 485 struct pci_dev *bridge = dev->bus->self;
@@ -514,7 +514,7 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de
514 return ide_pci_init_one(dev, d, NULL); 514 return ide_pci_init_one(dev, d, NULL);
515} 515}
516 516
517static void __devexit pdc202new_remove(struct pci_dev *dev) 517static void pdc202new_remove(struct pci_dev *dev)
518{ 518{
519 struct ide_host *host = pci_get_drvdata(dev); 519 struct ide_host *host = pci_get_drvdata(dev);
520 struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; 520 struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL;
@@ -539,7 +539,7 @@ static struct pci_driver pdc202new_pci_driver = {
539 .name = "Promise_IDE", 539 .name = "Promise_IDE",
540 .id_table = pdc202new_pci_tbl, 540 .id_table = pdc202new_pci_tbl,
541 .probe = pdc202new_init_one, 541 .probe = pdc202new_init_one,
542 .remove = __devexit_p(pdc202new_remove), 542 .remove = pdc202new_remove,
543 .suspend = ide_pci_suspend, 543 .suspend = ide_pci_suspend,
544 .resume = ide_pci_resume, 544 .resume = ide_pci_resume,
545}; 545};
diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
index 563451096812..224ad46d6cb2 100644
--- a/drivers/ide/pdc202xx_old.c
+++ b/drivers/ide/pdc202xx_old.c
@@ -211,8 +211,7 @@ out:
211 return 0; 211 return 0;
212} 212}
213 213
214static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev, 214static void pdc202ata4_fixup_irq(struct pci_dev *dev, const char *name)
215 const char *name)
216{ 215{
217 if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) { 216 if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) {
218 u8 irq = 0, irq2 = 0; 217 u8 irq = 0, irq2 = 0;
@@ -270,7 +269,7 @@ static const struct ide_dma_ops pdc2026x_dma_ops = {
270 .max_sectors = sectors, \ 269 .max_sectors = sectors, \
271 } 270 }
272 271
273static const struct ide_port_info pdc202xx_chipsets[] __devinitconst = { 272static const struct ide_port_info pdc202xx_chipsets[] = {
274 { /* 0: PDC20246 */ 273 { /* 0: PDC20246 */
275 .name = DRV_NAME, 274 .name = DRV_NAME,
276 .init_chipset = init_chipset_pdc202xx, 275 .init_chipset = init_chipset_pdc202xx,
@@ -297,7 +296,8 @@ static const struct ide_port_info pdc202xx_chipsets[] __devinitconst = {
297 * finds a device matching our IDE device tables. 296 * finds a device matching our IDE device tables.
298 */ 297 */
299 298
300static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) 299static int pdc202xx_init_one(struct pci_dev *dev,
300 const struct pci_device_id *id)
301{ 301{
302 const struct ide_port_info *d; 302 const struct ide_port_info *d;
303 u8 idx = id->driver_data; 303 u8 idx = id->driver_data;
diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c
index fe0fd60cfc09..a671cead6ae7 100644
--- a/drivers/ide/piix.c
+++ b/drivers/ide/piix.c
@@ -297,7 +297,7 @@ static u8 piix_cable_detect(ide_hwif_t *hwif)
297 * capabilities of the hardware. 297 * capabilities of the hardware.
298 */ 298 */
299 299
300static void __devinit init_hwif_piix(ide_hwif_t *hwif) 300static void init_hwif_piix(ide_hwif_t *hwif)
301{ 301{
302 if (!hwif->dma_base) 302 if (!hwif->dma_base)
303 return; 303 return;
@@ -344,7 +344,7 @@ static const struct ide_port_ops ich_port_ops = {
344 .udma_mask = udma, \ 344 .udma_mask = udma, \
345 } 345 }
346 346
347static const struct ide_port_info piix_pci_info[] __devinitconst = { 347static const struct ide_port_info piix_pci_info[] = {
348 /* 0: MPIIX */ 348 /* 0: MPIIX */
349 { /* 349 { /*
350 * MPIIX actually has only a single IDE channel mapped to 350 * MPIIX actually has only a single IDE channel mapped to
@@ -382,7 +382,7 @@ static const struct ide_port_info piix_pci_info[] __devinitconst = {
382 * finds a device matching our IDE device tables. 382 * finds a device matching our IDE device tables.
383 */ 383 */
384 384
385static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_id *id) 385static int piix_init_one(struct pci_dev *dev, const struct pci_device_id *id)
386{ 386{
387 return ide_pci_init_one(dev, &piix_pci_info[id->driver_data], NULL); 387 return ide_pci_init_one(dev, &piix_pci_info[id->driver_data], NULL);
388} 388}
@@ -394,7 +394,7 @@ static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_
394 * they are found, disable use of DMA IDE 394 * they are found, disable use of DMA IDE
395 */ 395 */
396 396
397static void __devinit piix_check_450nx(void) 397static void piix_check_450nx(void)
398{ 398{
399 struct pci_dev *pdev = NULL; 399 struct pci_dev *pdev = NULL;
400 u16 cfg; 400 u16 cfg;
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index e944c7f705f7..bf83d7bb6bc6 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1025,8 +1025,7 @@ static const struct ide_port_info pmac_port_info = {
1025 * Setup, register & probe an IDE channel driven by this driver, this is 1025 * Setup, register & probe an IDE channel driven by this driver, this is
1026 * called by one of the 2 probe functions (macio or PCI). 1026 * called by one of the 2 probe functions (macio or PCI).
1027 */ 1027 */
1028static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, 1028static int pmac_ide_setup_device(pmac_ide_hwif_t *pmif, struct ide_hw *hw)
1029 struct ide_hw *hw)
1030{ 1029{
1031 struct device_node *np = pmif->node; 1030 struct device_node *np = pmif->node;
1032 const int *bidp; 1031 const int *bidp;
@@ -1126,7 +1125,7 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif,
1126 return rc; 1125 return rc;
1127} 1126}
1128 1127
1129static void __devinit pmac_ide_init_ports(struct ide_hw *hw, unsigned long base) 1128static void pmac_ide_init_ports(struct ide_hw *hw, unsigned long base)
1130{ 1129{
1131 int i; 1130 int i;
1132 1131
@@ -1139,8 +1138,8 @@ static void __devinit pmac_ide_init_ports(struct ide_hw *hw, unsigned long base)
1139/* 1138/*
1140 * Attach to a macio probed interface 1139 * Attach to a macio probed interface
1141 */ 1140 */
1142static int __devinit 1141static int pmac_ide_macio_attach(struct macio_dev *mdev,
1143pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) 1142 const struct of_device_id *match)
1144{ 1143{
1145 void __iomem *base; 1144 void __iomem *base;
1146 unsigned long regbase; 1145 unsigned long regbase;
@@ -1262,8 +1261,8 @@ pmac_ide_macio_resume(struct macio_dev *mdev)
1262/* 1261/*
1263 * Attach to a PCI probed interface 1262 * Attach to a PCI probed interface
1264 */ 1263 */
1265static int __devinit 1264static int pmac_ide_pci_attach(struct pci_dev *pdev,
1266pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) 1265 const struct pci_device_id *id)
1267{ 1266{
1268 struct device_node *np; 1267 struct device_node *np;
1269 pmac_ide_hwif_t *pmif; 1268 pmac_ide_hwif_t *pmif;
@@ -1692,8 +1691,7 @@ static const struct ide_dma_ops pmac_dma_ops = {
1692 * Allocate the data structures needed for using DMA with an interface 1691 * Allocate the data structures needed for using DMA with an interface
1693 * and fill the proper list of functions pointers 1692 * and fill the proper list of functions pointers
1694 */ 1693 */
1695static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif, 1694static int pmac_ide_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
1696 const struct ide_port_info *d)
1697{ 1695{
1698 pmac_ide_hwif_t *pmif = 1696 pmac_ide_hwif_t *pmif =
1699 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); 1697 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent);
diff --git a/drivers/ide/rapide.c b/drivers/ide/rapide.c
index 48d976aad7ab..d73c3d10087c 100644
--- a/drivers/ide/rapide.c
+++ b/drivers/ide/rapide.c
@@ -29,8 +29,7 @@ static void rapide_setup_ports(struct ide_hw *hw, void __iomem *base,
29 hw->irq = irq; 29 hw->irq = irq;
30} 30}
31 31
32static int __devinit 32static int rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
33rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
34{ 33{
35 void __iomem *base; 34 void __iomem *base;
36 struct ide_host *host; 35 struct ide_host *host;
@@ -64,7 +63,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
64 return ret; 63 return ret;
65} 64}
66 65
67static void __devexit rapide_remove(struct expansion_card *ec) 66static void rapide_remove(struct expansion_card *ec)
68{ 67{
69 struct ide_host *host = ecard_get_drvdata(ec); 68 struct ide_host *host = ecard_get_drvdata(ec);
70 69
@@ -82,7 +81,7 @@ static struct ecard_id rapide_ids[] = {
82 81
83static struct ecard_driver rapide_driver = { 82static struct ecard_driver rapide_driver = {
84 .probe = rapide_probe, 83 .probe = rapide_probe,
85 .remove = __devexit_p(rapide_remove), 84 .remove = rapide_remove,
86 .id_table = rapide_ids, 85 .id_table = rapide_ids,
87 .drv = { 86 .drv = {
88 .name = "rapide", 87 .name = "rapide",
diff --git a/drivers/ide/rz1000.c b/drivers/ide/rz1000.c
index c04173e9fc38..f4b66f7ec9fd 100644
--- a/drivers/ide/rz1000.c
+++ b/drivers/ide/rz1000.c
@@ -22,7 +22,7 @@
22 22
23#define DRV_NAME "rz1000" 23#define DRV_NAME "rz1000"
24 24
25static int __devinit rz1000_disable_readahead(struct pci_dev *dev) 25static int rz1000_disable_readahead(struct pci_dev *dev)
26{ 26{
27 u16 reg; 27 u16 reg;
28 28
@@ -38,12 +38,12 @@ static int __devinit rz1000_disable_readahead(struct pci_dev *dev)
38 } 38 }
39} 39}
40 40
41static const struct ide_port_info rz1000_chipset __devinitconst = { 41static const struct ide_port_info rz1000_chipset = {
42 .name = DRV_NAME, 42 .name = DRV_NAME,
43 .host_flags = IDE_HFLAG_NO_DMA, 43 .host_flags = IDE_HFLAG_NO_DMA,
44}; 44};
45 45
46static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id) 46static int rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
47{ 47{
48 struct ide_port_info d = rz1000_chipset; 48 struct ide_port_info d = rz1000_chipset;
49 int rc; 49 int rc;
diff --git a/drivers/ide/sc1200.c b/drivers/ide/sc1200.c
index d4758ebe77da..a5b701818405 100644
--- a/drivers/ide/sc1200.c
+++ b/drivers/ide/sc1200.c
@@ -291,7 +291,7 @@ static const struct ide_dma_ops sc1200_dma_ops = {
291 .dma_sff_read_status = ide_dma_sff_read_status, 291 .dma_sff_read_status = ide_dma_sff_read_status,
292}; 292};
293 293
294static const struct ide_port_info sc1200_chipset __devinitconst = { 294static const struct ide_port_info sc1200_chipset = {
295 .name = DRV_NAME, 295 .name = DRV_NAME,
296 .port_ops = &sc1200_port_ops, 296 .port_ops = &sc1200_port_ops,
297 .dma_ops = &sc1200_dma_ops, 297 .dma_ops = &sc1200_dma_ops,
@@ -303,7 +303,7 @@ static const struct ide_port_info sc1200_chipset __devinitconst = {
303 .udma_mask = ATA_UDMA2, 303 .udma_mask = ATA_UDMA2,
304}; 304};
305 305
306static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) 306static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
307{ 307{
308 struct sc1200_saved_state *ss = NULL; 308 struct sc1200_saved_state *ss = NULL;
309 int rc; 309 int rc;
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c
index 970103810021..2a2d188b5d5b 100644
--- a/drivers/ide/scc_pata.c
+++ b/drivers/ide/scc_pata.c
@@ -585,8 +585,7 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev,
585 * Perform the initial set up for this device. 585 * Perform the initial set up for this device.
586 */ 586 */
587 587
588static int __devinit init_setup_scc(struct pci_dev *dev, 588static int init_setup_scc(struct pci_dev *dev, const struct ide_port_info *d)
589 const struct ide_port_info *d)
590{ 589{
591 unsigned long ctl_base; 590 unsigned long ctl_base;
592 unsigned long dma_base; 591 unsigned long dma_base;
@@ -718,7 +717,7 @@ static void scc_output_data(ide_drive_t *drive, struct ide_cmd *cmd,
718 * 717 *
719 */ 718 */
720 719
721static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif) 720static void init_mmio_iops_scc(ide_hwif_t *hwif)
722{ 721{
723 struct pci_dev *dev = to_pci_dev(hwif->dev); 722 struct pci_dev *dev = to_pci_dev(hwif->dev);
724 struct scc_ports *ports = pci_get_drvdata(dev); 723 struct scc_ports *ports = pci_get_drvdata(dev);
@@ -738,7 +737,7 @@ static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif)
738 * and then do the MMIO setup. 737 * and then do the MMIO setup.
739 */ 738 */
740 739
741static void __devinit init_iops_scc(ide_hwif_t *hwif) 740static void init_iops_scc(ide_hwif_t *hwif)
742{ 741{
743 struct pci_dev *dev = to_pci_dev(hwif->dev); 742 struct pci_dev *dev = to_pci_dev(hwif->dev);
744 743
@@ -748,8 +747,7 @@ static void __devinit init_iops_scc(ide_hwif_t *hwif)
748 init_mmio_iops_scc(hwif); 747 init_mmio_iops_scc(hwif);
749} 748}
750 749
751static int __devinit scc_init_dma(ide_hwif_t *hwif, 750static int scc_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
752 const struct ide_port_info *d)
753{ 751{
754 return ide_allocate_dma_engine(hwif); 752 return ide_allocate_dma_engine(hwif);
755} 753}
@@ -768,7 +766,7 @@ static u8 scc_cable_detect(ide_hwif_t *hwif)
768 * ide DMA handlers appropriately. 766 * ide DMA handlers appropriately.
769 */ 767 */
770 768
771static void __devinit init_hwif_scc(ide_hwif_t *hwif) 769static void init_hwif_scc(ide_hwif_t *hwif)
772{ 770{
773 /* PTERADD */ 771 /* PTERADD */
774 out_be32((void __iomem *)(hwif->dma_base + 0x018), hwif->dmatable_dma); 772 out_be32((void __iomem *)(hwif->dma_base + 0x018), hwif->dmatable_dma);
@@ -811,7 +809,7 @@ static const struct ide_dma_ops scc_dma_ops = {
811 .dma_sff_read_status = scc_dma_sff_read_status, 809 .dma_sff_read_status = scc_dma_sff_read_status,
812}; 810};
813 811
814static const struct ide_port_info scc_chipset __devinitconst = { 812static const struct ide_port_info scc_chipset = {
815 .name = "sccIDE", 813 .name = "sccIDE",
816 .init_iops = init_iops_scc, 814 .init_iops = init_iops_scc,
817 .init_dma = scc_init_dma, 815 .init_dma = scc_init_dma,
@@ -834,7 +832,7 @@ static const struct ide_port_info scc_chipset __devinitconst = {
834 * We then use the IDE PCI generic helper to do most of the work. 832 * We then use the IDE PCI generic helper to do most of the work.
835 */ 833 */
836 834
837static int __devinit scc_init_one(struct pci_dev *dev, const struct pci_device_id *id) 835static int scc_init_one(struct pci_dev *dev, const struct pci_device_id *id)
838{ 836{
839 return init_setup_scc(dev, &scc_chipset); 837 return init_setup_scc(dev, &scc_chipset);
840} 838}
@@ -846,7 +844,7 @@ static int __devinit scc_init_one(struct pci_dev *dev, const struct pci_device_i
846 * Called by the PCI code when it removes an SCC PATA controller. 844 * Called by the PCI code when it removes an SCC PATA controller.
847 */ 845 */
848 846
849static void __devexit scc_remove(struct pci_dev *dev) 847static void scc_remove(struct pci_dev *dev)
850{ 848{
851 struct scc_ports *ports = pci_get_drvdata(dev); 849 struct scc_ports *ports = pci_get_drvdata(dev);
852 struct ide_host *host = ports->host; 850 struct ide_host *host = ports->host;
@@ -869,7 +867,7 @@ static struct pci_driver scc_pci_driver = {
869 .name = "SCC IDE", 867 .name = "SCC IDE",
870 .id_table = scc_pci_tbl, 868 .id_table = scc_pci_tbl,
871 .probe = scc_init_one, 869 .probe = scc_init_one,
872 .remove = __devexit_p(scc_remove), 870 .remove = scc_remove,
873}; 871};
874 872
875static int __init scc_ide_init(void) 873static int __init scc_ide_init(void)
diff --git a/drivers/ide/serverworks.c b/drivers/ide/serverworks.c
index 24d72ef23df7..a97affca18ab 100644
--- a/drivers/ide/serverworks.c
+++ b/drivers/ide/serverworks.c
@@ -337,7 +337,7 @@ static const struct ide_port_ops svwks_port_ops = {
337 .cable_detect = svwks_cable_detect, 337 .cable_detect = svwks_cable_detect,
338}; 338};
339 339
340static const struct ide_port_info serverworks_chipsets[] __devinitconst = { 340static const struct ide_port_info serverworks_chipsets[] = {
341 { /* 0: OSB4 */ 341 { /* 0: OSB4 */
342 .name = DRV_NAME, 342 .name = DRV_NAME,
343 .init_chipset = init_chipset_svwks, 343 .init_chipset = init_chipset_svwks,
@@ -391,7 +391,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitconst = {
391 * finds a device matching our IDE device tables. 391 * finds a device matching our IDE device tables.
392 */ 392 */
393 393
394static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id) 394static int svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id)
395{ 395{
396 struct ide_port_info d; 396 struct ide_port_info d;
397 u8 idx = id->driver_data; 397 u8 idx = id->driver_data;
diff --git a/drivers/ide/sgiioc4.c b/drivers/ide/sgiioc4.c
index e3ea591f66d3..a5ca179a83b3 100644
--- a/drivers/ide/sgiioc4.c
+++ b/drivers/ide/sgiioc4.c
@@ -307,8 +307,7 @@ static u8 sgiioc4_read_status(ide_hwif_t *hwif)
307} 307}
308 308
309/* Creates a DMA map for the scatter-gather list entries */ 309/* Creates a DMA map for the scatter-gather list entries */
310static int __devinit ide_dma_sgiioc4(ide_hwif_t *hwif, 310static int ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d)
311 const struct ide_port_info *d)
312{ 311{
313 struct pci_dev *dev = to_pci_dev(hwif->dev); 312 struct pci_dev *dev = to_pci_dev(hwif->dev);
314 unsigned long dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET; 313 unsigned long dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET;
@@ -520,7 +519,7 @@ static const struct ide_dma_ops sgiioc4_dma_ops = {
520 .dma_lost_irq = sgiioc4_dma_lost_irq, 519 .dma_lost_irq = sgiioc4_dma_lost_irq,
521}; 520};
522 521
523static const struct ide_port_info sgiioc4_port_info __devinitconst = { 522static const struct ide_port_info sgiioc4_port_info = {
524 .name = DRV_NAME, 523 .name = DRV_NAME,
525 .chipset = ide_pci, 524 .chipset = ide_pci,
526 .init_dma = ide_dma_sgiioc4, 525 .init_dma = ide_dma_sgiioc4,
@@ -532,7 +531,7 @@ static const struct ide_port_info sgiioc4_port_info __devinitconst = {
532 .mwdma_mask = ATA_MWDMA2_ONLY, 531 .mwdma_mask = ATA_MWDMA2_ONLY,
533}; 532};
534 533
535static int __devinit sgiioc4_ide_setup_pci_device(struct pci_dev *dev) 534static int sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
536{ 535{
537 unsigned long cmd_base, irqport; 536 unsigned long cmd_base, irqport;
538 unsigned long bar0, cmd_phys_base, ctl; 537 unsigned long bar0, cmd_phys_base, ctl;
@@ -581,7 +580,7 @@ req_mem_rgn_err:
581 return rc; 580 return rc;
582} 581}
583 582
584static unsigned int __devinit pci_init_sgiioc4(struct pci_dev *dev) 583static unsigned int pci_init_sgiioc4(struct pci_dev *dev)
585{ 584{
586 int ret; 585 int ret;
587 586
@@ -601,7 +600,7 @@ out:
601 return ret; 600 return ret;
602} 601}
603 602
604int __devinit ioc4_ide_attach_one(struct ioc4_driver_data *idd) 603int ioc4_ide_attach_one(struct ioc4_driver_data *idd)
605{ 604{
606 /* 605 /*
607 * PCI-RT does not bring out IDE connection. 606 * PCI-RT does not bring out IDE connection.
@@ -613,7 +612,7 @@ int __devinit ioc4_ide_attach_one(struct ioc4_driver_data *idd)
613 return pci_init_sgiioc4(idd->idd_pdev); 612 return pci_init_sgiioc4(idd->idd_pdev);
614} 613}
615 614
616static struct ioc4_submodule __devinitdata ioc4_ide_submodule = { 615static struct ioc4_submodule ioc4_ide_submodule = {
617 .is_name = "IOC4_ide", 616 .is_name = "IOC4_ide",
618 .is_owner = THIS_MODULE, 617 .is_owner = THIS_MODULE,
619 .is_probe = ioc4_ide_attach_one, 618 .is_probe = ioc4_ide_attach_one,
diff --git a/drivers/ide/siimage.c b/drivers/ide/siimage.c
index 46f7e30d3790..6a1849bb476c 100644
--- a/drivers/ide/siimage.c
+++ b/drivers/ide/siimage.c
@@ -546,7 +546,7 @@ static int init_chipset_siimage(struct pci_dev *dev)
546 * extended PRD tables. For better SI3112 support use the libata driver 546 * extended PRD tables. For better SI3112 support use the libata driver
547 */ 547 */
548 548
549static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) 549static void init_mmio_iops_siimage(ide_hwif_t *hwif)
550{ 550{
551 struct pci_dev *dev = to_pci_dev(hwif->dev); 551 struct pci_dev *dev = to_pci_dev(hwif->dev);
552 struct ide_host *host = pci_get_drvdata(dev); 552 struct ide_host *host = pci_get_drvdata(dev);
@@ -646,7 +646,7 @@ static void sil_quirkproc(ide_drive_t *drive)
646 * can get the iops right before using them. 646 * can get the iops right before using them.
647 */ 647 */
648 648
649static void __devinit init_iops_siimage(ide_hwif_t *hwif) 649static void init_iops_siimage(ide_hwif_t *hwif)
650{ 650{
651 struct pci_dev *dev = to_pci_dev(hwif->dev); 651 struct pci_dev *dev = to_pci_dev(hwif->dev);
652 struct ide_host *host = pci_get_drvdata(dev); 652 struct ide_host *host = pci_get_drvdata(dev);
@@ -719,7 +719,7 @@ static const struct ide_dma_ops sil_dma_ops = {
719 .udma_mask = ATA_UDMA6, \ 719 .udma_mask = ATA_UDMA6, \
720 } 720 }
721 721
722static const struct ide_port_info siimage_chipsets[] __devinitconst = { 722static const struct ide_port_info siimage_chipsets[] = {
723 /* 0: SiI680 */ DECLARE_SII_DEV(&sil_pata_port_ops), 723 /* 0: SiI680 */ DECLARE_SII_DEV(&sil_pata_port_ops),
724 /* 1: SiI3112 */ DECLARE_SII_DEV(&sil_sata_port_ops) 724 /* 1: SiI3112 */ DECLARE_SII_DEV(&sil_sata_port_ops)
725}; 725};
@@ -733,8 +733,7 @@ static const struct ide_port_info siimage_chipsets[] __devinitconst = {
733 * We then use the IDE PCI generic helper to do most of the work. 733 * We then use the IDE PCI generic helper to do most of the work.
734 */ 734 */
735 735
736static int __devinit siimage_init_one(struct pci_dev *dev, 736static int siimage_init_one(struct pci_dev *dev, const struct pci_device_id *id)
737 const struct pci_device_id *id)
738{ 737{
739 void __iomem *ioaddr = NULL; 738 void __iomem *ioaddr = NULL;
740 resource_size_t bar5 = pci_resource_start(dev, 5); 739 resource_size_t bar5 = pci_resource_start(dev, 5);
@@ -790,7 +789,7 @@ static int __devinit siimage_init_one(struct pci_dev *dev,
790 return rc; 789 return rc;
791} 790}
792 791
793static void __devexit siimage_remove(struct pci_dev *dev) 792static void siimage_remove(struct pci_dev *dev)
794{ 793{
795 struct ide_host *host = pci_get_drvdata(dev); 794 struct ide_host *host = pci_get_drvdata(dev);
796 void __iomem *ioaddr = host->host_priv; 795 void __iomem *ioaddr = host->host_priv;
@@ -822,7 +821,7 @@ static struct pci_driver siimage_pci_driver = {
822 .name = "SiI_IDE", 821 .name = "SiI_IDE",
823 .id_table = siimage_pci_tbl, 822 .id_table = siimage_pci_tbl,
824 .probe = siimage_init_one, 823 .probe = siimage_init_one,
825 .remove = __devexit_p(siimage_remove), 824 .remove = siimage_remove,
826 .suspend = ide_pci_suspend, 825 .suspend = ide_pci_suspend,
827 .resume = ide_pci_resume, 826 .resume = ide_pci_resume,
828}; 827};
diff --git a/drivers/ide/sis5513.c b/drivers/ide/sis5513.c
index 09e61b4c5e94..247853ea1368 100644
--- a/drivers/ide/sis5513.c
+++ b/drivers/ide/sis5513.c
@@ -362,7 +362,7 @@ static u8 sis_ata133_udma_filter(ide_drive_t *drive)
362 return (regdw & 0x08) ? ATA_UDMA6 : ATA_UDMA5; 362 return (regdw & 0x08) ? ATA_UDMA6 : ATA_UDMA5;
363} 363}
364 364
365static int __devinit sis_find_family(struct pci_dev *dev) 365static int sis_find_family(struct pci_dev *dev)
366{ 366{
367 struct pci_dev *host; 367 struct pci_dev *host;
368 int i = 0; 368 int i = 0;
@@ -563,7 +563,7 @@ static const struct ide_port_ops sis_ata133_port_ops = {
563 .cable_detect = sis_cable_detect, 563 .cable_detect = sis_cable_detect,
564}; 564};
565 565
566static const struct ide_port_info sis5513_chipset __devinitconst = { 566static const struct ide_port_info sis5513_chipset = {
567 .name = DRV_NAME, 567 .name = DRV_NAME,
568 .init_chipset = init_chipset_sis5513, 568 .init_chipset = init_chipset_sis5513,
569 .enablebits = { {0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04} }, 569 .enablebits = { {0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04} },
@@ -572,7 +572,7 @@ static const struct ide_port_info sis5513_chipset __devinitconst = {
572 .mwdma_mask = ATA_MWDMA2, 572 .mwdma_mask = ATA_MWDMA2,
573}; 573};
574 574
575static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id) 575static int sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id)
576{ 576{
577 struct ide_port_info d = sis5513_chipset; 577 struct ide_port_info d = sis5513_chipset;
578 u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f }; 578 u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f };
@@ -595,7 +595,7 @@ static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_devi
595 return ide_pci_init_one(dev, &d, NULL); 595 return ide_pci_init_one(dev, &d, NULL);
596} 596}
597 597
598static void __devexit sis5513_remove(struct pci_dev *dev) 598static void sis5513_remove(struct pci_dev *dev)
599{ 599{
600 ide_pci_remove(dev); 600 ide_pci_remove(dev);
601 pci_disable_device(dev); 601 pci_disable_device(dev);
@@ -613,7 +613,7 @@ static struct pci_driver sis5513_pci_driver = {
613 .name = "SIS_IDE", 613 .name = "SIS_IDE",
614 .id_table = sis5513_pci_tbl, 614 .id_table = sis5513_pci_tbl,
615 .probe = sis5513_init_one, 615 .probe = sis5513_init_one,
616 .remove = __devexit_p(sis5513_remove), 616 .remove = sis5513_remove,
617 .suspend = ide_pci_suspend, 617 .suspend = ide_pci_suspend,
618 .resume = ide_pci_resume, 618 .resume = ide_pci_resume,
619}; 619};
diff --git a/drivers/ide/sl82c105.c b/drivers/ide/sl82c105.c
index d051cd224bdb..8755df3330a0 100644
--- a/drivers/ide/sl82c105.c
+++ b/drivers/ide/sl82c105.c
@@ -299,7 +299,7 @@ static const struct ide_dma_ops sl82c105_dma_ops = {
299 .dma_sff_read_status = ide_dma_sff_read_status, 299 .dma_sff_read_status = ide_dma_sff_read_status,
300}; 300};
301 301
302static const struct ide_port_info sl82c105_chipset __devinitconst = { 302static const struct ide_port_info sl82c105_chipset = {
303 .name = DRV_NAME, 303 .name = DRV_NAME,
304 .init_chipset = init_chipset_sl82c105, 304 .init_chipset = init_chipset_sl82c105,
305 .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, 305 .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
@@ -313,7 +313,7 @@ static const struct ide_port_info sl82c105_chipset __devinitconst = {
313 .mwdma_mask = ATA_MWDMA2, 313 .mwdma_mask = ATA_MWDMA2,
314}; 314};
315 315
316static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id) 316static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
317{ 317{
318 struct ide_port_info d = sl82c105_chipset; 318 struct ide_port_info d = sl82c105_chipset;
319 u8 rev = sl82c105_bridge_revision(dev); 319 u8 rev = sl82c105_bridge_revision(dev);
diff --git a/drivers/ide/slc90e66.c b/drivers/ide/slc90e66.c
index 863a5e9283ca..8af92bbb3dcb 100644
--- a/drivers/ide/slc90e66.c
+++ b/drivers/ide/slc90e66.c
@@ -132,7 +132,7 @@ static const struct ide_port_ops slc90e66_port_ops = {
132 .cable_detect = slc90e66_cable_detect, 132 .cable_detect = slc90e66_cable_detect,
133}; 133};
134 134
135static const struct ide_port_info slc90e66_chipset __devinitconst = { 135static const struct ide_port_info slc90e66_chipset = {
136 .name = DRV_NAME, 136 .name = DRV_NAME,
137 .enablebits = { {0x41, 0x80, 0x80}, {0x43, 0x80, 0x80} }, 137 .enablebits = { {0x41, 0x80, 0x80}, {0x43, 0x80, 0x80} },
138 .port_ops = &slc90e66_port_ops, 138 .port_ops = &slc90e66_port_ops,
@@ -142,7 +142,8 @@ static const struct ide_port_info slc90e66_chipset __devinitconst = {
142 .udma_mask = ATA_UDMA4, 142 .udma_mask = ATA_UDMA4,
143}; 143};
144 144
145static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id) 145static int slc90e66_init_one(struct pci_dev *dev,
146 const struct pci_device_id *id)
146{ 147{
147 return ide_pci_init_one(dev, &slc90e66_chipset, NULL); 148 return ide_pci_init_one(dev, &slc90e66_chipset, NULL);
148} 149}
diff --git a/drivers/ide/tc86c001.c b/drivers/ide/tc86c001.c
index 17946785ebf6..17e6132b99bf 100644
--- a/drivers/ide/tc86c001.c
+++ b/drivers/ide/tc86c001.c
@@ -144,7 +144,7 @@ static u8 tc86c001_cable_detect(ide_hwif_t *hwif)
144 return (scr1 & 0x2000) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; 144 return (scr1 & 0x2000) ? ATA_CBL_PATA40 : ATA_CBL_PATA80;
145} 145}
146 146
147static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif) 147static void init_hwif_tc86c001(ide_hwif_t *hwif)
148{ 148{
149 struct pci_dev *dev = to_pci_dev(hwif->dev); 149 struct pci_dev *dev = to_pci_dev(hwif->dev);
150 unsigned long sc_base = pci_resource_start(dev, 5); 150 unsigned long sc_base = pci_resource_start(dev, 5);
@@ -192,7 +192,7 @@ static const struct ide_dma_ops tc86c001_dma_ops = {
192 .dma_sff_read_status = ide_dma_sff_read_status, 192 .dma_sff_read_status = ide_dma_sff_read_status,
193}; 193};
194 194
195static const struct ide_port_info tc86c001_chipset __devinitconst = { 195static const struct ide_port_info tc86c001_chipset = {
196 .name = DRV_NAME, 196 .name = DRV_NAME,
197 .init_hwif = init_hwif_tc86c001, 197 .init_hwif = init_hwif_tc86c001,
198 .port_ops = &tc86c001_port_ops, 198 .port_ops = &tc86c001_port_ops,
@@ -203,8 +203,8 @@ static const struct ide_port_info tc86c001_chipset __devinitconst = {
203 .udma_mask = ATA_UDMA4, 203 .udma_mask = ATA_UDMA4,
204}; 204};
205 205
206static int __devinit tc86c001_init_one(struct pci_dev *dev, 206static int tc86c001_init_one(struct pci_dev *dev,
207 const struct pci_device_id *id) 207 const struct pci_device_id *id)
208{ 208{
209 int rc; 209 int rc;
210 210
@@ -232,7 +232,7 @@ out:
232 return rc; 232 return rc;
233} 233}
234 234
235static void __devexit tc86c001_remove(struct pci_dev *dev) 235static void tc86c001_remove(struct pci_dev *dev)
236{ 236{
237 ide_pci_remove(dev); 237 ide_pci_remove(dev);
238 pci_release_region(dev, 5); 238 pci_release_region(dev, 5);
@@ -249,7 +249,7 @@ static struct pci_driver tc86c001_pci_driver = {
249 .name = "TC86C001", 249 .name = "TC86C001",
250 .id_table = tc86c001_pci_tbl, 250 .id_table = tc86c001_pci_tbl,
251 .probe = tc86c001_init_one, 251 .probe = tc86c001_init_one,
252 .remove = __devexit_p(tc86c001_remove), 252 .remove = tc86c001_remove,
253}; 253};
254 254
255static int __init tc86c001_ide_init(void) 255static int __init tc86c001_ide_init(void)
diff --git a/drivers/ide/triflex.c b/drivers/ide/triflex.c
index 55ce1b80efcb..7f1af9493f0e 100644
--- a/drivers/ide/triflex.c
+++ b/drivers/ide/triflex.c
@@ -92,7 +92,7 @@ static const struct ide_port_ops triflex_port_ops = {
92 .set_dma_mode = triflex_set_mode, 92 .set_dma_mode = triflex_set_mode,
93}; 93};
94 94
95static const struct ide_port_info triflex_device __devinitconst = { 95static const struct ide_port_info triflex_device = {
96 .name = DRV_NAME, 96 .name = DRV_NAME,
97 .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, 97 .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
98 .port_ops = &triflex_port_ops, 98 .port_ops = &triflex_port_ops,
@@ -101,8 +101,7 @@ static const struct ide_port_info triflex_device __devinitconst = {
101 .mwdma_mask = ATA_MWDMA2, 101 .mwdma_mask = ATA_MWDMA2,
102}; 102};
103 103
104static int __devinit triflex_init_one(struct pci_dev *dev, 104static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
105 const struct pci_device_id *id)
106{ 105{
107 return ide_pci_init_one(dev, &triflex_device, NULL); 106 return ide_pci_init_one(dev, &triflex_device, NULL);
108} 107}
diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c
index e494a98a43a9..0069f6ce74cf 100644
--- a/drivers/ide/trm290.c
+++ b/drivers/ide/trm290.c
@@ -231,7 +231,7 @@ static void trm290_dma_host_set(ide_drive_t *drive, int on)
231{ 231{
232} 232}
233 233
234static void __devinit init_hwif_trm290(ide_hwif_t *hwif) 234static void init_hwif_trm290(ide_hwif_t *hwif)
235{ 235{
236 struct pci_dev *dev = to_pci_dev(hwif->dev); 236 struct pci_dev *dev = to_pci_dev(hwif->dev);
237 unsigned int cfg_base = pci_resource_start(dev, 4); 237 unsigned int cfg_base = pci_resource_start(dev, 4);
@@ -324,7 +324,7 @@ static struct ide_dma_ops trm290_dma_ops = {
324 .dma_check = trm290_dma_check, 324 .dma_check = trm290_dma_check,
325}; 325};
326 326
327static const struct ide_port_info trm290_chipset __devinitconst = { 327static const struct ide_port_info trm290_chipset = {
328 .name = DRV_NAME, 328 .name = DRV_NAME,
329 .init_hwif = init_hwif_trm290, 329 .init_hwif = init_hwif_trm290,
330 .tp_ops = &trm290_tp_ops, 330 .tp_ops = &trm290_tp_ops,
@@ -338,7 +338,7 @@ static const struct ide_port_info trm290_chipset __devinitconst = {
338 IDE_HFLAG_NO_LBA48, 338 IDE_HFLAG_NO_LBA48,
339}; 339};
340 340
341static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id) 341static int trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)
342{ 342{
343 return ide_pci_init_one(dev, &trm290_chipset, NULL); 343 return ide_pci_init_one(dev, &trm290_chipset, NULL);
344} 344}
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
index eb7767864d10..01464f1e2339 100644
--- a/drivers/ide/via82cxxx.c
+++ b/drivers/ide/via82cxxx.c
@@ -403,7 +403,7 @@ static const struct ide_port_ops via_port_ops = {
403 .cable_detect = via82cxxx_cable_detect, 403 .cable_detect = via82cxxx_cable_detect,
404}; 404};
405 405
406static const struct ide_port_info via82cxxx_chipset __devinitconst = { 406static const struct ide_port_info via82cxxx_chipset = {
407 .name = DRV_NAME, 407 .name = DRV_NAME,
408 .init_chipset = init_chipset_via82cxxx, 408 .init_chipset = init_chipset_via82cxxx,
409 .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, 409 .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } },
@@ -416,7 +416,7 @@ static const struct ide_port_info via82cxxx_chipset __devinitconst = {
416 .mwdma_mask = ATA_MWDMA2, 416 .mwdma_mask = ATA_MWDMA2,
417}; 417};
418 418
419static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) 419static int via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
420{ 420{
421 struct pci_dev *isa = NULL; 421 struct pci_dev *isa = NULL;
422 struct via_isa_bridge *via_config; 422 struct via_isa_bridge *via_config;
@@ -489,7 +489,7 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i
489 return rc; 489 return rc;
490} 490}
491 491
492static void __devexit via_remove(struct pci_dev *dev) 492static void via_remove(struct pci_dev *dev)
493{ 493{
494 struct ide_host *host = pci_get_drvdata(dev); 494 struct ide_host *host = pci_get_drvdata(dev);
495 struct via82cxxx_dev *vdev = host->host_priv; 495 struct via82cxxx_dev *vdev = host->host_priv;
@@ -514,7 +514,7 @@ static struct pci_driver via_pci_driver = {
514 .name = "VIA_IDE", 514 .name = "VIA_IDE",
515 .id_table = via_pci_tbl, 515 .id_table = via_pci_tbl,
516 .probe = via_init_one, 516 .probe = via_init_one,
517 .remove = __devexit_p(via_remove), 517 .remove = via_remove,
518 .suspend = ide_pci_suspend, 518 .suspend = ide_pci_suspend,
519 .resume = ide_pci_resume, 519 .resume = ide_pci_resume,
520}; 520};
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index c49c04d9c2b0..4ba384f1ab54 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -506,7 +506,7 @@ static int intel_idle_cpuidle_driver_init(void)
506 if (*cpuidle_state_table[cstate].name == '\0') 506 if (*cpuidle_state_table[cstate].name == '\0')
507 pr_debug(PREFIX "unaware of model 0x%x" 507 pr_debug(PREFIX "unaware of model 0x%x"
508 " MWAIT %d please" 508 " MWAIT %d please"
509 " contact lenb@kernel.org", 509 " contact lenb@kernel.org\n",
510 boot_cpu_data.x86_model, cstate); 510 boot_cpu_data.x86_model, cstate);
511 continue; 511 continue;
512 } 512 }
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index e67bb912bd19..0b0c3c66f6c0 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -278,7 +278,7 @@ static int accel_3d_parse_report(struct platform_device *pdev,
278} 278}
279 279
280/* Function to initialize the processing for usage id */ 280/* Function to initialize the processing for usage id */
281static int __devinit hid_accel_3d_probe(struct platform_device *pdev) 281static int hid_accel_3d_probe(struct platform_device *pdev)
282{ 282{
283 int ret = 0; 283 int ret = 0;
284 static const char *name = "accel_3d"; 284 static const char *name = "accel_3d";
@@ -375,7 +375,7 @@ error_ret:
375} 375}
376 376
377/* Function to deinitialize the processing for usage id */ 377/* Function to deinitialize the processing for usage id */
378static int __devinit hid_accel_3d_remove(struct platform_device *pdev) 378static int hid_accel_3d_remove(struct platform_device *pdev)
379{ 379{
380 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 380 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
381 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 381 struct iio_dev *indio_dev = platform_get_drvdata(pdev);
diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c
index a6f4fc5f8201..4a5f639bc684 100644
--- a/drivers/iio/adc/ad7266.c
+++ b/drivers/iio/adc/ad7266.c
@@ -367,7 +367,7 @@ static const struct ad7266_chan_info ad7266_chan_infos[] = {
367 }, 367 },
368}; 368};
369 369
370static void __devinit ad7266_init_channels(struct iio_dev *indio_dev) 370static void ad7266_init_channels(struct iio_dev *indio_dev)
371{ 371{
372 struct ad7266_state *st = iio_priv(indio_dev); 372 struct ad7266_state *st = iio_priv(indio_dev);
373 bool is_differential, is_signed; 373 bool is_differential, is_signed;
@@ -391,7 +391,7 @@ static const char * const ad7266_gpio_labels[] = {
391 "AD0", "AD1", "AD2", 391 "AD0", "AD1", "AD2",
392}; 392};
393 393
394static int __devinit ad7266_probe(struct spi_device *spi) 394static int ad7266_probe(struct spi_device *spi)
395{ 395{
396 struct ad7266_platform_data *pdata = spi->dev.platform_data; 396 struct ad7266_platform_data *pdata = spi->dev.platform_data;
397 struct iio_dev *indio_dev; 397 struct iio_dev *indio_dev;
@@ -494,7 +494,7 @@ error_put_reg:
494 return ret; 494 return ret;
495} 495}
496 496
497static int __devexit ad7266_remove(struct spi_device *spi) 497static int ad7266_remove(struct spi_device *spi)
498{ 498{
499 struct iio_dev *indio_dev = spi_get_drvdata(spi); 499 struct iio_dev *indio_dev = spi_get_drvdata(spi);
500 struct ad7266_state *st = iio_priv(indio_dev); 500 struct ad7266_state *st = iio_priv(indio_dev);
@@ -525,7 +525,7 @@ static struct spi_driver ad7266_driver = {
525 .owner = THIS_MODULE, 525 .owner = THIS_MODULE,
526 }, 526 },
527 .probe = ad7266_probe, 527 .probe = ad7266_probe,
528 .remove = __devexit_p(ad7266_remove), 528 .remove = ad7266_remove,
529 .id_table = ad7266_id, 529 .id_table = ad7266_id,
530}; 530};
531module_spi_driver(ad7266_driver); 531module_spi_driver(ad7266_driver);
diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c
index 2364807a5d6c..b34d754994d5 100644
--- a/drivers/iio/adc/ad7298.c
+++ b/drivers/iio/adc/ad7298.c
@@ -292,7 +292,7 @@ static const struct iio_info ad7298_info = {
292 .driver_module = THIS_MODULE, 292 .driver_module = THIS_MODULE,
293}; 293};
294 294
295static int __devinit ad7298_probe(struct spi_device *spi) 295static int ad7298_probe(struct spi_device *spi)
296{ 296{
297 struct ad7298_platform_data *pdata = spi->dev.platform_data; 297 struct ad7298_platform_data *pdata = spi->dev.platform_data;
298 struct ad7298_state *st; 298 struct ad7298_state *st;
@@ -370,7 +370,7 @@ error_free:
370 return ret; 370 return ret;
371} 371}
372 372
373static int __devexit ad7298_remove(struct spi_device *spi) 373static int ad7298_remove(struct spi_device *spi)
374{ 374{
375 struct iio_dev *indio_dev = spi_get_drvdata(spi); 375 struct iio_dev *indio_dev = spi_get_drvdata(spi);
376 struct ad7298_state *st = iio_priv(indio_dev); 376 struct ad7298_state *st = iio_priv(indio_dev);
@@ -398,7 +398,7 @@ static struct spi_driver ad7298_driver = {
398 .owner = THIS_MODULE, 398 .owner = THIS_MODULE,
399 }, 399 },
400 .probe = ad7298_probe, 400 .probe = ad7298_probe,
401 .remove = __devexit_p(ad7298_remove), 401 .remove = ad7298_remove,
402 .id_table = ad7298_id, 402 .id_table = ad7298_id,
403}; 403};
404module_spi_driver(ad7298_driver); 404module_spi_driver(ad7298_driver);
diff --git a/drivers/iio/adc/ad7476.c b/drivers/iio/adc/ad7476.c
index 330248bfebae..1491fa6debb2 100644
--- a/drivers/iio/adc/ad7476.c
+++ b/drivers/iio/adc/ad7476.c
@@ -207,7 +207,7 @@ static const struct iio_info ad7476_info = {
207 .read_raw = &ad7476_read_raw, 207 .read_raw = &ad7476_read_raw,
208}; 208};
209 209
210static int __devinit ad7476_probe(struct spi_device *spi) 210static int ad7476_probe(struct spi_device *spi)
211{ 211{
212 struct ad7476_state *st; 212 struct ad7476_state *st;
213 struct iio_dev *indio_dev; 213 struct iio_dev *indio_dev;
@@ -277,7 +277,7 @@ error_ret:
277 return ret; 277 return ret;
278} 278}
279 279
280static int __devexit ad7476_remove(struct spi_device *spi) 280static int ad7476_remove(struct spi_device *spi)
281{ 281{
282 struct iio_dev *indio_dev = spi_get_drvdata(spi); 282 struct iio_dev *indio_dev = spi_get_drvdata(spi);
283 struct ad7476_state *st = iio_priv(indio_dev); 283 struct ad7476_state *st = iio_priv(indio_dev);
@@ -322,7 +322,7 @@ static struct spi_driver ad7476_driver = {
322 .owner = THIS_MODULE, 322 .owner = THIS_MODULE,
323 }, 323 },
324 .probe = ad7476_probe, 324 .probe = ad7476_probe,
325 .remove = __devexit_p(ad7476_remove), 325 .remove = ad7476_remove,
326 .id_table = ad7476_id, 326 .id_table = ad7476_id,
327}; 327};
328module_spi_driver(ad7476_driver); 328module_spi_driver(ad7476_driver);
diff --git a/drivers/iio/adc/ad7791.c b/drivers/iio/adc/ad7791.c
index e93740843b2b..5e8d1da6887f 100644
--- a/drivers/iio/adc/ad7791.c
+++ b/drivers/iio/adc/ad7791.c
@@ -325,8 +325,8 @@ static const struct iio_info ad7791_no_filter_info = {
325 .driver_module = THIS_MODULE, 325 .driver_module = THIS_MODULE,
326}; 326};
327 327
328static int __devinit ad7791_setup(struct ad7791_state *st, 328static int ad7791_setup(struct ad7791_state *st,
329 struct ad7791_platform_data *pdata) 329 struct ad7791_platform_data *pdata)
330{ 330{
331 /* Set to poweron-reset default values */ 331 /* Set to poweron-reset default values */
332 st->mode = AD7791_MODE_BUFFER; 332 st->mode = AD7791_MODE_BUFFER;
@@ -349,7 +349,7 @@ static int __devinit ad7791_setup(struct ad7791_state *st,
349 st->mode); 349 st->mode);
350} 350}
351 351
352static int __devinit ad7791_probe(struct spi_device *spi) 352static int ad7791_probe(struct spi_device *spi)
353{ 353{
354 struct ad7791_platform_data *pdata = spi->dev.platform_data; 354 struct ad7791_platform_data *pdata = spi->dev.platform_data;
355 struct iio_dev *indio_dev; 355 struct iio_dev *indio_dev;
@@ -418,7 +418,7 @@ err_iio_free:
418 return ret; 418 return ret;
419} 419}
420 420
421static int __devexit ad7791_remove(struct spi_device *spi) 421static int ad7791_remove(struct spi_device *spi)
422{ 422{
423 struct iio_dev *indio_dev = spi_get_drvdata(spi); 423 struct iio_dev *indio_dev = spi_get_drvdata(spi);
424 struct ad7791_state *st = iio_priv(indio_dev); 424 struct ad7791_state *st = iio_priv(indio_dev);
@@ -450,7 +450,7 @@ static struct spi_driver ad7791_driver = {
450 .owner = THIS_MODULE, 450 .owner = THIS_MODULE,
451 }, 451 },
452 .probe = ad7791_probe, 452 .probe = ad7791_probe,
453 .remove = __devexit_p(ad7791_remove), 453 .remove = ad7791_remove,
454 .id_table = ad7791_spi_ids, 454 .id_table = ad7791_spi_ids,
455}; 455};
456module_spi_driver(ad7791_driver); 456module_spi_driver(ad7791_driver);
diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio/adc/ad7887.c
index 81153fafac7a..a33d5cd1a536 100644
--- a/drivers/iio/adc/ad7887.c
+++ b/drivers/iio/adc/ad7887.c
@@ -233,7 +233,7 @@ static const struct iio_info ad7887_info = {
233 .driver_module = THIS_MODULE, 233 .driver_module = THIS_MODULE,
234}; 234};
235 235
236static int __devinit ad7887_probe(struct spi_device *spi) 236static int ad7887_probe(struct spi_device *spi)
237{ 237{
238 struct ad7887_platform_data *pdata = spi->dev.platform_data; 238 struct ad7887_platform_data *pdata = spi->dev.platform_data;
239 struct ad7887_state *st; 239 struct ad7887_state *st;
@@ -340,7 +340,7 @@ error_free:
340 return ret; 340 return ret;
341} 341}
342 342
343static int __devexit ad7887_remove(struct spi_device *spi) 343static int ad7887_remove(struct spi_device *spi)
344{ 344{
345 struct iio_dev *indio_dev = spi_get_drvdata(spi); 345 struct iio_dev *indio_dev = spi_get_drvdata(spi);
346 struct ad7887_state *st = iio_priv(indio_dev); 346 struct ad7887_state *st = iio_priv(indio_dev);
@@ -368,7 +368,7 @@ static struct spi_driver ad7887_driver = {
368 .owner = THIS_MODULE, 368 .owner = THIS_MODULE,
369 }, 369 },
370 .probe = ad7887_probe, 370 .probe = ad7887_probe,
371 .remove = __devexit_p(ad7887_remove), 371 .remove = ad7887_remove,
372 .id_table = ad7887_id, 372 .id_table = ad7887_id,
373}; 373};
374module_spi_driver(ad7887_driver); 374module_spi_driver(ad7887_driver);
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index 03b85940f4ba..04b013561f0f 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -514,7 +514,7 @@ static const struct iio_info at91_adc_info = {
514 .read_raw = &at91_adc_read_raw, 514 .read_raw = &at91_adc_read_raw,
515}; 515};
516 516
517static int __devinit at91_adc_probe(struct platform_device *pdev) 517static int at91_adc_probe(struct platform_device *pdev)
518{ 518{
519 unsigned int prsc, mstrclk, ticks, adc_clk; 519 unsigned int prsc, mstrclk, ticks, adc_clk;
520 int ret; 520 int ret;
@@ -678,7 +678,7 @@ error_ret:
678 return ret; 678 return ret;
679} 679}
680 680
681static int __devexit at91_adc_remove(struct platform_device *pdev) 681static int at91_adc_remove(struct platform_device *pdev)
682{ 682{
683 struct iio_dev *idev = platform_get_drvdata(pdev); 683 struct iio_dev *idev = platform_get_drvdata(pdev);
684 struct at91_adc_state *st = iio_priv(idev); 684 struct at91_adc_state *st = iio_priv(idev);
@@ -702,7 +702,7 @@ MODULE_DEVICE_TABLE(of, at91_adc_dt_ids);
702 702
703static struct platform_driver at91_adc_driver = { 703static struct platform_driver at91_adc_driver = {
704 .probe = at91_adc_probe, 704 .probe = at91_adc_probe,
705 .remove = __devexit_p(at91_adc_remove), 705 .remove = at91_adc_remove,
706 .driver = { 706 .driver = {
707 .name = "at91_adc", 707 .name = "at91_adc",
708 .of_match_table = of_match_ptr(at91_adc_dt_ids), 708 .of_match_table = of_match_ptr(at91_adc_dt_ids),
diff --git a/drivers/iio/adc/lp8788_adc.c b/drivers/iio/adc/lp8788_adc.c
index a93aaf0bb841..72955e45e9e0 100644
--- a/drivers/iio/adc/lp8788_adc.c
+++ b/drivers/iio/adc/lp8788_adc.c
@@ -193,7 +193,7 @@ static inline void lp8788_iio_map_unregister(struct iio_dev *indio_dev,
193 iio_map_array_unregister(indio_dev, adc->map); 193 iio_map_array_unregister(indio_dev, adc->map);
194} 194}
195 195
196static int __devinit lp8788_adc_probe(struct platform_device *pdev) 196static int lp8788_adc_probe(struct platform_device *pdev)
197{ 197{
198 struct lp8788 *lp = dev_get_drvdata(pdev->dev.parent); 198 struct lp8788 *lp = dev_get_drvdata(pdev->dev.parent);
199 struct iio_dev *indio_dev; 199 struct iio_dev *indio_dev;
@@ -236,7 +236,7 @@ err_iio_map:
236 return ret; 236 return ret;
237} 237}
238 238
239static int __devexit lp8788_adc_remove(struct platform_device *pdev) 239static int lp8788_adc_remove(struct platform_device *pdev)
240{ 240{
241 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 241 struct iio_dev *indio_dev = platform_get_drvdata(pdev);
242 struct lp8788_adc *adc = iio_priv(indio_dev); 242 struct lp8788_adc *adc = iio_priv(indio_dev);
@@ -250,7 +250,7 @@ static int __devexit lp8788_adc_remove(struct platform_device *pdev)
250 250
251static struct platform_driver lp8788_adc_driver = { 251static struct platform_driver lp8788_adc_driver = {
252 .probe = lp8788_adc_probe, 252 .probe = lp8788_adc_probe,
253 .remove = __devexit_p(lp8788_adc_remove), 253 .remove = lp8788_adc_remove,
254 .driver = { 254 .driver = {
255 .name = LP8788_DEV_ADC, 255 .name = LP8788_DEV_ADC,
256 .owner = THIS_MODULE, 256 .owner = THIS_MODULE,
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
index 1e84b5b55093..b5669be6f396 100644
--- a/drivers/iio/adc/max1363.c
+++ b/drivers/iio/adc/max1363.c
@@ -1402,7 +1402,7 @@ static int max1363_initial_setup(struct max1363_state *st)
1402 return max1363_set_scan_mode(st); 1402 return max1363_set_scan_mode(st);
1403} 1403}
1404 1404
1405static int __devinit max1363_alloc_scan_masks(struct iio_dev *indio_dev) 1405static int max1363_alloc_scan_masks(struct iio_dev *indio_dev)
1406{ 1406{
1407 struct max1363_state *st = iio_priv(indio_dev); 1407 struct max1363_state *st = iio_priv(indio_dev);
1408 unsigned long *masks; 1408 unsigned long *masks;
@@ -1525,8 +1525,8 @@ static void max1363_buffer_cleanup(struct iio_dev *indio_dev)
1525 iio_kfifo_free(indio_dev->buffer); 1525 iio_kfifo_free(indio_dev->buffer);
1526} 1526}
1527 1527
1528static int __devinit max1363_probe(struct i2c_client *client, 1528static int max1363_probe(struct i2c_client *client,
1529 const struct i2c_device_id *id) 1529 const struct i2c_device_id *id)
1530{ 1530{
1531 int ret; 1531 int ret;
1532 struct max1363_state *st; 1532 struct max1363_state *st;
@@ -1624,7 +1624,7 @@ error_out:
1624 return ret; 1624 return ret;
1625} 1625}
1626 1626
1627static int __devexit max1363_remove(struct i2c_client *client) 1627static int max1363_remove(struct i2c_client *client)
1628{ 1628{
1629 struct iio_dev *indio_dev = i2c_get_clientdata(client); 1629 struct iio_dev *indio_dev = i2c_get_clientdata(client);
1630 struct max1363_state *st = iio_priv(indio_dev); 1630 struct max1363_state *st = iio_priv(indio_dev);
@@ -1690,7 +1690,7 @@ static struct i2c_driver max1363_driver = {
1690 .name = "max1363", 1690 .name = "max1363",
1691 }, 1691 },
1692 .probe = max1363_probe, 1692 .probe = max1363_probe,
1693 .remove = __devexit_p(max1363_remove), 1693 .remove = max1363_remove,
1694 .id_table = max1363_id, 1694 .id_table = max1363_id,
1695}; 1695};
1696module_i2c_driver(max1363_driver); 1696module_i2c_driver(max1363_driver);
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index 02a43c87a8a3..cd030e100c39 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -136,7 +136,7 @@ static const struct iio_info tiadc_info = {
136 .read_raw = &tiadc_read_raw, 136 .read_raw = &tiadc_read_raw,
137}; 137};
138 138
139static int __devinit tiadc_probe(struct platform_device *pdev) 139static int tiadc_probe(struct platform_device *pdev)
140{ 140{
141 struct iio_dev *indio_dev; 141 struct iio_dev *indio_dev;
142 struct tiadc_device *adc_dev; 142 struct tiadc_device *adc_dev;
@@ -188,7 +188,7 @@ err_ret:
188 return err; 188 return err;
189} 189}
190 190
191static int __devexit tiadc_remove(struct platform_device *pdev) 191static int tiadc_remove(struct platform_device *pdev)
192{ 192{
193 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 193 struct iio_dev *indio_dev = platform_get_drvdata(pdev);
194 194
@@ -250,7 +250,7 @@ static struct platform_driver tiadc_driver = {
250 .pm = TIADC_PM_OPS, 250 .pm = TIADC_PM_OPS,
251 }, 251 },
252 .probe = tiadc_probe, 252 .probe = tiadc_probe,
253 .remove = __devexit_p(tiadc_remove), 253 .remove = tiadc_remove,
254}; 254};
255 255
256module_platform_driver(tiadc_driver); 256module_platform_driver(tiadc_driver);
diff --git a/drivers/iio/adc/viperboard_adc.c b/drivers/iio/adc/viperboard_adc.c
index 10136a8b20d4..ad0261533dee 100644
--- a/drivers/iio/adc/viperboard_adc.c
+++ b/drivers/iio/adc/viperboard_adc.c
@@ -116,7 +116,7 @@ static const struct iio_info vprbrd_adc_iio_info = {
116 .driver_module = THIS_MODULE, 116 .driver_module = THIS_MODULE,
117}; 117};
118 118
119static int __devinit vprbrd_adc_probe(struct platform_device *pdev) 119static int vprbrd_adc_probe(struct platform_device *pdev)
120{ 120{
121 struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); 121 struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent);
122 struct vprbrd_adc *adc; 122 struct vprbrd_adc *adc;
@@ -154,7 +154,7 @@ error:
154 return ret; 154 return ret;
155} 155}
156 156
157static int __devexit vprbrd_adc_remove(struct platform_device *pdev) 157static int vprbrd_adc_remove(struct platform_device *pdev)
158{ 158{
159 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 159 struct iio_dev *indio_dev = platform_get_drvdata(pdev);
160 160
@@ -170,7 +170,7 @@ static struct platform_driver vprbrd_adc_driver = {
170 .owner = THIS_MODULE, 170 .owner = THIS_MODULE,
171 }, 171 },
172 .probe = vprbrd_adc_probe, 172 .probe = vprbrd_adc_probe,
173 .remove = __devexit_p(vprbrd_adc_remove), 173 .remove = vprbrd_adc_remove,
174}; 174};
175 175
176module_platform_driver(vprbrd_adc_driver); 176module_platform_driver(vprbrd_adc_driver);
diff --git a/drivers/iio/amplifiers/ad8366.c b/drivers/iio/amplifiers/ad8366.c
index d8281cdbfc4a..d6c0af23a2a7 100644
--- a/drivers/iio/amplifiers/ad8366.c
+++ b/drivers/iio/amplifiers/ad8366.c
@@ -133,7 +133,7 @@ static const struct iio_chan_spec ad8366_channels[] = {
133 AD8366_CHAN(1), 133 AD8366_CHAN(1),
134}; 134};
135 135
136static int __devinit ad8366_probe(struct spi_device *spi) 136static int ad8366_probe(struct spi_device *spi)
137{ 137{
138 struct iio_dev *indio_dev; 138 struct iio_dev *indio_dev;
139 struct ad8366_state *st; 139 struct ad8366_state *st;
@@ -182,7 +182,7 @@ error_put_reg:
182 return ret; 182 return ret;
183} 183}
184 184
185static int __devexit ad8366_remove(struct spi_device *spi) 185static int ad8366_remove(struct spi_device *spi)
186{ 186{
187 struct iio_dev *indio_dev = spi_get_drvdata(spi); 187 struct iio_dev *indio_dev = spi_get_drvdata(spi);
188 struct ad8366_state *st = iio_priv(indio_dev); 188 struct ad8366_state *st = iio_priv(indio_dev);
@@ -211,7 +211,7 @@ static struct spi_driver ad8366_driver = {
211 .owner = THIS_MODULE, 211 .owner = THIS_MODULE,
212 }, 212 },
213 .probe = ad8366_probe, 213 .probe = ad8366_probe,
214 .remove = __devexit_p(ad8366_remove), 214 .remove = ad8366_remove,
215 .id_table = ad8366_id, 215 .id_table = ad8366_id,
216}; 216};
217 217
diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c
index eb281a2c295b..2fe1d4edcb2f 100644
--- a/drivers/iio/dac/ad5064.c
+++ b/drivers/iio/dac/ad5064.c
@@ -424,8 +424,8 @@ static const char * const ad5064_vref_name(struct ad5064_state *st,
424 return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref]; 424 return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref];
425} 425}
426 426
427static int __devinit ad5064_probe(struct device *dev, enum ad5064_type type, 427static int ad5064_probe(struct device *dev, enum ad5064_type type,
428 const char *name, ad5064_write_func write) 428 const char *name, ad5064_write_func write)
429{ 429{
430 struct iio_dev *indio_dev; 430 struct iio_dev *indio_dev;
431 struct ad5064_state *st; 431 struct ad5064_state *st;
@@ -495,7 +495,7 @@ error_free:
495 return ret; 495 return ret;
496} 496}
497 497
498static int __devexit ad5064_remove(struct device *dev) 498static int ad5064_remove(struct device *dev)
499{ 499{
500 struct iio_dev *indio_dev = dev_get_drvdata(dev); 500 struct iio_dev *indio_dev = dev_get_drvdata(dev);
501 struct ad5064_state *st = iio_priv(indio_dev); 501 struct ad5064_state *st = iio_priv(indio_dev);
@@ -523,7 +523,7 @@ static int ad5064_spi_write(struct ad5064_state *st, unsigned int cmd,
523 return spi_write(spi, &st->data.spi, sizeof(st->data.spi)); 523 return spi_write(spi, &st->data.spi, sizeof(st->data.spi));
524} 524}
525 525
526static int __devinit ad5064_spi_probe(struct spi_device *spi) 526static int ad5064_spi_probe(struct spi_device *spi)
527{ 527{
528 const struct spi_device_id *id = spi_get_device_id(spi); 528 const struct spi_device_id *id = spi_get_device_id(spi);
529 529
@@ -531,7 +531,7 @@ static int __devinit ad5064_spi_probe(struct spi_device *spi)
531 ad5064_spi_write); 531 ad5064_spi_write);
532} 532}
533 533
534static int __devexit ad5064_spi_remove(struct spi_device *spi) 534static int ad5064_spi_remove(struct spi_device *spi)
535{ 535{
536 return ad5064_remove(&spi->dev); 536 return ad5064_remove(&spi->dev);
537} 537}
@@ -563,7 +563,7 @@ static struct spi_driver ad5064_spi_driver = {
563 .owner = THIS_MODULE, 563 .owner = THIS_MODULE,
564 }, 564 },
565 .probe = ad5064_spi_probe, 565 .probe = ad5064_spi_probe,
566 .remove = __devexit_p(ad5064_spi_remove), 566 .remove = ad5064_spi_remove,
567 .id_table = ad5064_spi_ids, 567 .id_table = ad5064_spi_ids,
568}; 568};
569 569
@@ -596,14 +596,14 @@ static int ad5064_i2c_write(struct ad5064_state *st, unsigned int cmd,
596 return i2c_master_send(i2c, st->data.i2c, 3); 596 return i2c_master_send(i2c, st->data.i2c, 3);
597} 597}
598 598
599static int __devinit ad5064_i2c_probe(struct i2c_client *i2c, 599static int ad5064_i2c_probe(struct i2c_client *i2c,
600 const struct i2c_device_id *id) 600 const struct i2c_device_id *id)
601{ 601{
602 return ad5064_probe(&i2c->dev, id->driver_data, id->name, 602 return ad5064_probe(&i2c->dev, id->driver_data, id->name,
603 ad5064_i2c_write); 603 ad5064_i2c_write);
604} 604}
605 605
606static int __devexit ad5064_i2c_remove(struct i2c_client *i2c) 606static int ad5064_i2c_remove(struct i2c_client *i2c)
607{ 607{
608 return ad5064_remove(&i2c->dev); 608 return ad5064_remove(&i2c->dev);
609} 609}
@@ -625,7 +625,7 @@ static struct i2c_driver ad5064_i2c_driver = {
625 .owner = THIS_MODULE, 625 .owner = THIS_MODULE,
626 }, 626 },
627 .probe = ad5064_i2c_probe, 627 .probe = ad5064_i2c_probe,
628 .remove = __devexit_p(ad5064_i2c_remove), 628 .remove = ad5064_i2c_remove,
629 .id_table = ad5064_i2c_ids, 629 .id_table = ad5064_i2c_ids,
630}; 630};
631 631
diff --git a/drivers/iio/dac/ad5360.c b/drivers/iio/dac/ad5360.c
index 8fce84fe70b1..54b46fd3aede 100644
--- a/drivers/iio/dac/ad5360.c
+++ b/drivers/iio/dac/ad5360.c
@@ -433,7 +433,7 @@ static const char * const ad5360_vref_name[] = {
433 "vref0", "vref1", "vref2" 433 "vref0", "vref1", "vref2"
434}; 434};
435 435
436static int __devinit ad5360_alloc_channels(struct iio_dev *indio_dev) 436static int ad5360_alloc_channels(struct iio_dev *indio_dev)
437{ 437{
438 struct ad5360_state *st = iio_priv(indio_dev); 438 struct ad5360_state *st = iio_priv(indio_dev);
439 struct iio_chan_spec *channels; 439 struct iio_chan_spec *channels;
@@ -456,7 +456,7 @@ static int __devinit ad5360_alloc_channels(struct iio_dev *indio_dev)
456 return 0; 456 return 0;
457} 457}
458 458
459static int __devinit ad5360_probe(struct spi_device *spi) 459static int ad5360_probe(struct spi_device *spi)
460{ 460{
461 enum ad5360_type type = spi_get_device_id(spi)->driver_data; 461 enum ad5360_type type = spi_get_device_id(spi)->driver_data;
462 struct iio_dev *indio_dev; 462 struct iio_dev *indio_dev;
@@ -524,7 +524,7 @@ error_free:
524 return ret; 524 return ret;
525} 525}
526 526
527static int __devexit ad5360_remove(struct spi_device *spi) 527static int ad5360_remove(struct spi_device *spi)
528{ 528{
529 struct iio_dev *indio_dev = spi_get_drvdata(spi); 529 struct iio_dev *indio_dev = spi_get_drvdata(spi);
530 struct ad5360_state *st = iio_priv(indio_dev); 530 struct ad5360_state *st = iio_priv(indio_dev);
@@ -560,7 +560,7 @@ static struct spi_driver ad5360_driver = {
560 .owner = THIS_MODULE, 560 .owner = THIS_MODULE,
561 }, 561 },
562 .probe = ad5360_probe, 562 .probe = ad5360_probe,
563 .remove = __devexit_p(ad5360_remove), 563 .remove = ad5360_remove,
564 .id_table = ad5360_ids, 564 .id_table = ad5360_ids,
565}; 565};
566module_spi_driver(ad5360_driver); 566module_spi_driver(ad5360_driver);
diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/dac/ad5380.c
index 14991ac55f26..6c7898c765d9 100644
--- a/drivers/iio/dac/ad5380.c
+++ b/drivers/iio/dac/ad5380.c
@@ -338,7 +338,7 @@ static const struct ad5380_chip_info ad5380_chip_info_tbl[] = {
338 }, 338 },
339}; 339};
340 340
341static int __devinit ad5380_alloc_channels(struct iio_dev *indio_dev) 341static int ad5380_alloc_channels(struct iio_dev *indio_dev)
342{ 342{
343 struct ad5380_state *st = iio_priv(indio_dev); 343 struct ad5380_state *st = iio_priv(indio_dev);
344 struct iio_chan_spec *channels; 344 struct iio_chan_spec *channels;
@@ -361,8 +361,8 @@ static int __devinit ad5380_alloc_channels(struct iio_dev *indio_dev)
361 return 0; 361 return 0;
362} 362}
363 363
364static int __devinit ad5380_probe(struct device *dev, struct regmap *regmap, 364static int ad5380_probe(struct device *dev, struct regmap *regmap,
365 enum ad5380_type type, const char *name) 365 enum ad5380_type type, const char *name)
366{ 366{
367 struct iio_dev *indio_dev; 367 struct iio_dev *indio_dev;
368 struct ad5380_state *st; 368 struct ad5380_state *st;
@@ -441,7 +441,7 @@ error_out:
441 return ret; 441 return ret;
442} 442}
443 443
444static int __devexit ad5380_remove(struct device *dev) 444static int ad5380_remove(struct device *dev)
445{ 445{
446 struct iio_dev *indio_dev = dev_get_drvdata(dev); 446 struct iio_dev *indio_dev = dev_get_drvdata(dev);
447 struct ad5380_state *st = iio_priv(indio_dev); 447 struct ad5380_state *st = iio_priv(indio_dev);
@@ -478,7 +478,7 @@ static const struct regmap_config ad5380_regmap_config = {
478 478
479#if IS_ENABLED(CONFIG_SPI_MASTER) 479#if IS_ENABLED(CONFIG_SPI_MASTER)
480 480
481static int __devinit ad5380_spi_probe(struct spi_device *spi) 481static int ad5380_spi_probe(struct spi_device *spi)
482{ 482{
483 const struct spi_device_id *id = spi_get_device_id(spi); 483 const struct spi_device_id *id = spi_get_device_id(spi);
484 struct regmap *regmap; 484 struct regmap *regmap;
@@ -491,7 +491,7 @@ static int __devinit ad5380_spi_probe(struct spi_device *spi)
491 return ad5380_probe(&spi->dev, regmap, id->driver_data, id->name); 491 return ad5380_probe(&spi->dev, regmap, id->driver_data, id->name);
492} 492}
493 493
494static int __devexit ad5380_spi_remove(struct spi_device *spi) 494static int ad5380_spi_remove(struct spi_device *spi)
495{ 495{
496 return ad5380_remove(&spi->dev); 496 return ad5380_remove(&spi->dev);
497} 497}
@@ -523,7 +523,7 @@ static struct spi_driver ad5380_spi_driver = {
523 .owner = THIS_MODULE, 523 .owner = THIS_MODULE,
524 }, 524 },
525 .probe = ad5380_spi_probe, 525 .probe = ad5380_spi_probe,
526 .remove = __devexit_p(ad5380_spi_remove), 526 .remove = ad5380_spi_remove,
527 .id_table = ad5380_spi_ids, 527 .id_table = ad5380_spi_ids,
528}; 528};
529 529
@@ -552,8 +552,8 @@ static inline void ad5380_spi_unregister_driver(void)
552 552
553#if IS_ENABLED(CONFIG_I2C) 553#if IS_ENABLED(CONFIG_I2C)
554 554
555static int __devinit ad5380_i2c_probe(struct i2c_client *i2c, 555static int ad5380_i2c_probe(struct i2c_client *i2c,
556 const struct i2c_device_id *id) 556 const struct i2c_device_id *id)
557{ 557{
558 struct regmap *regmap; 558 struct regmap *regmap;
559 559
@@ -565,7 +565,7 @@ static int __devinit ad5380_i2c_probe(struct i2c_client *i2c,
565 return ad5380_probe(&i2c->dev, regmap, id->driver_data, id->name); 565 return ad5380_probe(&i2c->dev, regmap, id->driver_data, id->name);
566} 566}
567 567
568static int __devexit ad5380_i2c_remove(struct i2c_client *i2c) 568static int ad5380_i2c_remove(struct i2c_client *i2c)
569{ 569{
570 return ad5380_remove(&i2c->dev); 570 return ad5380_remove(&i2c->dev);
571} 571}
@@ -597,7 +597,7 @@ static struct i2c_driver ad5380_i2c_driver = {
597 .owner = THIS_MODULE, 597 .owner = THIS_MODULE,
598 }, 598 },
599 .probe = ad5380_i2c_probe, 599 .probe = ad5380_i2c_probe,
600 .remove = __devexit_p(ad5380_i2c_remove), 600 .remove = ad5380_i2c_remove,
601 .id_table = ad5380_i2c_ids, 601 .id_table = ad5380_i2c_ids,
602}; 602};
603 603
diff --git a/drivers/iio/dac/ad5421.c b/drivers/iio/dac/ad5421.c
index cdbc5bf25c31..43be948db83e 100644
--- a/drivers/iio/dac/ad5421.c
+++ b/drivers/iio/dac/ad5421.c
@@ -449,7 +449,7 @@ static const struct iio_info ad5421_info = {
449 .driver_module = THIS_MODULE, 449 .driver_module = THIS_MODULE,
450}; 450};
451 451
452static int __devinit ad5421_probe(struct spi_device *spi) 452static int ad5421_probe(struct spi_device *spi)
453{ 453{
454 struct ad5421_platform_data *pdata = dev_get_platdata(&spi->dev); 454 struct ad5421_platform_data *pdata = dev_get_platdata(&spi->dev);
455 struct iio_dev *indio_dev; 455 struct iio_dev *indio_dev;
@@ -516,7 +516,7 @@ error_free:
516 return ret; 516 return ret;
517} 517}
518 518
519static int __devexit ad5421_remove(struct spi_device *spi) 519static int ad5421_remove(struct spi_device *spi)
520{ 520{
521 struct iio_dev *indio_dev = spi_get_drvdata(spi); 521 struct iio_dev *indio_dev = spi_get_drvdata(spi);
522 522
@@ -534,7 +534,7 @@ static struct spi_driver ad5421_driver = {
534 .owner = THIS_MODULE, 534 .owner = THIS_MODULE,
535 }, 535 },
536 .probe = ad5421_probe, 536 .probe = ad5421_probe,
537 .remove = __devexit_p(ad5421_remove), 537 .remove = ad5421_remove,
538}; 538};
539module_spi_driver(ad5421_driver); 539module_spi_driver(ad5421_driver);
540 540
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
index 3310cbbd41e7..29f653dab2f7 100644
--- a/drivers/iio/dac/ad5446.c
+++ b/drivers/iio/dac/ad5446.c
@@ -212,8 +212,8 @@ static const struct iio_info ad5446_info = {
212 .driver_module = THIS_MODULE, 212 .driver_module = THIS_MODULE,
213}; 213};
214 214
215static int __devinit ad5446_probe(struct device *dev, const char *name, 215static int ad5446_probe(struct device *dev, const char *name,
216 const struct ad5446_chip_info *chip_info) 216 const struct ad5446_chip_info *chip_info)
217{ 217{
218 struct ad5446_state *st; 218 struct ad5446_state *st;
219 struct iio_dev *indio_dev; 219 struct iio_dev *indio_dev;
@@ -461,7 +461,7 @@ static const struct spi_device_id ad5446_spi_ids[] = {
461}; 461};
462MODULE_DEVICE_TABLE(spi, ad5446_spi_ids); 462MODULE_DEVICE_TABLE(spi, ad5446_spi_ids);
463 463
464static int __devinit ad5446_spi_probe(struct spi_device *spi) 464static int ad5446_spi_probe(struct spi_device *spi)
465{ 465{
466 const struct spi_device_id *id = spi_get_device_id(spi); 466 const struct spi_device_id *id = spi_get_device_id(spi);
467 467
@@ -469,7 +469,7 @@ static int __devinit ad5446_spi_probe(struct spi_device *spi)
469 &ad5446_spi_chip_info[id->driver_data]); 469 &ad5446_spi_chip_info[id->driver_data]);
470} 470}
471 471
472static int __devexit ad5446_spi_remove(struct spi_device *spi) 472static int ad5446_spi_remove(struct spi_device *spi)
473{ 473{
474 return ad5446_remove(&spi->dev); 474 return ad5446_remove(&spi->dev);
475} 475}
@@ -480,7 +480,7 @@ static struct spi_driver ad5446_spi_driver = {
480 .owner = THIS_MODULE, 480 .owner = THIS_MODULE,
481 }, 481 },
482 .probe = ad5446_spi_probe, 482 .probe = ad5446_spi_probe,
483 .remove = __devexit_p(ad5446_spi_remove), 483 .remove = ad5446_spi_remove,
484 .id_table = ad5446_spi_ids, 484 .id_table = ad5446_spi_ids,
485}; 485};
486 486
@@ -539,14 +539,14 @@ static const struct ad5446_chip_info ad5446_i2c_chip_info[] = {
539 }, 539 },
540}; 540};
541 541
542static int __devinit ad5446_i2c_probe(struct i2c_client *i2c, 542static int ad5446_i2c_probe(struct i2c_client *i2c,
543 const struct i2c_device_id *id) 543 const struct i2c_device_id *id)
544{ 544{
545 return ad5446_probe(&i2c->dev, id->name, 545 return ad5446_probe(&i2c->dev, id->name,
546 &ad5446_i2c_chip_info[id->driver_data]); 546 &ad5446_i2c_chip_info[id->driver_data]);
547} 547}
548 548
549static int __devexit ad5446_i2c_remove(struct i2c_client *i2c) 549static int ad5446_i2c_remove(struct i2c_client *i2c)
550{ 550{
551 return ad5446_remove(&i2c->dev); 551 return ad5446_remove(&i2c->dev);
552} 552}
@@ -568,7 +568,7 @@ static struct i2c_driver ad5446_i2c_driver = {
568 .owner = THIS_MODULE, 568 .owner = THIS_MODULE,
569 }, 569 },
570 .probe = ad5446_i2c_probe, 570 .probe = ad5446_i2c_probe,
571 .remove = __devexit_p(ad5446_i2c_remove), 571 .remove = ad5446_i2c_remove,
572 .id_table = ad5446_i2c_ids, 572 .id_table = ad5446_i2c_ids,
573}; 573};
574 574
diff --git a/drivers/iio/dac/ad5449.c b/drivers/iio/dac/ad5449.c
index 0ee6f8eeba8d..c4731b7b577b 100644
--- a/drivers/iio/dac/ad5449.c
+++ b/drivers/iio/dac/ad5449.c
@@ -266,7 +266,7 @@ static const char *ad5449_vref_name(struct ad5449 *st, int n)
266 return "VREFB"; 266 return "VREFB";
267} 267}
268 268
269static int __devinit ad5449_spi_probe(struct spi_device *spi) 269static int ad5449_spi_probe(struct spi_device *spi)
270{ 270{
271 struct ad5449_platform_data *pdata = spi->dev.platform_data; 271 struct ad5449_platform_data *pdata = spi->dev.platform_data;
272 const struct spi_device_id *id = spi_get_device_id(spi); 272 const struct spi_device_id *id = spi_get_device_id(spi);
@@ -333,7 +333,7 @@ error_free:
333 return ret; 333 return ret;
334} 334}
335 335
336static int __devexit ad5449_spi_remove(struct spi_device *spi) 336static int ad5449_spi_remove(struct spi_device *spi)
337{ 337{
338 struct iio_dev *indio_dev = spi_get_drvdata(spi); 338 struct iio_dev *indio_dev = spi_get_drvdata(spi);
339 struct ad5449 *st = iio_priv(indio_dev); 339 struct ad5449 *st = iio_priv(indio_dev);
@@ -366,7 +366,7 @@ static struct spi_driver ad5449_spi_driver = {
366 .owner = THIS_MODULE, 366 .owner = THIS_MODULE,
367 }, 367 },
368 .probe = ad5449_spi_probe, 368 .probe = ad5449_spi_probe,
369 .remove = __devexit_p(ad5449_spi_remove), 369 .remove = ad5449_spi_remove,
370 .id_table = ad5449_spi_ids, 370 .id_table = ad5449_spi_ids,
371}; 371};
372module_spi_driver(ad5449_spi_driver); 372module_spi_driver(ad5449_spi_driver);
diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c
index 242bdc7d0044..b2a31a0468ed 100644
--- a/drivers/iio/dac/ad5504.c
+++ b/drivers/iio/dac/ad5504.c
@@ -277,7 +277,7 @@ static const struct iio_chan_spec ad5504_channels[] = {
277 AD5504_CHANNEL(3), 277 AD5504_CHANNEL(3),
278}; 278};
279 279
280static int __devinit ad5504_probe(struct spi_device *spi) 280static int ad5504_probe(struct spi_device *spi)
281{ 281{
282 struct ad5504_platform_data *pdata = spi->dev.platform_data; 282 struct ad5504_platform_data *pdata = spi->dev.platform_data;
283 struct iio_dev *indio_dev; 283 struct iio_dev *indio_dev;
@@ -352,7 +352,7 @@ error_ret:
352 return ret; 352 return ret;
353} 353}
354 354
355static int __devexit ad5504_remove(struct spi_device *spi) 355static int ad5504_remove(struct spi_device *spi)
356{ 356{
357 struct iio_dev *indio_dev = spi_get_drvdata(spi); 357 struct iio_dev *indio_dev = spi_get_drvdata(spi);
358 struct ad5504_state *st = iio_priv(indio_dev); 358 struct ad5504_state *st = iio_priv(indio_dev);
@@ -383,7 +383,7 @@ static struct spi_driver ad5504_driver = {
383 .owner = THIS_MODULE, 383 .owner = THIS_MODULE,
384 }, 384 },
385 .probe = ad5504_probe, 385 .probe = ad5504_probe,
386 .remove = __devexit_p(ad5504_remove), 386 .remove = ad5504_remove,
387 .id_table = ad5504_id, 387 .id_table = ad5504_id,
388}; 388};
389module_spi_driver(ad5504_driver); 389module_spi_driver(ad5504_driver);
diff --git a/drivers/iio/dac/ad5624r_spi.c b/drivers/iio/dac/ad5624r_spi.c
index 6a7d6a48cc6d..e9947969f9fe 100644
--- a/drivers/iio/dac/ad5624r_spi.c
+++ b/drivers/iio/dac/ad5624r_spi.c
@@ -220,7 +220,7 @@ static const struct ad5624r_chip_info ad5624r_chip_info_tbl[] = {
220 }, 220 },
221}; 221};
222 222
223static int __devinit ad5624r_probe(struct spi_device *spi) 223static int ad5624r_probe(struct spi_device *spi)
224{ 224{
225 struct ad5624r_state *st; 225 struct ad5624r_state *st;
226 struct iio_dev *indio_dev; 226 struct iio_dev *indio_dev;
@@ -282,7 +282,7 @@ error_ret:
282 return ret; 282 return ret;
283} 283}
284 284
285static int __devexit ad5624r_remove(struct spi_device *spi) 285static int ad5624r_remove(struct spi_device *spi)
286{ 286{
287 struct iio_dev *indio_dev = spi_get_drvdata(spi); 287 struct iio_dev *indio_dev = spi_get_drvdata(spi);
288 struct ad5624r_state *st = iio_priv(indio_dev); 288 struct ad5624r_state *st = iio_priv(indio_dev);
@@ -314,7 +314,7 @@ static struct spi_driver ad5624r_driver = {
314 .owner = THIS_MODULE, 314 .owner = THIS_MODULE,
315 }, 315 },
316 .probe = ad5624r_probe, 316 .probe = ad5624r_probe,
317 .remove = __devexit_p(ad5624r_remove), 317 .remove = ad5624r_remove,
318 .id_table = ad5624r_id, 318 .id_table = ad5624r_id,
319}; 319};
320module_spi_driver(ad5624r_driver); 320module_spi_driver(ad5624r_driver);
diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c
index bc92ff9309c2..36e51382ae52 100644
--- a/drivers/iio/dac/ad5686.c
+++ b/drivers/iio/dac/ad5686.c
@@ -313,7 +313,7 @@ static const struct ad5686_chip_info ad5686_chip_info_tbl[] = {
313}; 313};
314 314
315 315
316static int __devinit ad5686_probe(struct spi_device *spi) 316static int ad5686_probe(struct spi_device *spi)
317{ 317{
318 struct ad5686_state *st; 318 struct ad5686_state *st;
319 struct iio_dev *indio_dev; 319 struct iio_dev *indio_dev;
@@ -379,7 +379,7 @@ error_put_reg:
379 return ret; 379 return ret;
380} 380}
381 381
382static int __devexit ad5686_remove(struct spi_device *spi) 382static int ad5686_remove(struct spi_device *spi)
383{ 383{
384 struct iio_dev *indio_dev = spi_get_drvdata(spi); 384 struct iio_dev *indio_dev = spi_get_drvdata(spi);
385 struct ad5686_state *st = iio_priv(indio_dev); 385 struct ad5686_state *st = iio_priv(indio_dev);
@@ -408,7 +408,7 @@ static struct spi_driver ad5686_driver = {
408 .owner = THIS_MODULE, 408 .owner = THIS_MODULE,
409 }, 409 },
410 .probe = ad5686_probe, 410 .probe = ad5686_probe,
411 .remove = __devexit_p(ad5686_remove), 411 .remove = ad5686_remove,
412 .id_table = ad5686_id, 412 .id_table = ad5686_id,
413}; 413};
414module_spi_driver(ad5686_driver); 414module_spi_driver(ad5686_driver);
diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index 5db3506034c5..0869bbd27d30 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -447,8 +447,8 @@ static bool ad5755_is_valid_mode(struct ad5755_state *st, enum ad5755_mode mode)
447 } 447 }
448} 448}
449 449
450static int __devinit ad5755_setup_pdata(struct iio_dev *indio_dev, 450static int ad5755_setup_pdata(struct iio_dev *indio_dev,
451 const struct ad5755_platform_data *pdata) 451 const struct ad5755_platform_data *pdata)
452{ 452{
453 struct ad5755_state *st = iio_priv(indio_dev); 453 struct ad5755_state *st = iio_priv(indio_dev);
454 unsigned int val; 454 unsigned int val;
@@ -503,7 +503,7 @@ static int __devinit ad5755_setup_pdata(struct iio_dev *indio_dev,
503 return 0; 503 return 0;
504} 504}
505 505
506static bool __devinit ad5755_is_voltage_mode(enum ad5755_mode mode) 506static bool ad5755_is_voltage_mode(enum ad5755_mode mode)
507{ 507{
508 switch (mode) { 508 switch (mode) {
509 case AD5755_MODE_VOLTAGE_0V_5V: 509 case AD5755_MODE_VOLTAGE_0V_5V:
@@ -516,8 +516,8 @@ static bool __devinit ad5755_is_voltage_mode(enum ad5755_mode mode)
516 } 516 }
517} 517}
518 518
519static int __devinit ad5755_init_channels(struct iio_dev *indio_dev, 519static int ad5755_init_channels(struct iio_dev *indio_dev,
520 const struct ad5755_platform_data *pdata) 520 const struct ad5755_platform_data *pdata)
521{ 521{
522 struct ad5755_state *st = iio_priv(indio_dev); 522 struct ad5755_state *st = iio_priv(indio_dev);
523 struct iio_chan_spec *channels = st->channels; 523 struct iio_chan_spec *channels = st->channels;
@@ -562,7 +562,7 @@ static const struct ad5755_platform_data ad5755_default_pdata = {
562 }, 562 },
563}; 563};
564 564
565static int __devinit ad5755_probe(struct spi_device *spi) 565static int ad5755_probe(struct spi_device *spi)
566{ 566{
567 enum ad5755_type type = spi_get_device_id(spi)->driver_data; 567 enum ad5755_type type = spi_get_device_id(spi)->driver_data;
568 const struct ad5755_platform_data *pdata = dev_get_platdata(&spi->dev); 568 const struct ad5755_platform_data *pdata = dev_get_platdata(&spi->dev);
@@ -614,7 +614,7 @@ error_free:
614 return ret; 614 return ret;
615} 615}
616 616
617static int __devexit ad5755_remove(struct spi_device *spi) 617static int ad5755_remove(struct spi_device *spi)
618{ 618{
619 struct iio_dev *indio_dev = spi_get_drvdata(spi); 619 struct iio_dev *indio_dev = spi_get_drvdata(spi);
620 620
@@ -640,7 +640,7 @@ static struct spi_driver ad5755_driver = {
640 .owner = THIS_MODULE, 640 .owner = THIS_MODULE,
641 }, 641 },
642 .probe = ad5755_probe, 642 .probe = ad5755_probe,
643 .remove = __devexit_p(ad5755_remove), 643 .remove = ad5755_remove,
644 .id_table = ad5755_id, 644 .id_table = ad5755_id,
645}; 645};
646module_spi_driver(ad5755_driver); 646module_spi_driver(ad5755_driver);
diff --git a/drivers/iio/dac/ad5764.c b/drivers/iio/dac/ad5764.c
index ffce30447445..7f9045e6daa4 100644
--- a/drivers/iio/dac/ad5764.c
+++ b/drivers/iio/dac/ad5764.c
@@ -273,7 +273,7 @@ static const struct iio_info ad5764_info = {
273 .driver_module = THIS_MODULE, 273 .driver_module = THIS_MODULE,
274}; 274};
275 275
276static int __devinit ad5764_probe(struct spi_device *spi) 276static int ad5764_probe(struct spi_device *spi)
277{ 277{
278 enum ad5764_type type = spi_get_device_id(spi)->driver_data; 278 enum ad5764_type type = spi_get_device_id(spi)->driver_data;
279 struct iio_dev *indio_dev; 279 struct iio_dev *indio_dev;
@@ -340,7 +340,7 @@ error_free:
340 return ret; 340 return ret;
341} 341}
342 342
343static int __devexit ad5764_remove(struct spi_device *spi) 343static int ad5764_remove(struct spi_device *spi)
344{ 344{
345 struct iio_dev *indio_dev = spi_get_drvdata(spi); 345 struct iio_dev *indio_dev = spi_get_drvdata(spi);
346 struct ad5764_state *st = iio_priv(indio_dev); 346 struct ad5764_state *st = iio_priv(indio_dev);
@@ -372,7 +372,7 @@ static struct spi_driver ad5764_driver = {
372 .owner = THIS_MODULE, 372 .owner = THIS_MODULE,
373 }, 373 },
374 .probe = ad5764_probe, 374 .probe = ad5764_probe,
375 .remove = __devexit_p(ad5764_remove), 375 .remove = ad5764_remove,
376 .id_table = ad5764_ids, 376 .id_table = ad5764_ids,
377}; 377};
378module_spi_driver(ad5764_driver); 378module_spi_driver(ad5764_driver);
diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c
index 2bd2e37280ff..c84180f23139 100644
--- a/drivers/iio/dac/ad5791.c
+++ b/drivers/iio/dac/ad5791.c
@@ -346,7 +346,7 @@ static const struct iio_info ad5791_info = {
346 .driver_module = THIS_MODULE, 346 .driver_module = THIS_MODULE,
347}; 347};
348 348
349static int __devinit ad5791_probe(struct spi_device *spi) 349static int ad5791_probe(struct spi_device *spi)
350{ 350{
351 struct ad5791_platform_data *pdata = spi->dev.platform_data; 351 struct ad5791_platform_data *pdata = spi->dev.platform_data;
352 struct iio_dev *indio_dev; 352 struct iio_dev *indio_dev;
@@ -439,7 +439,7 @@ error_ret:
439 return ret; 439 return ret;
440} 440}
441 441
442static int __devexit ad5791_remove(struct spi_device *spi) 442static int ad5791_remove(struct spi_device *spi)
443{ 443{
444 struct iio_dev *indio_dev = spi_get_drvdata(spi); 444 struct iio_dev *indio_dev = spi_get_drvdata(spi);
445 struct ad5791_state *st = iio_priv(indio_dev); 445 struct ad5791_state *st = iio_priv(indio_dev);
@@ -475,7 +475,7 @@ static struct spi_driver ad5791_driver = {
475 .owner = THIS_MODULE, 475 .owner = THIS_MODULE,
476 }, 476 },
477 .probe = ad5791_probe, 477 .probe = ad5791_probe,
478 .remove = __devexit_p(ad5791_remove), 478 .remove = ad5791_remove,
479 .id_table = ad5791_id, 479 .id_table = ad5791_id,
480}; 480};
481module_spi_driver(ad5791_driver); 481module_spi_driver(ad5791_driver);
diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c
index c3d748c25939..352abe2004a4 100644
--- a/drivers/iio/dac/max517.c
+++ b/drivers/iio/dac/max517.c
@@ -156,7 +156,7 @@ static const struct iio_chan_spec max517_channels[] = {
156 MAX517_CHANNEL(1) 156 MAX517_CHANNEL(1)
157}; 157};
158 158
159static int __devinit max517_probe(struct i2c_client *client, 159static int max517_probe(struct i2c_client *client,
160 const struct i2c_device_id *id) 160 const struct i2c_device_id *id)
161{ 161{
162 struct max517_data *data; 162 struct max517_data *data;
@@ -210,7 +210,7 @@ exit:
210 return err; 210 return err;
211} 211}
212 212
213static int __devexit max517_remove(struct i2c_client *client) 213static int max517_remove(struct i2c_client *client)
214{ 214{
215 iio_device_unregister(i2c_get_clientdata(client)); 215 iio_device_unregister(i2c_get_clientdata(client));
216 iio_device_free(i2c_get_clientdata(client)); 216 iio_device_free(i2c_get_clientdata(client));
@@ -232,7 +232,7 @@ static struct i2c_driver max517_driver = {
232 .pm = MAX517_PM_OPS, 232 .pm = MAX517_PM_OPS,
233 }, 233 },
234 .probe = max517_probe, 234 .probe = max517_probe,
235 .remove = __devexit_p(max517_remove), 235 .remove = max517_remove,
236 .id_table = max517_id, 236 .id_table = max517_id,
237}; 237};
238module_i2c_driver(max517_driver); 238module_i2c_driver(max517_driver);
diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c
index e0e168bd5b45..8f88cc4059a2 100644
--- a/drivers/iio/dac/mcp4725.c
+++ b/drivers/iio/dac/mcp4725.c
@@ -141,8 +141,8 @@ static const struct iio_info mcp4725_info = {
141 .driver_module = THIS_MODULE, 141 .driver_module = THIS_MODULE,
142}; 142};
143 143
144static int __devinit mcp4725_probe(struct i2c_client *client, 144static int mcp4725_probe(struct i2c_client *client,
145 const struct i2c_device_id *id) 145 const struct i2c_device_id *id)
146{ 146{
147 struct mcp4725_data *data; 147 struct mcp4725_data *data;
148 struct iio_dev *indio_dev; 148 struct iio_dev *indio_dev;
@@ -195,7 +195,7 @@ exit:
195 return err; 195 return err;
196} 196}
197 197
198static int __devexit mcp4725_remove(struct i2c_client *client) 198static int mcp4725_remove(struct i2c_client *client)
199{ 199{
200 struct iio_dev *indio_dev = i2c_get_clientdata(client); 200 struct iio_dev *indio_dev = i2c_get_clientdata(client);
201 201
@@ -217,7 +217,7 @@ static struct i2c_driver mcp4725_driver = {
217 .pm = MCP4725_PM_OPS, 217 .pm = MCP4725_PM_OPS,
218 }, 218 },
219 .probe = mcp4725_probe, 219 .probe = mcp4725_probe,
220 .remove = __devexit_p(mcp4725_remove), 220 .remove = mcp4725_remove,
221 .id_table = mcp4725_id, 221 .id_table = mcp4725_id,
222}; 222};
223module_i2c_driver(mcp4725_driver); 223module_i2c_driver(mcp4725_driver);
diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
index b737c64a402d..80307473e3a9 100644
--- a/drivers/iio/frequency/ad9523.c
+++ b/drivers/iio/frequency/ad9523.c
@@ -959,7 +959,7 @@ static int ad9523_setup(struct iio_dev *indio_dev)
959 return 0; 959 return 0;
960} 960}
961 961
962static int __devinit ad9523_probe(struct spi_device *spi) 962static int ad9523_probe(struct spi_device *spi)
963{ 963{
964 struct ad9523_platform_data *pdata = spi->dev.platform_data; 964 struct ad9523_platform_data *pdata = spi->dev.platform_data;
965 struct iio_dev *indio_dev; 965 struct iio_dev *indio_dev;
@@ -1020,7 +1020,7 @@ error_put_reg:
1020 return ret; 1020 return ret;
1021} 1021}
1022 1022
1023static int __devexit ad9523_remove(struct spi_device *spi) 1023static int ad9523_remove(struct spi_device *spi)
1024{ 1024{
1025 struct iio_dev *indio_dev = spi_get_drvdata(spi); 1025 struct iio_dev *indio_dev = spi_get_drvdata(spi);
1026 struct ad9523_state *st = iio_priv(indio_dev); 1026 struct ad9523_state *st = iio_priv(indio_dev);
@@ -1049,7 +1049,7 @@ static struct spi_driver ad9523_driver = {
1049 .owner = THIS_MODULE, 1049 .owner = THIS_MODULE,
1050 }, 1050 },
1051 .probe = ad9523_probe, 1051 .probe = ad9523_probe,
1052 .remove = __devexit_p(ad9523_remove), 1052 .remove = ad9523_remove,
1053 .id_table = ad9523_id, 1053 .id_table = ad9523_id,
1054}; 1054};
1055module_spi_driver(ad9523_driver); 1055module_spi_driver(ad9523_driver);
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
index e35bb8f6fe75..e5033b4cfba0 100644
--- a/drivers/iio/frequency/adf4350.c
+++ b/drivers/iio/frequency/adf4350.c
@@ -355,7 +355,7 @@ static const struct iio_info adf4350_info = {
355 .driver_module = THIS_MODULE, 355 .driver_module = THIS_MODULE,
356}; 356};
357 357
358static int __devinit adf4350_probe(struct spi_device *spi) 358static int adf4350_probe(struct spi_device *spi)
359{ 359{
360 struct adf4350_platform_data *pdata = spi->dev.platform_data; 360 struct adf4350_platform_data *pdata = spi->dev.platform_data;
361 struct iio_dev *indio_dev; 361 struct iio_dev *indio_dev;
@@ -440,7 +440,7 @@ error_put_reg:
440 return ret; 440 return ret;
441} 441}
442 442
443static int __devexit adf4350_remove(struct spi_device *spi) 443static int adf4350_remove(struct spi_device *spi)
444{ 444{
445 struct iio_dev *indio_dev = spi_get_drvdata(spi); 445 struct iio_dev *indio_dev = spi_get_drvdata(spi);
446 struct adf4350_state *st = iio_priv(indio_dev); 446 struct adf4350_state *st = iio_priv(indio_dev);
@@ -476,7 +476,7 @@ static struct spi_driver adf4350_driver = {
476 .owner = THIS_MODULE, 476 .owner = THIS_MODULE,
477 }, 477 },
478 .probe = adf4350_probe, 478 .probe = adf4350_probe,
479 .remove = __devexit_p(adf4350_remove), 479 .remove = adf4350_remove,
480 .id_table = adf4350_id, 480 .id_table = adf4350_id,
481}; 481};
482module_spi_driver(adf4350_driver); 482module_spi_driver(adf4350_driver);
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
index 4c8b158e40e1..06e7cc35450c 100644
--- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
+++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
@@ -278,7 +278,7 @@ static int gyro_3d_parse_report(struct platform_device *pdev,
278} 278}
279 279
280/* Function to initialize the processing for usage id */ 280/* Function to initialize the processing for usage id */
281static int __devinit hid_gyro_3d_probe(struct platform_device *pdev) 281static int hid_gyro_3d_probe(struct platform_device *pdev)
282{ 282{
283 int ret = 0; 283 int ret = 0;
284 static const char *name = "gyro_3d"; 284 static const char *name = "gyro_3d";
@@ -375,7 +375,7 @@ error_ret:
375} 375}
376 376
377/* Function to deinitialize the processing for usage id */ 377/* Function to deinitialize the processing for usage id */
378static int __devinit hid_gyro_3d_remove(struct platform_device *pdev) 378static int hid_gyro_3d_remove(struct platform_device *pdev)
379{ 379{
380 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 380 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
381 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 381 struct iio_dev *indio_dev = platform_get_drvdata(pdev);
diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c
index 36d210a06b28..d5b9d39d95b2 100644
--- a/drivers/iio/light/adjd_s311.c
+++ b/drivers/iio/light/adjd_s311.c
@@ -286,8 +286,8 @@ static const struct iio_info adjd_s311_info = {
286 .driver_module = THIS_MODULE, 286 .driver_module = THIS_MODULE,
287}; 287};
288 288
289static int __devinit adjd_s311_probe(struct i2c_client *client, 289static int adjd_s311_probe(struct i2c_client *client,
290 const struct i2c_device_id *id) 290 const struct i2c_device_id *id)
291{ 291{
292 struct adjd_s311_data *data; 292 struct adjd_s311_data *data;
293 struct iio_dev *indio_dev; 293 struct iio_dev *indio_dev;
@@ -330,7 +330,7 @@ exit:
330 return err; 330 return err;
331} 331}
332 332
333static int __devexit adjd_s311_remove(struct i2c_client *client) 333static int adjd_s311_remove(struct i2c_client *client)
334{ 334{
335 struct iio_dev *indio_dev = i2c_get_clientdata(client); 335 struct iio_dev *indio_dev = i2c_get_clientdata(client);
336 struct adjd_s311_data *data = iio_priv(indio_dev); 336 struct adjd_s311_data *data = iio_priv(indio_dev);
@@ -354,7 +354,7 @@ static struct i2c_driver adjd_s311_driver = {
354 .name = ADJD_S311_DRV_NAME, 354 .name = ADJD_S311_DRV_NAME,
355 }, 355 },
356 .probe = adjd_s311_probe, 356 .probe = adjd_s311_probe,
357 .remove = __devexit_p(adjd_s311_remove), 357 .remove = adjd_s311_remove,
358 .id_table = adjd_s311_id, 358 .id_table = adjd_s311_id,
359}; 359};
360module_i2c_driver(adjd_s311_driver); 360module_i2c_driver(adjd_s311_driver);
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
index 23eeeef64e84..e2d042f2a544 100644
--- a/drivers/iio/light/hid-sensor-als.c
+++ b/drivers/iio/light/hid-sensor-als.c
@@ -245,7 +245,7 @@ static int als_parse_report(struct platform_device *pdev,
245} 245}
246 246
247/* Function to initialize the processing for usage id */ 247/* Function to initialize the processing for usage id */
248static int __devinit hid_als_probe(struct platform_device *pdev) 248static int hid_als_probe(struct platform_device *pdev)
249{ 249{
250 int ret = 0; 250 int ret = 0;
251 static const char *name = "als"; 251 static const char *name = "als";
@@ -341,7 +341,7 @@ error_ret:
341} 341}
342 342
343/* Function to deinitialize the processing for usage id */ 343/* Function to deinitialize the processing for usage id */
344static int __devinit hid_als_remove(struct platform_device *pdev) 344static int hid_als_remove(struct platform_device *pdev)
345{ 345{
346 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 346 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
347 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 347 struct iio_dev *indio_dev = platform_get_drvdata(pdev);
diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c
index e45712a921ce..7503012ce933 100644
--- a/drivers/iio/light/lm3533-als.c
+++ b/drivers/iio/light/lm3533-als.c
@@ -718,8 +718,7 @@ static struct attribute_group lm3533_als_attribute_group = {
718 .attrs = lm3533_als_attributes 718 .attrs = lm3533_als_attributes
719}; 719};
720 720
721static int __devinit lm3533_als_set_input_mode(struct lm3533_als *als, 721static int lm3533_als_set_input_mode(struct lm3533_als *als, bool pwm_mode)
722 bool pwm_mode)
723{ 722{
724 u8 mask = LM3533_ALS_INPUT_MODE_MASK; 723 u8 mask = LM3533_ALS_INPUT_MODE_MASK;
725 u8 val; 724 u8 val;
@@ -740,7 +739,7 @@ static int __devinit lm3533_als_set_input_mode(struct lm3533_als *als,
740 return 0; 739 return 0;
741} 740}
742 741
743static int __devinit lm3533_als_set_resistor(struct lm3533_als *als, u8 val) 742static int lm3533_als_set_resistor(struct lm3533_als *als, u8 val)
744{ 743{
745 int ret; 744 int ret;
746 745
@@ -756,8 +755,8 @@ static int __devinit lm3533_als_set_resistor(struct lm3533_als *als, u8 val)
756 return 0; 755 return 0;
757} 756}
758 757
759static int __devinit lm3533_als_setup(struct lm3533_als *als, 758static int lm3533_als_setup(struct lm3533_als *als,
760 struct lm3533_als_platform_data *pdata) 759 struct lm3533_als_platform_data *pdata)
761{ 760{
762 int ret; 761 int ret;
763 762
@@ -775,7 +774,7 @@ static int __devinit lm3533_als_setup(struct lm3533_als *als,
775 return 0; 774 return 0;
776} 775}
777 776
778static int __devinit lm3533_als_setup_irq(struct lm3533_als *als, void *dev) 777static int lm3533_als_setup_irq(struct lm3533_als *als, void *dev)
779{ 778{
780 u8 mask = LM3533_ALS_INT_ENABLE_MASK; 779 u8 mask = LM3533_ALS_INT_ENABLE_MASK;
781 int ret; 780 int ret;
@@ -799,7 +798,7 @@ static int __devinit lm3533_als_setup_irq(struct lm3533_als *als, void *dev)
799 return 0; 798 return 0;
800} 799}
801 800
802static int __devinit lm3533_als_enable(struct lm3533_als *als) 801static int lm3533_als_enable(struct lm3533_als *als)
803{ 802{
804 u8 mask = LM3533_ALS_ENABLE_MASK; 803 u8 mask = LM3533_ALS_ENABLE_MASK;
805 int ret; 804 int ret;
@@ -830,7 +829,7 @@ static const struct iio_info lm3533_als_info = {
830 .read_raw = &lm3533_als_read_raw, 829 .read_raw = &lm3533_als_read_raw,
831}; 830};
832 831
833static int __devinit lm3533_als_probe(struct platform_device *pdev) 832static int lm3533_als_probe(struct platform_device *pdev)
834{ 833{
835 struct lm3533 *lm3533; 834 struct lm3533 *lm3533;
836 struct lm3533_als_platform_data *pdata; 835 struct lm3533_als_platform_data *pdata;
@@ -901,7 +900,7 @@ err_free_dev:
901 return ret; 900 return ret;
902} 901}
903 902
904static int __devexit lm3533_als_remove(struct platform_device *pdev) 903static int lm3533_als_remove(struct platform_device *pdev)
905{ 904{
906 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 905 struct iio_dev *indio_dev = platform_get_drvdata(pdev);
907 struct lm3533_als *als = iio_priv(indio_dev); 906 struct lm3533_als *als = iio_priv(indio_dev);
@@ -922,7 +921,7 @@ static struct platform_driver lm3533_als_driver = {
922 .owner = THIS_MODULE, 921 .owner = THIS_MODULE,
923 }, 922 },
924 .probe = lm3533_als_probe, 923 .probe = lm3533_als_probe,
925 .remove = __devexit_p(lm3533_als_remove), 924 .remove = lm3533_als_remove,
926}; 925};
927module_platform_driver(lm3533_als_driver); 926module_platform_driver(lm3533_als_driver);
928 927
diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
index e49cb9784a6f..2aa748fbdc0e 100644
--- a/drivers/iio/light/vcnl4000.c
+++ b/drivers/iio/light/vcnl4000.c
@@ -150,8 +150,8 @@ static const struct iio_info vcnl4000_info = {
150 .driver_module = THIS_MODULE, 150 .driver_module = THIS_MODULE,
151}; 151};
152 152
153static int __devinit vcnl4000_probe(struct i2c_client *client, 153static int vcnl4000_probe(struct i2c_client *client,
154 const struct i2c_device_id *id) 154 const struct i2c_device_id *id)
155{ 155{
156 struct vcnl4000_data *data; 156 struct vcnl4000_data *data;
157 struct iio_dev *indio_dev; 157 struct iio_dev *indio_dev;
@@ -190,7 +190,7 @@ error_free_dev:
190 return ret; 190 return ret;
191} 191}
192 192
193static int __devexit vcnl4000_remove(struct i2c_client *client) 193static int vcnl4000_remove(struct i2c_client *client)
194{ 194{
195 struct iio_dev *indio_dev = i2c_get_clientdata(client); 195 struct iio_dev *indio_dev = i2c_get_clientdata(client);
196 196
@@ -206,7 +206,7 @@ static struct i2c_driver vcnl4000_driver = {
206 .owner = THIS_MODULE, 206 .owner = THIS_MODULE,
207 }, 207 },
208 .probe = vcnl4000_probe, 208 .probe = vcnl4000_probe,
209 .remove = __devexit_p(vcnl4000_remove), 209 .remove = vcnl4000_remove,
210 .id_table = vcnl4000_id, 210 .id_table = vcnl4000_id,
211}; 211};
212 212
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
index 8e75eb76ccd9..7ac2c7483ba8 100644
--- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
+++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
@@ -279,7 +279,7 @@ static int magn_3d_parse_report(struct platform_device *pdev,
279} 279}
280 280
281/* Function to initialize the processing for usage id */ 281/* Function to initialize the processing for usage id */
282static int __devinit hid_magn_3d_probe(struct platform_device *pdev) 282static int hid_magn_3d_probe(struct platform_device *pdev)
283{ 283{
284 int ret = 0; 284 int ret = 0;
285 static char *name = "magn_3d"; 285 static char *name = "magn_3d";
@@ -376,7 +376,7 @@ error_ret:
376} 376}
377 377
378/* Function to deinitialize the processing for usage id */ 378/* Function to deinitialize the processing for usage id */
379static int __devinit hid_magn_3d_remove(struct platform_device *pdev) 379static int hid_magn_3d_remove(struct platform_device *pdev)
380{ 380{
381 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 381 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
382 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 382 struct iio_dev *indio_dev = platform_get_drvdata(pdev);
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c
index 5ce7b9e8bff6..7275e727e0f5 100644
--- a/drivers/infiniband/hw/amso1100/c2.c
+++ b/drivers/infiniband/hw/amso1100/c2.c
@@ -920,8 +920,7 @@ static struct net_device *c2_devinit(struct c2_dev *c2dev,
920 return netdev; 920 return netdev;
921} 921}
922 922
923static int __devinit c2_probe(struct pci_dev *pcidev, 923static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
924 const struct pci_device_id *ent)
925{ 924{
926 int ret = 0, i; 925 int ret = 0, i;
927 unsigned long reg0_start, reg0_flags, reg0_len; 926 unsigned long reg0_start, reg0_flags, reg0_len;
@@ -1191,7 +1190,7 @@ static int __devinit c2_probe(struct pci_dev *pcidev,
1191 return ret; 1190 return ret;
1192} 1191}
1193 1192
1194static void __devexit c2_remove(struct pci_dev *pcidev) 1193static void c2_remove(struct pci_dev *pcidev)
1195{ 1194{
1196 struct c2_dev *c2dev = pci_get_drvdata(pcidev); 1195 struct c2_dev *c2dev = pci_get_drvdata(pcidev);
1197 struct net_device *netdev = c2dev->netdev; 1196 struct net_device *netdev = c2dev->netdev;
@@ -1236,7 +1235,7 @@ static struct pci_driver c2_pci_driver = {
1236 .name = DRV_NAME, 1235 .name = DRV_NAME,
1237 .id_table = c2_pci_table, 1236 .id_table = c2_pci_table,
1238 .probe = c2_probe, 1237 .probe = c2_probe,
1239 .remove = __devexit_p(c2_remove), 1238 .remove = c2_remove,
1240}; 1239};
1241 1240
1242static int __init c2_init_module(void) 1241static int __init c2_init_module(void)
diff --git a/drivers/infiniband/hw/amso1100/c2.h b/drivers/infiniband/hw/amso1100/c2.h
index 6ae698e68775..ba7a1208ff9e 100644
--- a/drivers/infiniband/hw/amso1100/c2.h
+++ b/drivers/infiniband/hw/amso1100/c2.h
@@ -498,16 +498,16 @@ extern int c2_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr,
498 struct ib_send_wr **bad_wr); 498 struct ib_send_wr **bad_wr);
499extern int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr, 499extern int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr,
500 struct ib_recv_wr **bad_wr); 500 struct ib_recv_wr **bad_wr);
501extern void __devinit c2_init_qp_table(struct c2_dev *c2dev); 501extern void c2_init_qp_table(struct c2_dev *c2dev);
502extern void __devexit c2_cleanup_qp_table(struct c2_dev *c2dev); 502extern void c2_cleanup_qp_table(struct c2_dev *c2dev);
503extern void c2_set_qp_state(struct c2_qp *, int); 503extern void c2_set_qp_state(struct c2_qp *, int);
504extern struct c2_qp *c2_find_qpn(struct c2_dev *c2dev, int qpn); 504extern struct c2_qp *c2_find_qpn(struct c2_dev *c2dev, int qpn);
505 505
506/* PDs */ 506/* PDs */
507extern int c2_pd_alloc(struct c2_dev *c2dev, int privileged, struct c2_pd *pd); 507extern int c2_pd_alloc(struct c2_dev *c2dev, int privileged, struct c2_pd *pd);
508extern void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd); 508extern void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd);
509extern int __devinit c2_init_pd_table(struct c2_dev *c2dev); 509extern int c2_init_pd_table(struct c2_dev *c2dev);
510extern void __devexit c2_cleanup_pd_table(struct c2_dev *c2dev); 510extern void c2_cleanup_pd_table(struct c2_dev *c2dev);
511 511
512/* CQs */ 512/* CQs */
513extern int c2_init_cq(struct c2_dev *c2dev, int entries, 513extern int c2_init_cq(struct c2_dev *c2dev, int entries,
diff --git a/drivers/infiniband/hw/amso1100/c2_pd.c b/drivers/infiniband/hw/amso1100/c2_pd.c
index 161f2a285351..f3e81dc357bb 100644
--- a/drivers/infiniband/hw/amso1100/c2_pd.c
+++ b/drivers/infiniband/hw/amso1100/c2_pd.c
@@ -70,7 +70,7 @@ void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd)
70 spin_unlock(&c2dev->pd_table.lock); 70 spin_unlock(&c2dev->pd_table.lock);
71} 71}
72 72
73int __devinit c2_init_pd_table(struct c2_dev *c2dev) 73int c2_init_pd_table(struct c2_dev *c2dev)
74{ 74{
75 75
76 c2dev->pd_table.last = 0; 76 c2dev->pd_table.last = 0;
@@ -84,7 +84,7 @@ int __devinit c2_init_pd_table(struct c2_dev *c2dev)
84 return 0; 84 return 0;
85} 85}
86 86
87void __devexit c2_cleanup_pd_table(struct c2_dev *c2dev) 87void c2_cleanup_pd_table(struct c2_dev *c2dev)
88{ 88{
89 kfree(c2dev->pd_table.table); 89 kfree(c2dev->pd_table.table);
90} 90}
diff --git a/drivers/infiniband/hw/amso1100/c2_qp.c b/drivers/infiniband/hw/amso1100/c2_qp.c
index 0d7b6f23caff..28cd5cb51859 100644
--- a/drivers/infiniband/hw/amso1100/c2_qp.c
+++ b/drivers/infiniband/hw/amso1100/c2_qp.c
@@ -1010,13 +1010,13 @@ out:
1010 return err; 1010 return err;
1011} 1011}
1012 1012
1013void __devinit c2_init_qp_table(struct c2_dev *c2dev) 1013void c2_init_qp_table(struct c2_dev *c2dev)
1014{ 1014{
1015 spin_lock_init(&c2dev->qp_table.lock); 1015 spin_lock_init(&c2dev->qp_table.lock);
1016 idr_init(&c2dev->qp_table.idr); 1016 idr_init(&c2dev->qp_table.idr);
1017} 1017}
1018 1018
1019void __devexit c2_cleanup_qp_table(struct c2_dev *c2dev) 1019void c2_cleanup_qp_table(struct c2_dev *c2dev)
1020{ 1020{
1021 idr_destroy(&c2dev->qp_table.idr); 1021 idr_destroy(&c2dev->qp_table.idr);
1022} 1022}
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c
index e4a73158fc7f..b7c986990053 100644
--- a/drivers/infiniband/hw/amso1100/c2_rnic.c
+++ b/drivers/infiniband/hw/amso1100/c2_rnic.c
@@ -442,7 +442,7 @@ static int c2_rnic_close(struct c2_dev *c2dev)
442 * involves initializing the various limits and resource pools that 442 * involves initializing the various limits and resource pools that
443 * comprise the RNIC instance. 443 * comprise the RNIC instance.
444 */ 444 */
445int __devinit c2_rnic_init(struct c2_dev *c2dev) 445int c2_rnic_init(struct c2_dev *c2dev)
446{ 446{
447 int err; 447 int err;
448 u32 qsize, msgsize; 448 u32 qsize, msgsize;
@@ -611,7 +611,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
611/* 611/*
612 * Called by c2_remove to cleanup the RNIC resources. 612 * Called by c2_remove to cleanup the RNIC resources.
613 */ 613 */
614void __devexit c2_rnic_term(struct c2_dev *c2dev) 614void c2_rnic_term(struct c2_dev *c2dev)
615{ 615{
616 616
617 /* Close the open adapter instance */ 617 /* Close the open adapter instance */
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
index 832e7a7d0aee..f8a62918a88d 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -713,8 +713,8 @@ static struct attribute_group ehca_dev_attr_grp = {
713 .attrs = ehca_dev_attrs 713 .attrs = ehca_dev_attrs
714}; 714};
715 715
716static int __devinit ehca_probe(struct platform_device *dev, 716static int ehca_probe(struct platform_device *dev,
717 const struct of_device_id *id) 717 const struct of_device_id *id)
718{ 718{
719 struct ehca_shca *shca; 719 struct ehca_shca *shca;
720 const u64 *handle; 720 const u64 *handle;
@@ -879,7 +879,7 @@ probe1:
879 return -EINVAL; 879 return -EINVAL;
880} 880}
881 881
882static int __devexit ehca_remove(struct platform_device *dev) 882static int ehca_remove(struct platform_device *dev)
883{ 883{
884 struct ehca_shca *shca = dev_get_drvdata(&dev->dev); 884 struct ehca_shca *shca = dev_get_drvdata(&dev->dev);
885 unsigned long flags; 885 unsigned long flags;
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index bfca37b2432f..7b371f545ece 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -127,9 +127,8 @@ const char *ipath_ibcstatus_str[] = {
127 "LTState1C", "LTState1D", "LTState1E", "LTState1F" 127 "LTState1C", "LTState1D", "LTState1E", "LTState1F"
128}; 128};
129 129
130static void __devexit ipath_remove_one(struct pci_dev *); 130static void ipath_remove_one(struct pci_dev *);
131static int __devinit ipath_init_one(struct pci_dev *, 131static int ipath_init_one(struct pci_dev *, const struct pci_device_id *);
132 const struct pci_device_id *);
133 132
134/* Only needed for registration, nothing else needs this info */ 133/* Only needed for registration, nothing else needs this info */
135#define PCI_VENDOR_ID_PATHSCALE 0x1fc1 134#define PCI_VENDOR_ID_PATHSCALE 0x1fc1
@@ -148,7 +147,7 @@ MODULE_DEVICE_TABLE(pci, ipath_pci_tbl);
148static struct pci_driver ipath_driver = { 147static struct pci_driver ipath_driver = {
149 .name = IPATH_DRV_NAME, 148 .name = IPATH_DRV_NAME,
150 .probe = ipath_init_one, 149 .probe = ipath_init_one,
151 .remove = __devexit_p(ipath_remove_one), 150 .remove = ipath_remove_one,
152 .id_table = ipath_pci_tbl, 151 .id_table = ipath_pci_tbl,
153 .driver = { 152 .driver = {
154 .groups = ipath_driver_attr_groups, 153 .groups = ipath_driver_attr_groups,
@@ -392,8 +391,7 @@ done:
392 391
393static void cleanup_device(struct ipath_devdata *dd); 392static void cleanup_device(struct ipath_devdata *dd);
394 393
395static int __devinit ipath_init_one(struct pci_dev *pdev, 394static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
396 const struct pci_device_id *ent)
397{ 395{
398 int ret, len, j; 396 int ret, len, j;
399 struct ipath_devdata *dd; 397 struct ipath_devdata *dd;
@@ -737,7 +735,7 @@ static void cleanup_device(struct ipath_devdata *dd)
737 kfree(tmp); 735 kfree(tmp);
738} 736}
739 737
740static void __devexit ipath_remove_one(struct pci_dev *pdev) 738static void ipath_remove_one(struct pci_dev *pdev)
741{ 739{
742 struct ipath_devdata *dd = pci_get_drvdata(pdev); 740 struct ipath_devdata *dd = pci_get_drvdata(pdev);
743 741
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index aa12a533ae9e..87897b95666d 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -130,7 +130,7 @@ static int log_mtts_per_seg = ilog2(MTHCA_MTT_SEG_SIZE / 8);
130module_param_named(log_mtts_per_seg, log_mtts_per_seg, int, 0444); 130module_param_named(log_mtts_per_seg, log_mtts_per_seg, int, 0444);
131MODULE_PARM_DESC(log_mtts_per_seg, "Log2 number of MTT entries per segment (1-5)"); 131MODULE_PARM_DESC(log_mtts_per_seg, "Log2 number of MTT entries per segment (1-5)");
132 132
133static char mthca_version[] __devinitdata = 133static char mthca_version[] =
134 DRV_NAME ": Mellanox InfiniBand HCA driver v" 134 DRV_NAME ": Mellanox InfiniBand HCA driver v"
135 DRV_VERSION " (" DRV_RELDATE ")\n"; 135 DRV_VERSION " (" DRV_RELDATE ")\n";
136 136
@@ -1139,8 +1139,7 @@ int __mthca_restart_one(struct pci_dev *pdev)
1139 return __mthca_init_one(pdev, hca_type); 1139 return __mthca_init_one(pdev, hca_type);
1140} 1140}
1141 1141
1142static int __devinit mthca_init_one(struct pci_dev *pdev, 1142static int mthca_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1143 const struct pci_device_id *id)
1144{ 1143{
1145 int ret; 1144 int ret;
1146 1145
@@ -1162,7 +1161,7 @@ static int __devinit mthca_init_one(struct pci_dev *pdev,
1162 return ret; 1161 return ret;
1163} 1162}
1164 1163
1165static void __devexit mthca_remove_one(struct pci_dev *pdev) 1164static void mthca_remove_one(struct pci_dev *pdev)
1166{ 1165{
1167 mutex_lock(&mthca_device_mutex); 1166 mutex_lock(&mthca_device_mutex);
1168 __mthca_remove_one(pdev); 1167 __mthca_remove_one(pdev);
@@ -1199,7 +1198,7 @@ static struct pci_driver mthca_driver = {
1199 .name = DRV_NAME, 1198 .name = DRV_NAME,
1200 .id_table = mthca_pci_table, 1199 .id_table = mthca_pci_table,
1201 .probe = mthca_init_one, 1200 .probe = mthca_init_one,
1202 .remove = __devexit_p(mthca_remove_one) 1201 .remove = mthca_remove_one,
1203}; 1202};
1204 1203
1205static void __init __mthca_check_profile_val(const char *name, int *pval, 1204static void __init __mthca_check_profile_val(const char *name, int *pval,
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index 748db2d3e465..5b152a366dff 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -444,7 +444,7 @@ static irqreturn_t nes_interrupt(int irq, void *dev_id)
444/** 444/**
445 * nes_probe - Device initialization 445 * nes_probe - Device initialization
446 */ 446 */
447static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) 447static int nes_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
448{ 448{
449 struct net_device *netdev = NULL; 449 struct net_device *netdev = NULL;
450 struct nes_device *nesdev = NULL; 450 struct nes_device *nesdev = NULL;
@@ -749,7 +749,7 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
749/** 749/**
750 * nes_remove - unload from kernel 750 * nes_remove - unload from kernel
751 */ 751 */
752static void __devexit nes_remove(struct pci_dev *pcidev) 752static void nes_remove(struct pci_dev *pcidev)
753{ 753{
754 struct nes_device *nesdev = pci_get_drvdata(pcidev); 754 struct nes_device *nesdev = pci_get_drvdata(pcidev);
755 struct net_device *netdev; 755 struct net_device *netdev;
@@ -810,7 +810,7 @@ static struct pci_driver nes_pci_driver = {
810 .name = DRV_NAME, 810 .name = DRV_NAME,
811 .id_table = nes_pci_table, 811 .id_table = nes_pci_table,
812 .probe = nes_probe, 812 .probe = nes_probe,
813 .remove = __devexit_p(nes_remove), 813 .remove = nes_remove,
814}; 814};
815 815
816static ssize_t nes_show_adapter(struct device_driver *ddp, char *buf) 816static ssize_t nes_show_adapter(struct device_driver *ddp, char *buf)
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c
index 4443adfcd9ee..ddf066d9abb6 100644
--- a/drivers/infiniband/hw/qib/qib_init.c
+++ b/drivers/infiniband/hw/qib/qib_init.c
@@ -1134,9 +1134,8 @@ void qib_disable_after_error(struct qib_devdata *dd)
1134 *dd->devstatusp |= QIB_STATUS_HWERROR; 1134 *dd->devstatusp |= QIB_STATUS_HWERROR;
1135} 1135}
1136 1136
1137static void __devexit qib_remove_one(struct pci_dev *); 1137static void qib_remove_one(struct pci_dev *);
1138static int __devinit qib_init_one(struct pci_dev *, 1138static int qib_init_one(struct pci_dev *, const struct pci_device_id *);
1139 const struct pci_device_id *);
1140 1139
1141#define DRIVER_LOAD_MSG "QLogic " QIB_DRV_NAME " loaded: " 1140#define DRIVER_LOAD_MSG "QLogic " QIB_DRV_NAME " loaded: "
1142#define PFX QIB_DRV_NAME ": " 1141#define PFX QIB_DRV_NAME ": "
@@ -1153,7 +1152,7 @@ MODULE_DEVICE_TABLE(pci, qib_pci_tbl);
1153struct pci_driver qib_driver = { 1152struct pci_driver qib_driver = {
1154 .name = QIB_DRV_NAME, 1153 .name = QIB_DRV_NAME,
1155 .probe = qib_init_one, 1154 .probe = qib_init_one,
1156 .remove = __devexit_p(qib_remove_one), 1155 .remove = qib_remove_one,
1157 .id_table = qib_pci_tbl, 1156 .id_table = qib_pci_tbl,
1158 .err_handler = &qib_pci_err_handler, 1157 .err_handler = &qib_pci_err_handler,
1159}; 1158};
@@ -1342,8 +1341,7 @@ static void qib_postinit_cleanup(struct qib_devdata *dd)
1342 qib_free_devdata(dd); 1341 qib_free_devdata(dd);
1343} 1342}
1344 1343
1345static int __devinit qib_init_one(struct pci_dev *pdev, 1344static int qib_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1346 const struct pci_device_id *ent)
1347{ 1345{
1348 int ret, j, pidx, initfail; 1346 int ret, j, pidx, initfail;
1349 struct qib_devdata *dd = NULL; 1347 struct qib_devdata *dd = NULL;
@@ -1448,7 +1446,7 @@ bail:
1448 return ret; 1446 return ret;
1449} 1447}
1450 1448
1451static void __devexit qib_remove_one(struct pci_dev *pdev) 1449static void qib_remove_one(struct pci_dev *pdev)
1452{ 1450{
1453 struct qib_devdata *dd = pci_get_drvdata(pdev); 1451 struct qib_devdata *dd = pci_get_drvdata(pdev);
1454 int ret; 1452 int ret;
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index d327f5a2bb0e..b29ca651a395 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -602,6 +602,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
602 602
603 i = 0; 603 i = 0;
604 for_each_child_of_node(node, pp) { 604 for_each_child_of_node(node, pp) {
605 int gpio;
605 enum of_gpio_flags flags; 606 enum of_gpio_flags flags;
606 607
607 if (!of_find_property(pp, "gpios", NULL)) { 608 if (!of_find_property(pp, "gpios", NULL)) {
@@ -610,9 +611,19 @@ gpio_keys_get_devtree_pdata(struct device *dev)
610 continue; 611 continue;
611 } 612 }
612 613
614 gpio = of_get_gpio_flags(pp, 0, &flags);
615 if (gpio < 0) {
616 error = gpio;
617 if (error != -EPROBE_DEFER)
618 dev_err(dev,
619 "Failed to get gpio flags, error: %d\n",
620 error);
621 goto err_free_pdata;
622 }
623
613 button = &pdata->buttons[i++]; 624 button = &pdata->buttons[i++];
614 625
615 button->gpio = of_get_gpio_flags(pp, 0, &flags); 626 button->gpio = gpio;
616 button->active_low = flags & OF_GPIO_ACTIVE_LOW; 627 button->active_low = flags & OF_GPIO_ACTIVE_LOW;
617 628
618 if (of_property_read_u32(pp, "linux,code", &button->code)) { 629 if (of_property_read_u32(pp, "linux,code", &button->code)) {
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index f686fd970553..21147164874d 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -135,6 +135,7 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct
135 135
136 i = 0; 136 i = 0;
137 for_each_child_of_node(node, pp) { 137 for_each_child_of_node(node, pp) {
138 int gpio;
138 enum of_gpio_flags flags; 139 enum of_gpio_flags flags;
139 140
140 if (!of_find_property(pp, "gpios", NULL)) { 141 if (!of_find_property(pp, "gpios", NULL)) {
@@ -143,9 +144,19 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct
143 continue; 144 continue;
144 } 145 }
145 146
147 gpio = of_get_gpio_flags(pp, 0, &flags);
148 if (gpio < 0) {
149 error = gpio;
150 if (error != -EPROBE_DEFER)
151 dev_err(dev,
152 "Failed to get gpio flags, error: %d\n",
153 error);
154 goto err_free_pdata;
155 }
156
146 button = &pdata->buttons[i++]; 157 button = &pdata->buttons[i++];
147 158
148 button->gpio = of_get_gpio_flags(pp, 0, &flags); 159 button->gpio = gpio;
149 button->active_low = flags & OF_GPIO_ACTIVE_LOW; 160 button->active_low = flags & OF_GPIO_ACTIVE_LOW;
150 161
151 if (of_property_read_u32(pp, "linux,code", &button->code)) { 162 if (of_property_read_u32(pp, "linux,code", &button->code)) {
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c
index 50e9c5e195e1..a34cc6714e5b 100644
--- a/drivers/input/keyboard/tca8418_keypad.c
+++ b/drivers/input/keyboard/tca8418_keypad.c
@@ -384,7 +384,7 @@ static const struct i2c_device_id tca8418_id[] = {
384MODULE_DEVICE_TABLE(i2c, tca8418_id); 384MODULE_DEVICE_TABLE(i2c, tca8418_id);
385 385
386#ifdef CONFIG_OF 386#ifdef CONFIG_OF
387static const struct of_device_id tca8418_dt_ids[] __devinitconst = { 387static const struct of_device_id tca8418_dt_ids[] = {
388 { .compatible = "ti,tca8418", }, 388 { .compatible = "ti,tca8418", },
389 { } 389 { }
390}; 390};
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c
index e582922bacf7..cc7e0d4a8f93 100644
--- a/drivers/input/mouse/sentelic.c
+++ b/drivers/input/mouse/sentelic.c
@@ -791,7 +791,7 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse)
791 fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y); 791 fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y);
792 fsp_set_slot(dev, 1, false, 0, 0); 792 fsp_set_slot(dev, 1, false, 0, 0);
793 } 793 }
794 if (fgrs > 0) { 794 if (fgrs == 1 || (fgrs == 2 && !(packet[0] & FSP_PB0_MFMC_FGR2))) {
795 input_report_abs(dev, ABS_X, abs_x); 795 input_report_abs(dev, ABS_X, abs_x);
796 input_report_abs(dev, ABS_Y, abs_y); 796 input_report_abs(dev, ABS_Y, abs_y);
797 } 797 }
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index c2c07a4a7f21..b9d091157884 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4234,7 +4234,7 @@ static struct iommu_ops intel_iommu_ops = {
4234 .pgsize_bitmap = INTEL_IOMMU_PGSIZES, 4234 .pgsize_bitmap = INTEL_IOMMU_PGSIZES,
4235}; 4235};
4236 4236
4237static void __devinit quirk_iommu_rwbf(struct pci_dev *dev) 4237static void quirk_iommu_rwbf(struct pci_dev *dev)
4238{ 4238{
4239 /* 4239 /*
4240 * Mobile 4 Series Chipset neglects to set RWBF capability, 4240 * Mobile 4 Series Chipset neglects to set RWBF capability,
@@ -4262,7 +4262,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf);
4262#define GGC_MEMORY_SIZE_3M_VT (0xa << 8) 4262#define GGC_MEMORY_SIZE_3M_VT (0xa << 8)
4263#define GGC_MEMORY_SIZE_4M_VT (0xb << 8) 4263#define GGC_MEMORY_SIZE_4M_VT (0xb << 8)
4264 4264
4265static void __devinit quirk_calpella_no_shadow_gtt(struct pci_dev *dev) 4265static void quirk_calpella_no_shadow_gtt(struct pci_dev *dev)
4266{ 4266{
4267 unsigned short ggc; 4267 unsigned short ggc;
4268 4268
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 18108c1405e2..d33c980e9c20 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -934,7 +934,7 @@ static void omap_iommu_detach(struct omap_iommu *obj)
934/* 934/*
935 * OMAP Device MMU(IOMMU) detection 935 * OMAP Device MMU(IOMMU) detection
936 */ 936 */
937static int __devinit omap_iommu_probe(struct platform_device *pdev) 937static int omap_iommu_probe(struct platform_device *pdev)
938{ 938{
939 int err = -ENODEV; 939 int err = -ENODEV;
940 int irq; 940 int irq;
@@ -1003,7 +1003,7 @@ err_mem:
1003 return err; 1003 return err;
1004} 1004}
1005 1005
1006static int __devexit omap_iommu_remove(struct platform_device *pdev) 1006static int omap_iommu_remove(struct platform_device *pdev)
1007{ 1007{
1008 int irq; 1008 int irq;
1009 struct resource *res; 1009 struct resource *res;
@@ -1028,7 +1028,7 @@ static int __devexit omap_iommu_remove(struct platform_device *pdev)
1028 1028
1029static struct platform_driver omap_iommu_driver = { 1029static struct platform_driver omap_iommu_driver = {
1030 .probe = omap_iommu_probe, 1030 .probe = omap_iommu_probe,
1031 .remove = __devexit_p(omap_iommu_remove), 1031 .remove = omap_iommu_remove,
1032 .driver = { 1032 .driver = {
1033 .name = "omap-iommu", 1033 .name = "omap-iommu",
1034 }, 1034 },
diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
index 4c9db62814ff..8219f1d596ee 100644
--- a/drivers/iommu/tegra-gart.c
+++ b/drivers/iommu/tegra-gart.c
@@ -431,7 +431,7 @@ const struct dev_pm_ops tegra_gart_pm_ops = {
431}; 431};
432 432
433#ifdef CONFIG_OF 433#ifdef CONFIG_OF
434static struct of_device_id tegra_gart_of_match[] __devinitdata = { 434static struct of_device_id tegra_gart_of_match[] = {
435 { .compatible = "nvidia,tegra20-gart", }, 435 { .compatible = "nvidia,tegra20-gart", },
436 { }, 436 { },
437}; 437};
@@ -449,7 +449,7 @@ static struct platform_driver tegra_gart_driver = {
449 }, 449 },
450}; 450};
451 451
452static int __devinit tegra_gart_init(void) 452static int tegra_gart_init(void)
453{ 453{
454 return platform_driver_register(&tegra_gart_driver); 454 return platform_driver_register(&tegra_gart_driver);
455} 455}
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 25c1210c0832..fc178893789a 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -1255,7 +1255,7 @@ const struct dev_pm_ops tegra_smmu_pm_ops = {
1255}; 1255};
1256 1256
1257#ifdef CONFIG_OF 1257#ifdef CONFIG_OF
1258static struct of_device_id tegra_smmu_of_match[] __devinitdata = { 1258static struct of_device_id tegra_smmu_of_match[] = {
1259 { .compatible = "nvidia,tegra30-smmu", }, 1259 { .compatible = "nvidia,tegra30-smmu", },
1260 { }, 1260 { },
1261}; 1261};
@@ -1273,7 +1273,7 @@ static struct platform_driver tegra_smmu_driver = {
1273 }, 1273 },
1274}; 1274};
1275 1275
1276static int __devinit tegra_smmu_init(void) 1276static int tegra_smmu_init(void)
1277{ 1277{
1278 return platform_driver_register(&tegra_smmu_driver); 1278 return platform_driver_register(&tegra_smmu_driver);
1279} 1279}
diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c
index b305e6b2b8ee..ac4863c2ecbc 100644
--- a/drivers/isdn/hardware/avm/b1pci.c
+++ b/drivers/isdn/hardware/avm/b1pci.c
@@ -299,8 +299,8 @@ static void b1pciv4_remove(struct pci_dev *pdev)
299 299
300#endif /* CONFIG_ISDN_DRV_AVMB1_B1PCIV4 */ 300#endif /* CONFIG_ISDN_DRV_AVMB1_B1PCIV4 */
301 301
302static int __devinit b1pci_pci_probe(struct pci_dev *pdev, 302static int b1pci_pci_probe(struct pci_dev *pdev,
303 const struct pci_device_id *ent) 303 const struct pci_device_id *ent)
304{ 304{
305 struct capicardparams param; 305 struct capicardparams param;
306 int retval; 306 int retval;
@@ -344,7 +344,7 @@ static int __devinit b1pci_pci_probe(struct pci_dev *pdev,
344 return retval; 344 return retval;
345} 345}
346 346
347static void __devexit b1pci_pci_remove(struct pci_dev *pdev) 347static void b1pci_pci_remove(struct pci_dev *pdev)
348{ 348{
349#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4 349#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
350 avmcard *card = pci_get_drvdata(pdev); 350 avmcard *card = pci_get_drvdata(pdev);
@@ -362,7 +362,7 @@ static struct pci_driver b1pci_pci_driver = {
362 .name = "b1pci", 362 .name = "b1pci",
363 .id_table = b1pci_pci_tbl, 363 .id_table = b1pci_pci_tbl,
364 .probe = b1pci_pci_probe, 364 .probe = b1pci_pci_probe,
365 .remove = __devexit_p(b1pci_pci_remove), 365 .remove = b1pci_pci_remove,
366}; 366};
367 367
368static struct capi_driver capi_driver_b1pci = { 368static struct capi_driver capi_driver_b1pci = {
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c
index 98f18812441d..1d7fc44e3eef 100644
--- a/drivers/isdn/hardware/avm/c4.c
+++ b/drivers/isdn/hardware/avm/c4.c
@@ -1249,8 +1249,7 @@ err:
1249 1249
1250/* ------------------------------------------------------------- */ 1250/* ------------------------------------------------------------- */
1251 1251
1252static int __devinit c4_probe(struct pci_dev *dev, 1252static int c4_probe(struct pci_dev *dev, const struct pci_device_id *ent)
1253 const struct pci_device_id *ent)
1254{ 1253{
1255 int nr = ent->driver_data; 1254 int nr = ent->driver_data;
1256 int retval = 0; 1255 int retval = 0;
diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c
index cb9a30427bd2..2180b1685691 100644
--- a/drivers/isdn/hardware/avm/t1pci.c
+++ b/drivers/isdn/hardware/avm/t1pci.c
@@ -187,8 +187,7 @@ static char *t1pci_procinfo(struct capi_ctr *ctrl)
187 187
188/* ------------------------------------------------------------- */ 188/* ------------------------------------------------------------- */
189 189
190static int __devinit t1pci_probe(struct pci_dev *dev, 190static int t1pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
191 const struct pci_device_id *ent)
192{ 191{
193 struct capicardparams param; 192 struct capicardparams param;
194 int retval; 193 int retval;
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index ca6d276bb256..52377b4bf039 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -150,12 +150,12 @@ MODULE_DEVICE_TABLE(pci, divas_pci_tbl);
150 150
151static int divas_init_one(struct pci_dev *pdev, 151static int divas_init_one(struct pci_dev *pdev,
152 const struct pci_device_id *ent); 152 const struct pci_device_id *ent);
153static void __devexit divas_remove_one(struct pci_dev *pdev); 153static void divas_remove_one(struct pci_dev *pdev);
154 154
155static struct pci_driver diva_pci_driver = { 155static struct pci_driver diva_pci_driver = {
156 .name = "divas", 156 .name = "divas",
157 .probe = divas_init_one, 157 .probe = divas_init_one,
158 .remove = __devexit_p(divas_remove_one), 158 .remove = divas_remove_one,
159 .id_table = divas_pci_tbl, 159 .id_table = divas_pci_tbl,
160}; 160};
161 161
@@ -688,8 +688,7 @@ static int __init divas_register_chrdev(void)
688/* -------------------------------------------------------------------------- 688/* --------------------------------------------------------------------------
689 PCI driver section 689 PCI driver section
690 -------------------------------------------------------------------------- */ 690 -------------------------------------------------------------------------- */
691static int __devinit divas_init_one(struct pci_dev *pdev, 691static int divas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
692 const struct pci_device_id *ent)
693{ 692{
694 void *pdiva = NULL; 693 void *pdiva = NULL;
695 u8 pci_latency; 694 u8 pci_latency;
@@ -749,7 +748,7 @@ static int __devinit divas_init_one(struct pci_dev *pdev,
749 return (0); 748 return (0);
750} 749}
751 750
752static void __devexit divas_remove_one(struct pci_dev *pdev) 751static void divas_remove_one(struct pci_dev *pdev)
753{ 752{
754 void *pdiva = pci_get_drvdata(pdev); 753 void *pdiva = pci_get_drvdata(pdev);
755 754
diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c
index dceaec821b0e..292991c90c02 100644
--- a/drivers/isdn/hardware/mISDN/avmfritz.c
+++ b/drivers/isdn/hardware/mISDN/avmfritz.c
@@ -1034,7 +1034,7 @@ release_card(struct fritzcard *card)
1034 AVM_cnt--; 1034 AVM_cnt--;
1035} 1035}
1036 1036
1037static int __devinit 1037static int
1038setup_instance(struct fritzcard *card) 1038setup_instance(struct fritzcard *card)
1039{ 1039{
1040 int i, err; 1040 int i, err;
@@ -1096,7 +1096,7 @@ error:
1096 return err; 1096 return err;
1097} 1097}
1098 1098
1099static int __devinit 1099static int
1100fritzpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 1100fritzpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1101{ 1101{
1102 int err = -ENOMEM; 1102 int err = -ENOMEM;
@@ -1130,7 +1130,7 @@ fritzpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1130 return err; 1130 return err;
1131} 1131}
1132 1132
1133static void __devexit 1133static void
1134fritz_remove_pci(struct pci_dev *pdev) 1134fritz_remove_pci(struct pci_dev *pdev)
1135{ 1135{
1136 struct fritzcard *card = pci_get_drvdata(pdev); 1136 struct fritzcard *card = pci_get_drvdata(pdev);
@@ -1142,7 +1142,7 @@ fritz_remove_pci(struct pci_dev *pdev)
1142 pr_info("%s: drvdata already removed\n", __func__); 1142 pr_info("%s: drvdata already removed\n", __func__);
1143} 1143}
1144 1144
1145static struct pci_device_id fcpci_ids[] __devinitdata = { 1145static struct pci_device_id fcpci_ids[] = {
1146 { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID, 1146 { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID,
1147 0, 0, (unsigned long) "Fritz!Card PCI"}, 1147 0, 0, (unsigned long) "Fritz!Card PCI"},
1148 { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1_V2, PCI_ANY_ID, PCI_ANY_ID, 1148 { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1_V2, PCI_ANY_ID, PCI_ANY_ID,
@@ -1154,7 +1154,7 @@ MODULE_DEVICE_TABLE(pci, fcpci_ids);
1154static struct pci_driver fcpci_driver = { 1154static struct pci_driver fcpci_driver = {
1155 .name = "fcpci", 1155 .name = "fcpci",
1156 .probe = fritzpci_probe, 1156 .probe = fritzpci_probe,
1157 .remove = __devexit_p(fritz_remove_pci), 1157 .remove = fritz_remove_pci,
1158 .id_table = fcpci_ids, 1158 .id_table = fcpci_ids,
1159}; 1159};
1160 1160
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index f02794203bb1..28543d795188 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -5274,7 +5274,7 @@ free_card:
5274 return ret_err; 5274 return ret_err;
5275} 5275}
5276 5276
5277static void __devexit hfc_remove_pci(struct pci_dev *pdev) 5277static void hfc_remove_pci(struct pci_dev *pdev)
5278{ 5278{
5279 struct hfc_multi *card = pci_get_drvdata(pdev); 5279 struct hfc_multi *card = pci_get_drvdata(pdev);
5280 u_long flags; 5280 u_long flags;
@@ -5351,7 +5351,7 @@ static const struct hm_map hfcm_map[] = {
5351 5351
5352#undef H 5352#undef H
5353#define H(x) ((unsigned long)&hfcm_map[x]) 5353#define H(x) ((unsigned long)&hfcm_map[x])
5354static struct pci_device_id hfmultipci_ids[] __devinitdata = { 5354static struct pci_device_id hfmultipci_ids[] = {
5355 5355
5356 /* Cards with HFC-4S Chip */ 5356 /* Cards with HFC-4S Chip */
5357 { PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD, 5357 { PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
@@ -5472,7 +5472,7 @@ hfcmulti_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
5472static struct pci_driver hfcmultipci_driver = { 5472static struct pci_driver hfcmultipci_driver = {
5473 .name = "hfc_multi", 5473 .name = "hfc_multi",
5474 .probe = hfcmulti_probe, 5474 .probe = hfcmulti_probe,
5475 .remove = __devexit_p(hfc_remove_pci), 5475 .remove = hfc_remove_pci,
5476 .id_table = hfmultipci_ids, 5476 .id_table = hfmultipci_ids,
5477}; 5477};
5478 5478
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index 6e99d73563b8..a7e4939787c9 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -2215,7 +2215,7 @@ static struct pci_device_id hfc_ids[] =
2215 {}, 2215 {},
2216}; 2216};
2217 2217
2218static int __devinit 2218static int
2219hfc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 2219hfc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2220{ 2220{
2221 int err = -ENOMEM; 2221 int err = -ENOMEM;
@@ -2246,7 +2246,7 @@ hfc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2246 return err; 2246 return err;
2247} 2247}
2248 2248
2249static void __devexit 2249static void
2250hfc_remove_pci(struct pci_dev *pdev) 2250hfc_remove_pci(struct pci_dev *pdev)
2251{ 2251{
2252 struct hfc_pci *card = pci_get_drvdata(pdev); 2252 struct hfc_pci *card = pci_get_drvdata(pdev);
@@ -2263,7 +2263,7 @@ hfc_remove_pci(struct pci_dev *pdev)
2263static struct pci_driver hfc_driver = { 2263static struct pci_driver hfc_driver = {
2264 .name = "hfcpci", 2264 .name = "hfcpci",
2265 .probe = hfc_probe, 2265 .probe = hfc_probe,
2266 .remove = __devexit_p(hfc_remove_pci), 2266 .remove = hfc_remove_pci,
2267 .id_table = hfc_ids, 2267 .id_table = hfc_ids,
2268}; 2268};
2269 2269
diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
index 631eb3fa63cf..c1493f4162fb 100644
--- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c
+++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
@@ -125,7 +125,7 @@ struct inf_hw {
125#define PCI_SUBVENDOR_SEDLBAUER_PCI 0x53 125#define PCI_SUBVENDOR_SEDLBAUER_PCI 0x53
126#define PCI_SUB_ID_SEDLBAUER 0x01 126#define PCI_SUB_ID_SEDLBAUER 0x01
127 127
128static struct pci_device_id infineon_ids[] __devinitdata = { 128static struct pci_device_id infineon_ids[] = {
129 { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20), INF_DIVA20 }, 129 { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20), INF_DIVA20 },
130 { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20_U), INF_DIVA20U }, 130 { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20_U), INF_DIVA20U },
131 { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA201), INF_DIVA201 }, 131 { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA201), INF_DIVA201 },
@@ -603,7 +603,7 @@ inf_ctrl(struct inf_hw *hw, u32 cmd, u_long arg)
603 return ret; 603 return ret;
604} 604}
605 605
606static int __devinit 606static int
607init_irq(struct inf_hw *hw) 607init_irq(struct inf_hw *hw)
608{ 608{
609 int ret, cnt = 3; 609 int ret, cnt = 3;
@@ -662,7 +662,7 @@ release_io(struct inf_hw *hw)
662 } 662 }
663} 663}
664 664
665static int __devinit 665static int
666setup_io(struct inf_hw *hw) 666setup_io(struct inf_hw *hw)
667{ 667{
668 int err = 0; 668 int err = 0;
@@ -896,7 +896,7 @@ release_card(struct inf_hw *card) {
896 inf_cnt--; 896 inf_cnt--;
897} 897}
898 898
899static int __devinit 899static int
900setup_instance(struct inf_hw *card) 900setup_instance(struct inf_hw *card)
901{ 901{
902 int err; 902 int err;
@@ -1060,7 +1060,7 @@ static const struct inf_cinfo inf_card_info[] = {
1060 } 1060 }
1061}; 1061};
1062 1062
1063static const struct inf_cinfo * __devinit 1063static const struct inf_cinfo *
1064get_card_info(enum inf_types typ) 1064get_card_info(enum inf_types typ)
1065{ 1065{
1066 const struct inf_cinfo *ci = inf_card_info; 1066 const struct inf_cinfo *ci = inf_card_info;
@@ -1073,7 +1073,7 @@ get_card_info(enum inf_types typ)
1073 return NULL; 1073 return NULL;
1074} 1074}
1075 1075
1076static int __devinit 1076static int
1077inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 1077inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1078{ 1078{
1079 int err = -ENOMEM; 1079 int err = -ENOMEM;
@@ -1135,7 +1135,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1135 return err; 1135 return err;
1136} 1136}
1137 1137
1138static void __devexit 1138static void
1139inf_remove(struct pci_dev *pdev) 1139inf_remove(struct pci_dev *pdev)
1140{ 1140{
1141 struct inf_hw *card = pci_get_drvdata(pdev); 1141 struct inf_hw *card = pci_get_drvdata(pdev);
@@ -1149,7 +1149,7 @@ inf_remove(struct pci_dev *pdev)
1149static struct pci_driver infineon_driver = { 1149static struct pci_driver infineon_driver = {
1150 .name = "ISDN Infineon pci", 1150 .name = "ISDN Infineon pci",
1151 .probe = inf_probe, 1151 .probe = inf_probe,
1152 .remove = __devexit_p(inf_remove), 1152 .remove = inf_remove,
1153 .id_table = infineon_ids, 1153 .id_table = infineon_ids,
1154}; 1154};
1155 1155
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
index 9bcade59eb73..8e2944784e00 100644
--- a/drivers/isdn/hardware/mISDN/netjet.c
+++ b/drivers/isdn/hardware/mISDN/netjet.c
@@ -1008,7 +1008,7 @@ nj_setup(struct tiger_hw *card)
1008} 1008}
1009 1009
1010 1010
1011static int __devinit 1011static int
1012setup_instance(struct tiger_hw *card) 1012setup_instance(struct tiger_hw *card)
1013{ 1013{
1014 int i, err; 1014 int i, err;
@@ -1059,7 +1059,7 @@ error:
1059 return err; 1059 return err;
1060} 1060}
1061 1061
1062static int __devinit 1062static int
1063nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 1063nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1064{ 1064{
1065 int err = -ENOMEM; 1065 int err = -ENOMEM;
@@ -1124,7 +1124,7 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1124} 1124}
1125 1125
1126 1126
1127static void __devexit nj_remove(struct pci_dev *pdev) 1127static void nj_remove(struct pci_dev *pdev)
1128{ 1128{
1129 struct tiger_hw *card = pci_get_drvdata(pdev); 1129 struct tiger_hw *card = pci_get_drvdata(pdev);
1130 1130
@@ -1137,7 +1137,7 @@ static void __devexit nj_remove(struct pci_dev *pdev)
1137/* We cannot select cards with PCI_SUB... IDs, since here are cards with 1137/* We cannot select cards with PCI_SUB... IDs, since here are cards with
1138 * SUB IDs set to PCI_ANY_ID, so we need to match all and reject 1138 * SUB IDs set to PCI_ANY_ID, so we need to match all and reject
1139 * known other cards which not work with this driver - see probe function */ 1139 * known other cards which not work with this driver - see probe function */
1140static struct pci_device_id nj_pci_ids[] __devinitdata = { 1140static struct pci_device_id nj_pci_ids[] = {
1141 { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_300, 1141 { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_300,
1142 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 1142 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1143 { } 1143 { }
@@ -1147,7 +1147,7 @@ MODULE_DEVICE_TABLE(pci, nj_pci_ids);
1147static struct pci_driver nj_driver = { 1147static struct pci_driver nj_driver = {
1148 .name = "netjet", 1148 .name = "netjet",
1149 .probe = nj_probe, 1149 .probe = nj_probe,
1150 .remove = __devexit_p(nj_remove), 1150 .remove = nj_remove,
1151 .id_table = nj_pci_ids, 1151 .id_table = nj_pci_ids,
1152}; 1152};
1153 1153
diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c
index 93f344d74e54..9815bb4eec9c 100644
--- a/drivers/isdn/hardware/mISDN/speedfax.c
+++ b/drivers/isdn/hardware/mISDN/speedfax.c
@@ -282,7 +282,7 @@ sfax_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
282 return err; 282 return err;
283} 283}
284 284
285static int __devinit 285static int
286init_card(struct sfax_hw *sf) 286init_card(struct sfax_hw *sf)
287{ 287{
288 int ret, cnt = 3; 288 int ret, cnt = 3;
@@ -321,7 +321,7 @@ init_card(struct sfax_hw *sf)
321} 321}
322 322
323 323
324static int __devinit 324static int
325setup_speedfax(struct sfax_hw *sf) 325setup_speedfax(struct sfax_hw *sf)
326{ 326{
327 u_long flags; 327 u_long flags;
@@ -371,7 +371,7 @@ release_card(struct sfax_hw *card) {
371 sfax_cnt--; 371 sfax_cnt--;
372} 372}
373 373
374static int __devinit 374static int
375setup_instance(struct sfax_hw *card) 375setup_instance(struct sfax_hw *card)
376{ 376{
377 const struct firmware *firmware; 377 const struct firmware *firmware;
@@ -451,7 +451,7 @@ error_fw:
451 return err; 451 return err;
452} 452}
453 453
454static int __devinit 454static int
455sfaxpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 455sfaxpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
456{ 456{
457 int err = -ENOMEM; 457 int err = -ENOMEM;
@@ -480,7 +480,7 @@ sfaxpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
480 return err; 480 return err;
481} 481}
482 482
483static void __devexit 483static void
484sfax_remove_pci(struct pci_dev *pdev) 484sfax_remove_pci(struct pci_dev *pdev)
485{ 485{
486 struct sfax_hw *card = pci_get_drvdata(pdev); 486 struct sfax_hw *card = pci_get_drvdata(pdev);
@@ -491,7 +491,7 @@ sfax_remove_pci(struct pci_dev *pdev)
491 pr_debug("%s: drvdata already removed\n", __func__); 491 pr_debug("%s: drvdata already removed\n", __func__);
492} 492}
493 493
494static struct pci_device_id sfaxpci_ids[] __devinitdata = { 494static struct pci_device_id sfaxpci_ids[] = {
495 { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_100, 495 { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_100,
496 PCI_SUBVENDOR_SPEEDFAX_PYRAMID, PCI_SUB_ID_SEDLBAUER, 496 PCI_SUBVENDOR_SPEEDFAX_PYRAMID, PCI_SUB_ID_SEDLBAUER,
497 0, 0, (unsigned long) "Pyramid Speedfax + PCI" 497 0, 0, (unsigned long) "Pyramid Speedfax + PCI"
@@ -507,7 +507,7 @@ MODULE_DEVICE_TABLE(pci, sfaxpci_ids);
507static struct pci_driver sfaxpci_driver = { 507static struct pci_driver sfaxpci_driver = {
508 .name = "speedfax+ pci", 508 .name = "speedfax+ pci",
509 .probe = sfaxpci_probe, 509 .probe = sfaxpci_probe,
510 .remove = __devexit_p(sfax_remove_pci), 510 .remove = sfax_remove_pci,
511 .id_table = sfaxpci_ids, 511 .id_table = sfaxpci_ids,
512}; 512};
513 513
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index 335fe6455002..de69f6828c76 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -1355,7 +1355,7 @@ error_setup:
1355 return err; 1355 return err;
1356} 1356}
1357 1357
1358static int __devinit 1358static int
1359w6692_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 1359w6692_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1360{ 1360{
1361 int err = -ENOMEM; 1361 int err = -ENOMEM;
@@ -1387,7 +1387,7 @@ w6692_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1387 return err; 1387 return err;
1388} 1388}
1389 1389
1390static void __devexit 1390static void
1391w6692_remove_pci(struct pci_dev *pdev) 1391w6692_remove_pci(struct pci_dev *pdev)
1392{ 1392{
1393 struct w6692_hw *card = pci_get_drvdata(pdev); 1393 struct w6692_hw *card = pci_get_drvdata(pdev);
@@ -1414,7 +1414,7 @@ MODULE_DEVICE_TABLE(pci, w6692_ids);
1414static struct pci_driver w6692_driver = { 1414static struct pci_driver w6692_driver = {
1415 .name = "w6692", 1415 .name = "w6692",
1416 .probe = w6692_probe, 1416 .probe = w6692_probe,
1417 .remove = __devexit_p(w6692_remove_pci), 1417 .remove = w6692_remove_pci,
1418 .id_table = w6692_ids, 1418 .id_table = w6692_ids,
1419}; 1419};
1420 1420
diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c
index 525471e776a7..1063babe1d3a 100644
--- a/drivers/isdn/hisax/amd7930_fn.c
+++ b/drivers/isdn/hisax/amd7930_fn.c
@@ -786,8 +786,7 @@ void Amd7930_init(struct IsdnCardState *cs)
786 } 786 }
787} 787}
788 788
789void __devinit 789void setup_Amd7930(struct IsdnCardState *cs)
790setup_Amd7930(struct IsdnCardState *cs)
791{ 790{
792 INIT_WORK(&cs->tqueue, Amd7930_bh); 791 INIT_WORK(&cs->tqueue, Amd7930_bh);
793 cs->dbusytimer.function = (void *) dbusy_timer_handler; 792 cs->dbusytimer.function = (void *) dbusy_timer_handler;
diff --git a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c
index 2b74a40ad2a0..62f9c43e2377 100644
--- a/drivers/isdn/hisax/asuscom.c
+++ b/drivers/isdn/hisax/asuscom.c
@@ -295,7 +295,7 @@ Asus_card_msg(struct IsdnCardState *cs, int mt, void *arg)
295} 295}
296 296
297#ifdef __ISAPNP__ 297#ifdef __ISAPNP__
298static struct isapnp_device_id asus_ids[] __devinitdata = { 298static struct isapnp_device_id asus_ids[] = {
299 { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), 299 { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688),
300 ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), 300 ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688),
301 (unsigned long) "Asus1688 PnP" }, 301 (unsigned long) "Asus1688 PnP" },
@@ -311,12 +311,11 @@ static struct isapnp_device_id asus_ids[] __devinitdata = {
311 { 0, } 311 { 0, }
312}; 312};
313 313
314static struct isapnp_device_id *ipid __devinitdata = &asus_ids[0]; 314static struct isapnp_device_id *ipid = &asus_ids[0];
315static struct pnp_card *pnp_c __devinitdata = NULL; 315static struct pnp_card *pnp_c = NULL;
316#endif 316#endif
317 317
318int __devinit 318int setup_asuscom(struct IsdnCard *card)
319setup_asuscom(struct IsdnCard *card)
320{ 319{
321 int bytecnt; 320 int bytecnt;
322 struct IsdnCardState *cs = card->cs; 321 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/avm_a1.c b/drivers/isdn/hisax/avm_a1.c
index 402d489cbbf1..7dd74087ad72 100644
--- a/drivers/isdn/hisax/avm_a1.c
+++ b/drivers/isdn/hisax/avm_a1.c
@@ -177,8 +177,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
177 return (0); 177 return (0);
178} 178}
179 179
180int __devinit 180int setup_avm_a1(struct IsdnCard *card)
181setup_avm_a1(struct IsdnCard *card)
182{ 181{
183 u_char val; 182 u_char val;
184 struct IsdnCardState *cs = card->cs; 183 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c
index 39347198d643..bc52d54ff5e1 100644
--- a/drivers/isdn/hisax/avm_a1p.c
+++ b/drivers/isdn/hisax/avm_a1p.c
@@ -213,7 +213,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
213 return 0; 213 return 0;
214} 214}
215 215
216int __devinit setup_avm_a1_pcmcia(struct IsdnCard *card) 216int setup_avm_a1_pcmcia(struct IsdnCard *card)
217{ 217{
218 u_char model, vers; 218 u_char model, vers;
219 struct IsdnCardState *cs = card->cs; 219 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
index 979492d69dae..ee9b9a03cffa 100644
--- a/drivers/isdn/hisax/avm_pci.c
+++ b/drivers/isdn/hisax/avm_pci.c
@@ -718,7 +718,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
718 return (0); 718 return (0);
719} 719}
720 720
721static int __devinit avm_setup_rest(struct IsdnCardState *cs) 721static int avm_setup_rest(struct IsdnCardState *cs)
722{ 722{
723 u_int val, ver; 723 u_int val, ver;
724 724
@@ -770,16 +770,16 @@ static int __devinit avm_setup_rest(struct IsdnCardState *cs)
770 770
771#ifndef __ISAPNP__ 771#ifndef __ISAPNP__
772 772
773static int __devinit avm_pnp_setup(struct IsdnCardState *cs) 773static int avm_pnp_setup(struct IsdnCardState *cs)
774{ 774{
775 return (1); /* no-op: success */ 775 return (1); /* no-op: success */
776} 776}
777 777
778#else 778#else
779 779
780static struct pnp_card *pnp_avm_c __devinitdata = NULL; 780static struct pnp_card *pnp_avm_c = NULL;
781 781
782static int __devinit avm_pnp_setup(struct IsdnCardState *cs) 782static int avm_pnp_setup(struct IsdnCardState *cs)
783{ 783{
784 struct pnp_dev *pnp_avm_d = NULL; 784 struct pnp_dev *pnp_avm_d = NULL;
785 785
@@ -825,16 +825,16 @@ static int __devinit avm_pnp_setup(struct IsdnCardState *cs)
825 825
826#ifndef CONFIG_PCI 826#ifndef CONFIG_PCI
827 827
828static int __devinit avm_pci_setup(struct IsdnCardState *cs) 828static int avm_pci_setup(struct IsdnCardState *cs)
829{ 829{
830 return (1); /* no-op: success */ 830 return (1); /* no-op: success */
831} 831}
832 832
833#else 833#else
834 834
835static struct pci_dev *dev_avm __devinitdata = NULL; 835static struct pci_dev *dev_avm = NULL;
836 836
837static int __devinit avm_pci_setup(struct IsdnCardState *cs) 837static int avm_pci_setup(struct IsdnCardState *cs)
838{ 838{
839 if ((dev_avm = hisax_find_pci_device(PCI_VENDOR_ID_AVM, 839 if ((dev_avm = hisax_find_pci_device(PCI_VENDOR_ID_AVM,
840 PCI_DEVICE_ID_AVM_A1, dev_avm))) { 840 PCI_DEVICE_ID_AVM_A1, dev_avm))) {
@@ -867,8 +867,7 @@ static int __devinit avm_pci_setup(struct IsdnCardState *cs)
867 867
868#endif /* CONFIG_PCI */ 868#endif /* CONFIG_PCI */
869 869
870int __devinit 870int setup_avm_pcipnp(struct IsdnCard *card)
871setup_avm_pcipnp(struct IsdnCard *card)
872{ 871{
873 struct IsdnCardState *cs = card->cs; 872 struct IsdnCardState *cs = card->cs;
874 char tmp[64]; 873 char tmp[64];
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index c644557ae614..4e676bcf8506 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -38,11 +38,11 @@ module_param(isdnprot, int, 0);
38 38
39/*====================================================================*/ 39/*====================================================================*/
40 40
41static int avma1cs_config(struct pcmcia_device *link) __devinit; 41static int avma1cs_config(struct pcmcia_device *link);
42static void avma1cs_release(struct pcmcia_device *link); 42static void avma1cs_release(struct pcmcia_device *link);
43static void avma1cs_detach(struct pcmcia_device *p_dev) __devexit; 43static void avma1cs_detach(struct pcmcia_device *p_dev);
44 44
45static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) 45static int avma1cs_probe(struct pcmcia_device *p_dev)
46{ 46{
47 dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); 47 dev_dbg(&p_dev->dev, "avma1cs_attach()\n");
48 48
@@ -54,7 +54,7 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
54 return avma1cs_config(p_dev); 54 return avma1cs_config(p_dev);
55} /* avma1cs_attach */ 55} /* avma1cs_attach */
56 56
57static void __devexit avma1cs_detach(struct pcmcia_device *link) 57static void avma1cs_detach(struct pcmcia_device *link)
58{ 58{
59 dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link); 59 dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link);
60 avma1cs_release(link); 60 avma1cs_release(link);
@@ -72,7 +72,7 @@ static int avma1cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
72} 72}
73 73
74 74
75static int __devinit avma1cs_config(struct pcmcia_device *link) 75static int avma1cs_config(struct pcmcia_device *link)
76{ 76{
77 int i = -1; 77 int i = -1;
78 char devname[128]; 78 char devname[128];
@@ -156,7 +156,7 @@ static struct pcmcia_driver avma1cs_driver = {
156 .owner = THIS_MODULE, 156 .owner = THIS_MODULE,
157 .name = "avma1_cs", 157 .name = "avma1_cs",
158 .probe = avma1cs_probe, 158 .probe = avma1cs_probe,
159 .remove = __devexit_p(avma1cs_detach), 159 .remove = avma1cs_detach,
160 .id_table = avma1cs_ids, 160 .id_table = avma1cs_ids,
161}; 161};
162 162
diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c
index f6bf9c68892e..c360164bde1b 100644
--- a/drivers/isdn/hisax/bkm_a4t.c
+++ b/drivers/isdn/hisax/bkm_a4t.c
@@ -253,10 +253,8 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
253 return (0); 253 return (0);
254} 254}
255 255
256static int __devinit a4t_pci_probe(struct pci_dev *dev_a4t, 256static int a4t_pci_probe(struct pci_dev *dev_a4t, struct IsdnCardState *cs,
257 struct IsdnCardState *cs, 257 u_int *found, u_int *pci_memaddr)
258 u_int *found,
259 u_int *pci_memaddr)
260{ 258{
261 u16 sub_sys; 259 u16 sub_sys;
262 u16 sub_vendor; 260 u16 sub_vendor;
@@ -275,9 +273,8 @@ static int __devinit a4t_pci_probe(struct pci_dev *dev_a4t,
275 return (-1); /* continue looping */ 273 return (-1); /* continue looping */
276} 274}
277 275
278static int __devinit a4t_cs_init(struct IsdnCard *card, 276static int a4t_cs_init(struct IsdnCard *card, struct IsdnCardState *cs,
279 struct IsdnCardState *cs, 277 u_int pci_memaddr)
280 u_int pci_memaddr)
281{ 278{
282 I20_REGISTER_FILE *pI20_Regs; 279 I20_REGISTER_FILE *pI20_Regs;
283 280
@@ -323,10 +320,9 @@ static int __devinit a4t_cs_init(struct IsdnCard *card,
323 return (1); 320 return (1);
324} 321}
325 322
326static struct pci_dev *dev_a4t __devinitdata = NULL; 323static struct pci_dev *dev_a4t = NULL;
327 324
328int __devinit 325int setup_bkm_a4t(struct IsdnCard *card)
329setup_bkm_a4t(struct IsdnCard *card)
330{ 326{
331 struct IsdnCardState *cs = card->cs; 327 struct IsdnCardState *cs = card->cs;
332 char tmp[64]; 328 char tmp[64];
diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c
index c9c98f071af6..dd663ea57ec6 100644
--- a/drivers/isdn/hisax/bkm_a8.c
+++ b/drivers/isdn/hisax/bkm_a8.c
@@ -255,8 +255,7 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
255 return (0); 255 return (0);
256} 256}
257 257
258static int __devinit 258static int sct_alloc_io(u_int adr, u_int len)
259sct_alloc_io(u_int adr, u_int len)
260{ 259{
261 if (!request_region(adr, len, "scitel")) { 260 if (!request_region(adr, len, "scitel")) {
262 printk(KERN_WARNING 261 printk(KERN_WARNING
@@ -267,15 +266,14 @@ sct_alloc_io(u_int adr, u_int len)
267 return (0); 266 return (0);
268} 267}
269 268
270static struct pci_dev *dev_a8 __devinitdata = NULL; 269static struct pci_dev *dev_a8 = NULL;
271static u16 sub_vendor_id __devinitdata = 0; 270static u16 sub_vendor_id = 0;
272static u16 sub_sys_id __devinitdata = 0; 271static u16 sub_sys_id = 0;
273static u_char pci_bus __devinitdata = 0; 272static u_char pci_bus = 0;
274static u_char pci_device_fn __devinitdata = 0; 273static u_char pci_device_fn = 0;
275static u_char pci_irq __devinitdata = 0; 274static u_char pci_irq = 0;
276 275
277int __devinit 276int setup_sct_quadro(struct IsdnCard *card)
278setup_sct_quadro(struct IsdnCard *card)
279{ 277{
280 struct IsdnCardState *cs = card->cs; 278 struct IsdnCardState *cs = card->cs;
281 char tmp[64]; 279 char tmp[64];
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index b5edc0eeec06..bf04d2a3cf4a 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -338,11 +338,11 @@ static int io[HISAX_MAX_CARDS] = { 0, };
338#define IO0_IO1 338#define IO0_IO1
339#endif 339#endif
340#ifdef IO0_IO1 340#ifdef IO0_IO1
341static int io0[HISAX_MAX_CARDS] __devinitdata = { 0, }; 341static int io0[HISAX_MAX_CARDS] = { 0, };
342static int io1[HISAX_MAX_CARDS] __devinitdata = { 0, }; 342static int io1[HISAX_MAX_CARDS] = { 0, };
343#endif 343#endif
344static int irq[HISAX_MAX_CARDS] __devinitdata = { 0, }; 344static int irq[HISAX_MAX_CARDS] = { 0, };
345static int mem[HISAX_MAX_CARDS] __devinitdata = { 0, }; 345static int mem[HISAX_MAX_CARDS] = { 0, };
346static char *id = HiSaxID; 346static char *id = HiSaxID;
347 347
348MODULE_DESCRIPTION("ISDN4Linux: Driver for passive ISDN cards"); 348MODULE_DESCRIPTION("ISDN4Linux: Driver for passive ISDN cards");
@@ -852,7 +852,7 @@ static int init_card(struct IsdnCardState *cs)
852 return 3; 852 return 3;
853} 853}
854 854
855static int __devinit hisax_cs_setup_card(struct IsdnCard *card) 855static int hisax_cs_setup_card(struct IsdnCard *card)
856{ 856{
857 int ret; 857 int ret;
858 858
@@ -1171,12 +1171,8 @@ outf_cs:
1171 return 0; 1171 return 0;
1172} 1172}
1173 1173
1174/* Used from an exported function but calls __devinit functions. 1174static int checkcard(int cardnr, char *id, int *busy_flag,
1175 * Tell modpost not to warn (__ref) 1175 struct module *lockowner, hisax_setup_func_t card_setup)
1176 */
1177static int __ref checkcard(int cardnr, char *id, int *busy_flag,
1178 struct module *lockowner,
1179 hisax_setup_func_t card_setup)
1180{ 1176{
1181 int ret; 1177 int ret;
1182 struct IsdnCard *card = cards + cardnr; 1178 struct IsdnCard *card = cards + cardnr;
@@ -1547,9 +1543,7 @@ static void __exit HiSax_exit(void)
1547 printk(KERN_INFO "HiSax module removed\n"); 1543 printk(KERN_INFO "HiSax module removed\n");
1548} 1544}
1549 1545
1550#ifdef CONFIG_HOTPLUG 1546int hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard *card)
1551
1552int __devinit hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard *card)
1553{ 1547{
1554 u_char ids[16]; 1548 u_char ids[16];
1555 int ret = -1; 1549 int ret = -1;
@@ -1568,9 +1562,7 @@ int __devinit hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard *
1568error: 1562error:
1569 return ret; 1563 return ret;
1570} 1564}
1571
1572EXPORT_SYMBOL(hisax_init_pcmcia); 1565EXPORT_SYMBOL(hisax_init_pcmcia);
1573#endif
1574 1566
1575EXPORT_SYMBOL(HiSax_closecard); 1567EXPORT_SYMBOL(HiSax_closecard);
1576 1568
@@ -1917,7 +1909,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
1917#ifdef CONFIG_PCI 1909#ifdef CONFIG_PCI
1918#include <linux/pci.h> 1910#include <linux/pci.h>
1919 1911
1920static struct pci_device_id hisax_pci_tbl[] __devinitdata __used = { 1912static struct pci_device_id hisax_pci_tbl[] __used = {
1921#ifdef CONFIG_HISAX_FRITZPCI 1913#ifdef CONFIG_HISAX_FRITZPCI
1922 {PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) }, 1914 {PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) },
1923#endif 1915#endif
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
index 62a2945fa7f2..8d0cf6e4dc00 100644
--- a/drivers/isdn/hisax/diva.c
+++ b/drivers/isdn/hisax/diva.c
@@ -904,7 +904,7 @@ Diva_card_msg(struct IsdnCardState *cs, int mt, void *arg)
904 return (0); 904 return (0);
905} 905}
906 906
907static int __devinit setup_diva_common(struct IsdnCardState *cs) 907static int setup_diva_common(struct IsdnCardState *cs)
908{ 908{
909 int bytecnt; 909 int bytecnt;
910 u_char val; 910 u_char val;
@@ -997,7 +997,7 @@ static int __devinit setup_diva_common(struct IsdnCardState *cs)
997 997
998#ifdef CONFIG_ISA 998#ifdef CONFIG_ISA
999 999
1000static int __devinit setup_diva_isa(struct IsdnCard *card) 1000static int setup_diva_isa(struct IsdnCard *card)
1001{ 1001{
1002 struct IsdnCardState *cs = card->cs; 1002 struct IsdnCardState *cs = card->cs;
1003 u_char val; 1003 u_char val;
@@ -1033,7 +1033,7 @@ static int __devinit setup_diva_isa(struct IsdnCard *card)
1033 1033
1034#else /* if !CONFIG_ISA */ 1034#else /* if !CONFIG_ISA */
1035 1035
1036static int __devinit setup_diva_isa(struct IsdnCard *card) 1036static int setup_diva_isa(struct IsdnCard *card)
1037{ 1037{
1038 return (-1); /* card not found; continue search */ 1038 return (-1); /* card not found; continue search */
1039} 1039}
@@ -1041,7 +1041,7 @@ static int __devinit setup_diva_isa(struct IsdnCard *card)
1041#endif /* CONFIG_ISA */ 1041#endif /* CONFIG_ISA */
1042 1042
1043#ifdef __ISAPNP__ 1043#ifdef __ISAPNP__
1044static struct isapnp_device_id diva_ids[] __devinitdata = { 1044static struct isapnp_device_id diva_ids[] = {
1045 { ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51), 1045 { ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51),
1046 ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51), 1046 ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51),
1047 (unsigned long) "Diva picola" }, 1047 (unsigned long) "Diva picola" },
@@ -1063,10 +1063,10 @@ static struct isapnp_device_id diva_ids[] __devinitdata = {
1063 { 0, } 1063 { 0, }
1064}; 1064};
1065 1065
1066static struct isapnp_device_id *ipid __devinitdata = &diva_ids[0]; 1066static struct isapnp_device_id *ipid = &diva_ids[0];
1067static struct pnp_card *pnp_c __devinitdata = NULL; 1067static struct pnp_card *pnp_c = NULL;
1068 1068
1069static int __devinit setup_diva_isapnp(struct IsdnCard *card) 1069static int setup_diva_isapnp(struct IsdnCard *card)
1070{ 1070{
1071 struct IsdnCardState *cs = card->cs; 1071 struct IsdnCardState *cs = card->cs;
1072 struct pnp_dev *pnp_d; 1072 struct pnp_dev *pnp_d;
@@ -1141,7 +1141,7 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card)
1141 1141
1142#else /* if !ISAPNP */ 1142#else /* if !ISAPNP */
1143 1143
1144static int __devinit setup_diva_isapnp(struct IsdnCard *card) 1144static int setup_diva_isapnp(struct IsdnCard *card)
1145{ 1145{
1146 return (-1); /* card not found; continue search */ 1146 return (-1); /* card not found; continue search */
1147} 1147}
@@ -1149,12 +1149,12 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card)
1149#endif /* ISAPNP */ 1149#endif /* ISAPNP */
1150 1150
1151#ifdef CONFIG_PCI 1151#ifdef CONFIG_PCI
1152static struct pci_dev *dev_diva __devinitdata = NULL; 1152static struct pci_dev *dev_diva = NULL;
1153static struct pci_dev *dev_diva_u __devinitdata = NULL; 1153static struct pci_dev *dev_diva_u = NULL;
1154static struct pci_dev *dev_diva201 __devinitdata = NULL; 1154static struct pci_dev *dev_diva201 = NULL;
1155static struct pci_dev *dev_diva202 __devinitdata = NULL; 1155static struct pci_dev *dev_diva202 = NULL;
1156 1156
1157static int __devinit setup_diva_pci(struct IsdnCard *card) 1157static int setup_diva_pci(struct IsdnCard *card)
1158{ 1158{
1159 struct IsdnCardState *cs = card->cs; 1159 struct IsdnCardState *cs = card->cs;
1160 1160
@@ -1231,15 +1231,14 @@ static int __devinit setup_diva_pci(struct IsdnCard *card)
1231 1231
1232#else /* if !CONFIG_PCI */ 1232#else /* if !CONFIG_PCI */
1233 1233
1234static int __devinit setup_diva_pci(struct IsdnCard *card) 1234static int setup_diva_pci(struct IsdnCard *card)
1235{ 1235{
1236 return (-1); /* card not found; continue search */ 1236 return (-1); /* card not found; continue search */
1237} 1237}
1238 1238
1239#endif /* CONFIG_PCI */ 1239#endif /* CONFIG_PCI */
1240 1240
1241int __devinit 1241int setup_diva(struct IsdnCard *card)
1242setup_diva(struct IsdnCard *card)
1243{ 1242{
1244 int rc, have_card = 0; 1243 int rc, have_card = 0;
1245 struct IsdnCardState *cs = card->cs; 1244 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
index 64ba26a4afe6..1df6f9a56ca2 100644
--- a/drivers/isdn/hisax/elsa.c
+++ b/drivers/isdn/hisax/elsa.c
@@ -831,8 +831,7 @@ probe_elsa(struct IsdnCardState *cs)
831 return (CARD_portlist[i]); 831 return (CARD_portlist[i]);
832} 832}
833 833
834static int __devinit 834static int setup_elsa_isa(struct IsdnCard *card)
835setup_elsa_isa(struct IsdnCard *card)
836{ 835{
837 struct IsdnCardState *cs = card->cs; 836 struct IsdnCardState *cs = card->cs;
838 u_char val; 837 u_char val;
@@ -902,7 +901,7 @@ setup_elsa_isa(struct IsdnCard *card)
902} 901}
903 902
904#ifdef __ISAPNP__ 903#ifdef __ISAPNP__
905static struct isapnp_device_id elsa_ids[] __devinitdata = { 904static struct isapnp_device_id elsa_ids[] = {
906 { ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133), 905 { ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133),
907 ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133), 906 ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133),
908 (unsigned long) "Elsa QS1000" }, 907 (unsigned long) "Elsa QS1000" },
@@ -912,12 +911,11 @@ static struct isapnp_device_id elsa_ids[] __devinitdata = {
912 { 0, } 911 { 0, }
913}; 912};
914 913
915static struct isapnp_device_id *ipid __devinitdata = &elsa_ids[0]; 914static struct isapnp_device_id *ipid = &elsa_ids[0];
916static struct pnp_card *pnp_c __devinitdata = NULL; 915static struct pnp_card *pnp_c = NULL;
917#endif /* __ISAPNP__ */ 916#endif /* __ISAPNP__ */
918 917
919static int __devinit 918static int setup_elsa_isapnp(struct IsdnCard *card)
920setup_elsa_isapnp(struct IsdnCard *card)
921{ 919{
922 struct IsdnCardState *cs = card->cs; 920 struct IsdnCardState *cs = card->cs;
923 921
@@ -994,8 +992,7 @@ setup_elsa_isapnp(struct IsdnCard *card)
994 return (1); 992 return (1);
995} 993}
996 994
997static void __devinit 995static void setup_elsa_pcmcia(struct IsdnCard *card)
998setup_elsa_pcmcia(struct IsdnCard *card)
999{ 996{
1000 struct IsdnCardState *cs = card->cs; 997 struct IsdnCardState *cs = card->cs;
1001 u_char val; 998 u_char val;
@@ -1027,11 +1024,10 @@ setup_elsa_pcmcia(struct IsdnCard *card)
1027} 1024}
1028 1025
1029#ifdef CONFIG_PCI 1026#ifdef CONFIG_PCI
1030static struct pci_dev *dev_qs1000 __devinitdata = NULL; 1027static struct pci_dev *dev_qs1000 = NULL;
1031static struct pci_dev *dev_qs3000 __devinitdata = NULL; 1028static struct pci_dev *dev_qs3000 = NULL;
1032 1029
1033static int __devinit 1030static int setup_elsa_pci(struct IsdnCard *card)
1034setup_elsa_pci(struct IsdnCard *card)
1035{ 1031{
1036 struct IsdnCardState *cs = card->cs; 1032 struct IsdnCardState *cs = card->cs;
1037 1033
@@ -1089,15 +1085,13 @@ setup_elsa_pci(struct IsdnCard *card)
1089 1085
1090#else 1086#else
1091 1087
1092static int __devinit 1088static int setup_elsa_pci(struct IsdnCard *card)
1093setup_elsa_pci(struct IsdnCard *card)
1094{ 1089{
1095 return (1); 1090 return (1);
1096} 1091}
1097#endif /* CONFIG_PCI */ 1092#endif /* CONFIG_PCI */
1098 1093
1099static int __devinit 1094static int setup_elsa_common(struct IsdnCard *card)
1100setup_elsa_common(struct IsdnCard *card)
1101{ 1095{
1102 struct IsdnCardState *cs = card->cs; 1096 struct IsdnCardState *cs = card->cs;
1103 u_char val; 1097 u_char val;
@@ -1212,8 +1206,7 @@ setup_elsa_common(struct IsdnCard *card)
1212 return (1); 1206 return (1);
1213} 1207}
1214 1208
1215int __devinit 1209int setup_elsa(struct IsdnCard *card)
1216setup_elsa(struct IsdnCard *card)
1217{ 1210{
1218 int rc; 1211 int rc;
1219 struct IsdnCardState *cs = card->cs; 1212 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index a8c4d3fc9a6d..ebe56918f6fc 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -62,9 +62,9 @@ MODULE_LICENSE("Dual MPL/GPL");
62static int protocol = 2; /* EURO-ISDN Default */ 62static int protocol = 2; /* EURO-ISDN Default */
63module_param(protocol, int, 0); 63module_param(protocol, int, 0);
64 64
65static int elsa_cs_config(struct pcmcia_device *link) __devinit; 65static int elsa_cs_config(struct pcmcia_device *link);
66static void elsa_cs_release(struct pcmcia_device *link); 66static void elsa_cs_release(struct pcmcia_device *link);
67static void elsa_cs_detach(struct pcmcia_device *p_dev) __devexit; 67static void elsa_cs_detach(struct pcmcia_device *p_dev);
68 68
69typedef struct local_info_t { 69typedef struct local_info_t {
70 struct pcmcia_device *p_dev; 70 struct pcmcia_device *p_dev;
@@ -72,7 +72,7 @@ typedef struct local_info_t {
72 int cardnr; 72 int cardnr;
73} local_info_t; 73} local_info_t;
74 74
75static int __devinit elsa_cs_probe(struct pcmcia_device *link) 75static int elsa_cs_probe(struct pcmcia_device *link)
76{ 76{
77 local_info_t *local; 77 local_info_t *local;
78 78
@@ -90,7 +90,7 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link)
90 return elsa_cs_config(link); 90 return elsa_cs_config(link);
91} /* elsa_cs_attach */ 91} /* elsa_cs_attach */
92 92
93static void __devexit elsa_cs_detach(struct pcmcia_device *link) 93static void elsa_cs_detach(struct pcmcia_device *link)
94{ 94{
95 local_info_t *info = link->priv; 95 local_info_t *info = link->priv;
96 96
@@ -126,7 +126,7 @@ static int elsa_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
126 return -ENODEV; 126 return -ENODEV;
127} 127}
128 128
129static int __devinit elsa_cs_config(struct pcmcia_device *link) 129static int elsa_cs_config(struct pcmcia_device *link)
130{ 130{
131 int i; 131 int i;
132 IsdnCard_t icard; 132 IsdnCard_t icard;
@@ -210,7 +210,7 @@ static struct pcmcia_driver elsa_cs_driver = {
210 .owner = THIS_MODULE, 210 .owner = THIS_MODULE,
211 .name = "elsa_cs", 211 .name = "elsa_cs",
212 .probe = elsa_cs_probe, 212 .probe = elsa_cs_probe,
213 .remove = __devexit_p(elsa_cs_detach), 213 .remove = elsa_cs_detach,
214 .id_table = elsa_ids, 214 .id_table = elsa_ids,
215 .suspend = elsa_suspend, 215 .suspend = elsa_suspend,
216 .resume = elsa_resume, 216 .resume = elsa_resume,
diff --git a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c
index b1e38b54ebac..e8d431a8302d 100644
--- a/drivers/isdn/hisax/enternow_pci.c
+++ b/drivers/isdn/hisax/enternow_pci.c
@@ -300,8 +300,7 @@ enpci_interrupt(int intno, void *dev_id)
300 return IRQ_HANDLED; 300 return IRQ_HANDLED;
301} 301}
302 302
303static int __devinit en_pci_probe(struct pci_dev *dev_netjet, 303static int en_pci_probe(struct pci_dev *dev_netjet, struct IsdnCardState *cs)
304 struct IsdnCardState *cs)
305{ 304{
306 if (pci_enable_device(dev_netjet)) 305 if (pci_enable_device(dev_netjet))
307 return (0); 306 return (0);
@@ -326,8 +325,7 @@ static int __devinit en_pci_probe(struct pci_dev *dev_netjet,
326 return (1); 325 return (1);
327} 326}
328 327
329static void __devinit en_cs_init(struct IsdnCard *card, 328static void en_cs_init(struct IsdnCard *card, struct IsdnCardState *cs)
330 struct IsdnCardState *cs)
331{ 329{
332 cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; 330 cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA;
333 cs->hw.njet.isac = cs->hw.njet.base + 0xC0; // Fenster zum AMD 331 cs->hw.njet.isac = cs->hw.njet.base + 0xC0; // Fenster zum AMD
@@ -350,8 +348,7 @@ static void __devinit en_cs_init(struct IsdnCard *card,
350 outb(cs->hw.njet.auxd, cs->hw.njet.auxa); 348 outb(cs->hw.njet.auxd, cs->hw.njet.auxa);
351} 349}
352 350
353static int __devinit en_cs_init_rest(struct IsdnCard *card, 351static int en_cs_init_rest(struct IsdnCard *card, struct IsdnCardState *cs)
354 struct IsdnCardState *cs)
355{ 352{
356 const int bytecnt = 256; 353 const int bytecnt = 256;
357 354
@@ -384,11 +381,10 @@ static int __devinit en_cs_init_rest(struct IsdnCard *card,
384 return (1); 381 return (1);
385} 382}
386 383
387static struct pci_dev *dev_netjet __devinitdata = NULL; 384static struct pci_dev *dev_netjet = NULL;
388 385
389/* called by config.c */ 386/* called by config.c */
390int __devinit 387int setup_enternow_pci(struct IsdnCard *card)
391setup_enternow_pci(struct IsdnCard *card)
392{ 388{
393 int ret; 389 int ret;
394 struct IsdnCardState *cs = card->cs; 390 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c
index 4fef77562554..35c6df6534ec 100644
--- a/drivers/isdn/hisax/gazel.c
+++ b/drivers/isdn/hisax/gazel.c
@@ -483,8 +483,7 @@ error:
483 return 1; 483 return 1;
484} 484}
485 485
486static int __devinit 486static int setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs)
487setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs)
488{ 487{
489 printk(KERN_INFO "Gazel: ISA PnP card automatic recognition\n"); 488 printk(KERN_INFO "Gazel: ISA PnP card automatic recognition\n");
490 // we got an irq parameter, assume it is an ISA card 489 // we got an irq parameter, assume it is an ISA card
@@ -532,10 +531,9 @@ setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs)
532} 531}
533 532
534#ifdef CONFIG_PCI 533#ifdef CONFIG_PCI
535static struct pci_dev *dev_tel __devinitdata = NULL; 534static struct pci_dev *dev_tel = NULL;
536 535
537static int __devinit 536static int setup_gazelpci(struct IsdnCardState *cs)
538setup_gazelpci(struct IsdnCardState *cs)
539{ 537{
540 u_int pci_ioaddr0 = 0, pci_ioaddr1 = 0; 538 u_int pci_ioaddr0 = 0, pci_ioaddr1 = 0;
541 u_char pci_irq = 0, found; 539 u_char pci_irq = 0, found;
@@ -622,8 +620,7 @@ setup_gazelpci(struct IsdnCardState *cs)
622} 620}
623#endif /* CONFIG_PCI */ 621#endif /* CONFIG_PCI */
624 622
625int __devinit 623int setup_gazel(struct IsdnCard *card)
626setup_gazel(struct IsdnCard *card)
627{ 624{
628 struct IsdnCardState *cs = card->cs; 625 struct IsdnCardState *cs = card->cs;
629 char tmp[64]; 626 char tmp[64];
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
index dea04de8e7ca..c49c294fc81e 100644
--- a/drivers/isdn/hisax/hfc4s8s_l1.c
+++ b/drivers/isdn/hisax/hfc4s8s_l1.c
@@ -1497,7 +1497,7 @@ enable_pci_ports(hfc4s8s_hw *hw)
1497/* initialise the HFC-4s/8s hardware */ 1497/* initialise the HFC-4s/8s hardware */
1498/* return 0 on success. */ 1498/* return 0 on success. */
1499/*************************************/ 1499/*************************************/
1500static int __devinit 1500static int
1501setup_instance(hfc4s8s_hw *hw) 1501setup_instance(hfc4s8s_hw *hw)
1502{ 1502{
1503 int err = -EIO; 1503 int err = -EIO;
@@ -1585,7 +1585,7 @@ out:
1585/*****************************************/ 1585/*****************************************/
1586/* PCI hotplug interface: probe new card */ 1586/* PCI hotplug interface: probe new card */
1587/*****************************************/ 1587/*****************************************/
1588static int __devinit 1588static int
1589hfc4s8s_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 1589hfc4s8s_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1590{ 1590{
1591 int err = -ENOMEM; 1591 int err = -ENOMEM;
@@ -1640,7 +1640,7 @@ out:
1640/**************************************/ 1640/**************************************/
1641/* PCI hotplug interface: remove card */ 1641/* PCI hotplug interface: remove card */
1642/**************************************/ 1642/**************************************/
1643static void __devexit 1643static void
1644hfc4s8s_remove(struct pci_dev *pdev) 1644hfc4s8s_remove(struct pci_dev *pdev)
1645{ 1645{
1646 hfc4s8s_hw *hw = pci_get_drvdata(pdev); 1646 hfc4s8s_hw *hw = pci_get_drvdata(pdev);
@@ -1662,7 +1662,7 @@ hfc4s8s_remove(struct pci_dev *pdev)
1662static struct pci_driver hfc4s8s_driver = { 1662static struct pci_driver hfc4s8s_driver = {
1663 .name = "hfc4s8s_l1", 1663 .name = "hfc4s8s_l1",
1664 .probe = hfc4s8s_probe, 1664 .probe = hfc4s8s_probe,
1665 .remove = __devexit_p(hfc4s8s_remove), 1665 .remove = hfc4s8s_remove,
1666 .id_table = hfc4s8s_ids, 1666 .id_table = hfc4s8s_ids,
1667}; 1667};
1668 1668
@@ -1688,14 +1688,6 @@ hfc4s8s_module_init(void)
1688 } 1688 }
1689 printk(KERN_INFO "HFC-4S/8S: found %d cards\n", card_cnt); 1689 printk(KERN_INFO "HFC-4S/8S: found %d cards\n", card_cnt);
1690 1690
1691#if !defined(CONFIG_HOTPLUG)
1692 if (err == 0) {
1693 err = -ENODEV;
1694 pci_unregister_driver(&hfc4s8s_driver);
1695 goto out;
1696 }
1697#endif
1698
1699 return 0; 1691 return 0;
1700out: 1692out:
1701 return (err); 1693 return (err);
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index f60d4be58941..3ccd724ff8c2 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -1632,9 +1632,9 @@ hfcpci_card_msg(struct IsdnCardState *cs, int mt, void *arg)
1632 1632
1633 1633
1634/* this variable is used as card index when more than one cards are present */ 1634/* this variable is used as card index when more than one cards are present */
1635static struct pci_dev *dev_hfcpci __devinitdata = NULL; 1635static struct pci_dev *dev_hfcpci = NULL;
1636 1636
1637int __devinit 1637int
1638setup_hfcpci(struct IsdnCard *card) 1638setup_hfcpci(struct IsdnCard *card)
1639{ 1639{
1640 u_long flags; 1640 u_long flags;
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
index 4ec279ce052f..90f34ae2b80f 100644
--- a/drivers/isdn/hisax/hfc_sx.c
+++ b/drivers/isdn/hisax/hfc_sx.c
@@ -1381,19 +1381,18 @@ hfcsx_card_msg(struct IsdnCardState *cs, int mt, void *arg)
1381} 1381}
1382 1382
1383#ifdef __ISAPNP__ 1383#ifdef __ISAPNP__
1384static struct isapnp_device_id hfc_ids[] __devinitdata = { 1384static struct isapnp_device_id hfc_ids[] = {
1385 { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620), 1385 { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620),
1386 ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620), 1386 ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620),
1387 (unsigned long) "Teles 16.3c2" }, 1387 (unsigned long) "Teles 16.3c2" },
1388 { 0, } 1388 { 0, }
1389}; 1389};
1390 1390
1391static struct isapnp_device_id *ipid __devinitdata = &hfc_ids[0]; 1391static struct isapnp_device_id *ipid = &hfc_ids[0];
1392static struct pnp_card *pnp_c __devinitdata = NULL; 1392static struct pnp_card *pnp_c = NULL;
1393#endif 1393#endif
1394 1394
1395int __devinit 1395int setup_hfcsx(struct IsdnCard *card)
1396setup_hfcsx(struct IsdnCard *card)
1397{ 1396{
1398 struct IsdnCardState *cs = card->cs; 1397 struct IsdnCardState *cs = card->cs;
1399 char tmp[64]; 1398 char tmp[64];
diff --git a/drivers/isdn/hisax/hfcscard.c b/drivers/isdn/hisax/hfcscard.c
index a5f048bd2bb3..394da646e97b 100644
--- a/drivers/isdn/hisax/hfcscard.c
+++ b/drivers/isdn/hisax/hfcscard.c
@@ -136,7 +136,7 @@ hfcs_card_msg(struct IsdnCardState *cs, int mt, void *arg)
136} 136}
137 137
138#ifdef __ISAPNP__ 138#ifdef __ISAPNP__
139static struct isapnp_device_id hfc_ids[] __devinitdata = { 139static struct isapnp_device_id hfc_ids[] = {
140 { ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114), 140 { ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114),
141 ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114), 141 ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114),
142 (unsigned long) "Acer P10" }, 142 (unsigned long) "Acer P10" },
@@ -161,12 +161,11 @@ static struct isapnp_device_id hfc_ids[] __devinitdata = {
161 { 0, } 161 { 0, }
162}; 162};
163 163
164static struct isapnp_device_id *ipid __devinitdata = &hfc_ids[0]; 164static struct isapnp_device_id *ipid = &hfc_ids[0];
165static struct pnp_card *pnp_c __devinitdata = NULL; 165static struct pnp_card *pnp_c = NULL;
166#endif 166#endif
167 167
168int __devinit 168int setup_hfcs(struct IsdnCard *card)
169setup_hfcs(struct IsdnCard *card)
170{ 169{
171 struct IsdnCardState *cs = card->cs; 170 struct IsdnCardState *cs = card->cs;
172 char tmp[64]; 171 char tmp[64];
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
index e4f47fe3f7fd..5e8a5d967162 100644
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -70,7 +70,7 @@ static struct pci_device_id fcpci_ids[] = {
70MODULE_DEVICE_TABLE(pci, fcpci_ids); 70MODULE_DEVICE_TABLE(pci, fcpci_ids);
71 71
72#ifdef CONFIG_PNP 72#ifdef CONFIG_PNP
73static struct pnp_device_id fcpnp_ids[] __devinitdata = { 73static struct pnp_device_id fcpnp_ids[] = {
74 { 74 {
75 .id = "AVM0900", 75 .id = "AVM0900",
76 .driver_data = (unsigned long) "Fritz!Card PnP", 76 .driver_data = (unsigned long) "Fritz!Card PnP",
@@ -712,7 +712,7 @@ static inline void fcpci_init(struct fritz_adapter *adapter)
712 712
713// ---------------------------------------------------------------------- 713// ----------------------------------------------------------------------
714 714
715static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter) 715static int fcpcipnp_setup(struct fritz_adapter *adapter)
716{ 716{
717 u32 val = 0; 717 u32 val = 0;
718 int retval; 718 int retval;
@@ -825,7 +825,7 @@ err:
825 return retval; 825 return retval;
826} 826}
827 827
828static void __devexit fcpcipnp_release(struct fritz_adapter *adapter) 828static void fcpcipnp_release(struct fritz_adapter *adapter)
829{ 829{
830 DBG(1, ""); 830 DBG(1, "");
831 831
@@ -836,8 +836,7 @@ static void __devexit fcpcipnp_release(struct fritz_adapter *adapter)
836 836
837// ---------------------------------------------------------------------- 837// ----------------------------------------------------------------------
838 838
839static struct fritz_adapter * __devinit 839static struct fritz_adapter *new_adapter(void)
840new_adapter(void)
841{ 840{
842 struct fritz_adapter *adapter; 841 struct fritz_adapter *adapter;
843 struct hisax_b_if *b_if[2]; 842 struct hisax_b_if *b_if[2];
@@ -876,8 +875,7 @@ static void delete_adapter(struct fritz_adapter *adapter)
876 kfree(adapter); 875 kfree(adapter);
877} 876}
878 877
879static int __devinit fcpci_probe(struct pci_dev *pdev, 878static int fcpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
880 const struct pci_device_id *ent)
881{ 879{
882 struct fritz_adapter *adapter; 880 struct fritz_adapter *adapter;
883 int retval; 881 int retval;
@@ -917,7 +915,7 @@ err:
917} 915}
918 916
919#ifdef CONFIG_PNP 917#ifdef CONFIG_PNP
920static int __devinit fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) 918static int fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id)
921{ 919{
922 struct fritz_adapter *adapter; 920 struct fritz_adapter *adapter;
923 int retval; 921 int retval;
@@ -959,7 +957,7 @@ err:
959 return retval; 957 return retval;
960} 958}
961 959
962static void __devexit fcpnp_remove(struct pnp_dev *pdev) 960static void fcpnp_remove(struct pnp_dev *pdev)
963{ 961{
964 struct fritz_adapter *adapter = pnp_get_drvdata(pdev); 962 struct fritz_adapter *adapter = pnp_get_drvdata(pdev);
965 963
@@ -973,12 +971,12 @@ static void __devexit fcpnp_remove(struct pnp_dev *pdev)
973static struct pnp_driver fcpnp_driver = { 971static struct pnp_driver fcpnp_driver = {
974 .name = "fcpnp", 972 .name = "fcpnp",
975 .probe = fcpnp_probe, 973 .probe = fcpnp_probe,
976 .remove = __devexit_p(fcpnp_remove), 974 .remove = fcpnp_remove,
977 .id_table = fcpnp_ids, 975 .id_table = fcpnp_ids,
978}; 976};
979#endif 977#endif
980 978
981static void __devexit fcpci_remove(struct pci_dev *pdev) 979static void fcpci_remove(struct pci_dev *pdev)
982{ 980{
983 struct fritz_adapter *adapter = pci_get_drvdata(pdev); 981 struct fritz_adapter *adapter = pci_get_drvdata(pdev);
984 982
@@ -990,7 +988,7 @@ static void __devexit fcpci_remove(struct pci_dev *pdev)
990static struct pci_driver fcpci_driver = { 988static struct pci_driver fcpci_driver = {
991 .name = "fcpci", 989 .name = "fcpci",
992 .probe = fcpci_probe, 990 .probe = fcpci_probe,
993 .remove = __devexit_p(fcpci_remove), 991 .remove = fcpci_remove,
994 .id_table = fcpci_ids, 992 .id_table = fcpci_ids,
995}; 993};
996 994
diff --git a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c
index 7be762b17c70..db5321f6379b 100644
--- a/drivers/isdn/hisax/icc.c
+++ b/drivers/isdn/hisax/icc.c
@@ -673,8 +673,7 @@ clear_pending_icc_ints(struct IsdnCardState *cs)
673 cs->writeisac(cs, ICC_MASK, 0xFF); 673 cs->writeisac(cs, ICC_MASK, 0xFF);
674} 674}
675 675
676void __devinit 676void setup_icc(struct IsdnCardState *cs)
677setup_icc(struct IsdnCardState *cs)
678{ 677{
679 INIT_WORK(&cs->tqueue, icc_bh); 678 INIT_WORK(&cs->tqueue, icc_bh);
680 cs->dbusytimer.function = (void *) dbusy_timer_handler; 679 cs->dbusytimer.function = (void *) dbusy_timer_handler;
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
index bcd70a387307..a365ccc1c99c 100644
--- a/drivers/isdn/hisax/isac.c
+++ b/drivers/isdn/hisax/isac.c
@@ -24,11 +24,11 @@
24#define DBUSY_TIMER_VALUE 80 24#define DBUSY_TIMER_VALUE 80
25#define ARCOFI_USE 1 25#define ARCOFI_USE 1
26 26
27static char *ISACVer[] __devinitdata = 27static char *ISACVer[] =
28{"2086/2186 V1.1", "2085 B1", "2085 B2", 28{"2086/2186 V1.1", "2085 B1", "2085 B2",
29 "2085 V2.3"}; 29 "2085 V2.3"};
30 30
31void __devinit ISACVersion(struct IsdnCardState *cs, char *s) 31void ISACVersion(struct IsdnCardState *cs, char *s)
32{ 32{
33 int val; 33 int val;
34 34
@@ -669,8 +669,7 @@ void clear_pending_isac_ints(struct IsdnCardState *cs)
669 cs->writeisac(cs, ISAC_MASK, 0xFF); 669 cs->writeisac(cs, ISAC_MASK, 0xFF);
670} 670}
671 671
672void __devinit 672void setup_isac(struct IsdnCardState *cs)
673setup_isac(struct IsdnCardState *cs)
674{ 673{
675 INIT_WORK(&cs->tqueue, isac_bh); 674 INIT_WORK(&cs->tqueue, isac_bh);
676 cs->dbusytimer.function = (void *) dbusy_timer_handler; 675 cs->dbusytimer.function = (void *) dbusy_timer_handler;
diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
index c1530fe248c2..1399ddd4f6cb 100644
--- a/drivers/isdn/hisax/isurf.c
+++ b/drivers/isdn/hisax/isurf.c
@@ -194,11 +194,10 @@ isurf_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) {
194} 194}
195 195
196#ifdef __ISAPNP__ 196#ifdef __ISAPNP__
197static struct pnp_card *pnp_c __devinitdata = NULL; 197static struct pnp_card *pnp_c = NULL;
198#endif 198#endif
199 199
200int __devinit 200int setup_isurf(struct IsdnCard *card)
201setup_isurf(struct IsdnCard *card)
202{ 201{
203 int ver; 202 int ver;
204 struct IsdnCardState *cs = card->cs; 203 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/ix1_micro.c b/drivers/isdn/hisax/ix1_micro.c
index 5f299f82b801..7ae39f5e865d 100644
--- a/drivers/isdn/hisax/ix1_micro.c
+++ b/drivers/isdn/hisax/ix1_micro.c
@@ -209,7 +209,7 @@ ix1_card_msg(struct IsdnCardState *cs, int mt, void *arg)
209} 209}
210 210
211#ifdef __ISAPNP__ 211#ifdef __ISAPNP__
212static struct isapnp_device_id itk_ids[] __devinitdata = { 212static struct isapnp_device_id itk_ids[] = {
213 { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), 213 { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25),
214 ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), 214 ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25),
215 (unsigned long) "ITK micro 2" }, 215 (unsigned long) "ITK micro 2" },
@@ -219,13 +219,12 @@ static struct isapnp_device_id itk_ids[] __devinitdata = {
219 { 0, } 219 { 0, }
220}; 220};
221 221
222static struct isapnp_device_id *ipid __devinitdata = &itk_ids[0]; 222static struct isapnp_device_id *ipid = &itk_ids[0];
223static struct pnp_card *pnp_c __devinitdata = NULL; 223static struct pnp_card *pnp_c = NULL;
224#endif 224#endif
225 225
226 226
227int __devinit 227int setup_ix1micro(struct IsdnCard *card)
228setup_ix1micro(struct IsdnCard *card)
229{ 228{
230 struct IsdnCardState *cs = card->cs; 229 struct IsdnCardState *cs = card->cs;
231 char tmp[64]; 230 char tmp[64];
diff --git a/drivers/isdn/hisax/mic.c b/drivers/isdn/hisax/mic.c
index 08a6b7fb17f7..93398676f78f 100644
--- a/drivers/isdn/hisax/mic.c
+++ b/drivers/isdn/hisax/mic.c
@@ -187,8 +187,7 @@ mic_card_msg(struct IsdnCardState *cs, int mt, void *arg)
187 return (0); 187 return (0);
188} 188}
189 189
190int __devinit 190int setup_mic(struct IsdnCard *card)
191setup_mic(struct IsdnCard *card)
192{ 191{
193 int bytecnt; 192 int bytecnt;
194 struct IsdnCardState *cs = card->cs; 193 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c
index 6569e0315cca..e4c33cfe3ef4 100644
--- a/drivers/isdn/hisax/niccy.c
+++ b/drivers/isdn/hisax/niccy.c
@@ -223,10 +223,10 @@ static int niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg)
223} 223}
224 224
225#ifdef __ISAPNP__ 225#ifdef __ISAPNP__
226static struct pnp_card *pnp_c __devinitdata = NULL; 226static struct pnp_card *pnp_c = NULL;
227#endif 227#endif
228 228
229int __devinit setup_niccy(struct IsdnCard *card) 229int setup_niccy(struct IsdnCard *card)
230{ 230{
231 struct IsdnCardState *cs = card->cs; 231 struct IsdnCardState *cs = card->cs;
232 char tmp[64]; 232 char tmp[64];
@@ -298,7 +298,7 @@ int __devinit setup_niccy(struct IsdnCard *card)
298 } 298 }
299 } else { 299 } else {
300#ifdef CONFIG_PCI 300#ifdef CONFIG_PCI
301 static struct pci_dev *niccy_dev __devinitdata; 301 static struct pci_dev *niccy_dev;
302 302
303 u_int pci_ioaddr; 303 u_int pci_ioaddr;
304 cs->subtyp = 0; 304 cs->subtyp = 0;
diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c
index f36ff69c07e1..32b4bbd18eb9 100644
--- a/drivers/isdn/hisax/nj_s.c
+++ b/drivers/isdn/hisax/nj_s.c
@@ -148,8 +148,7 @@ NETjet_S_card_msg(struct IsdnCardState *cs, int mt, void *arg)
148 return (0); 148 return (0);
149} 149}
150 150
151static int __devinit njs_pci_probe(struct pci_dev *dev_netjet, 151static int njs_pci_probe(struct pci_dev *dev_netjet, struct IsdnCardState *cs)
152 struct IsdnCardState *cs)
153{ 152{
154 u32 cfg; 153 u32 cfg;
155 154
@@ -187,8 +186,7 @@ static int __devinit njs_pci_probe(struct pci_dev *dev_netjet,
187 return (1); 186 return (1);
188} 187}
189 188
190static int __devinit njs_cs_init(struct IsdnCard *card, 189static int njs_cs_init(struct IsdnCard *card, struct IsdnCardState *cs)
191 struct IsdnCardState *cs)
192{ 190{
193 191
194 cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; 192 cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA;
@@ -225,8 +223,7 @@ static int __devinit njs_cs_init(struct IsdnCard *card,
225 return 1; /* end loop */ 223 return 1; /* end loop */
226} 224}
227 225
228static int __devinit njs_cs_init_rest(struct IsdnCard *card, 226static int njs_cs_init_rest(struct IsdnCard *card, struct IsdnCardState *cs)
229 struct IsdnCardState *cs)
230{ 227{
231 const int bytecnt = 256; 228 const int bytecnt = 256;
232 229
@@ -256,10 +253,9 @@ static int __devinit njs_cs_init_rest(struct IsdnCard *card,
256 return (1); 253 return (1);
257} 254}
258 255
259static struct pci_dev *dev_netjet __devinitdata = NULL; 256static struct pci_dev *dev_netjet = NULL;
260 257
261int __devinit 258int setup_netjet_s(struct IsdnCard *card)
262setup_netjet_s(struct IsdnCard *card)
263{ 259{
264 int ret; 260 int ret;
265 struct IsdnCardState *cs = card->cs; 261 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c
index 333484aef425..4e8adbede361 100644
--- a/drivers/isdn/hisax/nj_u.c
+++ b/drivers/isdn/hisax/nj_u.c
@@ -128,8 +128,7 @@ NETjet_U_card_msg(struct IsdnCardState *cs, int mt, void *arg)
128 return (0); 128 return (0);
129} 129}
130 130
131static int __devinit nju_pci_probe(struct pci_dev *dev_netjet, 131static int nju_pci_probe(struct pci_dev *dev_netjet, struct IsdnCardState *cs)
132 struct IsdnCardState *cs)
133{ 132{
134 if (pci_enable_device(dev_netjet)) 133 if (pci_enable_device(dev_netjet))
135 return (0); 134 return (0);
@@ -148,8 +147,7 @@ static int __devinit nju_pci_probe(struct pci_dev *dev_netjet,
148 return (1); 147 return (1);
149} 148}
150 149
151static int __devinit nju_cs_init(struct IsdnCard *card, 150static int nju_cs_init(struct IsdnCard *card, struct IsdnCardState *cs)
152 struct IsdnCardState *cs)
153{ 151{
154 cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; 152 cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA;
155 cs->hw.njet.isac = cs->hw.njet.base | NETJET_ISAC_OFF; 153 cs->hw.njet.isac = cs->hw.njet.base | NETJET_ISAC_OFF;
@@ -187,8 +185,7 @@ static int __devinit nju_cs_init(struct IsdnCard *card,
187 return 1; /* end loop */ 185 return 1; /* end loop */
188} 186}
189 187
190static int __devinit nju_cs_init_rest(struct IsdnCard *card, 188static int nju_cs_init_rest(struct IsdnCard *card, struct IsdnCardState *cs)
191 struct IsdnCardState *cs)
192{ 189{
193 const int bytecnt = 256; 190 const int bytecnt = 256;
194 191
@@ -219,10 +216,9 @@ static int __devinit nju_cs_init_rest(struct IsdnCard *card,
219 return (1); 216 return (1);
220} 217}
221 218
222static struct pci_dev *dev_netjet __devinitdata = NULL; 219static struct pci_dev *dev_netjet = NULL;
223 220
224int __devinit 221int setup_netjet_u(struct IsdnCard *card)
225setup_netjet_u(struct IsdnCard *card)
226{ 222{
227 int ret; 223 int ret;
228 struct IsdnCardState *cs = card->cs; 224 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/s0box.c b/drivers/isdn/hisax/s0box.c
index 383c4e7ce50b..4e7d0aa227ad 100644
--- a/drivers/isdn/hisax/s0box.c
+++ b/drivers/isdn/hisax/s0box.c
@@ -210,8 +210,7 @@ S0Box_card_msg(struct IsdnCardState *cs, int mt, void *arg)
210 return (0); 210 return (0);
211} 211}
212 212
213int __devinit 213int setup_s0box(struct IsdnCard *card)
214setup_s0box(struct IsdnCard *card)
215{ 214{
216 struct IsdnCardState *cs = card->cs; 215 struct IsdnCardState *cs = card->cs;
217 char tmp[64]; 216 char tmp[64];
diff --git a/drivers/isdn/hisax/saphir.c b/drivers/isdn/hisax/saphir.c
index 75dcae6d36e0..6b2d0eccdd56 100644
--- a/drivers/isdn/hisax/saphir.c
+++ b/drivers/isdn/hisax/saphir.c
@@ -240,8 +240,7 @@ saphir_card_msg(struct IsdnCardState *cs, int mt, void *arg)
240} 240}
241 241
242 242
243int __devinit 243int setup_saphir(struct IsdnCard *card)
244setup_saphir(struct IsdnCard *card)
245{ 244{
246 struct IsdnCardState *cs = card->cs; 245 struct IsdnCardState *cs = card->cs;
247 char tmp[64]; 246 char tmp[64];
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c
index 1ee531b6be99..f16a47bcef48 100644
--- a/drivers/isdn/hisax/sedlbauer.c
+++ b/drivers/isdn/hisax/sedlbauer.c
@@ -517,7 +517,7 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg)
517} 517}
518 518
519#ifdef __ISAPNP__ 519#ifdef __ISAPNP__
520static struct isapnp_device_id sedl_ids[] __devinitdata = { 520static struct isapnp_device_id sedl_ids[] = {
521 { ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01), 521 { ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01),
522 ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01), 522 ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01),
523 (unsigned long) "Speed win" }, 523 (unsigned long) "Speed win" },
@@ -527,11 +527,10 @@ static struct isapnp_device_id sedl_ids[] __devinitdata = {
527 { 0, } 527 { 0, }
528}; 528};
529 529
530static struct isapnp_device_id *ipid __devinitdata = &sedl_ids[0]; 530static struct isapnp_device_id *ipid = &sedl_ids[0];
531static struct pnp_card *pnp_c __devinitdata = NULL; 531static struct pnp_card *pnp_c = NULL;
532 532
533static int __devinit 533static int setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt)
534setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt)
535{ 534{
536 struct IsdnCardState *cs = card->cs; 535 struct IsdnCardState *cs = card->cs;
537 struct pnp_dev *pnp_d; 536 struct pnp_dev *pnp_d;
@@ -591,18 +590,16 @@ setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt)
591} 590}
592#else 591#else
593 592
594static int __devinit 593static int setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt)
595setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt)
596{ 594{
597 return -1; 595 return -1;
598} 596}
599#endif /* __ISAPNP__ */ 597#endif /* __ISAPNP__ */
600 598
601#ifdef CONFIG_PCI 599#ifdef CONFIG_PCI
602static struct pci_dev *dev_sedl __devinitdata = NULL; 600static struct pci_dev *dev_sedl = NULL;
603 601
604static int __devinit 602static int setup_sedlbauer_pci(struct IsdnCard *card)
605setup_sedlbauer_pci(struct IsdnCard *card)
606{ 603{
607 struct IsdnCardState *cs = card->cs; 604 struct IsdnCardState *cs = card->cs;
608 u16 sub_vendor_id, sub_id; 605 u16 sub_vendor_id, sub_id;
@@ -667,16 +664,14 @@ setup_sedlbauer_pci(struct IsdnCard *card)
667 664
668#else 665#else
669 666
670static int __devinit 667static int setup_sedlbauer_pci(struct IsdnCard *card)
671setup_sedlbauer_pci(struct IsdnCard *card)
672{ 668{
673 return (1); 669 return (1);
674} 670}
675 671
676#endif /* CONFIG_PCI */ 672#endif /* CONFIG_PCI */
677 673
678int __devinit 674int setup_sedlbauer(struct IsdnCard *card)
679setup_sedlbauer(struct IsdnCard *card)
680{ 675{
681 int bytecnt = 8, ver, val, rc; 676 int bytecnt = 8, ver, val, rc;
682 struct IsdnCardState *cs = card->cs; 677 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index f0dfc0c976eb..90f81291641b 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -62,10 +62,10 @@ MODULE_LICENSE("Dual MPL/GPL");
62static int protocol = 2; /* EURO-ISDN Default */ 62static int protocol = 2; /* EURO-ISDN Default */
63module_param(protocol, int, 0); 63module_param(protocol, int, 0);
64 64
65static int sedlbauer_config(struct pcmcia_device *link) __devinit; 65static int sedlbauer_config(struct pcmcia_device *link);
66static void sedlbauer_release(struct pcmcia_device *link); 66static void sedlbauer_release(struct pcmcia_device *link);
67 67
68static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit; 68static void sedlbauer_detach(struct pcmcia_device *p_dev);
69 69
70typedef struct local_info_t { 70typedef struct local_info_t {
71 struct pcmcia_device *p_dev; 71 struct pcmcia_device *p_dev;
@@ -73,7 +73,7 @@ typedef struct local_info_t {
73 int cardnr; 73 int cardnr;
74} local_info_t; 74} local_info_t;
75 75
76static int __devinit sedlbauer_probe(struct pcmcia_device *link) 76static int sedlbauer_probe(struct pcmcia_device *link)
77{ 77{
78 local_info_t *local; 78 local_info_t *local;
79 79
@@ -90,7 +90,7 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link)
90 return sedlbauer_config(link); 90 return sedlbauer_config(link);
91} /* sedlbauer_attach */ 91} /* sedlbauer_attach */
92 92
93static void __devexit sedlbauer_detach(struct pcmcia_device *link) 93static void sedlbauer_detach(struct pcmcia_device *link)
94{ 94{
95 dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link); 95 dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link);
96 96
@@ -110,7 +110,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data)
110 return pcmcia_request_io(p_dev); 110 return pcmcia_request_io(p_dev);
111} 111}
112 112
113static int __devinit sedlbauer_config(struct pcmcia_device *link) 113static int sedlbauer_config(struct pcmcia_device *link)
114{ 114{
115 int ret; 115 int ret;
116 IsdnCard_t icard; 116 IsdnCard_t icard;
@@ -201,7 +201,7 @@ static struct pcmcia_driver sedlbauer_driver = {
201 .owner = THIS_MODULE, 201 .owner = THIS_MODULE,
202 .name = "sedlbauer_cs", 202 .name = "sedlbauer_cs",
203 .probe = sedlbauer_probe, 203 .probe = sedlbauer_probe,
204 .remove = __devexit_p(sedlbauer_detach), 204 .remove = sedlbauer_detach,
205 .id_table = sedlbauer_ids, 205 .id_table = sedlbauer_ids,
206 .suspend = sedlbauer_suspend, 206 .suspend = sedlbauer_suspend,
207 .resume = sedlbauer_resume, 207 .resume = sedlbauer_resume,
diff --git a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c
index 1267298ef551..18cee6360d0a 100644
--- a/drivers/isdn/hisax/sportster.c
+++ b/drivers/isdn/hisax/sportster.c
@@ -183,8 +183,7 @@ Sportster_card_msg(struct IsdnCardState *cs, int mt, void *arg)
183 return (0); 183 return (0);
184} 184}
185 185
186static int __devinit 186static int get_io_range(struct IsdnCardState *cs)
187get_io_range(struct IsdnCardState *cs)
188{ 187{
189 int i, j, adr; 188 int i, j, adr;
190 189
@@ -208,8 +207,7 @@ get_io_range(struct IsdnCardState *cs)
208 } 207 }
209} 208}
210 209
211int __devinit 210int setup_sportster(struct IsdnCard *card)
212setup_sportster(struct IsdnCard *card)
213{ 211{
214 struct IsdnCardState *cs = card->cs; 212 struct IsdnCardState *cs = card->cs;
215 char tmp[64]; 213 char tmp[64];
diff --git a/drivers/isdn/hisax/teleint.c b/drivers/isdn/hisax/teleint.c
index fa329e27cc5b..bf647545c70c 100644
--- a/drivers/isdn/hisax/teleint.c
+++ b/drivers/isdn/hisax/teleint.c
@@ -259,8 +259,7 @@ TeleInt_card_msg(struct IsdnCardState *cs, int mt, void *arg)
259 return (0); 259 return (0);
260} 260}
261 261
262int __devinit 262int setup_TeleInt(struct IsdnCard *card)
263setup_TeleInt(struct IsdnCard *card)
264{ 263{
265 struct IsdnCardState *cs = card->cs; 264 struct IsdnCardState *cs = card->cs;
266 char tmp[64]; 265 char tmp[64];
diff --git a/drivers/isdn/hisax/teles0.c b/drivers/isdn/hisax/teles0.c
index 49b4a26f91e0..ce9eabdd2f6e 100644
--- a/drivers/isdn/hisax/teles0.c
+++ b/drivers/isdn/hisax/teles0.c
@@ -263,8 +263,7 @@ Teles_card_msg(struct IsdnCardState *cs, int mt, void *arg)
263 return (0); 263 return (0);
264} 264}
265 265
266int __devinit 266int setup_teles0(struct IsdnCard *card)
267setup_teles0(struct IsdnCard *card)
268{ 267{
269 u_char val; 268 u_char val;
270 struct IsdnCardState *cs = card->cs; 269 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c
index 220b919fafc3..38fb2c1a3f0f 100644
--- a/drivers/isdn/hisax/teles3.c
+++ b/drivers/isdn/hisax/teles3.c
@@ -253,7 +253,7 @@ Teles_card_msg(struct IsdnCardState *cs, int mt, void *arg)
253 253
254#ifdef __ISAPNP__ 254#ifdef __ISAPNP__
255 255
256static struct isapnp_device_id teles_ids[] __devinitdata = { 256static struct isapnp_device_id teles_ids[] = {
257 { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), 257 { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110),
258 ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), 258 ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110),
259 (unsigned long) "Teles 16.3 PnP" }, 259 (unsigned long) "Teles 16.3 PnP" },
@@ -266,12 +266,11 @@ static struct isapnp_device_id teles_ids[] __devinitdata = {
266 { 0, } 266 { 0, }
267}; 267};
268 268
269static struct isapnp_device_id *ipid __devinitdata = &teles_ids[0]; 269static struct isapnp_device_id *ipid = &teles_ids[0];
270static struct pnp_card *pnp_c __devinitdata = NULL; 270static struct pnp_card *pnp_c = NULL;
271#endif 271#endif
272 272
273int __devinit 273int setup_teles3(struct IsdnCard *card)
274setup_teles3(struct IsdnCard *card)
275{ 274{
276 u_char val; 275 u_char val;
277 struct IsdnCardState *cs = card->cs; 276 struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index 4deac451807c..f2476ffb04fd 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -43,9 +43,9 @@ MODULE_LICENSE("GPL");
43static int protocol = 2; /* EURO-ISDN Default */ 43static int protocol = 2; /* EURO-ISDN Default */
44module_param(protocol, int, 0); 44module_param(protocol, int, 0);
45 45
46static int teles_cs_config(struct pcmcia_device *link) __devinit; 46static int teles_cs_config(struct pcmcia_device *link);
47static void teles_cs_release(struct pcmcia_device *link); 47static void teles_cs_release(struct pcmcia_device *link);
48static void teles_detach(struct pcmcia_device *p_dev) __devexit; 48static void teles_detach(struct pcmcia_device *p_dev);
49 49
50typedef struct local_info_t { 50typedef struct local_info_t {
51 struct pcmcia_device *p_dev; 51 struct pcmcia_device *p_dev;
@@ -53,7 +53,7 @@ typedef struct local_info_t {
53 int cardnr; 53 int cardnr;
54} local_info_t; 54} local_info_t;
55 55
56static int __devinit teles_probe(struct pcmcia_device *link) 56static int teles_probe(struct pcmcia_device *link)
57{ 57{
58 local_info_t *local; 58 local_info_t *local;
59 59
@@ -72,7 +72,7 @@ static int __devinit teles_probe(struct pcmcia_device *link)
72 return teles_cs_config(link); 72 return teles_cs_config(link);
73} /* teles_attach */ 73} /* teles_attach */
74 74
75static void __devexit teles_detach(struct pcmcia_device *link) 75static void teles_detach(struct pcmcia_device *link)
76{ 76{
77 local_info_t *info = link->priv; 77 local_info_t *info = link->priv;
78 78
@@ -108,7 +108,7 @@ static int teles_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
108 return -ENODEV; 108 return -ENODEV;
109} 109}
110 110
111static int __devinit teles_cs_config(struct pcmcia_device *link) 111static int teles_cs_config(struct pcmcia_device *link)
112{ 112{
113 int i; 113 int i;
114 IsdnCard_t icard; 114 IsdnCard_t icard;
@@ -192,7 +192,7 @@ static struct pcmcia_driver teles_cs_driver = {
192 .owner = THIS_MODULE, 192 .owner = THIS_MODULE,
193 .name = "teles_cs", 193 .name = "teles_cs",
194 .probe = teles_probe, 194 .probe = teles_probe,
195 .remove = __devexit_p(teles_detach), 195 .remove = teles_detach,
196 .id_table = teles_ids, 196 .id_table = teles_ids,
197 .suspend = teles_suspend, 197 .suspend = teles_suspend,
198 .resume = teles_resume, 198 .resume = teles_resume,
diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c
index 9c002c9dc771..f6ab63aa6995 100644
--- a/drivers/isdn/hisax/telespci.c
+++ b/drivers/isdn/hisax/telespci.c
@@ -283,10 +283,9 @@ TelesPCI_card_msg(struct IsdnCardState *cs, int mt, void *arg)
283 return (0); 283 return (0);
284} 284}
285 285
286static struct pci_dev *dev_tel __devinitdata = NULL; 286static struct pci_dev *dev_tel = NULL;
287 287
288int __devinit 288int setup_telespci(struct IsdnCard *card)
289setup_telespci(struct IsdnCard *card)
290{ 289{
291 struct IsdnCardState *cs = card->cs; 290 struct IsdnCardState *cs = card->cs;
292 char tmp[64]; 291 char tmp[64];
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c
index 0f0d094af85b..d8cac6935818 100644
--- a/drivers/isdn/hisax/w6692.c
+++ b/drivers/isdn/hisax/w6692.c
@@ -991,10 +991,9 @@ w6692_card_msg(struct IsdnCardState *cs, int mt, void *arg)
991 991
992static int id_idx; 992static int id_idx;
993 993
994static struct pci_dev *dev_w6692 __devinitdata = NULL; 994static struct pci_dev *dev_w6692 = NULL;
995 995
996int __devinit 996int setup_w6692(struct IsdnCard *card)
997setup_w6692(struct IsdnCard *card)
998{ 997{
999 struct IsdnCardState *cs = card->cs; 998 struct IsdnCardState *cs = card->cs;
1000 char tmp[64]; 999 char tmp[64];
diff --git a/drivers/isdn/hysdn/hysdn_init.c b/drivers/isdn/hysdn/hysdn_init.c
index b61bbb4bb52b..0db2f7506250 100644
--- a/drivers/isdn/hysdn/hysdn_init.c
+++ b/drivers/isdn/hysdn/hysdn_init.c
@@ -56,8 +56,8 @@ static hysdn_card *card_last = NULL; /* pointer to first card */
56/* is assumed and the module will not be kept in memory. */ 56/* is assumed and the module will not be kept in memory. */
57/****************************************************************************/ 57/****************************************************************************/
58 58
59static int __devinit hysdn_pci_init_one(struct pci_dev *akt_pcidev, 59static int hysdn_pci_init_one(struct pci_dev *akt_pcidev,
60 const struct pci_device_id *ent) 60 const struct pci_device_id *ent)
61{ 61{
62 hysdn_card *card; 62 hysdn_card *card;
63 int rc; 63 int rc;
@@ -109,7 +109,7 @@ err_out:
109 return rc; 109 return rc;
110} 110}
111 111
112static void __devexit hysdn_pci_remove_one(struct pci_dev *akt_pcidev) 112static void hysdn_pci_remove_one(struct pci_dev *akt_pcidev)
113{ 113{
114 hysdn_card *card = pci_get_drvdata(akt_pcidev); 114 hysdn_card *card = pci_get_drvdata(akt_pcidev);
115 115
@@ -147,7 +147,7 @@ static struct pci_driver hysdn_pci_driver = {
147 .name = "hysdn", 147 .name = "hysdn",
148 .id_table = hysdn_pci_tbl, 148 .id_table = hysdn_pci_tbl,
149 .probe = hysdn_pci_init_one, 149 .probe = hysdn_pci_init_one,
150 .remove = __devexit_p(hysdn_pci_remove_one), 150 .remove = hysdn_pci_remove_one,
151}; 151};
152 152
153static int hysdn_have_procfs; 153static int hysdn_have_procfs;
diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c
index c401634c00ec..3e245712bba7 100644
--- a/drivers/isdn/mISDN/core.c
+++ b/drivers/isdn/mISDN/core.c
@@ -140,7 +140,6 @@ static struct device_attribute mISDN_dev_attrs[] = {
140 {} 140 {}
141}; 141};
142 142
143#ifdef CONFIG_HOTPLUG
144static int mISDN_uevent(struct device *dev, struct kobj_uevent_env *env) 143static int mISDN_uevent(struct device *dev, struct kobj_uevent_env *env)
145{ 144{
146 struct mISDNdevice *mdev = dev_to_mISDN(dev); 145 struct mISDNdevice *mdev = dev_to_mISDN(dev);
@@ -153,7 +152,6 @@ static int mISDN_uevent(struct device *dev, struct kobj_uevent_env *env)
153 152
154 return 0; 153 return 0;
155} 154}
156#endif
157 155
158static void mISDN_class_release(struct class *cls) 156static void mISDN_class_release(struct class *cls)
159{ 157{
@@ -163,9 +161,7 @@ static void mISDN_class_release(struct class *cls)
163static struct class mISDN_class = { 161static struct class mISDN_class = {
164 .name = "mISDN", 162 .name = "mISDN",
165 .owner = THIS_MODULE, 163 .owner = THIS_MODULE,
166#ifdef CONFIG_HOTPLUG
167 .dev_uevent = mISDN_uevent, 164 .dev_uevent = mISDN_uevent,
168#endif
169 .dev_attrs = mISDN_dev_attrs, 165 .dev_attrs = mISDN_dev_attrs,
170 .dev_release = mISDN_dev_release, 166 .dev_release = mISDN_dev_release,
171 .class_release = mISDN_class_release, 167 .class_release = mISDN_class_release,
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 1885a26776b1..a0d931bcb37c 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -127,8 +127,9 @@ static int create_gpio_led(const struct gpio_led *template,
127 led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME; 127 led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
128 128
129 ret = devm_gpio_request_one(parent, template->gpio, 129 ret = devm_gpio_request_one(parent, template->gpio,
130 GPIOF_DIR_OUT | (led_dat->active_low ^ state), 130 (led_dat->active_low ^ state) ?
131 template->name); 131 GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW,
132 template->name);
132 if (ret < 0) 133 if (ret < 0)
133 return ret; 134 return ret;
134 135
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index ef87310b7662..ac5c87939860 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -679,7 +679,7 @@ void macio_release_resources(struct macio_dev *dev)
679 679
680#ifdef CONFIG_PCI 680#ifdef CONFIG_PCI
681 681
682static int __devinit macio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 682static int macio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
683{ 683{
684 struct device_node* np; 684 struct device_node* np;
685 struct macio_chip* chip; 685 struct macio_chip* chip;
@@ -739,7 +739,7 @@ static int __devinit macio_pci_probe(struct pci_dev *pdev, const struct pci_devi
739 return 0; 739 return 0;
740} 740}
741 741
742static void __devexit macio_pci_remove(struct pci_dev* pdev) 742static void macio_pci_remove(struct pci_dev* pdev)
743{ 743{
744 panic("removing of macio-asic not supported !\n"); 744 panic("removing of macio-asic not supported !\n");
745} 745}
@@ -748,7 +748,7 @@ static void __devexit macio_pci_remove(struct pci_dev* pdev)
748 * MacIO is matched against any Apple ID, it's probe() function 748 * MacIO is matched against any Apple ID, it's probe() function
749 * will then decide wether it applies or not 749 * will then decide wether it applies or not
750 */ 750 */
751static const struct pci_device_id __devinitconst pci_ids[] = { { 751static const struct pci_device_id pci_ids[] = { {
752 .vendor = PCI_VENDOR_ID_APPLE, 752 .vendor = PCI_VENDOR_ID_APPLE,
753 .device = PCI_ANY_ID, 753 .device = PCI_ANY_ID,
754 .subvendor = PCI_ANY_ID, 754 .subvendor = PCI_ANY_ID,
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 3f8d032f180f..d98e566a8f5e 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -556,7 +556,8 @@ static int media_bay_task(void *x)
556 return 0; 556 return 0;
557} 557}
558 558
559static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match) 559static int media_bay_attach(struct macio_dev *mdev,
560 const struct of_device_id *match)
560{ 561{
561 struct media_bay_info* bay; 562 struct media_bay_info* bay;
562 u32 __iomem *regbase; 563 u32 __iomem *regbase;
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
index 6dc26b61219b..cad0e19b47a2 100644
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -253,7 +253,7 @@ static void rackmeter_do_timer(struct work_struct *work)
253 msecs_to_jiffies(CPU_SAMPLING_RATE)); 253 msecs_to_jiffies(CPU_SAMPLING_RATE));
254} 254}
255 255
256static void __devinit rackmeter_init_cpu_sniffer(struct rackmeter *rm) 256static void rackmeter_init_cpu_sniffer(struct rackmeter *rm)
257{ 257{
258 unsigned int cpu; 258 unsigned int cpu;
259 259
@@ -287,7 +287,7 @@ static void rackmeter_stop_cpu_sniffer(struct rackmeter *rm)
287 cancel_delayed_work_sync(&rm->cpu[1].sniffer); 287 cancel_delayed_work_sync(&rm->cpu[1].sniffer);
288} 288}
289 289
290static int __devinit rackmeter_setup(struct rackmeter *rm) 290static int rackmeter_setup(struct rackmeter *rm)
291{ 291{
292 pr_debug("rackmeter: setting up i2s..\n"); 292 pr_debug("rackmeter: setting up i2s..\n");
293 rackmeter_setup_i2s(rm); 293 rackmeter_setup_i2s(rm);
@@ -362,8 +362,8 @@ static irqreturn_t rackmeter_irq(int irq, void *arg)
362 return IRQ_HANDLED; 362 return IRQ_HANDLED;
363} 363}
364 364
365static int __devinit rackmeter_probe(struct macio_dev* mdev, 365static int rackmeter_probe(struct macio_dev* mdev,
366 const struct of_device_id *match) 366 const struct of_device_id *match)
367{ 367{
368 struct device_node *i2s = NULL, *np = NULL; 368 struct device_node *i2s = NULL, *np = NULL;
369 struct rackmeter *rm = NULL; 369 struct rackmeter *rm = NULL;
@@ -521,7 +521,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev,
521 return rc; 521 return rc;
522} 522}
523 523
524static int __devexit rackmeter_remove(struct macio_dev* mdev) 524static int rackmeter_remove(struct macio_dev* mdev)
525{ 525{
526 struct rackmeter *rm = dev_get_drvdata(&mdev->ofdev.dev); 526 struct rackmeter *rm = dev_get_drvdata(&mdev->ofdev.dev);
527 527
@@ -588,7 +588,7 @@ static struct macio_driver rackmeter_driver = {
588 .of_match_table = rackmeter_match, 588 .of_match_table = rackmeter_match,
589 }, 589 },
590 .probe = rackmeter_probe, 590 .probe = rackmeter_probe,
591 .remove = __devexit_p(rackmeter_remove), 591 .remove = rackmeter_remove,
592 .shutdown = rackmeter_shutdown, 592 .shutdown = rackmeter_shutdown,
593}; 593};
594 594
diff --git a/drivers/macintosh/windfarm_ad7417_sensor.c b/drivers/macintosh/windfarm_ad7417_sensor.c
index ac3f243b9c5a..7c28b71246c9 100644
--- a/drivers/macintosh/windfarm_ad7417_sensor.c
+++ b/drivers/macintosh/windfarm_ad7417_sensor.c
@@ -177,9 +177,9 @@ static const struct wf_sensor_ops wf_ad7417_adc_ops = {
177 .owner = THIS_MODULE, 177 .owner = THIS_MODULE,
178}; 178};
179 179
180static void __devinit wf_ad7417_add_sensor(struct wf_ad7417_priv *pv, 180static void wf_ad7417_add_sensor(struct wf_ad7417_priv *pv,
181 int index, const char *name, 181 int index, const char *name,
182 const struct wf_sensor_ops *ops) 182 const struct wf_sensor_ops *ops)
183{ 183{
184 pv->sensors[index].name = kasprintf(GFP_KERNEL, "%s-%d", name, pv->cpu); 184 pv->sensors[index].name = kasprintf(GFP_KERNEL, "%s-%d", name, pv->cpu);
185 pv->sensors[index].priv = pv; 185 pv->sensors[index].priv = pv;
@@ -188,7 +188,7 @@ static void __devinit wf_ad7417_add_sensor(struct wf_ad7417_priv *pv,
188 kref_get(&pv->ref); 188 kref_get(&pv->ref);
189} 189}
190 190
191static void __devinit wf_ad7417_init_chip(struct wf_ad7417_priv *pv) 191static void wf_ad7417_init_chip(struct wf_ad7417_priv *pv)
192{ 192{
193 int rc; 193 int rc;
194 u8 buf[2]; 194 u8 buf[2];
@@ -230,8 +230,8 @@ static void __devinit wf_ad7417_init_chip(struct wf_ad7417_priv *pv)
230 pv->config = config; 230 pv->config = config;
231} 231}
232 232
233static int __devinit wf_ad7417_probe(struct i2c_client *client, 233static int wf_ad7417_probe(struct i2c_client *client,
234 const struct i2c_device_id *id) 234 const struct i2c_device_id *id)
235{ 235{
236 struct wf_ad7417_priv *pv; 236 struct wf_ad7417_priv *pv;
237 const struct mpu_data *mpu; 237 const struct mpu_data *mpu;
@@ -290,7 +290,7 @@ static int __devinit wf_ad7417_probe(struct i2c_client *client,
290 return 0; 290 return 0;
291} 291}
292 292
293static int __devexit wf_ad7417_remove(struct i2c_client *client) 293static int wf_ad7417_remove(struct i2c_client *client)
294{ 294{
295 struct wf_ad7417_priv *pv = dev_get_drvdata(&client->dev); 295 struct wf_ad7417_priv *pv = dev_get_drvdata(&client->dev);
296 int i; 296 int i;
@@ -322,7 +322,7 @@ static struct i2c_driver wf_ad7417_driver = {
322 .id_table = wf_ad7417_id, 322 .id_table = wf_ad7417_id,
323}; 323};
324 324
325static int __devinit wf_ad7417_init(void) 325static int wf_ad7417_init(void)
326{ 326{
327 /* This is only supported on these machines */ 327 /* This is only supported on these machines */
328 if (!of_machine_is_compatible("PowerMac7,2") && 328 if (!of_machine_is_compatible("PowerMac7,2") &&
@@ -333,7 +333,7 @@ static int __devinit wf_ad7417_init(void)
333 return i2c_add_driver(&wf_ad7417_driver); 333 return i2c_add_driver(&wf_ad7417_driver);
334} 334}
335 335
336static void __devexit wf_ad7417_exit(void) 336static void wf_ad7417_exit(void)
337{ 337{
338 i2c_del_driver(&wf_ad7417_driver); 338 i2c_del_driver(&wf_ad7417_driver);
339} 339}
diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c
index fd6ed15a979d..0226b796a21c 100644
--- a/drivers/macintosh/windfarm_fcu_controls.c
+++ b/drivers/macintosh/windfarm_fcu_controls.c
@@ -282,7 +282,7 @@ static const struct wf_control_ops wf_fcu_fan_pwm_ops = {
282 .owner = THIS_MODULE, 282 .owner = THIS_MODULE,
283}; 283};
284 284
285static void __devinit wf_fcu_get_pump_minmax(struct wf_fcu_fan *fan) 285static void wf_fcu_get_pump_minmax(struct wf_fcu_fan *fan)
286{ 286{
287 const struct mpu_data *mpu = wf_get_mpu(0); 287 const struct mpu_data *mpu = wf_get_mpu(0);
288 u16 pump_min = 0, pump_max = 0xffff; 288 u16 pump_min = 0, pump_max = 0xffff;
@@ -317,7 +317,7 @@ static void __devinit wf_fcu_get_pump_minmax(struct wf_fcu_fan *fan)
317 fan->ctrl.name, pump_min, pump_max); 317 fan->ctrl.name, pump_min, pump_max);
318} 318}
319 319
320static void __devinit wf_fcu_get_rpmfan_minmax(struct wf_fcu_fan *fan) 320static void wf_fcu_get_rpmfan_minmax(struct wf_fcu_fan *fan)
321{ 321{
322 struct wf_fcu_priv *pv = fan->fcu_priv; 322 struct wf_fcu_priv *pv = fan->fcu_priv;
323 const struct mpu_data *mpu0 = wf_get_mpu(0); 323 const struct mpu_data *mpu0 = wf_get_mpu(0);
@@ -359,9 +359,8 @@ static void __devinit wf_fcu_get_rpmfan_minmax(struct wf_fcu_fan *fan)
359 fan->ctrl.name, fan->min, fan->max); 359 fan->ctrl.name, fan->min, fan->max);
360} 360}
361 361
362static void __devinit wf_fcu_add_fan(struct wf_fcu_priv *pv, 362static void wf_fcu_add_fan(struct wf_fcu_priv *pv, const char *name,
363 const char *name, 363 int type, int id)
364 int type, int id)
365{ 364{
366 struct wf_fcu_fan *fan; 365 struct wf_fcu_fan *fan;
367 366
@@ -399,7 +398,7 @@ static void __devinit wf_fcu_add_fan(struct wf_fcu_priv *pv,
399 kref_get(&pv->ref); 398 kref_get(&pv->ref);
400} 399}
401 400
402static void __devinit wf_fcu_lookup_fans(struct wf_fcu_priv *pv) 401static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv)
403{ 402{
404 /* Translation of device-tree location properties to 403 /* Translation of device-tree location properties to
405 * windfarm fan names 404 * windfarm fan names
@@ -481,7 +480,7 @@ static void __devinit wf_fcu_lookup_fans(struct wf_fcu_priv *pv)
481 } 480 }
482} 481}
483 482
484static void __devinit wf_fcu_default_fans(struct wf_fcu_priv *pv) 483static void wf_fcu_default_fans(struct wf_fcu_priv *pv)
485{ 484{
486 /* We only support the default fans for PowerMac7,2 */ 485 /* We only support the default fans for PowerMac7,2 */
487 if (!of_machine_is_compatible("PowerMac7,2")) 486 if (!of_machine_is_compatible("PowerMac7,2"))
@@ -496,7 +495,7 @@ static void __devinit wf_fcu_default_fans(struct wf_fcu_priv *pv)
496 wf_fcu_add_fan(pv, "cpu-rear-fan-1", FCU_FAN_RPM, 6); 495 wf_fcu_add_fan(pv, "cpu-rear-fan-1", FCU_FAN_RPM, 6);
497} 496}
498 497
499static int __devinit wf_fcu_init_chip(struct wf_fcu_priv *pv) 498static int wf_fcu_init_chip(struct wf_fcu_priv *pv)
500{ 499{
501 unsigned char buf = 0xff; 500 unsigned char buf = 0xff;
502 int rc; 501 int rc;
@@ -518,8 +517,8 @@ static int __devinit wf_fcu_init_chip(struct wf_fcu_priv *pv)
518 return 0; 517 return 0;
519} 518}
520 519
521static int __devinit wf_fcu_probe(struct i2c_client *client, 520static int wf_fcu_probe(struct i2c_client *client,
522 const struct i2c_device_id *id) 521 const struct i2c_device_id *id)
523{ 522{
524 struct wf_fcu_priv *pv; 523 struct wf_fcu_priv *pv;
525 524
@@ -564,7 +563,7 @@ static int __devinit wf_fcu_probe(struct i2c_client *client,
564 return 0; 563 return 0;
565} 564}
566 565
567static int __devexit wf_fcu_remove(struct i2c_client *client) 566static int wf_fcu_remove(struct i2c_client *client)
568{ 567{
569 struct wf_fcu_priv *pv = dev_get_drvdata(&client->dev); 568 struct wf_fcu_priv *pv = dev_get_drvdata(&client->dev);
570 struct wf_fcu_fan *fan; 569 struct wf_fcu_fan *fan;
diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c
index e0ee80700cde..35ef6e2582b8 100644
--- a/drivers/macintosh/windfarm_pm112.c
+++ b/drivers/macintosh/windfarm_pm112.c
@@ -656,7 +656,7 @@ static int wf_pm112_probe(struct platform_device *dev)
656 return 0; 656 return 0;
657} 657}
658 658
659static int __devexit wf_pm112_remove(struct platform_device *dev) 659static int wf_pm112_remove(struct platform_device *dev)
660{ 660{
661 wf_unregister_client(&pm112_events); 661 wf_unregister_client(&pm112_events);
662 /* should release all sensors and controls */ 662 /* should release all sensors and controls */
@@ -665,7 +665,7 @@ static int __devexit wf_pm112_remove(struct platform_device *dev)
665 665
666static struct platform_driver wf_pm112_driver = { 666static struct platform_driver wf_pm112_driver = {
667 .probe = wf_pm112_probe, 667 .probe = wf_pm112_probe,
668 .remove = __devexit_p(wf_pm112_remove), 668 .remove = wf_pm112_remove,
669 .driver = { 669 .driver = {
670 .name = "windfarm", 670 .name = "windfarm",
671 .owner = THIS_MODULE, 671 .owner = THIS_MODULE,
diff --git a/drivers/macintosh/windfarm_pm121.c b/drivers/macintosh/windfarm_pm121.c
index 04067e073aa9..af605e915d41 100644
--- a/drivers/macintosh/windfarm_pm121.c
+++ b/drivers/macintosh/windfarm_pm121.c
@@ -987,7 +987,7 @@ static int pm121_probe(struct platform_device *ddev)
987 return 0; 987 return 0;
988} 988}
989 989
990static int __devexit pm121_remove(struct platform_device *ddev) 990static int pm121_remove(struct platform_device *ddev)
991{ 991{
992 wf_unregister_client(&pm121_events); 992 wf_unregister_client(&pm121_events);
993 return 0; 993 return 0;
@@ -995,7 +995,7 @@ static int __devexit pm121_remove(struct platform_device *ddev)
995 995
996static struct platform_driver pm121_driver = { 996static struct platform_driver pm121_driver = {
997 .probe = pm121_probe, 997 .probe = pm121_probe,
998 .remove = __devexit_p(pm121_remove), 998 .remove = pm121_remove,
999 .driver = { 999 .driver = {
1000 .name = "windfarm", 1000 .name = "windfarm",
1001 .bus = &platform_bus_type, 1001 .bus = &platform_bus_type,
diff --git a/drivers/macintosh/windfarm_pm72.c b/drivers/macintosh/windfarm_pm72.c
index 84ac913d7e3a..6e5585357cd3 100644
--- a/drivers/macintosh/windfarm_pm72.c
+++ b/drivers/macintosh/windfarm_pm72.c
@@ -776,7 +776,7 @@ static int wf_pm72_probe(struct platform_device *dev)
776 return 0; 776 return 0;
777} 777}
778 778
779static int __devexit wf_pm72_remove(struct platform_device *dev) 779static int wf_pm72_remove(struct platform_device *dev)
780{ 780{
781 wf_unregister_client(&pm72_events); 781 wf_unregister_client(&pm72_events);
782 782
diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c
index 990c87606be9..f84933ff3298 100644
--- a/drivers/macintosh/windfarm_pm81.c
+++ b/drivers/macintosh/windfarm_pm81.c
@@ -720,7 +720,7 @@ static int wf_smu_probe(struct platform_device *ddev)
720 return 0; 720 return 0;
721} 721}
722 722
723static int __devexit wf_smu_remove(struct platform_device *ddev) 723static int wf_smu_remove(struct platform_device *ddev)
724{ 724{
725 wf_unregister_client(&wf_smu_events); 725 wf_unregister_client(&wf_smu_events);
726 726
@@ -763,7 +763,7 @@ static int __devexit wf_smu_remove(struct platform_device *ddev)
763 763
764static struct platform_driver wf_smu_driver = { 764static struct platform_driver wf_smu_driver = {
765 .probe = wf_smu_probe, 765 .probe = wf_smu_probe,
766 .remove = __devexit_p(wf_smu_remove), 766 .remove = wf_smu_remove,
767 .driver = { 767 .driver = {
768 .name = "windfarm", 768 .name = "windfarm",
769 .owner = THIS_MODULE, 769 .owner = THIS_MODULE,
diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c
index 7653603cb00e..2eb484f213c8 100644
--- a/drivers/macintosh/windfarm_pm91.c
+++ b/drivers/macintosh/windfarm_pm91.c
@@ -642,7 +642,7 @@ static int wf_smu_probe(struct platform_device *ddev)
642 return 0; 642 return 0;
643} 643}
644 644
645static int __devexit wf_smu_remove(struct platform_device *ddev) 645static int wf_smu_remove(struct platform_device *ddev)
646{ 646{
647 wf_unregister_client(&wf_smu_events); 647 wf_unregister_client(&wf_smu_events);
648 648
@@ -692,7 +692,7 @@ static int __devexit wf_smu_remove(struct platform_device *ddev)
692 692
693static struct platform_driver wf_smu_driver = { 693static struct platform_driver wf_smu_driver = {
694 .probe = wf_smu_probe, 694 .probe = wf_smu_probe,
695 .remove = __devexit_p(wf_smu_remove), 695 .remove = wf_smu_remove,
696 .driver = { 696 .driver = {
697 .name = "windfarm", 697 .name = "windfarm",
698 .owner = THIS_MODULE, 698 .owner = THIS_MODULE,
diff --git a/drivers/macintosh/windfarm_rm31.c b/drivers/macintosh/windfarm_rm31.c
index 3eca6d4b52fc..844003fb4ef0 100644
--- a/drivers/macintosh/windfarm_rm31.c
+++ b/drivers/macintosh/windfarm_rm31.c
@@ -669,7 +669,7 @@ static int wf_rm31_probe(struct platform_device *dev)
669 return 0; 669 return 0;
670} 670}
671 671
672static int __devexit wf_rm31_remove(struct platform_device *dev) 672static int wf_rm31_remove(struct platform_device *dev)
673{ 673{
674 wf_unregister_client(&rm31_events); 674 wf_unregister_client(&rm31_events);
675 675
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index 45ecf8db1eae..64d71fb87a96 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -540,8 +540,8 @@ static int init_device(struct i2c_client *client, struct adv7180_state *state)
540 return 0; 540 return 0;
541} 541}
542 542
543static __devinit int adv7180_probe(struct i2c_client *client, 543static int adv7180_probe(struct i2c_client *client,
544 const struct i2c_device_id *id) 544 const struct i2c_device_id *id)
545{ 545{
546 struct adv7180_state *state; 546 struct adv7180_state *state;
547 struct v4l2_subdev *sd; 547 struct v4l2_subdev *sd;
@@ -587,7 +587,7 @@ err:
587 return ret; 587 return ret;
588} 588}
589 589
590static __devexit int adv7180_remove(struct i2c_client *client) 590static int adv7180_remove(struct i2c_client *client)
591{ 591{
592 struct v4l2_subdev *sd = i2c_get_clientdata(client); 592 struct v4l2_subdev *sd = i2c_get_clientdata(client);
593 struct adv7180_state *state = to_state(sd); 593 struct adv7180_state *state = to_state(sd);
@@ -652,7 +652,7 @@ static struct i2c_driver adv7180_driver = {
652 .name = KBUILD_MODNAME, 652 .name = KBUILD_MODNAME,
653 }, 653 },
654 .probe = adv7180_probe, 654 .probe = adv7180_probe,
655 .remove = __devexit_p(adv7180_remove), 655 .remove = adv7180_remove,
656#ifdef CONFIG_PM 656#ifdef CONFIG_PM
657 .suspend = adv7180_suspend, 657 .suspend = adv7180_suspend,
658 .resume = adv7180_resume, 658 .resume = adv7180_resume,
diff --git a/drivers/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c
index 10c3c1db4cdd..6fed5b74e743 100644
--- a/drivers/media/i2c/adv7183.c
+++ b/drivers/media/i2c/adv7183.c
@@ -677,7 +677,7 @@ static struct i2c_driver adv7183_driver = {
677 .name = "adv7183", 677 .name = "adv7183",
678 }, 678 },
679 .probe = adv7183_probe, 679 .probe = adv7183_probe,
680 .remove = __devexit_p(adv7183_remove), 680 .remove = adv7183_remove,
681 .id_table = adv7183_id, 681 .id_table = adv7183_id,
682}; 682};
683 683
diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c
index 3bfdbf9d9bf1..58d523f2648f 100644
--- a/drivers/media/i2c/as3645a.c
+++ b/drivers/media/i2c/as3645a.c
@@ -713,7 +713,7 @@ static int as3645a_resume(struct device *dev)
713 * The number of LEDs reported in platform data is used to compute default 713 * The number of LEDs reported in platform data is used to compute default
714 * limits. Parameters passed through platform data can override those limits. 714 * limits. Parameters passed through platform data can override those limits.
715 */ 715 */
716static int __devinit as3645a_init_controls(struct as3645a *flash) 716static int as3645a_init_controls(struct as3645a *flash)
717{ 717{
718 const struct as3645a_platform_data *pdata = flash->pdata; 718 const struct as3645a_platform_data *pdata = flash->pdata;
719 struct v4l2_ctrl *ctrl; 719 struct v4l2_ctrl *ctrl;
@@ -804,8 +804,8 @@ static int __devinit as3645a_init_controls(struct as3645a *flash)
804 return flash->ctrls.error; 804 return flash->ctrls.error;
805} 805}
806 806
807static int __devinit as3645a_probe(struct i2c_client *client, 807static int as3645a_probe(struct i2c_client *client,
808 const struct i2c_device_id *devid) 808 const struct i2c_device_id *devid)
809{ 809{
810 struct as3645a *flash; 810 struct as3645a *flash;
811 int ret; 811 int ret;
@@ -846,7 +846,7 @@ done:
846 return ret; 846 return ret;
847} 847}
848 848
849static int __devexit as3645a_remove(struct i2c_client *client) 849static int as3645a_remove(struct i2c_client *client)
850{ 850{
851 struct v4l2_subdev *subdev = i2c_get_clientdata(client); 851 struct v4l2_subdev *subdev = i2c_get_clientdata(client);
852 struct as3645a *flash = to_as3645a(subdev); 852 struct as3645a *flash = to_as3645a(subdev);
@@ -877,7 +877,7 @@ static struct i2c_driver as3645a_i2c_driver = {
877 .pm = &as3645a_pm_ops, 877 .pm = &as3645a_pm_ops,
878 }, 878 },
879 .probe = as3645a_probe, 879 .probe = as3645a_probe,
880 .remove = __devexit_p(as3645a_remove), 880 .remove = as3645a_remove,
881 .id_table = as3645a_id_table, 881 .id_table = as3645a_id_table,
882}; 882};
883 883
diff --git a/drivers/media/i2c/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c
index 8131d651de9e..8a8d42fe2633 100644
--- a/drivers/media/i2c/m5mols/m5mols_core.c
+++ b/drivers/media/i2c/m5mols/m5mols_core.c
@@ -926,8 +926,8 @@ static irqreturn_t m5mols_irq_handler(int irq, void *data)
926 return IRQ_HANDLED; 926 return IRQ_HANDLED;
927} 927}
928 928
929static int __devinit m5mols_probe(struct i2c_client *client, 929static int m5mols_probe(struct i2c_client *client,
930 const struct i2c_device_id *id) 930 const struct i2c_device_id *id)
931{ 931{
932 const struct m5mols_platform_data *pdata = client->dev.platform_data; 932 const struct m5mols_platform_data *pdata = client->dev.platform_data;
933 struct m5mols_info *info; 933 struct m5mols_info *info;
@@ -1018,7 +1018,7 @@ out_free:
1018 return ret; 1018 return ret;
1019} 1019}
1020 1020
1021static int __devexit m5mols_remove(struct i2c_client *client) 1021static int m5mols_remove(struct i2c_client *client)
1022{ 1022{
1023 struct v4l2_subdev *sd = i2c_get_clientdata(client); 1023 struct v4l2_subdev *sd = i2c_get_clientdata(client);
1024 struct m5mols_info *info = to_m5mols(sd); 1024 struct m5mols_info *info = to_m5mols(sd);
@@ -1045,7 +1045,7 @@ static struct i2c_driver m5mols_i2c_driver = {
1045 .name = MODULE_NAME, 1045 .name = MODULE_NAME,
1046 }, 1046 },
1047 .probe = m5mols_probe, 1047 .probe = m5mols_probe,
1048 .remove = __devexit_p(m5mols_remove), 1048 .remove = m5mols_remove,
1049 .id_table = m5mols_id, 1049 .id_table = m5mols_id,
1050}; 1050};
1051 1051
diff --git a/drivers/media/i2c/vs6624.c b/drivers/media/i2c/vs6624.c
index f434a19b9bcb..9ac1b8c3a837 100644
--- a/drivers/media/i2c/vs6624.c
+++ b/drivers/media/i2c/vs6624.c
@@ -788,7 +788,7 @@ static const struct v4l2_subdev_ops vs6624_ops = {
788 .video = &vs6624_video_ops, 788 .video = &vs6624_video_ops,
789}; 789};
790 790
791static int __devinit vs6624_probe(struct i2c_client *client, 791static int vs6624_probe(struct i2c_client *client,
792 const struct i2c_device_id *id) 792 const struct i2c_device_id *id)
793{ 793{
794 struct vs6624 *sensor; 794 struct vs6624 *sensor;
@@ -881,7 +881,7 @@ static int __devinit vs6624_probe(struct i2c_client *client,
881 return ret; 881 return ret;
882} 882}
883 883
884static int __devexit vs6624_remove(struct i2c_client *client) 884static int vs6624_remove(struct i2c_client *client)
885{ 885{
886 struct v4l2_subdev *sd = i2c_get_clientdata(client); 886 struct v4l2_subdev *sd = i2c_get_clientdata(client);
887 struct vs6624 *sensor = to_vs6624(sd); 887 struct vs6624 *sensor = to_vs6624(sd);
@@ -906,7 +906,7 @@ static struct i2c_driver vs6624_driver = {
906 .name = "vs6624", 906 .name = "vs6624",
907 }, 907 },
908 .probe = vs6624_probe, 908 .probe = vs6624_probe,
909 .remove = __devexit_p(vs6624_remove), 909 .remove = vs6624_remove,
910 .id_table = vs6624_id, 910 .id_table = vs6624_id,
911}; 911};
912 912
diff --git a/drivers/media/mmc/siano/smssdio.c b/drivers/media/mmc/siano/smssdio.c
index d6f3f100699a..15d34935e00b 100644
--- a/drivers/media/mmc/siano/smssdio.c
+++ b/drivers/media/mmc/siano/smssdio.c
@@ -50,7 +50,7 @@
50#define SMSSDIO_INT 0x04 50#define SMSSDIO_INT 0x04
51#define SMSSDIO_BLOCK_SIZE 128 51#define SMSSDIO_BLOCK_SIZE 128
52 52
53static const struct sdio_device_id smssdio_ids[] __devinitconst = { 53static const struct sdio_device_id smssdio_ids[] = {
54 {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_STELLAR), 54 {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_STELLAR),
55 .driver_data = SMS1XXX_BOARD_SIANO_STELLAR}, 55 .driver_data = SMS1XXX_BOARD_SIANO_STELLAR},
56 {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_A0), 56 {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_A0),
@@ -224,7 +224,7 @@ static void smssdio_interrupt(struct sdio_func *func)
224 smscore_onresponse(smsdev->coredev, cb); 224 smscore_onresponse(smsdev->coredev, cb);
225} 225}
226 226
227static int __devinit smssdio_probe(struct sdio_func *func, 227static int smssdio_probe(struct sdio_func *func,
228 const struct sdio_device_id *id) 228 const struct sdio_device_id *id)
229{ 229{
230 int ret; 230 int ret;
diff --git a/drivers/media/pci/bt8xx/bt878.c b/drivers/media/pci/bt8xx/bt878.c
index b34fa95185e4..66eb0baab0e9 100644
--- a/drivers/media/pci/bt8xx/bt878.c
+++ b/drivers/media/pci/bt8xx/bt878.c
@@ -391,7 +391,7 @@ EXPORT_SYMBOL(bt878_device_control);
391 .driver_data = (unsigned long) name \ 391 .driver_data = (unsigned long) name \
392 } 392 }
393 393
394static struct pci_device_id bt878_pci_tbl[] __devinitdata = { 394static struct pci_device_id bt878_pci_tbl[] = {
395 BROOKTREE_878_DEVICE(0x0071, 0x0101, "Nebula Electronics DigiTV"), 395 BROOKTREE_878_DEVICE(0x0071, 0x0101, "Nebula Electronics DigiTV"),
396 BROOKTREE_878_DEVICE(0x1461, 0x0761, "AverMedia AverTV DVB-T 761"), 396 BROOKTREE_878_DEVICE(0x1461, 0x0761, "AverMedia AverTV DVB-T 761"),
397 BROOKTREE_878_DEVICE(0x11bd, 0x001c, "Pinnacle PCTV Sat"), 397 BROOKTREE_878_DEVICE(0x11bd, 0x001c, "Pinnacle PCTV Sat"),
@@ -410,7 +410,7 @@ static struct pci_device_id bt878_pci_tbl[] __devinitdata = {
410 410
411MODULE_DEVICE_TABLE(pci, bt878_pci_tbl); 411MODULE_DEVICE_TABLE(pci, bt878_pci_tbl);
412 412
413static const char * __devinit card_name(const struct pci_device_id *id) 413static const char * card_name(const struct pci_device_id *id)
414{ 414{
415 return id->driver_data ? (const char *)id->driver_data : "Unknown"; 415 return id->driver_data ? (const char *)id->driver_data : "Unknown";
416} 416}
@@ -419,8 +419,7 @@ static const char * __devinit card_name(const struct pci_device_id *id)
419/* PCI device handling */ 419/* PCI device handling */
420/***********************/ 420/***********************/
421 421
422static int __devinit bt878_probe(struct pci_dev *dev, 422static int bt878_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
423 const struct pci_device_id *pci_id)
424{ 423{
425 int result = 0; 424 int result = 0;
426 unsigned char lat; 425 unsigned char lat;
@@ -529,7 +528,7 @@ static int __devinit bt878_probe(struct pci_dev *dev,
529 return result; 528 return result;
530} 529}
531 530
532static void __devexit bt878_remove(struct pci_dev *pci_dev) 531static void bt878_remove(struct pci_dev *pci_dev)
533{ 532{
534 u8 command; 533 u8 command;
535 struct bt878 *bt = pci_get_drvdata(pci_dev); 534 struct bt878 *bt = pci_get_drvdata(pci_dev);
@@ -573,7 +572,7 @@ static struct pci_driver bt878_pci_driver = {
573 .name = "bt878", 572 .name = "bt878",
574 .id_table = bt878_pci_tbl, 573 .id_table = bt878_pci_tbl,
575 .probe = bt878_probe, 574 .probe = bt878_probe,
576 .remove = __devexit_p(bt878_remove), 575 .remove = bt878_remove,
577}; 576};
578 577
579/*******************************/ 578/*******************************/
diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c
index 38952faaffda..c4c59175e52c 100644
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -87,7 +87,7 @@ static int tea5757_read(struct bttv *btv);
87static int tea5757_write(struct bttv *btv, int value); 87static int tea5757_write(struct bttv *btv, int value);
88static void identify_by_eeprom(struct bttv *btv, 88static void identify_by_eeprom(struct bttv *btv,
89 unsigned char eeprom_data[256]); 89 unsigned char eeprom_data[256]);
90static int __devinit pvr_boot(struct bttv *btv); 90static int pvr_boot(struct bttv *btv);
91 91
92/* config variables */ 92/* config variables */
93static unsigned int triton1; 93static unsigned int triton1;
@@ -151,7 +151,7 @@ static struct CARD {
151 unsigned id; 151 unsigned id;
152 int cardnr; 152 int cardnr;
153 char *name; 153 char *name;
154} cards[] __devinitdata = { 154} cards[] = {
155 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" }, 155 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
156 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" }, 156 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
157 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" }, 157 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
@@ -2837,7 +2837,7 @@ static unsigned char eeprom_data[256];
2837/* 2837/*
2838 * identify card 2838 * identify card
2839 */ 2839 */
2840void __devinit bttv_idcard(struct bttv *btv) 2840void bttv_idcard(struct bttv *btv)
2841{ 2841{
2842 unsigned int gpiobits; 2842 unsigned int gpiobits;
2843 int i,type; 2843 int i,type;
@@ -3235,7 +3235,7 @@ static void bttv_reset_audio(struct bttv *btv)
3235} 3235}
3236 3236
3237/* initialization part one -- before registering i2c bus */ 3237/* initialization part one -- before registering i2c bus */
3238void __devinit bttv_init_card1(struct bttv *btv) 3238void bttv_init_card1(struct bttv *btv)
3239{ 3239{
3240 switch (btv->c.type) { 3240 switch (btv->c.type) {
3241 case BTTV_BOARD_HAUPPAUGE: 3241 case BTTV_BOARD_HAUPPAUGE:
@@ -3267,7 +3267,7 @@ void __devinit bttv_init_card1(struct bttv *btv)
3267} 3267}
3268 3268
3269/* initialization part two -- after registering i2c bus */ 3269/* initialization part two -- after registering i2c bus */
3270void __devinit bttv_init_card2(struct bttv *btv) 3270void bttv_init_card2(struct bttv *btv)
3271{ 3271{
3272 btv->tuner_type = UNSET; 3272 btv->tuner_type = UNSET;
3273 3273
@@ -3571,7 +3571,7 @@ no_audio:
3571 3571
3572 3572
3573/* initialize the tuner */ 3573/* initialize the tuner */
3574void __devinit bttv_init_tuner(struct bttv *btv) 3574void bttv_init_tuner(struct bttv *btv)
3575{ 3575{
3576 int addr = ADDR_UNSET; 3576 int addr = ADDR_UNSET;
3577 3577
@@ -3635,7 +3635,7 @@ static void modtec_eeprom(struct bttv *btv)
3635 } 3635 }
3636} 3636}
3637 3637
3638static void __devinit hauppauge_eeprom(struct bttv *btv) 3638static void hauppauge_eeprom(struct bttv *btv)
3639{ 3639{
3640 struct tveeprom tv; 3640 struct tveeprom tv;
3641 3641
@@ -3709,8 +3709,7 @@ static int terratec_active_radio_upgrade(struct bttv *btv)
3709#define BTTV_ALT_DCLK 0x100000 3709#define BTTV_ALT_DCLK 0x100000
3710#define BTTV_ALT_NCONFIG 0x800000 3710#define BTTV_ALT_NCONFIG 0x800000
3711 3711
3712static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro, 3712static int pvr_altera_load(struct bttv *btv, const u8 *micro, u32 microlen)
3713 u32 microlen)
3714{ 3713{
3715 u32 n; 3714 u32 n;
3716 u8 bits; 3715 u8 bits;
@@ -3747,7 +3746,7 @@ static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3747 return 0; 3746 return 0;
3748} 3747}
3749 3748
3750static int __devinit pvr_boot(struct bttv *btv) 3749static int pvr_boot(struct bttv *btv)
3751{ 3750{
3752 const struct firmware *fw_entry; 3751 const struct firmware *fw_entry;
3753 int rc; 3752 int rc;
@@ -3767,7 +3766,7 @@ static int __devinit pvr_boot(struct bttv *btv)
3767/* ----------------------------------------------------------------------- */ 3766/* ----------------------------------------------------------------------- */
3768/* some osprey specific stuff */ 3767/* some osprey specific stuff */
3769 3768
3770static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256]) 3769static void osprey_eeprom(struct bttv *btv, const u8 ee[256])
3771{ 3770{
3772 int i; 3771 int i;
3773 u32 serial = 0; 3772 u32 serial = 0;
@@ -3898,7 +3897,7 @@ static int tuner_1_table[] = {
3898 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */ 3897 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3899 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL}; 3898 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
3900 3899
3901static void __devinit avermedia_eeprom(struct bttv *btv) 3900static void avermedia_eeprom(struct bttv *btv)
3902{ 3901{
3903 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0; 3902 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
3904 3903
@@ -3960,7 +3959,7 @@ u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
3960 * Hauppauge: pin 5 3959 * Hauppauge: pin 5
3961 * Voodoo: pin 20 3960 * Voodoo: pin 20
3962 */ 3961 */
3963static void __devinit boot_msp34xx(struct bttv *btv, int pin) 3962static void boot_msp34xx(struct bttv *btv, int pin)
3964{ 3963{
3965 int mask = (1 << pin); 3964 int mask = (1 << pin);
3966 3965
@@ -3983,11 +3982,10 @@ static void __devinit boot_msp34xx(struct bttv *btv, int pin)
3983 * used by Alessandro Rubini in his pxc200 3982 * used by Alessandro Rubini in his pxc200
3984 * driver, but using BTTV functions */ 3983 * driver, but using BTTV functions */
3985 3984
3986static void __devinit init_PXC200(struct bttv *btv) 3985static void init_PXC200(struct bttv *btv)
3987{ 3986{
3988 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, 3987 static int vals[] = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, 0x01, 0x02,
3989 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 3988 0x03, 0x04, 0x05, 0x06, 0x00 };
3990 0x00 };
3991 unsigned int i; 3989 unsigned int i;
3992 int tmp; 3990 int tmp;
3993 u32 val; 3991 u32 val;
@@ -4851,7 +4849,7 @@ void __init bttv_check_chipset(void)
4851 } 4849 }
4852} 4850}
4853 4851
4854int __devinit bttv_handle_chipset(struct bttv *btv) 4852int bttv_handle_chipset(struct bttv *btv)
4855{ 4853{
4856 unsigned char command; 4854 unsigned char command;
4857 4855
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index de6f41f19187..45e5d0661b60 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -4199,7 +4199,7 @@ static void bttv_unregister_video(struct bttv *btv)
4199} 4199}
4200 4200
4201/* register video4linux devices */ 4201/* register video4linux devices */
4202static int __devinit bttv_register_video(struct bttv *btv) 4202static int bttv_register_video(struct bttv *btv)
4203{ 4203{
4204 if (no_overlay > 0) 4204 if (no_overlay > 0)
4205 pr_notice("Overlay support disabled\n"); 4205 pr_notice("Overlay support disabled\n");
@@ -4265,8 +4265,7 @@ static void pci_set_command(struct pci_dev *dev)
4265#endif 4265#endif
4266} 4266}
4267 4267
4268static int __devinit bttv_probe(struct pci_dev *dev, 4268static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
4269 const struct pci_device_id *pci_id)
4270{ 4269{
4271 int result; 4270 int result;
4272 unsigned char lat; 4271 unsigned char lat;
@@ -4454,7 +4453,7 @@ fail0:
4454 return result; 4453 return result;
4455} 4454}
4456 4455
4457static void __devexit bttv_remove(struct pci_dev *pci_dev) 4456static void bttv_remove(struct pci_dev *pci_dev)
4458{ 4457{
4459 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); 4458 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev);
4460 struct bttv *btv = to_bttv(v4l2_dev); 4459 struct bttv *btv = to_bttv(v4l2_dev);
@@ -4598,7 +4597,7 @@ static struct pci_driver bttv_pci_driver = {
4598 .name = "bttv", 4597 .name = "bttv",
4599 .id_table = bttv_pci_tbl, 4598 .id_table = bttv_pci_tbl,
4600 .probe = bttv_probe, 4599 .probe = bttv_probe,
4601 .remove = __devexit_p(bttv_remove), 4600 .remove = bttv_remove,
4602#ifdef CONFIG_PM 4601#ifdef CONFIG_PM
4603 .suspend = bttv_suspend, 4602 .suspend = bttv_suspend,
4604 .resume = bttv_resume, 4603 .resume = bttv_resume,
diff --git a/drivers/media/pci/bt8xx/bttv-i2c.c b/drivers/media/pci/bt8xx/bttv-i2c.c
index 580c8e682392..5039b8826e0a 100644
--- a/drivers/media/pci/bt8xx/bttv-i2c.c
+++ b/drivers/media/pci/bt8xx/bttv-i2c.c
@@ -99,7 +99,7 @@ static int bttv_bit_getsda(void *data)
99 return state; 99 return state;
100} 100}
101 101
102static struct i2c_algo_bit_data __devinitdata bttv_i2c_algo_bit_template = { 102static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = {
103 .setsda = bttv_bit_setsda, 103 .setsda = bttv_bit_setsda,
104 .setscl = bttv_bit_setscl, 104 .setscl = bttv_bit_setscl,
105 .getsda = bttv_bit_getsda, 105 .getsda = bttv_bit_getsda,
@@ -312,7 +312,7 @@ int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
312} 312}
313 313
314/* read EEPROM content */ 314/* read EEPROM content */
315void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr) 315void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr)
316{ 316{
317 memset(eedata, 0, 256); 317 memset(eedata, 0, 256);
318 if (0 != btv->i2c_rc) 318 if (0 != btv->i2c_rc)
@@ -347,7 +347,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c)
347} 347}
348 348
349/* init + register i2c adapter */ 349/* init + register i2c adapter */
350int __devinit init_bttv_i2c(struct bttv *btv) 350int init_bttv_i2c(struct bttv *btv)
351{ 351{
352 strlcpy(btv->i2c_client.name, "bttv internal", I2C_NAME_SIZE); 352 strlcpy(btv->i2c_client.name, "bttv internal", I2C_NAME_SIZE);
353 353
diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c
index ef4c7cd41982..04207a799055 100644
--- a/drivers/media/pci/bt8xx/bttv-input.c
+++ b/drivers/media/pci/bt8xx/bttv-input.c
@@ -368,7 +368,7 @@ static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
368} 368}
369 369
370/* Instantiate the I2C IR receiver device, if present */ 370/* Instantiate the I2C IR receiver device, if present */
371void __devinit init_bttv_i2c_ir(struct bttv *btv) 371void init_bttv_i2c_ir(struct bttv *btv)
372{ 372{
373 const unsigned short addr_list[] = { 373 const unsigned short addr_list[] = {
374 0x1a, 0x18, 0x64, 0x30, 0x71, 374 0x1a, 0x18, 0x64, 0x30, 0x71,
@@ -411,7 +411,7 @@ void __devinit init_bttv_i2c_ir(struct bttv *btv)
411 return; 411 return;
412} 412}
413 413
414int __devexit fini_bttv_i2c(struct bttv *btv) 414int fini_bttv_i2c(struct bttv *btv)
415{ 415{
416 if (0 != btv->i2c_rc) 416 if (0 != btv->i2c_rc)
417 return 0; 417 return 0;
diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c
index 81fab9adc1ca..d407244fd1bc 100644
--- a/drivers/media/pci/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c
@@ -118,7 +118,8 @@ static int is_pci_slot_eq(struct pci_dev* adev, struct pci_dev* bdev)
118 return 0; 118 return 0;
119} 119}
120 120
121static struct bt878 __devinit *dvb_bt8xx_878_match(unsigned int bttv_nr, struct pci_dev* bttv_pci_dev) 121static struct bt878 *dvb_bt8xx_878_match(unsigned int bttv_nr,
122 struct pci_dev* bttv_pci_dev)
122{ 123{
123 unsigned int card_nr; 124 unsigned int card_nr;
124 125
@@ -720,7 +721,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
720 } 721 }
721} 722}
722 723
723static int __devinit dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) 724static int dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
724{ 725{
725 int result; 726 int result;
726 727
@@ -811,7 +812,7 @@ err_unregister_adaptor:
811 return result; 812 return result;
812} 813}
813 814
814static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub) 815static int dvb_bt8xx_probe(struct bttv_sub_device *sub)
815{ 816{
816 struct dvb_bt8xx_card *card; 817 struct dvb_bt8xx_card *card;
817 struct pci_dev* bttv_pci_dev; 818 struct pci_dev* bttv_pci_dev;
diff --git a/drivers/media/pci/cx18/cx18-driver.c b/drivers/media/pci/cx18/cx18-driver.c
index 039133d692e3..613e5ae7d5ca 100644
--- a/drivers/media/pci/cx18/cx18-driver.c
+++ b/drivers/media/pci/cx18/cx18-driver.c
@@ -53,7 +53,7 @@ int (*cx18_ext_init)(struct cx18 *);
53EXPORT_SYMBOL(cx18_ext_init); 53EXPORT_SYMBOL(cx18_ext_init);
54 54
55/* add your revision and whatnot here */ 55/* add your revision and whatnot here */
56static struct pci_device_id cx18_pci_tbl[] __devinitdata = { 56static struct pci_device_id cx18_pci_tbl[] = {
57 {PCI_VENDOR_ID_CX, PCI_DEVICE_ID_CX23418, 57 {PCI_VENDOR_ID_CX, PCI_DEVICE_ID_CX23418,
58 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 58 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
59 {0,} 59 {0,}
@@ -691,7 +691,7 @@ done:
691 cx->card_i2c = cx->card->i2c; 691 cx->card_i2c = cx->card->i2c;
692} 692}
693 693
694static int __devinit cx18_create_in_workq(struct cx18 *cx) 694static int cx18_create_in_workq(struct cx18 *cx)
695{ 695{
696 snprintf(cx->in_workq_name, sizeof(cx->in_workq_name), "%s-in", 696 snprintf(cx->in_workq_name, sizeof(cx->in_workq_name), "%s-in",
697 cx->v4l2_dev.name); 697 cx->v4l2_dev.name);
@@ -703,7 +703,7 @@ static int __devinit cx18_create_in_workq(struct cx18 *cx)
703 return 0; 703 return 0;
704} 704}
705 705
706static void __devinit cx18_init_in_work_orders(struct cx18 *cx) 706static void cx18_init_in_work_orders(struct cx18 *cx)
707{ 707{
708 int i; 708 int i;
709 for (i = 0; i < CX18_MAX_IN_WORK_ORDERS; i++) { 709 for (i = 0; i < CX18_MAX_IN_WORK_ORDERS; i++) {
@@ -718,7 +718,7 @@ static void __devinit cx18_init_in_work_orders(struct cx18 *cx)
718 No assumptions on the card type may be made here (see cx18_init_struct2 718 No assumptions on the card type may be made here (see cx18_init_struct2
719 for that). 719 for that).
720 */ 720 */
721static int __devinit cx18_init_struct1(struct cx18 *cx) 721static int cx18_init_struct1(struct cx18 *cx)
722{ 722{
723 int ret; 723 int ret;
724 724
@@ -775,7 +775,7 @@ static int __devinit cx18_init_struct1(struct cx18 *cx)
775 775
776/* Second initialization part. Here the card type has been 776/* Second initialization part. Here the card type has been
777 autodetected. */ 777 autodetected. */
778static void __devinit cx18_init_struct2(struct cx18 *cx) 778static void cx18_init_struct2(struct cx18 *cx)
779{ 779{
780 int i; 780 int i;
781 781
@@ -892,8 +892,8 @@ static void cx18_init_subdevs(struct cx18 *cx)
892 cx->sd_extmux = cx18_find_hw(cx, cx->card->hw_muxer); 892 cx->sd_extmux = cx18_find_hw(cx, cx->card->hw_muxer);
893} 893}
894 894
895static int __devinit cx18_probe(struct pci_dev *pci_dev, 895static int cx18_probe(struct pci_dev *pci_dev,
896 const struct pci_device_id *pci_id) 896 const struct pci_device_id *pci_id)
897{ 897{
898 int retval = 0; 898 int retval = 0;
899 int i; 899 int i;
diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c
index 065ecd54bda3..f0416a668b4c 100644
--- a/drivers/media/pci/cx23885/cx23885-core.c
+++ b/drivers/media/pci/cx23885/cx23885-core.c
@@ -2086,8 +2086,8 @@ void cx23885_gpio_enable(struct cx23885_dev *dev, u32 mask, int asoutput)
2086 /* TODO: 23-19 */ 2086 /* TODO: 23-19 */
2087} 2087}
2088 2088
2089static int __devinit cx23885_initdev(struct pci_dev *pci_dev, 2089static int cx23885_initdev(struct pci_dev *pci_dev,
2090 const struct pci_device_id *pci_id) 2090 const struct pci_device_id *pci_id)
2091{ 2091{
2092 struct cx23885_dev *dev; 2092 struct cx23885_dev *dev;
2093 int err; 2093 int err;
@@ -2167,7 +2167,7 @@ fail_free:
2167 return err; 2167 return err;
2168} 2168}
2169 2169
2170static void __devexit cx23885_finidev(struct pci_dev *pci_dev) 2170static void cx23885_finidev(struct pci_dev *pci_dev)
2171{ 2171{
2172 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); 2172 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev);
2173 struct cx23885_dev *dev = to_cx23885(v4l2_dev); 2173 struct cx23885_dev *dev = to_cx23885(v4l2_dev);
@@ -2210,7 +2210,7 @@ static struct pci_driver cx23885_pci_driver = {
2210 .name = "cx23885", 2210 .name = "cx23885",
2211 .id_table = cx23885_pci_tbl, 2211 .id_table = cx23885_pci_tbl,
2212 .probe = cx23885_initdev, 2212 .probe = cx23885_initdev,
2213 .remove = __devexit_p(cx23885_finidev), 2213 .remove = cx23885_finidev,
2214 /* TODO */ 2214 /* TODO */
2215 .suspend = NULL, 2215 .suspend = NULL,
2216 .resume = NULL, 2216 .resume = NULL,
diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c
index f11f6f07e915..1884e2cc35e9 100644
--- a/drivers/media/pci/cx25821/cx25821-core.c
+++ b/drivers/media/pci/cx25821/cx25821-core.c
@@ -1361,8 +1361,8 @@ struct cx25821_dev *cx25821_dev_get(struct pci_dev *pci)
1361} 1361}
1362EXPORT_SYMBOL(cx25821_dev_get); 1362EXPORT_SYMBOL(cx25821_dev_get);
1363 1363
1364static int __devinit cx25821_initdev(struct pci_dev *pci_dev, 1364static int cx25821_initdev(struct pci_dev *pci_dev,
1365 const struct pci_device_id *pci_id) 1365 const struct pci_device_id *pci_id)
1366{ 1366{
1367 struct cx25821_dev *dev; 1367 struct cx25821_dev *dev;
1368 int err = 0; 1368 int err = 0;
@@ -1433,7 +1433,7 @@ fail_free:
1433 return err; 1433 return err;
1434} 1434}
1435 1435
1436static void __devexit cx25821_finidev(struct pci_dev *pci_dev) 1436static void cx25821_finidev(struct pci_dev *pci_dev)
1437{ 1437{
1438 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); 1438 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev);
1439 struct cx25821_dev *dev = get_cx25821(v4l2_dev); 1439 struct cx25821_dev *dev = get_cx25821(v4l2_dev);
@@ -1478,7 +1478,7 @@ static struct pci_driver cx25821_pci_driver = {
1478 .name = "cx25821", 1478 .name = "cx25821",
1479 .id_table = cx25821_pci_tbl, 1479 .id_table = cx25821_pci_tbl,
1480 .probe = cx25821_initdev, 1480 .probe = cx25821_initdev,
1481 .remove = __devexit_p(cx25821_finidev), 1481 .remove = cx25821_finidev,
1482 /* TODO */ 1482 /* TODO */
1483 .suspend = NULL, 1483 .suspend = NULL,
1484 .resume = NULL, 1484 .resume = NULL,
diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c
index d2de1a913e19..27d62623274b 100644
--- a/drivers/media/pci/cx88/cx88-alsa.c
+++ b/drivers/media/pci/cx88/cx88-alsa.c
@@ -540,7 +540,7 @@ static struct snd_pcm_ops snd_cx88_pcm_ops = {
540/* 540/*
541 * create a PCM device 541 * create a PCM device
542 */ 542 */
543static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, const char *name) 543static int snd_cx88_pcm(snd_cx88_card_t *chip, int device, const char *name)
544{ 544{
545 int err; 545 int err;
546 struct snd_pcm *pcm; 546 struct snd_pcm *pcm;
@@ -753,7 +753,7 @@ static struct snd_kcontrol_new snd_cx88_alc_switch = {
753 * Only boards with eeprom and byte 1 at eeprom=1 have it 753 * Only boards with eeprom and byte 1 at eeprom=1 have it
754 */ 754 */
755 755
756static const struct pci_device_id cx88_audio_pci_tbl[] __devinitdata = { 756static const struct pci_device_id cx88_audio_pci_tbl[] = {
757 {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, 757 {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
758 {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, 758 {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
759 {0, } 759 {0, }
@@ -792,10 +792,9 @@ static void snd_cx88_dev_free(struct snd_card * card)
792 */ 792 */
793 793
794static int devno; 794static int devno;
795static int __devinit snd_cx88_create(struct snd_card *card, 795static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci,
796 struct pci_dev *pci, 796 snd_cx88_card_t **rchip,
797 snd_cx88_card_t **rchip, 797 struct cx88_core **core_ptr)
798 struct cx88_core **core_ptr)
799{ 798{
800 snd_cx88_card_t *chip; 799 snd_cx88_card_t *chip;
801 struct cx88_core *core; 800 struct cx88_core *core;
@@ -862,8 +861,8 @@ static int __devinit snd_cx88_create(struct snd_card *card,
862 return 0; 861 return 0;
863} 862}
864 863
865static int __devinit cx88_audio_initdev(struct pci_dev *pci, 864static int cx88_audio_initdev(struct pci_dev *pci,
866 const struct pci_device_id *pci_id) 865 const struct pci_device_id *pci_id)
867{ 866{
868 struct snd_card *card; 867 struct snd_card *card;
869 snd_cx88_card_t *chip; 868 snd_cx88_card_t *chip;
@@ -931,7 +930,7 @@ error:
931/* 930/*
932 * ALSA destructor 931 * ALSA destructor
933 */ 932 */
934static void __devexit cx88_audio_finidev(struct pci_dev *pci) 933static void cx88_audio_finidev(struct pci_dev *pci)
935{ 934{
936 struct cx88_audio_dev *card = pci_get_drvdata(pci); 935 struct cx88_audio_dev *card = pci_get_drvdata(pci);
937 936
@@ -950,7 +949,7 @@ static struct pci_driver cx88_audio_pci_driver = {
950 .name = "cx88_audio", 949 .name = "cx88_audio",
951 .id_table = cx88_audio_pci_tbl, 950 .id_table = cx88_audio_pci_tbl,
952 .probe = cx88_audio_initdev, 951 .probe = cx88_audio_initdev,
953 .remove = __devexit_p(cx88_audio_finidev), 952 .remove = cx88_audio_finidev,
954}; 953};
955 954
956/**************************************************************************** 955/****************************************************************************
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c
index d46b008a46b8..c9d3182f79d5 100644
--- a/drivers/media/pci/cx88/cx88-mpeg.c
+++ b/drivers/media/pci/cx88/cx88-mpeg.c
@@ -791,8 +791,8 @@ int cx8802_unregister_driver(struct cx8802_driver *drv)
791} 791}
792 792
793/* ----------------------------------------------------------- */ 793/* ----------------------------------------------------------- */
794static int __devinit cx8802_probe(struct pci_dev *pci_dev, 794static int cx8802_probe(struct pci_dev *pci_dev,
795 const struct pci_device_id *pci_id) 795 const struct pci_device_id *pci_id)
796{ 796{
797 struct cx8802_dev *dev; 797 struct cx8802_dev *dev;
798 struct cx88_core *core; 798 struct cx88_core *core;
@@ -840,7 +840,7 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev,
840 return err; 840 return err;
841} 841}
842 842
843static void __devexit cx8802_remove(struct pci_dev *pci_dev) 843static void cx8802_remove(struct pci_dev *pci_dev)
844{ 844{
845 struct cx8802_dev *dev; 845 struct cx8802_dev *dev;
846 846
@@ -898,7 +898,7 @@ static struct pci_driver cx8802_pci_driver = {
898 .name = "cx88-mpeg driver manager", 898 .name = "cx88-mpeg driver manager",
899 .id_table = cx8802_pci_tbl, 899 .id_table = cx8802_pci_tbl,
900 .probe = cx8802_probe, 900 .probe = cx8802_probe,
901 .remove = __devexit_p(cx8802_remove), 901 .remove = cx8802_remove,
902}; 902};
903 903
904static int __init cx8802_init(void) 904static int __init cx8802_init(void)
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c
index 05171457bf28..bc78354262ac 100644
--- a/drivers/media/pci/cx88/cx88-video.c
+++ b/drivers/media/pci/cx88/cx88-video.c
@@ -1696,8 +1696,8 @@ static void cx8800_unregister_video(struct cx8800_dev *dev)
1696 } 1696 }
1697} 1697}
1698 1698
1699static int __devinit cx8800_initdev(struct pci_dev *pci_dev, 1699static int cx8800_initdev(struct pci_dev *pci_dev,
1700 const struct pci_device_id *pci_id) 1700 const struct pci_device_id *pci_id)
1701{ 1701{
1702 struct cx8800_dev *dev; 1702 struct cx8800_dev *dev;
1703 struct cx88_core *core; 1703 struct cx88_core *core;
@@ -1923,7 +1923,7 @@ fail_free:
1923 return err; 1923 return err;
1924} 1924}
1925 1925
1926static void __devexit cx8800_finidev(struct pci_dev *pci_dev) 1926static void cx8800_finidev(struct pci_dev *pci_dev)
1927{ 1927{
1928 struct cx8800_dev *dev = pci_get_drvdata(pci_dev); 1928 struct cx8800_dev *dev = pci_get_drvdata(pci_dev);
1929 struct cx88_core *core = dev->core; 1929 struct cx88_core *core = dev->core;
@@ -2052,7 +2052,7 @@ static struct pci_driver cx8800_pci_driver = {
2052 .name = "cx8800", 2052 .name = "cx8800",
2053 .id_table = cx8800_pci_tbl, 2053 .id_table = cx8800_pci_tbl,
2054 .probe = cx8800_initdev, 2054 .probe = cx8800_initdev,
2055 .remove = __devexit_p(cx8800_finidev), 2055 .remove = cx8800_finidev,
2056#ifdef CONFIG_PM 2056#ifdef CONFIG_PM
2057 .suspend = cx8800_suspend, 2057 .suspend = cx8800_suspend,
2058 .resume = cx8800_resume, 2058 .resume = cx8800_resume,
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index feff57ee5a08..36e34522b9a8 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -1542,7 +1542,7 @@ static void ddb_unmap(struct ddb *dev)
1542} 1542}
1543 1543
1544 1544
1545static void __devexit ddb_remove(struct pci_dev *pdev) 1545static void ddb_remove(struct pci_dev *pdev)
1546{ 1546{
1547 struct ddb *dev = (struct ddb *) pci_get_drvdata(pdev); 1547 struct ddb *dev = (struct ddb *) pci_get_drvdata(pdev);
1548 1548
@@ -1565,8 +1565,7 @@ static void __devexit ddb_remove(struct pci_dev *pdev)
1565} 1565}
1566 1566
1567 1567
1568static int __devinit ddb_probe(struct pci_dev *pdev, 1568static int ddb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1569 const struct pci_device_id *id)
1570{ 1569{
1571 struct ddb *dev; 1570 struct ddb *dev;
1572 int stat = 0; 1571 int stat = 0;
@@ -1679,7 +1678,7 @@ static struct ddb_info ddb_v6 = {
1679 .subvendor = _subvend, .subdevice = _subdev, \ 1678 .subvendor = _subvend, .subdevice = _subdev, \
1680 .driver_data = (unsigned long)&_driverdata } 1679 .driver_data = (unsigned long)&_driverdata }
1681 1680
1682static const struct pci_device_id ddb_id_tbl[] __devinitdata = { 1681static const struct pci_device_id ddb_id_tbl[] = {
1683 DDB_ID(DDVID, 0x0002, DDVID, 0x0001, ddb_octopus), 1682 DDB_ID(DDVID, 0x0002, DDVID, 0x0001, ddb_octopus),
1684 DDB_ID(DDVID, 0x0003, DDVID, 0x0001, ddb_octopus), 1683 DDB_ID(DDVID, 0x0003, DDVID, 0x0001, ddb_octopus),
1685 DDB_ID(DDVID, 0x0003, DDVID, 0x0002, ddb_octopus_le), 1684 DDB_ID(DDVID, 0x0003, DDVID, 0x0002, ddb_octopus_le),
@@ -1696,7 +1695,7 @@ static struct pci_driver ddb_pci_driver = {
1696 .name = "DDBridge", 1695 .name = "DDBridge",
1697 .id_table = ddb_id_tbl, 1696 .id_table = ddb_id_tbl,
1698 .probe = ddb_probe, 1697 .probe = ddb_probe,
1699 .remove = __devexit_p(ddb_remove), 1698 .remove = ddb_remove,
1700}; 1699};
1701 1700
1702static __init int module_init_ddbridge(void) 1701static __init int module_init_ddbridge(void)
diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c
index f288ffcc4b6b..904c3ea350f5 100644
--- a/drivers/media/pci/dm1105/dm1105.c
+++ b/drivers/media/pci/dm1105/dm1105.c
@@ -616,7 +616,7 @@ static void dm1105_set_dma_addr(struct dm1105_dev *dev)
616 dm_writel(DM1105_STADR, cpu_to_le32(dev->dma_addr)); 616 dm_writel(DM1105_STADR, cpu_to_le32(dev->dma_addr));
617} 617}
618 618
619static int __devinit dm1105_dma_map(struct dm1105_dev *dev) 619static int dm1105_dma_map(struct dm1105_dev *dev)
620{ 620{
621 dev->ts_buf = pci_alloc_consistent(dev->pdev, 621 dev->ts_buf = pci_alloc_consistent(dev->pdev,
622 6 * DM1105_DMA_BYTES, 622 6 * DM1105_DMA_BYTES,
@@ -736,7 +736,7 @@ static irqreturn_t dm1105_irq(int irq, void *dev_id)
736 return IRQ_HANDLED; 736 return IRQ_HANDLED;
737} 737}
738 738
739static int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) 739static int dm1105_ir_init(struct dm1105_dev *dm1105)
740{ 740{
741 struct rc_dev *dev; 741 struct rc_dev *dev;
742 int err = -ENOMEM; 742 int err = -ENOMEM;
@@ -776,12 +776,12 @@ static int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
776 return 0; 776 return 0;
777} 777}
778 778
779static void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105) 779static void dm1105_ir_exit(struct dm1105_dev *dm1105)
780{ 780{
781 rc_unregister_device(dm1105->ir.dev); 781 rc_unregister_device(dm1105->ir.dev);
782} 782}
783 783
784static int __devinit dm1105_hw_init(struct dm1105_dev *dev) 784static int dm1105_hw_init(struct dm1105_dev *dev)
785{ 785{
786 dm1105_disable_irqs(dev); 786 dm1105_disable_irqs(dev);
787 787
@@ -849,7 +849,7 @@ static struct ds3000_config dvbworld_ds3000_config = {
849 .demod_address = 0x68, 849 .demod_address = 0x68,
850}; 850};
851 851
852static int __devinit frontend_init(struct dm1105_dev *dev) 852static int frontend_init(struct dm1105_dev *dev)
853{ 853{
854 int ret; 854 int ret;
855 855
@@ -949,7 +949,7 @@ static int __devinit frontend_init(struct dm1105_dev *dev)
949 return 0; 949 return 0;
950} 950}
951 951
952static void __devinit dm1105_read_mac(struct dm1105_dev *dev, u8 *mac) 952static void dm1105_read_mac(struct dm1105_dev *dev, u8 *mac)
953{ 953{
954 static u8 command[1] = { 0x28 }; 954 static u8 command[1] = { 0x28 };
955 955
@@ -971,7 +971,7 @@ static void __devinit dm1105_read_mac(struct dm1105_dev *dev, u8 *mac)
971 dev_info(&dev->pdev->dev, "MAC %pM\n", mac); 971 dev_info(&dev->pdev->dev, "MAC %pM\n", mac);
972} 972}
973 973
974static int __devinit dm1105_probe(struct pci_dev *pdev, 974static int dm1105_probe(struct pci_dev *pdev,
975 const struct pci_device_id *ent) 975 const struct pci_device_id *ent)
976{ 976{
977 struct dm1105_dev *dev; 977 struct dm1105_dev *dev;
@@ -1174,7 +1174,7 @@ err_kfree:
1174 return ret; 1174 return ret;
1175} 1175}
1176 1176
1177static void __devexit dm1105_remove(struct pci_dev *pdev) 1177static void dm1105_remove(struct pci_dev *pdev)
1178{ 1178{
1179 struct dm1105_dev *dev = pci_get_drvdata(pdev); 1179 struct dm1105_dev *dev = pci_get_drvdata(pdev);
1180 struct dvb_adapter *dvb_adapter = &dev->dvb_adapter; 1180 struct dvb_adapter *dvb_adapter = &dev->dvb_adapter;
@@ -1207,7 +1207,7 @@ static void __devexit dm1105_remove(struct pci_dev *pdev)
1207 kfree(dev); 1207 kfree(dev);
1208} 1208}
1209 1209
1210static struct pci_device_id dm1105_id_table[] __devinitdata = { 1210static struct pci_device_id dm1105_id_table[] = {
1211 { 1211 {
1212 .vendor = PCI_VENDOR_ID_TRIGEM, 1212 .vendor = PCI_VENDOR_ID_TRIGEM,
1213 .device = PCI_DEVICE_ID_DM1105, 1213 .device = PCI_DEVICE_ID_DM1105,
@@ -1229,7 +1229,7 @@ static struct pci_driver dm1105_driver = {
1229 .name = DRIVER_NAME, 1229 .name = DRIVER_NAME,
1230 .id_table = dm1105_id_table, 1230 .id_table = dm1105_id_table,
1231 .probe = dm1105_probe, 1231 .probe = dm1105_probe,
1232 .remove = __devexit_p(dm1105_remove), 1232 .remove = dm1105_remove,
1233}; 1233};
1234 1234
1235static int __init dm1105_init(void) 1235static int __init dm1105_init(void)
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c
index 74e9a5032364..df88dc4ab555 100644
--- a/drivers/media/pci/ivtv/ivtv-driver.c
+++ b/drivers/media/pci/ivtv/ivtv-driver.c
@@ -73,7 +73,7 @@ int (*ivtv_ext_init)(struct ivtv *);
73EXPORT_SYMBOL(ivtv_ext_init); 73EXPORT_SYMBOL(ivtv_ext_init);
74 74
75/* add your revision and whatnot here */ 75/* add your revision and whatnot here */
76static struct pci_device_id ivtv_pci_tbl[] __devinitdata = { 76static struct pci_device_id ivtv_pci_tbl[] = {
77 {PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV15, 77 {PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV15,
78 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 78 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
79 {PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV16, 79 {PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV16,
@@ -736,7 +736,7 @@ done:
736 No assumptions on the card type may be made here (see ivtv_init_struct2 736 No assumptions on the card type may be made here (see ivtv_init_struct2
737 for that). 737 for that).
738 */ 738 */
739static int __devinit ivtv_init_struct1(struct ivtv *itv) 739static int ivtv_init_struct1(struct ivtv *itv)
740{ 740{
741 struct sched_param param = { .sched_priority = 99 }; 741 struct sched_param param = { .sched_priority = 99 };
742 742
@@ -802,7 +802,7 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv)
802 802
803/* Second initialization part. Here the card type has been 803/* Second initialization part. Here the card type has been
804 autodetected. */ 804 autodetected. */
805static void __devinit ivtv_init_struct2(struct ivtv *itv) 805static void ivtv_init_struct2(struct ivtv *itv)
806{ 806{
807 int i; 807 int i;
808 808
@@ -1001,8 +1001,7 @@ static void ivtv_load_and_init_modules(struct ivtv *itv)
1001 } 1001 }
1002} 1002}
1003 1003
1004static int __devinit ivtv_probe(struct pci_dev *pdev, 1004static int ivtv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
1005 const struct pci_device_id *pci_id)
1006{ 1005{
1007 int retval = 0; 1006 int retval = 0;
1008 int vbi_buf_size; 1007 int vbi_buf_size;
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index cc0251e01077..6fe9fe5293dc 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -151,7 +151,8 @@ static irqreturn_t hopper_irq_handler(int irq, void *dev_id)
151 return IRQ_HANDLED; 151 return IRQ_HANDLED;
152} 152}
153 153
154static int __devinit hopper_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) 154static int hopper_pci_probe(struct pci_dev *pdev,
155 const struct pci_device_id *pci_id)
155{ 156{
156 struct mantis_pci *mantis; 157 struct mantis_pci *mantis;
157 struct mantis_hwconfig *config; 158 struct mantis_hwconfig *config;
@@ -230,7 +231,7 @@ fail0:
230 return err; 231 return err;
231} 232}
232 233
233static void __devexit hopper_pci_remove(struct pci_dev *pdev) 234static void hopper_pci_remove(struct pci_dev *pdev)
234{ 235{
235 struct mantis_pci *mantis = pci_get_drvdata(pdev); 236 struct mantis_pci *mantis = pci_get_drvdata(pdev);
236 237
@@ -259,12 +260,12 @@ static struct pci_driver hopper_pci_driver = {
259 .remove = hopper_pci_remove, 260 .remove = hopper_pci_remove,
260}; 261};
261 262
262static int __devinit hopper_init(void) 263static int hopper_init(void)
263{ 264{
264 return pci_register_driver(&hopper_pci_driver); 265 return pci_register_driver(&hopper_pci_driver);
265} 266}
266 267
267static void __devexit hopper_exit(void) 268static void hopper_exit(void)
268{ 269{
269 return pci_unregister_driver(&hopper_pci_driver); 270 return pci_unregister_driver(&hopper_pci_driver);
270} 271}
diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c
index 0207d1f064e0..932a0d73a7f8 100644
--- a/drivers/media/pci/mantis/mantis_cards.c
+++ b/drivers/media/pci/mantis/mantis_cards.c
@@ -159,7 +159,8 @@ static irqreturn_t mantis_irq_handler(int irq, void *dev_id)
159 return IRQ_HANDLED; 159 return IRQ_HANDLED;
160} 160}
161 161
162static int __devinit mantis_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) 162static int mantis_pci_probe(struct pci_dev *pdev,
163 const struct pci_device_id *pci_id)
163{ 164{
164 struct mantis_pci *mantis; 165 struct mantis_pci *mantis;
165 struct mantis_hwconfig *config; 166 struct mantis_hwconfig *config;
@@ -249,7 +250,7 @@ fail0:
249 return err; 250 return err;
250} 251}
251 252
252static void __devexit mantis_pci_remove(struct pci_dev *pdev) 253static void mantis_pci_remove(struct pci_dev *pdev)
253{ 254{
254 struct mantis_pci *mantis = pci_get_drvdata(pdev); 255 struct mantis_pci *mantis = pci_get_drvdata(pdev);
255 256
@@ -289,12 +290,12 @@ static struct pci_driver mantis_pci_driver = {
289 .remove = mantis_pci_remove, 290 .remove = mantis_pci_remove,
290}; 291};
291 292
292static int __devinit mantis_init(void) 293static int mantis_init(void)
293{ 294{
294 return pci_register_driver(&mantis_pci_driver); 295 return pci_register_driver(&mantis_pci_driver);
295} 296}
296 297
297static void __devexit mantis_exit(void) 298static void mantis_exit(void)
298{ 299{
299 return pci_unregister_driver(&mantis_pci_driver); 300 return pci_unregister_driver(&mantis_pci_driver);
300} 301}
diff --git a/drivers/media/pci/mantis/mantis_dvb.c b/drivers/media/pci/mantis/mantis_dvb.c
index 5d15c6b74d9b..5a71e1791cf5 100644
--- a/drivers/media/pci/mantis/mantis_dvb.c
+++ b/drivers/media/pci/mantis/mantis_dvb.c
@@ -144,7 +144,7 @@ static int mantis_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
144 return 0; 144 return 0;
145} 145}
146 146
147int __devinit mantis_dvb_init(struct mantis_pci *mantis) 147int mantis_dvb_init(struct mantis_pci *mantis)
148{ 148{
149 struct mantis_hwconfig *config = mantis->hwconfig; 149 struct mantis_hwconfig *config = mantis->hwconfig;
150 int result = -1; 150 int result = -1;
@@ -271,7 +271,7 @@ err0:
271} 271}
272EXPORT_SYMBOL_GPL(mantis_dvb_init); 272EXPORT_SYMBOL_GPL(mantis_dvb_init);
273 273
274int __devexit mantis_dvb_exit(struct mantis_pci *mantis) 274int mantis_dvb_exit(struct mantis_pci *mantis)
275{ 275{
276 int err; 276 int err;
277 277
diff --git a/drivers/media/pci/mantis/mantis_i2c.c b/drivers/media/pci/mantis/mantis_i2c.c
index e7794517fe26..937fb9d50213 100644
--- a/drivers/media/pci/mantis/mantis_i2c.c
+++ b/drivers/media/pci/mantis/mantis_i2c.c
@@ -217,7 +217,7 @@ static struct i2c_algorithm mantis_algo = {
217 .functionality = mantis_i2c_func, 217 .functionality = mantis_i2c_func,
218}; 218};
219 219
220int __devinit mantis_i2c_init(struct mantis_pci *mantis) 220int mantis_i2c_init(struct mantis_pci *mantis)
221{ 221{
222 u32 intstat, intmask; 222 u32 intstat, intmask;
223 struct i2c_adapter *i2c_adapter = &mantis->adapter; 223 struct i2c_adapter *i2c_adapter = &mantis->adapter;
diff --git a/drivers/media/pci/mantis/mantis_pci.c b/drivers/media/pci/mantis/mantis_pci.c
index 371558af2d96..a846036ea022 100644
--- a/drivers/media/pci/mantis/mantis_pci.c
+++ b/drivers/media/pci/mantis/mantis_pci.c
@@ -46,7 +46,7 @@
46 46
47#define DRIVER_NAME "Mantis Core" 47#define DRIVER_NAME "Mantis Core"
48 48
49int __devinit mantis_pci_init(struct mantis_pci *mantis) 49int mantis_pci_init(struct mantis_pci *mantis)
50{ 50{
51 u8 latency; 51 u8 latency;
52 struct mantis_hwconfig *config = mantis->hwconfig; 52 struct mantis_hwconfig *config = mantis->hwconfig;
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index ae7d32027bf7..049e18667cd0 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -1728,8 +1728,7 @@ static int meye_resume(struct pci_dev *pdev)
1728} 1728}
1729#endif 1729#endif
1730 1730
1731static int __devinit meye_probe(struct pci_dev *pcidev, 1731static int meye_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
1732 const struct pci_device_id *ent)
1733{ 1732{
1734 struct v4l2_device *v4l2_dev = &meye.v4l2_dev; 1733 struct v4l2_device *v4l2_dev = &meye.v4l2_dev;
1735 int ret = -EBUSY; 1734 int ret = -EBUSY;
@@ -1889,7 +1888,7 @@ outnotdev:
1889 return ret; 1888 return ret;
1890} 1889}
1891 1890
1892static void __devexit meye_remove(struct pci_dev *pcidev) 1891static void meye_remove(struct pci_dev *pcidev)
1893{ 1892{
1894 video_unregister_device(meye.vdev); 1893 video_unregister_device(meye.vdev);
1895 1894
@@ -1935,7 +1934,7 @@ static struct pci_driver meye_driver = {
1935 .name = "meye", 1934 .name = "meye",
1936 .id_table = meye_pci_tbl, 1935 .id_table = meye_pci_tbl,
1937 .probe = meye_probe, 1936 .probe = meye_probe,
1938 .remove = __devexit_p(meye_remove), 1937 .remove = meye_remove,
1939#ifdef CONFIG_PM 1938#ifdef CONFIG_PM
1940 .suspend = meye_suspend, 1939 .suspend = meye_suspend,
1941 .resume = meye_resume, 1940 .resume = meye_resume,
diff --git a/drivers/media/pci/ngene/ngene-cards.c b/drivers/media/pci/ngene/ngene-cards.c
index b38bce529566..fad214113669 100644
--- a/drivers/media/pci/ngene/ngene-cards.c
+++ b/drivers/media/pci/ngene/ngene-cards.c
@@ -743,7 +743,7 @@ static struct ngene_info ngene_info_terratec = {
743 743
744/****************************************************************************/ 744/****************************************************************************/
745 745
746static const struct pci_device_id ngene_id_tbl[] __devinitdata = { 746static const struct pci_device_id ngene_id_tbl[] = {
747 NGENE_ID(0x18c3, 0xabc3, ngene_info_cineS2), 747 NGENE_ID(0x18c3, 0xabc3, ngene_info_cineS2),
748 NGENE_ID(0x18c3, 0xabc4, ngene_info_cineS2), 748 NGENE_ID(0x18c3, 0xabc4, ngene_info_cineS2),
749 NGENE_ID(0x18c3, 0xdb01, ngene_info_satixS2), 749 NGENE_ID(0x18c3, 0xdb01, ngene_info_satixS2),
@@ -800,7 +800,7 @@ static struct pci_driver ngene_pci_driver = {
800 .name = "ngene", 800 .name = "ngene",
801 .id_table = ngene_id_tbl, 801 .id_table = ngene_id_tbl,
802 .probe = ngene_probe, 802 .probe = ngene_probe,
803 .remove = __devexit_p(ngene_remove), 803 .remove = ngene_remove,
804 .err_handler = &ngene_errors, 804 .err_handler = &ngene_errors,
805 .shutdown = ngene_shutdown, 805 .shutdown = ngene_shutdown,
806}; 806};
diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c
index 8eeec4f50ccb..37ebc42392ad 100644
--- a/drivers/media/pci/ngene/ngene-core.c
+++ b/drivers/media/pci/ngene/ngene-core.c
@@ -1636,7 +1636,7 @@ void ngene_shutdown(struct pci_dev *pdev)
1636/* device probe/remove calls ************************************************/ 1636/* device probe/remove calls ************************************************/
1637/****************************************************************************/ 1637/****************************************************************************/
1638 1638
1639void __devexit ngene_remove(struct pci_dev *pdev) 1639void ngene_remove(struct pci_dev *pdev)
1640{ 1640{
1641 struct ngene *dev = pci_get_drvdata(pdev); 1641 struct ngene *dev = pci_get_drvdata(pdev);
1642 int i; 1642 int i;
@@ -1652,8 +1652,7 @@ void __devexit ngene_remove(struct pci_dev *pdev)
1652 pci_disable_device(pdev); 1652 pci_disable_device(pdev);
1653} 1653}
1654 1654
1655int __devinit ngene_probe(struct pci_dev *pci_dev, 1655int ngene_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
1656 const struct pci_device_id *id)
1657{ 1656{
1658 struct ngene *dev; 1657 struct ngene *dev;
1659 int stat = 0; 1658 int stat = 0;
diff --git a/drivers/media/pci/ngene/ngene.h b/drivers/media/pci/ngene/ngene.h
index 5443dc0caea5..22c39ff6bfa0 100644
--- a/drivers/media/pci/ngene/ngene.h
+++ b/drivers/media/pci/ngene/ngene.h
@@ -887,9 +887,8 @@ struct ngene_buffer {
887 887
888 888
889/* Provided by ngene-core.c */ 889/* Provided by ngene-core.c */
890int __devinit ngene_probe(struct pci_dev *pci_dev, 890int ngene_probe(struct pci_dev *pci_dev, const struct pci_device_id *id);
891 const struct pci_device_id *id); 891void ngene_remove(struct pci_dev *pdev);
892void __devexit ngene_remove(struct pci_dev *pdev);
893void ngene_shutdown(struct pci_dev *pdev); 892void ngene_shutdown(struct pci_dev *pdev);
894int ngene_command(struct ngene *dev, struct ngene_command *com); 893int ngene_command(struct ngene *dev, struct ngene_command *com);
895int ngene_command_gpio_set(struct ngene *dev, u8 select, u8 level); 894int ngene_command_gpio_set(struct ngene *dev, u8 select, u8 level);
diff --git a/drivers/media/pci/pluto2/pluto2.c b/drivers/media/pci/pluto2/pluto2.c
index f148b19a206a..2290faee5852 100644
--- a/drivers/media/pci/pluto2/pluto2.c
+++ b/drivers/media/pci/pluto2/pluto2.c
@@ -240,7 +240,7 @@ static void pluto_set_dma_addr(struct pluto *pluto)
240 pluto_writereg(pluto, REG_PCAR, pluto->dma_addr); 240 pluto_writereg(pluto, REG_PCAR, pluto->dma_addr);
241} 241}
242 242
243static int __devinit pluto_dma_map(struct pluto *pluto) 243static int pluto_dma_map(struct pluto *pluto)
244{ 244{
245 pluto->dma_addr = pci_map_single(pluto->pdev, pluto->dma_buf, 245 pluto->dma_addr = pci_map_single(pluto->pdev, pluto->dma_buf,
246 TS_DMA_BYTES, PCI_DMA_FROMDEVICE); 246 TS_DMA_BYTES, PCI_DMA_FROMDEVICE);
@@ -368,7 +368,7 @@ static irqreturn_t pluto_irq(int irq, void *dev_id)
368 return IRQ_HANDLED; 368 return IRQ_HANDLED;
369} 369}
370 370
371static void __devinit pluto_enable_irqs(struct pluto *pluto) 371static void pluto_enable_irqs(struct pluto *pluto)
372{ 372{
373 u32 val = pluto_readreg(pluto, REG_TSCR); 373 u32 val = pluto_readreg(pluto, REG_TSCR);
374 374
@@ -394,7 +394,7 @@ static void pluto_disable_irqs(struct pluto *pluto)
394 pluto_write_tscr(pluto, val); 394 pluto_write_tscr(pluto, val);
395} 395}
396 396
397static int __devinit pluto_hw_init(struct pluto *pluto) 397static int pluto_hw_init(struct pluto *pluto)
398{ 398{
399 pluto_reset_frontend(pluto, 1); 399 pluto_reset_frontend(pluto, 1);
400 400
@@ -505,7 +505,7 @@ static int pluto2_request_firmware(struct dvb_frontend *fe,
505 return request_firmware(fw, name, &pluto->pdev->dev); 505 return request_firmware(fw, name, &pluto->pdev->dev);
506} 506}
507 507
508static struct tda1004x_config pluto2_fe_config __devinitdata = { 508static struct tda1004x_config pluto2_fe_config = {
509 .demod_address = I2C_ADDR_TDA10046 >> 1, 509 .demod_address = I2C_ADDR_TDA10046 >> 1,
510 .invert = 1, 510 .invert = 1,
511 .invert_oclk = 0, 511 .invert_oclk = 0,
@@ -515,7 +515,7 @@ static struct tda1004x_config pluto2_fe_config __devinitdata = {
515 .request_firmware = pluto2_request_firmware, 515 .request_firmware = pluto2_request_firmware,
516}; 516};
517 517
518static int __devinit frontend_init(struct pluto *pluto) 518static int frontend_init(struct pluto *pluto)
519{ 519{
520 int ret; 520 int ret;
521 521
@@ -536,14 +536,14 @@ static int __devinit frontend_init(struct pluto *pluto)
536 return 0; 536 return 0;
537} 537}
538 538
539static void __devinit pluto_read_rev(struct pluto *pluto) 539static void pluto_read_rev(struct pluto *pluto)
540{ 540{
541 u32 val = pluto_readreg(pluto, REG_MISC) & MISC_DVR; 541 u32 val = pluto_readreg(pluto, REG_MISC) & MISC_DVR;
542 dev_info(&pluto->pdev->dev, "board revision %d.%d\n", 542 dev_info(&pluto->pdev->dev, "board revision %d.%d\n",
543 (val >> 12) & 0x0f, (val >> 4) & 0xff); 543 (val >> 12) & 0x0f, (val >> 4) & 0xff);
544} 544}
545 545
546static void __devinit pluto_read_mac(struct pluto *pluto, u8 *mac) 546static void pluto_read_mac(struct pluto *pluto, u8 *mac)
547{ 547{
548 u32 val = pluto_readreg(pluto, REG_MMAC); 548 u32 val = pluto_readreg(pluto, REG_MMAC);
549 mac[0] = (val >> 8) & 0xff; 549 mac[0] = (val >> 8) & 0xff;
@@ -560,7 +560,7 @@ static void __devinit pluto_read_mac(struct pluto *pluto, u8 *mac)
560 dev_info(&pluto->pdev->dev, "MAC %pM\n", mac); 560 dev_info(&pluto->pdev->dev, "MAC %pM\n", mac);
561} 561}
562 562
563static int __devinit pluto_read_serial(struct pluto *pluto) 563static int pluto_read_serial(struct pluto *pluto)
564{ 564{
565 struct pci_dev *pdev = pluto->pdev; 565 struct pci_dev *pdev = pluto->pdev;
566 unsigned int i, j; 566 unsigned int i, j;
@@ -588,8 +588,7 @@ out:
588 return 0; 588 return 0;
589} 589}
590 590
591static int __devinit pluto2_probe(struct pci_dev *pdev, 591static int pluto2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
592 const struct pci_device_id *ent)
593{ 592{
594 struct pluto *pluto; 593 struct pluto *pluto;
595 struct dvb_adapter *dvb_adapter; 594 struct dvb_adapter *dvb_adapter;
@@ -742,7 +741,7 @@ err_kfree:
742 goto out; 741 goto out;
743} 742}
744 743
745static void __devexit pluto2_remove(struct pci_dev *pdev) 744static void pluto2_remove(struct pci_dev *pdev)
746{ 745{
747 struct pluto *pluto = pci_get_drvdata(pdev); 746 struct pluto *pluto = pci_get_drvdata(pdev);
748 struct dvb_adapter *dvb_adapter = &pluto->dvb_adapter; 747 struct dvb_adapter *dvb_adapter = &pluto->dvb_adapter;
@@ -777,7 +776,7 @@ static void __devexit pluto2_remove(struct pci_dev *pdev)
777#define PCI_DEVICE_ID_PLUTO2 0x0001 776#define PCI_DEVICE_ID_PLUTO2 0x0001
778#endif 777#endif
779 778
780static struct pci_device_id pluto2_id_table[] __devinitdata = { 779static struct pci_device_id pluto2_id_table[] = {
781 { 780 {
782 .vendor = PCI_VENDOR_ID_SCM, 781 .vendor = PCI_VENDOR_ID_SCM,
783 .device = PCI_DEVICE_ID_PLUTO2, 782 .device = PCI_DEVICE_ID_PLUTO2,
@@ -794,7 +793,7 @@ static struct pci_driver pluto2_driver = {
794 .name = DRIVER_NAME, 793 .name = DRIVER_NAME,
795 .id_table = pluto2_id_table, 794 .id_table = pluto2_id_table,
796 .probe = pluto2_probe, 795 .probe = pluto2_probe,
797 .remove = __devexit_p(pluto2_remove), 796 .remove = pluto2_remove,
798}; 797};
799 798
800static int __init pluto2_init(void) 799static int __init pluto2_init(void)
diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c
index 15b35c4725f1..e9211086df49 100644
--- a/drivers/media/pci/pt1/pt1.c
+++ b/drivers/media/pci/pt1/pt1.c
@@ -1058,7 +1058,7 @@ static void pt1_i2c_init(struct pt1 *pt1)
1058 pt1_i2c_emit(pt1, i, 0, 0, 1, 1, 0); 1058 pt1_i2c_emit(pt1, i, 0, 0, 1, 1, 0);
1059} 1059}
1060 1060
1061static void __devexit pt1_remove(struct pci_dev *pdev) 1061static void pt1_remove(struct pci_dev *pdev)
1062{ 1062{
1063 struct pt1 *pt1; 1063 struct pt1 *pt1;
1064 void __iomem *regs; 1064 void __iomem *regs;
@@ -1083,8 +1083,7 @@ static void __devexit pt1_remove(struct pci_dev *pdev)
1083 pci_disable_device(pdev); 1083 pci_disable_device(pdev);
1084} 1084}
1085 1085
1086static int __devinit 1086static int pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1087pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1088{ 1087{
1089 int ret; 1088 int ret;
1090 void __iomem *regs; 1089 void __iomem *regs;
@@ -1222,7 +1221,7 @@ MODULE_DEVICE_TABLE(pci, pt1_id_table);
1222static struct pci_driver pt1_driver = { 1221static struct pci_driver pt1_driver = {
1223 .name = DRIVER_NAME, 1222 .name = DRIVER_NAME,
1224 .probe = pt1_probe, 1223 .probe = pt1_probe,
1225 .remove = __devexit_p(pt1_remove), 1224 .remove = pt1_remove,
1226 .id_table = pt1_id_table, 1225 .id_table = pt1_id_table,
1227}; 1226};
1228 1227
diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c
index 8976d0e65813..e359d200d698 100644
--- a/drivers/media/pci/saa7134/saa7134-core.c
+++ b/drivers/media/pci/saa7134/saa7134-core.c
@@ -754,7 +754,7 @@ static int saa7134_hwfini(struct saa7134_dev *dev)
754 return 0; 754 return 0;
755} 755}
756 756
757static void __devinit must_configure_manually(int has_eeprom) 757static void must_configure_manually(int has_eeprom)
758{ 758{
759 unsigned int i,p; 759 unsigned int i,p;
760 760
@@ -860,8 +860,8 @@ static void mpeg_ops_detach(struct saa7134_mpeg_ops *ops,
860 dev->mops = NULL; 860 dev->mops = NULL;
861} 861}
862 862
863static int __devinit saa7134_initdev(struct pci_dev *pci_dev, 863static int saa7134_initdev(struct pci_dev *pci_dev,
864 const struct pci_device_id *pci_id) 864 const struct pci_device_id *pci_id)
865{ 865{
866 struct saa7134_dev *dev; 866 struct saa7134_dev *dev;
867 struct saa7134_mpeg_ops *mops; 867 struct saa7134_mpeg_ops *mops;
@@ -1102,7 +1102,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
1102 return err; 1102 return err;
1103} 1103}
1104 1104
1105static void __devexit saa7134_finidev(struct pci_dev *pci_dev) 1105static void saa7134_finidev(struct pci_dev *pci_dev)
1106{ 1106{
1107 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); 1107 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev);
1108 struct saa7134_dev *dev = container_of(v4l2_dev, struct saa7134_dev, v4l2_dev); 1108 struct saa7134_dev *dev = container_of(v4l2_dev, struct saa7134_dev, v4l2_dev);
@@ -1322,7 +1322,7 @@ static struct pci_driver saa7134_pci_driver = {
1322 .name = "saa7134", 1322 .name = "saa7134",
1323 .id_table = saa7134_pci_tbl, 1323 .id_table = saa7134_pci_tbl,
1324 .probe = saa7134_initdev, 1324 .probe = saa7134_initdev,
1325 .remove = __devexit_p(saa7134_finidev), 1325 .remove = saa7134_finidev,
1326#ifdef CONFIG_PM 1326#ifdef CONFIG_PM
1327 .suspend = saa7134_suspend, 1327 .suspend = saa7134_suspend,
1328 .resume = saa7134_resume 1328 .resume = saa7134_resume
diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h
index c24b6512bd8f..075908fae4d9 100644
--- a/drivers/media/pci/saa7134/saa7134.h
+++ b/drivers/media/pci/saa7134/saa7134.h
@@ -739,7 +739,7 @@ extern int (*saa7134_dmasound_exit)(struct saa7134_dev *dev);
739 739
740extern struct saa7134_board saa7134_boards[]; 740extern struct saa7134_board saa7134_boards[];
741extern const unsigned int saa7134_bcount; 741extern const unsigned int saa7134_bcount;
742extern struct pci_device_id __devinitdata saa7134_pci_tbl[]; 742extern struct pci_device_id saa7134_pci_tbl[];
743 743
744extern int saa7134_board_init1(struct saa7134_dev *dev); 744extern int saa7134_board_init1(struct saa7134_dev *dev);
745extern int saa7134_board_init2(struct saa7134_dev *dev); 745extern int saa7134_board_init2(struct saa7134_dev *dev);
diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c
index 063047f56766..63502e7a2a76 100644
--- a/drivers/media/pci/saa7164/saa7164-core.c
+++ b/drivers/media/pci/saa7164/saa7164-core.c
@@ -1185,8 +1185,8 @@ static int saa7164_thread_function(void *data)
1185 return 0; 1185 return 0;
1186} 1186}
1187 1187
1188static int __devinit saa7164_initdev(struct pci_dev *pci_dev, 1188static int saa7164_initdev(struct pci_dev *pci_dev,
1189 const struct pci_device_id *pci_id) 1189 const struct pci_device_id *pci_id)
1190{ 1190{
1191 struct saa7164_dev *dev; 1191 struct saa7164_dev *dev;
1192 int err, i; 1192 int err, i;
@@ -1376,7 +1376,7 @@ static void saa7164_shutdown(struct saa7164_dev *dev)
1376 dprintk(1, "%s()\n", __func__); 1376 dprintk(1, "%s()\n", __func__);
1377} 1377}
1378 1378
1379static void __devexit saa7164_finidev(struct pci_dev *pci_dev) 1379static void saa7164_finidev(struct pci_dev *pci_dev)
1380{ 1380{
1381 struct saa7164_dev *dev = pci_get_drvdata(pci_dev); 1381 struct saa7164_dev *dev = pci_get_drvdata(pci_dev);
1382 1382
@@ -1459,7 +1459,7 @@ static struct pci_driver saa7164_pci_driver = {
1459 .name = "saa7164", 1459 .name = "saa7164",
1460 .id_table = saa7164_pci_tbl, 1460 .id_table = saa7164_pci_tbl,
1461 .probe = saa7164_initdev, 1461 .probe = saa7164_initdev,
1462 .remove = __devexit_p(saa7164_finidev), 1462 .remove = saa7164_finidev,
1463 /* TODO */ 1463 /* TODO */
1464 .suspend = NULL, 1464 .suspend = NULL,
1465 .resume = NULL, 1465 .resume = NULL,
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c
index 4c10205264d4..27ae48842656 100644
--- a/drivers/media/pci/sta2x11/sta2x11_vip.c
+++ b/drivers/media/pci/sta2x11/sta2x11_vip.c
@@ -1205,8 +1205,8 @@ static void vip_gpio_release(struct device *dev, int pin, const char *name)
1205 * 1205 *
1206 * -ENODEV, device could not be detected or registered 1206 * -ENODEV, device could not be detected or registered
1207 */ 1207 */
1208static int __devinit sta2x11_vip_init_one(struct pci_dev *pdev, 1208static int sta2x11_vip_init_one(struct pci_dev *pdev,
1209 const struct pci_device_id *ent) 1209 const struct pci_device_id *ent)
1210{ 1210{
1211 int ret; 1211 int ret;
1212 struct sta2x11_vip *vip; 1212 struct sta2x11_vip *vip;
@@ -1376,7 +1376,7 @@ disable:
1376 * free memory 1376 * free memory
1377 * free GPIO pins 1377 * free GPIO pins
1378 */ 1378 */
1379static void __devexit sta2x11_vip_remove_one(struct pci_dev *pdev) 1379static void sta2x11_vip_remove_one(struct pci_dev *pdev)
1380{ 1380{
1381 struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev); 1381 struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev);
1382 struct sta2x11_vip *vip = 1382 struct sta2x11_vip *vip =
@@ -1517,7 +1517,7 @@ static DEFINE_PCI_DEVICE_TABLE(sta2x11_vip_pci_tbl) = {
1517static struct pci_driver sta2x11_vip_driver = { 1517static struct pci_driver sta2x11_vip_driver = {
1518 .name = DRV_NAME, 1518 .name = DRV_NAME,
1519 .probe = sta2x11_vip_init_one, 1519 .probe = sta2x11_vip_init_one,
1520 .remove = __devexit_p(sta2x11_vip_remove_one), 1520 .remove = sta2x11_vip_remove_one,
1521 .id_table = sta2x11_vip_pci_tbl, 1521 .id_table = sta2x11_vip_pci_tbl,
1522#ifdef CONFIG_PM 1522#ifdef CONFIG_PM
1523 .suspend = sta2x11_vip_suspend, 1523 .suspend = sta2x11_vip_suspend,
diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c
index 4bd8bd56befc..4656d4a10af0 100644
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -2367,8 +2367,8 @@ static int frontend_init(struct av7110 *av7110)
2367 * The same behaviour of missing VSYNC can be duplicated on budget 2367 * The same behaviour of missing VSYNC can be duplicated on budget
2368 * cards, by seting DD1_INIT trigger mode 7 in 3rd nibble. 2368 * cards, by seting DD1_INIT trigger mode 7 in 3rd nibble.
2369 */ 2369 */
2370static int __devinit av7110_attach(struct saa7146_dev* dev, 2370static int av7110_attach(struct saa7146_dev* dev,
2371 struct saa7146_pci_extension_data *pci_ext) 2371 struct saa7146_pci_extension_data *pci_ext)
2372{ 2372{
2373 const int length = TS_WIDTH * TS_HEIGHT; 2373 const int length = TS_WIDTH * TS_HEIGHT;
2374 struct pci_dev *pdev = dev->pci; 2374 struct pci_dev *pdev = dev->pci;
@@ -2761,7 +2761,7 @@ err_kfree_0:
2761 goto out; 2761 goto out;
2762} 2762}
2763 2763
2764static int __devexit av7110_detach(struct saa7146_dev* saa) 2764static int av7110_detach(struct saa7146_dev* saa)
2765{ 2765{
2766 struct av7110 *av7110 = saa->ext_priv; 2766 struct av7110 *av7110 = saa->ext_priv;
2767 dprintk(4, "%p\n", av7110); 2767 dprintk(4, "%p\n", av7110);
@@ -2910,7 +2910,7 @@ static struct saa7146_extension av7110_extension_driver = {
2910 .module = THIS_MODULE, 2910 .module = THIS_MODULE,
2911 .pci_tbl = &pci_tbl[0], 2911 .pci_tbl = &pci_tbl[0],
2912 .attach = av7110_attach, 2912 .attach = av7110_attach,
2913 .detach = __devexit_p(av7110_detach), 2913 .detach = av7110_detach,
2914 2914
2915 .irq_mask = MASK_19 | MASK_03 | MASK_10, 2915 .irq_mask = MASK_19 | MASK_03 | MASK_10,
2916 .irq_func = av7110_irq, 2916 .irq_func = av7110_irq,
diff --git a/drivers/media/pci/ttpci/av7110_ir.c b/drivers/media/pci/ttpci/av7110_ir.c
index 908f272fe26c..eb822862a646 100644
--- a/drivers/media/pci/ttpci/av7110_ir.c
+++ b/drivers/media/pci/ttpci/av7110_ir.c
@@ -324,7 +324,7 @@ static void ir_handler(struct av7110 *av7110, u32 ircom)
324} 324}
325 325
326 326
327int __devinit av7110_ir_init(struct av7110 *av7110) 327int av7110_ir_init(struct av7110 *av7110)
328{ 328{
329 struct input_dev *input_dev; 329 struct input_dev *input_dev;
330 static struct proc_dir_entry *e; 330 static struct proc_dir_entry *e;
@@ -385,7 +385,7 @@ int __devinit av7110_ir_init(struct av7110 *av7110)
385} 385}
386 386
387 387
388void __devexit av7110_ir_exit(struct av7110 *av7110) 388void av7110_ir_exit(struct av7110 *av7110)
389{ 389{
390 int i; 390 int i;
391 391
diff --git a/drivers/media/pci/zoran/zoran_card.c b/drivers/media/pci/zoran/zoran_card.c
index fffc54b452c8..a90a3b9b09bf 100644
--- a/drivers/media/pci/zoran/zoran_card.c
+++ b/drivers/media/pci/zoran/zoran_card.c
@@ -369,7 +369,7 @@ static const unsigned short bt819_addrs[] = { 0x45, I2C_CLIENT_END };
369static const unsigned short bt856_addrs[] = { 0x44, I2C_CLIENT_END }; 369static const unsigned short bt856_addrs[] = { 0x44, I2C_CLIENT_END };
370static const unsigned short bt866_addrs[] = { 0x44, I2C_CLIENT_END }; 370static const unsigned short bt866_addrs[] = { 0x44, I2C_CLIENT_END };
371 371
372static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { 372static struct card_info zoran_cards[NUM_CARDS] = {
373 { 373 {
374 .type = DC10_old, 374 .type = DC10_old,
375 .name = "DC10(old)", 375 .name = "DC10(old)",
@@ -948,8 +948,7 @@ zoran_open_init_params (struct zoran *zr)
948 zr->testing = 0; 948 zr->testing = 0;
949} 949}
950 950
951static void __devinit 951static void test_interrupts (struct zoran *zr)
952test_interrupts (struct zoran *zr)
953{ 952{
954 DEFINE_WAIT(wait); 953 DEFINE_WAIT(wait);
955 int timeout, icr; 954 int timeout, icr;
@@ -974,8 +973,7 @@ test_interrupts (struct zoran *zr)
974 btwrite(icr, ZR36057_ICR); 973 btwrite(icr, ZR36057_ICR);
975} 974}
976 975
977static int __devinit 976static int zr36057_init (struct zoran *zr)
978zr36057_init (struct zoran *zr)
979{ 977{
980 int j, err; 978 int j, err;
981 979
@@ -1083,7 +1081,7 @@ exit_free:
1083 return err; 1081 return err;
1084} 1082}
1085 1083
1086static void __devexit zoran_remove(struct pci_dev *pdev) 1084static void zoran_remove(struct pci_dev *pdev)
1087{ 1085{
1088 struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev); 1086 struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev);
1089 struct zoran *zr = to_zoran(v4l2_dev); 1087 struct zoran *zr = to_zoran(v4l2_dev);
@@ -1129,9 +1127,8 @@ zoran_vdev_release (struct video_device *vdev)
1129 kfree(vdev); 1127 kfree(vdev);
1130} 1128}
1131 1129
1132static struct videocodec_master * __devinit 1130static struct videocodec_master *zoran_setup_videocodec(struct zoran *zr,
1133zoran_setup_videocodec (struct zoran *zr, 1131 int type)
1134 int type)
1135{ 1132{
1136 struct videocodec_master *m = NULL; 1133 struct videocodec_master *m = NULL;
1137 1134
@@ -1192,8 +1189,7 @@ static void zoran_subdev_notify(struct v4l2_subdev *sd, unsigned int cmd, void *
1192 * Scan for a Buz card (actually for the PCI controller ZR36057), 1189 * Scan for a Buz card (actually for the PCI controller ZR36057),
1193 * request the irq and map the io memory 1190 * request the irq and map the io memory
1194 */ 1191 */
1195static int __devinit zoran_probe(struct pci_dev *pdev, 1192static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1196 const struct pci_device_id *ent)
1197{ 1193{
1198 unsigned char latency, need_latency; 1194 unsigned char latency, need_latency;
1199 struct zoran *zr; 1195 struct zoran *zr;
@@ -1459,7 +1455,7 @@ static struct pci_driver zoran_driver = {
1459 .name = "zr36067", 1455 .name = "zr36067",
1460 .id_table = zr36067_pci_tbl, 1456 .id_table = zr36067_pci_tbl,
1461 .probe = zoran_probe, 1457 .probe = zoran_probe,
1462 .remove = __devexit_p(zoran_remove), 1458 .remove = zoran_remove,
1463}; 1459};
1464 1460
1465static int __init zoran_init(void) 1461static int __init zoran_init(void)
diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c
index 53f12c7466b0..e60ae41e2319 100644
--- a/drivers/media/pci/zoran/zoran_driver.c
+++ b/drivers/media/pci/zoran/zoran_driver.c
@@ -3080,7 +3080,7 @@ static const struct v4l2_file_operations zoran_fops = {
3080 .poll = zoran_poll, 3080 .poll = zoran_poll,
3081}; 3081};
3082 3082
3083struct video_device zoran_template __devinitdata = { 3083struct video_device zoran_template = {
3084 .name = ZORAN_NAME, 3084 .name = ZORAN_NAME,
3085 .fops = &zoran_fops, 3085 .fops = &zoran_fops,
3086 .ioctl_ops = &zoran_ioctl_ops, 3086 .ioctl_ops = &zoran_ioctl_ops,
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
index ec476ef5b709..1aad2a65d2f3 100644
--- a/drivers/media/platform/blackfin/bfin_capture.c
+++ b/drivers/media/platform/blackfin/bfin_capture.c
@@ -862,7 +862,7 @@ static struct v4l2_file_operations bcap_fops = {
862 .poll = bcap_poll 862 .poll = bcap_poll
863}; 863};
864 864
865static int __devinit bcap_probe(struct platform_device *pdev) 865static int bcap_probe(struct platform_device *pdev)
866{ 866{
867 struct bcap_device *bcap_dev; 867 struct bcap_device *bcap_dev;
868 struct video_device *vfd; 868 struct video_device *vfd;
@@ -1026,7 +1026,7 @@ err_free_dev:
1026 return ret; 1026 return ret;
1027} 1027}
1028 1028
1029static int __devexit bcap_remove(struct platform_device *pdev) 1029static int bcap_remove(struct platform_device *pdev)
1030{ 1030{
1031 struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); 1031 struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
1032 struct bcap_device *bcap_dev = container_of(v4l2_dev, 1032 struct bcap_device *bcap_dev = container_of(v4l2_dev,
@@ -1048,7 +1048,7 @@ static struct platform_driver bcap_driver = {
1048 .owner = THIS_MODULE, 1048 .owner = THIS_MODULE,
1049 }, 1049 },
1050 .probe = bcap_probe, 1050 .probe = bcap_probe,
1051 .remove = __devexit_p(bcap_remove), 1051 .remove = bcap_remove,
1052}; 1052};
1053module_platform_driver(bcap_driver); 1053module_platform_driver(bcap_driver);
1054 1054
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index 7b8b547f2d51..1cf8293c0fb0 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -1891,7 +1891,7 @@ static const struct of_device_id coda_dt_ids[] = {
1891MODULE_DEVICE_TABLE(of, coda_dt_ids); 1891MODULE_DEVICE_TABLE(of, coda_dt_ids);
1892#endif 1892#endif
1893 1893
1894static int __devinit coda_probe(struct platform_device *pdev) 1894static int coda_probe(struct platform_device *pdev)
1895{ 1895{
1896 const struct of_device_id *of_id = 1896 const struct of_device_id *of_id =
1897 of_match_device(of_match_ptr(coda_dt_ids), &pdev->dev); 1897 of_match_device(of_match_ptr(coda_dt_ids), &pdev->dev);
@@ -2033,7 +2033,7 @@ static int coda_remove(struct platform_device *pdev)
2033 2033
2034static struct platform_driver coda_driver = { 2034static struct platform_driver coda_driver = {
2035 .probe = coda_probe, 2035 .probe = coda_probe,
2036 .remove = __devexit_p(coda_remove), 2036 .remove = coda_remove,
2037 .driver = { 2037 .driver = {
2038 .name = CODA_NAME, 2038 .name = CODA_NAME,
2039 .owner = THIS_MODULE, 2039 .owner = THIS_MODULE,
diff --git a/drivers/media/platform/davinci/dm355_ccdc.c b/drivers/media/platform/davinci/dm355_ccdc.c
index 030950dcfb16..f263cabade7a 100644
--- a/drivers/media/platform/davinci/dm355_ccdc.c
+++ b/drivers/media/platform/davinci/dm355_ccdc.c
@@ -965,7 +965,7 @@ static struct ccdc_hw_device ccdc_hw_dev = {
965 }, 965 },
966}; 966};
967 967
968static int __devinit dm355_ccdc_probe(struct platform_device *pdev) 968static int dm355_ccdc_probe(struct platform_device *pdev)
969{ 969{
970 void (*setup_pinmux)(void); 970 void (*setup_pinmux)(void);
971 struct resource *res; 971 struct resource *res;
@@ -1069,7 +1069,7 @@ static struct platform_driver dm355_ccdc_driver = {
1069 .name = "dm355_ccdc", 1069 .name = "dm355_ccdc",
1070 .owner = THIS_MODULE, 1070 .owner = THIS_MODULE,
1071 }, 1071 },
1072 .remove = __devexit_p(dm355_ccdc_remove), 1072 .remove = dm355_ccdc_remove,
1073 .probe = dm355_ccdc_probe, 1073 .probe = dm355_ccdc_probe,
1074}; 1074};
1075 1075
diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c b/drivers/media/platform/davinci/dm644x_ccdc.c
index 0215ab6ebc90..318e80512998 100644
--- a/drivers/media/platform/davinci/dm644x_ccdc.c
+++ b/drivers/media/platform/davinci/dm644x_ccdc.c
@@ -957,7 +957,7 @@ static struct ccdc_hw_device ccdc_hw_dev = {
957 }, 957 },
958}; 958};
959 959
960static int __devinit dm644x_ccdc_probe(struct platform_device *pdev) 960static int dm644x_ccdc_probe(struct platform_device *pdev)
961{ 961{
962 struct resource *res; 962 struct resource *res;
963 int status = 0; 963 int status = 0;
@@ -1078,7 +1078,7 @@ static struct platform_driver dm644x_ccdc_driver = {
1078 .owner = THIS_MODULE, 1078 .owner = THIS_MODULE,
1079 .pm = &dm644x_ccdc_pm_ops, 1079 .pm = &dm644x_ccdc_pm_ops,
1080 }, 1080 },
1081 .remove = __devexit_p(dm644x_ccdc_remove), 1081 .remove = dm644x_ccdc_remove,
1082 .probe = dm644x_ccdc_probe, 1082 .probe = dm644x_ccdc_probe,
1083}; 1083};
1084 1084
diff --git a/drivers/media/platform/davinci/isif.c b/drivers/media/platform/davinci/isif.c
index 2c26c3e1837e..5050f9265f48 100644
--- a/drivers/media/platform/davinci/isif.c
+++ b/drivers/media/platform/davinci/isif.c
@@ -1032,7 +1032,7 @@ static struct ccdc_hw_device isif_hw_dev = {
1032 }, 1032 },
1033}; 1033};
1034 1034
1035static int __devinit isif_probe(struct platform_device *pdev) 1035static int isif_probe(struct platform_device *pdev)
1036{ 1036{
1037 void (*setup_pinmux)(void); 1037 void (*setup_pinmux)(void);
1038 struct resource *res; 1038 struct resource *res;
@@ -1156,7 +1156,7 @@ static struct platform_driver isif_driver = {
1156 .name = "isif", 1156 .name = "isif",
1157 .owner = THIS_MODULE, 1157 .owner = THIS_MODULE,
1158 }, 1158 },
1159 .remove = __devexit_p(isif_remove), 1159 .remove = isif_remove,
1160 .probe = isif_probe, 1160 .probe = isif_probe,
1161}; 1161};
1162 1162
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 7f5cf9b347b2..841b91a3d255 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -807,7 +807,7 @@ static struct vpbe_device_ops vpbe_dev_ops = {
807 .set_mode = vpbe_set_mode, 807 .set_mode = vpbe_set_mode,
808}; 808};
809 809
810static __devinit int vpbe_probe(struct platform_device *pdev) 810static int vpbe_probe(struct platform_device *pdev)
811{ 811{
812 struct vpbe_device *vpbe_dev; 812 struct vpbe_device *vpbe_dev;
813 struct vpbe_config *cfg; 813 struct vpbe_config *cfg;
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
index 2bfde7958fef..e707a6f2325b 100644
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
@@ -1662,8 +1662,8 @@ static int vpbe_device_get(struct device *dev, void *data)
1662 return 0; 1662 return 0;
1663} 1663}
1664 1664
1665static __devinit int init_vpbe_layer(int i, struct vpbe_display *disp_dev, 1665static int init_vpbe_layer(int i, struct vpbe_display *disp_dev,
1666 struct platform_device *pdev) 1666 struct platform_device *pdev)
1667{ 1667{
1668 struct vpbe_layer *vpbe_display_layer = NULL; 1668 struct vpbe_layer *vpbe_display_layer = NULL;
1669 struct video_device *vbd = NULL; 1669 struct video_device *vbd = NULL;
@@ -1718,9 +1718,10 @@ static __devinit int init_vpbe_layer(int i, struct vpbe_display *disp_dev,
1718 return 0; 1718 return 0;
1719} 1719}
1720 1720
1721static __devinit int register_device(struct vpbe_layer *vpbe_display_layer, 1721static int register_device(struct vpbe_layer *vpbe_display_layer,
1722 struct vpbe_display *disp_dev, 1722 struct vpbe_display *disp_dev,
1723 struct platform_device *pdev) { 1723 struct platform_device *pdev)
1724{
1724 int err; 1725 int err;
1725 1726
1726 v4l2_info(&disp_dev->vpbe_dev->v4l2_dev, 1727 v4l2_info(&disp_dev->vpbe_dev->v4l2_dev,
@@ -1752,7 +1753,7 @@ static __devinit int register_device(struct vpbe_layer *vpbe_display_layer,
1752 * This function creates device entries by register itself to the V4L2 driver 1753 * This function creates device entries by register itself to the V4L2 driver
1753 * and initializes fields of each layer objects 1754 * and initializes fields of each layer objects
1754 */ 1755 */
1755static __devinit int vpbe_display_probe(struct platform_device *pdev) 1756static int vpbe_display_probe(struct platform_device *pdev)
1756{ 1757{
1757 struct vpbe_layer *vpbe_display_layer; 1758 struct vpbe_layer *vpbe_display_layer;
1758 struct vpbe_display *disp_dev; 1759 struct vpbe_display *disp_dev;
@@ -1886,7 +1887,7 @@ static struct platform_driver vpbe_display_driver = {
1886 .bus = &platform_bus_type, 1887 .bus = &platform_bus_type,
1887 }, 1888 },
1888 .probe = vpbe_display_probe, 1889 .probe = vpbe_display_probe,
1889 .remove = __devexit_p(vpbe_display_remove), 1890 .remove = vpbe_display_remove,
1890}; 1891};
1891 1892
1892module_platform_driver(vpbe_display_driver); 1893module_platform_driver(vpbe_display_driver);
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
index 8be492cd8ed4..be9d3e1b4868 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -1831,7 +1831,7 @@ static struct vpfe_device *vpfe_initialize(void)
1831 * itself to the V4L2 driver and initializes fields of each 1831 * itself to the V4L2 driver and initializes fields of each
1832 * device objects 1832 * device objects
1833 */ 1833 */
1834static __devinit int vpfe_probe(struct platform_device *pdev) 1834static int vpfe_probe(struct platform_device *pdev)
1835{ 1835{
1836 struct vpfe_subdev_info *sdinfo; 1836 struct vpfe_subdev_info *sdinfo;
1837 struct vpfe_config *vpfe_cfg; 1837 struct vpfe_config *vpfe_cfg;
@@ -2038,7 +2038,7 @@ probe_free_dev_mem:
2038/* 2038/*
2039 * vpfe_remove : It un-register device from V4L2 driver 2039 * vpfe_remove : It un-register device from V4L2 driver
2040 */ 2040 */
2041static int __devexit vpfe_remove(struct platform_device *pdev) 2041static int vpfe_remove(struct platform_device *pdev)
2042{ 2042{
2043 struct vpfe_device *vpfe_dev = platform_get_drvdata(pdev); 2043 struct vpfe_device *vpfe_dev = platform_get_drvdata(pdev);
2044 2044
@@ -2075,7 +2075,7 @@ static struct platform_driver vpfe_driver = {
2075 .pm = &vpfe_dev_pm_ops, 2075 .pm = &vpfe_dev_pm_ops,
2076 }, 2076 },
2077 .probe = vpfe_probe, 2077 .probe = vpfe_probe,
2078 .remove = __devexit_p(vpfe_remove), 2078 .remove = vpfe_remove,
2079}; 2079};
2080 2080
2081module_platform_driver(vpfe_driver); 2081module_platform_driver(vpfe_driver);
diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
index 0d6cc8e4deb2..28638a86f129 100644
--- a/drivers/media/platform/davinci/vpif.c
+++ b/drivers/media/platform/davinci/vpif.c
@@ -419,7 +419,7 @@ int vpif_channel_getfid(u8 channel_id)
419} 419}
420EXPORT_SYMBOL(vpif_channel_getfid); 420EXPORT_SYMBOL(vpif_channel_getfid);
421 421
422static int __devinit vpif_probe(struct platform_device *pdev) 422static int vpif_probe(struct platform_device *pdev)
423{ 423{
424 int status = 0; 424 int status = 0;
425 425
@@ -457,7 +457,7 @@ fail:
457 return status; 457 return status;
458} 458}
459 459
460static int __devexit vpif_remove(struct platform_device *pdev) 460static int vpif_remove(struct platform_device *pdev)
461{ 461{
462 if (vpif_clk) { 462 if (vpif_clk) {
463 clk_disable_unprepare(vpif_clk); 463 clk_disable_unprepare(vpif_clk);
@@ -498,7 +498,7 @@ static struct platform_driver vpif_driver = {
498 .owner = THIS_MODULE, 498 .owner = THIS_MODULE,
499 .pm = vpif_pm_ops, 499 .pm = vpif_pm_ops,
500 }, 500 },
501 .remove = __devexit_p(vpif_remove), 501 .remove = vpif_remove,
502 .probe = vpif_probe, 502 .probe = vpif_probe,
503}; 503};
504 504
diff --git a/drivers/media/platform/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c
index 146e4b01ac17..cdbff88e0f1e 100644
--- a/drivers/media/platform/davinci/vpss.c
+++ b/drivers/media/platform/davinci/vpss.c
@@ -357,7 +357,7 @@ void dm365_vpss_set_pg_frame_size(struct vpss_pg_frame_size frame_size)
357} 357}
358EXPORT_SYMBOL(dm365_vpss_set_pg_frame_size); 358EXPORT_SYMBOL(dm365_vpss_set_pg_frame_size);
359 359
360static int __devinit vpss_probe(struct platform_device *pdev) 360static int vpss_probe(struct platform_device *pdev)
361{ 361{
362 struct resource *r1, *r2; 362 struct resource *r1, *r2;
363 char *platform_name; 363 char *platform_name;
@@ -445,7 +445,7 @@ fail1:
445 return status; 445 return status;
446} 446}
447 447
448static int __devexit vpss_remove(struct platform_device *pdev) 448static int vpss_remove(struct platform_device *pdev)
449{ 449{
450 struct resource *res; 450 struct resource *res;
451 451
@@ -465,7 +465,7 @@ static struct platform_driver vpss_driver = {
465 .name = "vpss", 465 .name = "vpss",
466 .owner = THIS_MODULE, 466 .owner = THIS_MODULE,
467 }, 467 },
468 .remove = __devexit_p(vpss_remove), 468 .remove = vpss_remove,
469 .probe = vpss_probe, 469 .probe = vpss_probe,
470}; 470};
471 471
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index cc7b218d047c..2b1b9f30e1f9 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -1151,7 +1151,7 @@ err_clk:
1151 return ret; 1151 return ret;
1152} 1152}
1153 1153
1154static int __devexit gsc_remove(struct platform_device *pdev) 1154static int gsc_remove(struct platform_device *pdev)
1155{ 1155{
1156 struct gsc_dev *gsc = platform_get_drvdata(pdev); 1156 struct gsc_dev *gsc = platform_get_drvdata(pdev);
1157 1157
@@ -1237,7 +1237,7 @@ static const struct dev_pm_ops gsc_pm_ops = {
1237 1237
1238static struct platform_driver gsc_driver = { 1238static struct platform_driver gsc_driver = {
1239 .probe = gsc_probe, 1239 .probe = gsc_probe,
1240 .remove = __devexit_p(gsc_remove), 1240 .remove = gsc_remove,
1241 .id_table = gsc_driver_ids, 1241 .id_table = gsc_driver_ids,
1242 .driver = { 1242 .driver = {
1243 .name = GSC_MODULE_NAME, 1243 .name = GSC_MODULE_NAME,
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index a8ddb0cacab8..9115a2c8d075 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -1478,7 +1478,7 @@ static struct video_device viu_template = {
1478 .current_norm = V4L2_STD_NTSC_M, 1478 .current_norm = V4L2_STD_NTSC_M,
1479}; 1479};
1480 1480
1481static int __devinit viu_of_probe(struct platform_device *op) 1481static int viu_of_probe(struct platform_device *op)
1482{ 1482{
1483 struct viu_dev *viu_dev; 1483 struct viu_dev *viu_dev;
1484 struct video_device *vdev; 1484 struct video_device *vdev;
@@ -1615,7 +1615,7 @@ err:
1615 return ret; 1615 return ret;
1616} 1616}
1617 1617
1618static int __devexit viu_of_remove(struct platform_device *op) 1618static int viu_of_remove(struct platform_device *op)
1619{ 1619{
1620 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); 1620 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
1621 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); 1621 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev);
@@ -1668,7 +1668,7 @@ MODULE_DEVICE_TABLE(of, mpc512x_viu_of_match);
1668 1668
1669static struct platform_driver viu_of_platform_driver = { 1669static struct platform_driver viu_of_platform_driver = {
1670 .probe = viu_of_probe, 1670 .probe = viu_of_probe,
1671 .remove = __devexit_p(viu_of_remove), 1671 .remove = viu_of_remove,
1672#ifdef CONFIG_PM 1672#ifdef CONFIG_PM
1673 .suspend = viu_suspend, 1673 .suspend = viu_suspend,
1674 .resume = viu_resume, 1674 .resume = viu_resume,
diff --git a/drivers/media/platform/omap24xxcam.c b/drivers/media/platform/omap24xxcam.c
index 70f45c381318..8b7ccea982e7 100644
--- a/drivers/media/platform/omap24xxcam.c
+++ b/drivers/media/platform/omap24xxcam.c
@@ -1736,7 +1736,7 @@ static struct v4l2_int_device omap24xxcam = {
1736 * 1736 *
1737 */ 1737 */
1738 1738
1739static int __devinit omap24xxcam_probe(struct platform_device *pdev) 1739static int omap24xxcam_probe(struct platform_device *pdev)
1740{ 1740{
1741 struct omap24xxcam_device *cam; 1741 struct omap24xxcam_device *cam;
1742 struct resource *mem; 1742 struct resource *mem;
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index a9f6de5b69d8..e4aaee91201d 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -71,8 +71,6 @@
71#include <media/v4l2-common.h> 71#include <media/v4l2-common.h>
72#include <media/v4l2-device.h> 72#include <media/v4l2-device.h>
73 73
74#include <plat/cpu.h>
75
76#include "isp.h" 74#include "isp.h"
77#include "ispreg.h" 75#include "ispreg.h"
78#include "ispccdc.h" 76#include "ispccdc.h"
@@ -1992,7 +1990,7 @@ error_csiphy:
1992 * 1990 *
1993 * Always returns 0. 1991 * Always returns 0.
1994 */ 1992 */
1995static int __devexit isp_remove(struct platform_device *pdev) 1993static int isp_remove(struct platform_device *pdev)
1996{ 1994{
1997 struct isp_device *isp = platform_get_drvdata(pdev); 1995 struct isp_device *isp = platform_get_drvdata(pdev);
1998 int i; 1996 int i;
@@ -2073,7 +2071,7 @@ static int isp_map_mem_resource(struct platform_device *pdev,
2073 * -EINVAL if couldn't install ISR, 2071 * -EINVAL if couldn't install ISR,
2074 * or clk_get return error value. 2072 * or clk_get return error value.
2075 */ 2073 */
2076static int __devinit isp_probe(struct platform_device *pdev) 2074static int isp_probe(struct platform_device *pdev)
2077{ 2075{
2078 struct isp_platform_data *pdata = pdev->dev.platform_data; 2076 struct isp_platform_data *pdata = pdev->dev.platform_data;
2079 struct isp_device *isp; 2077 struct isp_device *isp;
@@ -2252,7 +2250,7 @@ MODULE_DEVICE_TABLE(platform, omap3isp_id_table);
2252 2250
2253static struct platform_driver omap3isp_driver = { 2251static struct platform_driver omap3isp_driver = {
2254 .probe = isp_probe, 2252 .probe = isp_probe,
2255 .remove = __devexit_p(isp_remove), 2253 .remove = isp_remove,
2256 .id_table = omap3isp_id_table, 2254 .id_table = omap3isp_id_table,
2257 .driver = { 2255 .driver = {
2258 .owner = THIS_MODULE, 2256 .owner = THIS_MODULE,
diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
index 0dd65376c067..e2716c35f8f1 100644
--- a/drivers/media/platform/s3c-camif/camif-core.c
+++ b/drivers/media/platform/s3c-camif/camif-core.c
@@ -531,7 +531,7 @@ err_sd:
531 return ret; 531 return ret;
532} 532}
533 533
534static int __devexit s3c_camif_remove(struct platform_device *pdev) 534static int s3c_camif_remove(struct platform_device *pdev)
535{ 535{
536 struct camif_dev *camif = platform_get_drvdata(pdev); 536 struct camif_dev *camif = platform_get_drvdata(pdev);
537 struct s3c_camif_plat_data *pdata = &camif->pdata; 537 struct s3c_camif_plat_data *pdata = &camif->pdata;
@@ -645,7 +645,7 @@ static const struct dev_pm_ops s3c_camif_pm_ops = {
645 645
646static struct platform_driver s3c_camif_driver = { 646static struct platform_driver s3c_camif_driver = {
647 .probe = s3c_camif_probe, 647 .probe = s3c_camif_probe,
648 .remove = __devexit_p(s3c_camif_remove), 648 .remove = s3c_camif_remove,
649 .id_table = s3c_camif_driver_ids, 649 .id_table = s3c_camif_driver_ids,
650 .driver = { 650 .driver = {
651 .name = S3C_CAMIF_DRIVER_NAME, 651 .name = S3C_CAMIF_DRIVER_NAME,
diff --git a/drivers/media/platform/s5p-fimc/fimc-core.c b/drivers/media/platform/s5p-fimc/fimc-core.c
index 8d0d2b94a135..545b46ae12a1 100644
--- a/drivers/media/platform/s5p-fimc/fimc-core.c
+++ b/drivers/media/platform/s5p-fimc/fimc-core.c
@@ -1035,7 +1035,7 @@ static int fimc_suspend(struct device *dev)
1035} 1035}
1036#endif /* CONFIG_PM_SLEEP */ 1036#endif /* CONFIG_PM_SLEEP */
1037 1037
1038static int __devexit fimc_remove(struct platform_device *pdev) 1038static int fimc_remove(struct platform_device *pdev)
1039{ 1039{
1040 struct fimc_dev *fimc = platform_get_drvdata(pdev); 1040 struct fimc_dev *fimc = platform_get_drvdata(pdev);
1041 1041
@@ -1234,7 +1234,7 @@ static const struct dev_pm_ops fimc_pm_ops = {
1234 1234
1235static struct platform_driver fimc_driver = { 1235static struct platform_driver fimc_driver = {
1236 .probe = fimc_probe, 1236 .probe = fimc_probe,
1237 .remove = __devexit_p(fimc_remove), 1237 .remove = fimc_remove,
1238 .id_table = fimc_driver_ids, 1238 .id_table = fimc_driver_ids,
1239 .driver = { 1239 .driver = {
1240 .name = FIMC_MODULE_NAME, 1240 .name = FIMC_MODULE_NAME,
diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c
index 1b309a72f09f..ed67220d0a64 100644
--- a/drivers/media/platform/s5p-fimc/fimc-lite.c
+++ b/drivers/media/platform/s5p-fimc/fimc-lite.c
@@ -1406,7 +1406,7 @@ static int fimc_lite_clk_get(struct fimc_lite *fimc)
1406 return ret; 1406 return ret;
1407} 1407}
1408 1408
1409static int __devinit fimc_lite_probe(struct platform_device *pdev) 1409static int fimc_lite_probe(struct platform_device *pdev)
1410{ 1410{
1411 struct flite_drvdata *drv_data = fimc_lite_get_drvdata(pdev); 1411 struct flite_drvdata *drv_data = fimc_lite_get_drvdata(pdev);
1412 struct fimc_lite *fimc; 1412 struct fimc_lite *fimc;
@@ -1547,7 +1547,7 @@ static int fimc_lite_suspend(struct device *dev)
1547} 1547}
1548#endif /* CONFIG_PM_SLEEP */ 1548#endif /* CONFIG_PM_SLEEP */
1549 1549
1550static int __devexit fimc_lite_remove(struct platform_device *pdev) 1550static int fimc_lite_remove(struct platform_device *pdev)
1551{ 1551{
1552 struct fimc_lite *fimc = platform_get_drvdata(pdev); 1552 struct fimc_lite *fimc = platform_get_drvdata(pdev);
1553 struct device *dev = &pdev->dev; 1553 struct device *dev = &pdev->dev;
@@ -1595,7 +1595,7 @@ static const struct dev_pm_ops fimc_lite_pm_ops = {
1595 1595
1596static struct platform_driver fimc_lite_driver = { 1596static struct platform_driver fimc_lite_driver = {
1597 .probe = fimc_lite_probe, 1597 .probe = fimc_lite_probe,
1598 .remove = __devexit_p(fimc_lite_remove), 1598 .remove = fimc_lite_remove,
1599 .id_table = fimc_lite_driver_ids, 1599 .id_table = fimc_lite_driver_ids,
1600 .driver = { 1600 .driver = {
1601 .name = FIMC_LITE_DRV_NAME, 1601 .name = FIMC_LITE_DRV_NAME,
diff --git a/drivers/media/platform/s5p-fimc/fimc-mdevice.c b/drivers/media/platform/s5p-fimc/fimc-mdevice.c
index 1bd5678cfeb9..4ab99f3a7b09 100644
--- a/drivers/media/platform/s5p-fimc/fimc-mdevice.c
+++ b/drivers/media/platform/s5p-fimc/fimc-mdevice.c
@@ -1000,7 +1000,7 @@ err_md:
1000 return ret; 1000 return ret;
1001} 1001}
1002 1002
1003static int __devexit fimc_md_remove(struct platform_device *pdev) 1003static int fimc_md_remove(struct platform_device *pdev)
1004{ 1004{
1005 struct fimc_md *fmd = platform_get_drvdata(pdev); 1005 struct fimc_md *fmd = platform_get_drvdata(pdev);
1006 1006
@@ -1015,7 +1015,7 @@ static int __devexit fimc_md_remove(struct platform_device *pdev)
1015 1015
1016static struct platform_driver fimc_md_driver = { 1016static struct platform_driver fimc_md_driver = {
1017 .probe = fimc_md_probe, 1017 .probe = fimc_md_probe,
1018 .remove = __devexit_p(fimc_md_remove), 1018 .remove = fimc_md_remove,
1019 .driver = { 1019 .driver = {
1020 .name = "s5p-fimc-md", 1020 .name = "s5p-fimc-md",
1021 .owner = THIS_MODULE, 1021 .owner = THIS_MODULE,
diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c
index 4c961b1b68e6..ec3fa7d75306 100644
--- a/drivers/media/platform/s5p-fimc/mipi-csis.c
+++ b/drivers/media/platform/s5p-fimc/mipi-csis.c
@@ -654,7 +654,7 @@ static irqreturn_t s5pcsis_irq_handler(int irq, void *dev_id)
654 return IRQ_HANDLED; 654 return IRQ_HANDLED;
655} 655}
656 656
657static int __devinit s5pcsis_probe(struct platform_device *pdev) 657static int s5pcsis_probe(struct platform_device *pdev)
658{ 658{
659 struct s5p_platform_mipi_csis *pdata; 659 struct s5p_platform_mipi_csis *pdata;
660 struct resource *mem_res; 660 struct resource *mem_res;
@@ -851,7 +851,7 @@ static int s5pcsis_runtime_resume(struct device *dev)
851} 851}
852#endif 852#endif
853 853
854static int __devexit s5pcsis_remove(struct platform_device *pdev) 854static int s5pcsis_remove(struct platform_device *pdev)
855{ 855{
856 struct v4l2_subdev *sd = platform_get_drvdata(pdev); 856 struct v4l2_subdev *sd = platform_get_drvdata(pdev);
857 struct csis_state *state = sd_to_csis_state(sd); 857 struct csis_state *state = sd_to_csis_state(sd);
@@ -876,7 +876,7 @@ static const struct dev_pm_ops s5pcsis_pm_ops = {
876 876
877static struct platform_driver s5pcsis_driver = { 877static struct platform_driver s5pcsis_driver = {
878 .probe = s5pcsis_probe, 878 .probe = s5pcsis_probe,
879 .remove = __devexit_p(s5pcsis_remove), 879 .remove = s5pcsis_remove,
880 .driver = { 880 .driver = {
881 .name = CSIS_DRIVER_NAME, 881 .name = CSIS_DRIVER_NAME,
882 .owner = THIS_MODULE, 882 .owner = THIS_MODULE,
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 3afe879d54d7..379f57433711 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1203,7 +1203,7 @@ err_res:
1203} 1203}
1204 1204
1205/* Remove the driver */ 1205/* Remove the driver */
1206static int __devexit s5p_mfc_remove(struct platform_device *pdev) 1206static int s5p_mfc_remove(struct platform_device *pdev)
1207{ 1207{
1208 struct s5p_mfc_dev *dev = platform_get_drvdata(pdev); 1208 struct s5p_mfc_dev *dev = platform_get_drvdata(pdev);
1209 1209
@@ -1368,7 +1368,7 @@ MODULE_DEVICE_TABLE(platform, mfc_driver_ids);
1368 1368
1369static struct platform_driver s5p_mfc_driver = { 1369static struct platform_driver s5p_mfc_driver = {
1370 .probe = s5p_mfc_probe, 1370 .probe = s5p_mfc_probe,
1371 .remove = __devexit_p(s5p_mfc_remove), 1371 .remove = s5p_mfc_remove,
1372 .id_table = mfc_driver_ids, 1372 .id_table = mfc_driver_ids,
1373 .driver = { 1373 .driver = {
1374 .name = S5P_MFC_NAME, 1374 .name = S5P_MFC_NAME,
diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c
index 8a9cf43018f6..7c1116c73bf3 100644
--- a/drivers/media/platform/s5p-tv/hdmi_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmi_drv.c
@@ -830,7 +830,7 @@ fail:
830 return -ENODEV; 830 return -ENODEV;
831} 831}
832 832
833static int __devinit hdmi_probe(struct platform_device *pdev) 833static int hdmi_probe(struct platform_device *pdev)
834{ 834{
835 struct device *dev = &pdev->dev; 835 struct device *dev = &pdev->dev;
836 struct resource *res; 836 struct resource *res;
@@ -979,7 +979,7 @@ fail:
979 return ret; 979 return ret;
980} 980}
981 981
982static int __devexit hdmi_remove(struct platform_device *pdev) 982static int hdmi_remove(struct platform_device *pdev)
983{ 983{
984 struct device *dev = &pdev->dev; 984 struct device *dev = &pdev->dev;
985 struct v4l2_subdev *sd = dev_get_drvdata(dev); 985 struct v4l2_subdev *sd = dev_get_drvdata(dev);
@@ -997,7 +997,7 @@ static int __devexit hdmi_remove(struct platform_device *pdev)
997 997
998static struct platform_driver hdmi_driver __refdata = { 998static struct platform_driver hdmi_driver __refdata = {
999 .probe = hdmi_probe, 999 .probe = hdmi_probe,
1000 .remove = __devexit_p(hdmi_remove), 1000 .remove = hdmi_remove,
1001 .id_table = hdmi_driver_types, 1001 .id_table = hdmi_driver_types,
1002 .driver = { 1002 .driver = {
1003 .name = "s5p-hdmi", 1003 .name = "s5p-hdmi",
diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
index f67b38631801..06b5d2dbb2d9 100644
--- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
@@ -279,8 +279,8 @@ static const struct v4l2_subdev_ops hdmiphy_ops = {
279 .video = &hdmiphy_video_ops, 279 .video = &hdmiphy_video_ops,
280}; 280};
281 281
282static int __devinit hdmiphy_probe(struct i2c_client *client, 282static int hdmiphy_probe(struct i2c_client *client,
283 const struct i2c_device_id *id) 283 const struct i2c_device_id *id)
284{ 284{
285 struct hdmiphy_ctx *ctx; 285 struct hdmiphy_ctx *ctx;
286 286
@@ -295,7 +295,7 @@ static int __devinit hdmiphy_probe(struct i2c_client *client,
295 return 0; 295 return 0;
296} 296}
297 297
298static int __devexit hdmiphy_remove(struct i2c_client *client) 298static int hdmiphy_remove(struct i2c_client *client)
299{ 299{
300 struct v4l2_subdev *sd = i2c_get_clientdata(client); 300 struct v4l2_subdev *sd = i2c_get_clientdata(client);
301 struct hdmiphy_ctx *ctx = sd_to_ctx(sd); 301 struct hdmiphy_ctx *ctx = sd_to_ctx(sd);
@@ -322,7 +322,7 @@ static struct i2c_driver hdmiphy_driver = {
322 .owner = THIS_MODULE, 322 .owner = THIS_MODULE,
323 }, 323 },
324 .probe = hdmiphy_probe, 324 .probe = hdmiphy_probe,
325 .remove = __devexit_p(hdmiphy_remove), 325 .remove = hdmiphy_remove,
326 .id_table = hdmiphy_id, 326 .id_table = hdmiphy_id,
327}; 327};
328 328
diff --git a/drivers/media/platform/s5p-tv/mixer.h b/drivers/media/platform/s5p-tv/mixer.h
index ddb422e23550..b671e20e9318 100644
--- a/drivers/media/platform/s5p-tv/mixer.h
+++ b/drivers/media/platform/s5p-tv/mixer.h
@@ -290,7 +290,7 @@ static inline struct v4l2_subdev *to_outsd(struct mxr_device *mdev)
290struct mxr_platform_data; 290struct mxr_platform_data;
291 291
292/** acquiring common video resources */ 292/** acquiring common video resources */
293int __devinit mxr_acquire_video(struct mxr_device *mdev, 293int mxr_acquire_video(struct mxr_device *mdev,
294 struct mxr_output_conf *output_cont, int output_count); 294 struct mxr_output_conf *output_cont, int output_count);
295 295
296/** releasing common video resources */ 296/** releasing common video resources */
diff --git a/drivers/media/platform/s5p-tv/mixer_drv.c b/drivers/media/platform/s5p-tv/mixer_drv.c
index ca0f29717448..02faea03aa7d 100644
--- a/drivers/media/platform/s5p-tv/mixer_drv.c
+++ b/drivers/media/platform/s5p-tv/mixer_drv.c
@@ -151,8 +151,8 @@ void mxr_power_put(struct mxr_device *mdev)
151 151
152/* --------- RESOURCE MANAGEMENT -------------*/ 152/* --------- RESOURCE MANAGEMENT -------------*/
153 153
154static int __devinit mxr_acquire_plat_resources(struct mxr_device *mdev, 154static int mxr_acquire_plat_resources(struct mxr_device *mdev,
155 struct platform_device *pdev) 155 struct platform_device *pdev)
156{ 156{
157 struct resource *res; 157 struct resource *res;
158 int ret; 158 int ret;
@@ -271,8 +271,8 @@ fail:
271 return -ENODEV; 271 return -ENODEV;
272} 272}
273 273
274static int __devinit mxr_acquire_resources(struct mxr_device *mdev, 274static int mxr_acquire_resources(struct mxr_device *mdev,
275 struct platform_device *pdev) 275 struct platform_device *pdev)
276{ 276{
277 int ret; 277 int ret;
278 ret = mxr_acquire_plat_resources(mdev, pdev); 278 ret = mxr_acquire_plat_resources(mdev, pdev);
@@ -310,8 +310,8 @@ static void mxr_release_layers(struct mxr_device *mdev)
310 mxr_layer_release(mdev->layer[i]); 310 mxr_layer_release(mdev->layer[i]);
311} 311}
312 312
313static int __devinit mxr_acquire_layers(struct mxr_device *mdev, 313static int mxr_acquire_layers(struct mxr_device *mdev,
314 struct mxr_platform_data *pdata) 314 struct mxr_platform_data *pdata)
315{ 315{
316 mdev->layer[0] = mxr_graph_layer_create(mdev, 0); 316 mdev->layer[0] = mxr_graph_layer_create(mdev, 0);
317 mdev->layer[1] = mxr_graph_layer_create(mdev, 1); 317 mdev->layer[1] = mxr_graph_layer_create(mdev, 1);
@@ -372,7 +372,7 @@ static const struct dev_pm_ops mxr_pm_ops = {
372 372
373/* --------- DRIVER INITIALIZATION ---------- */ 373/* --------- DRIVER INITIALIZATION ---------- */
374 374
375static int __devinit mxr_probe(struct platform_device *pdev) 375static int mxr_probe(struct platform_device *pdev)
376{ 376{
377 struct device *dev = &pdev->dev; 377 struct device *dev = &pdev->dev;
378 struct mxr_platform_data *pdata = dev->platform_data; 378 struct mxr_platform_data *pdata = dev->platform_data;
@@ -431,7 +431,7 @@ fail:
431 return ret; 431 return ret;
432} 432}
433 433
434static int __devexit mxr_remove(struct platform_device *pdev) 434static int mxr_remove(struct platform_device *pdev)
435{ 435{
436 struct device *dev = &pdev->dev; 436 struct device *dev = &pdev->dev;
437 struct mxr_device *mdev = to_mdev(dev); 437 struct mxr_device *mdev = to_mdev(dev);
@@ -450,7 +450,7 @@ static int __devexit mxr_remove(struct platform_device *pdev)
450 450
451static struct platform_driver mxr_driver __refdata = { 451static struct platform_driver mxr_driver __refdata = {
452 .probe = mxr_probe, 452 .probe = mxr_probe,
453 .remove = __devexit_p(mxr_remove), 453 .remove = mxr_remove,
454 .driver = { 454 .driver = {
455 .name = MXR_DRIVER_NAME, 455 .name = MXR_DRIVER_NAME,
456 .owner = THIS_MODULE, 456 .owner = THIS_MODULE,
diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c
index 7379e77bf4e1..1f3b7436511c 100644
--- a/drivers/media/platform/s5p-tv/mixer_video.c
+++ b/drivers/media/platform/s5p-tv/mixer_video.c
@@ -62,8 +62,8 @@ done:
62 return sd; 62 return sd;
63} 63}
64 64
65int __devinit mxr_acquire_video(struct mxr_device *mdev, 65int mxr_acquire_video(struct mxr_device *mdev,
66 struct mxr_output_conf *output_conf, int output_count) 66 struct mxr_output_conf *output_conf, int output_count)
67{ 67{
68 struct device *dev = mdev->dev; 68 struct device *dev = mdev->dev;
69 struct v4l2_device *v4l2_dev = &mdev->v4l2_dev; 69 struct v4l2_device *v4l2_dev = &mdev->v4l2_dev;
diff --git a/drivers/media/platform/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c
index ad68bbed014e..91a6939a270a 100644
--- a/drivers/media/platform/s5p-tv/sdo_drv.c
+++ b/drivers/media/platform/s5p-tv/sdo_drv.c
@@ -292,7 +292,7 @@ static const struct dev_pm_ops sdo_pm_ops = {
292 .runtime_resume = sdo_runtime_resume, 292 .runtime_resume = sdo_runtime_resume,
293}; 293};
294 294
295static int __devinit sdo_probe(struct platform_device *pdev) 295static int sdo_probe(struct platform_device *pdev)
296{ 296{
297 struct device *dev = &pdev->dev; 297 struct device *dev = &pdev->dev;
298 struct sdo_device *sdev; 298 struct sdo_device *sdev;
@@ -419,7 +419,7 @@ fail:
419 return ret; 419 return ret;
420} 420}
421 421
422static int __devexit sdo_remove(struct platform_device *pdev) 422static int sdo_remove(struct platform_device *pdev)
423{ 423{
424 struct v4l2_subdev *sd = dev_get_drvdata(&pdev->dev); 424 struct v4l2_subdev *sd = dev_get_drvdata(&pdev->dev);
425 struct sdo_device *sdev = sd_to_sdev(sd); 425 struct sdo_device *sdev = sd_to_sdev(sd);
@@ -437,7 +437,7 @@ static int __devexit sdo_remove(struct platform_device *pdev)
437 437
438static struct platform_driver sdo_driver __refdata = { 438static struct platform_driver sdo_driver __refdata = {
439 .probe = sdo_probe, 439 .probe = sdo_probe,
440 .remove = __devexit_p(sdo_remove), 440 .remove = sdo_remove,
441 .driver = { 441 .driver = {
442 .name = "s5p-sdo", 442 .name = "s5p-sdo",
443 .owner = THIS_MODULE, 443 .owner = THIS_MODULE,
diff --git a/drivers/media/platform/s5p-tv/sii9234_drv.c b/drivers/media/platform/s5p-tv/sii9234_drv.c
index 716d4846f8bd..49191aac9634 100644
--- a/drivers/media/platform/s5p-tv/sii9234_drv.c
+++ b/drivers/media/platform/s5p-tv/sii9234_drv.c
@@ -315,8 +315,8 @@ static const struct v4l2_subdev_ops sii9234_ops = {
315 .video = &sii9234_video_ops, 315 .video = &sii9234_video_ops,
316}; 316};
317 317
318static int __devinit sii9234_probe(struct i2c_client *client, 318static int sii9234_probe(struct i2c_client *client,
319 const struct i2c_device_id *id) 319 const struct i2c_device_id *id)
320{ 320{
321 struct device *dev = &client->dev; 321 struct device *dev = &client->dev;
322 struct sii9234_platform_data *pdata = dev->platform_data; 322 struct sii9234_platform_data *pdata = dev->platform_data;
@@ -378,7 +378,7 @@ fail:
378 return ret; 378 return ret;
379} 379}
380 380
381static int __devexit sii9234_remove(struct i2c_client *client) 381static int sii9234_remove(struct i2c_client *client)
382{ 382{
383 struct device *dev = &client->dev; 383 struct device *dev = &client->dev;
384 struct v4l2_subdev *sd = i2c_get_clientdata(client); 384 struct v4l2_subdev *sd = i2c_get_clientdata(client);
@@ -406,7 +406,7 @@ static struct i2c_driver sii9234_driver = {
406 .pm = &sii9234_pm_ops, 406 .pm = &sii9234_pm_ops,
407 }, 407 },
408 .probe = sii9234_probe, 408 .probe = sii9234_probe,
409 .remove = __devexit_p(sii9234_remove), 409 .remove = sii9234_remove,
410 .id_table = sii9234_id, 410 .id_table = sii9234_id,
411}; 411};
412 412
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c
index a1c87f0ceaab..f3c4571ac01e 100644
--- a/drivers/media/platform/sh_vou.c
+++ b/drivers/media/platform/sh_vou.c
@@ -1326,7 +1326,7 @@ static const struct video_device sh_vou_video_template = {
1326 .vfl_dir = VFL_DIR_TX, 1326 .vfl_dir = VFL_DIR_TX,
1327}; 1327};
1328 1328
1329static int __devinit sh_vou_probe(struct platform_device *pdev) 1329static int sh_vou_probe(struct platform_device *pdev)
1330{ 1330{
1331 struct sh_vou_pdata *vou_pdata = pdev->dev.platform_data; 1331 struct sh_vou_pdata *vou_pdata = pdev->dev.platform_data;
1332 struct v4l2_rect *rect; 1332 struct v4l2_rect *rect;
@@ -1461,7 +1461,7 @@ ereqmemreg:
1461 return ret; 1461 return ret;
1462} 1462}
1463 1463
1464static int __devexit sh_vou_remove(struct platform_device *pdev) 1464static int sh_vou_remove(struct platform_device *pdev)
1465{ 1465{
1466 int irq = platform_get_irq(pdev, 0); 1466 int irq = platform_get_irq(pdev, 0);
1467 struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); 1467 struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
@@ -1487,7 +1487,7 @@ static int __devexit sh_vou_remove(struct platform_device *pdev)
1487} 1487}
1488 1488
1489static struct platform_driver __refdata sh_vou = { 1489static struct platform_driver __refdata sh_vou = {
1490 .remove = __devexit_p(sh_vou_remove), 1490 .remove = sh_vou_remove,
1491 .driver = { 1491 .driver = {
1492 .name = "sh-vou", 1492 .name = "sh-vou",
1493 .owner = THIS_MODULE, 1493 .owner = THIS_MODULE,
diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c
index 6274a91c25c7..d96c8c7e01d9 100644
--- a/drivers/media/platform/soc_camera/atmel-isi.c
+++ b/drivers/media/platform/soc_camera/atmel-isi.c
@@ -897,7 +897,7 @@ static struct soc_camera_host_ops isi_soc_camera_host_ops = {
897}; 897};
898 898
899/* -----------------------------------------------------------------------*/ 899/* -----------------------------------------------------------------------*/
900static int __devexit atmel_isi_remove(struct platform_device *pdev) 900static int atmel_isi_remove(struct platform_device *pdev)
901{ 901{
902 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); 902 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev);
903 struct atmel_isi *isi = container_of(soc_host, 903 struct atmel_isi *isi = container_of(soc_host,
@@ -921,7 +921,7 @@ static int __devexit atmel_isi_remove(struct platform_device *pdev)
921 return 0; 921 return 0;
922} 922}
923 923
924static int __devinit atmel_isi_probe(struct platform_device *pdev) 924static int atmel_isi_probe(struct platform_device *pdev)
925{ 925{
926 unsigned int irq; 926 unsigned int irq;
927 struct atmel_isi *isi; 927 struct atmel_isi *isi;
@@ -1074,7 +1074,7 @@ err_clk_prepare_pclk:
1074 1074
1075static struct platform_driver atmel_isi_driver = { 1075static struct platform_driver atmel_isi_driver = {
1076 .probe = atmel_isi_probe, 1076 .probe = atmel_isi_probe,
1077 .remove = __devexit_p(atmel_isi_remove), 1077 .remove = atmel_isi_remove,
1078 .driver = { 1078 .driver = {
1079 .name = "atmel_isi", 1079 .name = "atmel_isi",
1080 .owner = THIS_MODULE, 1080 .owner = THIS_MODULE,
diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c
index 791cd1d54a76..8bda2c908aba 100644
--- a/drivers/media/platform/soc_camera/mx2_camera.c
+++ b/drivers/media/platform/soc_camera/mx2_camera.c
@@ -1692,7 +1692,7 @@ static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data)
1692 return IRQ_HANDLED; 1692 return IRQ_HANDLED;
1693} 1693}
1694 1694
1695static int __devinit mx27_camera_emma_init(struct platform_device *pdev) 1695static int mx27_camera_emma_init(struct platform_device *pdev)
1696{ 1696{
1697 struct mx2_camera_dev *pcdev = platform_get_drvdata(pdev); 1697 struct mx2_camera_dev *pcdev = platform_get_drvdata(pdev);
1698 struct resource *res_emma; 1698 struct resource *res_emma;
@@ -1750,7 +1750,7 @@ out:
1750 return err; 1750 return err;
1751} 1751}
1752 1752
1753static int __devinit mx2_camera_probe(struct platform_device *pdev) 1753static int mx2_camera_probe(struct platform_device *pdev)
1754{ 1754{
1755 struct mx2_camera_dev *pcdev; 1755 struct mx2_camera_dev *pcdev;
1756 struct resource *res_csi; 1756 struct resource *res_csi;
@@ -1887,7 +1887,7 @@ exit:
1887 return err; 1887 return err;
1888} 1888}
1889 1889
1890static int __devexit mx2_camera_remove(struct platform_device *pdev) 1890static int mx2_camera_remove(struct platform_device *pdev)
1891{ 1891{
1892 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); 1892 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev);
1893 struct mx2_camera_dev *pcdev = container_of(soc_host, 1893 struct mx2_camera_dev *pcdev = container_of(soc_host,
@@ -1912,7 +1912,7 @@ static struct platform_driver mx2_camera_driver = {
1912 .name = MX2_CAM_DRV_NAME, 1912 .name = MX2_CAM_DRV_NAME,
1913 }, 1913 },
1914 .id_table = mx2_camera_devtype, 1914 .id_table = mx2_camera_devtype,
1915 .remove = __devexit_p(mx2_camera_remove), 1915 .remove = mx2_camera_remove,
1916}; 1916};
1917 1917
1918 1918
diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c
index 06d16de76377..45aef1053a49 100644
--- a/drivers/media/platform/soc_camera/mx3_camera.c
+++ b/drivers/media/platform/soc_camera/mx3_camera.c
@@ -1143,7 +1143,7 @@ static struct soc_camera_host_ops mx3_soc_camera_host_ops = {
1143 .set_bus_param = mx3_camera_set_bus_param, 1143 .set_bus_param = mx3_camera_set_bus_param,
1144}; 1144};
1145 1145
1146static int __devinit mx3_camera_probe(struct platform_device *pdev) 1146static int mx3_camera_probe(struct platform_device *pdev)
1147{ 1147{
1148 struct mx3_camera_dev *mx3_cam; 1148 struct mx3_camera_dev *mx3_cam;
1149 struct resource *res; 1149 struct resource *res;
@@ -1246,7 +1246,7 @@ egetres:
1246 return err; 1246 return err;
1247} 1247}
1248 1248
1249static int __devexit mx3_camera_remove(struct platform_device *pdev) 1249static int mx3_camera_remove(struct platform_device *pdev)
1250{ 1250{
1251 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); 1251 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev);
1252 struct mx3_camera_dev *mx3_cam = container_of(soc_host, 1252 struct mx3_camera_dev *mx3_cam = container_of(soc_host,
@@ -1279,7 +1279,7 @@ static struct platform_driver mx3_camera_driver = {
1279 .name = MX3_CAM_DRV_NAME, 1279 .name = MX3_CAM_DRV_NAME,
1280 }, 1280 },
1281 .probe = mx3_camera_probe, 1281 .probe = mx3_camera_probe,
1282 .remove = __devexit_p(mx3_camera_remove), 1282 .remove = mx3_camera_remove,
1283}; 1283};
1284 1284
1285module_platform_driver(mx3_camera_driver); 1285module_platform_driver(mx3_camera_driver);
diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c
index 3434ffe79c6e..523330d00dee 100644
--- a/drivers/media/platform/soc_camera/pxa_camera.c
+++ b/drivers/media/platform/soc_camera/pxa_camera.c
@@ -1651,7 +1651,7 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = {
1651 .set_bus_param = pxa_camera_set_bus_param, 1651 .set_bus_param = pxa_camera_set_bus_param,
1652}; 1652};
1653 1653
1654static int __devinit pxa_camera_probe(struct platform_device *pdev) 1654static int pxa_camera_probe(struct platform_device *pdev)
1655{ 1655{
1656 struct pxa_camera_dev *pcdev; 1656 struct pxa_camera_dev *pcdev;
1657 struct resource *res; 1657 struct resource *res;
@@ -1801,7 +1801,7 @@ exit:
1801 return err; 1801 return err;
1802} 1802}
1803 1803
1804static int __devexit pxa_camera_remove(struct platform_device *pdev) 1804static int pxa_camera_remove(struct platform_device *pdev)
1805{ 1805{
1806 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); 1806 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev);
1807 struct pxa_camera_dev *pcdev = container_of(soc_host, 1807 struct pxa_camera_dev *pcdev = container_of(soc_host,
@@ -1840,7 +1840,7 @@ static struct platform_driver pxa_camera_driver = {
1840 .pm = &pxa_camera_pm, 1840 .pm = &pxa_camera_pm,
1841 }, 1841 },
1842 .probe = pxa_camera_probe, 1842 .probe = pxa_camera_probe,
1843 .remove = __devexit_p(pxa_camera_remove), 1843 .remove = pxa_camera_remove,
1844}; 1844};
1845 1845
1846module_platform_driver(pxa_camera_driver); 1846module_platform_driver(pxa_camera_driver);
diff --git a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
index 2d8861c0e8f2..ebbc126e71a6 100644
--- a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
+++ b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
@@ -2071,7 +2071,7 @@ static int bus_notify(struct notifier_block *nb,
2071 return NOTIFY_DONE; 2071 return NOTIFY_DONE;
2072} 2072}
2073 2073
2074static int __devinit sh_mobile_ceu_probe(struct platform_device *pdev) 2074static int sh_mobile_ceu_probe(struct platform_device *pdev)
2075{ 2075{
2076 struct sh_mobile_ceu_dev *pcdev; 2076 struct sh_mobile_ceu_dev *pcdev;
2077 struct resource *res; 2077 struct resource *res;
@@ -2258,7 +2258,7 @@ exit:
2258 return err; 2258 return err;
2259} 2259}
2260 2260
2261static int __devexit sh_mobile_ceu_remove(struct platform_device *pdev) 2261static int sh_mobile_ceu_remove(struct platform_device *pdev)
2262{ 2262{
2263 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); 2263 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev);
2264 struct sh_mobile_ceu_dev *pcdev = container_of(soc_host, 2264 struct sh_mobile_ceu_dev *pcdev = container_of(soc_host,
@@ -2307,7 +2307,7 @@ static struct platform_driver sh_mobile_ceu_driver = {
2307 .pm = &sh_mobile_ceu_dev_pm_ops, 2307 .pm = &sh_mobile_ceu_dev_pm_ops,
2308 }, 2308 },
2309 .probe = sh_mobile_ceu_probe, 2309 .probe = sh_mobile_ceu_probe,
2310 .remove = __devexit_p(sh_mobile_ceu_remove), 2310 .remove = sh_mobile_ceu_remove,
2311}; 2311};
2312 2312
2313static int __init sh_mobile_ceu_init(void) 2313static int __init sh_mobile_ceu_init(void)
diff --git a/drivers/media/platform/soc_camera/sh_mobile_csi2.c b/drivers/media/platform/soc_camera/sh_mobile_csi2.c
index 05286500b4d4..a17aba9a0104 100644
--- a/drivers/media/platform/soc_camera/sh_mobile_csi2.c
+++ b/drivers/media/platform/soc_camera/sh_mobile_csi2.c
@@ -294,7 +294,7 @@ static struct v4l2_subdev_ops sh_csi2_subdev_ops = {
294 .video = &sh_csi2_subdev_video_ops, 294 .video = &sh_csi2_subdev_video_ops,
295}; 295};
296 296
297static __devinit int sh_csi2_probe(struct platform_device *pdev) 297static int sh_csi2_probe(struct platform_device *pdev)
298{ 298{
299 struct resource *res; 299 struct resource *res;
300 unsigned int irq; 300 unsigned int irq;
@@ -366,7 +366,7 @@ ereqreg:
366 return ret; 366 return ret;
367} 367}
368 368
369static __devexit int sh_csi2_remove(struct platform_device *pdev) 369static int sh_csi2_remove(struct platform_device *pdev)
370{ 370{
371 struct sh_csi2 *priv = platform_get_drvdata(pdev); 371 struct sh_csi2 *priv = platform_get_drvdata(pdev);
372 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 372 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -382,7 +382,7 @@ static __devexit int sh_csi2_remove(struct platform_device *pdev)
382} 382}
383 383
384static struct platform_driver __refdata sh_csi2_pdrv = { 384static struct platform_driver __refdata sh_csi2_pdrv = {
385 .remove = __devexit_p(sh_csi2_remove), 385 .remove = sh_csi2_remove,
386 .probe = sh_csi2_probe, 386 .probe = sh_csi2_probe,
387 .driver = { 387 .driver = {
388 .name = "sh-mobile-csi2", 388 .name = "sh-mobile-csi2",
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index 4e3735679f17..2ec90eae6ba0 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1530,7 +1530,7 @@ static int soc_camera_video_start(struct soc_camera_device *icd)
1530 return 0; 1530 return 0;
1531} 1531}
1532 1532
1533static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev) 1533static int soc_camera_pdrv_probe(struct platform_device *pdev)
1534{ 1534{
1535 struct soc_camera_link *icl = pdev->dev.platform_data; 1535 struct soc_camera_link *icl = pdev->dev.platform_data;
1536 struct soc_camera_device *icd; 1536 struct soc_camera_device *icd;
@@ -1558,7 +1558,7 @@ static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev)
1558 * hot-pluggable. Now we know, that all our users - hosts and devices have 1558 * hot-pluggable. Now we know, that all our users - hosts and devices have
1559 * been unloaded already 1559 * been unloaded already
1560 */ 1560 */
1561static int __devexit soc_camera_pdrv_remove(struct platform_device *pdev) 1561static int soc_camera_pdrv_remove(struct platform_device *pdev)
1562{ 1562{
1563 struct soc_camera_device *icd = platform_get_drvdata(pdev); 1563 struct soc_camera_device *icd = platform_get_drvdata(pdev);
1564 1564
@@ -1572,7 +1572,7 @@ static int __devexit soc_camera_pdrv_remove(struct platform_device *pdev)
1572 1572
1573static struct platform_driver __refdata soc_camera_pdrv = { 1573static struct platform_driver __refdata soc_camera_pdrv = {
1574 .probe = soc_camera_pdrv_probe, 1574 .probe = soc_camera_pdrv_probe,
1575 .remove = __devexit_p(soc_camera_pdrv_remove), 1575 .remove = soc_camera_pdrv_remove,
1576 .driver = { 1576 .driver = {
1577 .name = "soc-camera-pdrv", 1577 .name = "soc-camera-pdrv",
1578 .owner = THIS_MODULE, 1578 .owner = THIS_MODULE,
diff --git a/drivers/media/platform/timblogiw.c b/drivers/media/platform/timblogiw.c
index 02194c056b00..d854d08a6c7f 100644
--- a/drivers/media/platform/timblogiw.c
+++ b/drivers/media/platform/timblogiw.c
@@ -745,7 +745,7 @@ static int timblogiw_mmap(struct file *file, struct vm_area_struct *vma)
745 745
746/* Platform device functions */ 746/* Platform device functions */
747 747
748static __devinitconst struct v4l2_ioctl_ops timblogiw_ioctl_ops = { 748static struct v4l2_ioctl_ops timblogiw_ioctl_ops = {
749 .vidioc_querycap = timblogiw_querycap, 749 .vidioc_querycap = timblogiw_querycap,
750 .vidioc_enum_fmt_vid_cap = timblogiw_enum_fmt, 750 .vidioc_enum_fmt_vid_cap = timblogiw_enum_fmt,
751 .vidioc_g_fmt_vid_cap = timblogiw_g_fmt, 751 .vidioc_g_fmt_vid_cap = timblogiw_g_fmt,
@@ -767,7 +767,7 @@ static __devinitconst struct v4l2_ioctl_ops timblogiw_ioctl_ops = {
767 .vidioc_enum_framesizes = timblogiw_enum_framesizes, 767 .vidioc_enum_framesizes = timblogiw_enum_framesizes,
768}; 768};
769 769
770static __devinitconst struct v4l2_file_operations timblogiw_fops = { 770static struct v4l2_file_operations timblogiw_fops = {
771 .owner = THIS_MODULE, 771 .owner = THIS_MODULE,
772 .open = timblogiw_open, 772 .open = timblogiw_open,
773 .release = timblogiw_close, 773 .release = timblogiw_close,
@@ -777,7 +777,7 @@ static __devinitconst struct v4l2_file_operations timblogiw_fops = {
777 .poll = timblogiw_poll, 777 .poll = timblogiw_poll,
778}; 778};
779 779
780static __devinitconst struct video_device timblogiw_template = { 780static struct video_device timblogiw_template = {
781 .name = TIMBLOGIWIN_NAME, 781 .name = TIMBLOGIWIN_NAME,
782 .fops = &timblogiw_fops, 782 .fops = &timblogiw_fops,
783 .ioctl_ops = &timblogiw_ioctl_ops, 783 .ioctl_ops = &timblogiw_ioctl_ops,
@@ -786,7 +786,7 @@ static __devinitconst struct video_device timblogiw_template = {
786 .tvnorms = V4L2_STD_PAL | V4L2_STD_NTSC 786 .tvnorms = V4L2_STD_PAL | V4L2_STD_NTSC
787}; 787};
788 788
789static int __devinit timblogiw_probe(struct platform_device *pdev) 789static int timblogiw_probe(struct platform_device *pdev)
790{ 790{
791 int err; 791 int err;
792 struct timblogiw *lw = NULL; 792 struct timblogiw *lw = NULL;
@@ -848,7 +848,7 @@ err:
848 return err; 848 return err;
849} 849}
850 850
851static int __devexit timblogiw_remove(struct platform_device *pdev) 851static int timblogiw_remove(struct platform_device *pdev)
852{ 852{
853 struct timblogiw *lw = platform_get_drvdata(pdev); 853 struct timblogiw *lw = platform_get_drvdata(pdev);
854 854
@@ -869,7 +869,7 @@ static struct platform_driver timblogiw_platform_driver = {
869 .owner = THIS_MODULE, 869 .owner = THIS_MODULE,
870 }, 870 },
871 .probe = timblogiw_probe, 871 .probe = timblogiw_probe,
872 .remove = __devexit_p(timblogiw_remove), 872 .remove = timblogiw_remove,
873}; 873};
874 874
875module_platform_driver(timblogiw_platform_driver); 875module_platform_driver(timblogiw_platform_driver);
diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c
index eb404c2ce270..63e8c3461239 100644
--- a/drivers/media/platform/via-camera.c
+++ b/drivers/media/platform/via-camera.c
@@ -1324,7 +1324,7 @@ static struct video_device viacam_v4l_template = {
1324#define VIACAM_SERIAL_CREG 0x46 1324#define VIACAM_SERIAL_CREG 0x46
1325#define VIACAM_SERIAL_BIT 0x40 1325#define VIACAM_SERIAL_BIT 0x40
1326 1326
1327static __devinit bool viacam_serial_is_enabled(void) 1327static bool viacam_serial_is_enabled(void)
1328{ 1328{
1329 struct pci_bus *pbus = pci_find_bus(0, 0); 1329 struct pci_bus *pbus = pci_find_bus(0, 0);
1330 u8 cbyte; 1330 u8 cbyte;
@@ -1353,7 +1353,7 @@ static struct ov7670_config sensor_cfg = {
1353 .clock_speed = 90, 1353 .clock_speed = 90,
1354}; 1354};
1355 1355
1356static __devinit int viacam_probe(struct platform_device *pdev) 1356static int viacam_probe(struct platform_device *pdev)
1357{ 1357{
1358 int ret; 1358 int ret;
1359 struct i2c_adapter *sensor_adapter; 1359 struct i2c_adapter *sensor_adapter;
@@ -1490,7 +1490,7 @@ out_unregister:
1490 return ret; 1490 return ret;
1491} 1491}
1492 1492
1493static __devexit int viacam_remove(struct platform_device *pdev) 1493static int viacam_remove(struct platform_device *pdev)
1494{ 1494{
1495 struct via_camera *cam = via_cam_info; 1495 struct via_camera *cam = via_cam_info;
1496 struct viafb_dev *viadev = pdev->dev.platform_data; 1496 struct viafb_dev *viadev = pdev->dev.platform_data;
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c
index b415211d0c4b..bd4d3a7cdadd 100644
--- a/drivers/media/radio/radio-maxiradio.c
+++ b/drivers/media/radio/radio-maxiradio.c
@@ -114,7 +114,8 @@ static struct snd_tea575x_ops maxiradio_tea_ops = {
114 .set_direction = maxiradio_tea575x_set_direction, 114 .set_direction = maxiradio_tea575x_set_direction,
115}; 115};
116 116
117static int __devinit maxiradio_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 117static int maxiradio_probe(struct pci_dev *pdev,
118 const struct pci_device_id *ent)
118{ 119{
119 struct maxiradio *dev; 120 struct maxiradio *dev;
120 struct v4l2_device *v4l2_dev; 121 struct v4l2_device *v4l2_dev;
@@ -172,7 +173,7 @@ errfr:
172 return retval; 173 return retval;
173} 174}
174 175
175static void __devexit maxiradio_remove(struct pci_dev *pdev) 176static void maxiradio_remove(struct pci_dev *pdev)
176{ 177{
177 struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev); 178 struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev);
178 struct maxiradio *dev = to_maxiradio(v4l2_dev); 179 struct maxiradio *dev = to_maxiradio(v4l2_dev);
@@ -196,7 +197,7 @@ static struct pci_driver maxiradio_driver = {
196 .name = "radio-maxiradio", 197 .name = "radio-maxiradio",
197 .id_table = maxiradio_pci_tbl, 198 .id_table = maxiradio_pci_tbl,
198 .probe = maxiradio_probe, 199 .probe = maxiradio_probe,
199 .remove = __devexit_p(maxiradio_remove), 200 .remove = maxiradio_remove,
200}; 201};
201 202
202static int __init maxiradio_init(void) 203static int __init maxiradio_init(void)
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c
index c260a2a354b1..637a55564958 100644
--- a/drivers/media/radio/radio-sf16fmi.c
+++ b/drivers/media/radio/radio-sf16fmi.c
@@ -265,7 +265,7 @@ static const struct v4l2_ioctl_ops fmi_ioctl_ops = {
265}; 265};
266 266
267/* ladis: this is my card. does any other types exist? */ 267/* ladis: this is my card. does any other types exist? */
268static struct isapnp_device_id id_table[] __devinitdata = { 268static struct isapnp_device_id id_table[] = {
269 /* SF16-FMI */ 269 /* SF16-FMI */
270 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, 270 { ISAPNP_ANY_ID, ISAPNP_ANY_ID,
271 ISAPNP_VENDOR('M','F','R'), ISAPNP_FUNCTION(0xad10), 0}, 271 ISAPNP_VENDOR('M','F','R'), ISAPNP_FUNCTION(0xad10), 0},
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index 4efcbec74c52..9c0990457a7c 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -197,13 +197,13 @@ static int fmr2_tea_ext_init(struct snd_tea575x *tea)
197 return 0; 197 return 0;
198} 198}
199 199
200static struct pnp_device_id fmr2_pnp_ids[] __devinitdata = { 200static struct pnp_device_id fmr2_pnp_ids[] = {
201 { .id = "MFRad13" }, /* tuner subdevice of SF16-FMD2 */ 201 { .id = "MFRad13" }, /* tuner subdevice of SF16-FMD2 */
202 { .id = "" } 202 { .id = "" }
203}; 203};
204MODULE_DEVICE_TABLE(pnp, fmr2_pnp_ids); 204MODULE_DEVICE_TABLE(pnp, fmr2_pnp_ids);
205 205
206static int __devinit fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io) 206static int fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io)
207{ 207{
208 int err, i; 208 int err, i;
209 char *card_name = fmr2->is_fmd2 ? "SF16-FMD2" : "SF16-FMR2"; 209 char *card_name = fmr2->is_fmd2 ? "SF16-FMD2" : "SF16-FMR2";
@@ -249,7 +249,7 @@ static int __devinit fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io)
249 return 0; 249 return 0;
250} 250}
251 251
252static int __devinit fmr2_isa_match(struct device *pdev, unsigned int ndev) 252static int fmr2_isa_match(struct device *pdev, unsigned int ndev)
253{ 253{
254 struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL); 254 struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL);
255 if (!fmr2) 255 if (!fmr2)
@@ -265,8 +265,7 @@ static int __devinit fmr2_isa_match(struct device *pdev, unsigned int ndev)
265 return 1; 265 return 1;
266} 266}
267 267
268static int __devinit fmr2_pnp_probe(struct pnp_dev *pdev, 268static int fmr2_pnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *id)
269 const struct pnp_device_id *id)
270{ 269{
271 int ret; 270 int ret;
272 struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL); 271 struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL);
@@ -285,7 +284,7 @@ static int __devinit fmr2_pnp_probe(struct pnp_dev *pdev,
285 return 0; 284 return 0;
286} 285}
287 286
288static void __devexit fmr2_remove(struct fmr2 *fmr2) 287static void fmr2_remove(struct fmr2 *fmr2)
289{ 288{
290 snd_tea575x_exit(&fmr2->tea); 289 snd_tea575x_exit(&fmr2->tea);
291 release_region(fmr2->io, 2); 290 release_region(fmr2->io, 2);
@@ -293,7 +292,7 @@ static void __devexit fmr2_remove(struct fmr2 *fmr2)
293 kfree(fmr2); 292 kfree(fmr2);
294} 293}
295 294
296static int __devexit fmr2_isa_remove(struct device *pdev, unsigned int ndev) 295static int fmr2_isa_remove(struct device *pdev, unsigned int ndev)
297{ 296{
298 fmr2_remove(dev_get_drvdata(pdev)); 297 fmr2_remove(dev_get_drvdata(pdev));
299 dev_set_drvdata(pdev, NULL); 298 dev_set_drvdata(pdev, NULL);
@@ -301,7 +300,7 @@ static int __devexit fmr2_isa_remove(struct device *pdev, unsigned int ndev)
301 return 0; 300 return 0;
302} 301}
303 302
304static void __devexit fmr2_pnp_remove(struct pnp_dev *pdev) 303static void fmr2_pnp_remove(struct pnp_dev *pdev)
305{ 304{
306 fmr2_remove(pnp_get_drvdata(pdev)); 305 fmr2_remove(pnp_get_drvdata(pdev));
307 pnp_set_drvdata(pdev, NULL); 306 pnp_set_drvdata(pdev, NULL);
@@ -309,7 +308,7 @@ static void __devexit fmr2_pnp_remove(struct pnp_dev *pdev)
309 308
310struct isa_driver fmr2_isa_driver = { 309struct isa_driver fmr2_isa_driver = {
311 .match = fmr2_isa_match, 310 .match = fmr2_isa_match,
312 .remove = __devexit_p(fmr2_isa_remove), 311 .remove = fmr2_isa_remove,
313 .driver = { 312 .driver = {
314 .name = "radio-sf16fmr2", 313 .name = "radio-sf16fmr2",
315 }, 314 },
@@ -319,7 +318,7 @@ struct pnp_driver fmr2_pnp_driver = {
319 .name = "radio-sf16fmr2", 318 .name = "radio-sf16fmr2",
320 .id_table = fmr2_pnp_ids, 319 .id_table = fmr2_pnp_ids,
321 .probe = fmr2_pnp_probe, 320 .probe = fmr2_pnp_probe,
322 .remove = __devexit_p(fmr2_pnp_remove), 321 .remove = fmr2_pnp_remove,
323}; 322};
324 323
325static int __init fmr2_init(void) 324static int __init fmr2_init(void)
diff --git a/drivers/media/radio/radio-tea5764.c b/drivers/media/radio/radio-tea5764.c
index 36aec575e0ec..1978516af67e 100644
--- a/drivers/media/radio/radio-tea5764.c
+++ b/drivers/media/radio/radio-tea5764.c
@@ -493,8 +493,8 @@ static struct video_device tea5764_radio_template = {
493}; 493};
494 494
495/* I2C probe: check if the device exists and register with v4l if it is */ 495/* I2C probe: check if the device exists and register with v4l if it is */
496static int __devinit tea5764_i2c_probe(struct i2c_client *client, 496static int tea5764_i2c_probe(struct i2c_client *client,
497 const struct i2c_device_id *id) 497 const struct i2c_device_id *id)
498{ 498{
499 struct tea5764_device *radio; 499 struct tea5764_device *radio;
500 struct tea5764_regs *r; 500 struct tea5764_regs *r;
@@ -552,7 +552,7 @@ errfr:
552 return ret; 552 return ret;
553} 553}
554 554
555static int __devexit tea5764_i2c_remove(struct i2c_client *client) 555static int tea5764_i2c_remove(struct i2c_client *client)
556{ 556{
557 struct tea5764_device *radio = i2c_get_clientdata(client); 557 struct tea5764_device *radio = i2c_get_clientdata(client);
558 558
@@ -578,7 +578,7 @@ static struct i2c_driver tea5764_i2c_driver = {
578 .owner = THIS_MODULE, 578 .owner = THIS_MODULE,
579 }, 579 },
580 .probe = tea5764_i2c_probe, 580 .probe = tea5764_i2c_probe,
581 .remove = __devexit_p(tea5764_i2c_remove), 581 .remove = tea5764_i2c_remove,
582 .id_table = tea5764_id, 582 .id_table = tea5764_id,
583}; 583};
584 584
diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c
index 5cf07779f4bb..b87effeb5dc6 100644
--- a/drivers/media/radio/radio-timb.c
+++ b/drivers/media/radio/radio-timb.c
@@ -145,7 +145,7 @@ static const struct v4l2_file_operations timbradio_fops = {
145 .unlocked_ioctl = video_ioctl2, 145 .unlocked_ioctl = video_ioctl2,
146}; 146};
147 147
148static int __devinit timbradio_probe(struct platform_device *pdev) 148static int timbradio_probe(struct platform_device *pdev)
149{ 149{
150 struct timb_radio_platform_data *pdata = pdev->dev.platform_data; 150 struct timb_radio_platform_data *pdata = pdev->dev.platform_data;
151 struct timbradio *tr; 151 struct timbradio *tr;
@@ -201,7 +201,7 @@ err:
201 return err; 201 return err;
202} 202}
203 203
204static int __devexit timbradio_remove(struct platform_device *pdev) 204static int timbradio_remove(struct platform_device *pdev)
205{ 205{
206 struct timbradio *tr = platform_get_drvdata(pdev); 206 struct timbradio *tr = platform_get_drvdata(pdev);
207 207
@@ -219,7 +219,7 @@ static struct platform_driver timbradio_platform_driver = {
219 .owner = THIS_MODULE, 219 .owner = THIS_MODULE,
220 }, 220 },
221 .probe = timbradio_probe, 221 .probe = timbradio_probe,
222 .remove = __devexit_p(timbradio_remove), 222 .remove = timbradio_remove,
223}; 223};
224 224
225module_platform_driver(timbradio_platform_driver); 225module_platform_driver(timbradio_platform_driver);
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
index 9b0c9fa0beb8..c48be195bbad 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -1990,7 +1990,7 @@ static int wl1273_fm_radio_remove(struct platform_device *pdev)
1990 return 0; 1990 return 0;
1991} 1991}
1992 1992
1993static int __devinit wl1273_fm_radio_probe(struct platform_device *pdev) 1993static int wl1273_fm_radio_probe(struct platform_device *pdev)
1994{ 1994{
1995 struct wl1273_core **core = pdev->dev.platform_data; 1995 struct wl1273_core **core = pdev->dev.platform_data;
1996 struct wl1273_device *radio; 1996 struct wl1273_device *radio;
@@ -2145,7 +2145,7 @@ pdata_err:
2145 2145
2146static struct platform_driver wl1273_fm_radio_driver = { 2146static struct platform_driver wl1273_fm_radio_driver = {
2147 .probe = wl1273_fm_radio_probe, 2147 .probe = wl1273_fm_radio_probe,
2148 .remove = __devexit_p(wl1273_fm_radio_remove), 2148 .remove = wl1273_fm_radio_remove,
2149 .driver = { 2149 .driver = {
2150 .name = "wl1273_fm_radio", 2150 .name = "wl1273_fm_radio",
2151 .owner = THIS_MODULE, 2151 .owner = THIS_MODULE,
diff --git a/drivers/media/radio/saa7706h.c b/drivers/media/radio/saa7706h.c
index 54db36ccb9ee..06c06cc9ff25 100644
--- a/drivers/media/radio/saa7706h.c
+++ b/drivers/media/radio/saa7706h.c
@@ -373,8 +373,8 @@ static const struct v4l2_subdev_ops saa7706h_ops = {
373 * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' 373 * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
374 */ 374 */
375 375
376static int __devinit saa7706h_probe(struct i2c_client *client, 376static int saa7706h_probe(struct i2c_client *client,
377 const struct i2c_device_id *id) 377 const struct i2c_device_id *id)
378{ 378{
379 struct saa7706h_state *state; 379 struct saa7706h_state *state;
380 struct v4l2_subdev *sd; 380 struct v4l2_subdev *sd;
@@ -418,7 +418,7 @@ err:
418 return err; 418 return err;
419} 419}
420 420
421static int __devexit saa7706h_remove(struct i2c_client *client) 421static int saa7706h_remove(struct i2c_client *client)
422{ 422{
423 struct v4l2_subdev *sd = i2c_get_clientdata(client); 423 struct v4l2_subdev *sd = i2c_get_clientdata(client);
424 424
@@ -441,7 +441,7 @@ static struct i2c_driver saa7706h_driver = {
441 .name = DRIVER_NAME, 441 .name = DRIVER_NAME,
442 }, 442 },
443 .probe = saa7706h_probe, 443 .probe = saa7706h_probe,
444 .remove = __devexit_p(saa7706h_remove), 444 .remove = saa7706h_remove,
445 .id_table = saa7706h_id, 445 .id_table = saa7706h_id,
446}; 446};
447 447
diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c
index 4ef55ec8045e..e5fc9acd0c4f 100644
--- a/drivers/media/radio/si470x/radio-si470x-i2c.c
+++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
@@ -347,8 +347,8 @@ end:
347/* 347/*
348 * si470x_i2c_probe - probe for the device 348 * si470x_i2c_probe - probe for the device
349 */ 349 */
350static int __devinit si470x_i2c_probe(struct i2c_client *client, 350static int si470x_i2c_probe(struct i2c_client *client,
351 const struct i2c_device_id *id) 351 const struct i2c_device_id *id)
352{ 352{
353 struct si470x_device *radio; 353 struct si470x_device *radio;
354 int retval = 0; 354 int retval = 0;
@@ -451,7 +451,7 @@ err_initial:
451/* 451/*
452 * si470x_i2c_remove - remove the device 452 * si470x_i2c_remove - remove the device
453 */ 453 */
454static __devexit int si470x_i2c_remove(struct i2c_client *client) 454static int si470x_i2c_remove(struct i2c_client *client)
455{ 455{
456 struct si470x_device *radio = i2c_get_clientdata(client); 456 struct si470x_device *radio = i2c_get_clientdata(client);
457 457
@@ -514,7 +514,7 @@ static struct i2c_driver si470x_i2c_driver = {
514#endif 514#endif
515 }, 515 },
516 .probe = si470x_i2c_probe, 516 .probe = si470x_i2c_probe,
517 .remove = __devexit_p(si470x_i2c_remove), 517 .remove = si470x_i2c_remove,
518 .id_table = si470x_i2c_id, 518 .id_table = si470x_i2c_id,
519}; 519};
520 520
diff --git a/drivers/media/radio/tef6862.c b/drivers/media/radio/tef6862.c
index 06d47e5cce9f..b18c2dc268ba 100644
--- a/drivers/media/radio/tef6862.c
+++ b/drivers/media/radio/tef6862.c
@@ -165,8 +165,8 @@ static const struct v4l2_subdev_ops tef6862_ops = {
165 * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' 165 * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
166 */ 166 */
167 167
168static int __devinit tef6862_probe(struct i2c_client *client, 168static int tef6862_probe(struct i2c_client *client,
169 const struct i2c_device_id *id) 169 const struct i2c_device_id *id)
170{ 170{
171 struct tef6862_state *state; 171 struct tef6862_state *state;
172 struct v4l2_subdev *sd; 172 struct v4l2_subdev *sd;
@@ -189,7 +189,7 @@ static int __devinit tef6862_probe(struct i2c_client *client,
189 return 0; 189 return 0;
190} 190}
191 191
192static int __devexit tef6862_remove(struct i2c_client *client) 192static int tef6862_remove(struct i2c_client *client)
193{ 193{
194 struct v4l2_subdev *sd = i2c_get_clientdata(client); 194 struct v4l2_subdev *sd = i2c_get_clientdata(client);
195 195
@@ -211,7 +211,7 @@ static struct i2c_driver tef6862_driver = {
211 .name = DRIVER_NAME, 211 .name = DRIVER_NAME,
212 }, 212 },
213 .probe = tef6862_probe, 213 .probe = tef6862_probe,
214 .remove = __devexit_p(tef6862_remove), 214 .remove = tef6862_remove,
215 .id_table = tef6862_id, 215 .id_table = tef6862_id,
216}; 216};
217 217
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index 22231dd4f62b..cef04786b52f 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -1172,7 +1172,7 @@ static struct pnp_driver ene_driver = {
1172 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, 1172 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE,
1173 1173
1174 .probe = ene_probe, 1174 .probe = ene_probe,
1175 .remove = __devexit_p(ene_remove), 1175 .remove = ene_remove,
1176#ifdef CONFIG_PM 1176#ifdef CONFIG_PM
1177 .suspend = ene_suspend, 1177 .suspend = ene_suspend,
1178 .resume = ene_resume, 1178 .resume = ene_resume,
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index 936c3f79b62c..1df410e13688 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -590,7 +590,7 @@ failure:
590 return ret; 590 return ret;
591} 591}
592 592
593static void __devexit fintek_remove(struct pnp_dev *pdev) 593static void fintek_remove(struct pnp_dev *pdev)
594{ 594{
595 struct fintek_dev *fintek = pnp_get_drvdata(pdev); 595 struct fintek_dev *fintek = pnp_get_drvdata(pdev);
596 unsigned long flags; 596 unsigned long flags;
@@ -678,7 +678,7 @@ static struct pnp_driver fintek_driver = {
678 .id_table = fintek_ids, 678 .id_table = fintek_ids,
679 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, 679 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE,
680 .probe = fintek_probe, 680 .probe = fintek_probe,
681 .remove = __devexit_p(fintek_remove), 681 .remove = fintek_remove,
682 .suspend = fintek_suspend, 682 .suspend = fintek_suspend,
683 .resume = fintek_resume, 683 .resume = fintek_resume,
684 .shutdown = fintek_shutdown, 684 .shutdown = fintek_shutdown,
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index ba1a1eb356cf..4f71a7d1f019 100644
--- a/drivers/media/rc/gpio-ir-recv.c
+++ b/drivers/media/rc/gpio-ir-recv.c
@@ -58,7 +58,7 @@ err_get_value:
58 return IRQ_HANDLED; 58 return IRQ_HANDLED;
59} 59}
60 60
61static int __devinit gpio_ir_recv_probe(struct platform_device *pdev) 61static int gpio_ir_recv_probe(struct platform_device *pdev)
62{ 62{
63 struct gpio_rc_dev *gpio_dev; 63 struct gpio_rc_dev *gpio_dev;
64 struct rc_dev *rcdev; 64 struct rc_dev *rcdev;
@@ -140,7 +140,7 @@ err_allocate_device:
140 return rc; 140 return rc;
141} 141}
142 142
143static int __devexit gpio_ir_recv_remove(struct platform_device *pdev) 143static int gpio_ir_recv_remove(struct platform_device *pdev)
144{ 144{
145 struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev); 145 struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev);
146 146
@@ -188,7 +188,7 @@ static const struct dev_pm_ops gpio_ir_recv_pm_ops = {
188 188
189static struct platform_driver gpio_ir_recv_driver = { 189static struct platform_driver gpio_ir_recv_driver = {
190 .probe = gpio_ir_recv_probe, 190 .probe = gpio_ir_recv_probe,
191 .remove = __devexit_p(gpio_ir_recv_remove), 191 .remove = gpio_ir_recv_remove,
192 .driver = { 192 .driver = {
193 .name = GPIO_IR_DRIVER_NAME, 193 .name = GPIO_IR_DRIVER_NAME,
194 .owner = THIS_MODULE, 194 .owner = THIS_MODULE,
diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c
index 5a9163da63c3..b99b096d8a8f 100644
--- a/drivers/media/rc/iguanair.c
+++ b/drivers/media/rc/iguanair.c
@@ -425,8 +425,8 @@ static void iguanair_close(struct rc_dev *rdev)
425 mutex_unlock(&ir->lock); 425 mutex_unlock(&ir->lock);
426} 426}
427 427
428static int __devinit iguanair_probe(struct usb_interface *intf, 428static int iguanair_probe(struct usb_interface *intf,
429 const struct usb_device_id *id) 429 const struct usb_device_id *id)
430{ 430{
431 struct usb_device *udev = interface_to_usbdev(intf); 431 struct usb_device *udev = interface_to_usbdev(intf);
432 struct iguanair *ir; 432 struct iguanair *ir;
@@ -538,7 +538,7 @@ out:
538 return ret; 538 return ret;
539} 539}
540 540
541static void __devexit iguanair_disconnect(struct usb_interface *intf) 541static void iguanair_disconnect(struct usb_interface *intf)
542{ 542{
543 struct iguanair *ir = usb_get_intfdata(intf); 543 struct iguanair *ir = usb_get_intfdata(intf);
544 544
@@ -604,7 +604,7 @@ static const struct usb_device_id iguanair_table[] = {
604static struct usb_driver iguanair_driver = { 604static struct usb_driver iguanair_driver = {
605 .name = DRIVER_NAME, 605 .name = DRIVER_NAME,
606 .probe = iguanair_probe, 606 .probe = iguanair_probe,
607 .disconnect = __devexit_p(iguanair_disconnect), 607 .disconnect = iguanair_disconnect,
608 .suspend = iguanair_suspend, 608 .suspend = iguanair_suspend,
609 .resume = iguanair_resume, 609 .resume = iguanair_resume,
610 .reset_resume = iguanair_resume, 610 .reset_resume = iguanair_resume,
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index 8f6a28921ed4..78d109b978dd 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -255,7 +255,7 @@ static struct usb_device_id imon_usb_id_table[] = {
255static struct usb_driver imon_driver = { 255static struct usb_driver imon_driver = {
256 .name = MOD_NAME, 256 .name = MOD_NAME,
257 .probe = imon_probe, 257 .probe = imon_probe,
258 .disconnect = __devexit_p(imon_disconnect), 258 .disconnect = imon_disconnect,
259 .suspend = imon_suspend, 259 .suspend = imon_suspend,
260 .resume = imon_resume, 260 .resume = imon_resume,
261 .id_table = imon_usb_id_table, 261 .id_table = imon_usb_id_table,
@@ -2288,8 +2288,8 @@ static void imon_init_display(struct imon_context *ictx,
2288/** 2288/**
2289 * Callback function for USB core API: Probe 2289 * Callback function for USB core API: Probe
2290 */ 2290 */
2291static int __devinit imon_probe(struct usb_interface *interface, 2291static int imon_probe(struct usb_interface *interface,
2292 const struct usb_device_id *id) 2292 const struct usb_device_id *id)
2293{ 2293{
2294 struct usb_device *usbdev = NULL; 2294 struct usb_device *usbdev = NULL;
2295 struct usb_host_interface *iface_desc = NULL; 2295 struct usb_host_interface *iface_desc = NULL;
@@ -2372,7 +2372,7 @@ fail:
2372/** 2372/**
2373 * Callback function for USB core API: disconnect 2373 * Callback function for USB core API: disconnect
2374 */ 2374 */
2375static void __devexit imon_disconnect(struct usb_interface *interface) 2375static void imon_disconnect(struct usb_interface *interface)
2376{ 2376{
2377 struct imon_context *ictx; 2377 struct imon_context *ictx;
2378 struct device *dev; 2378 struct device *dev;
diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c
index 9e76c7b40af2..8ead492d03aa 100644
--- a/drivers/media/rc/ir-rx51.c
+++ b/drivers/media/rc/ir-rx51.c
@@ -443,7 +443,7 @@ static int lirc_rx51_resume(struct platform_device *dev)
443 443
444#endif /* CONFIG_PM */ 444#endif /* CONFIG_PM */
445 445
446static int __devinit lirc_rx51_probe(struct platform_device *dev) 446static int lirc_rx51_probe(struct platform_device *dev)
447{ 447{
448 lirc_rx51_driver.features = LIRC_RX51_DRIVER_FEATURES; 448 lirc_rx51_driver.features = LIRC_RX51_DRIVER_FEATURES;
449 lirc_rx51.pdata = dev->dev.platform_data; 449 lirc_rx51.pdata = dev->dev.platform_data;
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 5e5a7f2b8184..1b8669b6d042 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1620,7 +1620,7 @@ failure:
1620 return ret; 1620 return ret;
1621} 1621}
1622 1622
1623static void __devexit ite_remove(struct pnp_dev *pdev) 1623static void ite_remove(struct pnp_dev *pdev)
1624{ 1624{
1625 struct ite_dev *dev = pnp_get_drvdata(pdev); 1625 struct ite_dev *dev = pnp_get_drvdata(pdev);
1626 unsigned long flags; 1626 unsigned long flags;
@@ -1702,7 +1702,7 @@ static struct pnp_driver ite_driver = {
1702 .name = ITE_DRIVER_NAME, 1702 .name = ITE_DRIVER_NAME,
1703 .id_table = ite_ids, 1703 .id_table = ite_ids,
1704 .probe = ite_probe, 1704 .probe = ite_probe,
1705 .remove = __devexit_p(ite_remove), 1705 .remove = ite_remove,
1706 .suspend = ite_suspend, 1706 .suspend = ite_suspend,
1707 .resume = ite_resume, 1707 .resume = ite_resume,
1708 .shutdown = ite_shutdown, 1708 .shutdown = ite_shutdown,
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index b2146cd99fd8..9afb9331217d 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -1229,8 +1229,8 @@ out:
1229 return NULL; 1229 return NULL;
1230} 1230}
1231 1231
1232static int __devinit mceusb_dev_probe(struct usb_interface *intf, 1232static int mceusb_dev_probe(struct usb_interface *intf,
1233 const struct usb_device_id *id) 1233 const struct usb_device_id *id)
1234{ 1234{
1235 struct usb_device *dev = interface_to_usbdev(intf); 1235 struct usb_device *dev = interface_to_usbdev(intf);
1236 struct usb_host_interface *idesc; 1236 struct usb_host_interface *idesc;
@@ -1393,7 +1393,7 @@ mem_alloc_fail:
1393} 1393}
1394 1394
1395 1395
1396static void __devexit mceusb_dev_disconnect(struct usb_interface *intf) 1396static void mceusb_dev_disconnect(struct usb_interface *intf)
1397{ 1397{
1398 struct usb_device *dev = interface_to_usbdev(intf); 1398 struct usb_device *dev = interface_to_usbdev(intf);
1399 struct mceusb_dev *ir = usb_get_intfdata(intf); 1399 struct mceusb_dev *ir = usb_get_intfdata(intf);
@@ -1432,7 +1432,7 @@ static int mceusb_dev_resume(struct usb_interface *intf)
1432static struct usb_driver mceusb_dev_driver = { 1432static struct usb_driver mceusb_dev_driver = {
1433 .name = DRIVER_NAME, 1433 .name = DRIVER_NAME,
1434 .probe = mceusb_dev_probe, 1434 .probe = mceusb_dev_probe,
1435 .disconnect = __devexit_p(mceusb_dev_disconnect), 1435 .disconnect = mceusb_dev_disconnect,
1436 .suspend = mceusb_dev_suspend, 1436 .suspend = mceusb_dev_suspend,
1437 .resume = mceusb_dev_resume, 1437 .resume = mceusb_dev_resume,
1438 .reset_resume = mceusb_dev_resume, 1438 .reset_resume = mceusb_dev_resume,
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index e4ea89a11eed..b8aa9abb31ff 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -1113,7 +1113,7 @@ failure:
1113 return ret; 1113 return ret;
1114} 1114}
1115 1115
1116static void __devexit nvt_remove(struct pnp_dev *pdev) 1116static void nvt_remove(struct pnp_dev *pdev)
1117{ 1117{
1118 struct nvt_dev *nvt = pnp_get_drvdata(pdev); 1118 struct nvt_dev *nvt = pnp_get_drvdata(pdev);
1119 unsigned long flags; 1119 unsigned long flags;
@@ -1211,7 +1211,7 @@ static struct pnp_driver nvt_driver = {
1211 .id_table = nvt_ids, 1211 .id_table = nvt_ids,
1212 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, 1212 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE,
1213 .probe = nvt_probe, 1213 .probe = nvt_probe,
1214 .remove = __devexit_p(nvt_remove), 1214 .remove = nvt_remove,
1215 .suspend = nvt_suspend, 1215 .suspend = nvt_suspend,
1216 .resume = nvt_resume, 1216 .resume = nvt_resume,
1217 .shutdown = nvt_shutdown, 1217 .shutdown = nvt_shutdown,
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index a8887aba9faf..1800326f93e6 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -1102,8 +1102,8 @@ out:
1102 return NULL; 1102 return NULL;
1103} 1103}
1104 1104
1105static int __devinit redrat3_dev_probe(struct usb_interface *intf, 1105static int redrat3_dev_probe(struct usb_interface *intf,
1106 const struct usb_device_id *id) 1106 const struct usb_device_id *id)
1107{ 1107{
1108 struct usb_device *udev = interface_to_usbdev(intf); 1108 struct usb_device *udev = interface_to_usbdev(intf);
1109 struct device *dev = &intf->dev; 1109 struct device *dev = &intf->dev;
@@ -1241,7 +1241,7 @@ no_endpoints:
1241 return retval; 1241 return retval;
1242} 1242}
1243 1243
1244static void __devexit redrat3_dev_disconnect(struct usb_interface *intf) 1244static void redrat3_dev_disconnect(struct usb_interface *intf)
1245{ 1245{
1246 struct usb_device *udev = interface_to_usbdev(intf); 1246 struct usb_device *udev = interface_to_usbdev(intf);
1247 struct redrat3_dev *rr3 = usb_get_intfdata(intf); 1247 struct redrat3_dev *rr3 = usb_get_intfdata(intf);
@@ -1281,7 +1281,7 @@ static int redrat3_dev_resume(struct usb_interface *intf)
1281static struct usb_driver redrat3_dev_driver = { 1281static struct usb_driver redrat3_dev_driver = {
1282 .name = DRIVER_NAME, 1282 .name = DRIVER_NAME,
1283 .probe = redrat3_dev_probe, 1283 .probe = redrat3_dev_probe,
1284 .disconnect = __devexit_p(redrat3_dev_disconnect), 1284 .disconnect = redrat3_dev_disconnect,
1285 .suspend = redrat3_dev_suspend, 1285 .suspend = redrat3_dev_suspend,
1286 .resume = redrat3_dev_resume, 1286 .resume = redrat3_dev_resume,
1287 .reset_resume = redrat3_dev_resume, 1287 .reset_resume = redrat3_dev_resume,
diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c
index c720f12f661e..d7b11e6a9982 100644
--- a/drivers/media/rc/streamzap.c
+++ b/drivers/media/rc/streamzap.c
@@ -346,8 +346,8 @@ out:
346 * On any failure the return value is the ERROR 346 * On any failure the return value is the ERROR
347 * On success return 0 347 * On success return 0
348 */ 348 */
349static int __devinit streamzap_probe(struct usb_interface *intf, 349static int streamzap_probe(struct usb_interface *intf,
350 const struct usb_device_id *id) 350 const struct usb_device_id *id)
351{ 351{
352 struct usb_device *usbdev = interface_to_usbdev(intf); 352 struct usb_device *usbdev = interface_to_usbdev(intf);
353 struct usb_host_interface *iface_host; 353 struct usb_host_interface *iface_host;
diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c
index f0921b5483eb..78be8a914225 100644
--- a/drivers/media/rc/ttusbir.c
+++ b/drivers/media/rc/ttusbir.c
@@ -194,8 +194,8 @@ static void ttusbir_urb_complete(struct urb *urb)
194 dev_warn(tt->dev, "failed to resubmit urb: %d\n", rc); 194 dev_warn(tt->dev, "failed to resubmit urb: %d\n", rc);
195} 195}
196 196
197static int __devinit ttusbir_probe(struct usb_interface *intf, 197static int ttusbir_probe(struct usb_interface *intf,
198 const struct usb_device_id *id) 198 const struct usb_device_id *id)
199{ 199{
200 struct ttusbir *tt; 200 struct ttusbir *tt;
201 struct usb_interface_descriptor *idesc; 201 struct usb_interface_descriptor *idesc;
@@ -367,7 +367,7 @@ out:
367 return ret; 367 return ret;
368} 368}
369 369
370static void __devexit ttusbir_disconnect(struct usb_interface *intf) 370static void ttusbir_disconnect(struct usb_interface *intf)
371{ 371{
372 struct ttusbir *tt = usb_get_intfdata(intf); 372 struct ttusbir *tt = usb_get_intfdata(intf);
373 struct usb_device *udev = tt->udev; 373 struct usb_device *udev = tt->udev;
@@ -435,7 +435,7 @@ static struct usb_driver ttusbir_driver = {
435 .suspend = ttusbir_suspend, 435 .suspend = ttusbir_suspend,
436 .resume = ttusbir_resume, 436 .resume = ttusbir_resume,
437 .reset_resume = ttusbir_resume, 437 .reset_resume = ttusbir_resume,
438 .disconnect = __devexit_p(ttusbir_disconnect) 438 .disconnect = ttusbir_disconnect,
439}; 439};
440 440
441module_usb_driver(ttusbir_driver); 441module_usb_driver(ttusbir_driver);
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 7f3c476dde05..930c61499037 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -1008,7 +1008,7 @@ wbcir_resume(struct pnp_dev *device)
1008 return 0; 1008 return 0;
1009} 1009}
1010 1010
1011static int __devinit 1011static int
1012wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) 1012wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
1013{ 1013{
1014 struct device *dev = &device->dev; 1014 struct device *dev = &device->dev;
@@ -1155,7 +1155,7 @@ exit:
1155 return err; 1155 return err;
1156} 1156}
1157 1157
1158static void __devexit 1158static void
1159wbcir_remove(struct pnp_dev *device) 1159wbcir_remove(struct pnp_dev *device)
1160{ 1160{
1161 struct wbcir_data *data = pnp_get_drvdata(device); 1161 struct wbcir_data *data = pnp_get_drvdata(device);
@@ -1201,7 +1201,7 @@ static struct pnp_driver wbcir_driver = {
1201 .name = WBCIR_NAME, 1201 .name = WBCIR_NAME,
1202 .id_table = wbcir_ids, 1202 .id_table = wbcir_ids,
1203 .probe = wbcir_probe, 1203 .probe = wbcir_probe,
1204 .remove = __devexit_p(wbcir_remove), 1204 .remove = wbcir_remove,
1205 .suspend = wbcir_suspend, 1205 .suspend = wbcir_suspend,
1206 .resume = wbcir_resume, 1206 .resume = wbcir_resume,
1207 .shutdown = wbcir_shutdown 1207 .shutdown = wbcir_shutdown
diff --git a/drivers/media/usb/gspca/spca506.c b/drivers/media/usb/gspca/spca506.c
index bab01c86c315..bcd2c04c770e 100644
--- a/drivers/media/usb/gspca/spca506.c
+++ b/drivers/media/usb/gspca/spca506.c
@@ -590,8 +590,7 @@ static const struct usb_device_id device_table[] = {
590MODULE_DEVICE_TABLE(usb, device_table); 590MODULE_DEVICE_TABLE(usb, device_table);
591 591
592/* -- device connect -- */ 592/* -- device connect -- */
593static int __devinit sd_probe(struct usb_interface *intf, 593static int sd_probe(struct usb_interface *intf, const struct usb_device_id *id)
594 const struct usb_device_id *id)
595{ 594{
596 return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd), 595 return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
597 THIS_MODULE); 596 THIS_MODULE);
diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
index aac622200e99..de2c10289eec 100644
--- a/drivers/media/usb/siano/smsusb.c
+++ b/drivers/media/usb/siano/smsusb.c
@@ -389,7 +389,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
389 return rc; 389 return rc;
390} 390}
391 391
392static int __devinit smsusb_probe(struct usb_interface *intf, 392static int smsusb_probe(struct usb_interface *intf,
393 const struct usb_device_id *id) 393 const struct usb_device_id *id)
394{ 394{
395 struct usb_device *udev = interface_to_usbdev(intf); 395 struct usb_device *udev = interface_to_usbdev(intf);
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
index 5c36a57e6590..ad7f7448072e 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -1363,7 +1363,7 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
1363} 1363}
1364 1364
1365/* register video4linux devices */ 1365/* register video4linux devices */
1366static int __devinit usbvision_register_video(struct usb_usbvision *usbvision) 1366static int usbvision_register_video(struct usb_usbvision *usbvision)
1367{ 1367{
1368 /* Video Device: */ 1368 /* Video Device: */
1369 usbvision->vdev = usbvision_vdev_init(usbvision, 1369 usbvision->vdev = usbvision_vdev_init(usbvision,
@@ -1510,8 +1510,8 @@ static void usbvision_configure_video(struct usb_usbvision *usbvision)
1510 * if it looks like USBVISION video device 1510 * if it looks like USBVISION video device
1511 * 1511 *
1512 */ 1512 */
1513static int __devinit usbvision_probe(struct usb_interface *intf, 1513static int usbvision_probe(struct usb_interface *intf,
1514 const struct usb_device_id *devid) 1514 const struct usb_device_id *devid)
1515{ 1515{
1516 struct usb_device *dev = usb_get_dev(interface_to_usbdev(intf)); 1516 struct usb_device *dev = usb_get_dev(interface_to_usbdev(intf));
1517 struct usb_interface *uif; 1517 struct usb_interface *uif;
@@ -1619,7 +1619,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
1619 * with no ill consequences. 1619 * with no ill consequences.
1620 * 1620 *
1621 */ 1621 */
1622static void __devexit usbvision_disconnect(struct usb_interface *intf) 1622static void usbvision_disconnect(struct usb_interface *intf)
1623{ 1623{
1624 struct usb_usbvision *usbvision = to_usbvision(usb_get_intfdata(intf)); 1624 struct usb_usbvision *usbvision = to_usbvision(usb_get_intfdata(intf));
1625 1625
@@ -1664,7 +1664,7 @@ static struct usb_driver usbvision_driver = {
1664 .name = "usbvision", 1664 .name = "usbvision",
1665 .id_table = usbvision_table, 1665 .id_table = usbvision_table,
1666 .probe = usbvision_probe, 1666 .probe = usbvision_probe,
1667 .disconnect = __devexit_p(usbvision_disconnect), 1667 .disconnect = usbvision_disconnect,
1668}; 1668};
1669 1669
1670/* 1670/*
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 516a5b188ea5..2bb7613ddebb 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -1061,7 +1061,7 @@ int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain,
1061 1061
1062 ctrl = uvc_find_control(chain, v4l2_ctrl->id, &mapping); 1062 ctrl = uvc_find_control(chain, v4l2_ctrl->id, &mapping);
1063 if (ctrl == NULL) { 1063 if (ctrl == NULL) {
1064 ret = -ENOENT; 1064 ret = -EINVAL;
1065 goto done; 1065 goto done;
1066 } 1066 }
1067 1067
@@ -1099,13 +1099,12 @@ int uvc_query_v4l2_menu(struct uvc_video_chain *chain,
1099 return -ERESTARTSYS; 1099 return -ERESTARTSYS;
1100 1100
1101 ctrl = uvc_find_control(chain, query_menu->id, &mapping); 1101 ctrl = uvc_find_control(chain, query_menu->id, &mapping);
1102 if (ctrl == NULL) { 1102 if (ctrl == NULL || mapping->v4l2_type != V4L2_CTRL_TYPE_MENU) {
1103 ret = -ENOENT; 1103 ret = -EINVAL;
1104 goto done; 1104 goto done;
1105 } 1105 }
1106 1106
1107 if (mapping->v4l2_type != V4L2_CTRL_TYPE_MENU || 1107 if (query_menu->index >= mapping->menu_count) {
1108 query_menu->index >= mapping->menu_count) {
1109 ret = -EINVAL; 1108 ret = -EINVAL;
1110 goto done; 1109 goto done;
1111 } 1110 }
@@ -1264,7 +1263,7 @@ static int uvc_ctrl_add_event(struct v4l2_subscribed_event *sev, unsigned elems)
1264 1263
1265 ctrl = uvc_find_control(handle->chain, sev->id, &mapping); 1264 ctrl = uvc_find_control(handle->chain, sev->id, &mapping);
1266 if (ctrl == NULL) { 1265 if (ctrl == NULL) {
1267 ret = -ENOENT; 1266 ret = -EINVAL;
1268 goto done; 1267 goto done;
1269 } 1268 }
1270 1269
@@ -1415,7 +1414,7 @@ int uvc_ctrl_get(struct uvc_video_chain *chain,
1415 1414
1416 ctrl = uvc_find_control(chain, xctrl->id, &mapping); 1415 ctrl = uvc_find_control(chain, xctrl->id, &mapping);
1417 if (ctrl == NULL) 1416 if (ctrl == NULL)
1418 return -ENOENT; 1417 return -EINVAL;
1419 1418
1420 return __uvc_ctrl_get(chain, ctrl, mapping, &xctrl->value); 1419 return __uvc_ctrl_get(chain, ctrl, mapping, &xctrl->value);
1421} 1420}
@@ -1432,10 +1431,8 @@ int uvc_ctrl_set(struct uvc_video_chain *chain,
1432 int ret; 1431 int ret;
1433 1432
1434 ctrl = uvc_find_control(chain, xctrl->id, &mapping); 1433 ctrl = uvc_find_control(chain, xctrl->id, &mapping);
1435 if (ctrl == NULL) 1434 if (ctrl == NULL || (ctrl->info.flags & UVC_CTRL_FLAG_SET_CUR) == 0)
1436 return -ENOENT; 1435 return -EINVAL;
1437 if (!(ctrl->info.flags & UVC_CTRL_FLAG_SET_CUR))
1438 return -EACCES;
1439 1436
1440 /* Clamp out of range values. */ 1437 /* Clamp out of range values. */
1441 switch (mapping->v4l2_type) { 1438 switch (mapping->v4l2_type) {
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 8e056046bc20..f2ee8c6b0d8d 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -607,10 +607,8 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
607 607
608 ret = uvc_ctrl_get(chain, &xctrl); 608 ret = uvc_ctrl_get(chain, &xctrl);
609 uvc_ctrl_rollback(handle); 609 uvc_ctrl_rollback(handle);
610 if (ret < 0) 610 if (ret >= 0)
611 return ret == -ENOENT ? -EINVAL : ret; 611 ctrl->value = xctrl.value;
612
613 ctrl->value = xctrl.value;
614 break; 612 break;
615 } 613 }
616 614
@@ -634,7 +632,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
634 ret = uvc_ctrl_set(chain, &xctrl); 632 ret = uvc_ctrl_set(chain, &xctrl);
635 if (ret < 0) { 633 if (ret < 0) {
636 uvc_ctrl_rollback(handle); 634 uvc_ctrl_rollback(handle);
637 return ret == -ENOENT ? -EINVAL : ret; 635 return ret;
638 } 636 }
639 ret = uvc_ctrl_commit(handle, &xctrl, 1); 637 ret = uvc_ctrl_commit(handle, &xctrl, 1);
640 if (ret == 0) 638 if (ret == 0)
@@ -661,7 +659,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
661 uvc_ctrl_rollback(handle); 659 uvc_ctrl_rollback(handle);
662 ctrls->error_idx = ret == -ENOENT 660 ctrls->error_idx = ret == -ENOENT
663 ? ctrls->count : i; 661 ? ctrls->count : i;
664 return ret == -ENOENT ? -EINVAL : ret; 662 return ret;
665 } 663 }
666 } 664 }
667 ctrls->error_idx = 0; 665 ctrls->error_idx = 0;
@@ -691,7 +689,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
691 ctrls->error_idx = (ret == -ENOENT && 689 ctrls->error_idx = (ret == -ENOENT &&
692 cmd == VIDIOC_S_EXT_CTRLS) 690 cmd == VIDIOC_S_EXT_CTRLS)
693 ? ctrls->count : i; 691 ? ctrls->count : i;
694 return ret == -ENOENT ? -EINVAL : ret; 692 return ret;
695 } 693 }
696 } 694 }
697 695
diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c
index e6764bb41cb9..186f27d9e5f1 100644
--- a/drivers/memory/tegra20-mc.c
+++ b/drivers/memory/tegra20-mc.c
@@ -177,7 +177,7 @@ static void tegra20_mc_decode(struct tegra20_mc *mc, int n)
177 "carveout" : "trustzone") : ""); 177 "carveout" : "trustzone") : "");
178} 178}
179 179
180static const struct of_device_id tegra20_mc_of_match[] __devinitconst = { 180static const struct of_device_id tegra20_mc_of_match[] = {
181 { .compatible = "nvidia,tegra20-mc", }, 181 { .compatible = "nvidia,tegra20-mc", },
182 {}, 182 {},
183}; 183};
@@ -198,7 +198,7 @@ static irqreturn_t tegra20_mc_isr(int irq, void *data)
198 return IRQ_HANDLED; 198 return IRQ_HANDLED;
199} 199}
200 200
201static int __devinit tegra20_mc_probe(struct platform_device *pdev) 201static int tegra20_mc_probe(struct platform_device *pdev)
202{ 202{
203 struct resource *irq; 203 struct resource *irq;
204 struct tegra20_mc *mc; 204 struct tegra20_mc *mc;
diff --git a/drivers/memory/tegra30-mc.c b/drivers/memory/tegra30-mc.c
index 802b9ea431fa..0b7ab9332a18 100644
--- a/drivers/memory/tegra30-mc.c
+++ b/drivers/memory/tegra30-mc.c
@@ -295,7 +295,7 @@ static UNIVERSAL_DEV_PM_OPS(tegra30_mc_pm,
295 tegra30_mc_suspend, 295 tegra30_mc_suspend,
296 tegra30_mc_resume, NULL); 296 tegra30_mc_resume, NULL);
297 297
298static const struct of_device_id tegra30_mc_of_match[] __devinitconst = { 298static const struct of_device_id tegra30_mc_of_match[] = {
299 { .compatible = "nvidia,tegra30-mc", }, 299 { .compatible = "nvidia,tegra30-mc", },
300 {}, 300 {},
301}; 301};
@@ -316,7 +316,7 @@ static irqreturn_t tegra30_mc_isr(int irq, void *data)
316 return IRQ_HANDLED; 316 return IRQ_HANDLED;
317} 317}
318 318
319static int __devinit tegra30_mc_probe(struct platform_device *pdev) 319static int tegra30_mc_probe(struct platform_device *pdev)
320{ 320{
321 struct resource *irq; 321 struct resource *irq;
322 struct tegra30_mc *mc; 322 struct tegra30_mc *mc;
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index d784c36707c0..c13cd9bc590b 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -100,7 +100,7 @@ static int mptfc_slave_alloc(struct scsi_device *sdev);
100static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt); 100static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt);
101static void mptfc_target_destroy(struct scsi_target *starget); 101static void mptfc_target_destroy(struct scsi_target *starget);
102static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout); 102static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout);
103static void __devexit mptfc_remove(struct pci_dev *pdev); 103static void mptfc_remove(struct pci_dev *pdev);
104static int mptfc_abort(struct scsi_cmnd *SCpnt); 104static int mptfc_abort(struct scsi_cmnd *SCpnt);
105static int mptfc_dev_reset(struct scsi_cmnd *SCpnt); 105static int mptfc_dev_reset(struct scsi_cmnd *SCpnt);
106static int mptfc_bus_reset(struct scsi_cmnd *SCpnt); 106static int mptfc_bus_reset(struct scsi_cmnd *SCpnt);
@@ -1360,7 +1360,7 @@ static struct pci_driver mptfc_driver = {
1360 .name = "mptfc", 1360 .name = "mptfc",
1361 .id_table = mptfc_pci_table, 1361 .id_table = mptfc_pci_table,
1362 .probe = mptfc_probe, 1362 .probe = mptfc_probe,
1363 .remove = __devexit_p(mptfc_remove), 1363 .remove = mptfc_remove,
1364 .shutdown = mptscsih_shutdown, 1364 .shutdown = mptscsih_shutdown,
1365#ifdef CONFIG_PM 1365#ifdef CONFIG_PM
1366 .suspend = mptscsih_suspend, 1366 .suspend = mptscsih_suspend,
@@ -1496,8 +1496,7 @@ mptfc_init(void)
1496 * @pdev: Pointer to pci_dev structure 1496 * @pdev: Pointer to pci_dev structure
1497 * 1497 *
1498 */ 1498 */
1499static void __devexit 1499static void mptfc_remove(struct pci_dev *pdev)
1500mptfc_remove(struct pci_dev *pdev)
1501{ 1500{
1502 MPT_ADAPTER *ioc = pci_get_drvdata(pdev); 1501 MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
1503 struct mptfc_rport_info *p, *n; 1502 struct mptfc_rport_info *p, *n;
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 551262e4b96e..fa43c391c8ed 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -5332,7 +5332,7 @@ mptsas_shutdown(struct pci_dev *pdev)
5332 mptsas_cleanup_fw_event_q(ioc); 5332 mptsas_cleanup_fw_event_q(ioc);
5333} 5333}
5334 5334
5335static void __devexit mptsas_remove(struct pci_dev *pdev) 5335static void mptsas_remove(struct pci_dev *pdev)
5336{ 5336{
5337 MPT_ADAPTER *ioc = pci_get_drvdata(pdev); 5337 MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
5338 struct mptsas_portinfo *p, *n; 5338 struct mptsas_portinfo *p, *n;
@@ -5387,7 +5387,7 @@ static struct pci_driver mptsas_driver = {
5387 .name = "mptsas", 5387 .name = "mptsas",
5388 .id_table = mptsas_pci_table, 5388 .id_table = mptsas_pci_table,
5389 .probe = mptsas_probe, 5389 .probe = mptsas_probe,
5390 .remove = __devexit_p(mptsas_remove), 5390 .remove = mptsas_remove,
5391 .shutdown = mptsas_shutdown, 5391 .shutdown = mptsas_shutdown,
5392#ifdef CONFIG_PM 5392#ifdef CONFIG_PM
5393 .suspend = mptscsih_suspend, 5393 .suspend = mptscsih_suspend,
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 8f61ba6aac23..c3aabde2dc4f 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -1550,7 +1550,7 @@ static struct pci_driver mptspi_driver = {
1550 .name = "mptspi", 1550 .name = "mptspi",
1551 .id_table = mptspi_pci_table, 1551 .id_table = mptspi_pci_table,
1552 .probe = mptspi_probe, 1552 .probe = mptspi_probe,
1553 .remove = __devexit_p(mptscsih_remove), 1553 .remove = mptscsih_remove,
1554 .shutdown = mptscsih_shutdown, 1554 .shutdown = mptscsih_shutdown,
1555#ifdef CONFIG_PM 1555#ifdef CONFIG_PM
1556 .suspend = mptscsih_suspend, 1556 .suspend = mptscsih_suspend,
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 7190d5239b4f..0f9f3e1a2b6b 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -37,7 +37,7 @@
37#define OSM_DESCRIPTION "I2O-subsystem" 37#define OSM_DESCRIPTION "I2O-subsystem"
38 38
39/* PCI device id table for all I2O controllers */ 39/* PCI device id table for all I2O controllers */
40static struct pci_device_id __devinitdata i2o_pci_ids[] = { 40static struct pci_device_id i2o_pci_ids[] = {
41 {PCI_DEVICE_CLASS(PCI_CLASS_INTELLIGENT_I2O << 8, 0xffff00)}, 41 {PCI_DEVICE_CLASS(PCI_CLASS_INTELLIGENT_I2O << 8, 0xffff00)},
42 {PCI_DEVICE(PCI_VENDOR_ID_DPT, 0xa511)}, 42 {PCI_DEVICE(PCI_VENDOR_ID_DPT, 0xa511)},
43 {.vendor = PCI_VENDOR_ID_INTEL,.device = 0x1962, 43 {.vendor = PCI_VENDOR_ID_INTEL,.device = 0x1962,
@@ -84,7 +84,7 @@ static void i2o_pci_free(struct i2o_controller *c)
84 * 84 *
85 * Returns 0 on success or negative error code on failure. 85 * Returns 0 on success or negative error code on failure.
86 */ 86 */
87static int __devinit i2o_pci_alloc(struct i2o_controller *c) 87static int i2o_pci_alloc(struct i2o_controller *c)
88{ 88{
89 struct pci_dev *pdev = c->pdev; 89 struct pci_dev *pdev = c->pdev;
90 struct device *dev = &pdev->dev; 90 struct device *dev = &pdev->dev;
@@ -315,8 +315,7 @@ static void i2o_pci_irq_disable(struct i2o_controller *c)
315 * 315 *
316 * Returns 0 on success or negative error code on failure. 316 * Returns 0 on success or negative error code on failure.
317 */ 317 */
318static int __devinit i2o_pci_probe(struct pci_dev *pdev, 318static int i2o_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
319 const struct pci_device_id *id)
320{ 319{
321 struct i2o_controller *c; 320 struct i2o_controller *c;
322 int rc; 321 int rc;
@@ -453,7 +452,7 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
453 * Reset the I2O controller, disable interrupts and remove all allocated 452 * Reset the I2O controller, disable interrupts and remove all allocated
454 * resources. 453 * resources.
455 */ 454 */
456static void __devexit i2o_pci_remove(struct pci_dev *pdev) 455static void i2o_pci_remove(struct pci_dev *pdev)
457{ 456{
458 struct i2o_controller *c; 457 struct i2o_controller *c;
459 c = pci_get_drvdata(pdev); 458 c = pci_get_drvdata(pdev);
@@ -474,7 +473,7 @@ static struct pci_driver i2o_pci_driver = {
474 .name = "PCI_I2O", 473 .name = "PCI_I2O",
475 .id_table = i2o_pci_ids, 474 .id_table = i2o_pci_ids,
476 .probe = i2o_pci_probe, 475 .probe = i2o_pci_probe,
477 .remove = __devexit_p(i2o_pci_remove), 476 .remove = i2o_pci_remove,
478}; 477};
479 478
480/** 479/**
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index abd5c80c7cf5..14714058f2d2 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -50,7 +50,7 @@ static struct mfd_cell max8997_devs[] = {
50}; 50};
51 51
52#ifdef CONFIG_OF 52#ifdef CONFIG_OF
53static struct of_device_id __devinitdata max8997_pmic_dt_match[] = { 53static struct of_device_id max8997_pmic_dt_match[] = {
54 { .compatible = "maxim,max8997-pmic", .data = TYPE_MAX8997 }, 54 { .compatible = "maxim,max8997-pmic", .data = TYPE_MAX8997 },
55 {}, 55 {},
56}; 56};
diff --git a/drivers/mfd/retu-mfd.c b/drivers/mfd/retu-mfd.c
index 7ff4a37ab0c0..3ba048655bf3 100644
--- a/drivers/mfd/retu-mfd.c
+++ b/drivers/mfd/retu-mfd.c
@@ -171,8 +171,7 @@ static struct regmap_config retu_config = {
171 .val_bits = 16, 171 .val_bits = 16,
172}; 172};
173 173
174static int __devinit retu_probe(struct i2c_client *i2c, 174static int retu_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
175 const struct i2c_device_id *id)
176{ 175{
177 struct retu_dev *rdev; 176 struct retu_dev *rdev;
178 int ret; 177 int ret;
@@ -225,7 +224,7 @@ static int __devinit retu_probe(struct i2c_client *i2c,
225 return 0; 224 return 0;
226} 225}
227 226
228static int __devexit retu_remove(struct i2c_client *i2c) 227static int retu_remove(struct i2c_client *i2c)
229{ 228{
230 struct retu_dev *rdev = i2c_get_clientdata(i2c); 229 struct retu_dev *rdev = i2c_get_clientdata(i2c);
231 230
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index 3a44efa29203..7a7b0bda4618 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -998,8 +998,8 @@ static int rtsx_pci_init_chip(struct rtsx_pcr *pcr)
998 return 0; 998 return 0;
999} 999}
1000 1000
1001static int __devinit rtsx_pci_probe(struct pci_dev *pcidev, 1001static int rtsx_pci_probe(struct pci_dev *pcidev,
1002 const struct pci_device_id *id) 1002 const struct pci_device_id *id)
1003{ 1003{
1004 struct rtsx_pcr *pcr; 1004 struct rtsx_pcr *pcr;
1005 struct pcr_handle *handle; 1005 struct pcr_handle *handle;
@@ -1123,7 +1123,7 @@ disable:
1123 return ret; 1123 return ret;
1124} 1124}
1125 1125
1126static void __devexit rtsx_pci_remove(struct pci_dev *pcidev) 1126static void rtsx_pci_remove(struct pci_dev *pcidev)
1127{ 1127{
1128 struct pcr_handle *handle = pci_get_drvdata(pcidev); 1128 struct pcr_handle *handle = pci_get_drvdata(pcidev);
1129 struct rtsx_pcr *pcr = handle->pcr; 1129 struct rtsx_pcr *pcr = handle->pcr;
@@ -1241,7 +1241,7 @@ static struct pci_driver rtsx_pci_driver = {
1241 .name = DRV_NAME_RTSX_PCI, 1241 .name = DRV_NAME_RTSX_PCI,
1242 .id_table = rtsx_pci_ids, 1242 .id_table = rtsx_pci_ids,
1243 .probe = rtsx_pci_probe, 1243 .probe = rtsx_pci_probe,
1244 .remove = __devexit_p(rtsx_pci_remove), 1244 .remove = rtsx_pci_remove,
1245 .suspend = rtsx_pci_suspend, 1245 .suspend = rtsx_pci_suspend,
1246 .resume = rtsx_pci_resume, 1246 .resume = rtsx_pci_resume,
1247}; 1247};
diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c
index 1225dcbcfcfc..9bd33169a111 100644
--- a/drivers/mfd/sta2x11-mfd.c
+++ b/drivers/mfd/sta2x11-mfd.c
@@ -510,19 +510,19 @@ enum mfd1_bar1_cells {
510 STA2X11_APB_SOC_REGS = 0, 510 STA2X11_APB_SOC_REGS = 0,
511}; 511};
512 512
513static const __devinitconst struct resource vic_resources[] = { 513static const struct resource vic_resources[] = {
514 CELL_4K(STA2X11_MFD_VIC_NAME, STA2X11_VIC), 514 CELL_4K(STA2X11_MFD_VIC_NAME, STA2X11_VIC),
515}; 515};
516 516
517static const __devinitconst struct resource apb_soc_regs_resources[] = { 517static const struct resource apb_soc_regs_resources[] = {
518 CELL_4K(STA2X11_MFD_APB_SOC_REGS_NAME, STA2X11_APB_SOC_REGS), 518 CELL_4K(STA2X11_MFD_APB_SOC_REGS_NAME, STA2X11_APB_SOC_REGS),
519}; 519};
520 520
521static __devinitdata struct mfd_cell sta2x11_mfd1_bar0[] = { 521static struct mfd_cell sta2x11_mfd1_bar0[] = {
522 DEV(STA2X11_MFD_VIC_NAME, vic_resources), 522 DEV(STA2X11_MFD_VIC_NAME, vic_resources),
523}; 523};
524 524
525static __devinitdata struct mfd_cell sta2x11_mfd1_bar1[] = { 525static struct mfd_cell sta2x11_mfd1_bar1[] = {
526 DEV(STA2X11_MFD_APB_SOC_REGS_NAME, apb_soc_regs_resources), 526 DEV(STA2X11_MFD_APB_SOC_REGS_NAME, apb_soc_regs_resources),
527}; 527};
528 528
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 5e8e6927cfcd..4b11202061be 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -892,8 +892,7 @@ static struct irq_domain_ops stmpe_irq_ops = {
892 .xlate = irq_domain_xlate_twocell, 892 .xlate = irq_domain_xlate_twocell,
893}; 893};
894 894
895static int __devinit stmpe_irq_init(struct stmpe *stmpe, 895static int stmpe_irq_init(struct stmpe *stmpe, struct device_node *np)
896 struct device_node *np)
897{ 896{
898 int base = 0; 897 int base = 0;
899 int num_irqs = stmpe->variant->num_irqs; 898 int num_irqs = stmpe->variant->num_irqs;
@@ -911,7 +910,7 @@ static int __devinit stmpe_irq_init(struct stmpe *stmpe,
911 return 0; 910 return 0;
912} 911}
913 912
914static int __devinit stmpe_chip_init(struct stmpe *stmpe) 913static int stmpe_chip_init(struct stmpe *stmpe)
915{ 914{
916 unsigned int irq_trigger = stmpe->pdata->irq_trigger; 915 unsigned int irq_trigger = stmpe->pdata->irq_trigger;
917 int autosleep_timeout = stmpe->pdata->autosleep_timeout; 916 int autosleep_timeout = stmpe->pdata->autosleep_timeout;
@@ -970,14 +969,13 @@ static int __devinit stmpe_chip_init(struct stmpe *stmpe)
970 return stmpe_reg_write(stmpe, stmpe->regs[STMPE_IDX_ICR_LSB], icr); 969 return stmpe_reg_write(stmpe, stmpe->regs[STMPE_IDX_ICR_LSB], icr);
971} 970}
972 971
973static int __devinit stmpe_add_device(struct stmpe *stmpe, 972static int stmpe_add_device(struct stmpe *stmpe, struct mfd_cell *cell)
974 struct mfd_cell *cell)
975{ 973{
976 return mfd_add_devices(stmpe->dev, stmpe->pdata->id, cell, 1, 974 return mfd_add_devices(stmpe->dev, stmpe->pdata->id, cell, 1,
977 NULL, stmpe->irq_base, stmpe->domain); 975 NULL, stmpe->irq_base, stmpe->domain);
978} 976}
979 977
980static int __devinit stmpe_devices_init(struct stmpe *stmpe) 978static int stmpe_devices_init(struct stmpe *stmpe)
981{ 979{
982 struct stmpe_variant_info *variant = stmpe->variant; 980 struct stmpe_variant_info *variant = stmpe->variant;
983 unsigned int platform_blocks = stmpe->pdata->blocks; 981 unsigned int platform_blocks = stmpe->pdata->blocks;
@@ -1013,8 +1011,7 @@ static int __devinit stmpe_devices_init(struct stmpe *stmpe)
1013 return ret; 1011 return ret;
1014} 1012}
1015 1013
1016void __devinit stmpe_of_probe(struct stmpe_platform_data *pdata, 1014void stmpe_of_probe(struct stmpe_platform_data *pdata, struct device_node *np)
1017 struct device_node *np)
1018{ 1015{
1019 struct device_node *child; 1016 struct device_node *child;
1020 1017
@@ -1044,7 +1041,7 @@ void __devinit stmpe_of_probe(struct stmpe_platform_data *pdata,
1044} 1041}
1045 1042
1046/* Called from client specific probe routines */ 1043/* Called from client specific probe routines */
1047int __devinit stmpe_probe(struct stmpe_client_info *ci, int partnum) 1044int stmpe_probe(struct stmpe_client_info *ci, int partnum)
1048{ 1045{
1049 struct stmpe_platform_data *pdata = dev_get_platdata(ci->dev); 1046 struct stmpe_platform_data *pdata = dev_get_platdata(ci->dev);
1050 struct device_node *np = ci->dev->of_node; 1047 struct device_node *np = ci->dev->of_node;
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index 8ca3bf023fb2..e9f3fb510b44 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -58,7 +58,7 @@ static void tscadc_idle_config(struct ti_tscadc_dev *config)
58 tscadc_writel(config, REG_IDLECONFIG, idleconfig); 58 tscadc_writel(config, REG_IDLECONFIG, idleconfig);
59} 59}
60 60
61static int __devinit ti_tscadc_probe(struct platform_device *pdev) 61static int ti_tscadc_probe(struct platform_device *pdev)
62{ 62{
63 struct ti_tscadc_dev *tscadc; 63 struct ti_tscadc_dev *tscadc;
64 struct resource *res; 64 struct resource *res;
@@ -202,7 +202,7 @@ ret:
202 return err; 202 return err;
203} 203}
204 204
205static int __devexit ti_tscadc_remove(struct platform_device *pdev) 205static int ti_tscadc_remove(struct platform_device *pdev)
206{ 206{
207 struct ti_tscadc_dev *tscadc = platform_get_drvdata(pdev); 207 struct ti_tscadc_dev *tscadc = platform_get_drvdata(pdev);
208 208
@@ -263,7 +263,7 @@ static struct platform_driver ti_tscadc_driver = {
263 .pm = TSCADC_PM_OPS, 263 .pm = TSCADC_PM_OPS,
264 }, 264 },
265 .probe = ti_tscadc_probe, 265 .probe = ti_tscadc_probe,
266 .remove = __devexit_p(ti_tscadc_remove), 266 .remove = ti_tscadc_remove,
267 267
268}; 268};
269 269
diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c
index 10b51f7dfff3..c90a2c450f51 100644
--- a/drivers/mfd/tps80031.c
+++ b/drivers/mfd/tps80031.c
@@ -269,8 +269,7 @@ static int tps80031_init_ext_control(struct tps80031 *tps80031,
269 return ret; 269 return ret;
270} 270}
271 271
272static int __devinit tps80031_irq_init(struct tps80031 *tps80031, int irq, 272static int tps80031_irq_init(struct tps80031 *tps80031, int irq, int irq_base)
273 int irq_base)
274{ 273{
275 struct device *dev = tps80031->dev; 274 struct device *dev = tps80031->dev;
276 int i, ret; 275 int i, ret;
@@ -416,8 +415,8 @@ static const struct regmap_config tps80031_regmap_configs[] = {
416 }, 415 },
417}; 416};
418 417
419static int __devinit tps80031_probe(struct i2c_client *client, 418static int tps80031_probe(struct i2c_client *client,
420 const struct i2c_device_id *id) 419 const struct i2c_device_id *id)
421{ 420{
422 struct tps80031_platform_data *pdata = client->dev.platform_data; 421 struct tps80031_platform_data *pdata = client->dev.platform_data;
423 struct tps80031 *tps80031; 422 struct tps80031 *tps80031;
@@ -519,7 +518,7 @@ fail_client_reg:
519 return ret; 518 return ret;
520} 519}
521 520
522static int __devexit tps80031_remove(struct i2c_client *client) 521static int tps80031_remove(struct i2c_client *client)
523{ 522{
524 struct tps80031 *tps80031 = i2c_get_clientdata(client); 523 struct tps80031 *tps80031 = i2c_get_clientdata(client);
525 int i; 524 int i;
@@ -553,7 +552,7 @@ static struct i2c_driver tps80031_driver = {
553 .owner = THIS_MODULE, 552 .owner = THIS_MODULE,
554 }, 553 },
555 .probe = tps80031_probe, 554 .probe = tps80031_probe,
556 .remove = __devexit_p(tps80031_remove), 555 .remove = tps80031_remove,
557 .id_table = tps80031_id_table, 556 .id_table = tps80031_id_table,
558}; 557};
559 558
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index 583be76e36a8..f361bf38a0aa 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -517,8 +517,8 @@ static struct regmap_irq_chip twl6040_irq_chip = {
517 .mask_base = TWL6040_REG_INTMR, 517 .mask_base = TWL6040_REG_INTMR,
518}; 518};
519 519
520static int __devinit twl6040_probe(struct i2c_client *client, 520static int twl6040_probe(struct i2c_client *client,
521 const struct i2c_device_id *id) 521 const struct i2c_device_id *id)
522{ 522{
523 struct twl6040_platform_data *pdata = client->dev.platform_data; 523 struct twl6040_platform_data *pdata = client->dev.platform_data;
524 struct device_node *node = client->dev.of_node; 524 struct device_node *node = client->dev.of_node;
@@ -699,7 +699,7 @@ err:
699 return ret; 699 return ret;
700} 700}
701 701
702static int __devexit twl6040_remove(struct i2c_client *client) 702static int twl6040_remove(struct i2c_client *client)
703{ 703{
704 struct twl6040 *twl6040 = i2c_get_clientdata(client); 704 struct twl6040 *twl6040 = i2c_get_clientdata(client);
705 705
@@ -735,7 +735,7 @@ static struct i2c_driver twl6040_driver = {
735 .owner = THIS_MODULE, 735 .owner = THIS_MODULE,
736 }, 736 },
737 .probe = twl6040_probe, 737 .probe = twl6040_probe,
738 .remove = __devexit_p(twl6040_remove), 738 .remove = twl6040_remove,
739 .id_table = twl6040_i2c_id, 739 .id_table = twl6040_i2c_id,
740}; 740};
741 741
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c
index 733c06bd2d17..e5d8f63b252a 100644
--- a/drivers/mfd/vexpress-sysreg.c
+++ b/drivers/mfd/vexpress-sysreg.c
@@ -414,7 +414,7 @@ static ssize_t vexpress_sysreg_sys_id_show(struct device *dev,
414 414
415DEVICE_ATTR(sys_id, S_IRUGO, vexpress_sysreg_sys_id_show, NULL); 415DEVICE_ATTR(sys_id, S_IRUGO, vexpress_sysreg_sys_id_show, NULL);
416 416
417static int __devinit vexpress_sysreg_probe(struct platform_device *pdev) 417static int vexpress_sysreg_probe(struct platform_device *pdev)
418{ 418{
419 int err; 419 int err;
420 struct resource *res = platform_get_resource(pdev, 420 struct resource *res = platform_get_resource(pdev,
diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c
index 8ee0f74f9374..083fcd29c9c6 100644
--- a/drivers/mmc/host/dw_mmc-pci.c
+++ b/drivers/mmc/host/dw_mmc-pci.c
@@ -134,7 +134,7 @@ static struct pci_driver dw_mci_pci_driver = {
134 .name = "dw_mmc_pci", 134 .name = "dw_mmc_pci",
135 .id_table = dw_mci_pci_id, 135 .id_table = dw_mci_pci_id,
136 .probe = dw_mci_pci_probe, 136 .probe = dw_mci_pci_probe,
137 .remove = __devexit_p(dw_mci_pci_remove), 137 .remove = dw_mci_pci_remove,
138 .driver = { 138 .driver = {
139 .pm = &dw_mci_pci_pmops 139 .pm = &dw_mci_pci_pmops
140 }, 140 },
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 222036c9e053..5e1fb1d2c422 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -120,7 +120,7 @@ MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
120 120
121static struct platform_driver dw_mci_pltfm_driver = { 121static struct platform_driver dw_mci_pltfm_driver = {
122 .probe = dw_mci_pltfm_probe, 122 .probe = dw_mci_pltfm_probe,
123 .remove = __devexit_p(dw_mci_pltfm_remove), 123 .remove = dw_mci_pltfm_remove,
124 .driver = { 124 .driver = {
125 .name = "dw_mmc", 125 .name = "dw_mmc",
126 .of_match_table = of_match_ptr(dw_mci_pltfm_match), 126 .of_match_table = of_match_ptr(dw_mci_pltfm_match),
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 12b0a78497f6..2592dddbd965 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -111,7 +111,7 @@ static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(const char *hid)
111 return NULL; 111 return NULL;
112} 112}
113 113
114static int __devinit sdhci_acpi_probe(struct platform_device *pdev) 114static int sdhci_acpi_probe(struct platform_device *pdev)
115{ 115{
116 struct device *dev = &pdev->dev; 116 struct device *dev = &pdev->dev;
117 acpi_handle handle = ACPI_HANDLE(dev); 117 acpi_handle handle = ACPI_HANDLE(dev);
@@ -214,7 +214,7 @@ err_free:
214 return err; 214 return err;
215} 215}
216 216
217static int __devexit sdhci_acpi_remove(struct platform_device *pdev) 217static int sdhci_acpi_remove(struct platform_device *pdev)
218{ 218{
219 struct sdhci_acpi_host *c = platform_get_drvdata(pdev); 219 struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
220 struct device *dev = &pdev->dev; 220 struct device *dev = &pdev->dev;
@@ -302,7 +302,7 @@ static struct platform_driver sdhci_acpi_driver = {
302 .pm = &sdhci_acpi_pm_ops, 302 .pm = &sdhci_acpi_pm_ops,
303 }, 303 },
304 .probe = sdhci_acpi_probe, 304 .probe = sdhci_acpi_probe,
305 .remove = __devexit_p(sdhci_acpi_remove), 305 .remove = sdhci_acpi_remove,
306}; 306};
307 307
308module_platform_driver(sdhci_acpi_driver); 308module_platform_driver(sdhci_acpi_driver);
diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 5ba4605e4f80..154f0e8e931c 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -766,7 +766,7 @@ static struct of_device_id wmt_mci_dt_ids[] = {
766 { /* Sentinel */ }, 766 { /* Sentinel */ },
767}; 767};
768 768
769static int __devinit wmt_mci_probe(struct platform_device *pdev) 769static int wmt_mci_probe(struct platform_device *pdev)
770{ 770{
771 struct mmc_host *mmc; 771 struct mmc_host *mmc;
772 struct wmt_mci_priv *priv; 772 struct wmt_mci_priv *priv;
@@ -892,7 +892,7 @@ fail1:
892 return ret; 892 return ret;
893} 893}
894 894
895static int __devexit wmt_mci_remove(struct platform_device *pdev) 895static int wmt_mci_remove(struct platform_device *pdev)
896{ 896{
897 struct mmc_host *mmc; 897 struct mmc_host *mmc;
898 struct wmt_mci_priv *priv; 898 struct wmt_mci_priv *priv;
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index ea7ea7b595d8..945c9f762349 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -618,9 +618,8 @@ static char *otp_setup(struct mtd_info *device, char revision)
618/* 618/*
619 * Register DataFlash device with MTD subsystem. 619 * Register DataFlash device with MTD subsystem.
620 */ 620 */
621static int 621static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages,
622add_dataflash_otp(struct spi_device *spi, char *name, 622 int pagesize, int pageoffset, char revision)
623 int nr_pages, int pagesize, int pageoffset, char revision)
624{ 623{
625 struct dataflash *priv; 624 struct dataflash *priv;
626 struct mtd_info *device; 625 struct mtd_info *device;
@@ -679,9 +678,8 @@ add_dataflash_otp(struct spi_device *spi, char *name,
679 return err; 678 return err;
680} 679}
681 680
682static inline int 681static inline int add_dataflash(struct spi_device *spi, char *name,
683add_dataflash(struct spi_device *spi, char *name, 682 int nr_pages, int pagesize, int pageoffset)
684 int nr_pages, int pagesize, int pageoffset)
685{ 683{
686 return add_dataflash_otp(spi, name, nr_pages, pagesize, 684 return add_dataflash_otp(spi, name, nr_pages, pagesize,
687 pageoffset, 0); 685 pageoffset, 0);
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index 2d2c2a5d4d2a..2aabd96bf0ff 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -757,7 +757,7 @@ err_probe:
757 757
758#ifdef CONFIG_OF 758#ifdef CONFIG_OF
759static int spear_smi_probe_config_dt(struct platform_device *pdev, 759static int spear_smi_probe_config_dt(struct platform_device *pdev,
760 struct device_node *np) 760 struct device_node *np)
761{ 761{
762 struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev); 762 struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev);
763 struct device_node *pp = NULL; 763 struct device_node *pp = NULL;
@@ -800,7 +800,7 @@ static int spear_smi_probe_config_dt(struct platform_device *pdev,
800} 800}
801#else 801#else
802static int spear_smi_probe_config_dt(struct platform_device *pdev, 802static int spear_smi_probe_config_dt(struct platform_device *pdev,
803 struct device_node *np) 803 struct device_node *np)
804{ 804{
805 return -ENOSYS; 805 return -ENOSYS;
806} 806}
diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c
index ff8681a25831..f784cf0caa13 100644
--- a/drivers/mtd/maps/esb2rom.c
+++ b/drivers/mtd/maps/esb2rom.c
@@ -145,7 +145,7 @@ static void esb2rom_cleanup(struct esb2rom_window *window)
145} 145}
146 146
147static int esb2rom_init_one(struct pci_dev *pdev, 147static int esb2rom_init_one(struct pci_dev *pdev,
148 const struct pci_device_id *ent) 148 const struct pci_device_id *ent)
149{ 149{
150 static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL }; 150 static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
151 struct esb2rom_window *window = &esb2rom_window; 151 struct esb2rom_window *window = &esb2rom_window;
diff --git a/drivers/mtd/maps/intel_vr_nor.c b/drivers/mtd/maps/intel_vr_nor.c
index 3ee2ad1dcbe7..b14053b25026 100644
--- a/drivers/mtd/maps/intel_vr_nor.c
+++ b/drivers/mtd/maps/intel_vr_nor.c
@@ -189,8 +189,7 @@ static void vr_nor_pci_remove(struct pci_dev *dev)
189 pci_disable_device(dev); 189 pci_disable_device(dev);
190} 190}
191 191
192static int 192static int vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
193vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
194{ 193{
195 struct vr_nor_mtd *p = NULL; 194 struct vr_nor_mtd *p = NULL;
196 unsigned int exp_timing_cs0; 195 unsigned int exp_timing_cs0;
diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c
index ed82914966f5..c3aebd5da5d6 100644
--- a/drivers/mtd/maps/pci.c
+++ b/drivers/mtd/maps/pci.c
@@ -253,8 +253,7 @@ static struct pci_device_id mtd_pci_ids[] = {
253 * Generic code follows. 253 * Generic code follows.
254 */ 254 */
255 255
256static int 256static int mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
257mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
258{ 257{
259 struct mtd_pci_info *info = (struct mtd_pci_info *)id->driver_data; 258 struct mtd_pci_info *info = (struct mtd_pci_info *)id->driver_data;
260 struct map_pci_info *map = NULL; 259 struct map_pci_info *map = NULL;
@@ -308,8 +307,7 @@ out:
308 return err; 307 return err;
309} 308}
310 309
311static void 310static void mtd_pci_remove(struct pci_dev *dev)
312mtd_pci_remove(struct pci_dev *dev)
313{ 311{
314 struct mtd_info *mtd = pci_get_drvdata(dev); 312 struct mtd_info *mtd = pci_get_drvdata(dev);
315 struct map_pci_info *map = mtd->priv; 313 struct map_pci_info *map = mtd->priv;
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 37cdc201652f..67cc73c18ddd 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -78,7 +78,7 @@ static int of_flash_remove(struct platform_device *dev)
78 * compatible binding, which has an extra "probe-type" property 78 * compatible binding, which has an extra "probe-type" property
79 * describing the type of flash probe necessary. */ 79 * describing the type of flash probe necessary. */
80static struct mtd_info *obsolete_probe(struct platform_device *dev, 80static struct mtd_info *obsolete_probe(struct platform_device *dev,
81 struct map_info *map) 81 struct map_info *map)
82{ 82{
83 struct device_node *dp = dev->dev.of_node; 83 struct device_node *dp = dev->dev.of_node;
84 const char *of_probe; 84 const char *of_probe;
diff --git a/drivers/mtd/maps/pismo.c b/drivers/mtd/maps/pismo.c
index afea93b515d5..dc6df9abea0b 100644
--- a/drivers/mtd/maps/pismo.c
+++ b/drivers/mtd/maps/pismo.c
@@ -66,8 +66,8 @@ static unsigned int pismo_width_to_bytes(unsigned int width)
66 return 1 << width; 66 return 1 << width;
67} 67}
68 68
69static int pismo_eeprom_read(struct i2c_client *client, void *buf, 69static int pismo_eeprom_read(struct i2c_client *client, void *buf, u8 addr,
70 u8 addr, size_t size) 70 size_t size)
71{ 71{
72 int ret; 72 int ret;
73 struct i2c_msg msg[] = { 73 struct i2c_msg msg[] = {
@@ -89,7 +89,8 @@ static int pismo_eeprom_read(struct i2c_client *client, void *buf,
89} 89}
90 90
91static int pismo_add_device(struct pismo_data *pismo, int i, 91static int pismo_add_device(struct pismo_data *pismo, int i,
92 struct pismo_mem *region, const char *name, void *pdata, size_t psize) 92 struct pismo_mem *region, const char *name,
93 void *pdata, size_t psize)
93{ 94{
94 struct platform_device *dev; 95 struct platform_device *dev;
95 struct resource res = { }; 96 struct resource res = { };
@@ -130,7 +131,7 @@ static int pismo_add_device(struct pismo_data *pismo, int i,
130} 131}
131 132
132static int pismo_add_nor(struct pismo_data *pismo, int i, 133static int pismo_add_nor(struct pismo_data *pismo, int i,
133 struct pismo_mem *region) 134 struct pismo_mem *region)
134{ 135{
135 struct physmap_flash_data data = { 136 struct physmap_flash_data data = {
136 .width = region->width, 137 .width = region->width,
@@ -144,7 +145,7 @@ static int pismo_add_nor(struct pismo_data *pismo, int i,
144} 145}
145 146
146static int pismo_add_sram(struct pismo_data *pismo, int i, 147static int pismo_add_sram(struct pismo_data *pismo, int i,
147 struct pismo_mem *region) 148 struct pismo_mem *region)
148{ 149{
149 struct platdata_mtd_ram data = { 150 struct platdata_mtd_ram data = {
150 .bankwidth = region->width, 151 .bankwidth = region->width,
@@ -155,7 +156,7 @@ static int pismo_add_sram(struct pismo_data *pismo, int i,
155} 156}
156 157
157static void pismo_add_one(struct pismo_data *pismo, int i, 158static void pismo_add_one(struct pismo_data *pismo, int i,
158 const struct pismo_cs_block *cs, phys_addr_t base) 159 const struct pismo_cs_block *cs, phys_addr_t base)
159{ 160{
160 struct device *dev = &pismo->client->dev; 161 struct device *dev = &pismo->client->dev;
161 struct pismo_mem region; 162 struct pismo_mem region;
@@ -211,7 +212,7 @@ static int pismo_remove(struct i2c_client *client)
211} 212}
212 213
213static int pismo_probe(struct i2c_client *client, 214static int pismo_probe(struct i2c_client *client,
214 const struct i2c_device_id *id) 215 const struct i2c_device_id *id)
215{ 216{
216 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 217 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
217 struct pismo_pdata *pdata = client->dev.platform_data; 218 struct pismo_pdata *pdata = client->dev.platform_data;
diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c
index 71796137e97b..c77b68c9412f 100644
--- a/drivers/mtd/maps/scb2_flash.c
+++ b/drivers/mtd/maps/scb2_flash.c
@@ -69,8 +69,7 @@ static struct map_info scb2_map = {
69}; 69};
70static int region_fail; 70static int region_fail;
71 71
72static int 72static int scb2_fixup_mtd(struct mtd_info *mtd)
73scb2_fixup_mtd(struct mtd_info *mtd)
74{ 73{
75 int i; 74 int i;
76 int done = 0; 75 int done = 0;
@@ -133,8 +132,8 @@ scb2_fixup_mtd(struct mtd_info *mtd)
133/* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */ 132/* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */
134#define CSB5_FCR 0x41 133#define CSB5_FCR 0x41
135#define CSB5_FCR_DECODE_ALL 0x0e 134#define CSB5_FCR_DECODE_ALL 0x0e
136static int 135static int scb2_flash_probe(struct pci_dev *dev,
137scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent) 136 const struct pci_device_id *ent)
138{ 137{
139 u8 reg; 138 u8 reg;
140 139
@@ -197,8 +196,7 @@ scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent)
197 return 0; 196 return 0;
198} 197}
199 198
200static void 199static void scb2_flash_remove(struct pci_dev *dev)
201scb2_flash_remove(struct pci_dev *dev)
202{ 200{
203 if (!scb2_mtd) 201 if (!scb2_mtd)
204 return; 202 return;
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 90bdca61c797..c516a9408087 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -338,7 +338,7 @@ static int pmecc_get_ecc_bytes(int cap, int sector_size)
338} 338}
339 339
340static void pmecc_config_ecc_layout(struct nand_ecclayout *layout, 340static void pmecc_config_ecc_layout(struct nand_ecclayout *layout,
341 int oobsize, int ecc_len) 341 int oobsize, int ecc_len)
342{ 342{
343 int i; 343 int i;
344 344
@@ -1213,7 +1213,7 @@ static void atmel_nand_hwctl(struct mtd_info *mtd, int mode)
1213 1213
1214#if defined(CONFIG_OF) 1214#if defined(CONFIG_OF)
1215static int atmel_of_init_port(struct atmel_nand_host *host, 1215static int atmel_of_init_port(struct atmel_nand_host *host,
1216 struct device_node *np) 1216 struct device_node *np)
1217{ 1217{
1218 u32 val, table_offset; 1218 u32 val, table_offset;
1219 u32 offset[2]; 1219 u32 offset[2];
@@ -1300,7 +1300,7 @@ static int atmel_of_init_port(struct atmel_nand_host *host,
1300} 1300}
1301#else 1301#else
1302static int atmel_of_init_port(struct atmel_nand_host *host, 1302static int atmel_of_init_port(struct atmel_nand_host *host,
1303 struct device_node *np) 1303 struct device_node *np)
1304{ 1304{
1305 return -EINVAL; 1305 return -EINVAL;
1306} 1306}
diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/bcm47xxnflash/main.c
index 2b8b05bec3dd..8363a9a5fa3f 100644
--- a/drivers/mtd/nand/bcm47xxnflash/main.c
+++ b/drivers/mtd/nand/bcm47xxnflash/main.c
@@ -66,7 +66,7 @@ out:
66 return err; 66 return err;
67} 67}
68 68
69static int __devexit bcm47xxnflash_remove(struct platform_device *pdev) 69static int bcm47xxnflash_remove(struct platform_device *pdev)
70{ 70{
71 struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev); 71 struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev);
72 72
@@ -77,7 +77,7 @@ static int __devexit bcm47xxnflash_remove(struct platform_device *pdev)
77} 77}
78 78
79static struct platform_driver bcm47xxnflash_driver = { 79static struct platform_driver bcm47xxnflash_driver = {
80 .remove = __devexit_p(bcm47xxnflash_remove), 80 .remove = bcm47xxnflash_remove,
81 .driver = { 81 .driver = {
82 .name = "bcma_nflash", 82 .name = "bcma_nflash",
83 .owner = THIS_MODULE, 83 .owner = THIS_MODULE,
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 5a8f5c4ce512..04e07252d74b 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -153,8 +153,8 @@ static void fun_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
153} 153}
154 154
155static int fun_chip_init(struct fsl_upm_nand *fun, 155static int fun_chip_init(struct fsl_upm_nand *fun,
156 const struct device_node *upm_np, 156 const struct device_node *upm_np,
157 const struct resource *io_res) 157 const struct resource *io_res)
158{ 158{
159 int ret; 159 int ret;
160 struct device_node *flash_np; 160 struct device_node *flash_np;
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 1d7446434b0e..67e62d3d495c 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -865,7 +865,7 @@ static bool filter(struct dma_chan *chan, void *slave)
865 865
866#ifdef CONFIG_OF 866#ifdef CONFIG_OF
867static int fsmc_nand_probe_config_dt(struct platform_device *pdev, 867static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
868 struct device_node *np) 868 struct device_node *np)
869{ 869{
870 struct fsmc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev); 870 struct fsmc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
871 u32 val; 871 u32 val;
@@ -887,7 +887,7 @@ static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
887} 887}
888#else 888#else
889static int fsmc_nand_probe_config_dt(struct platform_device *pdev, 889static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
890 struct device_node *np) 890 struct device_node *np)
891{ 891{
892 return -ENOSYS; 892 return -ENOSYS;
893} 893}
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 5cd141f7bfc2..e9b1c47e3cf9 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -319,8 +319,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
319 return 0; 319 return 0;
320} 320}
321 321
322static int 322static int acquire_register_block(struct gpmi_nand_data *this,
323acquire_register_block(struct gpmi_nand_data *this, const char *res_name) 323 const char *res_name)
324{ 324{
325 struct platform_device *pdev = this->pdev; 325 struct platform_device *pdev = this->pdev;
326 struct resources *res = &this->resources; 326 struct resources *res = &this->resources;
@@ -360,8 +360,7 @@ static void release_register_block(struct gpmi_nand_data *this)
360 res->bch_regs = NULL; 360 res->bch_regs = NULL;
361} 361}
362 362
363static int 363static int acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
364acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
365{ 364{
366 struct platform_device *pdev = this->pdev; 365 struct platform_device *pdev = this->pdev;
367 struct resources *res = &this->resources; 366 struct resources *res = &this->resources;
diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c
index 8d415f014e1d..b76460eeaf22 100644
--- a/drivers/mtd/nand/jz4740_nand.c
+++ b/drivers/mtd/nand/jz4740_nand.c
@@ -326,7 +326,8 @@ static inline void jz_nand_iounmap_resource(struct resource *res,
326static int jz_nand_detect_bank(struct platform_device *pdev, 326static int jz_nand_detect_bank(struct platform_device *pdev,
327 struct jz_nand *nand, unsigned char bank, 327 struct jz_nand *nand, unsigned char bank,
328 size_t chipnr, uint8_t *nand_maf_id, 328 size_t chipnr, uint8_t *nand_maf_id,
329 uint8_t *nand_dev_id) { 329 uint8_t *nand_dev_id)
330{
330 int ret; 331 int ret;
331 int gpio; 332 int gpio;
332 char gpio_name[9]; 333 char gpio_name[9];
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index 6d6002bab060..74f1c157a480 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -141,7 +141,7 @@ static int orion_mdio_reset(struct mii_bus *bus)
141 return 0; 141 return 0;
142} 142}
143 143
144static int __devinit orion_mdio_probe(struct platform_device *pdev) 144static int orion_mdio_probe(struct platform_device *pdev)
145{ 145{
146 struct device_node *np = pdev->dev.of_node; 146 struct device_node *np = pdev->dev.of_node;
147 struct mii_bus *bus; 147 struct mii_bus *bus;
@@ -197,7 +197,7 @@ static int __devinit orion_mdio_probe(struct platform_device *pdev)
197 return 0; 197 return 0;
198} 198}
199 199
200static int __devexit orion_mdio_remove(struct platform_device *pdev) 200static int orion_mdio_remove(struct platform_device *pdev)
201{ 201{
202 struct mii_bus *bus = platform_get_drvdata(pdev); 202 struct mii_bus *bus = platform_get_drvdata(pdev);
203 mdiobus_unregister(bus); 203 mdiobus_unregister(bus);
@@ -214,7 +214,7 @@ MODULE_DEVICE_TABLE(of, orion_mdio_match);
214 214
215static struct platform_driver orion_mdio_driver = { 215static struct platform_driver orion_mdio_driver = {
216 .probe = orion_mdio_probe, 216 .probe = orion_mdio_probe,
217 .remove = __devexit_p(orion_mdio_remove), 217 .remove = orion_mdio_remove,
218 .driver = { 218 .driver = {
219 .name = "orion-mdio", 219 .name = "orion-mdio",
220 .of_match_table = orion_mdio_match, 220 .of_match_table = orion_mdio_match,
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 3f8086b9f5e5..b6025c305e10 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -635,7 +635,7 @@ static void mvneta_rxq_bm_disable(struct mvneta_port *pp,
635 635
636 636
637/* Sets the RGMII Enable bit (RGMIIEn) in port MAC control register */ 637/* Sets the RGMII Enable bit (RGMIIEn) in port MAC control register */
638static void __devinit mvneta_gmac_rgmii_set(struct mvneta_port *pp, int enable) 638static void mvneta_gmac_rgmii_set(struct mvneta_port *pp, int enable)
639{ 639{
640 u32 val; 640 u32 val;
641 641
@@ -650,7 +650,7 @@ static void __devinit mvneta_gmac_rgmii_set(struct mvneta_port *pp, int enable)
650} 650}
651 651
652/* Config SGMII port */ 652/* Config SGMII port */
653static void __devinit mvneta_port_sgmii_config(struct mvneta_port *pp) 653static void mvneta_port_sgmii_config(struct mvneta_port *pp)
654{ 654{
655 u32 val; 655 u32 val;
656 656
@@ -2564,7 +2564,7 @@ const struct ethtool_ops mvneta_eth_tool_ops = {
2564}; 2564};
2565 2565
2566/* Initialize hw */ 2566/* Initialize hw */
2567static int __devinit mvneta_init(struct mvneta_port *pp, int phy_addr) 2567static int mvneta_init(struct mvneta_port *pp, int phy_addr)
2568{ 2568{
2569 int queue; 2569 int queue;
2570 2570
@@ -2613,9 +2613,8 @@ static void mvneta_deinit(struct mvneta_port *pp)
2613} 2613}
2614 2614
2615/* platform glue : initialize decoding windows */ 2615/* platform glue : initialize decoding windows */
2616static void __devinit 2616static void mvneta_conf_mbus_windows(struct mvneta_port *pp,
2617mvneta_conf_mbus_windows(struct mvneta_port *pp, 2617 const struct mbus_dram_target_info *dram)
2618 const struct mbus_dram_target_info *dram)
2619{ 2618{
2620 u32 win_enable; 2619 u32 win_enable;
2621 u32 win_protect; 2620 u32 win_protect;
@@ -2648,7 +2647,7 @@ mvneta_conf_mbus_windows(struct mvneta_port *pp,
2648} 2647}
2649 2648
2650/* Power up the port */ 2649/* Power up the port */
2651static void __devinit mvneta_port_power_up(struct mvneta_port *pp, int phy_mode) 2650static void mvneta_port_power_up(struct mvneta_port *pp, int phy_mode)
2652{ 2651{
2653 u32 val; 2652 u32 val;
2654 2653
@@ -2671,7 +2670,7 @@ static void __devinit mvneta_port_power_up(struct mvneta_port *pp, int phy_mode)
2671} 2670}
2672 2671
2673/* Device initialization routine */ 2672/* Device initialization routine */
2674static int __devinit mvneta_probe(struct platform_device *pdev) 2673static int mvneta_probe(struct platform_device *pdev)
2675{ 2674{
2676 const struct mbus_dram_target_info *dram_target_info; 2675 const struct mbus_dram_target_info *dram_target_info;
2677 struct device_node *dn = pdev->dev.of_node; 2676 struct device_node *dn = pdev->dev.of_node;
@@ -2803,7 +2802,7 @@ err_free_netdev:
2803} 2802}
2804 2803
2805/* Device removal routine */ 2804/* Device removal routine */
2806static int __devexit mvneta_remove(struct platform_device *pdev) 2805static int mvneta_remove(struct platform_device *pdev)
2807{ 2806{
2808 struct net_device *dev = platform_get_drvdata(pdev); 2807 struct net_device *dev = platform_get_drvdata(pdev);
2809 struct mvneta_port *pp = netdev_priv(dev); 2808 struct mvneta_port *pp = netdev_priv(dev);
@@ -2828,7 +2827,7 @@ MODULE_DEVICE_TABLE(of, mvneta_match);
2828 2827
2829static struct platform_driver mvneta_driver = { 2828static struct platform_driver mvneta_driver = {
2830 .probe = mvneta_probe, 2829 .probe = mvneta_probe,
2831 .remove = __devexit_p(mvneta_remove), 2830 .remove = mvneta_remove,
2832 .driver = { 2831 .driver = {
2833 .name = MVNETA_DRIVER_NAME, 2832 .name = MVNETA_DRIVER_NAME,
2834 .of_match_table = mvneta_match, 2833 .of_match_table = mvneta_match,
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 653487dc7b52..87fa5919c455 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -1821,6 +1821,11 @@ static int nv_alloc_rx(struct net_device *dev)
1821 skb->data, 1821 skb->data,
1822 skb_tailroom(skb), 1822 skb_tailroom(skb),
1823 PCI_DMA_FROMDEVICE); 1823 PCI_DMA_FROMDEVICE);
1824 if (pci_dma_mapping_error(np->pci_dev,
1825 np->put_rx_ctx->dma)) {
1826 kfree_skb(skb);
1827 goto packet_dropped;
1828 }
1824 np->put_rx_ctx->dma_len = skb_tailroom(skb); 1829 np->put_rx_ctx->dma_len = skb_tailroom(skb);
1825 np->put_rx.orig->buf = cpu_to_le32(np->put_rx_ctx->dma); 1830 np->put_rx.orig->buf = cpu_to_le32(np->put_rx_ctx->dma);
1826 wmb(); 1831 wmb();
@@ -1830,6 +1835,7 @@ static int nv_alloc_rx(struct net_device *dev)
1830 if (unlikely(np->put_rx_ctx++ == np->last_rx_ctx)) 1835 if (unlikely(np->put_rx_ctx++ == np->last_rx_ctx))
1831 np->put_rx_ctx = np->first_rx_ctx; 1836 np->put_rx_ctx = np->first_rx_ctx;
1832 } else { 1837 } else {
1838packet_dropped:
1833 u64_stats_update_begin(&np->swstats_rx_syncp); 1839 u64_stats_update_begin(&np->swstats_rx_syncp);
1834 np->stat_rx_dropped++; 1840 np->stat_rx_dropped++;
1835 u64_stats_update_end(&np->swstats_rx_syncp); 1841 u64_stats_update_end(&np->swstats_rx_syncp);
@@ -1856,6 +1862,11 @@ static int nv_alloc_rx_optimized(struct net_device *dev)
1856 skb->data, 1862 skb->data,
1857 skb_tailroom(skb), 1863 skb_tailroom(skb),
1858 PCI_DMA_FROMDEVICE); 1864 PCI_DMA_FROMDEVICE);
1865 if (pci_dma_mapping_error(np->pci_dev,
1866 np->put_rx_ctx->dma)) {
1867 kfree_skb(skb);
1868 goto packet_dropped;
1869 }
1859 np->put_rx_ctx->dma_len = skb_tailroom(skb); 1870 np->put_rx_ctx->dma_len = skb_tailroom(skb);
1860 np->put_rx.ex->bufhigh = cpu_to_le32(dma_high(np->put_rx_ctx->dma)); 1871 np->put_rx.ex->bufhigh = cpu_to_le32(dma_high(np->put_rx_ctx->dma));
1861 np->put_rx.ex->buflow = cpu_to_le32(dma_low(np->put_rx_ctx->dma)); 1872 np->put_rx.ex->buflow = cpu_to_le32(dma_low(np->put_rx_ctx->dma));
@@ -1866,6 +1877,7 @@ static int nv_alloc_rx_optimized(struct net_device *dev)
1866 if (unlikely(np->put_rx_ctx++ == np->last_rx_ctx)) 1877 if (unlikely(np->put_rx_ctx++ == np->last_rx_ctx))
1867 np->put_rx_ctx = np->first_rx_ctx; 1878 np->put_rx_ctx = np->first_rx_ctx;
1868 } else { 1879 } else {
1880packet_dropped:
1869 u64_stats_update_begin(&np->swstats_rx_syncp); 1881 u64_stats_update_begin(&np->swstats_rx_syncp);
1870 np->stat_rx_dropped++; 1882 np->stat_rx_dropped++;
1871 u64_stats_update_end(&np->swstats_rx_syncp); 1883 u64_stats_update_end(&np->swstats_rx_syncp);
@@ -2217,6 +2229,15 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
2217 bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; 2229 bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;
2218 np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt, 2230 np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt,
2219 PCI_DMA_TODEVICE); 2231 PCI_DMA_TODEVICE);
2232 if (pci_dma_mapping_error(np->pci_dev,
2233 np->put_tx_ctx->dma)) {
2234 /* on DMA mapping error - drop the packet */
2235 kfree_skb(skb);
2236 u64_stats_update_begin(&np->swstats_tx_syncp);
2237 np->stat_tx_dropped++;
2238 u64_stats_update_end(&np->swstats_tx_syncp);
2239 return NETDEV_TX_OK;
2240 }
2220 np->put_tx_ctx->dma_len = bcnt; 2241 np->put_tx_ctx->dma_len = bcnt;
2221 np->put_tx_ctx->dma_single = 1; 2242 np->put_tx_ctx->dma_single = 1;
2222 put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma); 2243 put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma);
@@ -2337,6 +2358,15 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
2337 bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; 2358 bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;
2338 np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt, 2359 np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt,
2339 PCI_DMA_TODEVICE); 2360 PCI_DMA_TODEVICE);
2361 if (pci_dma_mapping_error(np->pci_dev,
2362 np->put_tx_ctx->dma)) {
2363 /* on DMA mapping error - drop the packet */
2364 kfree_skb(skb);
2365 u64_stats_update_begin(&np->swstats_tx_syncp);
2366 np->stat_tx_dropped++;
2367 u64_stats_update_end(&np->swstats_tx_syncp);
2368 return NETDEV_TX_OK;
2369 }
2340 np->put_tx_ctx->dma_len = bcnt; 2370 np->put_tx_ctx->dma_len = bcnt;
2341 np->put_tx_ctx->dma_single = 1; 2371 np->put_tx_ctx->dma_single = 1;
2342 put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma)); 2372 put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma));
@@ -5003,6 +5033,11 @@ static int nv_loopback_test(struct net_device *dev)
5003 test_dma_addr = pci_map_single(np->pci_dev, tx_skb->data, 5033 test_dma_addr = pci_map_single(np->pci_dev, tx_skb->data,
5004 skb_tailroom(tx_skb), 5034 skb_tailroom(tx_skb),
5005 PCI_DMA_FROMDEVICE); 5035 PCI_DMA_FROMDEVICE);
5036 if (pci_dma_mapping_error(np->pci_dev,
5037 test_dma_addr)) {
5038 dev_kfree_skb_any(tx_skb);
5039 goto out;
5040 }
5006 pkt_data = skb_put(tx_skb, pkt_len); 5041 pkt_data = skb_put(tx_skb, pkt_len);
5007 for (i = 0; i < pkt_len; i++) 5042 for (i = 0; i < pkt_len; i++)
5008 pkt_data[i] = (u8)(i & 0xff); 5043 pkt_data[i] = (u8)(i & 0xff);
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 5e62c1aeeffb..463597f919f1 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -247,8 +247,7 @@ static void cpts_clk_init(struct cpts *cpts)
247 cpts->refclk = NULL; 247 cpts->refclk = NULL;
248 return; 248 return;
249 } 249 }
250 clk_enable(cpts->refclk); 250 clk_prepare_enable(cpts->refclk);
251 cpts->freq = cpts->refclk->recalc(cpts->refclk);
252} 251}
253 252
254static void cpts_clk_release(struct cpts *cpts) 253static void cpts_clk_release(struct cpts *cpts)
diff --git a/drivers/net/ethernet/ti/cpts.h b/drivers/net/ethernet/ti/cpts.h
index e1bba3a496b2..fe993cdd7e23 100644
--- a/drivers/net/ethernet/ti/cpts.h
+++ b/drivers/net/ethernet/ti/cpts.h
@@ -120,7 +120,6 @@ struct cpts {
120 struct delayed_work overflow_work; 120 struct delayed_work overflow_work;
121 int phc_index; 121 int phc_index;
122 struct clk *refclk; 122 struct clk *refclk;
123 unsigned long freq;
124 struct list_head events; 123 struct list_head events;
125 struct list_head pool; 124 struct list_head pool;
126 struct cpts_event pool_data[CPTS_MAX_EVENTS]; 125 struct cpts_event pool_data[CPTS_MAX_EVENTS];
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 504f7f1cad94..fbd106edbe59 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -180,7 +180,6 @@ struct tun_struct {
180 int debug; 180 int debug;
181#endif 181#endif
182 spinlock_t lock; 182 spinlock_t lock;
183 struct kmem_cache *flow_cache;
184 struct hlist_head flows[TUN_NUM_FLOW_ENTRIES]; 183 struct hlist_head flows[TUN_NUM_FLOW_ENTRIES];
185 struct timer_list flow_gc_timer; 184 struct timer_list flow_gc_timer;
186 unsigned long ageing_time; 185 unsigned long ageing_time;
@@ -209,8 +208,8 @@ static struct tun_flow_entry *tun_flow_create(struct tun_struct *tun,
209 struct hlist_head *head, 208 struct hlist_head *head,
210 u32 rxhash, u16 queue_index) 209 u32 rxhash, u16 queue_index)
211{ 210{
212 struct tun_flow_entry *e = kmem_cache_alloc(tun->flow_cache, 211 struct tun_flow_entry *e = kmalloc(sizeof(*e), GFP_ATOMIC);
213 GFP_ATOMIC); 212
214 if (e) { 213 if (e) {
215 tun_debug(KERN_INFO, tun, "create flow: hash %u index %u\n", 214 tun_debug(KERN_INFO, tun, "create flow: hash %u index %u\n",
216 rxhash, queue_index); 215 rxhash, queue_index);
@@ -223,19 +222,12 @@ static struct tun_flow_entry *tun_flow_create(struct tun_struct *tun,
223 return e; 222 return e;
224} 223}
225 224
226static void tun_flow_free(struct rcu_head *head)
227{
228 struct tun_flow_entry *e
229 = container_of(head, struct tun_flow_entry, rcu);
230 kmem_cache_free(e->tun->flow_cache, e);
231}
232
233static void tun_flow_delete(struct tun_struct *tun, struct tun_flow_entry *e) 225static void tun_flow_delete(struct tun_struct *tun, struct tun_flow_entry *e)
234{ 226{
235 tun_debug(KERN_INFO, tun, "delete flow: hash %u index %u\n", 227 tun_debug(KERN_INFO, tun, "delete flow: hash %u index %u\n",
236 e->rxhash, e->queue_index); 228 e->rxhash, e->queue_index);
237 hlist_del_rcu(&e->hash_link); 229 hlist_del_rcu(&e->hash_link);
238 call_rcu(&e->rcu, tun_flow_free); 230 kfree_rcu(e, rcu);
239} 231}
240 232
241static void tun_flow_flush(struct tun_struct *tun) 233static void tun_flow_flush(struct tun_struct *tun)
@@ -833,12 +825,6 @@ static int tun_flow_init(struct tun_struct *tun)
833{ 825{
834 int i; 826 int i;
835 827
836 tun->flow_cache = kmem_cache_create("tun_flow_cache",
837 sizeof(struct tun_flow_entry), 0, 0,
838 NULL);
839 if (!tun->flow_cache)
840 return -ENOMEM;
841
842 for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) 828 for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++)
843 INIT_HLIST_HEAD(&tun->flows[i]); 829 INIT_HLIST_HEAD(&tun->flows[i]);
844 830
@@ -854,10 +840,6 @@ static void tun_flow_uninit(struct tun_struct *tun)
854{ 840{
855 del_timer_sync(&tun->flow_gc_timer); 841 del_timer_sync(&tun->flow_gc_timer);
856 tun_flow_flush(tun); 842 tun_flow_flush(tun);
857
858 /* Wait for completion of call_rcu()'s */
859 rcu_barrier();
860 kmem_cache_destroy(tun->flow_cache);
861} 843}
862 844
863/* Initialize net device. */ 845/* Initialize net device. */
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 91d7cb9728eb..6a1ca500e612 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -458,6 +458,7 @@ static const struct usb_device_id products[] = {
458 {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */ 458 {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
459 {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */ 459 {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */
460 {QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */ 460 {QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */
461 {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */
461 462
462 /* 4. Gobi 1000 devices */ 463 /* 4. Gobi 1000 devices */
463 {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ 464 {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 3b3fdf648ea7..656230e0d18c 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -505,7 +505,8 @@ static int vxlan_join_group(struct net_device *dev)
505 struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id); 505 struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id);
506 struct sock *sk = vn->sock->sk; 506 struct sock *sk = vn->sock->sk;
507 struct ip_mreqn mreq = { 507 struct ip_mreqn mreq = {
508 .imr_multiaddr.s_addr = vxlan->gaddr, 508 .imr_multiaddr.s_addr = vxlan->gaddr,
509 .imr_ifindex = vxlan->link,
509 }; 510 };
510 int err; 511 int err;
511 512
@@ -532,7 +533,8 @@ static int vxlan_leave_group(struct net_device *dev)
532 int err = 0; 533 int err = 0;
533 struct sock *sk = vn->sock->sk; 534 struct sock *sk = vn->sock->sk;
534 struct ip_mreqn mreq = { 535 struct ip_mreqn mreq = {
535 .imr_multiaddr.s_addr = vxlan->gaddr, 536 .imr_multiaddr.s_addr = vxlan->gaddr,
537 .imr_ifindex = vxlan->link,
536 }; 538 };
537 539
538 /* Only leave group when last vxlan is done. */ 540 /* Only leave group when last vxlan is done. */
@@ -1189,6 +1191,7 @@ static void vxlan_setup(struct net_device *dev)
1189 1191
1190 dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM; 1192 dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
1191 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; 1193 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
1194 dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
1192 1195
1193 spin_lock_init(&vxlan->hash_lock); 1196 spin_lock_init(&vxlan->hash_lock);
1194 1197
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig
index 5fc15bf8be09..7647ed6b73d7 100644
--- a/drivers/net/wireless/ath/ath9k/Kconfig
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
@@ -2,6 +2,7 @@ config ATH9K_HW
2 tristate 2 tristate
3config ATH9K_COMMON 3config ATH9K_COMMON
4 tristate 4 tristate
5 select ATH_COMMON
5config ATH9K_DFS_DEBUGFS 6config ATH9K_DFS_DEBUGFS
6 def_bool y 7 def_bool y
7 depends on ATH9K_DEBUGFS && ATH9K_DFS_CERTIFIED 8 depends on ATH9K_DEBUGFS && ATH9K_DFS_CERTIFIED
@@ -17,7 +18,6 @@ config ATH9K_BTCOEX_SUPPORT
17config ATH9K 18config ATH9K
18 tristate "Atheros 802.11n wireless cards support" 19 tristate "Atheros 802.11n wireless cards support"
19 depends on MAC80211 20 depends on MAC80211
20 select ATH_COMMON
21 select ATH9K_HW 21 select ATH9K_HW
22 select MAC80211_LEDS 22 select MAC80211_LEDS
23 select LEDS_CLASS 23 select LEDS_CLASS
@@ -56,7 +56,8 @@ config ATH9K_AHB
56 56
57config ATH9K_DEBUGFS 57config ATH9K_DEBUGFS
58 bool "Atheros ath9k debugging" 58 bool "Atheros ath9k debugging"
59 depends on ATH9K && DEBUG_FS 59 depends on ATH9K
60 select MAC80211_DEBUGFS
60 ---help--- 61 ---help---
61 Say Y, if you need access to ath9k's statistics for 62 Say Y, if you need access to ath9k's statistics for
62 interrupts, rate control, etc. 63 interrupts, rate control, etc.
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
index 74fd3977feeb..59bf5f31e212 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -544,7 +544,7 @@ static void ar9003_rx_gain_table_mode0(struct ath_hw *ah)
544 ar9340Common_rx_gain_table_1p0); 544 ar9340Common_rx_gain_table_1p0);
545 else if (AR_SREV_9485_11(ah)) 545 else if (AR_SREV_9485_11(ah))
546 INIT_INI_ARRAY(&ah->iniModesRxGain, 546 INIT_INI_ARRAY(&ah->iniModesRxGain,
547 ar9485Common_wo_xlna_rx_gain_1_1); 547 ar9485_common_rx_gain_1_1);
548 else if (AR_SREV_9550(ah)) { 548 else if (AR_SREV_9550(ah)) {
549 INIT_INI_ARRAY(&ah->iniModesRxGain, 549 INIT_INI_ARRAY(&ah->iniModesRxGain,
550 ar955x_1p0_common_rx_gain_table); 550 ar955x_1p0_common_rx_gain_table);
diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c
index aaebecd19e59..63fd9af3fd39 100644
--- a/drivers/net/wireless/ath/carl9170/fw.c
+++ b/drivers/net/wireless/ath/carl9170/fw.c
@@ -336,8 +336,12 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len)
336 if (SUPP(CARL9170FW_WLANTX_CAB)) { 336 if (SUPP(CARL9170FW_WLANTX_CAB)) {
337 if_comb_types |= 337 if_comb_types |=
338 BIT(NL80211_IFTYPE_AP) | 338 BIT(NL80211_IFTYPE_AP) |
339 BIT(NL80211_IFTYPE_MESH_POINT) |
340 BIT(NL80211_IFTYPE_P2P_GO); 339 BIT(NL80211_IFTYPE_P2P_GO);
340
341#ifdef CONFIG_MAC80211_MESH
342 if_comb_types |=
343 BIT(NL80211_IFTYPE_MESH_POINT);
344#endif /* CONFIG_MAC80211_MESH */
341 } 345 }
342 } 346 }
343 347
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 1261a9b84e04..75464ad4fbd1 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -3091,10 +3091,11 @@ brcmf_configure_wpaie(struct net_device *ndev, struct brcmf_vs_tlv *wpa_ie,
3091 3091
3092 len = wpa_ie->len + TLV_HDR_LEN; 3092 len = wpa_ie->len + TLV_HDR_LEN;
3093 data = (u8 *)wpa_ie; 3093 data = (u8 *)wpa_ie;
3094 offset = 0; 3094 offset = TLV_HDR_LEN;
3095 if (!is_rsn_ie) 3095 if (!is_rsn_ie)
3096 offset += VS_IE_FIXED_HDR_LEN; 3096 offset += VS_IE_FIXED_HDR_LEN;
3097 offset += WPA_IE_VERSION_LEN; 3097 else
3098 offset += WPA_IE_VERSION_LEN;
3098 3099
3099 /* check for multicast cipher suite */ 3100 /* check for multicast cipher suite */
3100 if (offset + WPA_IE_MIN_OUI_LEN > len) { 3101 if (offset + WPA_IE_MIN_OUI_LEN > len) {
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/debug.h b/drivers/net/wireless/brcm80211/brcmsmac/debug.h
index 796836b0f469..822781cf15d4 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/debug.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/debug.h
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (c) 2012 Broadcom Corporation 2 * Copyright (c) 2012 Broadcom Corporation
3 * Copyright (c) 2012 Canonical Ltd.
3 * 4 *
4 * Permission to use, copy, modify, and/or distribute this software for any 5 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above 6 * purpose with or without fee is hereby granted, provided that the above
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
index 606b534347bc..21a824232478 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
@@ -1343,13 +1343,13 @@ static bool wlc_lcnphy_rx_iq_cal_gain(struct brcms_phy *pi, u16 biq1_gain,
1343 1343
1344 wlc_lcnphy_rx_gain_override_enable(pi, true); 1344 wlc_lcnphy_rx_gain_override_enable(pi, true);
1345 wlc_lcnphy_start_tx_tone(pi, 2000, (40 >> 1), 0); 1345 wlc_lcnphy_start_tx_tone(pi, 2000, (40 >> 1), 0);
1346 usleep_range(500, 500); 1346 udelay(500);
1347 write_radio_reg(pi, RADIO_2064_REG112, 0); 1347 write_radio_reg(pi, RADIO_2064_REG112, 0);
1348 if (!wlc_lcnphy_rx_iq_est(pi, 1024, 32, &iq_est_l)) 1348 if (!wlc_lcnphy_rx_iq_est(pi, 1024, 32, &iq_est_l))
1349 return false; 1349 return false;
1350 1350
1351 wlc_lcnphy_start_tx_tone(pi, 2000, 40, 0); 1351 wlc_lcnphy_start_tx_tone(pi, 2000, 40, 0);
1352 usleep_range(500, 500); 1352 udelay(500);
1353 write_radio_reg(pi, RADIO_2064_REG112, 0); 1353 write_radio_reg(pi, RADIO_2064_REG112, 0);
1354 if (!wlc_lcnphy_rx_iq_est(pi, 1024, 32, &iq_est_h)) 1354 if (!wlc_lcnphy_rx_iq_est(pi, 1024, 32, &iq_est_h))
1355 return false; 1355 return false;
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index e71c702e2eb1..800a16526c8e 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -47,6 +47,7 @@ static struct usb_device_id p54u_table[] = {
47 {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */ 47 {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */
48 {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */ 48 {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */
49 {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */ 49 {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */
50 {USB_DEVICE(0x0675, 0x0530)}, /* DrayTek Vigor 530 */
50 {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */ 51 {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */
51 {USB_DEVICE(0x0707, 0xee06)}, /* SMC 2862W-G */ 52 {USB_DEVICE(0x0707, 0xee06)}, /* SMC 2862W-G */
52 {USB_DEVICE(0x07aa, 0x001c)}, /* Corega CG-WLUSB2GT */ 53 {USB_DEVICE(0x07aa, 0x001c)}, /* Corega CG-WLUSB2GT */
@@ -82,6 +83,8 @@ static struct usb_device_id p54u_table[] = {
82 {USB_DEVICE(0x06a9, 0x000e)}, /* Westell 802.11g USB (A90-211WG-01) */ 83 {USB_DEVICE(0x06a9, 0x000e)}, /* Westell 802.11g USB (A90-211WG-01) */
83 {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */ 84 {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */
84 {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */ 85 {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */
86 {USB_DEVICE(0x0803, 0x4310)}, /* Zoom 4410a */
87 {USB_DEVICE(0x083a, 0x4503)}, /* T-Com Sinus 154 data II */
85 {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */ 88 {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */
86 {USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */ 89 {USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */
87 {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */ 90 {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */
@@ -101,6 +104,7 @@ static struct usb_device_id p54u_table[] = {
101 {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */ 104 {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */
102 {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */ 105 {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */
103 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ 106 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */
107 /* {USB_DEVICE(0x15a9, 0x0002)}, * Also SparkLAN WL-682 with 3887 */
104 {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */ 108 {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */
105 {USB_DEVICE(0x1740, 0x1000)}, /* Senao NUB-350 */ 109 {USB_DEVICE(0x1740, 0x1000)}, /* Senao NUB-350 */
106 {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */ 110 {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 3deacafdcd5e..4261e8ecc4c3 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -743,6 +743,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
743 743
744done: 744done:
745 bufferaddress = (*((dma_addr_t *)skb->cb)); 745 bufferaddress = (*((dma_addr_t *)skb->cb));
746 if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress))
747 return;
746 tmp_one = 1; 748 tmp_one = 1;
747 rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false, 749 rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false,
748 HW_DESC_RXBUFF_ADDR, 750 HW_DESC_RXBUFF_ADDR,
@@ -1115,6 +1117,10 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw)
1115 PCI_DMA_FROMDEVICE); 1117 PCI_DMA_FROMDEVICE);
1116 1118
1117 bufferaddress = (*((dma_addr_t *)skb->cb)); 1119 bufferaddress = (*((dma_addr_t *)skb->cb));
1120 if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress)) {
1121 dev_kfree_skb_any(skb);
1122 return 1;
1123 }
1118 rtlpriv->cfg->ops->set_desc((u8 *)entry, false, 1124 rtlpriv->cfg->ops->set_desc((u8 *)entry, false,
1119 HW_DESC_RXBUFF_ADDR, 1125 HW_DESC_RXBUFF_ADDR,
1120 (u8 *)&bufferaddress); 1126 (u8 *)&bufferaddress);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
index 173424756149..c31795e379f7 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
@@ -611,8 +611,14 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
611 dma_addr_t mapping = pci_map_single(rtlpci->pdev, 611 dma_addr_t mapping = pci_map_single(rtlpci->pdev,
612 skb->data, skb->len, 612 skb->data, skb->len,
613 PCI_DMA_TODEVICE); 613 PCI_DMA_TODEVICE);
614
614 u8 bw_40 = 0; 615 u8 bw_40 = 0;
615 616
617 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
618 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
619 "DMA mapping error");
620 return;
621 }
616 rcu_read_lock(); 622 rcu_read_lock();
617 sta = get_sta(hw, mac->vif, mac->bssid); 623 sta = get_sta(hw, mac->vif, mac->bssid);
618 if (mac->opmode == NL80211_IFTYPE_STATION) { 624 if (mac->opmode == NL80211_IFTYPE_STATION) {
@@ -774,6 +780,11 @@ void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw,
774 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); 780 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data);
775 __le16 fc = hdr->frame_control; 781 __le16 fc = hdr->frame_control;
776 782
783 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
784 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
785 "DMA mapping error");
786 return;
787 }
777 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); 788 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE);
778 789
779 if (firstseg) 790 if (firstseg)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
index f9f3861046c1..a0fbf284420e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
@@ -587,6 +587,11 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
587 buf_len = skb->len; 587 buf_len = skb->len;
588 mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, 588 mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len,
589 PCI_DMA_TODEVICE); 589 PCI_DMA_TODEVICE);
590 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
591 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
592 "DMA mapping error");
593 return;
594 }
590 CLEAR_PCI_TX_DESC_CONTENT(pdesc, sizeof(struct tx_desc_92d)); 595 CLEAR_PCI_TX_DESC_CONTENT(pdesc, sizeof(struct tx_desc_92d));
591 if (ieee80211_is_nullfunc(fc) || ieee80211_is_ctl(fc)) { 596 if (ieee80211_is_nullfunc(fc) || ieee80211_is_ctl(fc)) {
592 firstseg = true; 597 firstseg = true;
@@ -740,6 +745,11 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw,
740 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); 745 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data);
741 __le16 fc = hdr->frame_control; 746 __le16 fc = hdr->frame_control;
742 747
748 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
749 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
750 "DMA mapping error");
751 return;
752 }
743 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); 753 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE);
744 if (firstseg) 754 if (firstseg)
745 SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); 755 SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
index 0e9f6ebf078a..206561d7282f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -611,6 +611,11 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
611 PCI_DMA_TODEVICE); 611 PCI_DMA_TODEVICE);
612 u8 bw_40 = 0; 612 u8 bw_40 = 0;
613 613
614 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
615 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
616 "DMA mapping error");
617 return;
618 }
614 if (mac->opmode == NL80211_IFTYPE_STATION) { 619 if (mac->opmode == NL80211_IFTYPE_STATION) {
615 bw_40 = mac->bw_40; 620 bw_40 = mac->bw_40;
616 } else if (mac->opmode == NL80211_IFTYPE_AP || 621 } else if (mac->opmode == NL80211_IFTYPE_AP ||
@@ -763,6 +768,7 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
763void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, 768void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
764 bool firstseg, bool lastseg, struct sk_buff *skb) 769 bool firstseg, bool lastseg, struct sk_buff *skb)
765{ 770{
771 struct rtl_priv *rtlpriv = rtl_priv(hw);
766 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); 772 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
767 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); 773 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
768 struct rtl_tcb_desc *tcb_desc = (struct rtl_tcb_desc *)(skb->cb); 774 struct rtl_tcb_desc *tcb_desc = (struct rtl_tcb_desc *)(skb->cb);
@@ -770,7 +776,12 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
770 dma_addr_t mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, 776 dma_addr_t mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len,
771 PCI_DMA_TODEVICE); 777 PCI_DMA_TODEVICE);
772 778
773 /* Clear all status */ 779 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
780 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
781 "DMA mapping error");
782 return;
783 }
784 /* Clear all status */
774 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_CMDDESC_SIZE_RTL8192S); 785 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_CMDDESC_SIZE_RTL8192S);
775 786
776 /* This bit indicate this packet is used for FW download. */ 787 /* This bit indicate this packet is used for FW download. */
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
index 18b0bc51766b..bb7cc90bafb2 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
@@ -341,7 +341,7 @@ static struct rtl_hal_cfg rtl8723ae_hal_cfg = {
341 .maps[RTL_RC_HT_RATEMCS15] = DESC92_RATEMCS15, 341 .maps[RTL_RC_HT_RATEMCS15] = DESC92_RATEMCS15,
342}; 342};
343 343
344static struct pci_device_id rtl8723ae_pci_ids[] __devinitdata = { 344static struct pci_device_id rtl8723ae_pci_ids[] = {
345 {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8723, rtl8723ae_hal_cfg)}, 345 {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8723, rtl8723ae_hal_cfg)},
346 {}, 346 {},
347}; 347};
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
index 87331d826d73..a313be8c21d2 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
@@ -387,6 +387,11 @@ void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw,
387 PCI_DMA_TODEVICE); 387 PCI_DMA_TODEVICE);
388 u8 bw_40 = 0; 388 u8 bw_40 = 0;
389 389
390 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
391 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
392 "DMA mapping error");
393 return;
394 }
390 if (mac->opmode == NL80211_IFTYPE_STATION) { 395 if (mac->opmode == NL80211_IFTYPE_STATION) {
391 bw_40 = mac->bw_40; 396 bw_40 = mac->bw_40;
392 } else if (mac->opmode == NL80211_IFTYPE_AP || 397 } else if (mac->opmode == NL80211_IFTYPE_AP ||
@@ -542,6 +547,11 @@ void rtl8723ae_tx_fill_cmddesc(struct ieee80211_hw *hw,
542 PCI_DMA_TODEVICE); 547 PCI_DMA_TODEVICE);
543 __le16 fc = hdr->frame_control; 548 __le16 fc = hdr->frame_control;
544 549
550 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
551 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
552 "DMA mapping error");
553 return;
554 }
545 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); 555 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE);
546 556
547 if (firstseg) 557 if (firstseg)
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 29f0969e4ba0..f2ecdeb3a90d 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -210,17 +210,16 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data,
210 u16 index = REALTEK_USB_VENQT_CMD_IDX; 210 u16 index = REALTEK_USB_VENQT_CMD_IDX;
211 int pipe = usb_sndctrlpipe(udev, 0); /* write_out */ 211 int pipe = usb_sndctrlpipe(udev, 0); /* write_out */
212 u8 *buffer; 212 u8 *buffer;
213 dma_addr_t dma_addr;
214 213
215 wvalue = (u16)(addr&0x0000ffff); 214 wvalue = (u16)(addr & 0x0000ffff);
216 buffer = usb_alloc_coherent(udev, (size_t)len, GFP_ATOMIC, &dma_addr); 215 buffer = kmalloc(len, GFP_ATOMIC);
217 if (!buffer) 216 if (!buffer)
218 return; 217 return;
219 memcpy(buffer, data, len); 218 memcpy(buffer, data, len);
220 usb_control_msg(udev, pipe, request, reqtype, wvalue, 219 usb_control_msg(udev, pipe, request, reqtype, wvalue,
221 index, buffer, len, 50); 220 index, buffer, len, 50);
222 221
223 usb_free_coherent(udev, (size_t)len, buffer, dma_addr); 222 kfree(buffer);
224} 223}
225 224
226static void _rtl_usb_io_handler_init(struct device *dev, 225static void _rtl_usb_io_handler_init(struct device *dev,
@@ -640,6 +639,7 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
640 RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, 639 RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
641 "Failed to prep_rx_urb!!\n"); 640 "Failed to prep_rx_urb!!\n");
642 err = PTR_ERR(skb); 641 err = PTR_ERR(skb);
642 usb_free_urb(urb);
643 goto err_out; 643 goto err_out;
644 } 644 }
645 645
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index c26e28b4bd9f..7ffa43bd7cf9 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1015,29 +1015,10 @@ err:
1015 i = xennet_fill_frags(np, skb, &tmpq); 1015 i = xennet_fill_frags(np, skb, &tmpq);
1016 1016
1017 /* 1017 /*
1018 * Truesize approximates the size of true data plus 1018 * Truesize is the actual allocation size, even if the
1019 * any supervisor overheads. Adding hypervisor 1019 * allocation is only partially used.
1020 * overheads has been shown to significantly reduce 1020 */
1021 * achievable bandwidth with the default receive 1021 skb->truesize += PAGE_SIZE * skb_shinfo(skb)->nr_frags;
1022 * buffer size. It is therefore not wise to account
1023 * for it here.
1024 *
1025 * After alloc_skb(RX_COPY_THRESHOLD), truesize is set
1026 * to RX_COPY_THRESHOLD + the supervisor
1027 * overheads. Here, we add the size of the data pulled
1028 * in xennet_fill_frags().
1029 *
1030 * We also adjust for any unused space in the main
1031 * data area by subtracting (RX_COPY_THRESHOLD -
1032 * len). This is especially important with drivers
1033 * which split incoming packets into header and data,
1034 * using only 66 bytes of the main data area (see the
1035 * e1000 driver for example.) On such systems,
1036 * without this last adjustement, our achievable
1037 * receive throughout using the standard receive
1038 * buffer size was cut by 25%(!!!).
1039 */
1040 skb->truesize += skb->data_len - RX_COPY_THRESHOLD;
1041 skb->len += skb->data_len; 1022 skb->len += skb->data_len;
1042 1023
1043 if (rx->flags & XEN_NETRXF_csum_blank) 1024 if (rx->flags & XEN_NETRXF_csum_blank)
diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c
index 7da9071b68b6..2a9c8d93d2e8 100644
--- a/drivers/nfc/pn544/i2c.c
+++ b/drivers/nfc/pn544/i2c.c
@@ -361,8 +361,8 @@ static struct nfc_phy_ops i2c_phy_ops = {
361 .disable = pn544_hci_i2c_disable, 361 .disable = pn544_hci_i2c_disable,
362}; 362};
363 363
364static int __devinit pn544_hci_i2c_probe(struct i2c_client *client, 364static int pn544_hci_i2c_probe(struct i2c_client *client,
365 const struct i2c_device_id *id) 365 const struct i2c_device_id *id)
366{ 366{
367 struct pn544_i2c_phy *phy; 367 struct pn544_i2c_phy *phy;
368 struct pn544_nfc_platform_data *pdata; 368 struct pn544_nfc_platform_data *pdata;
@@ -442,7 +442,7 @@ err_phy_alloc:
442 return r; 442 return r;
443} 443}
444 444
445static __devexit int pn544_hci_i2c_remove(struct i2c_client *client) 445static int pn544_hci_i2c_remove(struct i2c_client *client)
446{ 446{
447 struct pn544_i2c_phy *phy = i2c_get_clientdata(client); 447 struct pn544_i2c_phy *phy = i2c_get_clientdata(client);
448 struct pn544_nfc_platform_data *pdata = client->dev.platform_data; 448 struct pn544_nfc_platform_data *pdata = client->dev.platform_data;
@@ -469,7 +469,7 @@ static struct i2c_driver pn544_hci_i2c_driver = {
469 }, 469 },
470 .probe = pn544_hci_i2c_probe, 470 .probe = pn544_hci_i2c_probe,
471 .id_table = pn544_hci_i2c_id_table, 471 .id_table = pn544_hci_i2c_id_table,
472 .remove = __devexit_p(pn544_hci_i2c_remove), 472 .remove = pn544_hci_i2c_remove,
473}; 473};
474 474
475static int __init pn544_hci_i2c_init(void) 475static int __init pn544_hci_i2c_init(void)
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index fb6a1fe21b93..8e4e86b78428 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -430,7 +430,7 @@ static void dino_choose_irq(struct parisc_device *dev, void *ctrl)
430 * Cirrus 6832 Cardbus reports wrong irq on RDI Tadpole PARISC Laptop (deller@gmx.de) 430 * Cirrus 6832 Cardbus reports wrong irq on RDI Tadpole PARISC Laptop (deller@gmx.de)
431 * (the irqs are off-by-one, not sure yet if this is a cirrus, dino-hardware or dino-driver problem...) 431 * (the irqs are off-by-one, not sure yet if this is a cirrus, dino-hardware or dino-driver problem...)
432 */ 432 */
433static void __devinit quirk_cirrus_cardbus(struct pci_dev *dev) 433static void quirk_cirrus_cardbus(struct pci_dev *dev)
434{ 434{
435 u8 new_irq = dev->irq - 1; 435 u8 new_irq = dev->irq - 1;
436 printk(KERN_INFO "PCI: Cirrus Cardbus IRQ fixup for %s, from %d to %d\n", 436 printk(KERN_INFO "PCI: Cirrus Cardbus IRQ fixup for %s, from %d to %d\n",
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index fdd63a6a62d6..2ef7103270bb 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -34,7 +34,7 @@
34#include <linux/types.h> 34#include <linux/types.h>
35#include <linux/kernel.h> 35#include <linux/kernel.h>
36#include <linux/spinlock.h> 36#include <linux/spinlock.h>
37#include <linux/init.h> /* for __init and __devinit */ 37#include <linux/init.h> /* for __init */
38#include <linux/pci.h> 38#include <linux/pci.h>
39#include <linux/ioport.h> 39#include <linux/ioport.h>
40#include <linux/slab.h> 40#include <linux/slab.h>
diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c
index 352f96180bc7..050773c36823 100644
--- a/drivers/parport/parport_gsc.c
+++ b/drivers/parport/parport_gsc.c
@@ -137,7 +137,7 @@ struct parport_operations parport_gsc_ops =
137/* 137/*
138 * Checks for port existence, all ports support SPP MODE 138 * Checks for port existence, all ports support SPP MODE
139 */ 139 */
140static int __devinit parport_SPP_supported(struct parport *pb) 140static int parport_SPP_supported(struct parport *pb)
141{ 141{
142 unsigned char r, w; 142 unsigned char r, w;
143 143
@@ -201,7 +201,7 @@ static int __devinit parport_SPP_supported(struct parport *pb)
201 * be misdetected here is rather academic. 201 * be misdetected here is rather academic.
202 */ 202 */
203 203
204static int __devinit parport_PS2_supported(struct parport *pb) 204static int parport_PS2_supported(struct parport *pb)
205{ 205{
206 int ok = 0; 206 int ok = 0;
207 207
@@ -232,10 +232,9 @@ static int __devinit parport_PS2_supported(struct parport *pb)
232 232
233/* --- Initialisation code -------------------------------- */ 233/* --- Initialisation code -------------------------------- */
234 234
235struct parport *__devinit parport_gsc_probe_port (unsigned long base, 235struct parport *parport_gsc_probe_port(unsigned long base,
236 unsigned long base_hi, 236 unsigned long base_hi, int irq,
237 int irq, int dma, 237 int dma, struct pci_dev *dev)
238 struct pci_dev *dev)
239{ 238{
240 struct parport_gsc_private *priv; 239 struct parport_gsc_private *priv;
241 struct parport_operations *ops; 240 struct parport_operations *ops;
@@ -345,9 +344,9 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base,
345 344
346#define PARPORT_GSC_OFFSET 0x800 345#define PARPORT_GSC_OFFSET 0x800
347 346
348static int __devinitdata parport_count; 347static int parport_count;
349 348
350static int __devinit parport_init_chip(struct parisc_device *dev) 349static int parport_init_chip(struct parisc_device *dev)
351{ 350{
352 struct parport *p; 351 struct parport *p;
353 unsigned long port; 352 unsigned long port;
@@ -382,7 +381,7 @@ static int __devinit parport_init_chip(struct parisc_device *dev)
382 return 0; 381 return 0;
383} 382}
384 383
385static int __devexit parport_remove_chip(struct parisc_device *dev) 384static int parport_remove_chip(struct parisc_device *dev)
386{ 385{
387 struct parport *p = dev_get_drvdata(&dev->dev); 386 struct parport *p = dev_get_drvdata(&dev->dev);
388 if (p) { 387 if (p) {
@@ -415,15 +414,15 @@ static struct parisc_driver parport_driver = {
415 .name = "Parallel", 414 .name = "Parallel",
416 .id_table = parport_tbl, 415 .id_table = parport_tbl,
417 .probe = parport_init_chip, 416 .probe = parport_init_chip,
418 .remove = __devexit_p(parport_remove_chip), 417 .remove = parport_remove_chip,
419}; 418};
420 419
421int __devinit parport_gsc_init(void) 420int parport_gsc_init(void)
422{ 421{
423 return register_parisc_driver(&parport_driver); 422 return register_parisc_driver(&parport_driver);
424} 423}
425 424
426static void __devexit parport_gsc_exit(void) 425static void parport_gsc_exit(void)
427{ 426{
428 unregister_parisc_driver(&parport_driver); 427 unregister_parisc_driver(&parport_driver);
429} 428}
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 5abffe58a9d2..903e1285fda0 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -953,7 +953,7 @@ static struct superio_struct *find_free_superio(void)
953 953
954 954
955/* Super-IO chipset detection, Winbond, SMSC */ 955/* Super-IO chipset detection, Winbond, SMSC */
956static void __devinit show_parconfig_smsc37c669(int io, int key) 956static void show_parconfig_smsc37c669(int io, int key)
957{ 957{
958 int cr1, cr4, cra, cr23, cr26, cr27; 958 int cr1, cr4, cra, cr23, cr26, cr27;
959 struct superio_struct *s; 959 struct superio_struct *s;
@@ -1038,7 +1038,7 @@ static void __devinit show_parconfig_smsc37c669(int io, int key)
1038} 1038}
1039 1039
1040 1040
1041static void __devinit show_parconfig_winbond(int io, int key) 1041static void show_parconfig_winbond(int io, int key)
1042{ 1042{
1043 int cr30, cr60, cr61, cr70, cr74, crf0; 1043 int cr30, cr60, cr61, cr70, cr74, crf0;
1044 struct superio_struct *s; 1044 struct superio_struct *s;
@@ -1106,8 +1106,7 @@ static void __devinit show_parconfig_winbond(int io, int key)
1106 } 1106 }
1107} 1107}
1108 1108
1109static void __devinit decode_winbond(int efer, int key, int devid, 1109static void decode_winbond(int efer, int key, int devid, int devrev, int oldid)
1110 int devrev, int oldid)
1111{ 1110{
1112 const char *type = "unknown"; 1111 const char *type = "unknown";
1113 int id, progif = 2; 1112 int id, progif = 2;
@@ -1159,7 +1158,7 @@ static void __devinit decode_winbond(int efer, int key, int devid,
1159 show_parconfig_winbond(efer, key); 1158 show_parconfig_winbond(efer, key);
1160} 1159}
1161 1160
1162static void __devinit decode_smsc(int efer, int key, int devid, int devrev) 1161static void decode_smsc(int efer, int key, int devid, int devrev)
1163{ 1162{
1164 const char *type = "unknown"; 1163 const char *type = "unknown";
1165 void (*func)(int io, int key); 1164 void (*func)(int io, int key);
@@ -1193,7 +1192,7 @@ static void __devinit decode_smsc(int efer, int key, int devid, int devrev)
1193} 1192}
1194 1193
1195 1194
1196static void __devinit winbond_check(int io, int key) 1195static void winbond_check(int io, int key)
1197{ 1196{
1198 int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid; 1197 int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid;
1199 1198
@@ -1231,7 +1230,7 @@ out:
1231 release_region(io, 3); 1230 release_region(io, 3);
1232} 1231}
1233 1232
1234static void __devinit winbond_check2(int io, int key) 1233static void winbond_check2(int io, int key)
1235{ 1234{
1236 int origval[3], devid, devrev, oldid, x_devid, x_devrev, x_oldid; 1235 int origval[3], devid, devrev, oldid, x_devid, x_devrev, x_oldid;
1237 1236
@@ -1272,7 +1271,7 @@ out:
1272 release_region(io, 3); 1271 release_region(io, 3);
1273} 1272}
1274 1273
1275static void __devinit smsc_check(int io, int key) 1274static void smsc_check(int io, int key)
1276{ 1275{
1277 int origval, id, rev, oldid, oldrev, x_id, x_rev, x_oldid, x_oldrev; 1276 int origval, id, rev, oldid, oldrev, x_id, x_rev, x_oldid, x_oldrev;
1278 1277
@@ -1316,7 +1315,7 @@ out:
1316} 1315}
1317 1316
1318 1317
1319static void __devinit detect_and_report_winbond(void) 1318static void detect_and_report_winbond(void)
1320{ 1319{
1321 if (verbose_probing) 1320 if (verbose_probing)
1322 printk(KERN_DEBUG "Winbond Super-IO detection, now testing ports 3F0,370,250,4E,2E ...\n"); 1321 printk(KERN_DEBUG "Winbond Super-IO detection, now testing ports 3F0,370,250,4E,2E ...\n");
@@ -1329,7 +1328,7 @@ static void __devinit detect_and_report_winbond(void)
1329 winbond_check2(0x250, 0x89); 1328 winbond_check2(0x250, 0x89);
1330} 1329}
1331 1330
1332static void __devinit detect_and_report_smsc(void) 1331static void detect_and_report_smsc(void)
1333{ 1332{
1334 if (verbose_probing) 1333 if (verbose_probing)
1335 printk(KERN_DEBUG "SMSC Super-IO detection, now testing Ports 2F0, 370 ...\n"); 1334 printk(KERN_DEBUG "SMSC Super-IO detection, now testing Ports 2F0, 370 ...\n");
@@ -1339,7 +1338,7 @@ static void __devinit detect_and_report_smsc(void)
1339 smsc_check(0x370, 0x44); 1338 smsc_check(0x370, 0x44);
1340} 1339}
1341 1340
1342static void __devinit detect_and_report_it87(void) 1341static void detect_and_report_it87(void)
1343{ 1342{
1344 u16 dev; 1343 u16 dev;
1345 u8 origval, r; 1344 u8 origval, r;
@@ -1796,24 +1795,24 @@ static int parport_ECPEPP_supported(struct parport *pb)
1796#else /* No IEEE 1284 support */ 1795#else /* No IEEE 1284 support */
1797 1796
1798/* Don't bother probing for modes we know we won't use. */ 1797/* Don't bother probing for modes we know we won't use. */
1799static int __devinit parport_PS2_supported(struct parport *pb) { return 0; } 1798static int parport_PS2_supported(struct parport *pb) { return 0; }
1800#ifdef CONFIG_PARPORT_PC_FIFO 1799#ifdef CONFIG_PARPORT_PC_FIFO
1801static int parport_ECP_supported(struct parport *pb) 1800static int parport_ECP_supported(struct parport *pb)
1802{ 1801{
1803 return 0; 1802 return 0;
1804} 1803}
1805#endif 1804#endif
1806static int __devinit parport_EPP_supported(struct parport *pb) 1805static int parport_EPP_supported(struct parport *pb)
1807{ 1806{
1808 return 0; 1807 return 0;
1809} 1808}
1810 1809
1811static int __devinit parport_ECPEPP_supported(struct parport *pb) 1810static int parport_ECPEPP_supported(struct parport *pb)
1812{ 1811{
1813 return 0; 1812 return 0;
1814} 1813}
1815 1814
1816static int __devinit parport_ECPPS2_supported(struct parport *pb) 1815static int parport_ECPPS2_supported(struct parport *pb)
1817{ 1816{
1818 return 0; 1817 return 0;
1819} 1818}
@@ -2269,9 +2268,8 @@ EXPORT_SYMBOL(parport_pc_unregister_port);
2269#ifdef CONFIG_PCI 2268#ifdef CONFIG_PCI
2270 2269
2271/* ITE support maintained by Rich Liu <richliu@poorman.org> */ 2270/* ITE support maintained by Rich Liu <richliu@poorman.org> */
2272static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, 2271static int sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, int autodma,
2273 int autodma, 2272 const struct parport_pc_via_data *via)
2274 const struct parport_pc_via_data *via)
2275{ 2273{
2276 short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; 2274 short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 };
2277 u32 ite8872set; 2275 u32 ite8872set;
@@ -2377,10 +2375,10 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
2377 2375
2378/* VIA 8231 support by Pavel Fedin <sonic_amiga@rambler.ru> 2376/* VIA 8231 support by Pavel Fedin <sonic_amiga@rambler.ru>
2379 based on VIA 686a support code by Jeff Garzik <jgarzik@pobox.com> */ 2377 based on VIA 686a support code by Jeff Garzik <jgarzik@pobox.com> */
2380static int __devinitdata parport_init_mode; 2378static int parport_init_mode;
2381 2379
2382/* Data for two known VIA chips */ 2380/* Data for two known VIA chips */
2383static struct parport_pc_via_data via_686a_data __devinitdata = { 2381static struct parport_pc_via_data via_686a_data = {
2384 0x51, 2382 0x51,
2385 0x50, 2383 0x50,
2386 0x85, 2384 0x85,
@@ -2389,7 +2387,7 @@ static struct parport_pc_via_data via_686a_data __devinitdata = {
2389 0xF0, 2387 0xF0,
2390 0xE6 2388 0xE6
2391}; 2389};
2392static struct parport_pc_via_data via_8231_data __devinitdata = { 2390static struct parport_pc_via_data via_8231_data = {
2393 0x45, 2391 0x45,
2394 0x44, 2392 0x44,
2395 0x50, 2393 0x50,
@@ -2399,9 +2397,8 @@ static struct parport_pc_via_data via_8231_data __devinitdata = {
2399 0xF6 2397 0xF6
2400}; 2398};
2401 2399
2402static int __devinit sio_via_probe(struct pci_dev *pdev, int autoirq, 2400static int sio_via_probe(struct pci_dev *pdev, int autoirq, int autodma,
2403 int autodma, 2401 const struct parport_pc_via_data *via)
2404 const struct parport_pc_via_data *via)
2405{ 2402{
2406 u8 tmp, tmp2, siofunc; 2403 u8 tmp, tmp2, siofunc;
2407 u8 ppcontrol = 0; 2404 u8 ppcontrol = 0;
@@ -2575,7 +2572,7 @@ static struct parport_pc_superio {
2575 int (*probe) (struct pci_dev *pdev, int autoirq, int autodma, 2572 int (*probe) (struct pci_dev *pdev, int autoirq, int autodma,
2576 const struct parport_pc_via_data *via); 2573 const struct parport_pc_via_data *via);
2577 const struct parport_pc_via_data *via; 2574 const struct parport_pc_via_data *via;
2578} parport_pc_superio_info[] __devinitdata = { 2575} parport_pc_superio_info[] = {
2579 { sio_via_probe, &via_686a_data, }, 2576 { sio_via_probe, &via_686a_data, },
2580 { sio_via_probe, &via_8231_data, }, 2577 { sio_via_probe, &via_8231_data, },
2581 { sio_ite_8872_probe, NULL, }, 2578 { sio_ite_8872_probe, NULL, },
@@ -2860,7 +2857,7 @@ static int parport_pc_pci_probe(struct pci_dev *dev,
2860 return -ENODEV; 2857 return -ENODEV;
2861} 2858}
2862 2859
2863static void __devexit parport_pc_pci_remove(struct pci_dev *dev) 2860static void parport_pc_pci_remove(struct pci_dev *dev)
2864{ 2861{
2865 struct pci_parport_data *data = pci_get_drvdata(dev); 2862 struct pci_parport_data *data = pci_get_drvdata(dev);
2866 int i; 2863 int i;
@@ -2879,7 +2876,7 @@ static struct pci_driver parport_pc_pci_driver = {
2879 .name = "parport_pc", 2876 .name = "parport_pc",
2880 .id_table = parport_pc_pci_tbl, 2877 .id_table = parport_pc_pci_tbl,
2881 .probe = parport_pc_pci_probe, 2878 .probe = parport_pc_pci_probe,
2882 .remove = __devexit_p(parport_pc_pci_remove), 2879 .remove = parport_pc_pci_remove,
2883}; 2880};
2884 2881
2885static int __init parport_pc_init_superio(int autoirq, int autodma) 2882static int __init parport_pc_init_superio(int autoirq, int autodma)
@@ -2983,7 +2980,7 @@ static struct pnp_driver parport_pc_pnp_driver = {
2983static struct pnp_driver parport_pc_pnp_driver; 2980static struct pnp_driver parport_pc_pnp_driver;
2984#endif /* CONFIG_PNP */ 2981#endif /* CONFIG_PNP */
2985 2982
2986static int __devinit parport_pc_platform_probe(struct platform_device *pdev) 2983static int parport_pc_platform_probe(struct platform_device *pdev)
2987{ 2984{
2988 /* Always succeed, the actual probing is done in 2985 /* Always succeed, the actual probing is done in
2989 * parport_pc_probe_port(). */ 2986 * parport_pc_probe_port(). */
@@ -2999,7 +2996,7 @@ static struct platform_driver parport_pc_platform_driver = {
2999}; 2996};
3000 2997
3001/* This is called by parport_pc_find_nonpci_ports (in asm/parport.h) */ 2998/* This is called by parport_pc_find_nonpci_ports (in asm/parport.h) */
3002static int __devinit __attribute__((unused)) 2999static int __attribute__((unused))
3003parport_pc_find_isa_ports(int autoirq, int autodma) 3000parport_pc_find_isa_ports(int autoirq, int autodma)
3004{ 3001{
3005 int count = 0; 3002 int count = 0;
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
index 1631eeaf440e..ef6169adb845 100644
--- a/drivers/parport/parport_serial.c
+++ b/drivers/parport/parport_serial.c
@@ -87,7 +87,8 @@ struct parport_pc_pci {
87 struct parport_pc_pci *card, int failed); 87 struct parport_pc_pci *card, int failed);
88}; 88};
89 89
90static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *par, int autoirq, int autodma) 90static int netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *par,
91 int autoirq, int autodma)
91{ 92{
92 /* the rule described below doesn't hold for this device */ 93 /* the rule described below doesn't hold for this device */
93 if (dev->device == PCI_DEVICE_ID_NETMOS_9835 && 94 if (dev->device == PCI_DEVICE_ID_NETMOS_9835 &&
@@ -111,7 +112,7 @@ static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc
111 return 0; 112 return 0;
112} 113}
113 114
114static struct parport_pc_pci cards[] __devinitdata = { 115static struct parport_pc_pci cards[] = {
115 /* titan_110l */ { 1, { { 3, -1 }, } }, 116 /* titan_110l */ { 1, { { 3, -1 }, } },
116 /* titan_210l */ { 1, { { 3, -1 }, } }, 117 /* titan_210l */ { 1, { { 3, -1 }, } },
117 /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init }, 118 /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init },
@@ -258,7 +259,7 @@ MODULE_DEVICE_TABLE(pci,parport_serial_pci_tbl);
258 * Cards not tested are marked n/t 259 * Cards not tested are marked n/t
259 * If you have one of these cards and it works for you, please tell me.. 260 * If you have one of these cards and it works for you, please tell me..
260 */ 261 */
261static struct pciserial_board pci_parport_serial_boards[] __devinitdata = { 262static struct pciserial_board pci_parport_serial_boards[] = {
262 [titan_110l] = { 263 [titan_110l] = {
263 .flags = FL_BASE1 | FL_BASE_BARS, 264 .flags = FL_BASE1 | FL_BASE_BARS,
264 .num_ports = 1, 265 .num_ports = 1,
@@ -479,8 +480,7 @@ struct parport_serial_private {
479}; 480};
480 481
481/* Register the serial port(s) of a PCI card. */ 482/* Register the serial port(s) of a PCI card. */
482static int __devinit serial_register (struct pci_dev *dev, 483static int serial_register(struct pci_dev *dev, const struct pci_device_id *id)
483 const struct pci_device_id *id)
484{ 484{
485 struct parport_serial_private *priv = pci_get_drvdata (dev); 485 struct parport_serial_private *priv = pci_get_drvdata (dev);
486 struct pciserial_board *board; 486 struct pciserial_board *board;
@@ -501,8 +501,7 @@ static int __devinit serial_register (struct pci_dev *dev,
501} 501}
502 502
503/* Register the parallel port(s) of a PCI card. */ 503/* Register the parallel port(s) of a PCI card. */
504static int __devinit parport_register (struct pci_dev *dev, 504static int parport_register(struct pci_dev *dev, const struct pci_device_id *id)
505 const struct pci_device_id *id)
506{ 505{
507 struct parport_pc_pci *card; 506 struct parport_pc_pci *card;
508 struct parport_serial_private *priv = pci_get_drvdata (dev); 507 struct parport_serial_private *priv = pci_get_drvdata (dev);
@@ -563,8 +562,8 @@ static int __devinit parport_register (struct pci_dev *dev,
563 return 0; 562 return 0;
564} 563}
565 564
566static int __devinit parport_serial_pci_probe (struct pci_dev *dev, 565static int parport_serial_pci_probe(struct pci_dev *dev,
567 const struct pci_device_id *id) 566 const struct pci_device_id *id)
568{ 567{
569 struct parport_serial_private *priv; 568 struct parport_serial_private *priv;
570 int err; 569 int err;
@@ -599,7 +598,7 @@ static int __devinit parport_serial_pci_probe (struct pci_dev *dev,
599 return 0; 598 return 0;
600} 599}
601 600
602static void __devexit parport_serial_pci_remove (struct pci_dev *dev) 601static void parport_serial_pci_remove(struct pci_dev *dev)
603{ 602{
604 struct parport_serial_private *priv = pci_get_drvdata (dev); 603 struct parport_serial_private *priv = pci_get_drvdata (dev);
605 int i; 604 int i;
@@ -664,7 +663,7 @@ static struct pci_driver parport_serial_pci_driver = {
664 .name = "parport_serial", 663 .name = "parport_serial",
665 .id_table = parport_serial_pci_tbl, 664 .id_table = parport_serial_pci_tbl,
666 .probe = parport_serial_pci_probe, 665 .probe = parport_serial_pci_probe,
667 .remove = __devexit_p(parport_serial_pci_remove), 666 .remove = parport_serial_pci_remove,
668#ifdef CONFIG_PM 667#ifdef CONFIG_PM
669 .suspend = parport_serial_pci_suspend, 668 .suspend = parport_serial_pci_suspend,
670 .resume = parport_serial_pci_resume, 669 .resume = parport_serial_pci_resume,
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c
index 983a2d2df659..5c4b6a1db6ca 100644
--- a/drivers/parport/parport_sunbpp.c
+++ b/drivers/parport/parport_sunbpp.c
@@ -265,7 +265,7 @@ static struct parport_operations parport_sunbpp_ops =
265 .owner = THIS_MODULE, 265 .owner = THIS_MODULE,
266}; 266};
267 267
268static int __devinit bpp_probe(struct platform_device *op) 268static int bpp_probe(struct platform_device *op)
269{ 269{
270 struct parport_operations *ops; 270 struct parport_operations *ops;
271 struct bpp_regs __iomem *regs; 271 struct bpp_regs __iomem *regs;
@@ -330,7 +330,7 @@ out_unmap:
330 return err; 330 return err;
331} 331}
332 332
333static int __devexit bpp_remove(struct platform_device *op) 333static int bpp_remove(struct platform_device *op)
334{ 334{
335 struct parport *p = dev_get_drvdata(&op->dev); 335 struct parport *p = dev_get_drvdata(&op->dev);
336 struct parport_operations *ops = p->ops; 336 struct parport_operations *ops = p->ops;
@@ -367,7 +367,7 @@ static struct platform_driver bpp_sbus_driver = {
367 .of_match_table = bpp_match, 367 .of_match_table = bpp_match,
368 }, 368 },
369 .probe = bpp_probe, 369 .probe = bpp_probe,
370 .remove = __devexit_p(bpp_remove), 370 .remove = bpp_remove,
371}; 371};
372 372
373module_platform_driver(bpp_sbus_driver); 373module_platform_driver(bpp_sbus_driver);
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 05b78b16d20b..9c6e9bb674ec 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -422,77 +422,60 @@ static ssize_t sriov_numvfs_show(struct device *dev,
422} 422}
423 423
424/* 424/*
425 * num_vfs > 0; number of vfs to enable 425 * num_vfs > 0; number of VFs to enable
426 * num_vfs = 0; disable all vfs 426 * num_vfs = 0; disable all VFs
427 * 427 *
428 * Note: SRIOV spec doesn't allow partial VF 428 * Note: SRIOV spec doesn't allow partial VF
429 * disable, so its all or none. 429 * disable, so it's all or none.
430 */ 430 */
431static ssize_t sriov_numvfs_store(struct device *dev, 431static ssize_t sriov_numvfs_store(struct device *dev,
432 struct device_attribute *attr, 432 struct device_attribute *attr,
433 const char *buf, size_t count) 433 const char *buf, size_t count)
434{ 434{
435 struct pci_dev *pdev = to_pci_dev(dev); 435 struct pci_dev *pdev = to_pci_dev(dev);
436 int num_vfs_enabled = 0; 436 int ret;
437 int num_vfs; 437 u16 num_vfs;
438 int ret = 0;
439 u16 total;
440 438
441 if (kstrtoint(buf, 0, &num_vfs) < 0) 439 ret = kstrtou16(buf, 0, &num_vfs);
442 return -EINVAL; 440 if (ret < 0)
441 return ret;
442
443 if (num_vfs > pci_sriov_get_totalvfs(pdev))
444 return -ERANGE;
445
446 if (num_vfs == pdev->sriov->num_VFs)
447 return count; /* no change */
443 448
444 /* is PF driver loaded w/callback */ 449 /* is PF driver loaded w/callback */
445 if (!pdev->driver || !pdev->driver->sriov_configure) { 450 if (!pdev->driver || !pdev->driver->sriov_configure) {
446 dev_info(&pdev->dev, 451 dev_info(&pdev->dev, "Driver doesn't support SRIOV configuration via sysfs\n");
447 "Driver doesn't support SRIOV configuration via sysfs\n");
448 return -ENOSYS; 452 return -ENOSYS;
449 } 453 }
450 454
451 /* if enabling vf's ... */ 455 if (num_vfs == 0) {
452 total = pci_sriov_get_totalvfs(pdev); 456 /* disable VFs */
453 /* Requested VFs to enable < totalvfs and none enabled already */ 457 ret = pdev->driver->sriov_configure(pdev, 0);
454 if ((num_vfs > 0) && (num_vfs <= total)) { 458 if (ret < 0)
455 if (pdev->sriov->num_VFs == 0) { 459 return ret;
456 num_vfs_enabled = 460 return count;
457 pdev->driver->sriov_configure(pdev, num_vfs);
458 if ((num_vfs_enabled >= 0) &&
459 (num_vfs_enabled != num_vfs)) {
460 dev_warn(&pdev->dev,
461 "Only %d VFs enabled\n",
462 num_vfs_enabled);
463 return count;
464 } else if (num_vfs_enabled < 0)
465 /* error code from driver callback */
466 return num_vfs_enabled;
467 } else if (num_vfs == pdev->sriov->num_VFs) {
468 dev_warn(&pdev->dev,
469 "%d VFs already enabled; no enable action taken\n",
470 num_vfs);
471 return count;
472 } else {
473 dev_warn(&pdev->dev,
474 "%d VFs already enabled. Disable before enabling %d VFs\n",
475 pdev->sriov->num_VFs, num_vfs);
476 return -EINVAL;
477 }
478 } 461 }
479 462
480 /* disable vfs */ 463 /* enable VFs */
481 if (num_vfs == 0) { 464 if (pdev->sriov->num_VFs) {
482 if (pdev->sriov->num_VFs != 0) { 465 dev_warn(&pdev->dev, "%d VFs already enabled. Disable before enabling %d VFs\n",
483 ret = pdev->driver->sriov_configure(pdev, 0); 466 pdev->sriov->num_VFs, num_vfs);
484 return ret ? ret : count; 467 return -EBUSY;
485 } else {
486 dev_warn(&pdev->dev,
487 "All VFs disabled; no disable action taken\n");
488 return count;
489 }
490 } 468 }
491 469
492 dev_err(&pdev->dev, 470 ret = pdev->driver->sriov_configure(pdev, num_vfs);
493 "Invalid value for number of VFs to enable: %d\n", num_vfs); 471 if (ret < 0)
472 return ret;
494 473
495 return -EINVAL; 474 if (ret != num_vfs)
475 dev_warn(&pdev->dev, "%d VFs requested; only %d enabled\n",
476 num_vfs, ret);
477
478 return count;
496} 479}
497 480
498static struct device_attribute sriov_totalvfs_attr = __ATTR_RO(sriov_totalvfs); 481static struct device_attribute sriov_totalvfs_attr = __ATTR_RO(sriov_totalvfs);
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index d4824cb78b49..08c243ab034e 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -134,10 +134,28 @@ static int pcie_port_runtime_resume(struct device *dev)
134 return 0; 134 return 0;
135} 135}
136 136
137static int pci_dev_pme_poll(struct pci_dev *pdev, void *data)
138{
139 bool *pme_poll = data;
140
141 if (pdev->pme_poll)
142 *pme_poll = true;
143 return 0;
144}
145
137static int pcie_port_runtime_idle(struct device *dev) 146static int pcie_port_runtime_idle(struct device *dev)
138{ 147{
148 struct pci_dev *pdev = to_pci_dev(dev);
149 bool pme_poll = false;
150
151 /*
152 * If any subordinate device needs pme poll, we should keep
153 * the port in D0, because we need port in D0 to poll it.
154 */
155 pci_walk_bus(pdev->subordinate, pci_dev_pme_poll, &pme_poll);
139 /* Delay for a short while to prevent too frequent suspend/resume */ 156 /* Delay for a short while to prevent too frequent suspend/resume */
140 pm_schedule_suspend(dev, 10); 157 if (!pme_poll)
158 pm_schedule_suspend(dev, 10);
141 return -EBUSY; 159 return -EBUSY;
142} 160}
143#else 161#else
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 8f7a6344e79e..0369fb6fc1da 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2725,7 +2725,7 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
2725 if (PCI_FUNC(dev->devfn)) 2725 if (PCI_FUNC(dev->devfn))
2726 return; 2726 return;
2727 /* 2727 /*
2728 * RICOH 0xe823 SD/MMC card reader fails to recognize 2728 * RICOH 0xe822 and 0xe823 SD/MMC card readers fail to recognize
2729 * certain types of SD/MMC cards. Lowering the SD base 2729 * certain types of SD/MMC cards. Lowering the SD base
2730 * clock frequency from 200Mhz to 50Mhz fixes this issue. 2730 * clock frequency from 200Mhz to 50Mhz fixes this issue.
2731 * 2731 *
@@ -2736,7 +2736,8 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
2736 * 0xf9 - Key register for 0x150 2736 * 0xf9 - Key register for 0x150
2737 * 0xfc - key register for 0xe1 2737 * 0xfc - key register for 0xe1
2738 */ 2738 */
2739 if (dev->device == PCI_DEVICE_ID_RICOH_R5CE823) { 2739 if (dev->device == PCI_DEVICE_ID_RICOH_R5CE822 ||
2740 dev->device == PCI_DEVICE_ID_RICOH_R5CE823) {
2740 pci_write_config_byte(dev, 0xf9, 0xfc); 2741 pci_write_config_byte(dev, 0xf9, 0xfc);
2741 pci_write_config_byte(dev, 0x150, 0x10); 2742 pci_write_config_byte(dev, 0x150, 0x10);
2742 pci_write_config_byte(dev, 0xf9, 0x00); 2743 pci_write_config_byte(dev, 0xf9, 0x00);
@@ -2763,6 +2764,8 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
2763} 2764}
2764DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832); 2765DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
2765DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832); 2766DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
2767DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE822, ricoh_mmc_fixup_r5c832);
2768DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE822, ricoh_mmc_fixup_r5c832);
2766DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832); 2769DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832);
2767DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832); 2770DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832);
2768#endif /*CONFIG_MMC_RICOH_MMC*/ 2771#endif /*CONFIG_MMC_RICOH_MMC*/
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 5cdee8669ea3..59f5a965bdc4 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -700,7 +700,7 @@ static struct pinctrl *create_pinctrl(struct device *dev)
700 } 700 }
701 } 701 }
702 702
703 /* Add the pinmux to the global list */ 703 /* Add the pinctrl handle to the global list */
704 list_add_tail(&p->node, &pinctrl_list); 704 list_add_tail(&p->node, &pinctrl_list);
705 705
706 return p; 706 return p;
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-370.c b/drivers/pinctrl/mvebu/pinctrl-armada-370.c
index c907647de6ad..48e21a229483 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-370.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-370.c
@@ -367,7 +367,7 @@ static struct mvebu_mpp_mode mv88f6710_mpp_modes[] = {
367 367
368static struct mvebu_pinctrl_soc_info armada_370_pinctrl_info; 368static struct mvebu_pinctrl_soc_info armada_370_pinctrl_info;
369 369
370static struct of_device_id armada_370_pinctrl_of_match[] __devinitdata = { 370static struct of_device_id armada_370_pinctrl_of_match[] = {
371 { .compatible = "marvell,mv88f6710-pinctrl" }, 371 { .compatible = "marvell,mv88f6710-pinctrl" },
372 { }, 372 { },
373}; 373};
@@ -382,7 +382,7 @@ static struct pinctrl_gpio_range mv88f6710_mpp_gpio_ranges[] = {
382 MPP_GPIO_RANGE(2, 64, 64, 2), 382 MPP_GPIO_RANGE(2, 64, 64, 2),
383}; 383};
384 384
385static int __devinit armada_370_pinctrl_probe(struct platform_device *pdev) 385static int armada_370_pinctrl_probe(struct platform_device *pdev)
386{ 386{
387 struct mvebu_pinctrl_soc_info *soc = &armada_370_pinctrl_info; 387 struct mvebu_pinctrl_soc_info *soc = &armada_370_pinctrl_info;
388 388
@@ -399,7 +399,7 @@ static int __devinit armada_370_pinctrl_probe(struct platform_device *pdev)
399 return mvebu_pinctrl_probe(pdev); 399 return mvebu_pinctrl_probe(pdev);
400} 400}
401 401
402static int __devexit armada_370_pinctrl_remove(struct platform_device *pdev) 402static int armada_370_pinctrl_remove(struct platform_device *pdev)
403{ 403{
404 return mvebu_pinctrl_remove(pdev); 404 return mvebu_pinctrl_remove(pdev);
405} 405}
@@ -411,7 +411,7 @@ static struct platform_driver armada_370_pinctrl_driver = {
411 .of_match_table = of_match_ptr(armada_370_pinctrl_of_match), 411 .of_match_table = of_match_ptr(armada_370_pinctrl_of_match),
412 }, 412 },
413 .probe = armada_370_pinctrl_probe, 413 .probe = armada_370_pinctrl_probe,
414 .remove = __devexit_p(armada_370_pinctrl_remove), 414 .remove = armada_370_pinctrl_remove,
415}; 415};
416 416
417module_platform_driver(armada_370_pinctrl_driver); 417module_platform_driver(armada_370_pinctrl_driver);
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c
index 40bd52a46b4e..ab5dc04b3e8a 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c
@@ -349,7 +349,7 @@ static struct mvebu_mpp_mode armada_xp_mpp_modes[] = {
349 349
350static struct mvebu_pinctrl_soc_info armada_xp_pinctrl_info; 350static struct mvebu_pinctrl_soc_info armada_xp_pinctrl_info;
351 351
352static struct of_device_id armada_xp_pinctrl_of_match[] __devinitdata = { 352static struct of_device_id armada_xp_pinctrl_of_match[] = {
353 { 353 {
354 .compatible = "marvell,mv78230-pinctrl", 354 .compatible = "marvell,mv78230-pinctrl",
355 .data = (void *) V_MV78230, 355 .data = (void *) V_MV78230,
@@ -394,7 +394,7 @@ static struct pinctrl_gpio_range mv78460_mpp_gpio_ranges[] = {
394 MPP_GPIO_RANGE(2, 64, 64, 3), 394 MPP_GPIO_RANGE(2, 64, 64, 3),
395}; 395};
396 396
397static int __devinit armada_xp_pinctrl_probe(struct platform_device *pdev) 397static int armada_xp_pinctrl_probe(struct platform_device *pdev)
398{ 398{
399 struct mvebu_pinctrl_soc_info *soc = &armada_xp_pinctrl_info; 399 struct mvebu_pinctrl_soc_info *soc = &armada_xp_pinctrl_info;
400 const struct of_device_id *match = 400 const struct of_device_id *match =
@@ -446,7 +446,7 @@ static int __devinit armada_xp_pinctrl_probe(struct platform_device *pdev)
446 return mvebu_pinctrl_probe(pdev); 446 return mvebu_pinctrl_probe(pdev);
447} 447}
448 448
449static int __devexit armada_xp_pinctrl_remove(struct platform_device *pdev) 449static int armada_xp_pinctrl_remove(struct platform_device *pdev)
450{ 450{
451 return mvebu_pinctrl_remove(pdev); 451 return mvebu_pinctrl_remove(pdev);
452} 452}
@@ -458,7 +458,7 @@ static struct platform_driver armada_xp_pinctrl_driver = {
458 .of_match_table = of_match_ptr(armada_xp_pinctrl_of_match), 458 .of_match_table = of_match_ptr(armada_xp_pinctrl_of_match),
459 }, 459 },
460 .probe = armada_xp_pinctrl_probe, 460 .probe = armada_xp_pinctrl_probe,
461 .remove = __devexit_p(armada_xp_pinctrl_remove), 461 .remove = armada_xp_pinctrl_remove,
462}; 462};
463 463
464module_platform_driver(armada_xp_pinctrl_driver); 464module_platform_driver(armada_xp_pinctrl_driver);
diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c
index 40c9c3eecd94..69aba3697287 100644
--- a/drivers/pinctrl/mvebu/pinctrl-dove.c
+++ b/drivers/pinctrl/mvebu/pinctrl-dove.c
@@ -579,12 +579,12 @@ static struct mvebu_pinctrl_soc_info dove_pinctrl_info = {
579 579
580static struct clk *clk; 580static struct clk *clk;
581 581
582static struct of_device_id dove_pinctrl_of_match[] __devinitdata = { 582static struct of_device_id dove_pinctrl_of_match[] = {
583 { .compatible = "marvell,dove-pinctrl", .data = &dove_pinctrl_info }, 583 { .compatible = "marvell,dove-pinctrl", .data = &dove_pinctrl_info },
584 { } 584 { }
585}; 585};
586 586
587static int __devinit dove_pinctrl_probe(struct platform_device *pdev) 587static int dove_pinctrl_probe(struct platform_device *pdev)
588{ 588{
589 const struct of_device_id *match = 589 const struct of_device_id *match =
590 of_match_device(dove_pinctrl_of_match, &pdev->dev); 590 of_match_device(dove_pinctrl_of_match, &pdev->dev);
@@ -595,13 +595,16 @@ static int __devinit dove_pinctrl_probe(struct platform_device *pdev)
595 * grab clk to make sure it is ticking. 595 * grab clk to make sure it is ticking.
596 */ 596 */
597 clk = devm_clk_get(&pdev->dev, NULL); 597 clk = devm_clk_get(&pdev->dev, NULL);
598 if (!IS_ERR(clk)) 598 if (IS_ERR(clk)) {
599 clk_prepare_enable(clk); 599 dev_err(&pdev->dev, "Unable to get pdma clock");
600 return PTR_RET(clk);
601 }
602 clk_prepare_enable(clk);
600 603
601 return mvebu_pinctrl_probe(pdev); 604 return mvebu_pinctrl_probe(pdev);
602} 605}
603 606
604static int __devexit dove_pinctrl_remove(struct platform_device *pdev) 607static int dove_pinctrl_remove(struct platform_device *pdev)
605{ 608{
606 int ret; 609 int ret;
607 610
@@ -618,7 +621,7 @@ static struct platform_driver dove_pinctrl_driver = {
618 .of_match_table = of_match_ptr(dove_pinctrl_of_match), 621 .of_match_table = of_match_ptr(dove_pinctrl_of_match),
619 }, 622 },
620 .probe = dove_pinctrl_probe, 623 .probe = dove_pinctrl_probe,
621 .remove = __devexit_p(dove_pinctrl_remove), 624 .remove = dove_pinctrl_remove,
622}; 625};
623 626
624module_platform_driver(dove_pinctrl_driver); 627module_platform_driver(dove_pinctrl_driver);
diff --git a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
index fa6ce31c94d9..f12084e18057 100644
--- a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
+++ b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
@@ -444,7 +444,7 @@ static struct mvebu_pinctrl_soc_info mv98dx4122_info = {
444 .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), 444 .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges),
445}; 445};
446 446
447static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = { 447static struct of_device_id kirkwood_pinctrl_of_match[] = {
448 { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info }, 448 { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info },
449 { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info }, 449 { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info },
450 { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info }, 450 { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info },
@@ -454,7 +454,7 @@ static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = {
454 { } 454 { }
455}; 455};
456 456
457static int __devinit kirkwood_pinctrl_probe(struct platform_device *pdev) 457static int kirkwood_pinctrl_probe(struct platform_device *pdev)
458{ 458{
459 const struct of_device_id *match = 459 const struct of_device_id *match =
460 of_match_device(kirkwood_pinctrl_of_match, &pdev->dev); 460 of_match_device(kirkwood_pinctrl_of_match, &pdev->dev);
@@ -462,7 +462,7 @@ static int __devinit kirkwood_pinctrl_probe(struct platform_device *pdev)
462 return mvebu_pinctrl_probe(pdev); 462 return mvebu_pinctrl_probe(pdev);
463} 463}
464 464
465static int __devexit kirkwood_pinctrl_remove(struct platform_device *pdev) 465static int kirkwood_pinctrl_remove(struct platform_device *pdev)
466{ 466{
467 return mvebu_pinctrl_remove(pdev); 467 return mvebu_pinctrl_remove(pdev);
468} 468}
@@ -474,7 +474,7 @@ static struct platform_driver kirkwood_pinctrl_driver = {
474 .of_match_table = of_match_ptr(kirkwood_pinctrl_of_match), 474 .of_match_table = of_match_ptr(kirkwood_pinctrl_of_match),
475 }, 475 },
476 .probe = kirkwood_pinctrl_probe, 476 .probe = kirkwood_pinctrl_probe,
477 .remove = __devexit_p(kirkwood_pinctrl_remove), 477 .remove = kirkwood_pinctrl_remove,
478}; 478};
479 479
480module_platform_driver(kirkwood_pinctrl_driver); 480module_platform_driver(kirkwood_pinctrl_driver);
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 6c44b7e8964c..c689c04a4f52 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -478,8 +478,7 @@ static struct pinctrl_ops mvebu_pinctrl_ops = {
478 .dt_free_map = mvebu_pinctrl_dt_free_map, 478 .dt_free_map = mvebu_pinctrl_dt_free_map,
479}; 479};
480 480
481static int __devinit _add_function(struct mvebu_pinctrl_function *funcs, 481static int _add_function(struct mvebu_pinctrl_function *funcs, const char *name)
482 const char *name)
483{ 482{
484 while (funcs->num_groups) { 483 while (funcs->num_groups) {
485 /* function already there */ 484 /* function already there */
@@ -494,8 +493,8 @@ static int __devinit _add_function(struct mvebu_pinctrl_function *funcs,
494 return 0; 493 return 0;
495} 494}
496 495
497static int __devinit mvebu_pinctrl_build_functions(struct platform_device *pdev, 496static int mvebu_pinctrl_build_functions(struct platform_device *pdev,
498 struct mvebu_pinctrl *pctl) 497 struct mvebu_pinctrl *pctl)
499{ 498{
500 struct mvebu_pinctrl_function *funcs; 499 struct mvebu_pinctrl_function *funcs;
501 int num = 0; 500 int num = 0;
@@ -568,7 +567,7 @@ static int __devinit mvebu_pinctrl_build_functions(struct platform_device *pdev,
568 return 0; 567 return 0;
569} 568}
570 569
571int __devinit mvebu_pinctrl_probe(struct platform_device *pdev) 570int mvebu_pinctrl_probe(struct platform_device *pdev)
572{ 571{
573 struct mvebu_pinctrl_soc_info *soc = dev_get_platdata(&pdev->dev); 572 struct mvebu_pinctrl_soc_info *soc = dev_get_platdata(&pdev->dev);
574 struct device_node *np = pdev->dev.of_node; 573 struct device_node *np = pdev->dev.of_node;
@@ -745,7 +744,7 @@ int __devinit mvebu_pinctrl_probe(struct platform_device *pdev)
745 return 0; 744 return 0;
746} 745}
747 746
748int __devexit mvebu_pinctrl_remove(struct platform_device *pdev) 747int mvebu_pinctrl_remove(struct platform_device *pdev)
749{ 748{
750 struct mvebu_pinctrl *pctl = platform_get_drvdata(pdev); 749 struct mvebu_pinctrl *pctl = platform_get_drvdata(pdev);
751 pinctrl_unregister(pctl->pctldev); 750 pinctrl_unregister(pctl->pctldev);
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index c5e757157183..471c71f7f8b6 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -265,7 +265,7 @@ static int at91_dt_node_to_map(struct pinctrl_dev *pctldev,
265 /* create mux map */ 265 /* create mux map */
266 parent = of_get_parent(np); 266 parent = of_get_parent(np);
267 if (!parent) { 267 if (!parent) {
268 kfree(new_map); 268 devm_kfree(pctldev->dev, new_map);
269 return -EINVAL; 269 return -EINVAL;
270 } 270 }
271 new_map[0].type = PIN_MAP_TYPE_MUX_GROUP; 271 new_map[0].type = PIN_MAP_TYPE_MUX_GROUP;
@@ -792,8 +792,8 @@ static struct pinctrl_desc at91_pinctrl_desc = {
792 792
793static const char *gpio_compat = "atmel,at91rm9200-gpio"; 793static const char *gpio_compat = "atmel,at91rm9200-gpio";
794 794
795static void __devinit at91_pinctrl_child_count(struct at91_pinctrl *info, 795static void at91_pinctrl_child_count(struct at91_pinctrl *info,
796 struct device_node *np) 796 struct device_node *np)
797{ 797{
798 struct device_node *child; 798 struct device_node *child;
799 799
@@ -807,8 +807,8 @@ static void __devinit at91_pinctrl_child_count(struct at91_pinctrl *info,
807 } 807 }
808} 808}
809 809
810static int __devinit at91_pinctrl_mux_mask(struct at91_pinctrl *info, 810static int at91_pinctrl_mux_mask(struct at91_pinctrl *info,
811 struct device_node *np) 811 struct device_node *np)
812{ 812{
813 int ret = 0; 813 int ret = 0;
814 int size; 814 int size;
@@ -840,10 +840,9 @@ static int __devinit at91_pinctrl_mux_mask(struct at91_pinctrl *info,
840 return ret; 840 return ret;
841} 841}
842 842
843static int __devinit at91_pinctrl_parse_groups(struct device_node *np, 843static int at91_pinctrl_parse_groups(struct device_node *np,
844 struct at91_pin_group *grp, 844 struct at91_pin_group *grp,
845 struct at91_pinctrl *info, 845 struct at91_pinctrl *info, u32 index)
846 u32 index)
847{ 846{
848 struct at91_pmx_pin *pin; 847 struct at91_pmx_pin *pin;
849 int size; 848 int size;
@@ -889,8 +888,8 @@ static int __devinit at91_pinctrl_parse_groups(struct device_node *np,
889 return 0; 888 return 0;
890} 889}
891 890
892static int __devinit at91_pinctrl_parse_functions(struct device_node *np, 891static int at91_pinctrl_parse_functions(struct device_node *np,
893 struct at91_pinctrl *info, u32 index) 892 struct at91_pinctrl *info, u32 index)
894{ 893{
895 struct device_node *child; 894 struct device_node *child;
896 struct at91_pmx_func *func; 895 struct at91_pmx_func *func;
@@ -926,14 +925,14 @@ static int __devinit at91_pinctrl_parse_functions(struct device_node *np,
926 return 0; 925 return 0;
927} 926}
928 927
929static struct of_device_id at91_pinctrl_of_match[] __devinitdata = { 928static struct of_device_id at91_pinctrl_of_match[] = {
930 { .compatible = "atmel,at91sam9x5-pinctrl", .data = &at91sam9x5_ops }, 929 { .compatible = "atmel,at91sam9x5-pinctrl", .data = &at91sam9x5_ops },
931 { .compatible = "atmel,at91rm9200-pinctrl", .data = &at91rm9200_ops }, 930 { .compatible = "atmel,at91rm9200-pinctrl", .data = &at91rm9200_ops },
932 { /* sentinel */ } 931 { /* sentinel */ }
933}; 932};
934 933
935static int __devinit at91_pinctrl_probe_dt(struct platform_device *pdev, 934static int at91_pinctrl_probe_dt(struct platform_device *pdev,
936 struct at91_pinctrl *info) 935 struct at91_pinctrl *info)
937{ 936{
938 int ret = 0; 937 int ret = 0;
939 int i, j; 938 int i, j;
@@ -999,7 +998,7 @@ static int __devinit at91_pinctrl_probe_dt(struct platform_device *pdev,
999 return 0; 998 return 0;
1000} 999}
1001 1000
1002static int __devinit at91_pinctrl_probe(struct platform_device *pdev) 1001static int at91_pinctrl_probe(struct platform_device *pdev)
1003{ 1002{
1004 struct at91_pinctrl *info; 1003 struct at91_pinctrl *info;
1005 struct pinctrl_pin_desc *pdesc; 1004 struct pinctrl_pin_desc *pdesc;
@@ -1063,7 +1062,7 @@ err:
1063 return ret; 1062 return ret;
1064} 1063}
1065 1064
1066static int __devexit at91_pinctrl_remove(struct platform_device *pdev) 1065static int at91_pinctrl_remove(struct platform_device *pdev)
1067{ 1066{
1068 struct at91_pinctrl *info = platform_get_drvdata(pdev); 1067 struct at91_pinctrl *info = platform_get_drvdata(pdev);
1069 1068
@@ -1443,7 +1442,7 @@ static struct gpio_chip at91_gpio_template = {
1443 .ngpio = MAX_NB_GPIO_PER_BANK, 1442 .ngpio = MAX_NB_GPIO_PER_BANK,
1444}; 1443};
1445 1444
1446static void __devinit at91_gpio_probe_fixup(void) 1445static void at91_gpio_probe_fixup(void)
1447{ 1446{
1448 unsigned i; 1447 unsigned i;
1449 struct at91_gpio_chip *at91_gpio, *last = NULL; 1448 struct at91_gpio_chip *at91_gpio, *last = NULL;
@@ -1461,13 +1460,13 @@ static void __devinit at91_gpio_probe_fixup(void)
1461 } 1460 }
1462} 1461}
1463 1462
1464static struct of_device_id at91_gpio_of_match[] __devinitdata = { 1463static struct of_device_id at91_gpio_of_match[] = {
1465 { .compatible = "atmel,at91sam9x5-gpio", .data = &at91sam9x5_ops, }, 1464 { .compatible = "atmel,at91sam9x5-gpio", .data = &at91sam9x5_ops, },
1466 { .compatible = "atmel,at91rm9200-gpio", .data = &at91rm9200_ops }, 1465 { .compatible = "atmel,at91rm9200-gpio", .data = &at91rm9200_ops },
1467 { /* sentinel */ } 1466 { /* sentinel */ }
1468}; 1467};
1469 1468
1470static int __devinit at91_gpio_probe(struct platform_device *pdev) 1469static int at91_gpio_probe(struct platform_device *pdev)
1471{ 1470{
1472 struct device_node *np = pdev->dev.of_node; 1471 struct device_node *np = pdev->dev.of_node;
1473 struct resource *res; 1472 struct resource *res;
@@ -1609,7 +1608,7 @@ static struct platform_driver at91_pinctrl_driver = {
1609 .of_match_table = of_match_ptr(at91_pinctrl_of_match), 1608 .of_match_table = of_match_ptr(at91_pinctrl_of_match),
1610 }, 1609 },
1611 .probe = at91_pinctrl_probe, 1610 .probe = at91_pinctrl_probe,
1612 .remove = __devexit_p(at91_pinctrl_remove), 1611 .remove = at91_pinctrl_remove,
1613}; 1612};
1614 1613
1615static int __init at91_pinctrl_init(void) 1614static int __init at91_pinctrl_init(void)
diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c
index 0b0e9b49a1b5..d347b9f2eae3 100644
--- a/drivers/pinctrl/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/pinctrl-bcm2835.c
@@ -936,7 +936,7 @@ static struct pinctrl_gpio_range bcm2835_pinctrl_gpio_range = {
936 .npins = BCM2835_NUM_GPIOS, 936 .npins = BCM2835_NUM_GPIOS,
937}; 937};
938 938
939static int __devinit bcm2835_pinctrl_probe(struct platform_device *pdev) 939static int bcm2835_pinctrl_probe(struct platform_device *pdev)
940{ 940{
941 struct device *dev = &pdev->dev; 941 struct device *dev = &pdev->dev;
942 struct device_node *np = dev->of_node; 942 struct device_node *np = dev->of_node;
diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c
index 07db89528dc3..de05b64f0da6 100644
--- a/drivers/pinctrl/pinctrl-exynos5440.c
+++ b/drivers/pinctrl/pinctrl-exynos5440.c
@@ -842,7 +842,7 @@ static int __init exynos5440_gpiolib_unregister(struct platform_device *pdev,
842 return 0; 842 return 0;
843} 843}
844 844
845static int __devinit exynos5440_pinctrl_probe(struct platform_device *pdev) 845static int exynos5440_pinctrl_probe(struct platform_device *pdev)
846{ 846{
847 struct device *dev = &pdev->dev; 847 struct device *dev = &pdev->dev;
848 struct exynos5440_pinctrl_priv_data *priv; 848 struct exynos5440_pinctrl_priv_data *priv;
diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
index 131d86d7c2a5..43a6f1ffc786 100644
--- a/drivers/pinctrl/pinctrl-imx.c
+++ b/drivers/pinctrl/pinctrl-imx.c
@@ -425,10 +425,10 @@ static int imx_pinctrl_get_pin_id_and_mux(const struct imx_pinctrl_soc_info *inf
425 return 0; 425 return 0;
426} 426}
427 427
428static int __devinit imx_pinctrl_parse_groups(struct device_node *np, 428static int imx_pinctrl_parse_groups(struct device_node *np,
429 struct imx_pin_group *grp, 429 struct imx_pin_group *grp,
430 struct imx_pinctrl_soc_info *info, 430 struct imx_pinctrl_soc_info *info,
431 u32 index) 431 u32 index)
432{ 432{
433 unsigned int pin_func_id; 433 unsigned int pin_func_id;
434 int ret, size; 434 int ret, size;
@@ -482,8 +482,9 @@ static int __devinit imx_pinctrl_parse_groups(struct device_node *np,
482 return 0; 482 return 0;
483} 483}
484 484
485static int __devinit imx_pinctrl_parse_functions(struct device_node *np, 485static int imx_pinctrl_parse_functions(struct device_node *np,
486 struct imx_pinctrl_soc_info *info, u32 index) 486 struct imx_pinctrl_soc_info *info,
487 u32 index)
487{ 488{
488 struct device_node *child; 489 struct device_node *child;
489 struct imx_pmx_func *func; 490 struct imx_pmx_func *func;
@@ -517,7 +518,7 @@ static int __devinit imx_pinctrl_parse_functions(struct device_node *np,
517 return 0; 518 return 0;
518} 519}
519 520
520static int __devinit imx_pinctrl_probe_dt(struct platform_device *pdev, 521static int imx_pinctrl_probe_dt(struct platform_device *pdev,
521 struct imx_pinctrl_soc_info *info) 522 struct imx_pinctrl_soc_info *info)
522{ 523{
523 struct device_node *np = pdev->dev.of_node; 524 struct device_node *np = pdev->dev.of_node;
@@ -560,8 +561,8 @@ static int __devinit imx_pinctrl_probe_dt(struct platform_device *pdev,
560 return 0; 561 return 0;
561} 562}
562 563
563int __devinit imx_pinctrl_probe(struct platform_device *pdev, 564int imx_pinctrl_probe(struct platform_device *pdev,
564 struct imx_pinctrl_soc_info *info) 565 struct imx_pinctrl_soc_info *info)
565{ 566{
566 struct imx_pinctrl *ipctl; 567 struct imx_pinctrl *ipctl;
567 struct resource *res; 568 struct resource *res;
diff --git a/drivers/pinctrl/pinctrl-imx23.c b/drivers/pinctrl/pinctrl-imx23.c
index 04364f7822b7..e76d75c9d1ba 100644
--- a/drivers/pinctrl/pinctrl-imx23.c
+++ b/drivers/pinctrl/pinctrl-imx23.c
@@ -267,7 +267,7 @@ static struct mxs_pinctrl_soc_data imx23_pinctrl_data = {
267 .npins = ARRAY_SIZE(imx23_pins), 267 .npins = ARRAY_SIZE(imx23_pins),
268}; 268};
269 269
270static int __devinit imx23_pinctrl_probe(struct platform_device *pdev) 270static int imx23_pinctrl_probe(struct platform_device *pdev)
271{ 271{
272 return mxs_pinctrl_probe(pdev, &imx23_pinctrl_data); 272 return mxs_pinctrl_probe(pdev, &imx23_pinctrl_data);
273} 273}
diff --git a/drivers/pinctrl/pinctrl-imx28.c b/drivers/pinctrl/pinctrl-imx28.c
index e1af2ba89004..79c9c8d296af 100644
--- a/drivers/pinctrl/pinctrl-imx28.c
+++ b/drivers/pinctrl/pinctrl-imx28.c
@@ -383,7 +383,7 @@ static struct mxs_pinctrl_soc_data imx28_pinctrl_data = {
383 .npins = ARRAY_SIZE(imx28_pins), 383 .npins = ARRAY_SIZE(imx28_pins),
384}; 384};
385 385
386static int __devinit imx28_pinctrl_probe(struct platform_device *pdev) 386static int imx28_pinctrl_probe(struct platform_device *pdev)
387{ 387{
388 return mxs_pinctrl_probe(pdev, &imx28_pinctrl_data); 388 return mxs_pinctrl_probe(pdev, &imx28_pinctrl_data);
389} 389}
diff --git a/drivers/pinctrl/pinctrl-imx35.c b/drivers/pinctrl/pinctrl-imx35.c
index 1dbf5278acec..6e214110e3d5 100644
--- a/drivers/pinctrl/pinctrl-imx35.c
+++ b/drivers/pinctrl/pinctrl-imx35.c
@@ -1564,7 +1564,7 @@ static struct of_device_id imx35_pinctrl_of_match[] = {
1564 { /* sentinel */ } 1564 { /* sentinel */ }
1565}; 1565};
1566 1566
1567static int __devinit imx35_pinctrl_probe(struct platform_device *pdev) 1567static int imx35_pinctrl_probe(struct platform_device *pdev)
1568{ 1568{
1569 return imx_pinctrl_probe(pdev, &imx35_pinctrl_info); 1569 return imx_pinctrl_probe(pdev, &imx35_pinctrl_info);
1570} 1570}
diff --git a/drivers/pinctrl/pinctrl-imx51.c b/drivers/pinctrl/pinctrl-imx51.c
index 131216558a7b..9a92aaad150f 100644
--- a/drivers/pinctrl/pinctrl-imx51.c
+++ b/drivers/pinctrl/pinctrl-imx51.c
@@ -1291,7 +1291,7 @@ static struct of_device_id imx51_pinctrl_of_match[] = {
1291 { /* sentinel */ } 1291 { /* sentinel */ }
1292}; 1292};
1293 1293
1294static int __devinit imx51_pinctrl_probe(struct platform_device *pdev) 1294static int imx51_pinctrl_probe(struct platform_device *pdev)
1295{ 1295{
1296 return imx_pinctrl_probe(pdev, &imx51_pinctrl_info); 1296 return imx_pinctrl_probe(pdev, &imx51_pinctrl_info);
1297} 1297}
diff --git a/drivers/pinctrl/pinctrl-imx53.c b/drivers/pinctrl/pinctrl-imx53.c
index ec4048691775..2c9c8e2334da 100644
--- a/drivers/pinctrl/pinctrl-imx53.c
+++ b/drivers/pinctrl/pinctrl-imx53.c
@@ -1371,7 +1371,7 @@ static struct imx_pin_reg imx53_pin_regs[] = {
1371 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 0, 0x7F8, 1), /* MX53_PAD_GPIO_8__ESAI1_TX5_RX0 */ 1371 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 0, 0x7F8, 1), /* MX53_PAD_GPIO_8__ESAI1_TX5_RX0 */
1372 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 1, 0x000, 0), /* MX53_PAD_GPIO_8__GPIO1_8 */ 1372 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 1, 0x000, 0), /* MX53_PAD_GPIO_8__GPIO1_8 */
1373 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 2, 0x000, 0), /* MX53_PAD_GPIO_8__EPIT2_EPITO */ 1373 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 2, 0x000, 0), /* MX53_PAD_GPIO_8__EPIT2_EPITO */
1374 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 3, 0x760, 3), /* MX53_PAD_GPIO_8__CAN1_RXCAN */ 1374 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 3, 0x760, 2), /* MX53_PAD_GPIO_8__CAN1_RXCAN */
1375 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 4, 0x880, 5), /* MX53_PAD_GPIO_8__UART2_RXD_MUX */ 1375 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 4, 0x880, 5), /* MX53_PAD_GPIO_8__UART2_RXD_MUX */
1376 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 5, 0x000, 0), /* MX53_PAD_GPIO_8__FIRI_TXD */ 1376 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 5, 0x000, 0), /* MX53_PAD_GPIO_8__FIRI_TXD */
1377 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 6, 0x000, 0), /* MX53_PAD_GPIO_8__SPDIF_SRCLK */ 1377 IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 6, 0x000, 0), /* MX53_PAD_GPIO_8__SPDIF_SRCLK */
@@ -1618,7 +1618,7 @@ static struct of_device_id imx53_pinctrl_of_match[] = {
1618 { /* sentinel */ } 1618 { /* sentinel */ }
1619}; 1619};
1620 1620
1621static int __devinit imx53_pinctrl_probe(struct platform_device *pdev) 1621static int imx53_pinctrl_probe(struct platform_device *pdev)
1622{ 1622{
1623 return imx_pinctrl_probe(pdev, &imx53_pinctrl_info); 1623 return imx_pinctrl_probe(pdev, &imx53_pinctrl_info);
1624} 1624}
diff --git a/drivers/pinctrl/pinctrl-imx6q.c b/drivers/pinctrl/pinctrl-imx6q.c
index 844ab13c93a3..663346bb765e 100644
--- a/drivers/pinctrl/pinctrl-imx6q.c
+++ b/drivers/pinctrl/pinctrl-imx6q.c
@@ -2302,7 +2302,7 @@ static struct of_device_id imx6q_pinctrl_of_match[] = {
2302 { /* sentinel */ } 2302 { /* sentinel */ }
2303}; 2303};
2304 2304
2305static int __devinit imx6q_pinctrl_probe(struct platform_device *pdev) 2305static int imx6q_pinctrl_probe(struct platform_device *pdev)
2306{ 2306{
2307 return imx_pinctrl_probe(pdev, &imx6q_pinctrl_info); 2307 return imx_pinctrl_probe(pdev, &imx6q_pinctrl_info);
2308} 2308}
diff --git a/drivers/pinctrl/pinctrl-mmp2.c b/drivers/pinctrl/pinctrl-mmp2.c
index 4fbb3db3f1c1..4afa56a3a51d 100644
--- a/drivers/pinctrl/pinctrl-mmp2.c
+++ b/drivers/pinctrl/pinctrl-mmp2.c
@@ -686,7 +686,7 @@ static struct pxa3xx_pinmux_info mmp2_info = {
686 .ds_shift = MMP2_DS_SHIFT, 686 .ds_shift = MMP2_DS_SHIFT,
687}; 687};
688 688
689static int __devinit mmp2_pinmux_probe(struct platform_device *pdev) 689static int mmp2_pinmux_probe(struct platform_device *pdev)
690{ 690{
691 return pxa3xx_pinctrl_register(pdev, &mmp2_info); 691 return pxa3xx_pinctrl_register(pdev, &mmp2_info);
692} 692}
diff --git a/drivers/pinctrl/pinctrl-mxs.c b/drivers/pinctrl/pinctrl-mxs.c
index 180f16379ec1..dd227d21dcf2 100644
--- a/drivers/pinctrl/pinctrl-mxs.c
+++ b/drivers/pinctrl/pinctrl-mxs.c
@@ -335,9 +335,9 @@ static struct pinctrl_desc mxs_pinctrl_desc = {
335 .owner = THIS_MODULE, 335 .owner = THIS_MODULE,
336}; 336};
337 337
338static int __devinit mxs_pinctrl_parse_group(struct platform_device *pdev, 338static int mxs_pinctrl_parse_group(struct platform_device *pdev,
339 struct device_node *np, int idx, 339 struct device_node *np, int idx,
340 const char **out_name) 340 const char **out_name)
341{ 341{
342 struct mxs_pinctrl_data *d = platform_get_drvdata(pdev); 342 struct mxs_pinctrl_data *d = platform_get_drvdata(pdev);
343 struct mxs_group *g = &d->soc->groups[idx]; 343 struct mxs_group *g = &d->soc->groups[idx];
@@ -384,8 +384,8 @@ static int __devinit mxs_pinctrl_parse_group(struct platform_device *pdev,
384 return 0; 384 return 0;
385} 385}
386 386
387static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, 387static int mxs_pinctrl_probe_dt(struct platform_device *pdev,
388 struct mxs_pinctrl_data *d) 388 struct mxs_pinctrl_data *d)
389{ 389{
390 struct mxs_pinctrl_soc_data *soc = d->soc; 390 struct mxs_pinctrl_soc_data *soc = d->soc;
391 struct device_node *np = pdev->dev.of_node; 391 struct device_node *np = pdev->dev.of_node;
@@ -476,8 +476,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev,
476 return 0; 476 return 0;
477} 477}
478 478
479int __devinit mxs_pinctrl_probe(struct platform_device *pdev, 479int mxs_pinctrl_probe(struct platform_device *pdev,
480 struct mxs_pinctrl_soc_data *soc) 480 struct mxs_pinctrl_soc_data *soc)
481{ 481{
482 struct device_node *np = pdev->dev.of_node; 482 struct device_node *np = pdev->dev.of_node;
483 struct mxs_pinctrl_data *d; 483 struct mxs_pinctrl_data *d;
diff --git a/drivers/pinctrl/pinctrl-nomadik-db8500.c b/drivers/pinctrl/pinctrl-nomadik-db8500.c
index 7d88ae352119..30b4da91ef7e 100644
--- a/drivers/pinctrl/pinctrl-nomadik-db8500.c
+++ b/drivers/pinctrl/pinctrl-nomadik-db8500.c
@@ -1251,8 +1251,7 @@ static const struct nmk_pinctrl_soc_data nmk_db8500_soc = {
1251 .prcm_gpiocr_registers = db8500_prcm_gpiocr_regs, 1251 .prcm_gpiocr_registers = db8500_prcm_gpiocr_regs,
1252}; 1252};
1253 1253
1254void __devinit 1254void nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc)
1255nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc)
1256{ 1255{
1257 *soc = &nmk_db8500_soc; 1256 *soc = &nmk_db8500_soc;
1258} 1257}
diff --git a/drivers/pinctrl/pinctrl-nomadik-db8540.c b/drivers/pinctrl/pinctrl-nomadik-db8540.c
index bb6a4016322a..d7ba5443bae0 100644
--- a/drivers/pinctrl/pinctrl-nomadik-db8540.c
+++ b/drivers/pinctrl/pinctrl-nomadik-db8540.c
@@ -1260,8 +1260,7 @@ static const struct nmk_pinctrl_soc_data nmk_db8540_soc = {
1260 .prcm_gpiocr_registers = db8540_prcm_gpiocr_regs, 1260 .prcm_gpiocr_registers = db8540_prcm_gpiocr_regs,
1261}; 1261};
1262 1262
1263void __devinit 1263void nmk_pinctrl_db8540_init(const struct nmk_pinctrl_soc_data **soc)
1264nmk_pinctrl_db8540_init(const struct nmk_pinctrl_soc_data **soc)
1265{ 1264{
1266 *soc = &nmk_db8540_soc; 1265 *soc = &nmk_db8540_soc;
1267} 1266}
diff --git a/drivers/pinctrl/pinctrl-nomadik-stn8815.c b/drivers/pinctrl/pinctrl-nomadik-stn8815.c
index 7d432c3bc359..924a3393fa82 100644
--- a/drivers/pinctrl/pinctrl-nomadik-stn8815.c
+++ b/drivers/pinctrl/pinctrl-nomadik-stn8815.c
@@ -350,8 +350,7 @@ static const struct nmk_pinctrl_soc_data nmk_stn8815_soc = {
350 .ngroups = ARRAY_SIZE(nmk_stn8815_groups), 350 .ngroups = ARRAY_SIZE(nmk_stn8815_groups),
351}; 351};
352 352
353void __devinit 353void nmk_pinctrl_stn8815_init(const struct nmk_pinctrl_soc_data **soc)
354nmk_pinctrl_stn8815_init(const struct nmk_pinctrl_soc_data **soc)
355{ 354{
356 *soc = &nmk_stn8815_soc; 355 *soc = &nmk_stn8815_soc;
357} 356}
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index ef66f98e9202..1bb16ffb4e41 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -259,6 +259,9 @@ static void nmk_prcm_altcx_set_mode(struct nmk_pinctrl *npct,
259 const struct prcm_gpiocr_altcx_pin_desc *pin_desc; 259 const struct prcm_gpiocr_altcx_pin_desc *pin_desc;
260 const u16 *gpiocr_regs; 260 const u16 *gpiocr_regs;
261 261
262 if (!npct->prcm_base)
263 return;
264
262 if (alt_num > PRCM_IDX_GPIOCR_ALTC_MAX) { 265 if (alt_num > PRCM_IDX_GPIOCR_ALTC_MAX) {
263 dev_err(npct->dev, "PRCM GPIOCR: alternate-C%i is invalid\n", 266 dev_err(npct->dev, "PRCM GPIOCR: alternate-C%i is invalid\n",
264 alt_num); 267 alt_num);
@@ -682,6 +685,9 @@ static int nmk_prcm_gpiocr_get_mode(struct pinctrl_dev *pctldev, int gpio)
682 const struct prcm_gpiocr_altcx_pin_desc *pin_desc; 685 const struct prcm_gpiocr_altcx_pin_desc *pin_desc;
683 const u16 *gpiocr_regs; 686 const u16 *gpiocr_regs;
684 687
688 if (!npct->prcm_base)
689 return NMK_GPIO_ALT_C;
690
685 for (i = 0; i < npct->soc->npins_altcx; i++) { 691 for (i = 0; i < npct->soc->npins_altcx; i++) {
686 if (npct->soc->altcx_pins[i].pin == gpio) 692 if (npct->soc->altcx_pins[i].pin == gpio)
687 break; 693 break;
@@ -1306,7 +1312,7 @@ const struct irq_domain_ops nmk_gpio_irq_simple_ops = {
1306 .xlate = irq_domain_xlate_twocell, 1312 .xlate = irq_domain_xlate_twocell,
1307}; 1313};
1308 1314
1309static int __devinit nmk_gpio_probe(struct platform_device *dev) 1315static int nmk_gpio_probe(struct platform_device *dev)
1310{ 1316{
1311 struct nmk_gpio_platform_data *pdata = dev->dev.platform_data; 1317 struct nmk_gpio_platform_data *pdata = dev->dev.platform_data;
1312 struct device_node *np = dev->dev.of_node; 1318 struct device_node *np = dev->dev.of_node;
@@ -1846,7 +1852,7 @@ static const struct of_device_id nmk_pinctrl_match[] = {
1846 {}, 1852 {},
1847}; 1853};
1848 1854
1849static int __devinit nmk_pinctrl_probe(struct platform_device *pdev) 1855static int nmk_pinctrl_probe(struct platform_device *pdev)
1850{ 1856{
1851 const struct platform_device_id *platid = platform_get_device_id(pdev); 1857 const struct platform_device_id *platid = platform_get_device_id(pdev);
1852 struct device_node *np = pdev->dev.of_node; 1858 struct device_node *np = pdev->dev.of_node;
@@ -1887,9 +1893,12 @@ static int __devinit nmk_pinctrl_probe(struct platform_device *pdev)
1887 "failed to ioremap PRCM registers\n"); 1893 "failed to ioremap PRCM registers\n");
1888 return -ENOMEM; 1894 return -ENOMEM;
1889 } 1895 }
1890 } else { 1896 } else if (version == PINCTRL_NMK_STN8815) {
1891 dev_info(&pdev->dev, 1897 dev_info(&pdev->dev,
1892 "No PRCM base, assume no ALT-Cx control is available\n"); 1898 "No PRCM base, assume no ALT-Cx control is available\n");
1899 } else {
1900 dev_err(&pdev->dev, "missing PRCM base address\n");
1901 return -EINVAL;
1893 } 1902 }
1894 1903
1895 /* 1904 /*
diff --git a/drivers/pinctrl/pinctrl-pxa168.c b/drivers/pinctrl/pinctrl-pxa168.c
index cb771e4a6355..d9cd2b457484 100644
--- a/drivers/pinctrl/pinctrl-pxa168.c
+++ b/drivers/pinctrl/pinctrl-pxa168.c
@@ -615,7 +615,7 @@ static struct pxa3xx_pinmux_info pxa168_info = {
615 .ds_shift = PXA168_DS_SHIFT, 615 .ds_shift = PXA168_DS_SHIFT,
616}; 616};
617 617
618static int __devinit pxa168_pinmux_probe(struct platform_device *pdev) 618static int pxa168_pinmux_probe(struct platform_device *pdev)
619{ 619{
620 return pxa3xx_pinctrl_register(pdev, &pxa168_info); 620 return pxa3xx_pinctrl_register(pdev, &pxa168_info);
621} 621}
diff --git a/drivers/pinctrl/pinctrl-pxa910.c b/drivers/pinctrl/pinctrl-pxa910.c
index 5fecd221b830..a2f917b847fb 100644
--- a/drivers/pinctrl/pinctrl-pxa910.c
+++ b/drivers/pinctrl/pinctrl-pxa910.c
@@ -971,7 +971,7 @@ static struct pxa3xx_pinmux_info pxa910_info = {
971 .ds_shift = PXA910_DS_SHIFT, 971 .ds_shift = PXA910_DS_SHIFT,
972}; 972};
973 973
974static int __devinit pxa910_pinmux_probe(struct platform_device *pdev) 974static int pxa910_pinmux_probe(struct platform_device *pdev)
975{ 975{
976 return pxa3xx_pinctrl_register(pdev, &pxa910_info); 976 return pxa3xx_pinctrl_register(pdev, &pxa910_info);
977} 977}
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c
index 864fed822f9d..fd7b24cd8908 100644
--- a/drivers/pinctrl/pinctrl-samsung.c
+++ b/drivers/pinctrl/pinctrl-samsung.c
@@ -549,9 +549,11 @@ static int samsung_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
549 * Parse the pin names listed in the 'samsung,pins' property and convert it 549 * Parse the pin names listed in the 'samsung,pins' property and convert it
550 * into a list of gpio numbers are create a pin group from it. 550 * into a list of gpio numbers are create a pin group from it.
551 */ 551 */
552static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, 552static int samsung_pinctrl_parse_dt_pins(struct platform_device *pdev,
553 struct device_node *cfg_np, struct pinctrl_desc *pctl, 553 struct device_node *cfg_np,
554 unsigned int **pin_list, unsigned int *npins) 554 struct pinctrl_desc *pctl,
555 unsigned int **pin_list,
556 unsigned int *npins)
555{ 557{
556 struct device *dev = &pdev->dev; 558 struct device *dev = &pdev->dev;
557 struct property *prop; 559 struct property *prop;
@@ -596,8 +598,8 @@ static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev,
596 * from device node of the pin-controller. A pin group is formed with all 598 * from device node of the pin-controller. A pin group is formed with all
597 * the pins listed in the "samsung,pins" property. 599 * the pins listed in the "samsung,pins" property.
598 */ 600 */
599static int __devinit samsung_pinctrl_parse_dt(struct platform_device *pdev, 601static int samsung_pinctrl_parse_dt(struct platform_device *pdev,
600 struct samsung_pinctrl_drv_data *drvdata) 602 struct samsung_pinctrl_drv_data *drvdata)
601{ 603{
602 struct device *dev = &pdev->dev; 604 struct device *dev = &pdev->dev;
603 struct device_node *dev_np = dev->of_node; 605 struct device_node *dev_np = dev->of_node;
@@ -691,8 +693,8 @@ static int __devinit samsung_pinctrl_parse_dt(struct platform_device *pdev,
691} 693}
692 694
693/* register the pinctrl interface with the pinctrl subsystem */ 695/* register the pinctrl interface with the pinctrl subsystem */
694static int __devinit samsung_pinctrl_register(struct platform_device *pdev, 696static int samsung_pinctrl_register(struct platform_device *pdev,
695 struct samsung_pinctrl_drv_data *drvdata) 697 struct samsung_pinctrl_drv_data *drvdata)
696{ 698{
697 struct pinctrl_desc *ctrldesc = &drvdata->pctl; 699 struct pinctrl_desc *ctrldesc = &drvdata->pctl;
698 struct pinctrl_pin_desc *pindesc, *pdesc; 700 struct pinctrl_pin_desc *pindesc, *pdesc;
@@ -778,8 +780,8 @@ static const struct gpio_chip samsung_gpiolib_chip = {
778}; 780};
779 781
780/* register the gpiolib interface with the gpiolib subsystem */ 782/* register the gpiolib interface with the gpiolib subsystem */
781static int __devinit samsung_gpiolib_register(struct platform_device *pdev, 783static int samsung_gpiolib_register(struct platform_device *pdev,
782 struct samsung_pinctrl_drv_data *drvdata) 784 struct samsung_pinctrl_drv_data *drvdata)
783{ 785{
784 struct samsung_pin_ctrl *ctrl = drvdata->ctrl; 786 struct samsung_pin_ctrl *ctrl = drvdata->ctrl;
785 struct samsung_pin_bank *bank = ctrl->pin_banks; 787 struct samsung_pin_bank *bank = ctrl->pin_banks;
@@ -816,8 +818,8 @@ fail:
816} 818}
817 819
818/* unregister the gpiolib interface with the gpiolib subsystem */ 820/* unregister the gpiolib interface with the gpiolib subsystem */
819static int __devinit samsung_gpiolib_unregister(struct platform_device *pdev, 821static int samsung_gpiolib_unregister(struct platform_device *pdev,
820 struct samsung_pinctrl_drv_data *drvdata) 822 struct samsung_pinctrl_drv_data *drvdata)
821{ 823{
822 struct samsung_pin_ctrl *ctrl = drvdata->ctrl; 824 struct samsung_pin_ctrl *ctrl = drvdata->ctrl;
823 struct samsung_pin_bank *bank = ctrl->pin_banks; 825 struct samsung_pin_bank *bank = ctrl->pin_banks;
@@ -881,7 +883,7 @@ static struct samsung_pin_ctrl *samsung_pinctrl_get_soc_data(
881 return ctrl; 883 return ctrl;
882} 884}
883 885
884static int __devinit samsung_pinctrl_probe(struct platform_device *pdev) 886static int samsung_pinctrl_probe(struct platform_device *pdev)
885{ 887{
886 struct samsung_pinctrl_drv_data *drvdata; 888 struct samsung_pinctrl_drv_data *drvdata;
887 struct device *dev = &pdev->dev; 889 struct device *dev = &pdev->dev;
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 79642831bba2..f6a360b86eb6 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -493,7 +493,7 @@ static struct pinconf_ops pcs_pinconf_ops = {
493 * @pcs: pcs driver instance 493 * @pcs: pcs driver instance
494 * @offset: register offset from base 494 * @offset: register offset from base
495 */ 495 */
496static int __devinit pcs_add_pin(struct pcs_device *pcs, unsigned offset) 496static int pcs_add_pin(struct pcs_device *pcs, unsigned offset)
497{ 497{
498 struct pinctrl_pin_desc *pin; 498 struct pinctrl_pin_desc *pin;
499 struct pcs_name *pn; 499 struct pcs_name *pn;
@@ -526,7 +526,7 @@ static int __devinit pcs_add_pin(struct pcs_device *pcs, unsigned offset)
526 * If your hardware needs holes in the address space, then just set 526 * If your hardware needs holes in the address space, then just set
527 * up multiple driver instances. 527 * up multiple driver instances.
528 */ 528 */
529static int __devinit pcs_allocate_pin_table(struct pcs_device *pcs) 529static int pcs_allocate_pin_table(struct pcs_device *pcs)
530{ 530{
531 int mux_bytes, nr_pins, i; 531 int mux_bytes, nr_pins, i;
532 532
@@ -907,8 +907,7 @@ static void pcs_free_resources(struct pcs_device *pcs)
907 907
908static struct of_device_id pcs_of_match[]; 908static struct of_device_id pcs_of_match[];
909 909
910static int __devinit pcs_add_gpio_range(struct device_node *node, 910static int pcs_add_gpio_range(struct device_node *node, struct pcs_device *pcs)
911 struct pcs_device *pcs)
912{ 911{
913 struct pcs_gpio_range *gpio; 912 struct pcs_gpio_range *gpio;
914 struct device_node *child; 913 struct device_node *child;
@@ -951,7 +950,7 @@ static int __devinit pcs_add_gpio_range(struct device_node *node,
951 return 0; 950 return 0;
952} 951}
953 952
954static int __devinit pcs_probe(struct platform_device *pdev) 953static int pcs_probe(struct platform_device *pdev)
955{ 954{
956 struct device_node *np = pdev->dev.of_node; 955 struct device_node *np = pdev->dev.of_node;
957 const struct of_device_id *match; 956 const struct of_device_id *match;
diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c
index a4f0c5e487d5..498b2ba905de 100644
--- a/drivers/pinctrl/pinctrl-sirf.c
+++ b/drivers/pinctrl/pinctrl-sirf.c
@@ -1246,7 +1246,7 @@ static void __iomem *sirfsoc_rsc_of_iomap(void)
1246 return of_iomap(np, 0); 1246 return of_iomap(np, 0);
1247} 1247}
1248 1248
1249static int __devinit sirfsoc_pinmux_probe(struct platform_device *pdev) 1249static int sirfsoc_pinmux_probe(struct platform_device *pdev)
1250{ 1250{
1251 int ret; 1251 int ret;
1252 struct sirfsoc_pmx *spmx; 1252 struct sirfsoc_pmx *spmx;
@@ -1663,7 +1663,45 @@ const struct irq_domain_ops sirfsoc_gpio_irq_simple_ops = {
1663 .xlate = irq_domain_xlate_twocell, 1663 .xlate = irq_domain_xlate_twocell,
1664}; 1664};
1665 1665
1666static int __devinit sirfsoc_gpio_probe(struct device_node *np) 1666static void sirfsoc_gpio_set_pullup(const u32 *pullups)
1667{
1668 int i, n;
1669 const unsigned long *p = (const unsigned long *)pullups;
1670
1671 for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
1672 n = find_first_bit(p + i, BITS_PER_LONG);
1673 while (n < BITS_PER_LONG) {
1674 u32 offset = SIRFSOC_GPIO_CTRL(i, n);
1675 u32 val = readl(sgpio_bank[i].chip.regs + offset);
1676 val |= SIRFSOC_GPIO_CTL_PULL_MASK;
1677 val |= SIRFSOC_GPIO_CTL_PULL_HIGH;
1678 writel(val, sgpio_bank[i].chip.regs + offset);
1679
1680 n = find_next_bit(p + i, BITS_PER_LONG, n + 1);
1681 }
1682 }
1683}
1684
1685static void sirfsoc_gpio_set_pulldown(const u32 *pulldowns)
1686{
1687 int i, n;
1688 const unsigned long *p = (const unsigned long *)pulldowns;
1689
1690 for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
1691 n = find_first_bit(p + i, BITS_PER_LONG);
1692 while (n < BITS_PER_LONG) {
1693 u32 offset = SIRFSOC_GPIO_CTRL(i, n);
1694 u32 val = readl(sgpio_bank[i].chip.regs + offset);
1695 val |= SIRFSOC_GPIO_CTL_PULL_MASK;
1696 val &= ~SIRFSOC_GPIO_CTL_PULL_HIGH;
1697 writel(val, sgpio_bank[i].chip.regs + offset);
1698
1699 n = find_next_bit(p + i, BITS_PER_LONG, n + 1);
1700 }
1701 }
1702}
1703
1704static int sirfsoc_gpio_probe(struct device_node *np)
1667{ 1705{
1668 int i, err = 0; 1706 int i, err = 0;
1669 struct sirfsoc_gpio_bank *bank; 1707 struct sirfsoc_gpio_bank *bank;
@@ -1671,6 +1709,8 @@ static int __devinit sirfsoc_gpio_probe(struct device_node *np)
1671 struct platform_device *pdev; 1709 struct platform_device *pdev;
1672 bool is_marco = false; 1710 bool is_marco = false;
1673 1711
1712 u32 pullups[SIRFSOC_GPIO_NO_OF_BANKS], pulldowns[SIRFSOC_GPIO_NO_OF_BANKS];
1713
1674 pdev = of_find_device_by_node(np); 1714 pdev = of_find_device_by_node(np);
1675 if (!pdev) 1715 if (!pdev)
1676 return -ENODEV; 1716 return -ENODEV;
@@ -1726,6 +1766,14 @@ static int __devinit sirfsoc_gpio_probe(struct device_node *np)
1726 irq_set_handler_data(bank->parent_irq, bank); 1766 irq_set_handler_data(bank->parent_irq, bank);
1727 } 1767 }
1728 1768
1769 if (!of_property_read_u32_array(np, "sirf,pullups", pullups,
1770 SIRFSOC_GPIO_NO_OF_BANKS))
1771 sirfsoc_gpio_set_pullup(pullups);
1772
1773 if (!of_property_read_u32_array(np, "sirf,pulldowns", pulldowns,
1774 SIRFSOC_GPIO_NO_OF_BANKS))
1775 sirfsoc_gpio_set_pulldown(pulldowns);
1776
1729 return 0; 1777 return 0;
1730 1778
1731out: 1779out:
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c
index e356b0380fa7..ae1e4bb3259d 100644
--- a/drivers/pinctrl/pinctrl-tegra.c
+++ b/drivers/pinctrl/pinctrl-tegra.c
@@ -687,7 +687,7 @@ static struct pinctrl_desc tegra_pinctrl_desc = {
687 .owner = THIS_MODULE, 687 .owner = THIS_MODULE,
688}; 688};
689 689
690int __devinit tegra_pinctrl_probe(struct platform_device *pdev, 690int tegra_pinctrl_probe(struct platform_device *pdev,
691 const struct tegra_pinctrl_soc_data *soc_data) 691 const struct tegra_pinctrl_soc_data *soc_data)
692{ 692{
693 struct tegra_pmx *pmx; 693 struct tegra_pmx *pmx;
diff --git a/drivers/pinctrl/pinctrl-tegra20.c b/drivers/pinctrl/pinctrl-tegra20.c
index 1524bfd66602..e848189038f0 100644
--- a/drivers/pinctrl/pinctrl-tegra20.c
+++ b/drivers/pinctrl/pinctrl-tegra20.c
@@ -2856,7 +2856,7 @@ static const struct tegra_pinctrl_soc_data tegra20_pinctrl = {
2856 .ngroups = ARRAY_SIZE(tegra20_groups), 2856 .ngroups = ARRAY_SIZE(tegra20_groups),
2857}; 2857};
2858 2858
2859static int __devinit tegra20_pinctrl_probe(struct platform_device *pdev) 2859static int tegra20_pinctrl_probe(struct platform_device *pdev)
2860{ 2860{
2861 return tegra_pinctrl_probe(pdev, &tegra20_pinctrl); 2861 return tegra_pinctrl_probe(pdev, &tegra20_pinctrl);
2862} 2862}
diff --git a/drivers/pinctrl/pinctrl-tegra30.c b/drivers/pinctrl/pinctrl-tegra30.c
index cf579ebf346f..9ad87ea735d4 100644
--- a/drivers/pinctrl/pinctrl-tegra30.c
+++ b/drivers/pinctrl/pinctrl-tegra30.c
@@ -3722,7 +3722,7 @@ static const struct tegra_pinctrl_soc_data tegra30_pinctrl = {
3722 .ngroups = ARRAY_SIZE(tegra30_groups), 3722 .ngroups = ARRAY_SIZE(tegra30_groups),
3723}; 3723};
3724 3724
3725static int __devinit tegra30_pinctrl_probe(struct platform_device *pdev) 3725static int tegra30_pinctrl_probe(struct platform_device *pdev)
3726{ 3726{
3727 return tegra_pinctrl_probe(pdev, &tegra30_pinctrl); 3727 return tegra_pinctrl_probe(pdev, &tegra30_pinctrl);
3728} 3728}
diff --git a/drivers/pinctrl/pinctrl-u300.c b/drivers/pinctrl/pinctrl-u300.c
index 8c039ad22baf..718ec5762683 100644
--- a/drivers/pinctrl/pinctrl-u300.c
+++ b/drivers/pinctrl/pinctrl-u300.c
@@ -1062,7 +1062,7 @@ static struct pinctrl_desc u300_pmx_desc = {
1062 .owner = THIS_MODULE, 1062 .owner = THIS_MODULE,
1063}; 1063};
1064 1064
1065static int __devinit u300_pmx_probe(struct platform_device *pdev) 1065static int u300_pmx_probe(struct platform_device *pdev)
1066{ 1066{
1067 struct u300_pmx *upmx; 1067 struct u300_pmx *upmx;
1068 struct resource *res; 1068 struct resource *res;
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
index ad90984ec500..5f0eb04c2336 100644
--- a/drivers/pinctrl/pinctrl-xway.c
+++ b/drivers/pinctrl/pinctrl-xway.c
@@ -674,7 +674,7 @@ static const struct of_device_id xway_match[] = {
674}; 674};
675MODULE_DEVICE_TABLE(of, xway_match); 675MODULE_DEVICE_TABLE(of, xway_match);
676 676
677static int __devinit pinmux_xway_probe(struct platform_device *pdev) 677static int pinmux_xway_probe(struct platform_device *pdev)
678{ 678{
679 const struct of_device_id *match; 679 const struct of_device_id *match;
680 const struct pinctrl_xway_soc *xway_soc; 680 const struct pinctrl_xway_soc *xway_soc;
diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
index 4c045053bbdd..3cf4ecd9302c 100644
--- a/drivers/pinctrl/spear/pinctrl-plgpio.c
+++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
@@ -451,8 +451,7 @@ int spear310_o2p(int offset)
451 return offset + 2; 451 return offset + 2;
452} 452}
453 453
454static int __devinit plgpio_probe_dt(struct platform_device *pdev, 454static int plgpio_probe_dt(struct platform_device *pdev, struct plgpio *plgpio)
455 struct plgpio *plgpio)
456{ 455{
457 struct device_node *np = pdev->dev.of_node; 456 struct device_node *np = pdev->dev.of_node;
458 int ret = -EINVAL; 457 int ret = -EINVAL;
@@ -522,7 +521,7 @@ static int __devinit plgpio_probe_dt(struct platform_device *pdev,
522end: 521end:
523 return ret; 522 return ret;
524} 523}
525static int __devinit plgpio_probe(struct platform_device *pdev) 524static int plgpio_probe(struct platform_device *pdev)
526{ 525{
527 struct device_node *np = pdev->dev.of_node; 526 struct device_node *np = pdev->dev.of_node;
528 struct plgpio *plgpio; 527 struct plgpio *plgpio;
diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c
index 922c057521a1..6a7dae70db08 100644
--- a/drivers/pinctrl/spear/pinctrl-spear.c
+++ b/drivers/pinctrl/spear/pinctrl-spear.c
@@ -82,9 +82,8 @@ static int set_mode(struct spear_pmx *pmx, int mode)
82 return 0; 82 return 0;
83} 83}
84 84
85void __devinit 85void pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup,
86pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup, 86 unsigned count, u16 reg)
87 unsigned count, u16 reg)
88{ 87{
89 int i, j; 88 int i, j;
90 89
@@ -93,7 +92,7 @@ pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup,
93 gpio_pingroup[i].muxregs[j].reg = reg; 92 gpio_pingroup[i].muxregs[j].reg = reg;
94} 93}
95 94
96void __devinit pmx_init_addr(struct spear_pinctrl_machdata *machdata, u16 reg) 95void pmx_init_addr(struct spear_pinctrl_machdata *machdata, u16 reg)
97{ 96{
98 struct spear_pingroup *pgroup; 97 struct spear_pingroup *pgroup;
99 struct spear_modemux *modemux; 98 struct spear_modemux *modemux;
@@ -358,8 +357,8 @@ static struct pinctrl_desc spear_pinctrl_desc = {
358 .owner = THIS_MODULE, 357 .owner = THIS_MODULE,
359}; 358};
360 359
361int __devinit spear_pinctrl_probe(struct platform_device *pdev, 360int spear_pinctrl_probe(struct platform_device *pdev,
362 struct spear_pinctrl_machdata *machdata) 361 struct spear_pinctrl_machdata *machdata)
363{ 362{
364 struct device_node *np = pdev->dev.of_node; 363 struct device_node *np = pdev->dev.of_node;
365 struct resource *res; 364 struct resource *res;
diff --git a/drivers/pinctrl/spear/pinctrl-spear.h b/drivers/pinctrl/spear/pinctrl-spear.h
index 1be46ecc6d91..dc8bf85ecb2a 100644
--- a/drivers/pinctrl/spear/pinctrl-spear.h
+++ b/drivers/pinctrl/spear/pinctrl-spear.h
@@ -192,12 +192,11 @@ static inline void pmx_writel(struct spear_pmx *pmx, u32 val, u32 reg)
192 writel_relaxed(val, pmx->vbase + reg); 192 writel_relaxed(val, pmx->vbase + reg);
193} 193}
194 194
195void __devinit pmx_init_addr(struct spear_pinctrl_machdata *machdata, u16 reg); 195void pmx_init_addr(struct spear_pinctrl_machdata *machdata, u16 reg);
196void __devinit 196void pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup,
197pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup, 197 unsigned count, u16 reg);
198 unsigned count, u16 reg); 198int spear_pinctrl_probe(struct platform_device *pdev,
199int __devinit spear_pinctrl_probe(struct platform_device *pdev, 199 struct spear_pinctrl_machdata *machdata);
200 struct spear_pinctrl_machdata *machdata);
201int spear_pinctrl_remove(struct platform_device *pdev); 200int spear_pinctrl_remove(struct platform_device *pdev);
202 201
203#define SPEAR_PIN_0_TO_101 \ 202#define SPEAR_PIN_0_TO_101 \
diff --git a/drivers/pinctrl/spear/pinctrl-spear1310.c b/drivers/pinctrl/spear/pinctrl-spear1310.c
index e40d785a3fc2..1a8bbfec60ca 100644
--- a/drivers/pinctrl/spear/pinctrl-spear1310.c
+++ b/drivers/pinctrl/spear/pinctrl-spear1310.c
@@ -2699,7 +2699,7 @@ static struct of_device_id spear1310_pinctrl_of_match[] = {
2699 {}, 2699 {},
2700}; 2700};
2701 2701
2702static int __devinit spear1310_pinctrl_probe(struct platform_device *pdev) 2702static int spear1310_pinctrl_probe(struct platform_device *pdev)
2703{ 2703{
2704 return spear_pinctrl_probe(pdev, &spear1310_machdata); 2704 return spear_pinctrl_probe(pdev, &spear1310_machdata);
2705} 2705}
diff --git a/drivers/pinctrl/spear/pinctrl-spear1340.c b/drivers/pinctrl/spear/pinctrl-spear1340.c
index 8deaaff3156c..873966e2b99f 100644
--- a/drivers/pinctrl/spear/pinctrl-spear1340.c
+++ b/drivers/pinctrl/spear/pinctrl-spear1340.c
@@ -2015,7 +2015,7 @@ static struct of_device_id spear1340_pinctrl_of_match[] = {
2015 {}, 2015 {},
2016}; 2016};
2017 2017
2018static int __devinit spear1340_pinctrl_probe(struct platform_device *pdev) 2018static int spear1340_pinctrl_probe(struct platform_device *pdev)
2019{ 2019{
2020 return spear_pinctrl_probe(pdev, &spear1340_machdata); 2020 return spear_pinctrl_probe(pdev, &spear1340_machdata);
2021} 2021}
diff --git a/drivers/pinctrl/spear/pinctrl-spear300.c b/drivers/pinctrl/spear/pinctrl-spear300.c
index f48e466e605a..4777c0d0e730 100644
--- a/drivers/pinctrl/spear/pinctrl-spear300.c
+++ b/drivers/pinctrl/spear/pinctrl-spear300.c
@@ -653,7 +653,7 @@ static struct of_device_id spear300_pinctrl_of_match[] = {
653 {}, 653 {},
654}; 654};
655 655
656static int __devinit spear300_pinctrl_probe(struct platform_device *pdev) 656static int spear300_pinctrl_probe(struct platform_device *pdev)
657{ 657{
658 int ret; 658 int ret;
659 659
diff --git a/drivers/pinctrl/spear/pinctrl-spear310.c b/drivers/pinctrl/spear/pinctrl-spear310.c
index 5b954c19a6d2..06c7e6f1c7f2 100644
--- a/drivers/pinctrl/spear/pinctrl-spear310.c
+++ b/drivers/pinctrl/spear/pinctrl-spear310.c
@@ -378,7 +378,7 @@ static struct of_device_id spear310_pinctrl_of_match[] = {
378 {}, 378 {},
379}; 379};
380 380
381static int __devinit spear310_pinctrl_probe(struct platform_device *pdev) 381static int spear310_pinctrl_probe(struct platform_device *pdev)
382{ 382{
383 int ret; 383 int ret;
384 384
diff --git a/drivers/pinctrl/spear/pinctrl-spear320.c b/drivers/pinctrl/spear/pinctrl-spear320.c
index e9a5e6d39242..b8e290a8c8c9 100644
--- a/drivers/pinctrl/spear/pinctrl-spear320.c
+++ b/drivers/pinctrl/spear/pinctrl-spear320.c
@@ -3417,7 +3417,7 @@ static struct of_device_id spear320_pinctrl_of_match[] = {
3417 {}, 3417 {},
3418}; 3418};
3419 3419
3420static int __devinit spear320_pinctrl_probe(struct platform_device *pdev) 3420static int spear320_pinctrl_probe(struct platform_device *pdev)
3421{ 3421{
3422 int ret; 3422 int ret;
3423 3423
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 934d861a3235..06f4eb7ab87e 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -335,7 +335,7 @@ static struct quirk_entry quirk_lenovo_ideapad_s205 = {
335}; 335};
336 336
337/* The Aspire One has a dummy ACPI-WMI interface - disable it */ 337/* The Aspire One has a dummy ACPI-WMI interface - disable it */
338static struct dmi_system_id __devinitdata acer_blacklist[] = { 338static struct dmi_system_id acer_blacklist[] = {
339 { 339 {
340 .ident = "Acer Aspire One (SSD)", 340 .ident = "Acer Aspire One (SSD)",
341 .matches = { 341 .matches = {
@@ -1330,7 +1330,7 @@ static struct led_classdev mail_led = {
1330 .brightness_set = mail_led_set, 1330 .brightness_set = mail_led_set,
1331}; 1331};
1332 1332
1333static int __devinit acer_led_init(struct device *dev) 1333static int acer_led_init(struct device *dev)
1334{ 1334{
1335 return led_classdev_register(dev, &mail_led); 1335 return led_classdev_register(dev, &mail_led);
1336} 1336}
@@ -1372,7 +1372,7 @@ static const struct backlight_ops acer_bl_ops = {
1372 .update_status = update_bl_status, 1372 .update_status = update_bl_status,
1373}; 1373};
1374 1374
1375static int __devinit acer_backlight_init(struct device *dev) 1375static int acer_backlight_init(struct device *dev)
1376{ 1376{
1377 struct backlight_properties props; 1377 struct backlight_properties props;
1378 struct backlight_device *bd; 1378 struct backlight_device *bd;
@@ -1961,7 +1961,7 @@ static u32 get_wmid_devices(void)
1961/* 1961/*
1962 * Platform device 1962 * Platform device
1963 */ 1963 */
1964static int __devinit acer_platform_probe(struct platform_device *device) 1964static int acer_platform_probe(struct platform_device *device)
1965{ 1965{
1966 int err; 1966 int err;
1967 1967
diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index c2e3e63d2c15..f94467c05225 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -515,7 +515,7 @@ static int acerhdf_suspend(struct device *dev)
515 return 0; 515 return 0;
516} 516}
517 517
518static int __devinit acerhdf_probe(struct platform_device *device) 518static int acerhdf_probe(struct platform_device *device)
519{ 519{
520 return 0; 520 return 0;
521} 521}
diff --git a/drivers/platform/x86/amilo-rfkill.c b/drivers/platform/x86/amilo-rfkill.c
index 1deca7f6c4ea..6296f078b7bc 100644
--- a/drivers/platform/x86/amilo-rfkill.c
+++ b/drivers/platform/x86/amilo-rfkill.c
@@ -74,7 +74,7 @@ static const struct rfkill_ops amilo_m7440_rfkill_ops = {
74 .set_block = amilo_m7440_rfkill_set_block 74 .set_block = amilo_m7440_rfkill_set_block
75}; 75};
76 76
77static const struct dmi_system_id __devinitconst amilo_rfkill_id_table[] = { 77static const struct dmi_system_id amilo_rfkill_id_table[] = {
78 { 78 {
79 .matches = { 79 .matches = {
80 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), 80 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
@@ -95,7 +95,7 @@ static const struct dmi_system_id __devinitconst amilo_rfkill_id_table[] = {
95static struct platform_device *amilo_rfkill_pdev; 95static struct platform_device *amilo_rfkill_pdev;
96static struct rfkill *amilo_rfkill_dev; 96static struct rfkill *amilo_rfkill_dev;
97 97
98static int __devinit amilo_rfkill_probe(struct platform_device *device) 98static int amilo_rfkill_probe(struct platform_device *device)
99{ 99{
100 int rc; 100 int rc;
101 const struct dmi_system_id *system_id = 101 const struct dmi_system_id *system_id =
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index db8f63841b42..f74bfcbb7bad 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -411,8 +411,7 @@ static int gmux_resume(struct pnp_dev *pnp)
411 return 0; 411 return 0;
412} 412}
413 413
414static int __devinit gmux_probe(struct pnp_dev *pnp, 414static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
415 const struct pnp_device_id *id)
416{ 415{
417 struct apple_gmux_data *gmux_data; 416 struct apple_gmux_data *gmux_data;
418 struct resource *res; 417 struct resource *res;
@@ -577,7 +576,7 @@ err_free:
577 return ret; 576 return ret;
578} 577}
579 578
580static void __devexit gmux_remove(struct pnp_dev *pnp) 579static void gmux_remove(struct pnp_dev *pnp)
581{ 580{
582 struct apple_gmux_data *gmux_data = pnp_get_drvdata(pnp); 581 struct apple_gmux_data *gmux_data = pnp_get_drvdata(pnp);
583 582
@@ -609,7 +608,7 @@ static const struct pnp_device_id gmux_device_ids[] = {
609static struct pnp_driver gmux_pnp_driver = { 608static struct pnp_driver gmux_pnp_driver = {
610 .name = "apple-gmux", 609 .name = "apple-gmux",
611 .probe = gmux_probe, 610 .probe = gmux_probe,
612 .remove = __devexit_p(gmux_remove), 611 .remove = gmux_remove,
613 .id_table = gmux_device_ids, 612 .id_table = gmux_device_ids,
614 .suspend = gmux_suspend, 613 .suspend = gmux_suspend,
615 .resume = gmux_resume 614 .resume = gmux_resume
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 4b568df56643..ec1d3bc2dbe2 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -1763,7 +1763,7 @@ static int asus_laptop_get_info(struct asus_laptop *asus)
1763 return AE_OK; 1763 return AE_OK;
1764} 1764}
1765 1765
1766static int __devinit asus_acpi_init(struct asus_laptop *asus) 1766static int asus_acpi_init(struct asus_laptop *asus)
1767{ 1767{
1768 int result = 0; 1768 int result = 0;
1769 1769
@@ -1823,7 +1823,7 @@ static int __devinit asus_acpi_init(struct asus_laptop *asus)
1823 return result; 1823 return result;
1824} 1824}
1825 1825
1826static void __devinit asus_dmi_check(void) 1826static void asus_dmi_check(void)
1827{ 1827{
1828 const char *model; 1828 const char *model;
1829 1829
@@ -1839,7 +1839,7 @@ static void __devinit asus_dmi_check(void)
1839 1839
1840static bool asus_device_present; 1840static bool asus_device_present;
1841 1841
1842static int __devinit asus_acpi_add(struct acpi_device *device) 1842static int asus_acpi_add(struct acpi_device *device)
1843{ 1843{
1844 struct asus_laptop *asus; 1844 struct asus_laptop *asus;
1845 int result; 1845 int result;
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index 1887e2f166a4..475cc5242511 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -713,15 +713,15 @@ static struct attribute_group compal_attribute_group = {
713 .attrs = compal_attributes 713 .attrs = compal_attributes
714}; 714};
715 715
716static int __devinit compal_probe(struct platform_device *); 716static int compal_probe(struct platform_device *);
717static int __devexit compal_remove(struct platform_device *); 717static int compal_remove(struct platform_device *);
718static struct platform_driver compal_driver = { 718static struct platform_driver compal_driver = {
719 .driver = { 719 .driver = {
720 .name = DRIVER_NAME, 720 .name = DRIVER_NAME,
721 .owner = THIS_MODULE, 721 .owner = THIS_MODULE,
722 }, 722 },
723 .probe = compal_probe, 723 .probe = compal_probe,
724 .remove = __devexit_p(compal_remove) 724 .remove = compal_remove,
725}; 725};
726 726
727static enum power_supply_property compal_bat_properties[] = { 727static enum power_supply_property compal_bat_properties[] = {
@@ -1015,7 +1015,7 @@ err_backlight:
1015 return ret; 1015 return ret;
1016} 1016}
1017 1017
1018static int __devinit compal_probe(struct platform_device *pdev) 1018static int compal_probe(struct platform_device *pdev)
1019{ 1019{
1020 int err; 1020 int err;
1021 struct compal_data *data; 1021 struct compal_data *data;
@@ -1067,7 +1067,7 @@ static void __exit compal_cleanup(void)
1067 pr_info("Driver unloaded\n"); 1067 pr_info("Driver unloaded\n");
1068} 1068}
1069 1069
1070static int __devexit compal_remove(struct platform_device *pdev) 1070static int compal_remove(struct platform_device *pdev)
1071{ 1071{
1072 struct compal_data *data; 1072 struct compal_data *data;
1073 1073
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 927c33af67ec..fa3ee6209572 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -115,7 +115,7 @@ static const struct dmi_system_id dell_device_table[] __initconst = {
115}; 115};
116MODULE_DEVICE_TABLE(dmi, dell_device_table); 116MODULE_DEVICE_TABLE(dmi, dell_device_table);
117 117
118static struct dmi_system_id __devinitdata dell_quirks[] = { 118static struct dmi_system_id dell_quirks[] = {
119 { 119 {
120 .callback = dmi_matched, 120 .callback = dmi_matched,
121 .ident = "Dell Vostro V130", 121 .ident = "Dell Vostro V130",
@@ -503,7 +503,7 @@ static struct led_classdev touchpad_led = {
503 .flags = LED_CORE_SUSPENDRESUME, 503 .flags = LED_CORE_SUSPENDRESUME,
504}; 504};
505 505
506static int __devinit touchpad_led_init(struct device *dev) 506static int touchpad_led_init(struct device *dev)
507{ 507{
508 return led_classdev_register(dev, &touchpad_led); 508 return led_classdev_register(dev, &touchpad_led);
509} 509}
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 5ca264179f4e..528e9495458d 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -1375,7 +1375,7 @@ static void cmsg_quirks(struct eeepc_laptop *eeepc)
1375 cmsg_quirk(eeepc, CM_ASL_TPD, "TPD"); 1375 cmsg_quirk(eeepc, CM_ASL_TPD, "TPD");
1376} 1376}
1377 1377
1378static int __devinit eeepc_acpi_init(struct eeepc_laptop *eeepc) 1378static int eeepc_acpi_init(struct eeepc_laptop *eeepc)
1379{ 1379{
1380 unsigned int init_flags; 1380 unsigned int init_flags;
1381 int result; 1381 int result;
@@ -1407,7 +1407,7 @@ static int __devinit eeepc_acpi_init(struct eeepc_laptop *eeepc)
1407 return 0; 1407 return 0;
1408} 1408}
1409 1409
1410static void __devinit eeepc_enable_camera(struct eeepc_laptop *eeepc) 1410static void eeepc_enable_camera(struct eeepc_laptop *eeepc)
1411{ 1411{
1412 /* 1412 /*
1413 * If the following call to set_acpi() fails, it's because there's no 1413 * If the following call to set_acpi() fails, it's because there's no
@@ -1419,7 +1419,7 @@ static void __devinit eeepc_enable_camera(struct eeepc_laptop *eeepc)
1419 1419
1420static bool eeepc_device_present; 1420static bool eeepc_device_present;
1421 1421
1422static int __devinit eeepc_acpi_add(struct acpi_device *device) 1422static int eeepc_acpi_add(struct acpi_device *device)
1423{ 1423{
1424 struct eeepc_laptop *eeepc; 1424 struct eeepc_laptop *eeepc;
1425 int result; 1425 int result;
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c
index f77484528b1b..174ca01c4aa7 100644
--- a/drivers/platform/x86/fujitsu-tablet.c
+++ b/drivers/platform/x86/fujitsu-tablet.c
@@ -192,8 +192,8 @@ static void fujitsu_reset(void)
192 fujitsu_send_state(); 192 fujitsu_send_state();
193} 193}
194 194
195static int __devinit input_fujitsu_setup(struct device *parent, 195static int input_fujitsu_setup(struct device *parent, const char *name,
196 const char *name, const char *phys) 196 const char *phys)
197{ 197{
198 struct input_dev *idev; 198 struct input_dev *idev;
199 int error; 199 int error;
@@ -277,21 +277,21 @@ static irqreturn_t fujitsu_interrupt(int irq, void *dev_id)
277 return IRQ_HANDLED; 277 return IRQ_HANDLED;
278} 278}
279 279
280static void __devinit fujitsu_dmi_common(const struct dmi_system_id *dmi) 280static void fujitsu_dmi_common(const struct dmi_system_id *dmi)
281{ 281{
282 pr_info("%s\n", dmi->ident); 282 pr_info("%s\n", dmi->ident);
283 memcpy(fujitsu.config.keymap, dmi->driver_data, 283 memcpy(fujitsu.config.keymap, dmi->driver_data,
284 sizeof(fujitsu.config.keymap)); 284 sizeof(fujitsu.config.keymap));
285} 285}
286 286
287static int __devinit fujitsu_dmi_lifebook(const struct dmi_system_id *dmi) 287static int fujitsu_dmi_lifebook(const struct dmi_system_id *dmi)
288{ 288{
289 fujitsu_dmi_common(dmi); 289 fujitsu_dmi_common(dmi);
290 fujitsu.config.quirks |= INVERT_TABLET_MODE_BIT; 290 fujitsu.config.quirks |= INVERT_TABLET_MODE_BIT;
291 return 1; 291 return 1;
292} 292}
293 293
294static int __devinit fujitsu_dmi_stylistic(const struct dmi_system_id *dmi) 294static int fujitsu_dmi_stylistic(const struct dmi_system_id *dmi)
295{ 295{
296 fujitsu_dmi_common(dmi); 296 fujitsu_dmi_common(dmi);
297 fujitsu.config.quirks |= FORCE_TABLET_MODE_IF_UNDOCK; 297 fujitsu.config.quirks |= FORCE_TABLET_MODE_IF_UNDOCK;
@@ -366,8 +366,7 @@ static const struct dmi_system_id dmi_ids[] __initconst = {
366 { NULL } 366 { NULL }
367}; 367};
368 368
369static acpi_status __devinit 369static acpi_status fujitsu_walk_resources(struct acpi_resource *res, void *data)
370fujitsu_walk_resources(struct acpi_resource *res, void *data)
371{ 370{
372 switch (res->type) { 371 switch (res->type) {
373 case ACPI_RESOURCE_TYPE_IRQ: 372 case ACPI_RESOURCE_TYPE_IRQ:
@@ -390,7 +389,7 @@ fujitsu_walk_resources(struct acpi_resource *res, void *data)
390 } 389 }
391} 390}
392 391
393static int __devinit acpi_fujitsu_add(struct acpi_device *adev) 392static int acpi_fujitsu_add(struct acpi_device *adev)
394{ 393{
395 acpi_status status; 394 acpi_status status;
396 int error; 395 int error;
@@ -432,7 +431,7 @@ static int __devinit acpi_fujitsu_add(struct acpi_device *adev)
432 return 0; 431 return 0;
433} 432}
434 433
435static int __devexit acpi_fujitsu_remove(struct acpi_device *adev, int type) 434static int acpi_fujitsu_remove(struct acpi_device *adev, int type)
436{ 435{
437 free_irq(fujitsu.irq, fujitsu_interrupt); 436 free_irq(fujitsu.irq, fujitsu_interrupt);
438 release_region(fujitsu.io_base, fujitsu.io_length); 437 release_region(fujitsu.io_base, fujitsu.io_length);
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 387183a2d6dd..1dde7accf27c 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -72,7 +72,7 @@ enum hp_wmi_event_ids {
72 HPWMI_LOCK_SWITCH = 7, 72 HPWMI_LOCK_SWITCH = 7,
73}; 73};
74 74
75static int __devinit hp_wmi_bios_setup(struct platform_device *device); 75static int hp_wmi_bios_setup(struct platform_device *device);
76static int __exit hp_wmi_bios_remove(struct platform_device *device); 76static int __exit hp_wmi_bios_remove(struct platform_device *device);
77static int hp_wmi_resume_handler(struct device *device); 77static int hp_wmi_resume_handler(struct device *device);
78 78
@@ -619,7 +619,7 @@ static void cleanup_sysfs(struct platform_device *device)
619 device_remove_file(&device->dev, &dev_attr_tablet); 619 device_remove_file(&device->dev, &dev_attr_tablet);
620} 620}
621 621
622static int __devinit hp_wmi_rfkill_setup(struct platform_device *device) 622static int hp_wmi_rfkill_setup(struct platform_device *device)
623{ 623{
624 int err; 624 int err;
625 int wireless = 0; 625 int wireless = 0;
@@ -698,7 +698,7 @@ register_wifi_error:
698 return err; 698 return err;
699} 699}
700 700
701static int __devinit hp_wmi_rfkill2_setup(struct platform_device *device) 701static int hp_wmi_rfkill2_setup(struct platform_device *device)
702{ 702{
703 int err, i; 703 int err, i;
704 struct bios_rfkill2_state state; 704 struct bios_rfkill2_state state;
@@ -778,7 +778,7 @@ fail:
778 return err; 778 return err;
779} 779}
780 780
781static int __devinit hp_wmi_bios_setup(struct platform_device *device) 781static int hp_wmi_bios_setup(struct platform_device *device)
782{ 782{
783 int err; 783 int err;
784 784
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 5ff4f2e314d2..64bfb30a52e9 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -298,7 +298,7 @@ static const struct file_operations debugfs_cfg_fops = {
298 .release = single_release, 298 .release = single_release,
299}; 299};
300 300
301static int __devinit ideapad_debugfs_init(struct ideapad_private *priv) 301static int ideapad_debugfs_init(struct ideapad_private *priv)
302{ 302{
303 struct dentry *node; 303 struct dentry *node;
304 304
@@ -468,8 +468,7 @@ static void ideapad_sync_rfk_state(struct ideapad_private *priv)
468 rfkill_set_hw_state(priv->rfk[i], hw_blocked); 468 rfkill_set_hw_state(priv->rfk[i], hw_blocked);
469} 469}
470 470
471static int __devinit ideapad_register_rfkill(struct acpi_device *adevice, 471static int ideapad_register_rfkill(struct acpi_device *adevice, int dev)
472 int dev)
473{ 472{
474 struct ideapad_private *priv = dev_get_drvdata(&adevice->dev); 473 struct ideapad_private *priv = dev_get_drvdata(&adevice->dev);
475 int ret; 474 int ret;
@@ -519,7 +518,7 @@ static void ideapad_unregister_rfkill(struct acpi_device *adevice, int dev)
519/* 518/*
520 * Platform device 519 * Platform device
521 */ 520 */
522static int __devinit ideapad_platform_init(struct ideapad_private *priv) 521static int ideapad_platform_init(struct ideapad_private *priv)
523{ 522{
524 int result; 523 int result;
525 524
@@ -569,7 +568,7 @@ static const struct key_entry ideapad_keymap[] = {
569 { KE_END, 0 }, 568 { KE_END, 0 },
570}; 569};
571 570
572static int __devinit ideapad_input_init(struct ideapad_private *priv) 571static int ideapad_input_init(struct ideapad_private *priv)
573{ 572{
574 struct input_dev *inputdev; 573 struct input_dev *inputdev;
575 int error; 574 int error;
@@ -776,7 +775,7 @@ static void ideapad_sync_touchpad_state(struct acpi_device *adevice)
776 } 775 }
777} 776}
778 777
779static int __devinit ideapad_acpi_add(struct acpi_device *adevice) 778static int ideapad_acpi_add(struct acpi_device *adevice)
780{ 779{
781 int ret, i; 780 int ret, i;
782 int cfg; 781 int cfg;
@@ -835,7 +834,7 @@ platform_failed:
835 return ret; 834 return ret;
836} 835}
837 836
838static int __devexit ideapad_acpi_remove(struct acpi_device *adevice, int type) 837static int ideapad_acpi_remove(struct acpi_device *adevice, int type)
839{ 838{
840 struct ideapad_private *priv = dev_get_drvdata(&adevice->dev); 839 struct ideapad_private *priv = dev_get_drvdata(&adevice->dev);
841 int i; 840 int i;
diff --git a/drivers/platform/x86/intel_mid_powerbtn.c b/drivers/platform/x86/intel_mid_powerbtn.c
index bcbad8452a6f..f59683aa13d5 100644
--- a/drivers/platform/x86/intel_mid_powerbtn.c
+++ b/drivers/platform/x86/intel_mid_powerbtn.c
@@ -56,7 +56,7 @@ static irqreturn_t mfld_pb_isr(int irq, void *dev_id)
56 return IRQ_HANDLED; 56 return IRQ_HANDLED;
57} 57}
58 58
59static int __devinit mfld_pb_probe(struct platform_device *pdev) 59static int mfld_pb_probe(struct platform_device *pdev)
60{ 60{
61 struct input_dev *input; 61 struct input_dev *input;
62 int irq = platform_get_irq(pdev, 0); 62 int irq = platform_get_irq(pdev, 0);
@@ -121,7 +121,7 @@ err_free_input:
121 return error; 121 return error;
122} 122}
123 123
124static int __devexit mfld_pb_remove(struct platform_device *pdev) 124static int mfld_pb_remove(struct platform_device *pdev)
125{ 125{
126 struct input_dev *input = platform_get_drvdata(pdev); 126 struct input_dev *input = platform_get_drvdata(pdev);
127 int irq = platform_get_irq(pdev, 0); 127 int irq = platform_get_irq(pdev, 0);
@@ -139,7 +139,7 @@ static struct platform_driver mfld_pb_driver = {
139 .owner = THIS_MODULE, 139 .owner = THIS_MODULE,
140 }, 140 },
141 .probe = mfld_pb_probe, 141 .probe = mfld_pb_probe,
142 .remove = __devexit_p(mfld_pb_remove), 142 .remove = mfld_pb_remove,
143}; 143};
144 144
145module_platform_driver(mfld_pb_driver); 145module_platform_driver(mfld_pb_driver);
diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c
index 93de09019d1d..81c491e74b34 100644
--- a/drivers/platform/x86/intel_mid_thermal.c
+++ b/drivers/platform/x86/intel_mid_thermal.c
@@ -563,7 +563,7 @@ static struct platform_driver mid_thermal_driver = {
563 .pm = &mid_thermal_pm, 563 .pm = &mid_thermal_pm,
564 }, 564 },
565 .probe = mid_thermal_probe, 565 .probe = mid_thermal_probe,
566 .remove = __devexit_p(mid_thermal_remove), 566 .remove = mid_thermal_remove,
567 .id_table = therm_id_table, 567 .id_table = therm_id_table,
568}; 568};
569 569
diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel_oaktrail.c
index 79a0c2f6be53..f6f18cde0f11 100644
--- a/drivers/platform/x86/intel_oaktrail.c
+++ b/drivers/platform/x86/intel_oaktrail.c
@@ -278,12 +278,12 @@ static void oaktrail_backlight_exit(void)
278 backlight_device_unregister(oaktrail_bl_device); 278 backlight_device_unregister(oaktrail_bl_device);
279} 279}
280 280
281static int __devinit oaktrail_probe(struct platform_device *pdev) 281static int oaktrail_probe(struct platform_device *pdev)
282{ 282{
283 return 0; 283 return 0;
284} 284}
285 285
286static int __devexit oaktrail_remove(struct platform_device *pdev) 286static int oaktrail_remove(struct platform_device *pdev)
287{ 287{
288 return 0; 288 return 0;
289} 289}
@@ -294,7 +294,7 @@ static struct platform_driver oaktrail_driver = {
294 .owner = THIS_MODULE, 294 .owner = THIS_MODULE,
295 }, 295 },
296 .probe = oaktrail_probe, 296 .probe = oaktrail_probe,
297 .remove = __devexit_p(oaktrail_remove) 297 .remove = oaktrail_remove,
298}; 298};
299 299
300static int dmi_check_cb(const struct dmi_system_id *id) 300static int dmi_check_cb(const struct dmi_system_id *id)
diff --git a/drivers/platform/x86/intel_pmic_gpio.c b/drivers/platform/x86/intel_pmic_gpio.c
index 1686c1e07d5d..6f4b7289a059 100644
--- a/drivers/platform/x86/intel_pmic_gpio.c
+++ b/drivers/platform/x86/intel_pmic_gpio.c
@@ -230,7 +230,7 @@ static irqreturn_t pmic_irq_handler(int irq, void *data)
230 return ret; 230 return ret;
231} 231}
232 232
233static int __devinit platform_pmic_gpio_probe(struct platform_device *pdev) 233static int platform_pmic_gpio_probe(struct platform_device *pdev)
234{ 234{
235 struct device *dev = &pdev->dev; 235 struct device *dev = &pdev->dev;
236 int irq = platform_get_irq(pdev, 0); 236 int irq = platform_get_irq(pdev, 0);
diff --git a/drivers/platform/x86/samsung-q10.c b/drivers/platform/x86/samsung-q10.c
index 1e54ae74274c..5f770059fd4d 100644
--- a/drivers/platform/x86/samsung-q10.c
+++ b/drivers/platform/x86/samsung-q10.c
@@ -77,7 +77,7 @@ static int samsungq10_resume(struct device *dev)
77static SIMPLE_DEV_PM_OPS(samsungq10_pm_ops, 77static SIMPLE_DEV_PM_OPS(samsungq10_pm_ops,
78 samsungq10_suspend, samsungq10_resume); 78 samsungq10_suspend, samsungq10_resume);
79 79
80static int __devinit samsungq10_probe(struct platform_device *pdev) 80static int samsungq10_probe(struct platform_device *pdev)
81{ 81{
82 82
83 struct backlight_properties props; 83 struct backlight_properties props;
@@ -99,7 +99,7 @@ static int __devinit samsungq10_probe(struct platform_device *pdev)
99 return 0; 99 return 0;
100} 100}
101 101
102static int __devexit samsungq10_remove(struct platform_device *pdev) 102static int samsungq10_remove(struct platform_device *pdev)
103{ 103{
104 104
105 struct backlight_device *bd = platform_get_drvdata(pdev); 105 struct backlight_device *bd = platform_get_drvdata(pdev);
@@ -119,7 +119,7 @@ static struct platform_driver samsungq10_driver = {
119 .pm = &samsungq10_pm_ops, 119 .pm = &samsungq10_pm_ops,
120 }, 120 },
121 .probe = samsungq10_probe, 121 .probe = samsungq10_probe,
122 .remove = __devexit_p(samsungq10_remove), 122 .remove = samsungq10_remove,
123}; 123};
124 124
125static struct platform_device *samsungq10_device; 125static struct platform_device *samsungq10_device;
diff --git a/drivers/platform/x86/tc1100-wmi.c b/drivers/platform/x86/tc1100-wmi.c
index e24f5ae475af..9b93fdb61ed7 100644
--- a/drivers/platform/x86/tc1100-wmi.c
+++ b/drivers/platform/x86/tc1100-wmi.c
@@ -187,7 +187,7 @@ static int __init tc1100_probe(struct platform_device *device)
187} 187}
188 188
189 189
190static int __devexit tc1100_remove(struct platform_device *device) 190static int tc1100_remove(struct platform_device *device)
191{ 191{
192 sysfs_remove_group(&device->dev.kobj, &tc1100_attribute_group); 192 sysfs_remove_group(&device->dev.kobj, &tc1100_attribute_group);
193 193
@@ -241,7 +241,7 @@ static struct platform_driver tc1100_driver = {
241 .pm = &tc1100_pm_ops, 241 .pm = &tc1100_pm_ops,
242#endif 242#endif
243 }, 243 },
244 .remove = __devexit_p(tc1100_remove), 244 .remove = tc1100_remove,
245}; 245};
246 246
247static int __init tc1100_init(void) 247static int __init tc1100_init(void)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 75dd651664ae..f946ca7cb762 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6732,7 +6732,7 @@ static int volume_alsa_mute_put(struct snd_kcontrol *kcontrol,
6732 return volume_alsa_set_mute(!ucontrol->value.integer.value[0]); 6732 return volume_alsa_set_mute(!ucontrol->value.integer.value[0]);
6733} 6733}
6734 6734
6735static struct snd_kcontrol_new volume_alsa_control_vol __devinitdata = { 6735static struct snd_kcontrol_new volume_alsa_control_vol = {
6736 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 6736 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
6737 .name = "Console Playback Volume", 6737 .name = "Console Playback Volume",
6738 .index = 0, 6738 .index = 0,
@@ -6741,7 +6741,7 @@ static struct snd_kcontrol_new volume_alsa_control_vol __devinitdata = {
6741 .get = volume_alsa_vol_get, 6741 .get = volume_alsa_vol_get,
6742}; 6742};
6743 6743
6744static struct snd_kcontrol_new volume_alsa_control_mute __devinitdata = { 6744static struct snd_kcontrol_new volume_alsa_control_mute = {
6745 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 6745 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
6746 .name = "Console Playback Switch", 6746 .name = "Console Playback Switch",
6747 .index = 0, 6747 .index = 0,
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 5f1256d5e933..c2727895794c 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -150,7 +150,7 @@ static const struct acpi_device_id toshiba_device_ids[] = {
150}; 150};
151MODULE_DEVICE_TABLE(acpi, toshiba_device_ids); 151MODULE_DEVICE_TABLE(acpi, toshiba_device_ids);
152 152
153static const struct key_entry toshiba_acpi_keymap[] __devinitconst = { 153static const struct key_entry toshiba_acpi_keymap[] = {
154 { KE_KEY, 0x101, { KEY_MUTE } }, 154 { KE_KEY, 0x101, { KEY_MUTE } },
155 { KE_KEY, 0x102, { KEY_ZOOMOUT } }, 155 { KE_KEY, 0x102, { KEY_ZOOMOUT } },
156 { KE_KEY, 0x103, { KEY_ZOOMIN } }, 156 { KE_KEY, 0x103, { KEY_ZOOMIN } },
@@ -875,8 +875,7 @@ static const struct file_operations version_proc_fops = {
875 875
876#define PROC_TOSHIBA "toshiba" 876#define PROC_TOSHIBA "toshiba"
877 877
878static void __devinit 878static void create_toshiba_proc_entries(struct toshiba_acpi_dev *dev)
879create_toshiba_proc_entries(struct toshiba_acpi_dev *dev)
880{ 879{
881 if (dev->backlight_dev) 880 if (dev->backlight_dev)
882 proc_create_data("lcd", S_IRUGO | S_IWUSR, toshiba_proc_dir, 881 proc_create_data("lcd", S_IRUGO | S_IWUSR, toshiba_proc_dir,
@@ -979,7 +978,7 @@ static void toshiba_acpi_report_hotkey(struct toshiba_acpi_dev *dev,
979 pr_info("Unknown key %x\n", scancode); 978 pr_info("Unknown key %x\n", scancode);
980} 979}
981 980
982static int __devinit toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev) 981static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
983{ 982{
984 acpi_status status; 983 acpi_status status;
985 acpi_handle ec_handle, handle; 984 acpi_handle ec_handle, handle;
@@ -1069,7 +1068,7 @@ static int __devinit toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
1069 return error; 1068 return error;
1070} 1069}
1071 1070
1072static int __devinit toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev) 1071static int toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev)
1073{ 1072{
1074 struct backlight_properties props; 1073 struct backlight_properties props;
1075 int brightness; 1074 int brightness;
@@ -1154,7 +1153,7 @@ static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type)
1154 return 0; 1153 return 0;
1155} 1154}
1156 1155
1157static const char * __devinit find_hci_method(acpi_handle handle) 1156static const char *find_hci_method(acpi_handle handle)
1158{ 1157{
1159 acpi_status status; 1158 acpi_status status;
1160 acpi_handle hci_handle; 1159 acpi_handle hci_handle;
@@ -1170,7 +1169,7 @@ static const char * __devinit find_hci_method(acpi_handle handle)
1170 return NULL; 1169 return NULL;
1171} 1170}
1172 1171
1173static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev) 1172static int toshiba_acpi_add(struct acpi_device *acpi_dev)
1174{ 1173{
1175 struct toshiba_acpi_dev *dev; 1174 struct toshiba_acpi_dev *dev;
1176 const char *hci_method; 1175 const char *hci_method;
diff --git a/drivers/platform/x86/xo1-rfkill.c b/drivers/platform/x86/xo1-rfkill.c
index 1da13ed34b04..4bd17248dfc6 100644
--- a/drivers/platform/x86/xo1-rfkill.c
+++ b/drivers/platform/x86/xo1-rfkill.c
@@ -40,7 +40,7 @@ static const struct rfkill_ops rfkill_ops = {
40 .set_block = rfkill_set_block, 40 .set_block = rfkill_set_block,
41}; 41};
42 42
43static int __devinit xo1_rfkill_probe(struct platform_device *pdev) 43static int xo1_rfkill_probe(struct platform_device *pdev)
44{ 44{
45 struct rfkill *rfk; 45 struct rfkill *rfk;
46 int r; 46 int r;
@@ -60,7 +60,7 @@ static int __devinit xo1_rfkill_probe(struct platform_device *pdev)
60 return 0; 60 return 0;
61} 61}
62 62
63static int __devexit xo1_rfkill_remove(struct platform_device *pdev) 63static int xo1_rfkill_remove(struct platform_device *pdev)
64{ 64{
65 struct rfkill *rfk = platform_get_drvdata(pdev); 65 struct rfkill *rfk = platform_get_drvdata(pdev);
66 rfkill_unregister(rfk); 66 rfkill_unregister(rfk);
@@ -74,7 +74,7 @@ static struct platform_driver xo1_rfkill_driver = {
74 .owner = THIS_MODULE, 74 .owner = THIS_MODULE,
75 }, 75 },
76 .probe = xo1_rfkill_probe, 76 .probe = xo1_rfkill_probe,
77 .remove = __devexit_p(xo1_rfkill_remove), 77 .remove = xo1_rfkill_remove,
78}; 78};
79 79
80module_platform_driver(xo1_rfkill_driver); 80module_platform_driver(xo1_rfkill_driver);
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c
index cfaf5b73540b..0c201317284b 100644
--- a/drivers/pnp/interface.c
+++ b/drivers/pnp/interface.c
@@ -298,6 +298,39 @@ static ssize_t pnp_show_current_resources(struct device *dmdev,
298 return ret; 298 return ret;
299} 299}
300 300
301static char *pnp_get_resource_value(char *buf,
302 unsigned long type,
303 resource_size_t *start,
304 resource_size_t *end,
305 unsigned long *flags)
306{
307 if (start)
308 *start = 0;
309 if (end)
310 *end = 0;
311 if (flags)
312 *flags = 0;
313
314 /* TBD: allow for disabled resources */
315
316 buf = skip_spaces(buf);
317 if (start) {
318 *start = simple_strtoull(buf, &buf, 0);
319 if (end) {
320 buf = skip_spaces(buf);
321 if (*buf == '-') {
322 buf = skip_spaces(buf + 1);
323 *end = simple_strtoull(buf, &buf, 0);
324 } else
325 *end = *start;
326 }
327 }
328
329 /* TBD: allow for additional flags, e.g., IORESOURCE_WINDOW */
330
331 return buf;
332}
333
301static ssize_t pnp_set_current_resources(struct device *dmdev, 334static ssize_t pnp_set_current_resources(struct device *dmdev,
302 struct device_attribute *attr, 335 struct device_attribute *attr,
303 const char *ubuf, size_t count) 336 const char *ubuf, size_t count)
@@ -305,7 +338,6 @@ static ssize_t pnp_set_current_resources(struct device *dmdev,
305 struct pnp_dev *dev = to_pnp_dev(dmdev); 338 struct pnp_dev *dev = to_pnp_dev(dmdev);
306 char *buf = (void *)ubuf; 339 char *buf = (void *)ubuf;
307 int retval = 0; 340 int retval = 0;
308 resource_size_t start, end;
309 341
310 if (dev->status & PNP_ATTACHED) { 342 if (dev->status & PNP_ATTACHED) {
311 retval = -EBUSY; 343 retval = -EBUSY;
@@ -349,6 +381,10 @@ static ssize_t pnp_set_current_resources(struct device *dmdev,
349 goto done; 381 goto done;
350 } 382 }
351 if (!strnicmp(buf, "set", 3)) { 383 if (!strnicmp(buf, "set", 3)) {
384 resource_size_t start;
385 resource_size_t end;
386 unsigned long flags;
387
352 if (dev->active) 388 if (dev->active)
353 goto done; 389 goto done;
354 buf += 3; 390 buf += 3;
@@ -357,42 +393,37 @@ static ssize_t pnp_set_current_resources(struct device *dmdev,
357 while (1) { 393 while (1) {
358 buf = skip_spaces(buf); 394 buf = skip_spaces(buf);
359 if (!strnicmp(buf, "io", 2)) { 395 if (!strnicmp(buf, "io", 2)) {
360 buf = skip_spaces(buf + 2); 396 buf = pnp_get_resource_value(buf + 2,
361 start = simple_strtoul(buf, &buf, 0); 397 IORESOURCE_IO,
362 buf = skip_spaces(buf); 398 &start, &end,
363 if (*buf == '-') { 399 &flags);
364 buf = skip_spaces(buf + 1); 400 pnp_add_io_resource(dev, start, end, flags);
365 end = simple_strtoul(buf, &buf, 0); 401 } else if (!strnicmp(buf, "mem", 3)) {
366 } else 402 buf = pnp_get_resource_value(buf + 3,
367 end = start; 403 IORESOURCE_MEM,
368 pnp_add_io_resource(dev, start, end, 0); 404 &start, &end,
369 continue; 405 &flags);
370 } 406 pnp_add_mem_resource(dev, start, end, flags);
371 if (!strnicmp(buf, "mem", 3)) { 407 } else if (!strnicmp(buf, "irq", 3)) {
372 buf = skip_spaces(buf + 3); 408 buf = pnp_get_resource_value(buf + 3,
373 start = simple_strtoul(buf, &buf, 0); 409 IORESOURCE_IRQ,
374 buf = skip_spaces(buf); 410 &start, NULL,
375 if (*buf == '-') { 411 &flags);
376 buf = skip_spaces(buf + 1); 412 pnp_add_irq_resource(dev, start, flags);
377 end = simple_strtoul(buf, &buf, 0); 413 } else if (!strnicmp(buf, "dma", 3)) {
378 } else 414 buf = pnp_get_resource_value(buf + 3,
379 end = start; 415 IORESOURCE_DMA,
380 pnp_add_mem_resource(dev, start, end, 0); 416 &start, NULL,
381 continue; 417 &flags);
382 } 418 pnp_add_dma_resource(dev, start, flags);
383 if (!strnicmp(buf, "irq", 3)) { 419 } else if (!strnicmp(buf, "bus", 3)) {
384 buf = skip_spaces(buf + 3); 420 buf = pnp_get_resource_value(buf + 3,
385 start = simple_strtoul(buf, &buf, 0); 421 IORESOURCE_BUS,
386 pnp_add_irq_resource(dev, start, 0); 422 &start, &end,
387 continue; 423 NULL);
388 } 424 pnp_add_bus_resource(dev, start, end);
389 if (!strnicmp(buf, "dma", 3)) { 425 } else
390 buf = skip_spaces(buf + 3); 426 break;
391 start = simple_strtoul(buf, &buf, 0);
392 pnp_add_dma_resource(dev, start, 0);
393 continue;
394 }
395 break;
396 } 427 }
397 mutex_unlock(&pnp_res_mutex); 428 mutex_unlock(&pnp_res_mutex);
398 goto done; 429 goto done;
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index ed9ce507149a..95cebf0185de 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -18,11 +18,27 @@
18 18
19DEFINE_MUTEX(pnp_res_mutex); 19DEFINE_MUTEX(pnp_res_mutex);
20 20
21static struct resource *pnp_find_resource(struct pnp_dev *dev,
22 unsigned char rule,
23 unsigned long type,
24 unsigned int bar)
25{
26 struct resource *res = pnp_get_resource(dev, type, bar);
27
28 /* when the resource already exists, set its resource bits from rule */
29 if (res) {
30 res->flags &= ~IORESOURCE_BITS;
31 res->flags |= rule & IORESOURCE_BITS;
32 }
33
34 return res;
35}
36
21static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) 37static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
22{ 38{
23 struct resource *res, local_res; 39 struct resource *res, local_res;
24 40
25 res = pnp_get_resource(dev, IORESOURCE_IO, idx); 41 res = pnp_find_resource(dev, rule->flags, IORESOURCE_IO, idx);
26 if (res) { 42 if (res) {
27 pnp_dbg(&dev->dev, " io %d already set to %#llx-%#llx " 43 pnp_dbg(&dev->dev, " io %d already set to %#llx-%#llx "
28 "flags %#lx\n", idx, (unsigned long long) res->start, 44 "flags %#lx\n", idx, (unsigned long long) res->start,
@@ -65,7 +81,7 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
65{ 81{
66 struct resource *res, local_res; 82 struct resource *res, local_res;
67 83
68 res = pnp_get_resource(dev, IORESOURCE_MEM, idx); 84 res = pnp_find_resource(dev, rule->flags, IORESOURCE_MEM, idx);
69 if (res) { 85 if (res) {
70 pnp_dbg(&dev->dev, " mem %d already set to %#llx-%#llx " 86 pnp_dbg(&dev->dev, " mem %d already set to %#llx-%#llx "
71 "flags %#lx\n", idx, (unsigned long long) res->start, 87 "flags %#lx\n", idx, (unsigned long long) res->start,
@@ -78,6 +94,7 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
78 res->start = 0; 94 res->start = 0;
79 res->end = 0; 95 res->end = 0;
80 96
97 /* ??? rule->flags restricted to 8 bits, all tests bogus ??? */
81 if (!(rule->flags & IORESOURCE_MEM_WRITEABLE)) 98 if (!(rule->flags & IORESOURCE_MEM_WRITEABLE))
82 res->flags |= IORESOURCE_READONLY; 99 res->flags |= IORESOURCE_READONLY;
83 if (rule->flags & IORESOURCE_MEM_CACHEABLE) 100 if (rule->flags & IORESOURCE_MEM_CACHEABLE)
@@ -123,7 +140,7 @@ static int pnp_assign_irq(struct pnp_dev *dev, struct pnp_irq *rule, int idx)
123 5, 10, 11, 12, 9, 14, 15, 7, 3, 4, 13, 0, 1, 6, 8, 2 140 5, 10, 11, 12, 9, 14, 15, 7, 3, 4, 13, 0, 1, 6, 8, 2
124 }; 141 };
125 142
126 res = pnp_get_resource(dev, IORESOURCE_IRQ, idx); 143 res = pnp_find_resource(dev, rule->flags, IORESOURCE_IRQ, idx);
127 if (res) { 144 if (res) {
128 pnp_dbg(&dev->dev, " irq %d already set to %d flags %#lx\n", 145 pnp_dbg(&dev->dev, " irq %d already set to %d flags %#lx\n",
129 idx, (int) res->start, res->flags); 146 idx, (int) res->start, res->flags);
@@ -182,7 +199,7 @@ static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
182 1, 3, 5, 6, 7, 0, 2, 4 199 1, 3, 5, 6, 7, 0, 2, 4
183 }; 200 };
184 201
185 res = pnp_get_resource(dev, IORESOURCE_DMA, idx); 202 res = pnp_find_resource(dev, rule->flags, IORESOURCE_DMA, idx);
186 if (res) { 203 if (res) {
187 pnp_dbg(&dev->dev, " dma %d already set to %d flags %#lx\n", 204 pnp_dbg(&dev->dev, " dma %d already set to %d flags %#lx\n",
188 idx, (int) res->start, res->flags); 205 idx, (int) res->start, res->flags);
diff --git a/drivers/power/ab8500_bmdata.c b/drivers/power/ab8500_bmdata.c
index 03cc528425cb..f034ae43e045 100644
--- a/drivers/power/ab8500_bmdata.c
+++ b/drivers/power/ab8500_bmdata.c
@@ -452,10 +452,8 @@ struct abx500_bm_data ab8500_bm_data = {
452 .fg_params = &fg, 452 .fg_params = &fg,
453}; 453};
454 454
455int __devinit 455int bmdevs_of_probe(struct device *dev, struct device_node *np,
456bmdevs_of_probe(struct device *dev, 456 struct abx500_bm_data **battery)
457 struct device_node *np,
458 struct abx500_bm_data **battery)
459{ 457{
460 struct abx500_battery_type *btype; 458 struct abx500_battery_type *btype;
461 struct device_node *np_bat_supply; 459 struct device_node *np_bat_supply;
diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
index a17d08411723..6b2238bb6a81 100644
--- a/drivers/power/avs/smartreflex.c
+++ b/drivers/power/avs/smartreflex.c
@@ -27,8 +27,6 @@
27#include <linux/pm_runtime.h> 27#include <linux/pm_runtime.h>
28#include <linux/power/smartreflex.h> 28#include <linux/power/smartreflex.h>
29 29
30#include <plat/cpu.h>
31
32#define SMARTREFLEX_NAME_LEN 16 30#define SMARTREFLEX_NAME_LEN 16
33#define NVALUE_NAME_LEN 40 31#define NVALUE_NAME_LEN 40
34#define SR_DISABLE_TIMEOUT 200 32#define SR_DISABLE_TIMEOUT 200
diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c
index 298c47d111b4..1ec810ada5ed 100644
--- a/drivers/power/olpc_battery.c
+++ b/drivers/power/olpc_battery.c
@@ -668,7 +668,7 @@ static int olpc_battery_remove(struct platform_device *pdev)
668 return 0; 668 return 0;
669} 669}
670 670
671static const struct of_device_id olpc_battery_ids[] __devinitconst = { 671static const struct of_device_id olpc_battery_ids[] = {
672 { .compatible = "olpc,xo1-battery" }, 672 { .compatible = "olpc,xo1-battery" },
673 {} 673 {}
674}; 674};
diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c
index 0491e5335d02..e290d48ddd99 100644
--- a/drivers/power/reset/gpio-poweroff.c
+++ b/drivers/power/reset/gpio-poweroff.c
@@ -29,15 +29,16 @@ static int gpio_active_low;
29 29
30static void gpio_poweroff_do_poweroff(void) 30static void gpio_poweroff_do_poweroff(void)
31{ 31{
32 BUG_ON(gpio_num == -1); 32 BUG_ON(!gpio_is_valid(gpio_num));
33 33
34 /* drive it active */ 34 /* drive it active, also inactive->active edge */
35 gpio_direction_output(gpio_num, !gpio_active_low); 35 gpio_direction_output(gpio_num, !gpio_active_low);
36 mdelay(100); 36 mdelay(100);
37 /* rising edge or drive inactive */ 37 /* drive inactive, also active->inactive edge */
38 gpio_set_value(gpio_num, gpio_active_low); 38 gpio_set_value(gpio_num, gpio_active_low);
39 mdelay(100); 39 mdelay(100);
40 /* falling edge */ 40
41 /* drive it active, also inactive->active edge */
41 gpio_set_value(gpio_num, !gpio_active_low); 42 gpio_set_value(gpio_num, !gpio_active_low);
42 43
43 /* give it some time */ 44 /* give it some time */
@@ -46,7 +47,7 @@ static void gpio_poweroff_do_poweroff(void)
46 WARN_ON(1); 47 WARN_ON(1);
47} 48}
48 49
49static int __devinit gpio_poweroff_probe(struct platform_device *pdev) 50static int gpio_poweroff_probe(struct platform_device *pdev)
50{ 51{
51 enum of_gpio_flags flags; 52 enum of_gpio_flags flags;
52 bool input = false; 53 bool input = false;
@@ -60,15 +61,12 @@ static int __devinit gpio_poweroff_probe(struct platform_device *pdev)
60 } 61 }
61 62
62 gpio_num = of_get_gpio_flags(pdev->dev.of_node, 0, &flags); 63 gpio_num = of_get_gpio_flags(pdev->dev.of_node, 0, &flags);
63 if (gpio_num < 0) { 64 if (!gpio_is_valid(gpio_num))
64 pr_err("%s: Could not get GPIO configuration: %d", 65 return gpio_num;
65 __func__, gpio_num); 66
66 return -ENODEV;
67 }
68 gpio_active_low = flags & OF_GPIO_ACTIVE_LOW; 67 gpio_active_low = flags & OF_GPIO_ACTIVE_LOW;
69 68
70 if (of_get_property(pdev->dev.of_node, "input", NULL)) 69 input = of_property_read_bool(pdev->dev.of_node, "input");
71 input = true;
72 70
73 ret = gpio_request(gpio_num, "poweroff-gpio"); 71 ret = gpio_request(gpio_num, "poweroff-gpio");
74 if (ret) { 72 if (ret) {
@@ -96,10 +94,9 @@ err:
96 return -ENODEV; 94 return -ENODEV;
97} 95}
98 96
99static int __devexit gpio_poweroff_remove(struct platform_device *pdev) 97static int gpio_poweroff_remove(struct platform_device *pdev)
100{ 98{
101 if (gpio_num != -1) 99 gpio_free(gpio_num);
102 gpio_free(gpio_num);
103 if (pm_power_off == &gpio_poweroff_do_poweroff) 100 if (pm_power_off == &gpio_poweroff_do_poweroff)
104 pm_power_off = NULL; 101 pm_power_off = NULL;
105 102
@@ -113,17 +110,17 @@ static const struct of_device_id of_gpio_poweroff_match[] = {
113 110
114static struct platform_driver gpio_poweroff_driver = { 111static struct platform_driver gpio_poweroff_driver = {
115 .probe = gpio_poweroff_probe, 112 .probe = gpio_poweroff_probe,
116 .remove = __devexit_p(gpio_poweroff_remove), 113 .remove = gpio_poweroff_remove,
117 .driver = { 114 .driver = {
118 .name = "poweroff-gpio", 115 .name = "poweroff-gpio",
119 .owner = THIS_MODULE, 116 .owner = THIS_MODULE,
120 .of_match_table = of_gpio_poweroff_match, 117 .of_match_table = of_gpio_poweroff_match,
121 }, 118 },
122}; 119};
123 120
124module_platform_driver(gpio_poweroff_driver); 121module_platform_driver(gpio_poweroff_driver);
125 122
126MODULE_AUTHOR("Jamie Lentin <jm@lentin.co.uk>"); 123MODULE_AUTHOR("Jamie Lentin <jm@lentin.co.uk>");
127MODULE_DESCRIPTION("GPIO poweroff driver"); 124MODULE_DESCRIPTION("GPIO poweroff driver");
128MODULE_LICENSE("GPL"); 125MODULE_LICENSE("GPL v2");
129MODULE_ALIAS("platform:poweroff-gpio"); 126MODULE_ALIAS("platform:poweroff-gpio");
diff --git a/drivers/power/rx51_battery.c b/drivers/power/rx51_battery.c
index ca49d6c0ee9d..8208888b844e 100644
--- a/drivers/power/rx51_battery.c
+++ b/drivers/power/rx51_battery.c
@@ -197,7 +197,7 @@ static enum power_supply_property rx51_battery_props[] = {
197 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, 197 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
198}; 198};
199 199
200static int __devinit rx51_battery_probe(struct platform_device *pdev) 200static int rx51_battery_probe(struct platform_device *pdev)
201{ 201{
202 struct rx51_device_info *di; 202 struct rx51_device_info *di;
203 int ret; 203 int ret;
@@ -224,7 +224,7 @@ static int __devinit rx51_battery_probe(struct platform_device *pdev)
224 return 0; 224 return 0;
225} 225}
226 226
227static int __devexit rx51_battery_remove(struct platform_device *pdev) 227static int rx51_battery_remove(struct platform_device *pdev)
228{ 228{
229 struct rx51_device_info *di = platform_get_drvdata(pdev); 229 struct rx51_device_info *di = platform_get_drvdata(pdev);
230 230
@@ -237,7 +237,7 @@ static int __devexit rx51_battery_remove(struct platform_device *pdev)
237 237
238static struct platform_driver rx51_battery_driver = { 238static struct platform_driver rx51_battery_driver = {
239 .probe = rx51_battery_probe, 239 .probe = rx51_battery_probe,
240 .remove = __devexit_p(rx51_battery_remove), 240 .remove = rx51_battery_remove,
241 .driver = { 241 .driver = {
242 .name = "rx51-battery", 242 .name = "rx51-battery",
243 .owner = THIS_MODULE, 243 .owner = THIS_MODULE,
diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
index 655055545479..2bf0c1b608dd 100644
--- a/drivers/pps/clients/pps-gpio.c
+++ b/drivers/pps/clients/pps-gpio.c
@@ -196,7 +196,7 @@ static int pps_gpio_remove(struct platform_device *pdev)
196 196
197static struct platform_driver pps_gpio_driver = { 197static struct platform_driver pps_gpio_driver = {
198 .probe = pps_gpio_probe, 198 .probe = pps_gpio_probe,
199 .remove = __devexit_p(pps_gpio_remove), 199 .remove = pps_gpio_remove,
200 .driver = { 200 .driver = {
201 .name = PPS_GPIO_NAME, 201 .name = PPS_GPIO_NAME,
202 .owner = THIS_MODULE 202 .owner = THIS_MODULE
diff --git a/drivers/ps3/ps3-lpm.c b/drivers/ps3/ps3-lpm.c
index 643697f71390..b139b7792e9f 100644
--- a/drivers/ps3/ps3-lpm.c
+++ b/drivers/ps3/ps3-lpm.c
@@ -1185,7 +1185,7 @@ int ps3_lpm_close(void)
1185} 1185}
1186EXPORT_SYMBOL_GPL(ps3_lpm_close); 1186EXPORT_SYMBOL_GPL(ps3_lpm_close);
1187 1187
1188static int __devinit ps3_lpm_probe(struct ps3_system_bus_device *dev) 1188static int ps3_lpm_probe(struct ps3_system_bus_device *dev)
1189{ 1189{
1190 dev_dbg(&dev->core, " -> %s:%u\n", __func__, __LINE__); 1190 dev_dbg(&dev->core, " -> %s:%u\n", __func__, __LINE__);
1191 1191
diff --git a/drivers/ps3/ps3-sys-manager.c b/drivers/ps3/ps3-sys-manager.c
index 1b98367110c4..f2ab435954f6 100644
--- a/drivers/ps3/ps3-sys-manager.c
+++ b/drivers/ps3/ps3-sys-manager.c
@@ -706,7 +706,7 @@ static void ps3_sys_manager_work(struct ps3_system_bus_device *dev)
706 ps3_vuart_read_async(dev, PS3_SM_RX_MSG_LEN_MIN); 706 ps3_vuart_read_async(dev, PS3_SM_RX_MSG_LEN_MIN);
707} 707}
708 708
709static int __devinit ps3_sys_manager_probe(struct ps3_system_bus_device *dev) 709static int ps3_sys_manager_probe(struct ps3_system_bus_device *dev)
710{ 710{
711 int result; 711 int result;
712 struct ps3_sys_manager_ops ops; 712 struct ps3_sys_manager_ops ops;
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index 93d0a8b7718a..437fc35beb7b 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -932,7 +932,7 @@ int ps3av_audio_mute(int mute)
932} 932}
933EXPORT_SYMBOL_GPL(ps3av_audio_mute); 933EXPORT_SYMBOL_GPL(ps3av_audio_mute);
934 934
935static int __devinit ps3av_probe(struct ps3_system_bus_device *dev) 935static int ps3av_probe(struct ps3_system_bus_device *dev)
936{ 936{
937 int res; 937 int res;
938 int id; 938 int id;
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 0199eeea63b1..8f39cac661d2 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -188,7 +188,7 @@ static int anatop_regulator_remove(struct platform_device *pdev)
188 return 0; 188 return 0;
189} 189}
190 190
191static struct of_device_id __devinitdata of_anatop_regulator_match_tbl[] = { 191static struct of_device_id of_anatop_regulator_match_tbl[] = {
192 { .compatible = "fsl,anatop-regulator", }, 192 { .compatible = "fsl,anatop-regulator", },
193 { /* end */ } 193 { /* end */ }
194}; 194};
diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c
index a4b9cb8c4317..1a05ac66878f 100644
--- a/drivers/regulator/da9055-regulator.c
+++ b/drivers/regulator/da9055-regulator.c
@@ -442,9 +442,9 @@ static struct da9055_regulator_info da9055_regulator_info[] = {
442 * GPIO can control regulator state and/or select the regulator register 442 * GPIO can control regulator state and/or select the regulator register
443 * set A/B for voltage ramping. 443 * set A/B for voltage ramping.
444 */ 444 */
445static __devinit int da9055_gpio_init(struct da9055_regulator *regulator, 445static int da9055_gpio_init(struct da9055_regulator *regulator,
446 struct regulator_config *config, 446 struct regulator_config *config,
447 struct da9055_pdata *pdata, int id) 447 struct da9055_pdata *pdata, int id)
448{ 448{
449 struct da9055_regulator_info *info = regulator->info; 449 struct da9055_regulator_info *info = regulator->info;
450 int ret = 0; 450 int ret = 0;
@@ -533,7 +533,7 @@ static inline struct da9055_regulator_info *find_regulator_info(int id)
533 return NULL; 533 return NULL;
534} 534}
535 535
536static int __devinit da9055_regulator_probe(struct platform_device *pdev) 536static int da9055_regulator_probe(struct platform_device *pdev)
537{ 537{
538 struct regulator_config config = { }; 538 struct regulator_config config = { };
539 struct da9055_regulator *regulator; 539 struct da9055_regulator *regulator;
@@ -605,7 +605,7 @@ err_regulator:
605 return ret; 605 return ret;
606} 606}
607 607
608static int __devexit da9055_regulator_remove(struct platform_device *pdev) 608static int da9055_regulator_remove(struct platform_device *pdev)
609{ 609{
610 struct da9055_regulator *regulator = platform_get_drvdata(pdev); 610 struct da9055_regulator *regulator = platform_get_drvdata(pdev);
611 611
@@ -616,7 +616,7 @@ static int __devexit da9055_regulator_remove(struct platform_device *pdev)
616 616
617static struct platform_driver da9055_regulator_driver = { 617static struct platform_driver da9055_regulator_driver = {
618 .probe = da9055_regulator_probe, 618 .probe = da9055_regulator_probe,
619 .remove = __devexit_p(da9055_regulator_remove), 619 .remove = da9055_regulator_remove,
620 .driver = { 620 .driver = {
621 .name = "da9055-regulator", 621 .name = "da9055-regulator",
622 .owner = THIS_MODULE, 622 .owner = THIS_MODULE,
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 48d5b7608b00..e5c03b534fae 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -246,7 +246,7 @@ static int reg_fixed_voltage_remove(struct platform_device *pdev)
246} 246}
247 247
248#if defined(CONFIG_OF) 248#if defined(CONFIG_OF)
249static const struct of_device_id fixed_of_match[] __devinitconst = { 249static const struct of_device_id fixed_of_match[] = {
250 { .compatible = "regulator-fixed", }, 250 { .compatible = "regulator-fixed", },
251 {}, 251 {},
252}; 252};
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 8ae288fc150b..bae681ccd3ea 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -365,7 +365,7 @@ static int gpio_regulator_remove(struct platform_device *pdev)
365} 365}
366 366
367#if defined(CONFIG_OF) 367#if defined(CONFIG_OF)
368static const struct of_device_id regulator_gpio_of_match[] __devinitconst = { 368static const struct of_device_id regulator_gpio_of_match[] = {
369 { .compatible = "regulator-gpio", }, 369 { .compatible = "regulator-gpio", },
370 {}, 370 {},
371}; 371};
diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index 3ee26387b121..9a8ea9163005 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -248,8 +248,8 @@ static struct regulator_ops max8973_dcdc_ops = {
248 .get_mode = max8973_dcdc_get_mode, 248 .get_mode = max8973_dcdc_get_mode,
249}; 249};
250 250
251static int __devinit max8973_init_dcdc(struct max8973_chip *max, 251static int max8973_init_dcdc(struct max8973_chip *max,
252 struct max8973_regulator_platform_data *pdata) 252 struct max8973_regulator_platform_data *pdata)
253{ 253{
254 int ret; 254 int ret;
255 uint8_t control1 = 0; 255 uint8_t control1 = 0;
@@ -359,8 +359,8 @@ static const struct regmap_config max8973_regmap_config = {
359 .cache_type = REGCACHE_RBTREE, 359 .cache_type = REGCACHE_RBTREE,
360}; 360};
361 361
362static int __devinit max8973_probe(struct i2c_client *client, 362static int max8973_probe(struct i2c_client *client,
363 const struct i2c_device_id *id) 363 const struct i2c_device_id *id)
364{ 364{
365 struct max8973_regulator_platform_data *pdata; 365 struct max8973_regulator_platform_data *pdata;
366 struct regulator_config config = { }; 366 struct regulator_config config = { };
@@ -463,7 +463,7 @@ static int __devinit max8973_probe(struct i2c_client *client,
463 return 0; 463 return 0;
464} 464}
465 465
466static int __devexit max8973_remove(struct i2c_client *client) 466static int max8973_remove(struct i2c_client *client)
467{ 467{
468 struct max8973_chip *max = i2c_get_clientdata(client); 468 struct max8973_chip *max = i2c_get_clientdata(client);
469 469
@@ -484,7 +484,7 @@ static struct i2c_driver max8973_i2c_driver = {
484 .owner = THIS_MODULE, 484 .owner = THIS_MODULE,
485 }, 485 },
486 .probe = max8973_probe, 486 .probe = max8973_probe,
487 .remove = __devexit_p(max8973_remove), 487 .remove = max8973_remove,
488 .id_table = max8973_id, 488 .id_table = max8973_id,
489}; 489};
490 490
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index e915629a25cf..c9e912f583bc 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -806,7 +806,7 @@ static int palmas_remove(struct platform_device *pdev)
806 return 0; 806 return 0;
807} 807}
808 808
809static struct of_device_id __devinitdata of_palmas_match_tbl[] = { 809static struct of_device_id of_palmas_match_tbl[] = {
810 { .compatible = "ti,palmas-pmic", }, 810 { .compatible = "ti,palmas-pmic", },
811 { /* end */ } 811 { /* end */ }
812}; 812};
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 493c8c6a241f..74508cc62d67 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -1064,7 +1064,7 @@ static u8 twl_get_smps_mult(void)
1064#define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label) 1064#define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label)
1065#define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label) 1065#define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label)
1066 1066
1067static const struct of_device_id twl_of_match[] __devinitconst = { 1067static const struct of_device_id twl_of_match[] = {
1068 TWL4030_OF_MATCH("ti,twl4030-vaux1", VAUX1), 1068 TWL4030_OF_MATCH("ti,twl4030-vaux1", VAUX1),
1069 TWL4030_OF_MATCH("ti,twl4030-vaux2", VAUX2_4030), 1069 TWL4030_OF_MATCH("ti,twl4030-vaux2", VAUX2_4030),
1070 TWL4030_OF_MATCH("ti,twl5030-vaux2", VAUX2), 1070 TWL4030_OF_MATCH("ti,twl5030-vaux2", VAUX2),
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 32c289c2ba13..0e396c155b3b 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -179,7 +179,7 @@ static struct rproc_ops omap_rproc_ops = {
179 .kick = omap_rproc_kick, 179 .kick = omap_rproc_kick,
180}; 180};
181 181
182static int __devinit omap_rproc_probe(struct platform_device *pdev) 182static int omap_rproc_probe(struct platform_device *pdev)
183{ 183{
184 struct omap_rproc_pdata *pdata = pdev->dev.platform_data; 184 struct omap_rproc_pdata *pdata = pdev->dev.platform_data;
185 struct omap_rproc *oproc; 185 struct omap_rproc *oproc;
@@ -213,7 +213,7 @@ free_rproc:
213 return ret; 213 return ret;
214} 214}
215 215
216static int __devexit omap_rproc_remove(struct platform_device *pdev) 216static int omap_rproc_remove(struct platform_device *pdev)
217{ 217{
218 struct rproc *rproc = platform_get_drvdata(pdev); 218 struct rproc *rproc = platform_get_drvdata(pdev);
219 219
@@ -225,7 +225,7 @@ static int __devexit omap_rproc_remove(struct platform_device *pdev)
225 225
226static struct platform_driver omap_rproc_driver = { 226static struct platform_driver omap_rproc_driver = {
227 .probe = omap_rproc_probe, 227 .probe = omap_rproc_probe,
228 .remove = __devexit_p(omap_rproc_remove), 228 .remove = omap_rproc_remove,
229 .driver = { 229 .driver = {
230 .name = "omap-rproc", 230 .name = "omap-rproc",
231 .owner = THIS_MODULE, 231 .owner = THIS_MODULE,
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index 027096fe6a12..f1e323924f12 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -1022,7 +1022,7 @@ static int rpmsg_remove_device(struct device *dev, void *data)
1022 return 0; 1022 return 0;
1023} 1023}
1024 1024
1025static void __devexit rpmsg_remove(struct virtio_device *vdev) 1025static void rpmsg_remove(struct virtio_device *vdev)
1026{ 1026{
1027 struct virtproc_info *vrp = vdev->priv; 1027 struct virtproc_info *vrp = vdev->priv;
1028 int ret; 1028 int ret;
@@ -1063,7 +1063,7 @@ static struct virtio_driver virtio_ipc_driver = {
1063 .driver.owner = THIS_MODULE, 1063 .driver.owner = THIS_MODULE,
1064 .id_table = id_table, 1064 .id_table = id_table,
1065 .probe = rpmsg_probe, 1065 .probe = rpmsg_probe,
1066 .remove = __devexit_p(rpmsg_remove), 1066 .remove = rpmsg_remove,
1067}; 1067};
1068 1068
1069static int __init rpmsg_init(void) 1069static int __init rpmsg_init(void)
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index d0cea02b5dfc..923a9da9c829 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -352,6 +352,14 @@ config RTC_DRV_TWL4030
352 This driver can also be built as a module. If so, the module 352 This driver can also be built as a module. If so, the module
353 will be called rtc-twl. 353 will be called rtc-twl.
354 354
355config RTC_DRV_TPS6586X
356 tristate "TI TPS6586X RTC driver"
357 depends on MFD_TPS6586X
358 help
359 TI Power Managment IC TPS6586X supports RTC functionality
360 along with alarm. This driver supports the RTC driver for
361 the TPS6586X RTC module.
362
355config RTC_DRV_TPS65910 363config RTC_DRV_TPS65910
356 tristate "TI TPS65910 RTC driver" 364 tristate "TI TPS65910 RTC driver"
357 depends on RTC_CLASS && MFD_TPS65910 365 depends on RTC_CLASS && MFD_TPS65910
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index c3f62c80dc06..4418ef3f9ecc 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -111,6 +111,7 @@ obj-$(CONFIG_RTC_DRV_TEGRA) += rtc-tegra.o
111obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o 111obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o
112obj-$(CONFIG_RTC_DRV_TILE) += rtc-tile.o 112obj-$(CONFIG_RTC_DRV_TILE) += rtc-tile.o
113obj-$(CONFIG_RTC_DRV_TWL4030) += rtc-twl.o 113obj-$(CONFIG_RTC_DRV_TWL4030) += rtc-twl.o
114obj-$(CONFIG_RTC_DRV_TPS6586X) += rtc-tps6586x.o
114obj-$(CONFIG_RTC_DRV_TPS65910) += rtc-tps65910.o 115obj-$(CONFIG_RTC_DRV_TPS65910) += rtc-tps65910.o
115obj-$(CONFIG_RTC_DRV_TX4939) += rtc-tx4939.o 116obj-$(CONFIG_RTC_DRV_TX4939) += rtc-tx4939.o
116obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o 117obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o
diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c
index 6367984e0565..63b17ebe90e8 100644
--- a/drivers/rtc/rtc-88pm80x.c
+++ b/drivers/rtc/rtc-88pm80x.c
@@ -248,7 +248,7 @@ static int pm80x_rtc_resume(struct device *dev)
248 248
249static SIMPLE_DEV_PM_OPS(pm80x_rtc_pm_ops, pm80x_rtc_suspend, pm80x_rtc_resume); 249static SIMPLE_DEV_PM_OPS(pm80x_rtc_pm_ops, pm80x_rtc_suspend, pm80x_rtc_resume);
250 250
251static int __devinit pm80x_rtc_probe(struct platform_device *pdev) 251static int pm80x_rtc_probe(struct platform_device *pdev)
252{ 252{
253 struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent); 253 struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent);
254 struct pm80x_platform_data *pm80x_pdata; 254 struct pm80x_platform_data *pm80x_pdata;
@@ -342,7 +342,7 @@ out:
342 return ret; 342 return ret;
343} 343}
344 344
345static int __devexit pm80x_rtc_remove(struct platform_device *pdev) 345static int pm80x_rtc_remove(struct platform_device *pdev)
346{ 346{
347 struct pm80x_rtc_info *info = platform_get_drvdata(pdev); 347 struct pm80x_rtc_info *info = platform_get_drvdata(pdev);
348 platform_set_drvdata(pdev, NULL); 348 platform_set_drvdata(pdev, NULL);
@@ -358,7 +358,7 @@ static struct platform_driver pm80x_rtc_driver = {
358 .pm = &pm80x_rtc_pm_ops, 358 .pm = &pm80x_rtc_pm_ops,
359 }, 359 },
360 .probe = pm80x_rtc_probe, 360 .probe = pm80x_rtc_probe,
361 .remove = __devexit_p(pm80x_rtc_remove), 361 .remove = pm80x_rtc_remove,
362}; 362};
363 363
364module_platform_driver(pm80x_rtc_driver); 364module_platform_driver(pm80x_rtc_driver);
diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c
index de9e854b326a..f663746f4603 100644
--- a/drivers/rtc/rtc-88pm860x.c
+++ b/drivers/rtc/rtc-88pm860x.c
@@ -286,8 +286,8 @@ out:
286#endif 286#endif
287 287
288#ifdef CONFIG_OF 288#ifdef CONFIG_OF
289static int __devinit pm860x_rtc_dt_init(struct platform_device *pdev, 289static int pm860x_rtc_dt_init(struct platform_device *pdev,
290 struct pm860x_rtc_info *info) 290 struct pm860x_rtc_info *info)
291{ 291{
292 struct device_node *np = pdev->dev.parent->of_node; 292 struct device_node *np = pdev->dev.parent->of_node;
293 int ret; 293 int ret;
@@ -307,7 +307,7 @@ static int __devinit pm860x_rtc_dt_init(struct platform_device *pdev,
307#define pm860x_rtc_dt_init(x, y) (-1) 307#define pm860x_rtc_dt_init(x, y) (-1)
308#endif 308#endif
309 309
310static int __devinit pm860x_rtc_probe(struct platform_device *pdev) 310static int pm860x_rtc_probe(struct platform_device *pdev)
311{ 311{
312 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); 312 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
313 struct pm860x_rtc_pdata *pdata = NULL; 313 struct pm860x_rtc_pdata *pdata = NULL;
@@ -412,7 +412,7 @@ out:
412 return ret; 412 return ret;
413} 413}
414 414
415static int __devexit pm860x_rtc_remove(struct platform_device *pdev) 415static int pm860x_rtc_remove(struct platform_device *pdev)
416{ 416{
417 struct pm860x_rtc_info *info = platform_get_drvdata(pdev); 417 struct pm860x_rtc_info *info = platform_get_drvdata(pdev);
418 418
@@ -459,7 +459,7 @@ static struct platform_driver pm860x_rtc_driver = {
459 .pm = &pm860x_rtc_pm_ops, 459 .pm = &pm860x_rtc_pm_ops,
460 }, 460 },
461 .probe = pm860x_rtc_probe, 461 .probe = pm860x_rtc_probe,
462 .remove = __devexit_p(pm860x_rtc_remove), 462 .remove = pm860x_rtc_remove,
463}; 463};
464 464
465module_platform_driver(pm860x_rtc_driver); 465module_platform_driver(pm860x_rtc_driver);
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c
index 2e5970fe9eeb..57cde2b061e6 100644
--- a/drivers/rtc/rtc-ab8500.c
+++ b/drivers/rtc/rtc-ab8500.c
@@ -389,7 +389,7 @@ static const struct rtc_class_ops ab8500_rtc_ops = {
389 .alarm_irq_enable = ab8500_rtc_irq_enable, 389 .alarm_irq_enable = ab8500_rtc_irq_enable,
390}; 390};
391 391
392static int __devinit ab8500_rtc_probe(struct platform_device *pdev) 392static int ab8500_rtc_probe(struct platform_device *pdev)
393{ 393{
394 int err; 394 int err;
395 struct rtc_device *rtc; 395 struct rtc_device *rtc;
@@ -448,7 +448,7 @@ static int __devinit ab8500_rtc_probe(struct platform_device *pdev)
448 return 0; 448 return 0;
449} 449}
450 450
451static int __devexit ab8500_rtc_remove(struct platform_device *pdev) 451static int ab8500_rtc_remove(struct platform_device *pdev)
452{ 452{
453 struct rtc_device *rtc = platform_get_drvdata(pdev); 453 struct rtc_device *rtc = platform_get_drvdata(pdev);
454 int irq = platform_get_irq_byname(pdev, "ALARM"); 454 int irq = platform_get_irq_byname(pdev, "ALARM");
@@ -468,7 +468,7 @@ static struct platform_driver ab8500_rtc_driver = {
468 .owner = THIS_MODULE, 468 .owner = THIS_MODULE,
469 }, 469 },
470 .probe = ab8500_rtc_probe, 470 .probe = ab8500_rtc_probe,
471 .remove = __devexit_p(ab8500_rtc_remove), 471 .remove = ab8500_rtc_remove,
472}; 472};
473 473
474module_platform_driver(ab8500_rtc_driver); 474module_platform_driver(ab8500_rtc_driver);
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index e981798e9a9b..39cfd2ee0042 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -289,7 +289,7 @@ static const struct rtc_class_ops at91_rtc_ops = {
289/* 289/*
290 * Initialize and install RTC driver 290 * Initialize and install RTC driver
291 */ 291 */
292static int __devinit at91_rtc_probe(struct platform_device *pdev) 292static int at91_rtc_probe(struct platform_device *pdev)
293{ 293{
294 struct resource *r, *r_gpbr; 294 struct resource *r, *r_gpbr;
295 struct sam9_rtc *rtc; 295 struct sam9_rtc *rtc;
@@ -387,7 +387,7 @@ fail:
387/* 387/*
388 * Disable and remove the RTC driver 388 * Disable and remove the RTC driver
389 */ 389 */
390static int __devexit at91_rtc_remove(struct platform_device *pdev) 390static int at91_rtc_remove(struct platform_device *pdev)
391{ 391{
392 struct sam9_rtc *rtc = platform_get_drvdata(pdev); 392 struct sam9_rtc *rtc = platform_get_drvdata(pdev);
393 u32 mr = rtt_readl(rtc, MR); 393 u32 mr = rtt_readl(rtc, MR);
@@ -463,7 +463,7 @@ static int at91_rtc_resume(struct platform_device *pdev)
463 463
464static struct platform_driver at91_rtc_driver = { 464static struct platform_driver at91_rtc_driver = {
465 .probe = at91_rtc_probe, 465 .probe = at91_rtc_probe,
466 .remove = __devexit_p(at91_rtc_remove), 466 .remove = at91_rtc_remove,
467 .shutdown = at91_rtc_shutdown, 467 .shutdown = at91_rtc_shutdown,
468 .suspend = at91_rtc_suspend, 468 .suspend = at91_rtc_suspend,
469 .resume = at91_rtc_resume, 469 .resume = at91_rtc_resume,
diff --git a/drivers/rtc/rtc-au1xxx.c b/drivers/rtc/rtc-au1xxx.c
index 979ed0406ce9..b309da4ec745 100644
--- a/drivers/rtc/rtc-au1xxx.c
+++ b/drivers/rtc/rtc-au1xxx.c
@@ -62,7 +62,7 @@ static struct rtc_class_ops au1xtoy_rtc_ops = {
62 .set_time = au1xtoy_rtc_set_time, 62 .set_time = au1xtoy_rtc_set_time,
63}; 63};
64 64
65static int __devinit au1xtoy_rtc_probe(struct platform_device *pdev) 65static int au1xtoy_rtc_probe(struct platform_device *pdev)
66{ 66{
67 struct rtc_device *rtcdev; 67 struct rtc_device *rtcdev;
68 unsigned long t; 68 unsigned long t;
@@ -116,7 +116,7 @@ out_err:
116 return ret; 116 return ret;
117} 117}
118 118
119static int __devexit au1xtoy_rtc_remove(struct platform_device *pdev) 119static int au1xtoy_rtc_remove(struct platform_device *pdev)
120{ 120{
121 struct rtc_device *rtcdev = platform_get_drvdata(pdev); 121 struct rtc_device *rtcdev = platform_get_drvdata(pdev);
122 122
@@ -131,7 +131,7 @@ static struct platform_driver au1xrtc_driver = {
131 .name = "rtc-au1xxx", 131 .name = "rtc-au1xxx",
132 .owner = THIS_MODULE, 132 .owner = THIS_MODULE,
133 }, 133 },
134 .remove = __devexit_p(au1xtoy_rtc_remove), 134 .remove = au1xtoy_rtc_remove,
135}; 135};
136 136
137static int __init au1xtoy_rtc_init(void) 137static int __init au1xtoy_rtc_init(void)
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
index abfc1a0c07d9..4ec614b0954d 100644
--- a/drivers/rtc/rtc-bfin.c
+++ b/drivers/rtc/rtc-bfin.c
@@ -342,7 +342,7 @@ static struct rtc_class_ops bfin_rtc_ops = {
342 .alarm_irq_enable = bfin_rtc_alarm_irq_enable, 342 .alarm_irq_enable = bfin_rtc_alarm_irq_enable,
343}; 343};
344 344
345static int __devinit bfin_rtc_probe(struct platform_device *pdev) 345static int bfin_rtc_probe(struct platform_device *pdev)
346{ 346{
347 struct bfin_rtc *rtc; 347 struct bfin_rtc *rtc;
348 struct device *dev = &pdev->dev; 348 struct device *dev = &pdev->dev;
@@ -388,7 +388,7 @@ err:
388 return ret; 388 return ret;
389} 389}
390 390
391static int __devexit bfin_rtc_remove(struct platform_device *pdev) 391static int bfin_rtc_remove(struct platform_device *pdev)
392{ 392{
393 struct bfin_rtc *rtc = platform_get_drvdata(pdev); 393 struct bfin_rtc *rtc = platform_get_drvdata(pdev);
394 struct device *dev = &pdev->dev; 394 struct device *dev = &pdev->dev;
@@ -451,7 +451,7 @@ static struct platform_driver bfin_rtc_driver = {
451 .owner = THIS_MODULE, 451 .owner = THIS_MODULE,
452 }, 452 },
453 .probe = bfin_rtc_probe, 453 .probe = bfin_rtc_probe,
454 .remove = __devexit_p(bfin_rtc_remove), 454 .remove = bfin_rtc_remove,
455 .suspend = bfin_rtc_suspend, 455 .suspend = bfin_rtc_suspend,
456 .resume = bfin_rtc_resume, 456 .resume = bfin_rtc_resume,
457}; 457};
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c
index f090159dce4a..036cb89f8188 100644
--- a/drivers/rtc/rtc-bq32k.c
+++ b/drivers/rtc/rtc-bq32k.c
@@ -163,7 +163,7 @@ static int bq32k_probe(struct i2c_client *client,
163 return 0; 163 return 0;
164} 164}
165 165
166static int __devexit bq32k_remove(struct i2c_client *client) 166static int bq32k_remove(struct i2c_client *client)
167{ 167{
168 struct rtc_device *rtc = i2c_get_clientdata(client); 168 struct rtc_device *rtc = i2c_get_clientdata(client);
169 169
@@ -183,7 +183,7 @@ static struct i2c_driver bq32k_driver = {
183 .owner = THIS_MODULE, 183 .owner = THIS_MODULE,
184 }, 184 },
185 .probe = bq32k_probe, 185 .probe = bq32k_probe,
186 .remove = __devexit_p(bq32k_remove), 186 .remove = bq32k_remove,
187 .id_table = bq32k_id, 187 .id_table = bq32k_id,
188}; 188};
189 189
diff --git a/drivers/rtc/rtc-bq4802.c b/drivers/rtc/rtc-bq4802.c
index bf612ef22941..693be71b5b18 100644
--- a/drivers/rtc/rtc-bq4802.c
+++ b/drivers/rtc/rtc-bq4802.c
@@ -140,7 +140,7 @@ static const struct rtc_class_ops bq4802_ops = {
140 .set_time = bq4802_set_time, 140 .set_time = bq4802_set_time,
141}; 141};
142 142
143static int __devinit bq4802_probe(struct platform_device *pdev) 143static int bq4802_probe(struct platform_device *pdev)
144{ 144{
145 struct bq4802 *p = kzalloc(sizeof(*p), GFP_KERNEL); 145 struct bq4802 *p = kzalloc(sizeof(*p), GFP_KERNEL);
146 int err = -ENOMEM; 146 int err = -ENOMEM;
@@ -191,7 +191,7 @@ out_free:
191 goto out; 191 goto out;
192} 192}
193 193
194static int __devexit bq4802_remove(struct platform_device *pdev) 194static int bq4802_remove(struct platform_device *pdev)
195{ 195{
196 struct bq4802 *p = platform_get_drvdata(pdev); 196 struct bq4802 *p = platform_get_drvdata(pdev);
197 197
@@ -215,7 +215,7 @@ static struct platform_driver bq4802_driver = {
215 .owner = THIS_MODULE, 215 .owner = THIS_MODULE,
216 }, 216 },
217 .probe = bq4802_probe, 217 .probe = bq4802_probe,
218 .remove = __devexit_p(bq4802_remove), 218 .remove = bq4802_remove,
219}; 219};
220 220
221module_platform_driver(bq4802_driver); 221module_platform_driver(bq4802_driver);
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 4267789ca995..16630aa87f45 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -947,8 +947,7 @@ static void rtc_wake_off(struct device *dev)
947 */ 947 */
948static struct cmos_rtc_board_info acpi_rtc_info; 948static struct cmos_rtc_board_info acpi_rtc_info;
949 949
950static void __devinit 950static void cmos_wake_setup(struct device *dev)
951cmos_wake_setup(struct device *dev)
952{ 951{
953 if (acpi_disabled) 952 if (acpi_disabled)
954 return; 953 return;
@@ -980,8 +979,7 @@ cmos_wake_setup(struct device *dev)
980 979
981#else 980#else
982 981
983static void __devinit 982static void cmos_wake_setup(struct device *dev)
984cmos_wake_setup(struct device *dev)
985{ 983{
986} 984}
987 985
@@ -991,8 +989,7 @@ cmos_wake_setup(struct device *dev)
991 989
992#include <linux/pnp.h> 990#include <linux/pnp.h>
993 991
994static int __devinit 992static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
995cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
996{ 993{
997 cmos_wake_setup(&pnp->dev); 994 cmos_wake_setup(&pnp->dev);
998 995
diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
index 78070255bd3f..60b826e520e2 100644
--- a/drivers/rtc/rtc-da9052.c
+++ b/drivers/rtc/rtc-da9052.c
@@ -228,7 +228,7 @@ static const struct rtc_class_ops da9052_rtc_ops = {
228 .alarm_irq_enable = da9052_rtc_alarm_irq_enable, 228 .alarm_irq_enable = da9052_rtc_alarm_irq_enable,
229}; 229};
230 230
231static int __devinit da9052_rtc_probe(struct platform_device *pdev) 231static int da9052_rtc_probe(struct platform_device *pdev)
232{ 232{
233 struct da9052_rtc *rtc; 233 struct da9052_rtc *rtc;
234 int ret; 234 int ret;
@@ -262,7 +262,7 @@ err_free_irq:
262 return ret; 262 return ret;
263} 263}
264 264
265static int __devexit da9052_rtc_remove(struct platform_device *pdev) 265static int da9052_rtc_remove(struct platform_device *pdev)
266{ 266{
267 struct da9052_rtc *rtc = pdev->dev.platform_data; 267 struct da9052_rtc *rtc = pdev->dev.platform_data;
268 268
@@ -275,7 +275,7 @@ static int __devexit da9052_rtc_remove(struct platform_device *pdev)
275 275
276static struct platform_driver da9052_rtc_driver = { 276static struct platform_driver da9052_rtc_driver = {
277 .probe = da9052_rtc_probe, 277 .probe = da9052_rtc_probe,
278 .remove = __devexit_p(da9052_rtc_remove), 278 .remove = da9052_rtc_remove,
279 .driver = { 279 .driver = {
280 .name = "da9052-rtc", 280 .name = "da9052-rtc",
281 .owner = THIS_MODULE, 281 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c
index 07cd03eae606..5f7982f7c1b5 100644
--- a/drivers/rtc/rtc-davinci.c
+++ b/drivers/rtc/rtc-davinci.c
@@ -567,7 +567,7 @@ fail2:
567 return ret; 567 return ret;
568} 568}
569 569
570static int __devexit davinci_rtc_remove(struct platform_device *pdev) 570static int davinci_rtc_remove(struct platform_device *pdev)
571{ 571{
572 struct davinci_rtc *davinci_rtc = platform_get_drvdata(pdev); 572 struct davinci_rtc *davinci_rtc = platform_get_drvdata(pdev);
573 573
@@ -589,7 +589,7 @@ static int __devexit davinci_rtc_remove(struct platform_device *pdev)
589 589
590static struct platform_driver davinci_rtc_driver = { 590static struct platform_driver davinci_rtc_driver = {
591 .probe = davinci_rtc_probe, 591 .probe = davinci_rtc_probe,
592 .remove = __devexit_p(davinci_rtc_remove), 592 .remove = davinci_rtc_remove,
593 .driver = { 593 .driver = {
594 .name = "rtc_davinci", 594 .name = "rtc_davinci",
595 .owner = THIS_MODULE, 595 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-dm355evm.c b/drivers/rtc/rtc-dm355evm.c
index d4457afcba89..b2ed2c94b081 100644
--- a/drivers/rtc/rtc-dm355evm.c
+++ b/drivers/rtc/rtc-dm355evm.c
@@ -123,7 +123,7 @@ static struct rtc_class_ops dm355evm_rtc_ops = {
123 123
124/*----------------------------------------------------------------------*/ 124/*----------------------------------------------------------------------*/
125 125
126static int __devinit dm355evm_rtc_probe(struct platform_device *pdev) 126static int dm355evm_rtc_probe(struct platform_device *pdev)
127{ 127{
128 struct rtc_device *rtc; 128 struct rtc_device *rtc;
129 129
@@ -139,7 +139,7 @@ static int __devinit dm355evm_rtc_probe(struct platform_device *pdev)
139 return 0; 139 return 0;
140} 140}
141 141
142static int __devexit dm355evm_rtc_remove(struct platform_device *pdev) 142static int dm355evm_rtc_remove(struct platform_device *pdev)
143{ 143{
144 struct rtc_device *rtc = platform_get_drvdata(pdev); 144 struct rtc_device *rtc = platform_get_drvdata(pdev);
145 145
@@ -154,7 +154,7 @@ static int __devexit dm355evm_rtc_remove(struct platform_device *pdev)
154 */ 154 */
155static struct platform_driver rtc_dm355evm_driver = { 155static struct platform_driver rtc_dm355evm_driver = {
156 .probe = dm355evm_rtc_probe, 156 .probe = dm355evm_rtc_probe,
157 .remove = __devexit_p(dm355evm_rtc_remove), 157 .remove = dm355evm_rtc_remove,
158 .driver = { 158 .driver = {
159 .owner = THIS_MODULE, 159 .owner = THIS_MODULE,
160 .name = "rtc-dm355evm", 160 .name = "rtc-dm355evm",
diff --git a/drivers/rtc/rtc-ds1286.c b/drivers/rtc/rtc-ds1286.c
index 990c3ff489bf..d989412a348a 100644
--- a/drivers/rtc/rtc-ds1286.c
+++ b/drivers/rtc/rtc-ds1286.c
@@ -329,7 +329,7 @@ static const struct rtc_class_ops ds1286_ops = {
329 .alarm_irq_enable = ds1286_alarm_irq_enable, 329 .alarm_irq_enable = ds1286_alarm_irq_enable,
330}; 330};
331 331
332static int __devinit ds1286_probe(struct platform_device *pdev) 332static int ds1286_probe(struct platform_device *pdev)
333{ 333{
334 struct rtc_device *rtc; 334 struct rtc_device *rtc;
335 struct resource *res; 335 struct resource *res;
@@ -376,7 +376,7 @@ out:
376 return ret; 376 return ret;
377} 377}
378 378
379static int __devexit ds1286_remove(struct platform_device *pdev) 379static int ds1286_remove(struct platform_device *pdev)
380{ 380{
381 struct ds1286_priv *priv = platform_get_drvdata(pdev); 381 struct ds1286_priv *priv = platform_get_drvdata(pdev);
382 382
@@ -393,7 +393,7 @@ static struct platform_driver ds1286_platform_driver = {
393 .owner = THIS_MODULE, 393 .owner = THIS_MODULE,
394 }, 394 },
395 .probe = ds1286_probe, 395 .probe = ds1286_probe,
396 .remove = __devexit_p(ds1286_remove), 396 .remove = ds1286_remove,
397}; 397};
398 398
399module_platform_driver(ds1286_platform_driver); 399module_platform_driver(ds1286_platform_driver);
diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c
index f0d638922644..fdbcdb289d60 100644
--- a/drivers/rtc/rtc-ds1302.c
+++ b/drivers/rtc/rtc-ds1302.c
@@ -234,7 +234,7 @@ static int __init ds1302_rtc_probe(struct platform_device *pdev)
234 return 0; 234 return 0;
235} 235}
236 236
237static int __devexit ds1302_rtc_remove(struct platform_device *pdev) 237static int ds1302_rtc_remove(struct platform_device *pdev)
238{ 238{
239 struct rtc_device *rtc = platform_get_drvdata(pdev); 239 struct rtc_device *rtc = platform_get_drvdata(pdev);
240 240
@@ -249,7 +249,7 @@ static struct platform_driver ds1302_platform_driver = {
249 .name = DRV_NAME, 249 .name = DRV_NAME,
250 .owner = THIS_MODULE, 250 .owner = THIS_MODULE,
251 }, 251 },
252 .remove = __devexit_p(ds1302_rtc_remove), 252 .remove = ds1302_rtc_remove,
253}; 253};
254 254
255static int __init ds1302_rtc_init(void) 255static int __init ds1302_rtc_init(void)
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index 686a865913e1..d578773f5ce2 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -601,7 +601,7 @@ static struct bin_attribute nvram = {
601 * Interface to SPI stack 601 * Interface to SPI stack
602 */ 602 */
603 603
604static int __devinit ds1305_probe(struct spi_device *spi) 604static int ds1305_probe(struct spi_device *spi)
605{ 605{
606 struct ds1305 *ds1305; 606 struct ds1305 *ds1305;
607 int status; 607 int status;
@@ -787,7 +787,7 @@ fail0:
787 return status; 787 return status;
788} 788}
789 789
790static int __devexit ds1305_remove(struct spi_device *spi) 790static int ds1305_remove(struct spi_device *spi)
791{ 791{
792 struct ds1305 *ds1305 = spi_get_drvdata(spi); 792 struct ds1305 *ds1305 = spi_get_drvdata(spi);
793 793
@@ -810,7 +810,7 @@ static struct spi_driver ds1305_driver = {
810 .driver.name = "rtc-ds1305", 810 .driver.name = "rtc-ds1305",
811 .driver.owner = THIS_MODULE, 811 .driver.owner = THIS_MODULE,
812 .probe = ds1305_probe, 812 .probe = ds1305_probe,
813 .remove = __devexit_p(ds1305_remove), 813 .remove = ds1305_remove,
814 /* REVISIT add suspend/resume */ 814 /* REVISIT add suspend/resume */
815}; 815};
816 816
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 836710ce750e..e0d0ba4de03f 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -617,8 +617,8 @@ ds1307_nvram_write(struct file *filp, struct kobject *kobj,
617 617
618/*----------------------------------------------------------------------*/ 618/*----------------------------------------------------------------------*/
619 619
620static int __devinit ds1307_probe(struct i2c_client *client, 620static int ds1307_probe(struct i2c_client *client,
621 const struct i2c_device_id *id) 621 const struct i2c_device_id *id)
622{ 622{
623 struct ds1307 *ds1307; 623 struct ds1307 *ds1307;
624 int err = -ENODEV; 624 int err = -ENODEV;
@@ -938,7 +938,7 @@ exit_free:
938 return err; 938 return err;
939} 939}
940 940
941static int __devexit ds1307_remove(struct i2c_client *client) 941static int ds1307_remove(struct i2c_client *client)
942{ 942{
943 struct ds1307 *ds1307 = i2c_get_clientdata(client); 943 struct ds1307 *ds1307 = i2c_get_clientdata(client);
944 944
@@ -963,7 +963,7 @@ static struct i2c_driver ds1307_driver = {
963 .owner = THIS_MODULE, 963 .owner = THIS_MODULE,
964 }, 964 },
965 .probe = ds1307_probe, 965 .probe = ds1307_probe,
966 .remove = __devexit_p(ds1307_remove), 966 .remove = ds1307_remove,
967 .id_table = ds1307_id, 967 .id_table = ds1307_id,
968}; 968};
969 969
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index 966316088b7f..fef76868aae0 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -391,7 +391,7 @@ out_free:
391 return ret; 391 return ret;
392} 392}
393 393
394static int __devexit ds1374_remove(struct i2c_client *client) 394static int ds1374_remove(struct i2c_client *client)
395{ 395{
396 struct ds1374 *ds1374 = i2c_get_clientdata(client); 396 struct ds1374 *ds1374 = i2c_get_clientdata(client);
397 397
@@ -442,7 +442,7 @@ static struct i2c_driver ds1374_driver = {
442 .pm = DS1374_PM, 442 .pm = DS1374_PM,
443 }, 443 },
444 .probe = ds1374_probe, 444 .probe = ds1374_probe,
445 .remove = __devexit_p(ds1374_remove), 445 .remove = ds1374_remove,
446 .id_table = ds1374_id, 446 .id_table = ds1374_id,
447}; 447};
448 448
diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index b0a99e1b25be..f994257981a0 100644
--- a/drivers/rtc/rtc-ds1390.c
+++ b/drivers/rtc/rtc-ds1390.c
@@ -121,7 +121,7 @@ static const struct rtc_class_ops ds1390_rtc_ops = {
121 .set_time = ds1390_set_time, 121 .set_time = ds1390_set_time,
122}; 122};
123 123
124static int __devinit ds1390_probe(struct spi_device *spi) 124static int ds1390_probe(struct spi_device *spi)
125{ 125{
126 unsigned char tmp; 126 unsigned char tmp;
127 struct ds1390 *chip; 127 struct ds1390 *chip;
@@ -156,7 +156,7 @@ static int __devinit ds1390_probe(struct spi_device *spi)
156 return res; 156 return res;
157} 157}
158 158
159static int __devexit ds1390_remove(struct spi_device *spi) 159static int ds1390_remove(struct spi_device *spi)
160{ 160{
161 struct ds1390 *chip = spi_get_drvdata(spi); 161 struct ds1390 *chip = spi_get_drvdata(spi);
162 162
@@ -172,7 +172,7 @@ static struct spi_driver ds1390_driver = {
172 .owner = THIS_MODULE, 172 .owner = THIS_MODULE,
173 }, 173 },
174 .probe = ds1390_probe, 174 .probe = ds1390_probe,
175 .remove = __devexit_p(ds1390_remove), 175 .remove = ds1390_remove,
176}; 176};
177 177
178module_spi_driver(ds1390_driver); 178module_spi_driver(ds1390_driver);
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c
index 1f675f5294f5..6a3fcfe3b0e7 100644
--- a/drivers/rtc/rtc-ds1511.c
+++ b/drivers/rtc/rtc-ds1511.c
@@ -476,8 +476,7 @@ static struct bin_attribute ds1511_nvram_attr = {
476 .write = ds1511_nvram_write, 476 .write = ds1511_nvram_write,
477}; 477};
478 478
479 static int __devinit 479static int ds1511_rtc_probe(struct platform_device *pdev)
480ds1511_rtc_probe(struct platform_device *pdev)
481{ 480{
482 struct rtc_device *rtc; 481 struct rtc_device *rtc;
483 struct resource *res; 482 struct resource *res;
@@ -551,8 +550,7 @@ ds1511_rtc_probe(struct platform_device *pdev)
551 return ret; 550 return ret;
552} 551}
553 552
554 static int __devexit 553static int ds1511_rtc_remove(struct platform_device *pdev)
555ds1511_rtc_remove(struct platform_device *pdev)
556{ 554{
557 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 555 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
558 556
@@ -573,7 +571,7 @@ MODULE_ALIAS("platform:ds1511");
573 571
574static struct platform_driver ds1511_rtc_driver = { 572static struct platform_driver ds1511_rtc_driver = {
575 .probe = ds1511_rtc_probe, 573 .probe = ds1511_rtc_probe,
576 .remove = __devexit_p(ds1511_rtc_remove), 574 .remove = ds1511_rtc_remove,
577 .driver = { 575 .driver = {
578 .name = "ds1511", 576 .name = "ds1511",
579 .owner = THIS_MODULE, 577 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 6ccedbbf923c..25ce0621ade9 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -276,7 +276,7 @@ static struct bin_attribute ds1553_nvram_attr = {
276 .write = ds1553_nvram_write, 276 .write = ds1553_nvram_write,
277}; 277};
278 278
279static int __devinit ds1553_rtc_probe(struct platform_device *pdev) 279static int ds1553_rtc_probe(struct platform_device *pdev)
280{ 280{
281 struct rtc_device *rtc; 281 struct rtc_device *rtc;
282 struct resource *res; 282 struct resource *res;
@@ -338,7 +338,7 @@ static int __devinit ds1553_rtc_probe(struct platform_device *pdev)
338 return ret; 338 return ret;
339} 339}
340 340
341static int __devexit ds1553_rtc_remove(struct platform_device *pdev) 341static int ds1553_rtc_remove(struct platform_device *pdev)
342{ 342{
343 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 343 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
344 344
@@ -354,7 +354,7 @@ MODULE_ALIAS("platform:rtc-ds1553");
354 354
355static struct platform_driver ds1553_rtc_driver = { 355static struct platform_driver ds1553_rtc_driver = {
356 .probe = ds1553_rtc_probe, 356 .probe = ds1553_rtc_probe,
357 .remove = __devexit_p(ds1553_rtc_remove), 357 .remove = ds1553_rtc_remove,
358 .driver = { 358 .driver = {
359 .name = "rtc-ds1553", 359 .name = "rtc-ds1553",
360 .owner = THIS_MODULE, 360 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index 76112667c507..609c870e2cc5 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -159,7 +159,7 @@ static ssize_t ds1742_nvram_write(struct file *filp, struct kobject *kobj,
159 return count; 159 return count;
160} 160}
161 161
162static int __devinit ds1742_rtc_probe(struct platform_device *pdev) 162static int ds1742_rtc_probe(struct platform_device *pdev)
163{ 163{
164 struct rtc_device *rtc; 164 struct rtc_device *rtc;
165 struct resource *res; 165 struct resource *res;
@@ -222,7 +222,7 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev)
222 return ret; 222 return ret;
223} 223}
224 224
225static int __devexit ds1742_rtc_remove(struct platform_device *pdev) 225static int ds1742_rtc_remove(struct platform_device *pdev)
226{ 226{
227 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 227 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
228 228
@@ -233,7 +233,7 @@ static int __devexit ds1742_rtc_remove(struct platform_device *pdev)
233 233
234static struct platform_driver ds1742_rtc_driver = { 234static struct platform_driver ds1742_rtc_driver = {
235 .probe = ds1742_rtc_probe, 235 .probe = ds1742_rtc_probe,
236 .remove = __devexit_p(ds1742_rtc_remove), 236 .remove = ds1742_rtc_remove,
237 .driver = { 237 .driver = {
238 .name = "rtc-ds1742", 238 .name = "rtc-ds1742",
239 .owner = THIS_MODULE, 239 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index e1945095814e..db0ca08db315 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -391,8 +391,8 @@ static const struct rtc_class_ops ds3232_rtc_ops = {
391 .alarm_irq_enable = ds3232_alarm_irq_enable, 391 .alarm_irq_enable = ds3232_alarm_irq_enable,
392}; 392};
393 393
394static int __devinit ds3232_probe(struct i2c_client *client, 394static int ds3232_probe(struct i2c_client *client,
395 const struct i2c_device_id *id) 395 const struct i2c_device_id *id)
396{ 396{
397 struct ds3232 *ds3232; 397 struct ds3232 *ds3232;
398 int ret; 398 int ret;
@@ -439,7 +439,7 @@ out_free:
439 return ret; 439 return ret;
440} 440}
441 441
442static int __devexit ds3232_remove(struct i2c_client *client) 442static int ds3232_remove(struct i2c_client *client)
443{ 443{
444 struct ds3232 *ds3232 = i2c_get_clientdata(client); 444 struct ds3232 *ds3232 = i2c_get_clientdata(client);
445 445
@@ -469,7 +469,7 @@ static struct i2c_driver ds3232_driver = {
469 .owner = THIS_MODULE, 469 .owner = THIS_MODULE,
470 }, 470 },
471 .probe = ds3232_probe, 471 .probe = ds3232_probe,
472 .remove = __devexit_p(ds3232_remove), 472 .remove = ds3232_remove,
473 .id_table = ds3232_id, 473 .id_table = ds3232_id,
474}; 474};
475 475
diff --git a/drivers/rtc/rtc-ds3234.c b/drivers/rtc/rtc-ds3234.c
index fda707926f02..7a4495ef1c39 100644
--- a/drivers/rtc/rtc-ds3234.c
+++ b/drivers/rtc/rtc-ds3234.c
@@ -105,7 +105,7 @@ static const struct rtc_class_ops ds3234_rtc_ops = {
105 .set_time = ds3234_set_time, 105 .set_time = ds3234_set_time,
106}; 106};
107 107
108static int __devinit ds3234_probe(struct spi_device *spi) 108static int ds3234_probe(struct spi_device *spi)
109{ 109{
110 struct rtc_device *rtc; 110 struct rtc_device *rtc;
111 unsigned char tmp; 111 unsigned char tmp;
@@ -156,7 +156,7 @@ static int __devinit ds3234_probe(struct spi_device *spi)
156 return 0; 156 return 0;
157} 157}
158 158
159static int __devexit ds3234_remove(struct spi_device *spi) 159static int ds3234_remove(struct spi_device *spi)
160{ 160{
161 struct rtc_device *rtc = spi_get_drvdata(spi); 161 struct rtc_device *rtc = spi_get_drvdata(spi);
162 162
@@ -170,7 +170,7 @@ static struct spi_driver ds3234_driver = {
170 .owner = THIS_MODULE, 170 .owner = THIS_MODULE,
171 }, 171 },
172 .probe = ds3234_probe, 172 .probe = ds3234_probe,
173 .remove = __devexit_p(ds3234_remove), 173 .remove = ds3234_remove,
174}; 174};
175 175
176module_spi_driver(ds3234_driver); 176module_spi_driver(ds3234_driver);
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 9602278ff988..1a4e5e4a70cd 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -127,7 +127,7 @@ static const struct attribute_group ep93xx_rtc_sysfs_files = {
127 .attrs = ep93xx_rtc_attrs, 127 .attrs = ep93xx_rtc_attrs,
128}; 128};
129 129
130static int __devinit ep93xx_rtc_probe(struct platform_device *pdev) 130static int ep93xx_rtc_probe(struct platform_device *pdev)
131{ 131{
132 struct ep93xx_rtc *ep93xx_rtc; 132 struct ep93xx_rtc *ep93xx_rtc;
133 struct resource *res; 133 struct resource *res;
@@ -174,7 +174,7 @@ exit:
174 return err; 174 return err;
175} 175}
176 176
177static int __devexit ep93xx_rtc_remove(struct platform_device *pdev) 177static int ep93xx_rtc_remove(struct platform_device *pdev)
178{ 178{
179 struct ep93xx_rtc *ep93xx_rtc = platform_get_drvdata(pdev); 179 struct ep93xx_rtc *ep93xx_rtc = platform_get_drvdata(pdev);
180 180
@@ -192,7 +192,7 @@ static struct platform_driver ep93xx_rtc_driver = {
192 .owner = THIS_MODULE, 192 .owner = THIS_MODULE,
193 }, 193 },
194 .probe = ep93xx_rtc_probe, 194 .probe = ep93xx_rtc_probe,
195 .remove = __devexit_p(ep93xx_rtc_remove), 195 .remove = ep93xx_rtc_remove,
196}; 196};
197 197
198module_platform_driver(ep93xx_rtc_driver); 198module_platform_driver(ep93xx_rtc_driver);
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c
index 86b6ecce99f0..04e93c6597f8 100644
--- a/drivers/rtc/rtc-fm3130.c
+++ b/drivers/rtc/rtc-fm3130.c
@@ -361,8 +361,8 @@ static const struct rtc_class_ops fm3130_rtc_ops = {
361 361
362static struct i2c_driver fm3130_driver; 362static struct i2c_driver fm3130_driver;
363 363
364static int __devinit fm3130_probe(struct i2c_client *client, 364static int fm3130_probe(struct i2c_client *client,
365 const struct i2c_device_id *id) 365 const struct i2c_device_id *id)
366{ 366{
367 struct fm3130 *fm3130; 367 struct fm3130 *fm3130;
368 int err = -ENODEV; 368 int err = -ENODEV;
@@ -546,7 +546,7 @@ exit_free:
546 return err; 546 return err;
547} 547}
548 548
549static int __devexit fm3130_remove(struct i2c_client *client) 549static int fm3130_remove(struct i2c_client *client)
550{ 550{
551 struct fm3130 *fm3130 = i2c_get_clientdata(client); 551 struct fm3130 *fm3130 = i2c_get_clientdata(client);
552 552
@@ -561,7 +561,7 @@ static struct i2c_driver fm3130_driver = {
561 .owner = THIS_MODULE, 561 .owner = THIS_MODULE,
562 }, 562 },
563 .probe = fm3130_probe, 563 .probe = fm3130_probe,
564 .remove = __devexit_p(fm3130_remove), 564 .remove = fm3130_remove,
565 .id_table = fm3130_id, 565 .id_table = fm3130_id,
566}; 566};
567 567
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index 8da7a5cf83c6..75d307ab37f4 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -480,7 +480,7 @@ err:
480 return rc; 480 return rc;
481} 481}
482 482
483static int __devexit dryice_rtc_remove(struct platform_device *pdev) 483static int dryice_rtc_remove(struct platform_device *pdev)
484{ 484{
485 struct imxdi_dev *imxdi = platform_get_drvdata(pdev); 485 struct imxdi_dev *imxdi = platform_get_drvdata(pdev);
486 486
@@ -512,7 +512,7 @@ static struct platform_driver dryice_rtc_driver = {
512 .owner = THIS_MODULE, 512 .owner = THIS_MODULE,
513 .of_match_table = of_match_ptr(dryice_dt_ids), 513 .of_match_table = of_match_ptr(dryice_dt_ids),
514 }, 514 },
515 .remove = __devexit_p(dryice_rtc_remove), 515 .remove = dryice_rtc_remove,
516}; 516};
517 517
518static int __init dryice_rtc_init(void) 518static int __init dryice_rtc_init(void)
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
index 1224182d3eab..1e48686ca6d2 100644
--- a/drivers/rtc/rtc-jz4740.c
+++ b/drivers/rtc/rtc-jz4740.c
@@ -210,7 +210,7 @@ void jz4740_rtc_poweroff(struct device *dev)
210} 210}
211EXPORT_SYMBOL_GPL(jz4740_rtc_poweroff); 211EXPORT_SYMBOL_GPL(jz4740_rtc_poweroff);
212 212
213static int __devinit jz4740_rtc_probe(struct platform_device *pdev) 213static int jz4740_rtc_probe(struct platform_device *pdev)
214{ 214{
215 int ret; 215 int ret;
216 struct jz4740_rtc *rtc; 216 struct jz4740_rtc *rtc;
@@ -297,7 +297,7 @@ err_free:
297 return ret; 297 return ret;
298} 298}
299 299
300static int __devexit jz4740_rtc_remove(struct platform_device *pdev) 300static int jz4740_rtc_remove(struct platform_device *pdev)
301{ 301{
302 struct jz4740_rtc *rtc = platform_get_drvdata(pdev); 302 struct jz4740_rtc *rtc = platform_get_drvdata(pdev);
303 303
@@ -347,7 +347,7 @@ static const struct dev_pm_ops jz4740_pm_ops = {
347 347
348static struct platform_driver jz4740_rtc_driver = { 348static struct platform_driver jz4740_rtc_driver = {
349 .probe = jz4740_rtc_probe, 349 .probe = jz4740_rtc_probe,
350 .remove = __devexit_p(jz4740_rtc_remove), 350 .remove = jz4740_rtc_remove,
351 .driver = { 351 .driver = {
352 .name = "jz4740-rtc", 352 .name = "jz4740-rtc",
353 .owner = THIS_MODULE, 353 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-lpc32xx.c b/drivers/rtc/rtc-lpc32xx.c
index d5218553741f..40a598332bac 100644
--- a/drivers/rtc/rtc-lpc32xx.c
+++ b/drivers/rtc/rtc-lpc32xx.c
@@ -197,7 +197,7 @@ static const struct rtc_class_ops lpc32xx_rtc_ops = {
197 .alarm_irq_enable = lpc32xx_rtc_alarm_irq_enable, 197 .alarm_irq_enable = lpc32xx_rtc_alarm_irq_enable,
198}; 198};
199 199
200static int __devinit lpc32xx_rtc_probe(struct platform_device *pdev) 200static int lpc32xx_rtc_probe(struct platform_device *pdev)
201{ 201{
202 struct resource *res; 202 struct resource *res;
203 struct lpc32xx_rtc *rtc; 203 struct lpc32xx_rtc *rtc;
@@ -299,7 +299,7 @@ static int __devinit lpc32xx_rtc_probe(struct platform_device *pdev)
299 return 0; 299 return 0;
300} 300}
301 301
302static int __devexit lpc32xx_rtc_remove(struct platform_device *pdev) 302static int lpc32xx_rtc_remove(struct platform_device *pdev)
303{ 303{
304 struct lpc32xx_rtc *rtc = platform_get_drvdata(pdev); 304 struct lpc32xx_rtc *rtc = platform_get_drvdata(pdev);
305 305
@@ -397,7 +397,7 @@ MODULE_DEVICE_TABLE(of, lpc32xx_rtc_match);
397 397
398static struct platform_driver lpc32xx_rtc_driver = { 398static struct platform_driver lpc32xx_rtc_driver = {
399 .probe = lpc32xx_rtc_probe, 399 .probe = lpc32xx_rtc_probe,
400 .remove = __devexit_p(lpc32xx_rtc_remove), 400 .remove = lpc32xx_rtc_remove,
401 .driver = { 401 .driver = {
402 .name = RTC_NAME, 402 .name = RTC_NAME,
403 .owner = THIS_MODULE, 403 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-ls1x.c b/drivers/rtc/rtc-ls1x.c
index 07e81c5f8247..f59b6349551a 100644
--- a/drivers/rtc/rtc-ls1x.c
+++ b/drivers/rtc/rtc-ls1x.c
@@ -143,7 +143,7 @@ static struct rtc_class_ops ls1x_rtc_ops = {
143 .set_time = ls1x_rtc_set_time, 143 .set_time = ls1x_rtc_set_time,
144}; 144};
145 145
146static int __devinit ls1x_rtc_probe(struct platform_device *pdev) 146static int ls1x_rtc_probe(struct platform_device *pdev)
147{ 147{
148 struct rtc_device *rtcdev; 148 struct rtc_device *rtcdev;
149 unsigned long v; 149 unsigned long v;
@@ -185,7 +185,7 @@ err:
185 return ret; 185 return ret;
186} 186}
187 187
188static int __devexit ls1x_rtc_remove(struct platform_device *pdev) 188static int ls1x_rtc_remove(struct platform_device *pdev)
189{ 189{
190 struct rtc_device *rtcdev = platform_get_drvdata(pdev); 190 struct rtc_device *rtcdev = platform_get_drvdata(pdev);
191 191
@@ -200,7 +200,7 @@ static struct platform_driver ls1x_rtc_driver = {
200 .name = "ls1x-rtc", 200 .name = "ls1x-rtc",
201 .owner = THIS_MODULE, 201 .owner = THIS_MODULE,
202 }, 202 },
203 .remove = __devexit_p(ls1x_rtc_remove), 203 .remove = ls1x_rtc_remove,
204 .probe = ls1x_rtc_probe, 204 .probe = ls1x_rtc_probe,
205}; 205};
206 206
diff --git a/drivers/rtc/rtc-m41t93.c b/drivers/rtc/rtc-m41t93.c
index efab3d48cb15..49169680786e 100644
--- a/drivers/rtc/rtc-m41t93.c
+++ b/drivers/rtc/rtc-m41t93.c
@@ -170,7 +170,7 @@ static const struct rtc_class_ops m41t93_rtc_ops = {
170 170
171static struct spi_driver m41t93_driver; 171static struct spi_driver m41t93_driver;
172 172
173static int __devinit m41t93_probe(struct spi_device *spi) 173static int m41t93_probe(struct spi_device *spi)
174{ 174{
175 struct rtc_device *rtc; 175 struct rtc_device *rtc;
176 int res; 176 int res;
@@ -195,7 +195,7 @@ static int __devinit m41t93_probe(struct spi_device *spi)
195} 195}
196 196
197 197
198static int __devexit m41t93_remove(struct spi_device *spi) 198static int m41t93_remove(struct spi_device *spi)
199{ 199{
200 struct rtc_device *rtc = spi_get_drvdata(spi); 200 struct rtc_device *rtc = spi_get_drvdata(spi);
201 201
@@ -211,7 +211,7 @@ static struct spi_driver m41t93_driver = {
211 .owner = THIS_MODULE, 211 .owner = THIS_MODULE,
212 }, 212 },
213 .probe = m41t93_probe, 213 .probe = m41t93_probe,
214 .remove = __devexit_p(m41t93_remove), 214 .remove = m41t93_remove,
215}; 215};
216 216
217module_spi_driver(m41t93_driver); 217module_spi_driver(m41t93_driver);
diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c
index 6e78193e026b..89266c6764bc 100644
--- a/drivers/rtc/rtc-m41t94.c
+++ b/drivers/rtc/rtc-m41t94.c
@@ -110,7 +110,7 @@ static const struct rtc_class_ops m41t94_rtc_ops = {
110 110
111static struct spi_driver m41t94_driver; 111static struct spi_driver m41t94_driver;
112 112
113static int __devinit m41t94_probe(struct spi_device *spi) 113static int m41t94_probe(struct spi_device *spi)
114{ 114{
115 struct rtc_device *rtc; 115 struct rtc_device *rtc;
116 int res; 116 int res;
@@ -134,7 +134,7 @@ static int __devinit m41t94_probe(struct spi_device *spi)
134 return 0; 134 return 0;
135} 135}
136 136
137static int __devexit m41t94_remove(struct spi_device *spi) 137static int m41t94_remove(struct spi_device *spi)
138{ 138{
139 struct rtc_device *rtc = spi_get_drvdata(spi); 139 struct rtc_device *rtc = spi_get_drvdata(spi);
140 140
@@ -150,7 +150,7 @@ static struct spi_driver m41t94_driver = {
150 .owner = THIS_MODULE, 150 .owner = THIS_MODULE,
151 }, 151 },
152 .probe = m41t94_probe, 152 .probe = m41t94_probe,
153 .remove = __devexit_p(m41t94_remove), 153 .remove = m41t94_remove,
154}; 154};
155 155
156module_spi_driver(m41t94_driver); 156module_spi_driver(m41t94_driver);
diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c
index f9e3b3583733..31c9190a1fcb 100644
--- a/drivers/rtc/rtc-m48t35.c
+++ b/drivers/rtc/rtc-m48t35.c
@@ -141,7 +141,7 @@ static const struct rtc_class_ops m48t35_ops = {
141 .set_time = m48t35_set_time, 141 .set_time = m48t35_set_time,
142}; 142};
143 143
144static int __devinit m48t35_probe(struct platform_device *pdev) 144static int m48t35_probe(struct platform_device *pdev)
145{ 145{
146 struct resource *res; 146 struct resource *res;
147 struct m48t35_priv *priv; 147 struct m48t35_priv *priv;
@@ -194,7 +194,7 @@ out:
194 return ret; 194 return ret;
195} 195}
196 196
197static int __devexit m48t35_remove(struct platform_device *pdev) 197static int m48t35_remove(struct platform_device *pdev)
198{ 198{
199 struct m48t35_priv *priv = platform_get_drvdata(pdev); 199 struct m48t35_priv *priv = platform_get_drvdata(pdev);
200 200
@@ -213,7 +213,7 @@ static struct platform_driver m48t35_platform_driver = {
213 .owner = THIS_MODULE, 213 .owner = THIS_MODULE,
214 }, 214 },
215 .probe = m48t35_probe, 215 .probe = m48t35_probe,
216 .remove = __devexit_p(m48t35_remove), 216 .remove = m48t35_remove,
217}; 217};
218 218
219module_platform_driver(m48t35_platform_driver); 219module_platform_driver(m48t35_platform_driver);
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index 30ebfec9fd2b..130f29af3869 100644
--- a/drivers/rtc/rtc-m48t59.c
+++ b/drivers/rtc/rtc-m48t59.c
@@ -383,7 +383,7 @@ static struct bin_attribute m48t59_nvram_attr = {
383 .write = m48t59_nvram_write, 383 .write = m48t59_nvram_write,
384}; 384};
385 385
386static int __devinit m48t59_rtc_probe(struct platform_device *pdev) 386static int m48t59_rtc_probe(struct platform_device *pdev)
387{ 387{
388 struct m48t59_plat_data *pdata = pdev->dev.platform_data; 388 struct m48t59_plat_data *pdata = pdev->dev.platform_data;
389 struct m48t59_private *m48t59 = NULL; 389 struct m48t59_private *m48t59 = NULL;
@@ -501,7 +501,7 @@ out:
501 return ret; 501 return ret;
502} 502}
503 503
504static int __devexit m48t59_rtc_remove(struct platform_device *pdev) 504static int m48t59_rtc_remove(struct platform_device *pdev)
505{ 505{
506 struct m48t59_private *m48t59 = platform_get_drvdata(pdev); 506 struct m48t59_private *m48t59 = platform_get_drvdata(pdev);
507 struct m48t59_plat_data *pdata = pdev->dev.platform_data; 507 struct m48t59_plat_data *pdata = pdev->dev.platform_data;
@@ -527,7 +527,7 @@ static struct platform_driver m48t59_rtc_driver = {
527 .owner = THIS_MODULE, 527 .owner = THIS_MODULE,
528 }, 528 },
529 .probe = m48t59_rtc_probe, 529 .probe = m48t59_rtc_probe,
530 .remove = __devexit_p(m48t59_rtc_remove), 530 .remove = m48t59_rtc_remove,
531}; 531};
532 532
533module_platform_driver(m48t59_rtc_driver); 533module_platform_driver(m48t59_rtc_driver);
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index 863fb3363aa6..2ffbcacd2439 100644
--- a/drivers/rtc/rtc-m48t86.c
+++ b/drivers/rtc/rtc-m48t86.c
@@ -144,7 +144,7 @@ static const struct rtc_class_ops m48t86_rtc_ops = {
144 .proc = m48t86_rtc_proc, 144 .proc = m48t86_rtc_proc,
145}; 145};
146 146
147static int __devinit m48t86_rtc_probe(struct platform_device *dev) 147static int m48t86_rtc_probe(struct platform_device *dev)
148{ 148{
149 unsigned char reg; 149 unsigned char reg;
150 struct m48t86_ops *ops = dev->dev.platform_data; 150 struct m48t86_ops *ops = dev->dev.platform_data;
@@ -164,7 +164,7 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev)
164 return 0; 164 return 0;
165} 165}
166 166
167static int __devexit m48t86_rtc_remove(struct platform_device *dev) 167static int m48t86_rtc_remove(struct platform_device *dev)
168{ 168{
169 struct rtc_device *rtc = platform_get_drvdata(dev); 169 struct rtc_device *rtc = platform_get_drvdata(dev);
170 170
@@ -182,7 +182,7 @@ static struct platform_driver m48t86_rtc_platform_driver = {
182 .owner = THIS_MODULE, 182 .owner = THIS_MODULE,
183 }, 183 },
184 .probe = m48t86_rtc_probe, 184 .probe = m48t86_rtc_probe,
185 .remove = __devexit_p(m48t86_rtc_remove), 185 .remove = m48t86_rtc_remove,
186}; 186};
187 187
188module_platform_driver(m48t86_rtc_platform_driver); 188module_platform_driver(m48t86_rtc_platform_driver);
diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c
index 36c74d22e8b5..7d0bf698b79e 100644
--- a/drivers/rtc/rtc-max6902.c
+++ b/drivers/rtc/rtc-max6902.c
@@ -120,7 +120,7 @@ static const struct rtc_class_ops max6902_rtc_ops = {
120 .set_time = max6902_set_time, 120 .set_time = max6902_set_time,
121}; 121};
122 122
123static int __devinit max6902_probe(struct spi_device *spi) 123static int max6902_probe(struct spi_device *spi)
124{ 124{
125 struct rtc_device *rtc; 125 struct rtc_device *rtc;
126 unsigned char tmp; 126 unsigned char tmp;
@@ -143,7 +143,7 @@ static int __devinit max6902_probe(struct spi_device *spi)
143 return 0; 143 return 0;
144} 144}
145 145
146static int __devexit max6902_remove(struct spi_device *spi) 146static int max6902_remove(struct spi_device *spi)
147{ 147{
148 struct rtc_device *rtc = dev_get_drvdata(&spi->dev); 148 struct rtc_device *rtc = dev_get_drvdata(&spi->dev);
149 149
@@ -157,7 +157,7 @@ static struct spi_driver max6902_driver = {
157 .owner = THIS_MODULE, 157 .owner = THIS_MODULE,
158 }, 158 },
159 .probe = max6902_probe, 159 .probe = max6902_probe,
160 .remove = __devexit_p(max6902_remove), 160 .remove = max6902_remove,
161}; 161};
162 162
163module_spi_driver(max6902_driver); 163module_spi_driver(max6902_driver);
diff --git a/drivers/rtc/rtc-max8907.c b/drivers/rtc/rtc-max8907.c
index e094ffa434f8..1d049da16c85 100644
--- a/drivers/rtc/rtc-max8907.c
+++ b/drivers/rtc/rtc-max8907.c
@@ -176,7 +176,7 @@ static const struct rtc_class_ops max8907_rtc_ops = {
176 .set_alarm = max8907_rtc_set_alarm, 176 .set_alarm = max8907_rtc_set_alarm,
177}; 177};
178 178
179static int __devinit max8907_rtc_probe(struct platform_device *pdev) 179static int max8907_rtc_probe(struct platform_device *pdev)
180{ 180{
181 struct max8907 *max8907 = dev_get_drvdata(pdev->dev.parent); 181 struct max8907 *max8907 = dev_get_drvdata(pdev->dev.parent);
182 struct max8907_rtc *rtc; 182 struct max8907_rtc *rtc;
@@ -220,7 +220,7 @@ err_unregister:
220 return ret; 220 return ret;
221} 221}
222 222
223static int __devexit max8907_rtc_remove(struct platform_device *pdev) 223static int max8907_rtc_remove(struct platform_device *pdev)
224{ 224{
225 struct max8907_rtc *rtc = platform_get_drvdata(pdev); 225 struct max8907_rtc *rtc = platform_get_drvdata(pdev);
226 226
@@ -236,7 +236,7 @@ static struct platform_driver max8907_rtc_driver = {
236 .owner = THIS_MODULE, 236 .owner = THIS_MODULE,
237 }, 237 },
238 .probe = max8907_rtc_probe, 238 .probe = max8907_rtc_probe,
239 .remove = __devexit_p(max8907_rtc_remove), 239 .remove = max8907_rtc_remove,
240}; 240};
241module_platform_driver(max8907_rtc_driver); 241module_platform_driver(max8907_rtc_driver);
242 242
diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c
index 34e4349611db..a0c8265646d2 100644
--- a/drivers/rtc/rtc-max8925.c
+++ b/drivers/rtc/rtc-max8925.c
@@ -247,7 +247,7 @@ static const struct rtc_class_ops max8925_rtc_ops = {
247 .set_alarm = max8925_rtc_set_alarm, 247 .set_alarm = max8925_rtc_set_alarm,
248}; 248};
249 249
250static int __devinit max8925_rtc_probe(struct platform_device *pdev) 250static int max8925_rtc_probe(struct platform_device *pdev)
251{ 251{
252 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); 252 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent);
253 struct max8925_rtc_info *info; 253 struct max8925_rtc_info *info;
@@ -292,7 +292,7 @@ out_irq:
292 return ret; 292 return ret;
293} 293}
294 294
295static int __devexit max8925_rtc_remove(struct platform_device *pdev) 295static int max8925_rtc_remove(struct platform_device *pdev)
296{ 296{
297 struct max8925_rtc_info *info = platform_get_drvdata(pdev); 297 struct max8925_rtc_info *info = platform_get_drvdata(pdev);
298 298
@@ -334,7 +334,7 @@ static struct platform_driver max8925_rtc_driver = {
334 .pm = &max8925_rtc_pm_ops, 334 .pm = &max8925_rtc_pm_ops,
335 }, 335 },
336 .probe = max8925_rtc_probe, 336 .probe = max8925_rtc_probe,
337 .remove = __devexit_p(max8925_rtc_remove), 337 .remove = max8925_rtc_remove,
338}; 338};
339 339
340module_platform_driver(max8925_rtc_driver); 340module_platform_driver(max8925_rtc_driver);
diff --git a/drivers/rtc/rtc-max8998.c b/drivers/rtc/rtc-max8998.c
index 7196f438c089..8f234a075e8f 100644
--- a/drivers/rtc/rtc-max8998.c
+++ b/drivers/rtc/rtc-max8998.c
@@ -249,7 +249,7 @@ static const struct rtc_class_ops max8998_rtc_ops = {
249 .alarm_irq_enable = max8998_rtc_alarm_irq_enable, 249 .alarm_irq_enable = max8998_rtc_alarm_irq_enable,
250}; 250};
251 251
252static int __devinit max8998_rtc_probe(struct platform_device *pdev) 252static int max8998_rtc_probe(struct platform_device *pdev)
253{ 253{
254 struct max8998_dev *max8998 = dev_get_drvdata(pdev->dev.parent); 254 struct max8998_dev *max8998 = dev_get_drvdata(pdev->dev.parent);
255 struct max8998_platform_data *pdata = dev_get_platdata(max8998->dev); 255 struct max8998_platform_data *pdata = dev_get_platdata(max8998->dev);
@@ -298,7 +298,7 @@ out_rtc:
298 return ret; 298 return ret;
299} 299}
300 300
301static int __devexit max8998_rtc_remove(struct platform_device *pdev) 301static int max8998_rtc_remove(struct platform_device *pdev)
302{ 302{
303 struct max8998_rtc_info *info = platform_get_drvdata(pdev); 303 struct max8998_rtc_info *info = platform_get_drvdata(pdev);
304 304
@@ -323,7 +323,7 @@ static struct platform_driver max8998_rtc_driver = {
323 .owner = THIS_MODULE, 323 .owner = THIS_MODULE,
324 }, 324 },
325 .probe = max8998_rtc_probe, 325 .probe = max8998_rtc_probe,
326 .remove = __devexit_p(max8998_rtc_remove), 326 .remove = max8998_rtc_remove,
327 .id_table = max8998_rtc_id, 327 .id_table = max8998_rtc_id,
328}; 328};
329 329
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c
index 029e421baaed..bec10be96f84 100644
--- a/drivers/rtc/rtc-mpc5121.c
+++ b/drivers/rtc/rtc-mpc5121.c
@@ -306,7 +306,7 @@ static const struct rtc_class_ops mpc5200_rtc_ops = {
306 .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable, 306 .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable,
307}; 307};
308 308
309static int __devinit mpc5121_rtc_probe(struct platform_device *op) 309static int mpc5121_rtc_probe(struct platform_device *op)
310{ 310{
311 struct mpc5121_rtc_data *rtc; 311 struct mpc5121_rtc_data *rtc;
312 int err = 0; 312 int err = 0;
@@ -382,7 +382,7 @@ out_free:
382 return err; 382 return err;
383} 383}
384 384
385static int __devexit mpc5121_rtc_remove(struct platform_device *op) 385static int mpc5121_rtc_remove(struct platform_device *op)
386{ 386{
387 struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev); 387 struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev);
388 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; 388 struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
@@ -403,7 +403,7 @@ static int __devexit mpc5121_rtc_remove(struct platform_device *op)
403 return 0; 403 return 0;
404} 404}
405 405
406static struct of_device_id mpc5121_rtc_match[] __devinitdata = { 406static struct of_device_id mpc5121_rtc_match[] = {
407 { .compatible = "fsl,mpc5121-rtc", }, 407 { .compatible = "fsl,mpc5121-rtc", },
408 { .compatible = "fsl,mpc5200-rtc", }, 408 { .compatible = "fsl,mpc5200-rtc", },
409 {}, 409 {},
@@ -416,7 +416,7 @@ static struct platform_driver mpc5121_rtc_driver = {
416 .of_match_table = mpc5121_rtc_match, 416 .of_match_table = mpc5121_rtc_match,
417 }, 417 },
418 .probe = mpc5121_rtc_probe, 418 .probe = mpc5121_rtc_probe,
419 .remove = __devexit_p(mpc5121_rtc_remove), 419 .remove = mpc5121_rtc_remove,
420}; 420};
421 421
422module_platform_driver(mpc5121_rtc_driver); 422module_platform_driver(mpc5121_rtc_driver);
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index f51719bf4a75..578baf9d9725 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -322,8 +322,8 @@ static irqreturn_t mrst_rtc_irq(int irq, void *p)
322 return IRQ_NONE; 322 return IRQ_NONE;
323} 323}
324 324
325static int __devinit 325static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem,
326vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) 326 int rtc_irq)
327{ 327{
328 int retval = 0; 328 int retval = 0;
329 unsigned char rtc_control; 329 unsigned char rtc_control;
@@ -394,7 +394,7 @@ static void rtc_mrst_do_shutdown(void)
394 spin_unlock_irq(&rtc_lock); 394 spin_unlock_irq(&rtc_lock);
395} 395}
396 396
397static void __devexit rtc_mrst_do_remove(struct device *dev) 397static void rtc_mrst_do_remove(struct device *dev)
398{ 398{
399 struct mrst_rtc *mrst = dev_get_drvdata(dev); 399 struct mrst_rtc *mrst = dev_get_drvdata(dev);
400 struct resource *iomem; 400 struct resource *iomem;
@@ -503,14 +503,14 @@ static inline int mrst_poweroff(struct device *dev)
503 503
504#endif 504#endif
505 505
506static int __devinit vrtc_mrst_platform_probe(struct platform_device *pdev) 506static int vrtc_mrst_platform_probe(struct platform_device *pdev)
507{ 507{
508 return vrtc_mrst_do_probe(&pdev->dev, 508 return vrtc_mrst_do_probe(&pdev->dev,
509 platform_get_resource(pdev, IORESOURCE_MEM, 0), 509 platform_get_resource(pdev, IORESOURCE_MEM, 0),
510 platform_get_irq(pdev, 0)); 510 platform_get_irq(pdev, 0));
511} 511}
512 512
513static int __devexit vrtc_mrst_platform_remove(struct platform_device *pdev) 513static int vrtc_mrst_platform_remove(struct platform_device *pdev)
514{ 514{
515 rtc_mrst_do_remove(&pdev->dev); 515 rtc_mrst_do_remove(&pdev->dev);
516 return 0; 516 return 0;
@@ -528,7 +528,7 @@ MODULE_ALIAS("platform:vrtc_mrst");
528 528
529static struct platform_driver vrtc_mrst_platform_driver = { 529static struct platform_driver vrtc_mrst_platform_driver = {
530 .probe = vrtc_mrst_platform_probe, 530 .probe = vrtc_mrst_platform_probe,
531 .remove = __devexit_p(vrtc_mrst_platform_remove), 531 .remove = vrtc_mrst_platform_remove,
532 .shutdown = vrtc_mrst_platform_shutdown, 532 .shutdown = vrtc_mrst_platform_shutdown,
533 .driver = { 533 .driver = {
534 .name = (char *) driver_name, 534 .name = (char *) driver_name,
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c
index ebc1649d45d6..57233c885998 100644
--- a/drivers/rtc/rtc-mv.c
+++ b/drivers/rtc/rtc-mv.c
@@ -215,7 +215,7 @@ static const struct rtc_class_ops mv_rtc_alarm_ops = {
215 .alarm_irq_enable = mv_rtc_alarm_irq_enable, 215 .alarm_irq_enable = mv_rtc_alarm_irq_enable,
216}; 216};
217 217
218static int __devinit mv_rtc_probe(struct platform_device *pdev) 218static int mv_rtc_probe(struct platform_device *pdev)
219{ 219{
220 struct resource *res; 220 struct resource *res;
221 struct rtc_plat_data *pdata; 221 struct rtc_plat_data *pdata;
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index 7304139934aa..1c3ef7289565 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -368,7 +368,7 @@ static struct rtc_class_ops mxc_rtc_ops = {
368 .alarm_irq_enable = mxc_rtc_alarm_irq_enable, 368 .alarm_irq_enable = mxc_rtc_alarm_irq_enable,
369}; 369};
370 370
371static int __devinit mxc_rtc_probe(struct platform_device *pdev) 371static int mxc_rtc_probe(struct platform_device *pdev)
372{ 372{
373 struct resource *res; 373 struct resource *res;
374 struct rtc_device *rtc; 374 struct rtc_device *rtc;
@@ -460,7 +460,7 @@ exit_free_pdata:
460 return ret; 460 return ret;
461} 461}
462 462
463static int __devexit mxc_rtc_remove(struct platform_device *pdev) 463static int mxc_rtc_remove(struct platform_device *pdev)
464{ 464{
465 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 465 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
466 466
@@ -509,7 +509,7 @@ static struct platform_driver mxc_rtc_driver = {
509 }, 509 },
510 .id_table = imx_rtc_devtype, 510 .id_table = imx_rtc_devtype,
511 .probe = mxc_rtc_probe, 511 .probe = mxc_rtc_probe,
512 .remove = __devexit_p(mxc_rtc_remove), 512 .remove = mxc_rtc_remove,
513}; 513};
514 514
515module_platform_driver(mxc_rtc_driver) 515module_platform_driver(mxc_rtc_driver)
diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c
index b79010987d1e..a63680850fef 100644
--- a/drivers/rtc/rtc-nuc900.c
+++ b/drivers/rtc/rtc-nuc900.c
@@ -222,7 +222,7 @@ static struct rtc_class_ops nuc900_rtc_ops = {
222 .alarm_irq_enable = nuc900_alarm_irq_enable, 222 .alarm_irq_enable = nuc900_alarm_irq_enable,
223}; 223};
224 224
225static int __devinit nuc900_rtc_probe(struct platform_device *pdev) 225static int nuc900_rtc_probe(struct platform_device *pdev)
226{ 226{
227 struct resource *res; 227 struct resource *res;
228 struct nuc900_rtc *nuc900_rtc; 228 struct nuc900_rtc *nuc900_rtc;
@@ -284,7 +284,7 @@ fail1: kfree(nuc900_rtc);
284 return err; 284 return err;
285} 285}
286 286
287static int __devexit nuc900_rtc_remove(struct platform_device *pdev) 287static int nuc900_rtc_remove(struct platform_device *pdev)
288{ 288{
289 struct nuc900_rtc *nuc900_rtc = platform_get_drvdata(pdev); 289 struct nuc900_rtc *nuc900_rtc = platform_get_drvdata(pdev);
290 struct resource *res; 290 struct resource *res;
@@ -304,7 +304,7 @@ static int __devexit nuc900_rtc_remove(struct platform_device *pdev)
304} 304}
305 305
306static struct platform_driver nuc900_rtc_driver = { 306static struct platform_driver nuc900_rtc_driver = {
307 .remove = __devexit_p(nuc900_rtc_remove), 307 .remove = nuc900_rtc_remove,
308 .driver = { 308 .driver = {
309 .name = "nuc900-rtc", 309 .name = "nuc900-rtc",
310 .owner = THIS_MODULE, 310 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-pcap.c b/drivers/rtc/rtc-pcap.c
index cd4f198cc2ef..e0019cd0bf71 100644
--- a/drivers/rtc/rtc-pcap.c
+++ b/drivers/rtc/rtc-pcap.c
@@ -139,7 +139,7 @@ static const struct rtc_class_ops pcap_rtc_ops = {
139 .alarm_irq_enable = pcap_rtc_alarm_irq_enable, 139 .alarm_irq_enable = pcap_rtc_alarm_irq_enable,
140}; 140};
141 141
142static int __devinit pcap_rtc_probe(struct platform_device *pdev) 142static int pcap_rtc_probe(struct platform_device *pdev)
143{ 143{
144 struct pcap_rtc *pcap_rtc; 144 struct pcap_rtc *pcap_rtc;
145 int timer_irq, alarm_irq; 145 int timer_irq, alarm_irq;
@@ -183,7 +183,7 @@ fail_rtc:
183 return err; 183 return err;
184} 184}
185 185
186static int __devexit pcap_rtc_remove(struct platform_device *pdev) 186static int pcap_rtc_remove(struct platform_device *pdev)
187{ 187{
188 struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); 188 struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev);
189 189
@@ -196,7 +196,7 @@ static int __devexit pcap_rtc_remove(struct platform_device *pdev)
196} 196}
197 197
198static struct platform_driver pcap_rtc_driver = { 198static struct platform_driver pcap_rtc_driver = {
199 .remove = __devexit_p(pcap_rtc_remove), 199 .remove = pcap_rtc_remove,
200 .driver = { 200 .driver = {
201 .name = "pcap-rtc", 201 .name = "pcap-rtc",
202 .owner = THIS_MODULE, 202 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c
index 13e4df63974f..02b742afa761 100644
--- a/drivers/rtc/rtc-pcf2123.c
+++ b/drivers/rtc/rtc-pcf2123.c
@@ -219,7 +219,7 @@ static const struct rtc_class_ops pcf2123_rtc_ops = {
219 .set_time = pcf2123_rtc_set_time, 219 .set_time = pcf2123_rtc_set_time,
220}; 220};
221 221
222static int __devinit pcf2123_probe(struct spi_device *spi) 222static int pcf2123_probe(struct spi_device *spi)
223{ 223{
224 struct rtc_device *rtc; 224 struct rtc_device *rtc;
225 struct pcf2123_plat_data *pdata; 225 struct pcf2123_plat_data *pdata;
@@ -319,7 +319,7 @@ kfree_exit:
319 return ret; 319 return ret;
320} 320}
321 321
322static int __devexit pcf2123_remove(struct spi_device *spi) 322static int pcf2123_remove(struct spi_device *spi)
323{ 323{
324 struct pcf2123_plat_data *pdata = spi->dev.platform_data; 324 struct pcf2123_plat_data *pdata = spi->dev.platform_data;
325 int i; 325 int i;
@@ -345,7 +345,7 @@ static struct spi_driver pcf2123_driver = {
345 .owner = THIS_MODULE, 345 .owner = THIS_MODULE,
346 }, 346 },
347 .probe = pcf2123_probe, 347 .probe = pcf2123_probe,
348 .remove = __devexit_p(pcf2123_remove), 348 .remove = pcf2123_remove,
349}; 349};
350 350
351module_spi_driver(pcf2123_driver); 351module_spi_driver(pcf2123_driver);
diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c
index a20202f9ee57..e9f3135d305f 100644
--- a/drivers/rtc/rtc-pcf50633.c
+++ b/drivers/rtc/rtc-pcf50633.c
@@ -248,7 +248,7 @@ static void pcf50633_rtc_irq(int irq, void *data)
248 rtc->alarm_pending = 1; 248 rtc->alarm_pending = 1;
249} 249}
250 250
251static int __devinit pcf50633_rtc_probe(struct platform_device *pdev) 251static int pcf50633_rtc_probe(struct platform_device *pdev)
252{ 252{
253 struct pcf50633_rtc *rtc; 253 struct pcf50633_rtc *rtc;
254 254
@@ -272,7 +272,7 @@ static int __devinit pcf50633_rtc_probe(struct platform_device *pdev)
272 return 0; 272 return 0;
273} 273}
274 274
275static int __devexit pcf50633_rtc_remove(struct platform_device *pdev) 275static int pcf50633_rtc_remove(struct platform_device *pdev)
276{ 276{
277 struct pcf50633_rtc *rtc; 277 struct pcf50633_rtc *rtc;
278 278
@@ -291,7 +291,7 @@ static struct platform_driver pcf50633_rtc_driver = {
291 .name = "pcf50633-rtc", 291 .name = "pcf50633-rtc",
292 }, 292 },
293 .probe = pcf50633_rtc_probe, 293 .probe = pcf50633_rtc_probe,
294 .remove = __devexit_p(pcf50633_rtc_remove), 294 .remove = pcf50633_rtc_remove,
295}; 295};
296 296
297module_platform_driver(pcf50633_rtc_driver); 297module_platform_driver(pcf50633_rtc_driver);
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 98e3a2b681e6..7098ee89bd29 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -296,7 +296,7 @@ static const struct i2c_device_id pcf8563_id[] = {
296MODULE_DEVICE_TABLE(i2c, pcf8563_id); 296MODULE_DEVICE_TABLE(i2c, pcf8563_id);
297 297
298#ifdef CONFIG_OF 298#ifdef CONFIG_OF
299static const struct of_device_id pcf8563_of_match[] __devinitconst = { 299static const struct of_device_id pcf8563_of_match[] = {
300 { .compatible = "nxp,pcf8563" }, 300 { .compatible = "nxp,pcf8563" },
301 {} 301 {}
302}; 302};
diff --git a/drivers/rtc/rtc-pcf8583.c b/drivers/rtc/rtc-pcf8583.c
index 019ff3571168..3415b8f18555 100644
--- a/drivers/rtc/rtc-pcf8583.c
+++ b/drivers/rtc/rtc-pcf8583.c
@@ -294,7 +294,7 @@ exit_kfree:
294 return err; 294 return err;
295} 295}
296 296
297static int __devexit pcf8583_remove(struct i2c_client *client) 297static int pcf8583_remove(struct i2c_client *client)
298{ 298{
299 struct pcf8583 *pcf8583 = i2c_get_clientdata(client); 299 struct pcf8583 *pcf8583 = i2c_get_clientdata(client);
300 300
@@ -316,7 +316,7 @@ static struct i2c_driver pcf8583_driver = {
316 .owner = THIS_MODULE, 316 .owner = THIS_MODULE,
317 }, 317 },
318 .probe = pcf8583_probe, 318 .probe = pcf8583_probe,
319 .remove = __devexit_p(pcf8583_remove), 319 .remove = pcf8583_remove,
320 .id_table = pcf8583_id, 320 .id_table = pcf8583_id,
321}; 321};
322 322
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index d00bd24342a3..f1a6557261f3 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -382,7 +382,7 @@ rtc_alarm_handled:
382 return IRQ_HANDLED; 382 return IRQ_HANDLED;
383} 383}
384 384
385static int __devinit pm8xxx_rtc_probe(struct platform_device *pdev) 385static int pm8xxx_rtc_probe(struct platform_device *pdev)
386{ 386{
387 int rc; 387 int rc;
388 u8 ctrl_reg; 388 u8 ctrl_reg;
@@ -485,7 +485,7 @@ fail_rtc_enable:
485 return rc; 485 return rc;
486} 486}
487 487
488static int __devexit pm8xxx_rtc_remove(struct platform_device *pdev) 488static int pm8xxx_rtc_remove(struct platform_device *pdev)
489{ 489{
490 struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev); 490 struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev);
491 491
@@ -524,7 +524,7 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_rtc_pm_ops, pm8xxx_rtc_suspend, pm8xxx_rtc_resum
524 524
525static struct platform_driver pm8xxx_rtc_driver = { 525static struct platform_driver pm8xxx_rtc_driver = {
526 .probe = pm8xxx_rtc_probe, 526 .probe = pm8xxx_rtc_probe,
527 .remove = __devexit_p(pm8xxx_rtc_remove), 527 .remove = pm8xxx_rtc_remove,
528 .driver = { 528 .driver = {
529 .name = PM8XXX_RTC_DEV_NAME, 529 .name = PM8XXX_RTC_DEV_NAME,
530 .owner = THIS_MODULE, 530 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c
index ab0acaeb2371..0407e13d4de4 100644
--- a/drivers/rtc/rtc-puv3.c
+++ b/drivers/rtc/rtc-puv3.c
@@ -220,7 +220,7 @@ static void puv3_rtc_enable(struct platform_device *pdev, int en)
220 } 220 }
221} 221}
222 222
223static int __devexit puv3_rtc_remove(struct platform_device *dev) 223static int puv3_rtc_remove(struct platform_device *dev)
224{ 224{
225 struct rtc_device *rtc = platform_get_drvdata(dev); 225 struct rtc_device *rtc = platform_get_drvdata(dev);
226 226
@@ -236,7 +236,7 @@ static int __devexit puv3_rtc_remove(struct platform_device *dev)
236 return 0; 236 return 0;
237} 237}
238 238
239static int __devinit puv3_rtc_probe(struct platform_device *pdev) 239static int puv3_rtc_probe(struct platform_device *pdev)
240{ 240{
241 struct rtc_device *rtc; 241 struct rtc_device *rtc;
242 struct resource *res; 242 struct resource *res;
@@ -328,7 +328,7 @@ static int puv3_rtc_resume(struct platform_device *pdev)
328 328
329static struct platform_driver puv3_rtc_driver = { 329static struct platform_driver puv3_rtc_driver = {
330 .probe = puv3_rtc_probe, 330 .probe = puv3_rtc_probe,
331 .remove = __devexit_p(puv3_rtc_remove), 331 .remove = puv3_rtc_remove,
332 .suspend = puv3_rtc_suspend, 332 .suspend = puv3_rtc_suspend,
333 .resume = puv3_rtc_resume, 333 .resume = puv3_rtc_resume,
334 .driver = { 334 .driver = {
diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c
index 2c183ebff715..7726f4a4f2d0 100644
--- a/drivers/rtc/rtc-r9701.c
+++ b/drivers/rtc/rtc-r9701.c
@@ -119,7 +119,7 @@ static const struct rtc_class_ops r9701_rtc_ops = {
119 .set_time = r9701_set_datetime, 119 .set_time = r9701_set_datetime,
120}; 120};
121 121
122static int __devinit r9701_probe(struct spi_device *spi) 122static int r9701_probe(struct spi_device *spi)
123{ 123{
124 struct rtc_device *rtc; 124 struct rtc_device *rtc;
125 struct rtc_time dt; 125 struct rtc_time dt;
@@ -164,7 +164,7 @@ static int __devinit r9701_probe(struct spi_device *spi)
164 return 0; 164 return 0;
165} 165}
166 166
167static int __devexit r9701_remove(struct spi_device *spi) 167static int r9701_remove(struct spi_device *spi)
168{ 168{
169 struct rtc_device *rtc = dev_get_drvdata(&spi->dev); 169 struct rtc_device *rtc = dev_get_drvdata(&spi->dev);
170 170
@@ -178,7 +178,7 @@ static struct spi_driver r9701_driver = {
178 .owner = THIS_MODULE, 178 .owner = THIS_MODULE,
179 }, 179 },
180 .probe = r9701_probe, 180 .probe = r9701_probe,
181 .remove = __devexit_p(r9701_remove), 181 .remove = r9701_remove,
182}; 182};
183 183
184module_spi_driver(r9701_driver); 184module_spi_driver(r9701_driver);
diff --git a/drivers/rtc/rtc-rc5t583.c b/drivers/rtc/rtc-rc5t583.c
index cdb140c29c56..eb3194d664a8 100644
--- a/drivers/rtc/rtc-rc5t583.c
+++ b/drivers/rtc/rtc-rc5t583.c
@@ -211,7 +211,7 @@ static const struct rtc_class_ops rc5t583_rtc_ops = {
211 .alarm_irq_enable = rc5t583_rtc_alarm_irq_enable, 211 .alarm_irq_enable = rc5t583_rtc_alarm_irq_enable,
212}; 212};
213 213
214static int __devinit rc5t583_rtc_probe(struct platform_device *pdev) 214static int rc5t583_rtc_probe(struct platform_device *pdev)
215{ 215{
216 struct rc5t583 *rc5t583 = dev_get_drvdata(pdev->dev.parent); 216 struct rc5t583 *rc5t583 = dev_get_drvdata(pdev->dev.parent);
217 struct rc5t583_rtc *ricoh_rtc; 217 struct rc5t583_rtc *ricoh_rtc;
@@ -271,7 +271,7 @@ static int __devinit rc5t583_rtc_probe(struct platform_device *pdev)
271 * Disable rc5t583 RTC interrupts. 271 * Disable rc5t583 RTC interrupts.
272 * Sets status flag to free. 272 * Sets status flag to free.
273 */ 273 */
274static int __devexit rc5t583_rtc_remove(struct platform_device *pdev) 274static int rc5t583_rtc_remove(struct platform_device *pdev)
275{ 275{
276 struct rc5t583_rtc *rc5t583_rtc = dev_get_drvdata(&pdev->dev); 276 struct rc5t583_rtc *rc5t583_rtc = dev_get_drvdata(&pdev->dev);
277 277
@@ -317,7 +317,7 @@ static const struct dev_pm_ops rc5t583_rtc_pm_ops = {
317 317
318static struct platform_driver rc5t583_rtc_driver = { 318static struct platform_driver rc5t583_rtc_driver = {
319 .probe = rc5t583_rtc_probe, 319 .probe = rc5t583_rtc_probe,
320 .remove = __devexit_p(rc5t583_rtc_remove), 320 .remove = rc5t583_rtc_remove,
321 .driver = { 321 .driver = {
322 .owner = THIS_MODULE, 322 .owner = THIS_MODULE,
323 .name = "rtc-rc5t583", 323 .name = "rtc-rc5t583",
diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c
index e3ff179b99ca..d1aee793ecc8 100644
--- a/drivers/rtc/rtc-rs5c313.c
+++ b/drivers/rtc/rtc-rs5c313.c
@@ -377,7 +377,7 @@ static int rs5c313_rtc_probe(struct platform_device *pdev)
377 return 0; 377 return 0;
378} 378}
379 379
380static int __devexit rs5c313_rtc_remove(struct platform_device *pdev) 380static int rs5c313_rtc_remove(struct platform_device *pdev)
381{ 381{
382 struct rtc_device *rtc = platform_get_drvdata( pdev ); 382 struct rtc_device *rtc = platform_get_drvdata( pdev );
383 383
@@ -392,7 +392,7 @@ static struct platform_driver rs5c313_rtc_platform_driver = {
392 .owner = THIS_MODULE, 392 .owner = THIS_MODULE,
393 }, 393 },
394 .probe = rs5c313_rtc_probe, 394 .probe = rs5c313_rtc_probe,
395 .remove = __devexit_p( rs5c313_rtc_remove ), 395 .remove = rs5c313_rtc_remove,
396}; 396};
397 397
398static int __init rs5c313_rtc_init(void) 398static int __init rs5c313_rtc_init(void)
diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c
index fd5c7af04ae5..72ef10be8662 100644
--- a/drivers/rtc/rtc-rs5c348.c
+++ b/drivers/rtc/rtc-rs5c348.c
@@ -152,7 +152,7 @@ static const struct rtc_class_ops rs5c348_rtc_ops = {
152 152
153static struct spi_driver rs5c348_driver; 153static struct spi_driver rs5c348_driver;
154 154
155static int __devinit rs5c348_probe(struct spi_device *spi) 155static int rs5c348_probe(struct spi_device *spi)
156{ 156{
157 int ret; 157 int ret;
158 struct rtc_device *rtc; 158 struct rtc_device *rtc;
@@ -218,7 +218,7 @@ static int __devinit rs5c348_probe(struct spi_device *spi)
218 return ret; 218 return ret;
219} 219}
220 220
221static int __devexit rs5c348_remove(struct spi_device *spi) 221static int rs5c348_remove(struct spi_device *spi)
222{ 222{
223 struct rs5c348_plat_data *pdata = spi->dev.platform_data; 223 struct rs5c348_plat_data *pdata = spi->dev.platform_data;
224 struct rtc_device *rtc = pdata->rtc; 224 struct rtc_device *rtc = pdata->rtc;
@@ -235,7 +235,7 @@ static struct spi_driver rs5c348_driver = {
235 .owner = THIS_MODULE, 235 .owner = THIS_MODULE,
236 }, 236 },
237 .probe = rs5c348_probe, 237 .probe = rs5c348_probe,
238 .remove = __devexit_p(rs5c348_remove), 238 .remove = rs5c348_remove,
239}; 239};
240 240
241module_spi_driver(rs5c348_driver); 241module_spi_driver(rs5c348_driver);
diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c
index 0fbe57b2f6d2..f8ee8ad7825e 100644
--- a/drivers/rtc/rtc-rv3029c2.c
+++ b/drivers/rtc/rtc-rv3029c2.c
@@ -385,8 +385,8 @@ static struct i2c_device_id rv3029c2_id[] = {
385}; 385};
386MODULE_DEVICE_TABLE(i2c, rv3029c2_id); 386MODULE_DEVICE_TABLE(i2c, rv3029c2_id);
387 387
388static int __devinit 388static int rv3029c2_probe(struct i2c_client *client,
389rv3029c2_probe(struct i2c_client *client, const struct i2c_device_id *id) 389 const struct i2c_device_id *id)
390{ 390{
391 struct rtc_device *rtc; 391 struct rtc_device *rtc;
392 int rc = 0; 392 int rc = 0;
@@ -418,7 +418,7 @@ exit_unregister:
418 return rc; 418 return rc;
419} 419}
420 420
421static int __devexit rv3029c2_remove(struct i2c_client *client) 421static int rv3029c2_remove(struct i2c_client *client)
422{ 422{
423 struct rtc_device *rtc = i2c_get_clientdata(client); 423 struct rtc_device *rtc = i2c_get_clientdata(client);
424 424
@@ -432,7 +432,7 @@ static struct i2c_driver rv3029c2_driver = {
432 .name = "rtc-rv3029c2", 432 .name = "rtc-rv3029c2",
433 }, 433 },
434 .probe = rv3029c2_probe, 434 .probe = rv3029c2_probe,
435 .remove = __devexit_p(rv3029c2_remove), 435 .remove = rv3029c2_remove,
436 .id_table = rv3029c2_id, 436 .id_table = rv3029c2_id,
437}; 437};
438 438
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c
index 0de902dc1cd5..0722d36b9c9a 100644
--- a/drivers/rtc/rtc-rx8025.c
+++ b/drivers/rtc/rtc-rx8025.c
@@ -534,8 +534,8 @@ static void rx8025_sysfs_unregister(struct device *dev)
534 device_remove_file(dev, &dev_attr_clock_adjust_ppb); 534 device_remove_file(dev, &dev_attr_clock_adjust_ppb);
535} 535}
536 536
537static int __devinit rx8025_probe(struct i2c_client *client, 537static int rx8025_probe(struct i2c_client *client,
538 const struct i2c_device_id *id) 538 const struct i2c_device_id *id)
539{ 539{
540 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 540 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
541 struct rx8025_data *rx8025; 541 struct rx8025_data *rx8025;
@@ -614,7 +614,7 @@ errout:
614 return err; 614 return err;
615} 615}
616 616
617static int __devexit rx8025_remove(struct i2c_client *client) 617static int rx8025_remove(struct i2c_client *client)
618{ 618{
619 struct rx8025_data *rx8025 = i2c_get_clientdata(client); 619 struct rx8025_data *rx8025 = i2c_get_clientdata(client);
620 struct mutex *lock = &rx8025->rtc->ops_lock; 620 struct mutex *lock = &rx8025->rtc->ops_lock;
@@ -640,7 +640,7 @@ static struct i2c_driver rx8025_driver = {
640 .owner = THIS_MODULE, 640 .owner = THIS_MODULE,
641 }, 641 },
642 .probe = rx8025_probe, 642 .probe = rx8025_probe,
643 .remove = __devexit_p(rx8025_remove), 643 .remove = rx8025_remove,
644 .id_table = rx8025_id, 644 .id_table = rx8025_id,
645}; 645};
646 646
diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c
index d84825124a7a..b0c272658fa2 100644
--- a/drivers/rtc/rtc-rx8581.c
+++ b/drivers/rtc/rtc-rx8581.c
@@ -228,8 +228,8 @@ static const struct rtc_class_ops rx8581_rtc_ops = {
228 .set_time = rx8581_rtc_set_time, 228 .set_time = rx8581_rtc_set_time,
229}; 229};
230 230
231static int __devinit rx8581_probe(struct i2c_client *client, 231static int rx8581_probe(struct i2c_client *client,
232 const struct i2c_device_id *id) 232 const struct i2c_device_id *id)
233{ 233{
234 struct rtc_device *rtc; 234 struct rtc_device *rtc;
235 235
@@ -251,7 +251,7 @@ static int __devinit rx8581_probe(struct i2c_client *client,
251 return 0; 251 return 0;
252} 252}
253 253
254static int __devexit rx8581_remove(struct i2c_client *client) 254static int rx8581_remove(struct i2c_client *client)
255{ 255{
256 struct rtc_device *rtc = i2c_get_clientdata(client); 256 struct rtc_device *rtc = i2c_get_clientdata(client);
257 257
@@ -272,7 +272,7 @@ static struct i2c_driver rx8581_driver = {
272 .owner = THIS_MODULE, 272 .owner = THIS_MODULE,
273 }, 273 },
274 .probe = rx8581_probe, 274 .probe = rx8581_probe,
275 .remove = __devexit_p(rx8581_remove), 275 .remove = rx8581_remove,
276 .id_table = rx8581_id, 276 .id_table = rx8581_id,
277}; 277};
278 278
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 4bd9414aee65..404651464d45 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -421,7 +421,7 @@ static void s3c_rtc_enable(struct platform_device *pdev, int en)
421 clk_disable(rtc_clk); 421 clk_disable(rtc_clk);
422} 422}
423 423
424static int __devexit s3c_rtc_remove(struct platform_device *dev) 424static int s3c_rtc_remove(struct platform_device *dev)
425{ 425{
426 struct rtc_device *rtc = platform_get_drvdata(dev); 426 struct rtc_device *rtc = platform_get_drvdata(dev);
427 427
@@ -451,7 +451,7 @@ static inline int s3c_rtc_get_driver_data(struct platform_device *pdev)
451 return platform_get_device_id(pdev)->driver_data; 451 return platform_get_device_id(pdev)->driver_data;
452} 452}
453 453
454static int __devinit s3c_rtc_probe(struct platform_device *pdev) 454static int s3c_rtc_probe(struct platform_device *pdev)
455{ 455{
456 struct rtc_device *rtc; 456 struct rtc_device *rtc;
457 struct rtc_time rtc_tm; 457 struct rtc_time rtc_tm;
@@ -686,7 +686,7 @@ MODULE_DEVICE_TABLE(platform, s3c_rtc_driver_ids);
686 686
687static struct platform_driver s3c_rtc_driver = { 687static struct platform_driver s3c_rtc_driver = {
688 .probe = s3c_rtc_probe, 688 .probe = s3c_rtc_probe,
689 .remove = __devexit_p(s3c_rtc_remove), 689 .remove = s3c_rtc_remove,
690 .suspend = s3c_rtc_suspend, 690 .suspend = s3c_rtc_suspend,
691 .resume = s3c_rtc_resume, 691 .resume = s3c_rtc_resume,
692 .id_table = s3c_rtc_driver_ids, 692 .id_table = s3c_rtc_driver_ids,
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index 3c0da333f465..d5ec7854a651 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -241,7 +241,7 @@ static irqreturn_t snvs_rtc_irq_handler(int irq, void *dev_id)
241 return events ? IRQ_HANDLED : IRQ_NONE; 241 return events ? IRQ_HANDLED : IRQ_NONE;
242} 242}
243 243
244static int __devinit snvs_rtc_probe(struct platform_device *pdev) 244static int snvs_rtc_probe(struct platform_device *pdev)
245{ 245{
246 struct snvs_rtc_data *data; 246 struct snvs_rtc_data *data;
247 struct resource *res; 247 struct resource *res;
@@ -294,7 +294,7 @@ static int __devinit snvs_rtc_probe(struct platform_device *pdev)
294 return 0; 294 return 0;
295} 295}
296 296
297static int __devexit snvs_rtc_remove(struct platform_device *pdev) 297static int snvs_rtc_remove(struct platform_device *pdev)
298{ 298{
299 struct snvs_rtc_data *data = platform_get_drvdata(pdev); 299 struct snvs_rtc_data *data = platform_get_drvdata(pdev);
300 300
@@ -327,7 +327,7 @@ static int snvs_rtc_resume(struct device *dev)
327 327
328static SIMPLE_DEV_PM_OPS(snvs_rtc_pm_ops, snvs_rtc_suspend, snvs_rtc_resume); 328static SIMPLE_DEV_PM_OPS(snvs_rtc_pm_ops, snvs_rtc_suspend, snvs_rtc_resume);
329 329
330static const struct of_device_id __devinitconst snvs_dt_ids[] = { 330static const struct of_device_id snvs_dt_ids[] = {
331 { .compatible = "fsl,sec-v4.0-mon-rtc-lp", }, 331 { .compatible = "fsl,sec-v4.0-mon-rtc-lp", },
332 { /* sentinel */ } 332 { /* sentinel */ }
333}; 333};
@@ -341,7 +341,7 @@ static struct platform_driver snvs_rtc_driver = {
341 .of_match_table = snvs_dt_ids, 341 .of_match_table = snvs_dt_ids,
342 }, 342 },
343 .probe = snvs_rtc_probe, 343 .probe = snvs_rtc_probe,
344 .remove = __devexit_p(snvs_rtc_remove), 344 .remove = snvs_rtc_remove,
345}; 345};
346module_platform_driver(snvs_rtc_driver); 346module_platform_driver(snvs_rtc_driver);
347 347
diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c
index 141fc945295f..c2121b5a01f2 100644
--- a/drivers/rtc/rtc-spear.c
+++ b/drivers/rtc/rtc-spear.c
@@ -351,7 +351,7 @@ static struct rtc_class_ops spear_rtc_ops = {
351 .alarm_irq_enable = spear_alarm_irq_enable, 351 .alarm_irq_enable = spear_alarm_irq_enable,
352}; 352};
353 353
354static int __devinit spear_rtc_probe(struct platform_device *pdev) 354static int spear_rtc_probe(struct platform_device *pdev)
355{ 355{
356 struct resource *res; 356 struct resource *res;
357 struct spear_rtc_config *config; 357 struct spear_rtc_config *config;
@@ -425,7 +425,7 @@ err_disable_clock:
425 return status; 425 return status;
426} 426}
427 427
428static int __devexit spear_rtc_remove(struct platform_device *pdev) 428static int spear_rtc_remove(struct platform_device *pdev)
429{ 429{
430 struct spear_rtc_config *config = platform_get_drvdata(pdev); 430 struct spear_rtc_config *config = platform_get_drvdata(pdev);
431 431
@@ -499,7 +499,7 @@ MODULE_DEVICE_TABLE(of, spear_rtc_id_table);
499 499
500static struct platform_driver spear_rtc_driver = { 500static struct platform_driver spear_rtc_driver = {
501 .probe = spear_rtc_probe, 501 .probe = spear_rtc_probe,
502 .remove = __devexit_p(spear_rtc_remove), 502 .remove = spear_rtc_remove,
503 .suspend = spear_rtc_suspend, 503 .suspend = spear_rtc_suspend,
504 .resume = spear_rtc_resume, 504 .resume = spear_rtc_resume,
505 .shutdown = spear_rtc_shutdown, 505 .shutdown = spear_rtc_shutdown,
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
index 279f5cfa691a..7e4a6f65cb91 100644
--- a/drivers/rtc/rtc-stk17ta8.c
+++ b/drivers/rtc/rtc-stk17ta8.c
@@ -285,7 +285,7 @@ static struct bin_attribute stk17ta8_nvram_attr = {
285 .write = stk17ta8_nvram_write, 285 .write = stk17ta8_nvram_write,
286}; 286};
287 287
288static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev) 288static int stk17ta8_rtc_probe(struct platform_device *pdev)
289{ 289{
290 struct resource *res; 290 struct resource *res;
291 unsigned int cal; 291 unsigned int cal;
@@ -347,7 +347,7 @@ static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev)
347 return ret; 347 return ret;
348} 348}
349 349
350static int __devexit stk17ta8_rtc_remove(struct platform_device *pdev) 350static int stk17ta8_rtc_remove(struct platform_device *pdev)
351{ 351{
352 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 352 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
353 353
@@ -363,7 +363,7 @@ MODULE_ALIAS("platform:stk17ta8");
363 363
364static struct platform_driver stk17ta8_rtc_driver = { 364static struct platform_driver stk17ta8_rtc_driver = {
365 .probe = stk17ta8_rtc_probe, 365 .probe = stk17ta8_rtc_probe,
366 .remove = __devexit_p(stk17ta8_rtc_remove), 366 .remove = stk17ta8_rtc_remove,
367 .driver = { 367 .driver = {
368 .name = "stk17ta8", 368 .name = "stk17ta8",
369 .owner = THIS_MODULE, 369 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index c006025cecc8..c84ea6659f49 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -303,7 +303,13 @@ static struct rtc_class_ops tegra_rtc_ops = {
303 .alarm_irq_enable = tegra_rtc_alarm_irq_enable, 303 .alarm_irq_enable = tegra_rtc_alarm_irq_enable,
304}; 304};
305 305
306static int __devinit tegra_rtc_probe(struct platform_device *pdev) 306static const struct of_device_id tegra_rtc_dt_match[] = {
307 { .compatible = "nvidia,tegra20-rtc", },
308 {}
309};
310MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match);
311
312static int tegra_rtc_probe(struct platform_device *pdev)
307{ 313{
308 struct tegra_rtc_info *info; 314 struct tegra_rtc_info *info;
309 struct resource *res; 315 struct resource *res;
@@ -375,7 +381,7 @@ err_dev_unreg:
375 return ret; 381 return ret;
376} 382}
377 383
378static int __devexit tegra_rtc_remove(struct platform_device *pdev) 384static int tegra_rtc_remove(struct platform_device *pdev)
379{ 385{
380 struct tegra_rtc_info *info = platform_get_drvdata(pdev); 386 struct tegra_rtc_info *info = platform_get_drvdata(pdev);
381 387
@@ -435,11 +441,12 @@ static void tegra_rtc_shutdown(struct platform_device *pdev)
435 441
436MODULE_ALIAS("platform:tegra_rtc"); 442MODULE_ALIAS("platform:tegra_rtc");
437static struct platform_driver tegra_rtc_driver = { 443static struct platform_driver tegra_rtc_driver = {
438 .remove = __devexit_p(tegra_rtc_remove), 444 .remove = tegra_rtc_remove,
439 .shutdown = tegra_rtc_shutdown, 445 .shutdown = tegra_rtc_shutdown,
440 .driver = { 446 .driver = {
441 .name = "tegra_rtc", 447 .name = "tegra_rtc",
442 .owner = THIS_MODULE, 448 .owner = THIS_MODULE,
449 .of_match_table = tegra_rtc_dt_match,
443 }, 450 },
444#ifdef CONFIG_PM 451#ifdef CONFIG_PM
445 .suspend = tegra_rtc_suspend, 452 .suspend = tegra_rtc_suspend,
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 974b9ae252ab..b92e0f6383e6 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -119,7 +119,7 @@ err:
119 return err; 119 return err;
120} 120}
121 121
122static int __devexit test_remove(struct platform_device *plat_dev) 122static int test_remove(struct platform_device *plat_dev)
123{ 123{
124 struct rtc_device *rtc = platform_get_drvdata(plat_dev); 124 struct rtc_device *rtc = platform_get_drvdata(plat_dev);
125 125
@@ -131,7 +131,7 @@ static int __devexit test_remove(struct platform_device *plat_dev)
131 131
132static struct platform_driver test_driver = { 132static struct platform_driver test_driver = {
133 .probe = test_probe, 133 .probe = test_probe,
134 .remove = __devexit_p(test_remove), 134 .remove = test_remove,
135 .driver = { 135 .driver = {
136 .name = "rtc-test", 136 .name = "rtc-test",
137 .owner = THIS_MODULE, 137 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-tile.c b/drivers/rtc/rtc-tile.c
index eb65dafee66e..62db4841078b 100644
--- a/drivers/rtc/rtc-tile.c
+++ b/drivers/rtc/rtc-tile.c
@@ -76,7 +76,7 @@ static const struct rtc_class_ops tile_rtc_ops = {
76/* 76/*
77 * Device probe routine. 77 * Device probe routine.
78 */ 78 */
79static int __devinit tile_rtc_probe(struct platform_device *dev) 79static int tile_rtc_probe(struct platform_device *dev)
80{ 80{
81 struct rtc_device *rtc; 81 struct rtc_device *rtc;
82 82
@@ -94,7 +94,7 @@ static int __devinit tile_rtc_probe(struct platform_device *dev)
94/* 94/*
95 * Device cleanup routine. 95 * Device cleanup routine.
96 */ 96 */
97static int __devexit tile_rtc_remove(struct platform_device *dev) 97static int tile_rtc_remove(struct platform_device *dev)
98{ 98{
99 struct rtc_device *rtc = platform_get_drvdata(dev); 99 struct rtc_device *rtc = platform_get_drvdata(dev);
100 100
@@ -112,7 +112,7 @@ static struct platform_driver tile_rtc_platform_driver = {
112 .owner = THIS_MODULE, 112 .owner = THIS_MODULE,
113 }, 113 },
114 .probe = tile_rtc_probe, 114 .probe = tile_rtc_probe,
115 .remove = __devexit_p(tile_rtc_remove), 115 .remove = tile_rtc_remove,
116}; 116};
117 117
118/* 118/*
diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c
new file mode 100644
index 000000000000..70f61b8e9e6f
--- /dev/null
+++ b/drivers/rtc/rtc-tps6586x.c
@@ -0,0 +1,356 @@
1/*
2 * rtc-tps6586x.c: RTC driver for TI PMIC TPS6586X
3 *
4 * Copyright (c) 2012, NVIDIA Corporation.
5 *
6 * Author: Laxman Dewangan <ldewangan@nvidia.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation version 2.
11 *
12 * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
13 * whether express or implied; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 * 02111-1307, USA
21 */
22
23#include <linux/device.h>
24#include <linux/err.h>
25#include <linux/init.h>
26#include <linux/kernel.h>
27#include <linux/mfd/tps6586x.h>
28#include <linux/module.h>
29#include <linux/platform_device.h>
30#include <linux/pm_runtime.h>
31#include <linux/rtc.h>
32#include <linux/slab.h>
33
34#define RTC_CTRL 0xc0
35#define POR_RESET_N BIT(7)
36#define OSC_SRC_SEL BIT(6)
37#define RTC_ENABLE BIT(5) /* enables alarm */
38#define RTC_BUF_ENABLE BIT(4) /* 32 KHz buffer enable */
39#define PRE_BYPASS BIT(3) /* 0=1KHz or 1=32KHz updates */
40#define CL_SEL_MASK (BIT(2)|BIT(1))
41#define CL_SEL_POS 1
42#define RTC_ALARM1_HI 0xc1
43#define RTC_COUNT4 0xc6
44
45/* start a PMU RTC access by reading the register prior to the RTC_COUNT4 */
46#define RTC_COUNT4_DUMMYREAD 0xc5
47
48/*only 14-bits width in second*/
49#define ALM1_VALID_RANGE_IN_SEC 0x3FFF
50
51#define TPS6586X_RTC_CL_SEL_1_5PF 0x0
52#define TPS6586X_RTC_CL_SEL_6_5PF 0x1
53#define TPS6586X_RTC_CL_SEL_7_5PF 0x2
54#define TPS6586X_RTC_CL_SEL_12_5PF 0x3
55
56struct tps6586x_rtc {
57 struct device *dev;
58 struct rtc_device *rtc;
59 int irq;
60 bool irq_en;
61 unsigned long long epoch_start;
62};
63
64static inline struct device *to_tps6586x_dev(struct device *dev)
65{
66 return dev->parent;
67}
68
69static int tps6586x_rtc_read_time(struct device *dev, struct rtc_time *tm)
70{
71 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
72 struct device *tps_dev = to_tps6586x_dev(dev);
73 unsigned long long ticks = 0;
74 unsigned long seconds;
75 u8 buff[6];
76 int ret;
77 int i;
78
79 ret = tps6586x_reads(tps_dev, RTC_COUNT4_DUMMYREAD, sizeof(buff), buff);
80 if (ret < 0) {
81 dev_err(dev, "read counter failed with err %d\n", ret);
82 return ret;
83 }
84
85 for (i = 1; i < sizeof(buff); i++) {
86 ticks <<= 8;
87 ticks |= buff[i];
88 }
89
90 seconds = ticks >> 10;
91 seconds += rtc->epoch_start;
92 rtc_time_to_tm(seconds, tm);
93 return rtc_valid_tm(tm);
94}
95
96static int tps6586x_rtc_set_time(struct device *dev, struct rtc_time *tm)
97{
98 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
99 struct device *tps_dev = to_tps6586x_dev(dev);
100 unsigned long long ticks;
101 unsigned long seconds;
102 u8 buff[5];
103 int ret;
104
105 rtc_tm_to_time(tm, &seconds);
106 if (seconds < rtc->epoch_start) {
107 dev_err(dev, "requested time unsupported\n");
108 return -EINVAL;
109 }
110 seconds -= rtc->epoch_start;
111
112 ticks = (unsigned long long)seconds << 10;
113 buff[0] = (ticks >> 32) & 0xff;
114 buff[1] = (ticks >> 24) & 0xff;
115 buff[2] = (ticks >> 16) & 0xff;
116 buff[3] = (ticks >> 8) & 0xff;
117 buff[4] = ticks & 0xff;
118
119 /* Disable RTC before changing time */
120 ret = tps6586x_clr_bits(tps_dev, RTC_CTRL, RTC_ENABLE);
121 if (ret < 0) {
122 dev_err(dev, "failed to clear RTC_ENABLE\n");
123 return ret;
124 }
125
126 ret = tps6586x_writes(tps_dev, RTC_COUNT4, sizeof(buff), buff);
127 if (ret < 0) {
128 dev_err(dev, "failed to program new time\n");
129 return ret;
130 }
131
132 /* Enable RTC */
133 ret = tps6586x_set_bits(tps_dev, RTC_CTRL, RTC_ENABLE);
134 if (ret < 0) {
135 dev_err(dev, "failed to set RTC_ENABLE\n");
136 return ret;
137 }
138 return 0;
139}
140
141static int tps6586x_rtc_alarm_irq_enable(struct device *dev,
142 unsigned int enabled)
143{
144 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
145
146 if (enabled && !rtc->irq_en) {
147 enable_irq(rtc->irq);
148 rtc->irq_en = true;
149 } else if (!enabled && rtc->irq_en) {
150 disable_irq(rtc->irq);
151 rtc->irq_en = false;
152 }
153 return 0;
154}
155
156static int tps6586x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
157{
158 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
159 struct device *tps_dev = to_tps6586x_dev(dev);
160 unsigned long seconds;
161 unsigned long ticks;
162 unsigned long rtc_current_time;
163 unsigned long long rticks = 0;
164 u8 buff[3];
165 u8 rbuff[6];
166 int ret;
167 int i;
168
169 rtc_tm_to_time(&alrm->time, &seconds);
170
171 if (alrm->enabled && (seconds < rtc->epoch_start)) {
172 dev_err(dev, "can't set alarm to requested time\n");
173 return -EINVAL;
174 }
175
176 ret = tps6586x_rtc_alarm_irq_enable(dev, alrm->enabled);
177 if (ret < 0) {
178 dev_err(dev, "can't set alarm irq, err %d\n", ret);
179 return ret;
180 }
181
182 seconds -= rtc->epoch_start;
183 ret = tps6586x_reads(tps_dev, RTC_COUNT4_DUMMYREAD,
184 sizeof(rbuff), rbuff);
185 if (ret < 0) {
186 dev_err(dev, "read counter failed with err %d\n", ret);
187 return ret;
188 }
189
190 for (i = 1; i < sizeof(rbuff); i++) {
191 rticks <<= 8;
192 rticks |= rbuff[i];
193 }
194
195 rtc_current_time = rticks >> 10;
196 if ((seconds - rtc_current_time) > ALM1_VALID_RANGE_IN_SEC)
197 seconds = rtc_current_time - 1;
198
199 ticks = (unsigned long long)seconds << 10;
200 buff[0] = (ticks >> 16) & 0xff;
201 buff[1] = (ticks >> 8) & 0xff;
202 buff[2] = ticks & 0xff;
203
204 ret = tps6586x_writes(tps_dev, RTC_ALARM1_HI, sizeof(buff), buff);
205 if (ret)
206 dev_err(dev, "programming alarm failed with err %d\n", ret);
207
208 return ret;
209}
210
211static int tps6586x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
212{
213 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
214 struct device *tps_dev = to_tps6586x_dev(dev);
215 unsigned long ticks;
216 unsigned long seconds;
217 u8 buff[3];
218 int ret;
219
220 ret = tps6586x_reads(tps_dev, RTC_ALARM1_HI, sizeof(buff), buff);
221 if (ret) {
222 dev_err(dev, "read RTC_ALARM1_HI failed with err %d\n", ret);
223 return ret;
224 }
225
226 ticks = (buff[0] << 16) | (buff[1] << 8) | buff[2];
227 seconds = ticks >> 10;
228 seconds += rtc->epoch_start;
229
230 rtc_time_to_tm(seconds, &alrm->time);
231 return 0;
232}
233
234static const struct rtc_class_ops tps6586x_rtc_ops = {
235 .read_time = tps6586x_rtc_read_time,
236 .set_time = tps6586x_rtc_set_time,
237 .set_alarm = tps6586x_rtc_set_alarm,
238 .read_alarm = tps6586x_rtc_read_alarm,
239 .alarm_irq_enable = tps6586x_rtc_alarm_irq_enable,
240};
241
242static irqreturn_t tps6586x_rtc_irq(int irq, void *data)
243{
244 struct tps6586x_rtc *rtc = data;
245
246 rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF);
247 return IRQ_HANDLED;
248}
249
250static int tps6586x_rtc_probe(struct platform_device *pdev)
251{
252 struct device *tps_dev = to_tps6586x_dev(&pdev->dev);
253 struct tps6586x_rtc *rtc;
254 int ret;
255
256 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
257 if (!rtc)
258 return -ENOMEM;
259
260 rtc->dev = &pdev->dev;
261 rtc->irq = platform_get_irq(pdev, 0);
262
263 /* Set epoch start as 00:00:00:01:01:2009 */
264 rtc->epoch_start = mktime(2009, 1, 1, 0, 0, 0);
265
266 /* 1 kHz tick mode, enable tick counting */
267 ret = tps6586x_update(tps_dev, RTC_CTRL,
268 RTC_ENABLE | OSC_SRC_SEL |
269 ((TPS6586X_RTC_CL_SEL_1_5PF << CL_SEL_POS) & CL_SEL_MASK),
270 RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
271 if (ret < 0) {
272 dev_err(&pdev->dev, "unable to start counter\n");
273 return ret;
274 }
275
276 platform_set_drvdata(pdev, rtc);
277 rtc->rtc = rtc_device_register(dev_name(&pdev->dev), &pdev->dev,
278 &tps6586x_rtc_ops, THIS_MODULE);
279 if (IS_ERR(rtc->rtc)) {
280 ret = PTR_ERR(rtc->rtc);
281 dev_err(&pdev->dev, "RTC device register: ret %d\n", ret);
282 goto fail_rtc_register;
283 }
284
285 ret = request_threaded_irq(rtc->irq, NULL, tps6586x_rtc_irq,
286 IRQF_ONESHOT | IRQF_EARLY_RESUME,
287 dev_name(&pdev->dev), rtc);
288 if (ret < 0) {
289 dev_err(&pdev->dev, "request IRQ(%d) failed with ret %d\n",
290 rtc->irq, ret);
291 goto fail_req_irq;
292 }
293 disable_irq(rtc->irq);
294 device_set_wakeup_capable(&pdev->dev, 1);
295 return 0;
296
297fail_req_irq:
298 rtc_device_unregister(rtc->rtc);
299
300fail_rtc_register:
301 tps6586x_update(tps_dev, RTC_CTRL, 0,
302 RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
303 return ret;
304};
305
306static int tps6586x_rtc_remove(struct platform_device *pdev)
307{
308 struct tps6586x_rtc *rtc = platform_get_drvdata(pdev);
309 struct device *tps_dev = to_tps6586x_dev(&pdev->dev);
310
311 tps6586x_update(tps_dev, RTC_CTRL, 0,
312 RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
313 rtc_device_unregister(rtc->rtc);
314 free_irq(rtc->irq, rtc);
315 return 0;
316}
317
318#ifdef CONFIG_PM_SLEEP
319static int tps6586x_rtc_suspend(struct device *dev)
320{
321 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
322
323 if (device_may_wakeup(dev))
324 enable_irq_wake(rtc->irq);
325 return 0;
326}
327
328static int tps6586x_rtc_resume(struct device *dev)
329{
330 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
331
332 if (device_may_wakeup(dev))
333 disable_irq_wake(rtc->irq);
334 return 0;
335}
336#endif
337
338static const struct dev_pm_ops tps6586x_pm_ops = {
339 SET_SYSTEM_SLEEP_PM_OPS(tps6586x_rtc_suspend, tps6586x_rtc_resume)
340};
341
342static struct platform_driver tps6586x_rtc_driver = {
343 .driver = {
344 .name = "tps6586x-rtc",
345 .owner = THIS_MODULE,
346 .pm = &tps6586x_pm_ops,
347 },
348 .probe = tps6586x_rtc_probe,
349 .remove = tps6586x_rtc_remove,
350};
351module_platform_driver(tps6586x_rtc_driver);
352
353MODULE_ALIAS("platform:rtc-tps6586x");
354MODULE_DESCRIPTION("TI TPS6586x RTC driver");
355MODULE_AUTHOR("Laxman dewangan <ldewangan@nvidia.com>");
356MODULE_LICENSE("GPL v2");
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 22eb4ebfa1a6..e5fef141a0e2 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -222,7 +222,7 @@ static const struct rtc_class_ops tps65910_rtc_ops = {
222 .alarm_irq_enable = tps65910_rtc_alarm_irq_enable, 222 .alarm_irq_enable = tps65910_rtc_alarm_irq_enable,
223}; 223};
224 224
225static int __devinit tps65910_rtc_probe(struct platform_device *pdev) 225static int tps65910_rtc_probe(struct platform_device *pdev)
226{ 226{
227 struct tps65910 *tps65910 = NULL; 227 struct tps65910 *tps65910 = NULL;
228 struct tps65910_rtc *tps_rtc = NULL; 228 struct tps65910_rtc *tps_rtc = NULL;
@@ -292,7 +292,7 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
292 * Disable tps65910 RTC interrupts. 292 * Disable tps65910 RTC interrupts.
293 * Sets status flag to free. 293 * Sets status flag to free.
294 */ 294 */
295static int __devexit tps65910_rtc_remove(struct platform_device *pdev) 295static int tps65910_rtc_remove(struct platform_device *pdev)
296{ 296{
297 /* leave rtc running, but disable irqs */ 297 /* leave rtc running, but disable irqs */
298 struct tps65910_rtc *tps_rtc = platform_get_drvdata(pdev); 298 struct tps65910_rtc *tps_rtc = platform_get_drvdata(pdev);
@@ -342,7 +342,7 @@ static const struct dev_pm_ops tps65910_rtc_pm_ops = {
342 342
343static struct platform_driver tps65910_rtc_driver = { 343static struct platform_driver tps65910_rtc_driver = {
344 .probe = tps65910_rtc_probe, 344 .probe = tps65910_rtc_probe,
345 .remove = __devexit_p(tps65910_rtc_remove), 345 .remove = tps65910_rtc_remove,
346 .driver = { 346 .driver = {
347 .owner = THIS_MODULE, 347 .owner = THIS_MODULE,
348 .name = "tps65910-rtc", 348 .name = "tps65910-rtc",
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 8b7464c8b5cf..ccd4ad370b32 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -458,7 +458,7 @@ static struct rtc_class_ops twl_rtc_ops = {
458 458
459/*----------------------------------------------------------------------*/ 459/*----------------------------------------------------------------------*/
460 460
461static int __devinit twl_rtc_probe(struct platform_device *pdev) 461static int twl_rtc_probe(struct platform_device *pdev)
462{ 462{
463 struct rtc_device *rtc; 463 struct rtc_device *rtc;
464 int ret = -EINVAL; 464 int ret = -EINVAL;
@@ -535,7 +535,7 @@ out1:
535 * Disable all TWL RTC module interrupts. 535 * Disable all TWL RTC module interrupts.
536 * Sets status flag to free. 536 * Sets status flag to free.
537 */ 537 */
538static int __devexit twl_rtc_remove(struct platform_device *pdev) 538static int twl_rtc_remove(struct platform_device *pdev)
539{ 539{
540 /* leave rtc running, but disable irqs */ 540 /* leave rtc running, but disable irqs */
541 struct rtc_device *rtc = platform_get_drvdata(pdev); 541 struct rtc_device *rtc = platform_get_drvdata(pdev);
@@ -597,7 +597,7 @@ MODULE_ALIAS("platform:twl_rtc");
597 597
598static struct platform_driver twl4030rtc_driver = { 598static struct platform_driver twl4030rtc_driver = {
599 .probe = twl_rtc_probe, 599 .probe = twl_rtc_probe,
600 .remove = __devexit_p(twl_rtc_remove), 600 .remove = twl_rtc_remove,
601 .shutdown = twl_rtc_shutdown, 601 .shutdown = twl_rtc_shutdown,
602 .suspend = twl_rtc_suspend, 602 .suspend = twl_rtc_suspend,
603 .resume = twl_rtc_resume, 603 .resume = twl_rtc_resume,
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c
index 5f60a7c6a155..6c3774cf5a24 100644
--- a/drivers/rtc/rtc-vr41xx.c
+++ b/drivers/rtc/rtc-vr41xx.c
@@ -280,7 +280,7 @@ static const struct rtc_class_ops vr41xx_rtc_ops = {
280 .set_alarm = vr41xx_rtc_set_alarm, 280 .set_alarm = vr41xx_rtc_set_alarm,
281}; 281};
282 282
283static int __devinit rtc_probe(struct platform_device *pdev) 283static int rtc_probe(struct platform_device *pdev)
284{ 284{
285 struct resource *res; 285 struct resource *res;
286 struct rtc_device *rtc; 286 struct rtc_device *rtc;
@@ -373,7 +373,7 @@ err_rtc1_iounmap:
373 return retval; 373 return retval;
374} 374}
375 375
376static int __devexit rtc_remove(struct platform_device *pdev) 376static int rtc_remove(struct platform_device *pdev)
377{ 377{
378 struct rtc_device *rtc; 378 struct rtc_device *rtc;
379 379
@@ -398,7 +398,7 @@ MODULE_ALIAS("platform:RTC");
398 398
399static struct platform_driver rtc_platform_driver = { 399static struct platform_driver rtc_platform_driver = {
400 .probe = rtc_probe, 400 .probe = rtc_probe,
401 .remove = __devexit_p(rtc_remove), 401 .remove = rtc_remove,
402 .driver = { 402 .driver = {
403 .name = rtc_name, 403 .name = rtc_name,
404 .owner = THIS_MODULE, 404 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c
index 14e2d8cfcc83..00c930f4b6f3 100644
--- a/drivers/rtc/rtc-vt8500.c
+++ b/drivers/rtc/rtc-vt8500.c
@@ -70,7 +70,7 @@
70 | ALARM_SEC_BIT) 70 | ALARM_SEC_BIT)
71 71
72#define VT8500_RTC_CR_ENABLE (1 << 0) /* Enable RTC */ 72#define VT8500_RTC_CR_ENABLE (1 << 0) /* Enable RTC */
73#define VT8500_RTC_CR_24H (1 << 1) /* 24h time format */ 73#define VT8500_RTC_CR_12H (1 << 1) /* 12h time format */
74#define VT8500_RTC_CR_SM_ENABLE (1 << 2) /* Enable periodic irqs */ 74#define VT8500_RTC_CR_SM_ENABLE (1 << 2) /* Enable periodic irqs */
75#define VT8500_RTC_CR_SM_SEC (1 << 3) /* 0: 1Hz/60, 1: 1Hz */ 75#define VT8500_RTC_CR_SM_SEC (1 << 3) /* 0: 1Hz/60, 1: 1Hz */
76#define VT8500_RTC_CR_CALIB (1 << 4) /* Enable calibration */ 76#define VT8500_RTC_CR_CALIB (1 << 4) /* Enable calibration */
@@ -119,7 +119,7 @@ static int vt8500_rtc_read_time(struct device *dev, struct rtc_time *tm)
119 tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S); 119 tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S);
120 tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S); 120 tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S);
121 tm->tm_mday = bcd2bin(date & DATE_DAY_MASK); 121 tm->tm_mday = bcd2bin(date & DATE_DAY_MASK);
122 tm->tm_mon = bcd2bin((date & DATE_MONTH_MASK) >> DATE_MONTH_S); 122 tm->tm_mon = bcd2bin((date & DATE_MONTH_MASK) >> DATE_MONTH_S) - 1;
123 tm->tm_year = bcd2bin((date & DATE_YEAR_MASK) >> DATE_YEAR_S) 123 tm->tm_year = bcd2bin((date & DATE_YEAR_MASK) >> DATE_YEAR_S)
124 + ((date >> DATE_CENTURY_S) & 1 ? 200 : 100); 124 + ((date >> DATE_CENTURY_S) & 1 ? 200 : 100);
125 tm->tm_wday = (time & TIME_DOW_MASK) >> TIME_DOW_S; 125 tm->tm_wday = (time & TIME_DOW_MASK) >> TIME_DOW_S;
@@ -138,8 +138,9 @@ static int vt8500_rtc_set_time(struct device *dev, struct rtc_time *tm)
138 } 138 }
139 139
140 writel((bin2bcd(tm->tm_year - 100) << DATE_YEAR_S) 140 writel((bin2bcd(tm->tm_year - 100) << DATE_YEAR_S)
141 | (bin2bcd(tm->tm_mon) << DATE_MONTH_S) 141 | (bin2bcd(tm->tm_mon + 1) << DATE_MONTH_S)
142 | (bin2bcd(tm->tm_mday)), 142 | (bin2bcd(tm->tm_mday))
143 | ((tm->tm_year >= 200) << DATE_CENTURY_S),
143 vt8500_rtc->regbase + VT8500_RTC_DS); 144 vt8500_rtc->regbase + VT8500_RTC_DS);
144 writel((bin2bcd(tm->tm_wday) << TIME_DOW_S) 145 writel((bin2bcd(tm->tm_wday) << TIME_DOW_S)
145 | (bin2bcd(tm->tm_hour) << TIME_HOUR_S) 146 | (bin2bcd(tm->tm_hour) << TIME_HOUR_S)
@@ -205,7 +206,7 @@ static const struct rtc_class_ops vt8500_rtc_ops = {
205 .alarm_irq_enable = vt8500_alarm_irq_enable, 206 .alarm_irq_enable = vt8500_alarm_irq_enable,
206}; 207};
207 208
208static int __devinit vt8500_rtc_probe(struct platform_device *pdev) 209static int vt8500_rtc_probe(struct platform_device *pdev)
209{ 210{
210 struct vt8500_rtc *vt8500_rtc; 211 struct vt8500_rtc *vt8500_rtc;
211 int ret; 212 int ret;
@@ -247,7 +248,7 @@ static int __devinit vt8500_rtc_probe(struct platform_device *pdev)
247 } 248 }
248 249
249 /* Enable RTC and set it to 24-hour mode */ 250 /* Enable RTC and set it to 24-hour mode */
250 writel(VT8500_RTC_CR_ENABLE | VT8500_RTC_CR_24H, 251 writel(VT8500_RTC_CR_ENABLE,
251 vt8500_rtc->regbase + VT8500_RTC_CR); 252 vt8500_rtc->regbase + VT8500_RTC_CR);
252 253
253 vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev, 254 vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev,
@@ -279,7 +280,7 @@ err_release:
279 return ret; 280 return ret;
280} 281}
281 282
282static int __devexit vt8500_rtc_remove(struct platform_device *pdev) 283static int vt8500_rtc_remove(struct platform_device *pdev)
283{ 284{
284 struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev); 285 struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev);
285 286
@@ -305,7 +306,7 @@ static const struct of_device_id wmt_dt_ids[] = {
305 306
306static struct platform_driver vt8500_rtc_driver = { 307static struct platform_driver vt8500_rtc_driver = {
307 .probe = vt8500_rtc_probe, 308 .probe = vt8500_rtc_probe,
308 .remove = __devexit_p(vt8500_rtc_remove), 309 .remove = vt8500_rtc_remove,
309 .driver = { 310 .driver = {
310 .name = "vt8500-rtc", 311 .name = "vt8500-rtc",
311 .owner = THIS_MODULE, 312 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
index ea5c6f857ca5..1b0affbe2659 100644
--- a/drivers/rtc/rtc-wm831x.c
+++ b/drivers/rtc/rtc-wm831x.c
@@ -459,7 +459,7 @@ err:
459 return ret; 459 return ret;
460} 460}
461 461
462static int __devexit wm831x_rtc_remove(struct platform_device *pdev) 462static int wm831x_rtc_remove(struct platform_device *pdev)
463{ 463{
464 struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev); 464 struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev);
465 int alm_irq = platform_get_irq_byname(pdev, "ALM"); 465 int alm_irq = platform_get_irq_byname(pdev, "ALM");
@@ -483,7 +483,7 @@ static const struct dev_pm_ops wm831x_rtc_pm_ops = {
483 483
484static struct platform_driver wm831x_rtc_driver = { 484static struct platform_driver wm831x_rtc_driver = {
485 .probe = wm831x_rtc_probe, 485 .probe = wm831x_rtc_probe,
486 .remove = __devexit_p(wm831x_rtc_remove), 486 .remove = wm831x_rtc_remove,
487 .driver = { 487 .driver = {
488 .name = "wm831x-rtc", 488 .name = "wm831x-rtc",
489 .pm = &wm831x_rtc_pm_ops, 489 .pm = &wm831x_rtc_pm_ops,
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c
index c2e52d15abb2..8ad86ae0d30f 100644
--- a/drivers/rtc/rtc-wm8350.c
+++ b/drivers/rtc/rtc-wm8350.c
@@ -459,7 +459,7 @@ static int wm8350_rtc_probe(struct platform_device *pdev)
459 return 0; 459 return 0;
460} 460}
461 461
462static int __devexit wm8350_rtc_remove(struct platform_device *pdev) 462static int wm8350_rtc_remove(struct platform_device *pdev)
463{ 463{
464 struct wm8350 *wm8350 = platform_get_drvdata(pdev); 464 struct wm8350 *wm8350 = platform_get_drvdata(pdev);
465 struct wm8350_rtc *wm_rtc = &wm8350->rtc; 465 struct wm8350_rtc *wm_rtc = &wm8350->rtc;
@@ -479,7 +479,7 @@ static struct dev_pm_ops wm8350_rtc_pm_ops = {
479 479
480static struct platform_driver wm8350_rtc_driver = { 480static struct platform_driver wm8350_rtc_driver = {
481 .probe = wm8350_rtc_probe, 481 .probe = wm8350_rtc_probe,
482 .remove = __devexit_p(wm8350_rtc_remove), 482 .remove = wm8350_rtc_remove,
483 .driver = { 483 .driver = {
484 .name = "wm8350-rtc", 484 .name = "wm8350-rtc",
485 .pm = &wm8350_rtc_pm_ops, 485 .pm = &wm8350_rtc_pm_ops,
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index 542668292900..1a9d1e3ce64c 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -355,7 +355,7 @@ fail:
355extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); 355extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
356extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); 356extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
357 357
358static int __devinit bbc_i2c_probe(struct platform_device *op) 358static int bbc_i2c_probe(struct platform_device *op)
359{ 359{
360 struct bbc_i2c_bus *bp; 360 struct bbc_i2c_bus *bp;
361 int err, index = 0; 361 int err, index = 0;
@@ -379,7 +379,7 @@ static int __devinit bbc_i2c_probe(struct platform_device *op)
379 return err; 379 return err;
380} 380}
381 381
382static int __devexit bbc_i2c_remove(struct platform_device *op) 382static int bbc_i2c_remove(struct platform_device *op)
383{ 383{
384 struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); 384 struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev);
385 385
@@ -413,7 +413,7 @@ static struct platform_driver bbc_i2c_driver = {
413 .of_match_table = bbc_i2c_match, 413 .of_match_table = bbc_i2c_match,
414 }, 414 },
415 .probe = bbc_i2c_probe, 415 .probe = bbc_i2c_probe,
416 .remove = __devexit_p(bbc_i2c_remove), 416 .remove = bbc_i2c_remove,
417}; 417};
418 418
419module_platform_driver(bbc_i2c_driver); 419module_platform_driver(bbc_i2c_driver);
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index b160073e54b6..e85c803b30cd 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -171,7 +171,7 @@ static struct miscdevice d7s_miscdev = {
171 .fops = &d7s_fops 171 .fops = &d7s_fops
172}; 172};
173 173
174static int __devinit d7s_probe(struct platform_device *op) 174static int d7s_probe(struct platform_device *op)
175{ 175{
176 struct device_node *opts; 176 struct device_node *opts;
177 int err = -EINVAL; 177 int err = -EINVAL;
@@ -236,7 +236,7 @@ out_free:
236 goto out; 236 goto out;
237} 237}
238 238
239static int __devexit d7s_remove(struct platform_device *op) 239static int d7s_remove(struct platform_device *op)
240{ 240{
241 struct d7s *p = dev_get_drvdata(&op->dev); 241 struct d7s *p = dev_get_drvdata(&op->dev);
242 u8 regs = readb(p->regs); 242 u8 regs = readb(p->regs);
@@ -272,7 +272,7 @@ static struct platform_driver d7s_driver = {
272 .of_match_table = d7s_match, 272 .of_match_table = d7s_match,
273 }, 273 },
274 .probe = d7s_probe, 274 .probe = d7s_probe,
275 .remove = __devexit_p(d7s_remove), 275 .remove = d7s_remove,
276}; 276};
277 277
278module_platform_driver(d7s_driver); 278module_platform_driver(d7s_driver);
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index 0bc18569f9c0..ddbe5a9e713d 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -1028,7 +1028,7 @@ static int kenvctrld(void *__unused)
1028 return 0; 1028 return 0;
1029} 1029}
1030 1030
1031static int __devinit envctrl_probe(struct platform_device *op) 1031static int envctrl_probe(struct platform_device *op)
1032{ 1032{
1033 struct device_node *dp; 1033 struct device_node *dp;
1034 int index, err; 1034 int index, err;
@@ -1104,7 +1104,7 @@ out_iounmap:
1104 return err; 1104 return err;
1105} 1105}
1106 1106
1107static int __devexit envctrl_remove(struct platform_device *op) 1107static int envctrl_remove(struct platform_device *op)
1108{ 1108{
1109 int index; 1109 int index;
1110 1110
@@ -1135,7 +1135,7 @@ static struct platform_driver envctrl_driver = {
1135 .of_match_table = envctrl_match, 1135 .of_match_table = envctrl_match,
1136 }, 1136 },
1137 .probe = envctrl_probe, 1137 .probe = envctrl_probe,
1138 .remove = __devexit_p(envctrl_remove), 1138 .remove = envctrl_remove,
1139}; 1139};
1140 1140
1141module_platform_driver(envctrl_driver); 1141module_platform_driver(envctrl_driver);
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 327657e2e264..d9f268f23774 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -159,7 +159,7 @@ static const struct file_operations flash_fops = {
159 159
160static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; 160static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
161 161
162static int __devinit flash_probe(struct platform_device *op) 162static int flash_probe(struct platform_device *op)
163{ 163{
164 struct device_node *dp = op->dev.of_node; 164 struct device_node *dp = op->dev.of_node;
165 struct device_node *parent; 165 struct device_node *parent;
@@ -190,7 +190,7 @@ static int __devinit flash_probe(struct platform_device *op)
190 return misc_register(&flash_dev); 190 return misc_register(&flash_dev);
191} 191}
192 192
193static int __devexit flash_remove(struct platform_device *op) 193static int flash_remove(struct platform_device *op)
194{ 194{
195 misc_deregister(&flash_dev); 195 misc_deregister(&flash_dev);
196 196
@@ -212,7 +212,7 @@ static struct platform_driver flash_driver = {
212 .of_match_table = flash_match, 212 .of_match_table = flash_match,
213 }, 213 },
214 .probe = flash_probe, 214 .probe = flash_probe,
215 .remove = __devexit_p(flash_remove), 215 .remove = flash_remove,
216}; 216};
217 217
218module_platform_driver(flash_driver); 218module_platform_driver(flash_driver);
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index a9e468cc1cac..b0aae0536d58 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -347,7 +347,7 @@ static void uctrl_get_external_status(struct uctrl_driver *driver)
347 347
348} 348}
349 349
350static int __devinit uctrl_probe(struct platform_device *op) 350static int uctrl_probe(struct platform_device *op)
351{ 351{
352 struct uctrl_driver *p; 352 struct uctrl_driver *p;
353 int err = -ENOMEM; 353 int err = -ENOMEM;
@@ -402,7 +402,7 @@ out_free:
402 goto out; 402 goto out;
403} 403}
404 404
405static int __devexit uctrl_remove(struct platform_device *op) 405static int uctrl_remove(struct platform_device *op)
406{ 406{
407 struct uctrl_driver *p = dev_get_drvdata(&op->dev); 407 struct uctrl_driver *p = dev_get_drvdata(&op->dev);
408 408
@@ -430,7 +430,7 @@ static struct platform_driver uctrl_driver = {
430 .of_match_table = uctrl_match, 430 .of_match_table = uctrl_match,
431 }, 431 },
432 .probe = uctrl_probe, 432 .probe = uctrl_probe,
433 .remove = __devexit_p(uctrl_remove), 433 .remove = uctrl_remove,
434}; 434};
435 435
436 436
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 3868ab2397c6..d1f0120cdb98 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -2029,7 +2029,7 @@ static struct scsi_host_template driver_template = {
2029}; 2029};
2030 2030
2031/* This function will probe and initialize a card */ 2031/* This function will probe and initialize a card */
2032static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) 2032static int twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
2033{ 2033{
2034 struct Scsi_Host *host = NULL; 2034 struct Scsi_Host *host = NULL;
2035 TW_Device_Extension *tw_dev; 2035 TW_Device_Extension *tw_dev;
@@ -2305,7 +2305,7 @@ out_disable_device:
2305#endif 2305#endif
2306 2306
2307/* PCI Devices supported by this driver */ 2307/* PCI Devices supported by this driver */
2308static struct pci_device_id twa_pci_tbl[] __devinitdata = { 2308static struct pci_device_id twa_pci_tbl[] = {
2309 { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9000, 2309 { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9000,
2310 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 2310 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
2311 { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9550SX, 2311 { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9550SX,
diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c
index 13e39e1fdfe2..52a2f0580d97 100644
--- a/drivers/scsi/3w-sas.c
+++ b/drivers/scsi/3w-sas.c
@@ -1604,7 +1604,7 @@ static struct scsi_host_template driver_template = {
1604}; 1604};
1605 1605
1606/* This function will probe and initialize a card */ 1606/* This function will probe and initialize a card */
1607static int __devinit twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) 1607static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
1608{ 1608{
1609 struct Scsi_Host *host = NULL; 1609 struct Scsi_Host *host = NULL;
1610 TW_Device_Extension *tw_dev; 1610 TW_Device_Extension *tw_dev;
@@ -1893,7 +1893,7 @@ out_disable_device:
1893#endif 1893#endif
1894 1894
1895/* PCI Devices supported by this driver */ 1895/* PCI Devices supported by this driver */
1896static struct pci_device_id twl_pci_tbl[] __devinitdata = { 1896static struct pci_device_id twl_pci_tbl[] = {
1897 { PCI_VDEVICE(3WARE, PCI_DEVICE_ID_3WARE_9750) }, 1897 { PCI_VDEVICE(3WARE, PCI_DEVICE_ID_3WARE_9750) },
1898 { } 1898 { }
1899}; 1899};
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 7fe96ff60c58..62071d2fc1ce 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -2281,7 +2281,7 @@ static struct scsi_host_template driver_template = {
2281}; 2281};
2282 2282
2283/* This function will probe and initialize a card */ 2283/* This function will probe and initialize a card */
2284static int __devinit tw_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) 2284static int tw_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
2285{ 2285{
2286 struct Scsi_Host *host = NULL; 2286 struct Scsi_Host *host = NULL;
2287 TW_Device_Extension *tw_dev; 2287 TW_Device_Extension *tw_dev;
@@ -2422,7 +2422,7 @@ static void tw_remove(struct pci_dev *pdev)
2422} /* End tw_remove() */ 2422} /* End tw_remove() */
2423 2423
2424/* PCI Devices supported by this driver */ 2424/* PCI Devices supported by this driver */
2425static struct pci_device_id tw_pci_tbl[] __devinitdata = { 2425static struct pci_device_id tw_pci_tbl[] = {
2426 { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_1000, 2426 { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_1000,
2427 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 2427 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
2428 { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_7000, 2428 { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_7000,
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index d4da3708763b..d7ca247efa35 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -3615,7 +3615,7 @@ static void __exit BusLogic_exit(void)
3615__setup("BusLogic=", BusLogic_Setup); 3615__setup("BusLogic=", BusLogic_Setup);
3616 3616
3617#ifdef MODULE 3617#ifdef MODULE
3618static struct pci_device_id BusLogic_pci_tbl[] __devinitdata = { 3618static struct pci_device_id BusLogic_pci_tbl[] = {
3619 { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER, 3619 { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER,
3620 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 3620 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
3621 { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC, 3621 { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC,
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 165e4dd865d9..450353e04dde 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -814,7 +814,7 @@ static char *lprint_opcode(int opcode, char *pos, char *buffer, int length)
814 * Locks: interrupts must be enabled when we are called 814 * Locks: interrupts must be enabled when we are called
815 */ 815 */
816 816
817static int __devinit NCR5380_init(struct Scsi_Host *instance, int flags) 817static int NCR5380_init(struct Scsi_Host *instance, int flags)
818{ 818{
819 NCR5380_local_declare(); 819 NCR5380_local_declare();
820 int i, pass; 820 int i, pass;
diff --git a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c
index 8647256ad66d..b39a2409a507 100644
--- a/drivers/scsi/NCR_D700.c
+++ b/drivers/scsi/NCR_D700.c
@@ -114,7 +114,7 @@ MODULE_DESCRIPTION("NCR Dual700 SCSI Driver");
114MODULE_LICENSE("GPL"); 114MODULE_LICENSE("GPL");
115module_param(NCR_D700, charp, 0); 115module_param(NCR_D700, charp, 0);
116 116
117static __u8 __devinitdata id_array[2*(MCA_MAX_SLOT_NR + 1)] = 117static __u8 id_array[2*(MCA_MAX_SLOT_NR + 1)] =
118 { [0 ... 2*(MCA_MAX_SLOT_NR + 1)-1] = 7 }; 118 { [0 ... 2*(MCA_MAX_SLOT_NR + 1)-1] = 7 };
119 119
120#ifdef MODULE 120#ifdef MODULE
@@ -173,7 +173,7 @@ struct NCR_D700_private {
173 char pad; 173 char pad;
174}; 174};
175 175
176static int __devinit 176static int
177NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq, 177NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq,
178 int slot, u32 region, int differential) 178 int slot, u32 region, int differential)
179{ 179{
@@ -243,7 +243,7 @@ NCR_D700_intr(int irq, void *data)
243 * essentially connectecd to the MCA bus independently, it is easier 243 * essentially connectecd to the MCA bus independently, it is easier
244 * to set them up as two separate host adapters, rather than one 244 * to set them up as two separate host adapters, rather than one
245 * adapter with two channels */ 245 * adapter with two channels */
246static int __devinit 246static int
247NCR_D700_probe(struct device *dev) 247NCR_D700_probe(struct device *dev)
248{ 248{
249 struct NCR_D700_private *p; 249 struct NCR_D700_private *p;
@@ -349,7 +349,7 @@ NCR_D700_probe(struct device *dev)
349 return 0; 349 return 0;
350} 350}
351 351
352static void __devexit 352static void
353NCR_D700_remove_one(struct Scsi_Host *host) 353NCR_D700_remove_one(struct Scsi_Host *host)
354{ 354{
355 scsi_remove_host(host); 355 scsi_remove_host(host);
@@ -359,7 +359,7 @@ NCR_D700_remove_one(struct Scsi_Host *host)
359 release_region(host->base, 64); 359 release_region(host->base, 64);
360} 360}
361 361
362static int __devexit 362static int
363NCR_D700_remove(struct device *dev) 363NCR_D700_remove(struct device *dev)
364{ 364{
365 struct NCR_D700_private *p = dev_get_drvdata(dev); 365 struct NCR_D700_private *p = dev_get_drvdata(dev);
@@ -380,7 +380,7 @@ static struct mca_driver NCR_D700_driver = {
380 .name = "NCR_D700", 380 .name = "NCR_D700",
381 .bus = &mca_bus_type, 381 .bus = &mca_bus_type,
382 .probe = NCR_D700_probe, 382 .probe = NCR_D700_probe,
383 .remove = __devexit_p(NCR_D700_remove), 383 .remove = NCR_D700_remove,
384 }, 384 },
385}; 385};
386 386
diff --git a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c
index afdbb9addf18..05835bf1bf9c 100644
--- a/drivers/scsi/NCR_Q720.c
+++ b/drivers/scsi/NCR_Q720.c
@@ -351,7 +351,7 @@ static struct mca_driver NCR_Q720_driver = {
351 .name = "NCR_Q720", 351 .name = "NCR_Q720",
352 .bus = &mca_bus_type, 352 .bus = &mca_bus_type,
353 .probe = NCR_Q720_probe, 353 .probe = NCR_Q720_probe,
354 .remove = __devexit_p(NCR_Q720_remove), 354 .remove = NCR_Q720_remove,
355 }, 355 },
356}; 356};
357 357
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index a391090a17c5..0163457c12bb 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -1082,8 +1082,8 @@ static struct scsi_host_template inia100_template = {
1082 .use_clustering = ENABLE_CLUSTERING, 1082 .use_clustering = ENABLE_CLUSTERING,
1083}; 1083};
1084 1084
1085static int __devinit inia100_probe_one(struct pci_dev *pdev, 1085static int inia100_probe_one(struct pci_dev *pdev,
1086 const struct pci_device_id *id) 1086 const struct pci_device_id *id)
1087{ 1087{
1088 struct Scsi_Host *shost; 1088 struct Scsi_Host *shost;
1089 struct orc_host *host; 1089 struct orc_host *host;
@@ -1197,7 +1197,7 @@ out:
1197 return error; 1197 return error;
1198} 1198}
1199 1199
1200static void __devexit inia100_remove_one(struct pci_dev *pdev) 1200static void inia100_remove_one(struct pci_dev *pdev)
1201{ 1201{
1202 struct Scsi_Host *shost = pci_get_drvdata(pdev); 1202 struct Scsi_Host *shost = pci_get_drvdata(pdev);
1203 struct orc_host *host = (struct orc_host *)shost->hostdata; 1203 struct orc_host *host = (struct orc_host *)shost->hostdata;
@@ -1224,7 +1224,7 @@ static struct pci_driver inia100_pci_driver = {
1224 .name = "inia100", 1224 .name = "inia100",
1225 .id_table = inia100_pci_tbl, 1225 .id_table = inia100_pci_tbl,
1226 .probe = inia100_probe_one, 1226 .probe = inia100_probe_one,
1227 .remove = __devexit_p(inia100_remove_one), 1227 .remove = inia100_remove_one,
1228}; 1228};
1229 1229
1230static int __init inia100_init(void) 1230static int __init inia100_init(void)
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c
index 79a30633d4aa..3e09aa21c1ca 100644
--- a/drivers/scsi/a2091.c
+++ b/drivers/scsi/a2091.c
@@ -179,8 +179,7 @@ static struct scsi_host_template a2091_scsi_template = {
179 .use_clustering = DISABLE_CLUSTERING 179 .use_clustering = DISABLE_CLUSTERING
180}; 180};
181 181
182static int __devinit a2091_probe(struct zorro_dev *z, 182static int a2091_probe(struct zorro_dev *z, const struct zorro_device_id *ent)
183 const struct zorro_device_id *ent)
184{ 183{
185 struct Scsi_Host *instance; 184 struct Scsi_Host *instance;
186 int error; 185 int error;
@@ -239,7 +238,7 @@ fail_alloc:
239 return error; 238 return error;
240} 239}
241 240
242static void __devexit a2091_remove(struct zorro_dev *z) 241static void a2091_remove(struct zorro_dev *z)
243{ 242{
244 struct Scsi_Host *instance = zorro_get_drvdata(z); 243 struct Scsi_Host *instance = zorro_get_drvdata(z);
245 struct a2091_hostdata *hdata = shost_priv(instance); 244 struct a2091_hostdata *hdata = shost_priv(instance);
@@ -251,7 +250,7 @@ static void __devexit a2091_remove(struct zorro_dev *z)
251 release_mem_region(z->resource.start, 256); 250 release_mem_region(z->resource.start, 256);
252} 251}
253 252
254static struct zorro_device_id a2091_zorro_tbl[] __devinitdata = { 253static struct zorro_device_id a2091_zorro_tbl[] = {
255 { ZORRO_PROD_CBM_A590_A2091_1 }, 254 { ZORRO_PROD_CBM_A590_A2091_1 },
256 { ZORRO_PROD_CBM_A590_A2091_2 }, 255 { ZORRO_PROD_CBM_A590_A2091_2 },
257 { 0 } 256 { 0 }
@@ -262,7 +261,7 @@ static struct zorro_driver a2091_driver = {
262 .name = "a2091", 261 .name = "a2091",
263 .id_table = a2091_zorro_tbl, 262 .id_table = a2091_zorro_tbl,
264 .probe = a2091_probe, 263 .probe = a2091_probe,
265 .remove = __devexit_p(a2091_remove), 264 .remove = a2091_remove,
266}; 265};
267 266
268static int __init a2091_init(void) 267static int __init a2091_init(void)
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index cb7f1582a6d1..408a42ef787a 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -88,13 +88,7 @@ char aac_driver_version[] = AAC_DRIVER_FULL_VERSION;
88 * 88 *
89 * Note: The last field is used to index into aac_drivers below. 89 * Note: The last field is used to index into aac_drivers below.
90 */ 90 */
91#ifdef DECLARE_PCI_DEVICE_TABLE 91static const struct pci_device_id aac_pci_tbl[] = {
92static DECLARE_PCI_DEVICE_TABLE(aac_pci_tbl) = {
93#elif defined(__devinitconst)
94static const struct pci_device_id aac_pci_tbl[] __devinitconst = {
95#else
96static const struct pci_device_id aac_pci_tbl[] __devinitconst = {
97#endif
98 { 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si (Iguana/PERC2Si) */ 92 { 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si (Iguana/PERC2Si) */
99 { 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di (Opal/PERC3Di) */ 93 { 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di (Opal/PERC3Di) */
100 { 0x1028, 0x0003, 0x1028, 0x0003, 0, 0, 2 }, /* PERC 3/Si (SlimFast/PERC3Si */ 94 { 0x1028, 0x0003, 0x1028, 0x0003, 0, 0, 2 }, /* PERC 3/Si (SlimFast/PERC3Si */
@@ -1107,8 +1101,7 @@ static void __aac_shutdown(struct aac_dev * aac)
1107 pci_disable_msi(aac->pdev); 1101 pci_disable_msi(aac->pdev);
1108} 1102}
1109 1103
1110static int __devinit aac_probe_one(struct pci_dev *pdev, 1104static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1111 const struct pci_device_id *id)
1112{ 1105{
1113 unsigned index = id->driver_data; 1106 unsigned index = id->driver_data;
1114 struct Scsi_Host *shost; 1107 struct Scsi_Host *shost;
@@ -1310,7 +1303,7 @@ static void aac_shutdown(struct pci_dev *dev)
1310 __aac_shutdown((struct aac_dev *)shost->hostdata); 1303 __aac_shutdown((struct aac_dev *)shost->hostdata);
1311} 1304}
1312 1305
1313static void __devexit aac_remove_one(struct pci_dev *pdev) 1306static void aac_remove_one(struct pci_dev *pdev)
1314{ 1307{
1315 struct Scsi_Host *shost = pci_get_drvdata(pdev); 1308 struct Scsi_Host *shost = pci_get_drvdata(pdev);
1316 struct aac_dev *aac = (struct aac_dev *)shost->hostdata; 1309 struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
@@ -1341,7 +1334,7 @@ static struct pci_driver aac_pci_driver = {
1341 .name = AAC_DRIVERNAME, 1334 .name = AAC_DRIVERNAME,
1342 .id_table = aac_pci_tbl, 1335 .id_table = aac_pci_tbl,
1343 .probe = aac_probe_one, 1336 .probe = aac_probe_one,
1344 .remove = __devexit_p(aac_remove_one), 1337 .remove = aac_remove_one,
1345 .shutdown = aac_shutdown, 1338 .shutdown = aac_shutdown,
1346}; 1339};
1347 1340
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 374c4edf4fcb..dcfaee66a8b9 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -9526,7 +9526,7 @@ advansys_queuecommand_lck(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *
9526 9526
9527static DEF_SCSI_QCMD(advansys_queuecommand) 9527static DEF_SCSI_QCMD(advansys_queuecommand)
9528 9528
9529static ushort __devinit AscGetEisaChipCfg(PortAddr iop_base) 9529static ushort AscGetEisaChipCfg(PortAddr iop_base)
9530{ 9530{
9531 PortAddr eisa_cfg_iop = (PortAddr) ASC_GET_EISA_SLOT(iop_base) | 9531 PortAddr eisa_cfg_iop = (PortAddr) ASC_GET_EISA_SLOT(iop_base) |
9532 (PortAddr) (ASC_EISA_CFG_IOP_MASK); 9532 (PortAddr) (ASC_EISA_CFG_IOP_MASK);
@@ -9537,8 +9537,8 @@ static ushort __devinit AscGetEisaChipCfg(PortAddr iop_base)
9537 * Return the BIOS address of the adapter at the specified 9537 * Return the BIOS address of the adapter at the specified
9538 * I/O port and with the specified bus type. 9538 * I/O port and with the specified bus type.
9539 */ 9539 */
9540static unsigned short __devinit 9540static unsigned short AscGetChipBiosAddress(PortAddr iop_base,
9541AscGetChipBiosAddress(PortAddr iop_base, unsigned short bus_type) 9541 unsigned short bus_type)
9542{ 9542{
9543 unsigned short cfg_lsw; 9543 unsigned short cfg_lsw;
9544 unsigned short bios_addr; 9544 unsigned short bios_addr;
@@ -9569,7 +9569,7 @@ AscGetChipBiosAddress(PortAddr iop_base, unsigned short bus_type)
9569 return bios_addr; 9569 return bios_addr;
9570} 9570}
9571 9571
9572static uchar __devinit AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) 9572static uchar AscSetChipScsiID(PortAddr iop_base, uchar new_host_id)
9573{ 9573{
9574 ushort cfg_lsw; 9574 ushort cfg_lsw;
9575 9575
@@ -9583,7 +9583,7 @@ static uchar __devinit AscSetChipScsiID(PortAddr iop_base, uchar new_host_id)
9583 return (AscGetChipScsiID(iop_base)); 9583 return (AscGetChipScsiID(iop_base));
9584} 9584}
9585 9585
9586static unsigned char __devinit AscGetChipScsiCtrl(PortAddr iop_base) 9586static unsigned char AscGetChipScsiCtrl(PortAddr iop_base)
9587{ 9587{
9588 unsigned char sc; 9588 unsigned char sc;
9589 9589
@@ -9593,8 +9593,8 @@ static unsigned char __devinit AscGetChipScsiCtrl(PortAddr iop_base)
9593 return sc; 9593 return sc;
9594} 9594}
9595 9595
9596static unsigned char __devinit 9596static unsigned char AscGetChipVersion(PortAddr iop_base,
9597AscGetChipVersion(PortAddr iop_base, unsigned short bus_type) 9597 unsigned short bus_type)
9598{ 9598{
9599 if (bus_type & ASC_IS_EISA) { 9599 if (bus_type & ASC_IS_EISA) {
9600 PortAddr eisa_iop; 9600 PortAddr eisa_iop;
@@ -9608,7 +9608,7 @@ AscGetChipVersion(PortAddr iop_base, unsigned short bus_type)
9608} 9608}
9609 9609
9610#ifdef CONFIG_ISA 9610#ifdef CONFIG_ISA
9611static void __devinit AscEnableIsaDma(uchar dma_channel) 9611static void AscEnableIsaDma(uchar dma_channel)
9612{ 9612{
9613 if (dma_channel < 4) { 9613 if (dma_channel < 4) {
9614 outp(0x000B, (ushort)(0xC0 | dma_channel)); 9614 outp(0x000B, (ushort)(0xC0 | dma_channel));
@@ -9638,7 +9638,7 @@ static int AscStopQueueExe(PortAddr iop_base)
9638 return (0); 9638 return (0);
9639} 9639}
9640 9640
9641static ASC_DCNT __devinit AscGetMaxDmaCount(ushort bus_type) 9641static ASC_DCNT AscGetMaxDmaCount(ushort bus_type)
9642{ 9642{
9643 if (bus_type & ASC_IS_ISA) 9643 if (bus_type & ASC_IS_ISA)
9644 return ASC_MAX_ISA_DMA_COUNT; 9644 return ASC_MAX_ISA_DMA_COUNT;
@@ -9648,7 +9648,7 @@ static ASC_DCNT __devinit AscGetMaxDmaCount(ushort bus_type)
9648} 9648}
9649 9649
9650#ifdef CONFIG_ISA 9650#ifdef CONFIG_ISA
9651static ushort __devinit AscGetIsaDmaChannel(PortAddr iop_base) 9651static ushort AscGetIsaDmaChannel(PortAddr iop_base)
9652{ 9652{
9653 ushort channel; 9653 ushort channel;
9654 9654
@@ -9660,7 +9660,7 @@ static ushort __devinit AscGetIsaDmaChannel(PortAddr iop_base)
9660 return (channel + 4); 9660 return (channel + 4);
9661} 9661}
9662 9662
9663static ushort __devinit AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel) 9663static ushort AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel)
9664{ 9664{
9665 ushort cfg_lsw; 9665 ushort cfg_lsw;
9666 uchar value; 9666 uchar value;
@@ -9678,7 +9678,7 @@ static ushort __devinit AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channe
9678 return 0; 9678 return 0;
9679} 9679}
9680 9680
9681static uchar __devinit AscGetIsaDmaSpeed(PortAddr iop_base) 9681static uchar AscGetIsaDmaSpeed(PortAddr iop_base)
9682{ 9682{
9683 uchar speed_value; 9683 uchar speed_value;
9684 9684
@@ -9689,7 +9689,7 @@ static uchar __devinit AscGetIsaDmaSpeed(PortAddr iop_base)
9689 return speed_value; 9689 return speed_value;
9690} 9690}
9691 9691
9692static uchar __devinit AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) 9692static uchar AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value)
9693{ 9693{
9694 speed_value &= 0x07; 9694 speed_value &= 0x07;
9695 AscSetBank(iop_base, 1); 9695 AscSetBank(iop_base, 1);
@@ -9699,7 +9699,7 @@ static uchar __devinit AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value)
9699} 9699}
9700#endif /* CONFIG_ISA */ 9700#endif /* CONFIG_ISA */
9701 9701
9702static ushort __devinit AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) 9702static ushort AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc)
9703{ 9703{
9704 int i; 9704 int i;
9705 PortAddr iop_base; 9705 PortAddr iop_base;
@@ -9786,7 +9786,7 @@ static ushort __devinit AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc)
9786 return warn_code; 9786 return warn_code;
9787} 9787}
9788 9788
9789static int __devinit AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) 9789static int AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg)
9790{ 9790{
9791 int retry; 9791 int retry;
9792 9792
@@ -9801,12 +9801,12 @@ static int __devinit AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg)
9801 return 0; 9801 return 0;
9802} 9802}
9803 9803
9804static void __devinit AscWaitEEPRead(void) 9804static void AscWaitEEPRead(void)
9805{ 9805{
9806 mdelay(1); 9806 mdelay(1);
9807} 9807}
9808 9808
9809static ushort __devinit AscReadEEPWord(PortAddr iop_base, uchar addr) 9809static ushort AscReadEEPWord(PortAddr iop_base, uchar addr)
9810{ 9810{
9811 ushort read_wval; 9811 ushort read_wval;
9812 uchar cmd_reg; 9812 uchar cmd_reg;
@@ -9821,8 +9821,8 @@ static ushort __devinit AscReadEEPWord(PortAddr iop_base, uchar addr)
9821 return read_wval; 9821 return read_wval;
9822} 9822}
9823 9823
9824static ushort __devinit 9824static ushort AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf,
9825AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) 9825 ushort bus_type)
9826{ 9826{
9827 ushort wval; 9827 ushort wval;
9828 ushort sum; 9828 ushort sum;
@@ -9868,7 +9868,7 @@ AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type)
9868 return sum; 9868 return sum;
9869} 9869}
9870 9870
9871static int __devinit AscTestExternalLram(ASC_DVC_VAR *asc_dvc) 9871static int AscTestExternalLram(ASC_DVC_VAR *asc_dvc)
9872{ 9872{
9873 PortAddr iop_base; 9873 PortAddr iop_base;
9874 ushort q_addr; 9874 ushort q_addr;
@@ -9890,12 +9890,12 @@ static int __devinit AscTestExternalLram(ASC_DVC_VAR *asc_dvc)
9890 return (sta); 9890 return (sta);
9891} 9891}
9892 9892
9893static void __devinit AscWaitEEPWrite(void) 9893static void AscWaitEEPWrite(void)
9894{ 9894{
9895 mdelay(20); 9895 mdelay(20);
9896} 9896}
9897 9897
9898static int __devinit AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) 9898static int AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg)
9899{ 9899{
9900 ushort read_back; 9900 ushort read_back;
9901 int retry; 9901 int retry;
@@ -9914,8 +9914,7 @@ static int __devinit AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg)
9914 } 9914 }
9915} 9915}
9916 9916
9917static ushort __devinit 9917static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val)
9918AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val)
9919{ 9918{
9920 ushort read_wval; 9919 ushort read_wval;
9921 9920
@@ -9935,8 +9934,8 @@ AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val)
9935 return (read_wval); 9934 return (read_wval);
9936} 9935}
9937 9936
9938static int __devinit 9937static int AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf,
9939AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) 9938 ushort bus_type)
9940{ 9939{
9941 int n_error; 9940 int n_error;
9942 ushort *wbuf; 9941 ushort *wbuf;
@@ -10031,8 +10030,8 @@ AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type)
10031 return n_error; 10030 return n_error;
10032} 10031}
10033 10032
10034static int __devinit 10033static int AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf,
10035AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) 10034 ushort bus_type)
10036{ 10035{
10037 int retry; 10036 int retry;
10038 int n_error; 10037 int n_error;
@@ -10050,7 +10049,7 @@ AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type)
10050 return n_error; 10049 return n_error;
10051} 10050}
10052 10051
10053static ushort __devinit AscInitFromEEP(ASC_DVC_VAR *asc_dvc) 10052static ushort AscInitFromEEP(ASC_DVC_VAR *asc_dvc)
10054{ 10053{
10055 ASCEEP_CONFIG eep_config_buf; 10054 ASCEEP_CONFIG eep_config_buf;
10056 ASCEEP_CONFIG *eep_config; 10055 ASCEEP_CONFIG *eep_config;
@@ -10215,7 +10214,7 @@ static ushort __devinit AscInitFromEEP(ASC_DVC_VAR *asc_dvc)
10215 return (warn_code); 10214 return (warn_code);
10216} 10215}
10217 10216
10218static int __devinit AscInitGetConfig(struct Scsi_Host *shost) 10217static int AscInitGetConfig(struct Scsi_Host *shost)
10219{ 10218{
10220 struct asc_board *board = shost_priv(shost); 10219 struct asc_board *board = shost_priv(shost);
10221 ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; 10220 ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var;
@@ -10269,7 +10268,7 @@ static int __devinit AscInitGetConfig(struct Scsi_Host *shost)
10269 return asc_dvc->err_code; 10268 return asc_dvc->err_code;
10270} 10269}
10271 10270
10272static int __devinit AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) 10271static int AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost)
10273{ 10272{
10274 struct asc_board *board = shost_priv(shost); 10273 struct asc_board *board = shost_priv(shost);
10275 ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; 10274 ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var;
@@ -10383,7 +10382,7 @@ static int __devinit AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *sh
10383 * on big-endian platforms so char fields read as words are actually being 10382 * on big-endian platforms so char fields read as words are actually being
10384 * unswapped on big-endian platforms. 10383 * unswapped on big-endian platforms.
10385 */ 10384 */
10386static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config __devinitdata = { 10385static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config = {
10387 ADV_EEPROM_BIOS_ENABLE, /* cfg_lsw */ 10386 ADV_EEPROM_BIOS_ENABLE, /* cfg_lsw */
10388 0x0000, /* cfg_msw */ 10387 0x0000, /* cfg_msw */
10389 0xFFFF, /* disc_enable */ 10388 0xFFFF, /* disc_enable */
@@ -10421,7 +10420,7 @@ static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config __devinitdata = {
10421 0 /* num_of_err */ 10420 0 /* num_of_err */
10422}; 10421};
10423 10422
10424static ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar __devinitdata = { 10423static ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar = {
10425 0, /* cfg_lsw */ 10424 0, /* cfg_lsw */
10426 0, /* cfg_msw */ 10425 0, /* cfg_msw */
10427 0, /* -disc_enable */ 10426 0, /* -disc_enable */
@@ -10459,7 +10458,7 @@ static ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar __devinitdata = {
10459 0 /* num_of_err */ 10458 0 /* num_of_err */
10460}; 10459};
10461 10460
10462static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config __devinitdata = { 10461static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config = {
10463 ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ 10462 ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */
10464 0x0000, /* 01 cfg_msw */ 10463 0x0000, /* 01 cfg_msw */
10465 0xFFFF, /* 02 disc_enable */ 10464 0xFFFF, /* 02 disc_enable */
@@ -10524,7 +10523,7 @@ static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config __devinitdata = {
10524 0 /* 63 reserved */ 10523 0 /* 63 reserved */
10525}; 10524};
10526 10525
10527static ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar __devinitdata = { 10526static ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar = {
10528 0, /* 00 cfg_lsw */ 10527 0, /* 00 cfg_lsw */
10529 0, /* 01 cfg_msw */ 10528 0, /* 01 cfg_msw */
10530 0, /* 02 disc_enable */ 10529 0, /* 02 disc_enable */
@@ -10589,7 +10588,7 @@ static ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar __devinitdata =
10589 0 /* 63 reserved */ 10588 0 /* 63 reserved */
10590}; 10589};
10591 10590
10592static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config __devinitdata = { 10591static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config = {
10593 ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ 10592 ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */
10594 0x0000, /* 01 cfg_msw */ 10593 0x0000, /* 01 cfg_msw */
10595 0xFFFF, /* 02 disc_enable */ 10594 0xFFFF, /* 02 disc_enable */
@@ -10654,7 +10653,7 @@ static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config __devinitdata = {
10654 0 /* 63 reserved */ 10653 0 /* 63 reserved */
10655}; 10654};
10656 10655
10657static ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar __devinitdata = { 10656static ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar = {
10658 0, /* 00 cfg_lsw */ 10657 0, /* 00 cfg_lsw */
10659 0, /* 01 cfg_msw */ 10658 0, /* 01 cfg_msw */
10660 0, /* 02 disc_enable */ 10659 0, /* 02 disc_enable */
@@ -10723,7 +10722,7 @@ static ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar __devinitdata =
10723/* 10722/*
10724 * Wait for EEPROM command to complete 10723 * Wait for EEPROM command to complete
10725 */ 10724 */
10726static void __devinit AdvWaitEEPCmd(AdvPortAddr iop_base) 10725static void AdvWaitEEPCmd(AdvPortAddr iop_base)
10727{ 10726{
10728 int eep_delay_ms; 10727 int eep_delay_ms;
10729 10728
@@ -10742,7 +10741,7 @@ static void __devinit AdvWaitEEPCmd(AdvPortAddr iop_base)
10742/* 10741/*
10743 * Read the EEPROM from specified location 10742 * Read the EEPROM from specified location
10744 */ 10743 */
10745static ushort __devinit AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) 10744static ushort AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr)
10746{ 10745{
10747 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, 10746 AdvWriteWordRegister(iop_base, IOPW_EE_CMD,
10748 ASC_EEP_CMD_READ | eep_word_addr); 10747 ASC_EEP_CMD_READ | eep_word_addr);
@@ -10753,8 +10752,8 @@ static ushort __devinit AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr)
10753/* 10752/*
10754 * Write the EEPROM from 'cfg_buf'. 10753 * Write the EEPROM from 'cfg_buf'.
10755 */ 10754 */
10756static void __devinit 10755static void AdvSet3550EEPConfig(AdvPortAddr iop_base,
10757AdvSet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) 10756 ADVEEP_3550_CONFIG *cfg_buf)
10758{ 10757{
10759 ushort *wbuf; 10758 ushort *wbuf;
10760 ushort addr, chksum; 10759 ushort addr, chksum;
@@ -10820,8 +10819,8 @@ AdvSet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf)
10820/* 10819/*
10821 * Write the EEPROM from 'cfg_buf'. 10820 * Write the EEPROM from 'cfg_buf'.
10822 */ 10821 */
10823static void __devinit 10822static void AdvSet38C0800EEPConfig(AdvPortAddr iop_base,
10824AdvSet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) 10823 ADVEEP_38C0800_CONFIG *cfg_buf)
10825{ 10824{
10826 ushort *wbuf; 10825 ushort *wbuf;
10827 ushort *charfields; 10826 ushort *charfields;
@@ -10887,8 +10886,8 @@ AdvSet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf)
10887/* 10886/*
10888 * Write the EEPROM from 'cfg_buf'. 10887 * Write the EEPROM from 'cfg_buf'.
10889 */ 10888 */
10890static void __devinit 10889static void AdvSet38C1600EEPConfig(AdvPortAddr iop_base,
10891AdvSet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) 10890 ADVEEP_38C1600_CONFIG *cfg_buf)
10892{ 10891{
10893 ushort *wbuf; 10892 ushort *wbuf;
10894 ushort *charfields; 10893 ushort *charfields;
@@ -10956,8 +10955,8 @@ AdvSet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf)
10956 * 10955 *
10957 * Return a checksum based on the EEPROM configuration read. 10956 * Return a checksum based on the EEPROM configuration read.
10958 */ 10957 */
10959static ushort __devinit 10958static ushort AdvGet3550EEPConfig(AdvPortAddr iop_base,
10960AdvGet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) 10959 ADVEEP_3550_CONFIG *cfg_buf)
10961{ 10960{
10962 ushort wval, chksum; 10961 ushort wval, chksum;
10963 ushort *wbuf; 10962 ushort *wbuf;
@@ -10999,8 +10998,8 @@ AdvGet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf)
10999 * 10998 *
11000 * Return a checksum based on the EEPROM configuration read. 10999 * Return a checksum based on the EEPROM configuration read.
11001 */ 11000 */
11002static ushort __devinit 11001static ushort AdvGet38C0800EEPConfig(AdvPortAddr iop_base,
11003AdvGet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) 11002 ADVEEP_38C0800_CONFIG *cfg_buf)
11004{ 11003{
11005 ushort wval, chksum; 11004 ushort wval, chksum;
11006 ushort *wbuf; 11005 ushort *wbuf;
@@ -11042,8 +11041,8 @@ AdvGet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf)
11042 * 11041 *
11043 * Return a checksum based on the EEPROM configuration read. 11042 * Return a checksum based on the EEPROM configuration read.
11044 */ 11043 */
11045static ushort __devinit 11044static ushort AdvGet38C1600EEPConfig(AdvPortAddr iop_base,
11046AdvGet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) 11045 ADVEEP_38C1600_CONFIG *cfg_buf)
11047{ 11046{
11048 ushort wval, chksum; 11047 ushort wval, chksum;
11049 ushort *wbuf; 11048 ushort *wbuf;
@@ -11092,7 +11091,7 @@ AdvGet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf)
11092 * 11091 *
11093 * Note: Chip is stopped on entry. 11092 * Note: Chip is stopped on entry.
11094 */ 11093 */
11095static int __devinit AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc) 11094static int AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc)
11096{ 11095{
11097 AdvPortAddr iop_base; 11096 AdvPortAddr iop_base;
11098 ushort warn_code; 11097 ushort warn_code;
@@ -11242,7 +11241,7 @@ static int __devinit AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc)
11242 * 11241 *
11243 * Note: Chip is stopped on entry. 11242 * Note: Chip is stopped on entry.
11244 */ 11243 */
11245static int __devinit AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc) 11244static int AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc)
11246{ 11245{
11247 AdvPortAddr iop_base; 11246 AdvPortAddr iop_base;
11248 ushort warn_code; 11247 ushort warn_code;
@@ -11441,7 +11440,7 @@ static int __devinit AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc)
11441 * 11440 *
11442 * Note: Chip is stopped on entry. 11441 * Note: Chip is stopped on entry.
11443 */ 11442 */
11444static int __devinit AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc) 11443static int AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc)
11445{ 11444{
11446 AdvPortAddr iop_base; 11445 AdvPortAddr iop_base;
11447 ushort warn_code; 11446 ushort warn_code;
@@ -11661,8 +11660,7 @@ static int __devinit AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc)
11661 * For a non-fatal error return a warning code. If there are no warnings 11660 * For a non-fatal error return a warning code. If there are no warnings
11662 * then 0 is returned. 11661 * then 0 is returned.
11663 */ 11662 */
11664static int __devinit 11663static int AdvInitGetConfig(struct pci_dev *pdev, struct Scsi_Host *shost)
11665AdvInitGetConfig(struct pci_dev *pdev, struct Scsi_Host *shost)
11666{ 11664{
11667 struct asc_board *board = shost_priv(shost); 11665 struct asc_board *board = shost_priv(shost);
11668 ADV_DVC_VAR *asc_dvc = &board->dvc_var.adv_dvc_var; 11666 ADV_DVC_VAR *asc_dvc = &board->dvc_var.adv_dvc_var;
@@ -11769,7 +11767,7 @@ static struct scsi_host_template advansys_template = {
11769 .use_clustering = ENABLE_CLUSTERING, 11767 .use_clustering = ENABLE_CLUSTERING,
11770}; 11768};
11771 11769
11772static int __devinit advansys_wide_init_chip(struct Scsi_Host *shost) 11770static int advansys_wide_init_chip(struct Scsi_Host *shost)
11773{ 11771{
11774 struct asc_board *board = shost_priv(shost); 11772 struct asc_board *board = shost_priv(shost);
11775 struct adv_dvc_var *adv_dvc = &board->dvc_var.adv_dvc_var; 11773 struct adv_dvc_var *adv_dvc = &board->dvc_var.adv_dvc_var;
@@ -11882,8 +11880,8 @@ static void advansys_wide_free_mem(struct asc_board *board)
11882 } 11880 }
11883} 11881}
11884 11882
11885static int __devinit advansys_board_found(struct Scsi_Host *shost, 11883static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,
11886 unsigned int iop, int bus_type) 11884 int bus_type)
11887{ 11885{
11888 struct pci_dev *pdev; 11886 struct pci_dev *pdev;
11889 struct asc_board *boardp = shost_priv(shost); 11887 struct asc_board *boardp = shost_priv(shost);
@@ -12428,7 +12426,7 @@ static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] = {
12428 * 10: 12 12426 * 10: 12
12429 * 11: 15 12427 * 11: 15
12430 */ 12428 */
12431static unsigned int __devinit advansys_isa_irq_no(PortAddr iop_base) 12429static unsigned int advansys_isa_irq_no(PortAddr iop_base)
12432{ 12430{
12433 unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); 12431 unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base);
12434 unsigned int chip_irq = ((cfg_lsw >> 2) & 0x03) + 10; 12432 unsigned int chip_irq = ((cfg_lsw >> 2) & 0x03) + 10;
@@ -12437,7 +12435,7 @@ static unsigned int __devinit advansys_isa_irq_no(PortAddr iop_base)
12437 return chip_irq; 12435 return chip_irq;
12438} 12436}
12439 12437
12440static int __devinit advansys_isa_probe(struct device *dev, unsigned int id) 12438static int advansys_isa_probe(struct device *dev, unsigned int id)
12441{ 12439{
12442 int err = -ENODEV; 12440 int err = -ENODEV;
12443 PortAddr iop_base = _asc_def_iop_base[id]; 12441 PortAddr iop_base = _asc_def_iop_base[id];
@@ -12477,7 +12475,7 @@ static int __devinit advansys_isa_probe(struct device *dev, unsigned int id)
12477 return err; 12475 return err;
12478} 12476}
12479 12477
12480static int __devexit advansys_isa_remove(struct device *dev, unsigned int id) 12478static int advansys_isa_remove(struct device *dev, unsigned int id)
12481{ 12479{
12482 int ioport = _asc_def_iop_base[id]; 12480 int ioport = _asc_def_iop_base[id];
12483 advansys_release(dev_get_drvdata(dev)); 12481 advansys_release(dev_get_drvdata(dev));
@@ -12487,7 +12485,7 @@ static int __devexit advansys_isa_remove(struct device *dev, unsigned int id)
12487 12485
12488static struct isa_driver advansys_isa_driver = { 12486static struct isa_driver advansys_isa_driver = {
12489 .probe = advansys_isa_probe, 12487 .probe = advansys_isa_probe,
12490 .remove = __devexit_p(advansys_isa_remove), 12488 .remove = advansys_isa_remove,
12491 .driver = { 12489 .driver = {
12492 .owner = THIS_MODULE, 12490 .owner = THIS_MODULE,
12493 .name = DRV_NAME, 12491 .name = DRV_NAME,
@@ -12505,7 +12503,7 @@ static struct isa_driver advansys_isa_driver = {
12505 * 110: 15 12503 * 110: 15
12506 * 111: invalid 12504 * 111: invalid
12507 */ 12505 */
12508static unsigned int __devinit advansys_vlb_irq_no(PortAddr iop_base) 12506static unsigned int advansys_vlb_irq_no(PortAddr iop_base)
12509{ 12507{
12510 unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); 12508 unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base);
12511 unsigned int chip_irq = ((cfg_lsw >> 2) & 0x07) + 9; 12509 unsigned int chip_irq = ((cfg_lsw >> 2) & 0x07) + 9;
@@ -12514,7 +12512,7 @@ static unsigned int __devinit advansys_vlb_irq_no(PortAddr iop_base)
12514 return chip_irq; 12512 return chip_irq;
12515} 12513}
12516 12514
12517static int __devinit advansys_vlb_probe(struct device *dev, unsigned int id) 12515static int advansys_vlb_probe(struct device *dev, unsigned int id)
12518{ 12516{
12519 int err = -ENODEV; 12517 int err = -ENODEV;
12520 PortAddr iop_base = _asc_def_iop_base[id]; 12518 PortAddr iop_base = _asc_def_iop_base[id];
@@ -12561,14 +12559,14 @@ static int __devinit advansys_vlb_probe(struct device *dev, unsigned int id)
12561 12559
12562static struct isa_driver advansys_vlb_driver = { 12560static struct isa_driver advansys_vlb_driver = {
12563 .probe = advansys_vlb_probe, 12561 .probe = advansys_vlb_probe,
12564 .remove = __devexit_p(advansys_isa_remove), 12562 .remove = advansys_isa_remove,
12565 .driver = { 12563 .driver = {
12566 .owner = THIS_MODULE, 12564 .owner = THIS_MODULE,
12567 .name = "advansys_vlb", 12565 .name = "advansys_vlb",
12568 }, 12566 },
12569}; 12567};
12570 12568
12571static struct eisa_device_id advansys_eisa_table[] __devinitdata = { 12569static struct eisa_device_id advansys_eisa_table[] = {
12572 { "ABP7401" }, 12570 { "ABP7401" },
12573 { "ABP7501" }, 12571 { "ABP7501" },
12574 { "" } 12572 { "" }
@@ -12595,7 +12593,7 @@ struct eisa_scsi_data {
12595 * 110: invalid 12593 * 110: invalid
12596 * 111: invalid 12594 * 111: invalid
12597 */ 12595 */
12598static unsigned int __devinit advansys_eisa_irq_no(struct eisa_device *edev) 12596static unsigned int advansys_eisa_irq_no(struct eisa_device *edev)
12599{ 12597{
12600 unsigned short cfg_lsw = inw(edev->base_addr + 0xc86); 12598 unsigned short cfg_lsw = inw(edev->base_addr + 0xc86);
12601 unsigned int chip_irq = ((cfg_lsw >> 8) & 0x07) + 10; 12599 unsigned int chip_irq = ((cfg_lsw >> 8) & 0x07) + 10;
@@ -12604,7 +12602,7 @@ static unsigned int __devinit advansys_eisa_irq_no(struct eisa_device *edev)
12604 return chip_irq; 12602 return chip_irq;
12605} 12603}
12606 12604
12607static int __devinit advansys_eisa_probe(struct device *dev) 12605static int advansys_eisa_probe(struct device *dev)
12608{ 12606{
12609 int i, ioport, irq = 0; 12607 int i, ioport, irq = 0;
12610 int err; 12608 int err;
@@ -12677,7 +12675,7 @@ static int __devinit advansys_eisa_probe(struct device *dev)
12677 return err; 12675 return err;
12678} 12676}
12679 12677
12680static __devexit int advansys_eisa_remove(struct device *dev) 12678static int advansys_eisa_remove(struct device *dev)
12681{ 12679{
12682 int i; 12680 int i;
12683 struct eisa_scsi_data *data = dev_get_drvdata(dev); 12681 struct eisa_scsi_data *data = dev_get_drvdata(dev);
@@ -12701,12 +12699,12 @@ static struct eisa_driver advansys_eisa_driver = {
12701 .driver = { 12699 .driver = {
12702 .name = DRV_NAME, 12700 .name = DRV_NAME,
12703 .probe = advansys_eisa_probe, 12701 .probe = advansys_eisa_probe,
12704 .remove = __devexit_p(advansys_eisa_remove), 12702 .remove = advansys_eisa_remove,
12705 } 12703 }
12706}; 12704};
12707 12705
12708/* PCI Devices supported by this driver */ 12706/* PCI Devices supported by this driver */
12709static struct pci_device_id advansys_pci_tbl[] __devinitdata = { 12707static struct pci_device_id advansys_pci_tbl[] = {
12710 {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A, 12708 {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A,
12711 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 12709 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
12712 {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_ABP940, 12710 {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_ABP940,
@@ -12724,7 +12722,7 @@ static struct pci_device_id advansys_pci_tbl[] __devinitdata = {
12724 12722
12725MODULE_DEVICE_TABLE(pci, advansys_pci_tbl); 12723MODULE_DEVICE_TABLE(pci, advansys_pci_tbl);
12726 12724
12727static void __devinit advansys_set_latency(struct pci_dev *pdev) 12725static void advansys_set_latency(struct pci_dev *pdev)
12728{ 12726{
12729 if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) || 12727 if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) ||
12730 (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) { 12728 (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) {
@@ -12737,8 +12735,8 @@ static void __devinit advansys_set_latency(struct pci_dev *pdev)
12737 } 12735 }
12738} 12736}
12739 12737
12740static int __devinit 12738static int advansys_pci_probe(struct pci_dev *pdev,
12741advansys_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 12739 const struct pci_device_id *ent)
12742{ 12740{
12743 int err, ioport; 12741 int err, ioport;
12744 struct Scsi_Host *shost; 12742 struct Scsi_Host *shost;
@@ -12791,7 +12789,7 @@ advansys_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
12791 return err; 12789 return err;
12792} 12790}
12793 12791
12794static void __devexit advansys_pci_remove(struct pci_dev *pdev) 12792static void advansys_pci_remove(struct pci_dev *pdev)
12795{ 12793{
12796 advansys_release(pci_get_drvdata(pdev)); 12794 advansys_release(pci_get_drvdata(pdev));
12797 pci_release_regions(pdev); 12795 pci_release_regions(pdev);
@@ -12802,7 +12800,7 @@ static struct pci_driver advansys_pci_driver = {
12802 .name = DRV_NAME, 12800 .name = DRV_NAME,
12803 .id_table = advansys_pci_tbl, 12801 .id_table = advansys_pci_tbl,
12804 .probe = advansys_pci_probe, 12802 .probe = advansys_pci_probe,
12805 .remove = __devexit_p(advansys_pci_remove), 12803 .remove = advansys_pci_remove,
12806}; 12804};
12807 12805
12808static int __init advansys_init(void) 12806static int __init advansys_init(void)
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index dd4547bf6881..a284be17699f 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -420,7 +420,7 @@ MODULE_PARM_DESC(aha152x1, "parameters for second controller");
420#endif /* MODULE */ 420#endif /* MODULE */
421 421
422#ifdef __ISAPNP__ 422#ifdef __ISAPNP__
423static struct isapnp_device_id id_table[] __devinitdata = { 423static struct isapnp_device_id id_table[] = {
424 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1502), 0 }, 424 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1502), 0 },
425 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1505), 0 }, 425 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1505), 0 },
426 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1510), 0 }, 426 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1510), 0 },
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c
index a3e6ed353917..df775e6ba579 100644
--- a/drivers/scsi/aha1740.c
+++ b/drivers/scsi/aha1740.c
@@ -646,7 +646,7 @@ static int aha1740_probe (struct device *dev)
646 return -ENODEV; 646 return -ENODEV;
647} 647}
648 648
649static __devexit int aha1740_remove (struct device *dev) 649static int aha1740_remove (struct device *dev)
650{ 650{
651 struct Scsi_Host *shpnt = dev_get_drvdata(dev); 651 struct Scsi_Host *shpnt = dev_get_drvdata(dev);
652 struct aha1740_hostdata *host = HOSTDATA (shpnt); 652 struct aha1740_hostdata *host = HOSTDATA (shpnt);
@@ -677,7 +677,7 @@ static struct eisa_driver aha1740_driver = {
677 .driver = { 677 .driver = {
678 .name = "aha1740", 678 .name = "aha1740",
679 .probe = aha1740_probe, 679 .probe = aha1740_probe,
680 .remove = __devexit_p (aha1740_remove), 680 .remove = aha1740_remove,
681 }, 681 },
682}; 682};
683 683
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index 1c4120c3db41..c56741fc4b99 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -85,7 +85,7 @@ static struct scsi_host_template aic94xx_sht = {
85 .ioctl = sas_ioctl, 85 .ioctl = sas_ioctl,
86}; 86};
87 87
88static int __devinit asd_map_memio(struct asd_ha_struct *asd_ha) 88static int asd_map_memio(struct asd_ha_struct *asd_ha)
89{ 89{
90 int err, i; 90 int err, i;
91 struct asd_ha_addrspace *io_handle; 91 struct asd_ha_addrspace *io_handle;
@@ -146,7 +146,7 @@ static void asd_unmap_memio(struct asd_ha_struct *asd_ha)
146 pci_release_region(asd_ha->pcidev, 0); 146 pci_release_region(asd_ha->pcidev, 0);
147} 147}
148 148
149static int __devinit asd_map_ioport(struct asd_ha_struct *asd_ha) 149static int asd_map_ioport(struct asd_ha_struct *asd_ha)
150{ 150{
151 int i = PCI_IOBAR_OFFSET, err; 151 int i = PCI_IOBAR_OFFSET, err;
152 struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; 152 struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0];
@@ -175,7 +175,7 @@ static void asd_unmap_ioport(struct asd_ha_struct *asd_ha)
175 pci_release_region(asd_ha->pcidev, PCI_IOBAR_OFFSET); 175 pci_release_region(asd_ha->pcidev, PCI_IOBAR_OFFSET);
176} 176}
177 177
178static int __devinit asd_map_ha(struct asd_ha_struct *asd_ha) 178static int asd_map_ha(struct asd_ha_struct *asd_ha)
179{ 179{
180 int err; 180 int err;
181 u16 cmd_reg; 181 u16 cmd_reg;
@@ -221,7 +221,7 @@ static const char *asd_dev_rev[30] = {
221 [8] = "B0", 221 [8] = "B0",
222}; 222};
223 223
224static int __devinit asd_common_setup(struct asd_ha_struct *asd_ha) 224static int asd_common_setup(struct asd_ha_struct *asd_ha)
225{ 225{
226 int err, i; 226 int err, i;
227 227
@@ -257,7 +257,7 @@ Err:
257 return err; 257 return err;
258} 258}
259 259
260static int __devinit asd_aic9410_setup(struct asd_ha_struct *asd_ha) 260static int asd_aic9410_setup(struct asd_ha_struct *asd_ha)
261{ 261{
262 int err = asd_common_setup(asd_ha); 262 int err = asd_common_setup(asd_ha);
263 263
@@ -272,7 +272,7 @@ static int __devinit asd_aic9410_setup(struct asd_ha_struct *asd_ha)
272 return 0; 272 return 0;
273} 273}
274 274
275static int __devinit asd_aic9405_setup(struct asd_ha_struct *asd_ha) 275static int asd_aic9405_setup(struct asd_ha_struct *asd_ha)
276{ 276{
277 int err = asd_common_setup(asd_ha); 277 int err = asd_common_setup(asd_ha);
278 278
@@ -531,7 +531,7 @@ static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha)
531static const struct asd_pcidev_struct { 531static const struct asd_pcidev_struct {
532 const char * name; 532 const char * name;
533 int (*setup)(struct asd_ha_struct *asd_ha); 533 int (*setup)(struct asd_ha_struct *asd_ha);
534} asd_pcidev_data[] __devinitconst = { 534} asd_pcidev_data[] = {
535 /* Id 0 is used for dynamic ids. */ 535 /* Id 0 is used for dynamic ids. */
536 { .name = "Adaptec AIC-94xx SAS/SATA Host Adapter", 536 { .name = "Adaptec AIC-94xx SAS/SATA Host Adapter",
537 .setup = asd_aic9410_setup 537 .setup = asd_aic9410_setup
@@ -731,8 +731,7 @@ static int asd_unregister_sas_ha(struct asd_ha_struct *asd_ha)
731 return err; 731 return err;
732} 732}
733 733
734static int __devinit asd_pci_probe(struct pci_dev *dev, 734static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
735 const struct pci_device_id *id)
736{ 735{
737 const struct asd_pcidev_struct *asd_dev; 736 const struct asd_pcidev_struct *asd_dev;
738 unsigned asd_id = (unsigned) id->driver_data; 737 unsigned asd_id = (unsigned) id->driver_data;
@@ -924,7 +923,7 @@ static void asd_turn_off_leds(struct asd_ha_struct *asd_ha)
924 } 923 }
925} 924}
926 925
927static void __devexit asd_pci_remove(struct pci_dev *dev) 926static void asd_pci_remove(struct pci_dev *dev)
928{ 927{
929 struct asd_ha_struct *asd_ha = pci_get_drvdata(dev); 928 struct asd_ha_struct *asd_ha = pci_get_drvdata(dev);
930 929
@@ -1012,7 +1011,7 @@ static struct sas_domain_function_template aic94xx_transport_functions = {
1012 .lldd_ata_set_dmamode = asd_set_dmamode, 1011 .lldd_ata_set_dmamode = asd_set_dmamode,
1013}; 1012};
1014 1013
1015static const struct pci_device_id aic94xx_pci_table[] __devinitconst = { 1014static const struct pci_device_id aic94xx_pci_table[] = {
1016 {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x410),0, 0, 1}, 1015 {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x410),0, 0, 1},
1017 {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x412),0, 0, 1}, 1016 {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x412),0, 0, 1},
1018 {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x416),0, 0, 1}, 1017 {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x416),0, 0, 1},
@@ -1031,7 +1030,7 @@ static struct pci_driver aic94xx_pci_driver = {
1031 .name = ASD_DRIVER_NAME, 1030 .name = ASD_DRIVER_NAME,
1032 .id_table = aic94xx_pci_table, 1031 .id_table = aic94xx_pci_table,
1033 .probe = asd_pci_probe, 1032 .probe = asd_pci_probe,
1034 .remove = __devexit_p(asd_pci_remove), 1033 .remove = asd_pci_remove,
1035}; 1034};
1036 1035
1037static int __init aic94xx_init(void) 1036static int __init aic94xx_init(void)
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c
index b330438ac662..3e1172adb37b 100644
--- a/drivers/scsi/arm/acornscsi.c
+++ b/drivers/scsi/arm/acornscsi.c
@@ -2965,8 +2965,7 @@ static struct scsi_host_template acornscsi_template = {
2965 .proc_name = "acornscsi", 2965 .proc_name = "acornscsi",
2966}; 2966};
2967 2967
2968static int __devinit 2968static int acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
2969acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
2970{ 2969{
2971 struct Scsi_Host *host; 2970 struct Scsi_Host *host;
2972 AS_Host *ashost; 2971 AS_Host *ashost;
@@ -3032,7 +3031,7 @@ acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
3032 return ret; 3031 return ret;
3033} 3032}
3034 3033
3035static void __devexit acornscsi_remove(struct expansion_card *ec) 3034static void acornscsi_remove(struct expansion_card *ec)
3036{ 3035{
3037 struct Scsi_Host *host = ecard_get_drvdata(ec); 3036 struct Scsi_Host *host = ecard_get_drvdata(ec);
3038 AS_Host *ashost = (AS_Host *)host->hostdata; 3037 AS_Host *ashost = (AS_Host *)host->hostdata;
@@ -3063,7 +3062,7 @@ static const struct ecard_id acornscsi_cids[] = {
3063 3062
3064static struct ecard_driver acornscsi_driver = { 3063static struct ecard_driver acornscsi_driver = {
3065 .probe = acornscsi_probe, 3064 .probe = acornscsi_probe,
3066 .remove = __devexit_p(acornscsi_remove), 3065 .remove = acornscsi_remove,
3067 .id_table = acornscsi_cids, 3066 .id_table = acornscsi_cids,
3068 .drv = { 3067 .drv = {
3069 .name = "acornscsi", 3068 .name = "acornscsi",
diff --git a/drivers/scsi/arm/arxescsi.c b/drivers/scsi/arm/arxescsi.c
index 2a28b4ad1975..9274510294ac 100644
--- a/drivers/scsi/arm/arxescsi.c
+++ b/drivers/scsi/arm/arxescsi.c
@@ -276,8 +276,7 @@ static struct scsi_host_template arxescsi_template = {
276 .proc_name = "arxescsi", 276 .proc_name = "arxescsi",
277}; 277};
278 278
279static int __devinit 279static int arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
280arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
281{ 280{
282 struct Scsi_Host *host; 281 struct Scsi_Host *host;
283 struct arxescsi_info *info; 282 struct arxescsi_info *info;
@@ -340,7 +339,7 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
340 return ret; 339 return ret;
341} 340}
342 341
343static void __devexit arxescsi_remove(struct expansion_card *ec) 342static void arxescsi_remove(struct expansion_card *ec)
344{ 343{
345 struct Scsi_Host *host = ecard_get_drvdata(ec); 344 struct Scsi_Host *host = ecard_get_drvdata(ec);
346 345
@@ -359,7 +358,7 @@ static const struct ecard_id arxescsi_cids[] = {
359 358
360static struct ecard_driver arxescsi_driver = { 359static struct ecard_driver arxescsi_driver = {
361 .probe = arxescsi_probe, 360 .probe = arxescsi_probe,
362 .remove = __devexit_p(arxescsi_remove), 361 .remove = arxescsi_remove,
363 .id_table = arxescsi_cids, 362 .id_table = arxescsi_cids,
364 .drv = { 363 .drv = {
365 .name = "arxescsi", 364 .name = "arxescsi",
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c
index c3b99c93637a..c93938b246d5 100644
--- a/drivers/scsi/arm/cumana_1.c
+++ b/drivers/scsi/arm/cumana_1.c
@@ -225,8 +225,8 @@ static struct scsi_host_template cumanascsi_template = {
225 .proc_name = "CumanaSCSI-1", 225 .proc_name = "CumanaSCSI-1",
226}; 226};
227 227
228static int __devinit 228static int cumanascsi1_probe(struct expansion_card *ec,
229cumanascsi1_probe(struct expansion_card *ec, const struct ecard_id *id) 229 const struct ecard_id *id)
230{ 230{
231 struct Scsi_Host *host; 231 struct Scsi_Host *host;
232 int ret; 232 int ret;
@@ -298,7 +298,7 @@ cumanascsi1_probe(struct expansion_card *ec, const struct ecard_id *id)
298 return ret; 298 return ret;
299} 299}
300 300
301static void __devexit cumanascsi1_remove(struct expansion_card *ec) 301static void cumanascsi1_remove(struct expansion_card *ec)
302{ 302{
303 struct Scsi_Host *host = ecard_get_drvdata(ec); 303 struct Scsi_Host *host = ecard_get_drvdata(ec);
304 304
@@ -320,7 +320,7 @@ static const struct ecard_id cumanascsi1_cids[] = {
320 320
321static struct ecard_driver cumanascsi1_driver = { 321static struct ecard_driver cumanascsi1_driver = {
322 .probe = cumanascsi1_probe, 322 .probe = cumanascsi1_probe,
323 .remove = __devexit_p(cumanascsi1_remove), 323 .remove = cumanascsi1_remove,
324 .id_table = cumanascsi1_cids, 324 .id_table = cumanascsi1_cids,
325 .drv = { 325 .drv = {
326 .name = "cumanascsi1", 326 .name = "cumanascsi1",
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index 547987b86384..e3bae93c3c22 100644
--- a/drivers/scsi/arm/cumana_2.c
+++ b/drivers/scsi/arm/cumana_2.c
@@ -397,8 +397,8 @@ static struct scsi_host_template cumanascsi2_template = {
397 .proc_name = "cumanascsi2", 397 .proc_name = "cumanascsi2",
398}; 398};
399 399
400static int __devinit 400static int cumanascsi2_probe(struct expansion_card *ec,
401cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id) 401 const struct ecard_id *id)
402{ 402{
403 struct Scsi_Host *host; 403 struct Scsi_Host *host;
404 struct cumanascsi2_info *info; 404 struct cumanascsi2_info *info;
@@ -495,7 +495,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
495 return ret; 495 return ret;
496} 496}
497 497
498static void __devexit cumanascsi2_remove(struct expansion_card *ec) 498static void cumanascsi2_remove(struct expansion_card *ec)
499{ 499{
500 struct Scsi_Host *host = ecard_get_drvdata(ec); 500 struct Scsi_Host *host = ecard_get_drvdata(ec);
501 struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; 501 struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata;
@@ -519,7 +519,7 @@ static const struct ecard_id cumanascsi2_cids[] = {
519 519
520static struct ecard_driver cumanascsi2_driver = { 520static struct ecard_driver cumanascsi2_driver = {
521 .probe = cumanascsi2_probe, 521 .probe = cumanascsi2_probe,
522 .remove = __devexit_p(cumanascsi2_remove), 522 .remove = cumanascsi2_remove,
523 .id_table = cumanascsi2_cids, 523 .id_table = cumanascsi2_cids,
524 .drv = { 524 .drv = {
525 .name = "cumanascsi2", 525 .name = "cumanascsi2",
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c
index 968d08358d20..8e36908415ec 100644
--- a/drivers/scsi/arm/eesox.c
+++ b/drivers/scsi/arm/eesox.c
@@ -515,8 +515,7 @@ static struct scsi_host_template eesox_template = {
515 .proc_name = "eesox", 515 .proc_name = "eesox",
516}; 516};
517 517
518static int __devinit 518static int eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
519eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
520{ 519{
521 struct Scsi_Host *host; 520 struct Scsi_Host *host;
522 struct eesoxscsi_info *info; 521 struct eesoxscsi_info *info;
@@ -617,7 +616,7 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
617 return ret; 616 return ret;
618} 617}
619 618
620static void __devexit eesoxscsi_remove(struct expansion_card *ec) 619static void eesoxscsi_remove(struct expansion_card *ec)
621{ 620{
622 struct Scsi_Host *host = ecard_get_drvdata(ec); 621 struct Scsi_Host *host = ecard_get_drvdata(ec);
623 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; 622 struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata;
@@ -643,7 +642,7 @@ static const struct ecard_id eesoxscsi_cids[] = {
643 642
644static struct ecard_driver eesoxscsi_driver = { 643static struct ecard_driver eesoxscsi_driver = {
645 .probe = eesoxscsi_probe, 644 .probe = eesoxscsi_probe,
646 .remove = __devexit_p(eesoxscsi_remove), 645 .remove = eesoxscsi_remove,
647 .id_table = eesoxscsi_cids, 646 .id_table = eesoxscsi_cids,
648 .drv = { 647 .drv = {
649 .name = "eesoxscsi", 648 .name = "eesoxscsi",
diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c
index fc6a5aabf66e..48facdc18002 100644
--- a/drivers/scsi/arm/oak.c
+++ b/drivers/scsi/arm/oak.c
@@ -129,8 +129,7 @@ static struct scsi_host_template oakscsi_template = {
129 .proc_name = "oakscsi", 129 .proc_name = "oakscsi",
130}; 130};
131 131
132static int __devinit 132static int oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
133oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
134{ 133{
135 struct Scsi_Host *host; 134 struct Scsi_Host *host;
136 int ret = -ENOMEM; 135 int ret = -ENOMEM;
@@ -182,7 +181,7 @@ oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
182 return ret; 181 return ret;
183} 182}
184 183
185static void __devexit oakscsi_remove(struct expansion_card *ec) 184static void oakscsi_remove(struct expansion_card *ec)
186{ 185{
187 struct Scsi_Host *host = ecard_get_drvdata(ec); 186 struct Scsi_Host *host = ecard_get_drvdata(ec);
188 187
@@ -202,7 +201,7 @@ static const struct ecard_id oakscsi_cids[] = {
202 201
203static struct ecard_driver oakscsi_driver = { 202static struct ecard_driver oakscsi_driver = {
204 .probe = oakscsi_probe, 203 .probe = oakscsi_probe,
205 .remove = __devexit_p(oakscsi_remove), 204 .remove = oakscsi_remove,
206 .id_table = oakscsi_cids, 205 .id_table = oakscsi_cids,
207 .drv = { 206 .drv = {
208 .name = "oakscsi", 207 .name = "oakscsi",
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c
index 9274c0677b9c..246600b93555 100644
--- a/drivers/scsi/arm/powertec.c
+++ b/drivers/scsi/arm/powertec.c
@@ -309,8 +309,8 @@ static struct scsi_host_template powertecscsi_template = {
309 .proc_name = "powertec", 309 .proc_name = "powertec",
310}; 310};
311 311
312static int __devinit 312static int powertecscsi_probe(struct expansion_card *ec,
313powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id) 313 const struct ecard_id *id)
314{ 314{
315 struct Scsi_Host *host; 315 struct Scsi_Host *host;
316 struct powertec_info *info; 316 struct powertec_info *info;
@@ -409,7 +409,7 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
409 return ret; 409 return ret;
410} 410}
411 411
412static void __devexit powertecscsi_remove(struct expansion_card *ec) 412static void powertecscsi_remove(struct expansion_card *ec)
413{ 413{
414 struct Scsi_Host *host = ecard_get_drvdata(ec); 414 struct Scsi_Host *host = ecard_get_drvdata(ec);
415 struct powertec_info *info = (struct powertec_info *)host->hostdata; 415 struct powertec_info *info = (struct powertec_info *)host->hostdata;
@@ -435,7 +435,7 @@ static const struct ecard_id powertecscsi_cids[] = {
435 435
436static struct ecard_driver powertecscsi_driver = { 436static struct ecard_driver powertecscsi_driver = {
437 .probe = powertecscsi_probe, 437 .probe = powertecscsi_probe,
438 .remove = __devexit_p(powertecscsi_remove), 438 .remove = powertecscsi_remove,
439 .id_table = powertecscsi_cids, 439 .id_table = powertecscsi_cids,
440 .drv = { 440 .drv = {
441 .name = "powertecscsi", 441 .name = "powertecscsi",
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index a540162ac59c..cfc73041f102 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -3210,7 +3210,7 @@ static struct pci_driver atp870u_driver = {
3210 .id_table = atp870u_id_table, 3210 .id_table = atp870u_id_table,
3211 .name = "atp870u", 3211 .name = "atp870u",
3212 .probe = atp870u_probe, 3212 .probe = atp870u_probe,
3213 .remove = __devexit_p(atp870u_remove), 3213 .remove = atp870u_remove,
3214}; 3214};
3215 3215
3216static int __init atp870u_init(void) 3216static int __init atp870u_init(void)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 48d37dded8f1..4e2733d23003 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4790,8 +4790,8 @@ beiscsi_hw_health_check(struct work_struct *work)
4790 msecs_to_jiffies(1000)); 4790 msecs_to_jiffies(1000));
4791} 4791}
4792 4792
4793static int __devinit beiscsi_dev_probe(struct pci_dev *pcidev, 4793static int beiscsi_dev_probe(struct pci_dev *pcidev,
4794 const struct pci_device_id *id) 4794 const struct pci_device_id *id)
4795{ 4795{
4796 struct beiscsi_hba *phba = NULL; 4796 struct beiscsi_hba *phba = NULL;
4797 struct hwi_controller *phwi_ctrlr; 4797 struct hwi_controller *phwi_ctrlr;
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index 895b0e516e07..e6bf12675db8 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1739,7 +1739,7 @@ static struct pci_driver bfad_pci_driver = {
1739 .name = BFAD_DRIVER_NAME, 1739 .name = BFAD_DRIVER_NAME,
1740 .id_table = bfad_id_table, 1740 .id_table = bfad_id_table,
1741 .probe = bfad_pci_probe, 1741 .probe = bfad_pci_probe,
1742 .remove = __devexit_p(bfad_pci_remove), 1742 .remove = bfad_pci_remove,
1743 .err_handler = &bfad_err_handler, 1743 .err_handler = &bfad_err_handler,
1744}; 1744};
1745 1745
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index e0558656c646..70ecd953a579 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -25,7 +25,7 @@ DEFINE_PER_CPU(struct bnx2fc_percpu_s, bnx2fc_percpu);
25#define DRV_MODULE_RELDATE "Jun 04, 2012" 25#define DRV_MODULE_RELDATE "Jun 04, 2012"
26 26
27 27
28static char version[] __devinitdata = 28static char version[] =
29 "Broadcom NetXtreme II FCoE Driver " DRV_MODULE_NAME \ 29 "Broadcom NetXtreme II FCoE Driver " DRV_MODULE_NAME \
30 " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 30 " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
31 31
diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c
index ee009e4ad097..50fef6963a81 100644
--- a/drivers/scsi/bnx2i/bnx2i_init.c
+++ b/drivers/scsi/bnx2i/bnx2i_init.c
@@ -21,7 +21,7 @@ static u32 adapter_count;
21#define DRV_MODULE_VERSION "2.7.2.2" 21#define DRV_MODULE_VERSION "2.7.2.2"
22#define DRV_MODULE_RELDATE "Apr 25, 2012" 22#define DRV_MODULE_RELDATE "Apr 25, 2012"
23 23
24static char version[] __devinitdata = 24static char version[] =
25 "Broadcom NetXtreme II iSCSI Driver " DRV_MODULE_NAME \ 25 "Broadcom NetXtreme II iSCSI Driver " DRV_MODULE_NAME \
26 " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 26 " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
27 27
diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c
index d40ea2f5be10..1e3f96adf9da 100644
--- a/drivers/scsi/bvme6000_scsi.c
+++ b/drivers/scsi/bvme6000_scsi.c
@@ -34,7 +34,7 @@ static struct scsi_host_template bvme6000_scsi_driver_template = {
34 34
35static struct platform_device *bvme6000_scsi_device; 35static struct platform_device *bvme6000_scsi_device;
36 36
37static __devinit int 37static int
38bvme6000_probe(struct platform_device *dev) 38bvme6000_probe(struct platform_device *dev)
39{ 39{
40 struct Scsi_Host *host; 40 struct Scsi_Host *host;
@@ -88,7 +88,7 @@ bvme6000_probe(struct platform_device *dev)
88 return -ENODEV; 88 return -ENODEV;
89} 89}
90 90
91static __devexit int 91static int
92bvme6000_device_remove(struct platform_device *dev) 92bvme6000_device_remove(struct platform_device *dev)
93{ 93{
94 struct Scsi_Host *host = platform_get_drvdata(dev); 94 struct Scsi_Host *host = platform_get_drvdata(dev);
@@ -108,7 +108,7 @@ static struct platform_driver bvme6000_scsi_driver = {
108 .owner = THIS_MODULE, 108 .owner = THIS_MODULE,
109 }, 109 },
110 .probe = bvme6000_probe, 110 .probe = bvme6000_probe,
111 .remove = __devexit_p(bvme6000_device_remove), 111 .remove = bvme6000_device_remove,
112}; 112};
113 113
114static int __init bvme6000_scsi_init(void) 114static int __init bvme6000_scsi_init(void)
diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
index fdd408ff80ad..b42cbbd3d92d 100644
--- a/drivers/scsi/csiostor/csio_init.c
+++ b/drivers/scsi/csiostor/csio_init.c
@@ -115,9 +115,8 @@ static const struct file_operations csio_mem_debugfs_fops = {
115 .llseek = default_llseek, 115 .llseek = default_llseek,
116}; 116};
117 117
118static void __devinit 118static void csio_add_debugfs_mem(struct csio_hw *hw, const char *name,
119csio_add_debugfs_mem(struct csio_hw *hw, const char *name, 119 unsigned int idx, unsigned int size_mb)
120 unsigned int idx, unsigned int size_mb)
121{ 120{
122 struct dentry *de; 121 struct dentry *de;
123 122
@@ -127,8 +126,7 @@ csio_add_debugfs_mem(struct csio_hw *hw, const char *name,
127 de->d_inode->i_size = size_mb << 20; 126 de->d_inode->i_size = size_mb << 20;
128} 127}
129 128
130static int __devinit 129static int csio_setup_debugfs(struct csio_hw *hw)
131csio_setup_debugfs(struct csio_hw *hw)
132{ 130{
133 int i; 131 int i;
134 132
@@ -531,8 +529,7 @@ csio_resource_free(struct csio_hw *hw)
531 * Allocates HW structure, DMA, memory resources, maps BARS to 529 * Allocates HW structure, DMA, memory resources, maps BARS to
532 * host memory and initializes HW module. 530 * host memory and initializes HW module.
533 */ 531 */
534static struct csio_hw * __devinit 532static struct csio_hw *csio_hw_alloc(struct pci_dev *pdev)
535csio_hw_alloc(struct pci_dev *pdev)
536{ 533{
537 struct csio_hw *hw; 534 struct csio_hw *hw;
538 535
@@ -956,8 +953,7 @@ csio_lnode_init_post(struct csio_lnode *ln)
956 * - Once hardware is ready, initiated scan of the host via 953 * - Once hardware is ready, initiated scan of the host via
957 * scsi_scan_host. 954 * scsi_scan_host.
958 */ 955 */
959static int __devinit 956static int csio_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
960csio_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
961{ 957{
962 int rv; 958 int rv;
963 int bars; 959 int bars;
@@ -1036,8 +1032,7 @@ err:
1036 * 1032 *
1037 * Used during hotplug operation. 1033 * Used during hotplug operation.
1038 */ 1034 */
1039static void __devexit 1035static void csio_remove_one(struct pci_dev *pdev)
1040csio_remove_one(struct pci_dev *pdev)
1041{ 1036{
1042 struct csio_hw *hw = pci_get_drvdata(pdev); 1037 struct csio_hw *hw = pci_get_drvdata(pdev);
1043 int bars = pci_select_bars(pdev, IORESOURCE_MEM); 1038 int bars = pci_select_bars(pdev, IORESOURCE_MEM);
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index 13aeca3d51f2..865c64fa923c 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -489,7 +489,7 @@ struct ParameterData {
489 int def; /* default value */ 489 int def; /* default value */
490 int safe; /* safe value */ 490 int safe; /* safe value */
491}; 491};
492static struct ParameterData __devinitdata cfg_data[] = { 492static struct ParameterData cfg_data[] = {
493 { /* adapter id */ 493 { /* adapter id */
494 CFG_PARAM_UNSET, 494 CFG_PARAM_UNSET,
495 0, 495 0,
@@ -574,7 +574,7 @@ MODULE_PARM_DESC(reset_delay, "Reset delay in seconds. Default 1 (0-180)");
574 * set_safe_settings - if the use_safe_settings option is set then 574 * set_safe_settings - if the use_safe_settings option is set then
575 * set all values to the safe and slow values. 575 * set all values to the safe and slow values.
576 **/ 576 **/
577static void __devinit set_safe_settings(void) 577static void set_safe_settings(void)
578{ 578{
579 if (use_safe_settings) 579 if (use_safe_settings)
580 { 580 {
@@ -593,7 +593,7 @@ static void __devinit set_safe_settings(void)
593 * fix_settings - reset any boot parameters which are out of range 593 * fix_settings - reset any boot parameters which are out of range
594 * back to the default values. 594 * back to the default values.
595 **/ 595 **/
596static void __devinit fix_settings(void) 596static void fix_settings(void)
597{ 597{
598 int i; 598 int i;
599 599
@@ -620,7 +620,7 @@ static void __devinit fix_settings(void)
620 * Mapping from the eeprom delay index value (index into this array) 620 * Mapping from the eeprom delay index value (index into this array)
621 * to the number of actual seconds that the delay should be for. 621 * to the number of actual seconds that the delay should be for.
622 */ 622 */
623static char __devinitdata eeprom_index_to_delay_map[] = 623static char eeprom_index_to_delay_map[] =
624 { 1, 3, 5, 10, 16, 30, 60, 120 }; 624 { 1, 3, 5, 10, 16, 30, 60, 120 };
625 625
626 626
@@ -630,7 +630,7 @@ static char __devinitdata eeprom_index_to_delay_map[] =
630 * 630 *
631 * @eeprom: The eeprom structure in which we find the delay index to map. 631 * @eeprom: The eeprom structure in which we find the delay index to map.
632 **/ 632 **/
633static void __devinit eeprom_index_to_delay(struct NvRamType *eeprom) 633static void eeprom_index_to_delay(struct NvRamType *eeprom)
634{ 634{
635 eeprom->delay_time = eeprom_index_to_delay_map[eeprom->delay_time]; 635 eeprom->delay_time = eeprom_index_to_delay_map[eeprom->delay_time];
636} 636}
@@ -643,7 +643,7 @@ static void __devinit eeprom_index_to_delay(struct NvRamType *eeprom)
643 * 643 *
644 * @delay: The delay, in seconds, to find the eeprom index for. 644 * @delay: The delay, in seconds, to find the eeprom index for.
645 **/ 645 **/
646static int __devinit delay_to_eeprom_index(int delay) 646static int delay_to_eeprom_index(int delay)
647{ 647{
648 u8 idx = 0; 648 u8 idx = 0;
649 while (idx < 7 && eeprom_index_to_delay_map[idx] < delay) 649 while (idx < 7 && eeprom_index_to_delay_map[idx] < delay)
@@ -659,7 +659,7 @@ static int __devinit delay_to_eeprom_index(int delay)
659 * 659 *
660 * @eeprom: The eeprom data to override with command line options. 660 * @eeprom: The eeprom data to override with command line options.
661 **/ 661 **/
662static void __devinit eeprom_override(struct NvRamType *eeprom) 662static void eeprom_override(struct NvRamType *eeprom)
663{ 663{
664 u8 id; 664 u8 id;
665 665
@@ -3938,7 +3938,7 @@ static void dc395x_slave_destroy(struct scsi_device *scsi_device)
3938 * 3938 *
3939 * @io_port: base I/O address 3939 * @io_port: base I/O address
3940 **/ 3940 **/
3941static void __devinit trms1040_wait_30us(unsigned long io_port) 3941static void trms1040_wait_30us(unsigned long io_port)
3942{ 3942{
3943 /* ScsiPortStallExecution(30); wait 30 us */ 3943 /* ScsiPortStallExecution(30); wait 30 us */
3944 outb(5, io_port + TRM_S1040_GEN_TIMER); 3944 outb(5, io_port + TRM_S1040_GEN_TIMER);
@@ -3955,7 +3955,7 @@ static void __devinit trms1040_wait_30us(unsigned long io_port)
3955 * @cmd: SB + op code (command) to send 3955 * @cmd: SB + op code (command) to send
3956 * @addr: address to send 3956 * @addr: address to send
3957 **/ 3957 **/
3958static void __devinit trms1040_write_cmd(unsigned long io_port, u8 cmd, u8 addr) 3958static void trms1040_write_cmd(unsigned long io_port, u8 cmd, u8 addr)
3959{ 3959{
3960 int i; 3960 int i;
3961 u8 send_data; 3961 u8 send_data;
@@ -4000,7 +4000,7 @@ static void __devinit trms1040_write_cmd(unsigned long io_port, u8 cmd, u8 addr)
4000 * @addr: offset into EEPROM 4000 * @addr: offset into EEPROM
4001 * @byte: bytes to write 4001 * @byte: bytes to write
4002 **/ 4002 **/
4003static void __devinit trms1040_set_data(unsigned long io_port, u8 addr, u8 byte) 4003static void trms1040_set_data(unsigned long io_port, u8 addr, u8 byte)
4004{ 4004{
4005 int i; 4005 int i;
4006 u8 send_data; 4006 u8 send_data;
@@ -4054,7 +4054,7 @@ static void __devinit trms1040_set_data(unsigned long io_port, u8 addr, u8 byte)
4054 * @eeprom: the data to write 4054 * @eeprom: the data to write
4055 * @io_port: the base io port 4055 * @io_port: the base io port
4056 **/ 4056 **/
4057static void __devinit trms1040_write_all(struct NvRamType *eeprom, unsigned long io_port) 4057static void trms1040_write_all(struct NvRamType *eeprom, unsigned long io_port)
4058{ 4058{
4059 u8 *b_eeprom = (u8 *)eeprom; 4059 u8 *b_eeprom = (u8 *)eeprom;
4060 u8 addr; 4060 u8 addr;
@@ -4094,7 +4094,7 @@ static void __devinit trms1040_write_all(struct NvRamType *eeprom, unsigned long
4094 * 4094 *
4095 * Returns the byte read. 4095 * Returns the byte read.
4096 **/ 4096 **/
4097static u8 __devinit trms1040_get_data(unsigned long io_port, u8 addr) 4097static u8 trms1040_get_data(unsigned long io_port, u8 addr)
4098{ 4098{
4099 int i; 4099 int i;
4100 u8 read_byte; 4100 u8 read_byte;
@@ -4132,7 +4132,7 @@ static u8 __devinit trms1040_get_data(unsigned long io_port, u8 addr)
4132 * @eeprom: where to store the data 4132 * @eeprom: where to store the data
4133 * @io_port: the base io port 4133 * @io_port: the base io port
4134 **/ 4134 **/
4135static void __devinit trms1040_read_all(struct NvRamType *eeprom, unsigned long io_port) 4135static void trms1040_read_all(struct NvRamType *eeprom, unsigned long io_port)
4136{ 4136{
4137 u8 *b_eeprom = (u8 *)eeprom; 4137 u8 *b_eeprom = (u8 *)eeprom;
4138 u8 addr; 4138 u8 addr;
@@ -4162,7 +4162,7 @@ static void __devinit trms1040_read_all(struct NvRamType *eeprom, unsigned long
4162 * @eeprom: caller allocated strcuture to read the eeprom data into 4162 * @eeprom: caller allocated strcuture to read the eeprom data into
4163 * @io_port: io port to read from 4163 * @io_port: io port to read from
4164 **/ 4164 **/
4165static void __devinit check_eeprom(struct NvRamType *eeprom, unsigned long io_port) 4165static void check_eeprom(struct NvRamType *eeprom, unsigned long io_port)
4166{ 4166{
4167 u16 *w_eeprom = (u16 *)eeprom; 4167 u16 *w_eeprom = (u16 *)eeprom;
4168 u16 w_addr; 4168 u16 w_addr;
@@ -4232,7 +4232,7 @@ static void __devinit check_eeprom(struct NvRamType *eeprom, unsigned long io_po
4232 * 4232 *
4233 * @eeprom: The eeprom data strucutre to show details for. 4233 * @eeprom: The eeprom data strucutre to show details for.
4234 **/ 4234 **/
4235static void __devinit print_eeprom_settings(struct NvRamType *eeprom) 4235static void print_eeprom_settings(struct NvRamType *eeprom)
4236{ 4236{
4237 dprintkl(KERN_INFO, "Used settings: AdapterID=%02i, Speed=%i(%02i.%01iMHz), dev_mode=0x%02x\n", 4237 dprintkl(KERN_INFO, "Used settings: AdapterID=%02i, Speed=%i(%02i.%01iMHz), dev_mode=0x%02x\n",
4238 eeprom->scsi_id, 4238 eeprom->scsi_id,
@@ -4260,7 +4260,7 @@ static void adapter_sg_tables_free(struct AdapterCtlBlk *acb)
4260/* 4260/*
4261 * Allocate SG tables; as we have to pci_map them, an SG list (struct SGentry*) 4261 * Allocate SG tables; as we have to pci_map them, an SG list (struct SGentry*)
4262 * should never cross a page boundary */ 4262 * should never cross a page boundary */
4263static int __devinit adapter_sg_tables_alloc(struct AdapterCtlBlk *acb) 4263static int adapter_sg_tables_alloc(struct AdapterCtlBlk *acb)
4264{ 4264{
4265 const unsigned mem_needed = (DC395x_MAX_SRB_CNT+1) 4265 const unsigned mem_needed = (DC395x_MAX_SRB_CNT+1)
4266 *SEGMENTX_LEN; 4266 *SEGMENTX_LEN;
@@ -4306,7 +4306,7 @@ static int __devinit adapter_sg_tables_alloc(struct AdapterCtlBlk *acb)
4306 * 4306 *
4307 * @acb: The adapter to print the information for. 4307 * @acb: The adapter to print the information for.
4308 **/ 4308 **/
4309static void __devinit adapter_print_config(struct AdapterCtlBlk *acb) 4309static void adapter_print_config(struct AdapterCtlBlk *acb)
4310{ 4310{
4311 u8 bval; 4311 u8 bval;
4312 4312
@@ -4350,7 +4350,7 @@ static void __devinit adapter_print_config(struct AdapterCtlBlk *acb)
4350 * 4350 *
4351 * @acb: The adapter to initialize. 4351 * @acb: The adapter to initialize.
4352 **/ 4352 **/
4353static void __devinit adapter_init_params(struct AdapterCtlBlk *acb) 4353static void adapter_init_params(struct AdapterCtlBlk *acb)
4354{ 4354{
4355 struct NvRamType *eeprom = &acb->eeprom; 4355 struct NvRamType *eeprom = &acb->eeprom;
4356 int i; 4356 int i;
@@ -4412,7 +4412,7 @@ static void __devinit adapter_init_params(struct AdapterCtlBlk *acb)
4412 * 4412 *
4413 * @host: The scsi host instance to fill in the values for. 4413 * @host: The scsi host instance to fill in the values for.
4414 **/ 4414 **/
4415static void __devinit adapter_init_scsi_host(struct Scsi_Host *host) 4415static void adapter_init_scsi_host(struct Scsi_Host *host)
4416{ 4416{
4417 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata; 4417 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata;
4418 struct NvRamType *eeprom = &acb->eeprom; 4418 struct NvRamType *eeprom = &acb->eeprom;
@@ -4453,7 +4453,7 @@ static void __devinit adapter_init_scsi_host(struct Scsi_Host *host)
4453 * 4453 *
4454 * @acb: The adapter which we are to init. 4454 * @acb: The adapter which we are to init.
4455 **/ 4455 **/
4456static void __devinit adapter_init_chip(struct AdapterCtlBlk *acb) 4456static void adapter_init_chip(struct AdapterCtlBlk *acb)
4457{ 4457{
4458 struct NvRamType *eeprom = &acb->eeprom; 4458 struct NvRamType *eeprom = &acb->eeprom;
4459 4459
@@ -4506,8 +4506,8 @@ static void __devinit adapter_init_chip(struct AdapterCtlBlk *acb)
4506 * Returns 0 if the initialization succeeds, any other value on 4506 * Returns 0 if the initialization succeeds, any other value on
4507 * failure. 4507 * failure.
4508 **/ 4508 **/
4509static int __devinit adapter_init(struct AdapterCtlBlk *acb, 4509static int adapter_init(struct AdapterCtlBlk *acb, unsigned long io_port,
4510 unsigned long io_port, u32 io_port_len, unsigned int irq) 4510 u32 io_port_len, unsigned int irq)
4511{ 4511{
4512 if (!request_region(io_port, io_port_len, DC395X_NAME)) { 4512 if (!request_region(io_port, io_port_len, DC395X_NAME)) {
4513 dprintkl(KERN_ERR, "Failed to reserve IO region 0x%lx\n", io_port); 4513 dprintkl(KERN_ERR, "Failed to reserve IO region 0x%lx\n", io_port);
@@ -4794,8 +4794,7 @@ static void banner_display(void)
4794 * 4794 *
4795 * Returns 0 on success, or an error code (-ve) on failure. 4795 * Returns 0 on success, or an error code (-ve) on failure.
4796 **/ 4796 **/
4797static int __devinit dc395x_init_one(struct pci_dev *dev, 4797static int dc395x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
4798 const struct pci_device_id *id)
4799{ 4798{
4800 struct Scsi_Host *scsi_host = NULL; 4799 struct Scsi_Host *scsi_host = NULL;
4801 struct AdapterCtlBlk *acb = NULL; 4800 struct AdapterCtlBlk *acb = NULL;
@@ -4861,7 +4860,7 @@ fail:
4861 * 4860 *
4862 * @dev: The PCI device to initialize. 4861 * @dev: The PCI device to initialize.
4863 **/ 4862 **/
4864static void __devexit dc395x_remove_one(struct pci_dev *dev) 4863static void dc395x_remove_one(struct pci_dev *dev)
4865{ 4864{
4866 struct Scsi_Host *scsi_host = pci_get_drvdata(dev); 4865 struct Scsi_Host *scsi_host = pci_get_drvdata(dev);
4867 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)(scsi_host->hostdata); 4866 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)(scsi_host->hostdata);
@@ -4892,7 +4891,7 @@ static struct pci_driver dc395x_driver = {
4892 .name = DC395X_NAME, 4891 .name = DC395X_NAME,
4893 .id_table = dc395x_pci_table, 4892 .id_table = dc395x_pci_table,
4894 .probe = dc395x_init_one, 4893 .probe = dc395x_init_one,
4895 .remove = __devexit_p(dc395x_remove_one), 4894 .remove = dc395x_remove_one,
4896}; 4895};
4897 4896
4898 4897
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c
index 207352cc70cc..4b0dd8c56707 100644
--- a/drivers/scsi/dmx3191d.c
+++ b/drivers/scsi/dmx3191d.c
@@ -68,8 +68,8 @@ static struct scsi_host_template dmx3191d_driver_template = {
68 .use_clustering = DISABLE_CLUSTERING, 68 .use_clustering = DISABLE_CLUSTERING,
69}; 69};
70 70
71static int __devinit dmx3191d_probe_one(struct pci_dev *pdev, 71static int dmx3191d_probe_one(struct pci_dev *pdev,
72 const struct pci_device_id *id) 72 const struct pci_device_id *id)
73{ 73{
74 struct Scsi_Host *shost; 74 struct Scsi_Host *shost;
75 unsigned long io; 75 unsigned long io;
@@ -123,7 +123,7 @@ static int __devinit dmx3191d_probe_one(struct pci_dev *pdev,
123 return error; 123 return error;
124} 124}
125 125
126static void __devexit dmx3191d_remove_one(struct pci_dev *pdev) 126static void dmx3191d_remove_one(struct pci_dev *pdev)
127{ 127{
128 struct Scsi_Host *shost = pci_get_drvdata(pdev); 128 struct Scsi_Host *shost = pci_get_drvdata(pdev);
129 129
@@ -150,7 +150,7 @@ static struct pci_driver dmx3191d_pci_driver = {
150 .name = DMX3191D_DRIVER_NAME, 150 .name = DMX3191D_DRIVER_NAME,
151 .id_table = dmx3191d_pci_tbl, 151 .id_table = dmx3191d_pci_tbl,
152 .probe = dmx3191d_probe_one, 152 .probe = dmx3191d_probe_one,
153 .remove = __devexit_p(dmx3191d_remove_one), 153 .remove = dmx3191d_remove_one,
154}; 154};
155 155
156static int __init dmx3191d_init(void) 156static int __init dmx3191d_init(void)
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c
index 1a2a1e5824e3..fff682976c56 100644
--- a/drivers/scsi/fdomain.c
+++ b/drivers/scsi/fdomain.c
@@ -1771,7 +1771,7 @@ struct scsi_host_template fdomain_driver_template = {
1771#ifndef PCMCIA 1771#ifndef PCMCIA
1772#ifdef CONFIG_PCI 1772#ifdef CONFIG_PCI
1773 1773
1774static struct pci_device_id fdomain_pci_tbl[] __devinitdata = { 1774static struct pci_device_id fdomain_pci_tbl[] = {
1775 { PCI_VENDOR_ID_FD, PCI_DEVICE_ID_FD_36C70, 1775 { PCI_VENDOR_ID_FD, PCI_DEVICE_ID_FD_36C70,
1776 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, 1776 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
1777 { } 1777 { }
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index fc98eb61e760..fbf3ac6e0c55 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -399,8 +399,7 @@ static u8 *fnic_get_mac(struct fc_lport *lport)
399 return fnic->data_src_addr; 399 return fnic->data_src_addr;
400} 400}
401 401
402static int __devinit fnic_probe(struct pci_dev *pdev, 402static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
403 const struct pci_device_id *ent)
404{ 403{
405 struct Scsi_Host *host; 404 struct Scsi_Host *host;
406 struct fc_lport *lp; 405 struct fc_lport *lp;
@@ -774,7 +773,7 @@ err_out:
774 return err; 773 return err;
775} 774}
776 775
777static void __devexit fnic_remove(struct pci_dev *pdev) 776static void fnic_remove(struct pci_dev *pdev)
778{ 777{
779 struct fnic *fnic = pci_get_drvdata(pdev); 778 struct fnic *fnic = pci_get_drvdata(pdev);
780 struct fc_lport *lp = fnic->lport; 779 struct fc_lport *lp = fnic->lport;
@@ -849,7 +848,7 @@ static struct pci_driver fnic_driver = {
849 .name = DRV_NAME, 848 .name = DRV_NAME,
850 .id_table = fnic_id_table, 849 .id_table = fnic_id_table,
851 .probe = fnic_probe, 850 .probe = fnic_probe,
852 .remove = __devexit_p(fnic_remove), 851 .remove = fnic_remove,
853}; 852};
854 853
855static int __init fnic_init_module(void) 854static int __init fnic_init_module(void)
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 1a5954f0915a..5041f925c191 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -939,7 +939,7 @@ module_param(dtc_3181e, int, 0);
939MODULE_LICENSE("GPL"); 939MODULE_LICENSE("GPL");
940 940
941#ifndef SCSI_G_NCR5380_MEM 941#ifndef SCSI_G_NCR5380_MEM
942static struct isapnp_device_id id_table[] __devinitdata = { 942static struct isapnp_device_id id_table[] = {
943 { 943 {
944 ISAPNP_ANY_ID, ISAPNP_ANY_ID, 944 ISAPNP_ANY_ID, ISAPNP_ANY_ID,
945 ISAPNP_VENDOR('D', 'T', 'C'), ISAPNP_FUNCTION(0x436e), 945 ISAPNP_VENDOR('D', 'T', 'C'), ISAPNP_FUNCTION(0x436e),
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 5d72274c507f..599790e41a98 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -590,7 +590,7 @@ static struct pci_driver gdth_pci_driver = {
590 .remove = gdth_pci_remove_one, 590 .remove = gdth_pci_remove_one,
591}; 591};
592 592
593static void __devexit gdth_pci_remove_one(struct pci_dev *pdev) 593static void gdth_pci_remove_one(struct pci_dev *pdev)
594{ 594{
595 gdth_ha_str *ha = pci_get_drvdata(pdev); 595 gdth_ha_str *ha = pci_get_drvdata(pdev);
596 596
@@ -602,8 +602,8 @@ static void __devexit gdth_pci_remove_one(struct pci_dev *pdev)
602 pci_disable_device(pdev); 602 pci_disable_device(pdev);
603} 603}
604 604
605static int __devinit gdth_pci_init_one(struct pci_dev *pdev, 605static int gdth_pci_init_one(struct pci_dev *pdev,
606 const struct pci_device_id *ent) 606 const struct pci_device_id *ent)
607{ 607{
608 u16 vendor = pdev->vendor; 608 u16 vendor = pdev->vendor;
609 u16 device = pdev->device; 609 u16 device = pdev->device;
@@ -855,8 +855,8 @@ static int __init gdth_init_isa(u32 bios_adr,gdth_ha_str *ha)
855#endif /* CONFIG_ISA */ 855#endif /* CONFIG_ISA */
856 856
857#ifdef CONFIG_PCI 857#ifdef CONFIG_PCI
858static int __devinit gdth_init_pci(struct pci_dev *pdev, gdth_pci_str *pcistr, 858static int gdth_init_pci(struct pci_dev *pdev, gdth_pci_str *pcistr,
859 gdth_ha_str *ha) 859 gdth_ha_str *ha)
860{ 860{
861 register gdt6_dpram_str __iomem *dp6_ptr; 861 register gdt6_dpram_str __iomem *dp6_ptr;
862 register gdt6c_dpram_str __iomem *dp6c_ptr; 862 register gdt6c_dpram_str __iomem *dp6c_ptr;
@@ -1239,7 +1239,7 @@ static int __devinit gdth_init_pci(struct pci_dev *pdev, gdth_pci_str *pcistr,
1239 1239
1240/* controller protocol functions */ 1240/* controller protocol functions */
1241 1241
1242static void __devinit gdth_enable_int(gdth_ha_str *ha) 1242static void gdth_enable_int(gdth_ha_str *ha)
1243{ 1243{
1244 unsigned long flags; 1244 unsigned long flags;
1245 gdt2_dpram_str __iomem *dp2_ptr; 1245 gdt2_dpram_str __iomem *dp2_ptr;
@@ -1555,7 +1555,7 @@ static int gdth_internal_cmd(gdth_ha_str *ha, u8 service, u16 opcode,
1555 1555
1556/* search for devices */ 1556/* search for devices */
1557 1557
1558static int __devinit gdth_search_drives(gdth_ha_str *ha) 1558static int gdth_search_drives(gdth_ha_str *ha)
1559{ 1559{
1560 u16 cdev_cnt, i; 1560 u16 cdev_cnt, i;
1561 int ok; 1561 int ok;
@@ -4959,8 +4959,7 @@ static int __init gdth_eisa_probe_one(u16 eisa_slot)
4959#endif /* CONFIG_EISA */ 4959#endif /* CONFIG_EISA */
4960 4960
4961#ifdef CONFIG_PCI 4961#ifdef CONFIG_PCI
4962static int __devinit gdth_pci_probe_one(gdth_pci_str *pcistr, 4962static int gdth_pci_probe_one(gdth_pci_str *pcistr, gdth_ha_str **ha_out)
4963 gdth_ha_str **ha_out)
4964{ 4963{
4965 struct Scsi_Host *shp; 4964 struct Scsi_Host *shp;
4966 gdth_ha_str *ha; 4965 gdth_ha_str *ha;
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c
index 488fbc648656..dbe4cc6b9f8b 100644
--- a/drivers/scsi/gvp11.c
+++ b/drivers/scsi/gvp11.c
@@ -204,7 +204,7 @@ static struct scsi_host_template gvp11_scsi_template = {
204 .use_clustering = DISABLE_CLUSTERING 204 .use_clustering = DISABLE_CLUSTERING
205}; 205};
206 206
207static int __devinit check_wd33c93(struct gvp11_scsiregs *regs) 207static int check_wd33c93(struct gvp11_scsiregs *regs)
208{ 208{
209#ifdef CHECK_WD33C93 209#ifdef CHECK_WD33C93
210 volatile unsigned char *sasr_3393, *scmd_3393; 210 volatile unsigned char *sasr_3393, *scmd_3393;
@@ -284,8 +284,7 @@ static int __devinit check_wd33c93(struct gvp11_scsiregs *regs)
284 return 0; 284 return 0;
285} 285}
286 286
287static int __devinit gvp11_probe(struct zorro_dev *z, 287static int gvp11_probe(struct zorro_dev *z, const struct zorro_device_id *ent)
288 const struct zorro_device_id *ent)
289{ 288{
290 struct Scsi_Host *instance; 289 struct Scsi_Host *instance;
291 unsigned long address; 290 unsigned long address;
@@ -380,7 +379,7 @@ fail_check_or_alloc:
380 return error; 379 return error;
381} 380}
382 381
383static void __devexit gvp11_remove(struct zorro_dev *z) 382static void gvp11_remove(struct zorro_dev *z)
384{ 383{
385 struct Scsi_Host *instance = zorro_get_drvdata(z); 384 struct Scsi_Host *instance = zorro_get_drvdata(z);
386 struct gvp11_hostdata *hdata = shost_priv(instance); 385 struct gvp11_hostdata *hdata = shost_priv(instance);
@@ -398,7 +397,7 @@ static void __devexit gvp11_remove(struct zorro_dev *z)
398 * SERIES I though). 397 * SERIES I though).
399 */ 398 */
400 399
401static struct zorro_device_id gvp11_zorro_tbl[] __devinitdata = { 400static struct zorro_device_id gvp11_zorro_tbl[] = {
402 { ZORRO_PROD_GVP_COMBO_030_R3_SCSI, ~0x00ffffff }, 401 { ZORRO_PROD_GVP_COMBO_030_R3_SCSI, ~0x00ffffff },
403 { ZORRO_PROD_GVP_SERIES_II, ~0x00ffffff }, 402 { ZORRO_PROD_GVP_SERIES_II, ~0x00ffffff },
404 { ZORRO_PROD_GVP_GFORCE_030_SCSI, ~0x01ffffff }, 403 { ZORRO_PROD_GVP_GFORCE_030_SCSI, ~0x01ffffff },
@@ -414,7 +413,7 @@ static struct zorro_driver gvp11_driver = {
414 .name = "gvp11", 413 .name = "gvp11",
415 .id_table = gvp11_zorro_tbl, 414 .id_table = gvp11_zorro_tbl,
416 .probe = gvp11_probe, 415 .probe = gvp11_probe,
417 .remove = __devexit_p(gvp11_remove), 416 .remove = gvp11_remove,
418}; 417};
419 418
420static int __init gvp11_init(void) 419static int __init gvp11_init(void)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 4217e49aea46..4f338061b5c3 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -189,16 +189,16 @@ static void check_ioctl_unit_attention(struct ctlr_info *h,
189/* performant mode helper functions */ 189/* performant mode helper functions */
190static void calc_bucket_map(int *bucket, int num_buckets, 190static void calc_bucket_map(int *bucket, int num_buckets,
191 int nsgs, int *bucket_map); 191 int nsgs, int *bucket_map);
192static __devinit void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h); 192static void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h);
193static inline u32 next_command(struct ctlr_info *h, u8 q); 193static inline u32 next_command(struct ctlr_info *h, u8 q);
194static int __devinit hpsa_find_cfg_addrs(struct pci_dev *pdev, 194static int hpsa_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr,
195 void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index, 195 u32 *cfg_base_addr, u64 *cfg_base_addr_index,
196 u64 *cfg_offset); 196 u64 *cfg_offset);
197static int __devinit hpsa_pci_find_memory_BAR(struct pci_dev *pdev, 197static int hpsa_pci_find_memory_BAR(struct pci_dev *pdev,
198 unsigned long *memory_bar); 198 unsigned long *memory_bar);
199static int __devinit hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id); 199static int hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id);
200static int __devinit hpsa_wait_for_board_state(struct pci_dev *pdev, 200static int hpsa_wait_for_board_state(struct pci_dev *pdev, void __iomem *vaddr,
201 void __iomem *vaddr, int wait_for_ready); 201 int wait_for_ready);
202static inline void finish_cmd(struct CommandList *c); 202static inline void finish_cmd(struct CommandList *c);
203#define BOARD_NOT_READY 0 203#define BOARD_NOT_READY 0
204#define BOARD_READY 1 204#define BOARD_READY 1
@@ -3182,8 +3182,8 @@ static int hpsa_ioctl(struct scsi_device *dev, int cmd, void *arg)
3182 } 3182 }
3183} 3183}
3184 3184
3185static int __devinit hpsa_send_host_reset(struct ctlr_info *h, 3185static int hpsa_send_host_reset(struct ctlr_info *h, unsigned char *scsi3addr,
3186 unsigned char *scsi3addr, u8 reset_type) 3186 u8 reset_type)
3187{ 3187{
3188 struct CommandList *c; 3188 struct CommandList *c;
3189 3189
@@ -3606,8 +3606,8 @@ static irqreturn_t do_hpsa_intr_msi(int irq, void *queue)
3606 * in simple mode, not performant mode due to the tag lookup. 3606 * in simple mode, not performant mode due to the tag lookup.
3607 * We only ever use this immediately after a controller reset. 3607 * We only ever use this immediately after a controller reset.
3608 */ 3608 */
3609static __devinit int hpsa_message(struct pci_dev *pdev, unsigned char opcode, 3609static int hpsa_message(struct pci_dev *pdev, unsigned char opcode,
3610 unsigned char type) 3610 unsigned char type)
3611{ 3611{
3612 struct Command { 3612 struct Command {
3613 struct CommandListHeader CommandHeader; 3613 struct CommandListHeader CommandHeader;
@@ -3756,14 +3756,13 @@ static int hpsa_controller_hard_reset(struct pci_dev *pdev,
3756 return 0; 3756 return 0;
3757} 3757}
3758 3758
3759static __devinit void init_driver_version(char *driver_version, int len) 3759static void init_driver_version(char *driver_version, int len)
3760{ 3760{
3761 memset(driver_version, 0, len); 3761 memset(driver_version, 0, len);
3762 strncpy(driver_version, HPSA " " HPSA_DRIVER_VERSION, len - 1); 3762 strncpy(driver_version, HPSA " " HPSA_DRIVER_VERSION, len - 1);
3763} 3763}
3764 3764
3765static __devinit int write_driver_ver_to_cfgtable( 3765static int write_driver_ver_to_cfgtable(struct CfgTable __iomem *cfgtable)
3766 struct CfgTable __iomem *cfgtable)
3767{ 3766{
3768 char *driver_version; 3767 char *driver_version;
3769 int i, size = sizeof(cfgtable->driver_version); 3768 int i, size = sizeof(cfgtable->driver_version);
@@ -3779,8 +3778,8 @@ static __devinit int write_driver_ver_to_cfgtable(
3779 return 0; 3778 return 0;
3780} 3779}
3781 3780
3782static __devinit void read_driver_ver_from_cfgtable( 3781static void read_driver_ver_from_cfgtable(struct CfgTable __iomem *cfgtable,
3783 struct CfgTable __iomem *cfgtable, unsigned char *driver_ver) 3782 unsigned char *driver_ver)
3784{ 3783{
3785 int i; 3784 int i;
3786 3785
@@ -3788,8 +3787,7 @@ static __devinit void read_driver_ver_from_cfgtable(
3788 driver_ver[i] = readb(&cfgtable->driver_version[i]); 3787 driver_ver[i] = readb(&cfgtable->driver_version[i]);
3789} 3788}
3790 3789
3791static __devinit int controller_reset_failed( 3790static int controller_reset_failed(struct CfgTable __iomem *cfgtable)
3792 struct CfgTable __iomem *cfgtable)
3793{ 3791{
3794 3792
3795 char *driver_ver, *old_driver_ver; 3793 char *driver_ver, *old_driver_ver;
@@ -3812,7 +3810,7 @@ static __devinit int controller_reset_failed(
3812/* This does a hard reset of the controller using PCI power management 3810/* This does a hard reset of the controller using PCI power management
3813 * states or the using the doorbell register. 3811 * states or the using the doorbell register.
3814 */ 3812 */
3815static __devinit int hpsa_kdump_hard_reset_controller(struct pci_dev *pdev) 3813static int hpsa_kdump_hard_reset_controller(struct pci_dev *pdev)
3816{ 3814{
3817 u64 cfg_offset; 3815 u64 cfg_offset;
3818 u32 cfg_base_addr; 3816 u32 cfg_base_addr;
@@ -4029,7 +4027,7 @@ static int find_PCI_BAR_index(struct pci_dev *pdev, unsigned long pci_bar_addr)
4029 * controllers that are capable. If not, we use IO-APIC mode. 4027 * controllers that are capable. If not, we use IO-APIC mode.
4030 */ 4028 */
4031 4029
4032static void __devinit hpsa_interrupt_mode(struct ctlr_info *h) 4030static void hpsa_interrupt_mode(struct ctlr_info *h)
4033{ 4031{
4034#ifdef CONFIG_PCI_MSI 4032#ifdef CONFIG_PCI_MSI
4035 int err, i; 4033 int err, i;
@@ -4077,7 +4075,7 @@ default_int_mode:
4077 h->intr[h->intr_mode] = h->pdev->irq; 4075 h->intr[h->intr_mode] = h->pdev->irq;
4078} 4076}
4079 4077
4080static int __devinit hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id) 4078static int hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
4081{ 4079{
4082 int i; 4080 int i;
4083 u32 subsystem_vendor_id, subsystem_device_id; 4081 u32 subsystem_vendor_id, subsystem_device_id;
@@ -4101,8 +4099,8 @@ static int __devinit hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
4101 return ARRAY_SIZE(products) - 1; /* generic unknown smart array */ 4099 return ARRAY_SIZE(products) - 1; /* generic unknown smart array */
4102} 4100}
4103 4101
4104static int __devinit hpsa_pci_find_memory_BAR(struct pci_dev *pdev, 4102static int hpsa_pci_find_memory_BAR(struct pci_dev *pdev,
4105 unsigned long *memory_bar) 4103 unsigned long *memory_bar)
4106{ 4104{
4107 int i; 4105 int i;
4108 4106
@@ -4118,8 +4116,8 @@ static int __devinit hpsa_pci_find_memory_BAR(struct pci_dev *pdev,
4118 return -ENODEV; 4116 return -ENODEV;
4119} 4117}
4120 4118
4121static int __devinit hpsa_wait_for_board_state(struct pci_dev *pdev, 4119static int hpsa_wait_for_board_state(struct pci_dev *pdev, void __iomem *vaddr,
4122 void __iomem *vaddr, int wait_for_ready) 4120 int wait_for_ready)
4123{ 4121{
4124 int i, iterations; 4122 int i, iterations;
4125 u32 scratchpad; 4123 u32 scratchpad;
@@ -4143,9 +4141,9 @@ static int __devinit hpsa_wait_for_board_state(struct pci_dev *pdev,
4143 return -ENODEV; 4141 return -ENODEV;
4144} 4142}
4145 4143
4146static int __devinit hpsa_find_cfg_addrs(struct pci_dev *pdev, 4144static int hpsa_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr,
4147 void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index, 4145 u32 *cfg_base_addr, u64 *cfg_base_addr_index,
4148 u64 *cfg_offset) 4146 u64 *cfg_offset)
4149{ 4147{
4150 *cfg_base_addr = readl(vaddr + SA5_CTCFG_OFFSET); 4148 *cfg_base_addr = readl(vaddr + SA5_CTCFG_OFFSET);
4151 *cfg_offset = readl(vaddr + SA5_CTMEM_OFFSET); 4149 *cfg_offset = readl(vaddr + SA5_CTMEM_OFFSET);
@@ -4158,7 +4156,7 @@ static int __devinit hpsa_find_cfg_addrs(struct pci_dev *pdev,
4158 return 0; 4156 return 0;
4159} 4157}
4160 4158
4161static int __devinit hpsa_find_cfgtables(struct ctlr_info *h) 4159static int hpsa_find_cfgtables(struct ctlr_info *h)
4162{ 4160{
4163 u64 cfg_offset; 4161 u64 cfg_offset;
4164 u32 cfg_base_addr; 4162 u32 cfg_base_addr;
@@ -4187,7 +4185,7 @@ static int __devinit hpsa_find_cfgtables(struct ctlr_info *h)
4187 return 0; 4185 return 0;
4188} 4186}
4189 4187
4190static void __devinit hpsa_get_max_perf_mode_cmds(struct ctlr_info *h) 4188static void hpsa_get_max_perf_mode_cmds(struct ctlr_info *h)
4191{ 4189{
4192 h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands)); 4190 h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands));
4193 4191
@@ -4208,7 +4206,7 @@ static void __devinit hpsa_get_max_perf_mode_cmds(struct ctlr_info *h)
4208 * max commands, max SG elements without chaining, and with chaining, 4206 * max commands, max SG elements without chaining, and with chaining,
4209 * SG chain block size, etc. 4207 * SG chain block size, etc.
4210 */ 4208 */
4211static void __devinit hpsa_find_board_params(struct ctlr_info *h) 4209static void hpsa_find_board_params(struct ctlr_info *h)
4212{ 4210{
4213 hpsa_get_max_perf_mode_cmds(h); 4211 hpsa_get_max_perf_mode_cmds(h);
4214 h->nr_cmds = h->max_commands - 4; /* Allow room for some ioctls */ 4212 h->nr_cmds = h->max_commands - 4; /* Allow room for some ioctls */
@@ -4266,7 +4264,7 @@ static inline void hpsa_p600_dma_prefetch_quirk(struct ctlr_info *h)
4266 writel(dma_prefetch, h->vaddr + I2O_DMA1_CFG); 4264 writel(dma_prefetch, h->vaddr + I2O_DMA1_CFG);
4267} 4265}
4268 4266
4269static void __devinit hpsa_wait_for_mode_change_ack(struct ctlr_info *h) 4267static void hpsa_wait_for_mode_change_ack(struct ctlr_info *h)
4270{ 4268{
4271 int i; 4269 int i;
4272 u32 doorbell_value; 4270 u32 doorbell_value;
@@ -4287,7 +4285,7 @@ static void __devinit hpsa_wait_for_mode_change_ack(struct ctlr_info *h)
4287 } 4285 }
4288} 4286}
4289 4287
4290static int __devinit hpsa_enter_simple_mode(struct ctlr_info *h) 4288static int hpsa_enter_simple_mode(struct ctlr_info *h)
4291{ 4289{
4292 u32 trans_support; 4290 u32 trans_support;
4293 4291
@@ -4310,7 +4308,7 @@ static int __devinit hpsa_enter_simple_mode(struct ctlr_info *h)
4310 return 0; 4308 return 0;
4311} 4309}
4312 4310
4313static int __devinit hpsa_pci_init(struct ctlr_info *h) 4311static int hpsa_pci_init(struct ctlr_info *h)
4314{ 4312{
4315 int prod_index, err; 4313 int prod_index, err;
4316 4314
@@ -4378,7 +4376,7 @@ err_out_free_res:
4378 return err; 4376 return err;
4379} 4377}
4380 4378
4381static void __devinit hpsa_hba_inquiry(struct ctlr_info *h) 4379static void hpsa_hba_inquiry(struct ctlr_info *h)
4382{ 4380{
4383 int rc; 4381 int rc;
4384 4382
@@ -4394,7 +4392,7 @@ static void __devinit hpsa_hba_inquiry(struct ctlr_info *h)
4394 } 4392 }
4395} 4393}
4396 4394
4397static __devinit int hpsa_init_reset_devices(struct pci_dev *pdev) 4395static int hpsa_init_reset_devices(struct pci_dev *pdev)
4398{ 4396{
4399 int rc, i; 4397 int rc, i;
4400 4398
@@ -4426,7 +4424,7 @@ static __devinit int hpsa_init_reset_devices(struct pci_dev *pdev)
4426 return 0; 4424 return 0;
4427} 4425}
4428 4426
4429static __devinit int hpsa_allocate_cmd_pool(struct ctlr_info *h) 4427static int hpsa_allocate_cmd_pool(struct ctlr_info *h)
4430{ 4428{
4431 h->cmd_pool_bits = kzalloc( 4429 h->cmd_pool_bits = kzalloc(
4432 DIV_ROUND_UP(h->nr_cmds, BITS_PER_LONG) * 4430 DIV_ROUND_UP(h->nr_cmds, BITS_PER_LONG) *
@@ -4499,7 +4497,7 @@ static int hpsa_request_irq(struct ctlr_info *h,
4499 return 0; 4497 return 0;
4500} 4498}
4501 4499
4502static int __devinit hpsa_kdump_soft_reset(struct ctlr_info *h) 4500static int hpsa_kdump_soft_reset(struct ctlr_info *h)
4503{ 4501{
4504 if (hpsa_send_host_reset(h, RAID_CTLR_LUNID, 4502 if (hpsa_send_host_reset(h, RAID_CTLR_LUNID,
4505 HPSA_RESET_TYPE_CONTROLLER)) { 4503 HPSA_RESET_TYPE_CONTROLLER)) {
@@ -4713,8 +4711,7 @@ static void stop_controller_lockup_detector(struct ctlr_info *h)
4713 spin_unlock_irqrestore(&lockup_detector_lock, flags); 4711 spin_unlock_irqrestore(&lockup_detector_lock, flags);
4714} 4712}
4715 4713
4716static int __devinit hpsa_init_one(struct pci_dev *pdev, 4714static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
4717 const struct pci_device_id *ent)
4718{ 4715{
4719 int dac, rc; 4716 int dac, rc;
4720 struct ctlr_info *h; 4717 struct ctlr_info *h;
@@ -4910,7 +4907,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
4910 hpsa_free_irqs_and_disable_msix(h); 4907 hpsa_free_irqs_and_disable_msix(h);
4911} 4908}
4912 4909
4913static void __devexit hpsa_free_device_info(struct ctlr_info *h) 4910static void hpsa_free_device_info(struct ctlr_info *h)
4914{ 4911{
4915 int i; 4912 int i;
4916 4913
@@ -4918,7 +4915,7 @@ static void __devexit hpsa_free_device_info(struct ctlr_info *h)
4918 kfree(h->dev[i]); 4915 kfree(h->dev[i]);
4919} 4916}
4920 4917
4921static void __devexit hpsa_remove_one(struct pci_dev *pdev) 4918static void hpsa_remove_one(struct pci_dev *pdev)
4922{ 4919{
4923 struct ctlr_info *h; 4920 struct ctlr_info *h;
4924 4921
@@ -4966,7 +4963,7 @@ static int hpsa_resume(__attribute__((unused)) struct pci_dev *pdev)
4966static struct pci_driver hpsa_pci_driver = { 4963static struct pci_driver hpsa_pci_driver = {
4967 .name = HPSA, 4964 .name = HPSA,
4968 .probe = hpsa_init_one, 4965 .probe = hpsa_init_one,
4969 .remove = __devexit_p(hpsa_remove_one), 4966 .remove = hpsa_remove_one,
4970 .id_table = hpsa_pci_device_id, /* id_table */ 4967 .id_table = hpsa_pci_device_id, /* id_table */
4971 .shutdown = hpsa_shutdown, 4968 .shutdown = hpsa_shutdown,
4972 .suspend = hpsa_suspend, 4969 .suspend = hpsa_suspend,
@@ -5010,8 +5007,7 @@ static void calc_bucket_map(int bucket[], int num_buckets,
5010 } 5007 }
5011} 5008}
5012 5009
5013static __devinit void hpsa_enter_performant_mode(struct ctlr_info *h, 5010static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 use_short_tags)
5014 u32 use_short_tags)
5015{ 5011{
5016 int i; 5012 int i;
5017 unsigned long register_value; 5013 unsigned long register_value;
@@ -5079,7 +5075,7 @@ static __devinit void hpsa_enter_performant_mode(struct ctlr_info *h,
5079 h->transMethod = CFGTBL_Trans_Performant; 5075 h->transMethod = CFGTBL_Trans_Performant;
5080} 5076}
5081 5077
5082static __devinit void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h) 5078static void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
5083{ 5079{
5084 u32 trans_support; 5080 u32 trans_support;
5085 int i; 5081 int i;
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index 138e573f37ef..ee196b363d81 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -1282,8 +1282,7 @@ static int hptiop_internal_memfree_mvfrey(struct hptiop_hba *hba)
1282 return -1; 1282 return -1;
1283} 1283}
1284 1284
1285static int __devinit hptiop_probe(struct pci_dev *pcidev, 1285static int hptiop_probe(struct pci_dev *pcidev, const struct pci_device_id *id)
1286 const struct pci_device_id *id)
1287{ 1286{
1288 struct Scsi_Host *host = NULL; 1287 struct Scsi_Host *host = NULL;
1289 struct hptiop_hba *hba; 1288 struct hptiop_hba *hba;
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 5e8d51bd03de..cc82d0f322b6 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4905,7 +4905,7 @@ static unsigned long ibmvfc_get_desired_dma(struct vio_dev *vdev)
4905 return pool_dma + ((512 * 1024) * driver_template.cmd_per_lun); 4905 return pool_dma + ((512 * 1024) * driver_template.cmd_per_lun);
4906} 4906}
4907 4907
4908static struct vio_device_id ibmvfc_device_table[] __devinitdata = { 4908static struct vio_device_id ibmvfc_device_table[] = {
4909 {"fcp", "IBM,vfc-client"}, 4909 {"fcp", "IBM,vfc-client"},
4910 { "", "" } 4910 { "", "" }
4911}; 4911};
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index ef9a54c7da67..a044f593e8b9 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -2362,7 +2362,7 @@ static int ibmvscsi_resume(struct device *dev)
2362 * ibmvscsi_device_table: Used by vio.c to match devices in the device tree we 2362 * ibmvscsi_device_table: Used by vio.c to match devices in the device tree we
2363 * support. 2363 * support.
2364 */ 2364 */
2365static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { 2365static struct vio_device_id ibmvscsi_device_table[] = {
2366 {"vscsi", "IBM,v-scsi"}, 2366 {"vscsi", "IBM,v-scsi"},
2367 { "", "" } 2367 { "", "" }
2368}; 2368};
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
index aa7ed81e9237..bf9eca845166 100644
--- a/drivers/scsi/ibmvscsi/ibmvstgt.c
+++ b/drivers/scsi/ibmvscsi/ibmvstgt.c
@@ -907,7 +907,7 @@ static int ibmvstgt_remove(struct vio_dev *dev)
907 return 0; 907 return 0;
908} 908}
909 909
910static struct vio_device_id ibmvstgt_device_table[] __devinitdata = { 910static struct vio_device_id ibmvstgt_device_table[] = {
911 {"v-scsi-host", "IBM,v-scsi-host"}, 911 {"v-scsi-host", "IBM,v-scsi-host"},
912 {"",""} 912 {"",""}
913}; 913};
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index dd741bcd6ccd..280d5af113d1 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -2992,7 +2992,7 @@ static struct pci_driver initio_pci_driver = {
2992 .name = "initio", 2992 .name = "initio",
2993 .id_table = initio_pci_tbl, 2993 .id_table = initio_pci_tbl,
2994 .probe = initio_probe_one, 2994 .probe = initio_probe_one,
2995 .remove = __devexit_p(initio_remove_one), 2995 .remove = initio_remove_one,
2996}; 2996};
2997 2997
2998static int __init initio_init_driver(void) 2998static int __init initio_init_driver(void)
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index fe6029f4df16..1d7da3f41ebb 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -8296,7 +8296,7 @@ static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev,
8296 * Return value: 8296 * Return value:
8297 * 0 on success / -EIO on failure 8297 * 0 on success / -EIO on failure
8298 **/ 8298 **/
8299static int __devinit ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg) 8299static int ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg)
8300{ 8300{
8301 int rc = 0; 8301 int rc = 0;
8302 unsigned long host_lock_flags = 0; 8302 unsigned long host_lock_flags = 0;
@@ -8425,7 +8425,7 @@ static void ipr_free_all_resources(struct ipr_ioa_cfg *ioa_cfg)
8425 * Return value: 8425 * Return value:
8426 * 0 on success / -ENOMEM on allocation failure 8426 * 0 on success / -ENOMEM on allocation failure
8427 **/ 8427 **/
8428static int __devinit ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg) 8428static int ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg)
8429{ 8429{
8430 struct ipr_cmnd *ipr_cmd; 8430 struct ipr_cmnd *ipr_cmd;
8431 struct ipr_ioarcb *ioarcb; 8431 struct ipr_ioarcb *ioarcb;
@@ -8497,7 +8497,7 @@ static int __devinit ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg)
8497 * Return value: 8497 * Return value:
8498 * 0 on success / non-zero for error 8498 * 0 on success / non-zero for error
8499 **/ 8499 **/
8500static int __devinit ipr_alloc_mem(struct ipr_ioa_cfg *ioa_cfg) 8500static int ipr_alloc_mem(struct ipr_ioa_cfg *ioa_cfg)
8501{ 8501{
8502 struct pci_dev *pdev = ioa_cfg->pdev; 8502 struct pci_dev *pdev = ioa_cfg->pdev;
8503 int i, rc = -ENOMEM; 8503 int i, rc = -ENOMEM;
@@ -8601,7 +8601,7 @@ out_free_res_entries:
8601 * Return value: 8601 * Return value:
8602 * none 8602 * none
8603 **/ 8603 **/
8604static void __devinit ipr_initialize_bus_attr(struct ipr_ioa_cfg *ioa_cfg) 8604static void ipr_initialize_bus_attr(struct ipr_ioa_cfg *ioa_cfg)
8605{ 8605{
8606 int i; 8606 int i;
8607 8607
@@ -8625,8 +8625,8 @@ static void __devinit ipr_initialize_bus_attr(struct ipr_ioa_cfg *ioa_cfg)
8625 * Return value: 8625 * Return value:
8626 * none 8626 * none
8627 **/ 8627 **/
8628static void __devinit ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg, 8628static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
8629 struct Scsi_Host *host, struct pci_dev *pdev) 8629 struct Scsi_Host *host, struct pci_dev *pdev)
8630{ 8630{
8631 const struct ipr_interrupt_offsets *p; 8631 const struct ipr_interrupt_offsets *p;
8632 struct ipr_interrupts *t; 8632 struct ipr_interrupts *t;
@@ -8712,7 +8712,7 @@ static void __devinit ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
8712 * Return value: 8712 * Return value:
8713 * ptr to chip information on success / NULL on failure 8713 * ptr to chip information on success / NULL on failure
8714 **/ 8714 **/
8715static const struct ipr_chip_t * __devinit 8715static const struct ipr_chip_t *
8716ipr_get_chip_info(const struct pci_device_id *dev_id) 8716ipr_get_chip_info(const struct pci_device_id *dev_id)
8717{ 8717{
8718 int i; 8718 int i;
@@ -8734,7 +8734,7 @@ ipr_get_chip_info(const struct pci_device_id *dev_id)
8734 * Return value: 8734 * Return value:
8735 * 0 on success / non-zero on failure 8735 * 0 on success / non-zero on failure
8736 **/ 8736 **/
8737static irqreturn_t __devinit ipr_test_intr(int irq, void *devp) 8737static irqreturn_t ipr_test_intr(int irq, void *devp)
8738{ 8738{
8739 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)devp; 8739 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)devp;
8740 unsigned long lock_flags = 0; 8740 unsigned long lock_flags = 0;
@@ -8761,8 +8761,7 @@ static irqreturn_t __devinit ipr_test_intr(int irq, void *devp)
8761 * Return value: 8761 * Return value:
8762 * 0 on success / non-zero on failure 8762 * 0 on success / non-zero on failure
8763 **/ 8763 **/
8764static int __devinit ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, 8764static int ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, struct pci_dev *pdev)
8765 struct pci_dev *pdev)
8766{ 8765{
8767 int rc; 8766 int rc;
8768 volatile u32 int_reg; 8767 volatile u32 int_reg;
@@ -8815,8 +8814,8 @@ static int __devinit ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg,
8815 * Return value: 8814 * Return value:
8816 * 0 on success / non-zero on failure 8815 * 0 on success / non-zero on failure
8817 **/ 8816 **/
8818static int __devinit ipr_probe_ioa(struct pci_dev *pdev, 8817static int ipr_probe_ioa(struct pci_dev *pdev,
8819 const struct pci_device_id *dev_id) 8818 const struct pci_device_id *dev_id)
8820{ 8819{
8821 struct ipr_ioa_cfg *ioa_cfg; 8820 struct ipr_ioa_cfg *ioa_cfg;
8822 struct Scsi_Host *host; 8821 struct Scsi_Host *host;
@@ -9113,7 +9112,7 @@ static void __ipr_remove(struct pci_dev *pdev)
9113 * Return value: 9112 * Return value:
9114 * none 9113 * none
9115 **/ 9114 **/
9116static void __devexit ipr_remove(struct pci_dev *pdev) 9115static void ipr_remove(struct pci_dev *pdev)
9117{ 9116{
9118 struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(pdev); 9117 struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(pdev);
9119 9118
@@ -9136,8 +9135,7 @@ static void __devexit ipr_remove(struct pci_dev *pdev)
9136 * Return value: 9135 * Return value:
9137 * 0 on success / non-zero on failure 9136 * 0 on success / non-zero on failure
9138 **/ 9137 **/
9139static int __devinit ipr_probe(struct pci_dev *pdev, 9138static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
9140 const struct pci_device_id *dev_id)
9141{ 9139{
9142 struct ipr_ioa_cfg *ioa_cfg; 9140 struct ipr_ioa_cfg *ioa_cfg;
9143 int rc; 9141 int rc;
@@ -9218,7 +9216,7 @@ static void ipr_shutdown(struct pci_dev *pdev)
9218 wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); 9216 wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload);
9219} 9217}
9220 9218
9221static struct pci_device_id ipr_pci_table[] __devinitdata = { 9219static struct pci_device_id ipr_pci_table[] = {
9222 { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE, 9220 { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE,
9223 PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_5702, 0, 0, 0 }, 9221 PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_5702, 0, 0, 0 },
9224 { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE, 9222 { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE,
@@ -9305,7 +9303,7 @@ static struct pci_driver ipr_driver = {
9305 .name = IPR_NAME, 9303 .name = IPR_NAME,
9306 .id_table = ipr_pci_table, 9304 .id_table = ipr_pci_table,
9307 .probe = ipr_probe, 9305 .probe = ipr_probe,
9308 .remove = __devexit_p(ipr_remove), 9306 .remove = ipr_remove,
9309 .shutdown = ipr_shutdown, 9307 .shutdown = ipr_shutdown,
9310 .err_handler = &ipr_err_handler, 9308 .err_handler = &ipr_err_handler,
9311}; 9309};
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index b6d7a5c2fc94..9aa86a315a08 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -389,14 +389,14 @@ MODULE_DEVICE_TABLE( pci, ips_pci_table );
389 389
390static char ips_hot_plug_name[] = "ips"; 390static char ips_hot_plug_name[] = "ips";
391 391
392static int __devinit ips_insert_device(struct pci_dev *pci_dev, const struct pci_device_id *ent); 392static int ips_insert_device(struct pci_dev *pci_dev, const struct pci_device_id *ent);
393static void __devexit ips_remove_device(struct pci_dev *pci_dev); 393static void ips_remove_device(struct pci_dev *pci_dev);
394 394
395static struct pci_driver ips_pci_driver = { 395static struct pci_driver ips_pci_driver = {
396 .name = ips_hot_plug_name, 396 .name = ips_hot_plug_name,
397 .id_table = ips_pci_table, 397 .id_table = ips_pci_table,
398 .probe = ips_insert_device, 398 .probe = ips_insert_device,
399 .remove = __devexit_p(ips_remove_device), 399 .remove = ips_remove_device,
400}; 400};
401 401
402 402
@@ -6837,7 +6837,7 @@ err_out_sh:
6837/* Routine Description: */ 6837/* Routine Description: */
6838/* Remove one Adapter ( Hot Plugging ) */ 6838/* Remove one Adapter ( Hot Plugging ) */
6839/*---------------------------------------------------------------------------*/ 6839/*---------------------------------------------------------------------------*/
6840static void __devexit 6840static void
6841ips_remove_device(struct pci_dev *pci_dev) 6841ips_remove_device(struct pci_dev *pci_dev)
6842{ 6842{
6843 struct Scsi_Host *sh = pci_get_drvdata(pci_dev); 6843 struct Scsi_Host *sh = pci_get_drvdata(pci_dev);
@@ -6898,7 +6898,7 @@ module_exit(ips_module_exit);
6898/* Return Value: */ 6898/* Return Value: */
6899/* 0 if Successful, else non-zero */ 6899/* 0 if Successful, else non-zero */
6900/*---------------------------------------------------------------------------*/ 6900/*---------------------------------------------------------------------------*/
6901static int __devinit 6901static int
6902ips_insert_device(struct pci_dev *pci_dev, const struct pci_device_id *ent) 6902ips_insert_device(struct pci_dev *pci_dev, const struct pci_device_id *ent)
6903{ 6903{
6904 int index = -1; 6904 int index = -1;
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index b74050b95d6a..d73fdcfeb45a 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -282,7 +282,7 @@ static void isci_unregister(struct isci_host *isci_host)
282 scsi_host_put(shost); 282 scsi_host_put(shost);
283} 283}
284 284
285static int __devinit isci_pci_init(struct pci_dev *pdev) 285static int isci_pci_init(struct pci_dev *pdev)
286{ 286{
287 int err, bar_num, bar_mask = 0; 287 int err, bar_num, bar_mask = 0;
288 void __iomem * const *iomap; 288 void __iomem * const *iomap;
@@ -616,7 +616,7 @@ static struct isci_host *isci_host_alloc(struct pci_dev *pdev, int id)
616 return NULL; 616 return NULL;
617} 617}
618 618
619static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) 619static int isci_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
620{ 620{
621 struct isci_pci_info *pci_info; 621 struct isci_pci_info *pci_info;
622 int err, i; 622 int err, i;
@@ -709,7 +709,7 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic
709 return err; 709 return err;
710} 710}
711 711
712static void __devexit isci_pci_remove(struct pci_dev *pdev) 712static void isci_pci_remove(struct pci_dev *pdev)
713{ 713{
714 struct isci_host *ihost; 714 struct isci_host *ihost;
715 int i; 715 int i;
@@ -778,7 +778,7 @@ static struct pci_driver isci_pci_driver = {
778 .name = DRV_NAME, 778 .name = DRV_NAME,
779 .id_table = isci_id_table, 779 .id_table = isci_id_table,
780 .probe = isci_pci_probe, 780 .probe = isci_pci_probe,
781 .remove = __devexit_p(isci_pci_remove), 781 .remove = isci_pci_remove,
782#ifdef CONFIG_PM 782#ifdef CONFIG_PM
783 .driver.pm = &isci_pm_ops, 783 .driver.pm = &isci_pm_ops,
784#endif 784#endif
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c
index 27cfb0cb186c..69efbf12b299 100644
--- a/drivers/scsi/jazz_esp.c
+++ b/drivers/scsi/jazz_esp.c
@@ -129,7 +129,7 @@ static const struct esp_driver_ops jazz_esp_ops = {
129 .dma_error = jazz_esp_dma_error, 129 .dma_error = jazz_esp_dma_error,
130}; 130};
131 131
132static int __devinit esp_jazz_probe(struct platform_device *dev) 132static int esp_jazz_probe(struct platform_device *dev)
133{ 133{
134 struct scsi_host_template *tpnt = &scsi_esp_template; 134 struct scsi_host_template *tpnt = &scsi_esp_template;
135 struct Scsi_Host *host; 135 struct Scsi_Host *host;
@@ -201,7 +201,7 @@ fail:
201 return err; 201 return err;
202} 202}
203 203
204static int __devexit esp_jazz_remove(struct platform_device *dev) 204static int esp_jazz_remove(struct platform_device *dev)
205{ 205{
206 struct esp *esp = dev_get_drvdata(&dev->dev); 206 struct esp *esp = dev_get_drvdata(&dev->dev);
207 unsigned int irq = esp->host->irq; 207 unsigned int irq = esp->host->irq;
@@ -223,7 +223,7 @@ MODULE_ALIAS("platform:jazz_esp");
223 223
224static struct platform_driver esp_jazz_driver = { 224static struct platform_driver esp_jazz_driver = {
225 .probe = esp_jazz_probe, 225 .probe = esp_jazz_probe,
226 .remove = __devexit_p(esp_jazz_remove), 226 .remove = esp_jazz_remove,
227 .driver = { 227 .driver = {
228 .name = "jazz_esp", 228 .name = "jazz_esp",
229 .owner = THIS_MODULE, 229 .owner = THIS_MODULE,
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c
index 23880f8fe7e4..5c4ded997265 100644
--- a/drivers/scsi/lasi700.c
+++ b/drivers/scsi/lasi700.c
@@ -168,7 +168,7 @@ static struct parisc_driver lasi700_driver = {
168 .name = "lasi_scsi", 168 .name = "lasi_scsi",
169 .id_table = lasi700_ids, 169 .id_table = lasi700_ids,
170 .probe = lasi700_probe, 170 .probe = lasi700_probe,
171 .remove = __devexit_p(lasi700_driver_remove), 171 .remove = lasi700_driver_remove,
172}; 172};
173 173
174static int __init 174static int __init
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index c20eec78adc1..89ad55807012 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -8813,7 +8813,7 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
8813 * 0 - driver can claim the device 8813 * 0 - driver can claim the device
8814 * negative value - driver can not claim the device 8814 * negative value - driver can not claim the device
8815 **/ 8815 **/
8816static int __devinit 8816static int
8817lpfc_pci_probe_one_s3(struct pci_dev *pdev, const struct pci_device_id *pid) 8817lpfc_pci_probe_one_s3(struct pci_dev *pdev, const struct pci_device_id *pid)
8818{ 8818{
8819 struct lpfc_hba *phba; 8819 struct lpfc_hba *phba;
@@ -8980,7 +8980,7 @@ out_free_phba:
8980 * removed from PCI bus, it performs all the necessary cleanup for the HBA 8980 * removed from PCI bus, it performs all the necessary cleanup for the HBA
8981 * device to be removed from the PCI subsystem properly. 8981 * device to be removed from the PCI subsystem properly.
8982 **/ 8982 **/
8983static void __devexit 8983static void
8984lpfc_pci_remove_one_s3(struct pci_dev *pdev) 8984lpfc_pci_remove_one_s3(struct pci_dev *pdev)
8985{ 8985{
8986 struct Scsi_Host *shost = pci_get_drvdata(pdev); 8986 struct Scsi_Host *shost = pci_get_drvdata(pdev);
@@ -9587,7 +9587,7 @@ lpfc_sli4_request_firmware_update(struct lpfc_hba *phba, uint8_t fw_upgrade)
9587 * 0 - driver can claim the device 9587 * 0 - driver can claim the device
9588 * negative value - driver can not claim the device 9588 * negative value - driver can not claim the device
9589 **/ 9589 **/
9590static int __devinit 9590static int
9591lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid) 9591lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid)
9592{ 9592{
9593 struct lpfc_hba *phba; 9593 struct lpfc_hba *phba;
@@ -9779,7 +9779,7 @@ out_free_phba:
9779 * removed from PCI bus, it performs all the necessary cleanup for the HBA 9779 * removed from PCI bus, it performs all the necessary cleanup for the HBA
9780 * device to be removed from the PCI subsystem properly. 9780 * device to be removed from the PCI subsystem properly.
9781 **/ 9781 **/
9782static void __devexit 9782static void
9783lpfc_pci_remove_one_s4(struct pci_dev *pdev) 9783lpfc_pci_remove_one_s4(struct pci_dev *pdev)
9784{ 9784{
9785 struct Scsi_Host *shost = pci_get_drvdata(pdev); 9785 struct Scsi_Host *shost = pci_get_drvdata(pdev);
@@ -10205,7 +10205,7 @@ lpfc_io_resume_s4(struct pci_dev *pdev)
10205 * 0 - driver can claim the device 10205 * 0 - driver can claim the device
10206 * negative value - driver can not claim the device 10206 * negative value - driver can not claim the device
10207 **/ 10207 **/
10208static int __devinit 10208static int
10209lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) 10209lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
10210{ 10210{
10211 int rc; 10211 int rc;
@@ -10233,7 +10233,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
10233 * remove routine, which will perform all the necessary cleanup for the 10233 * remove routine, which will perform all the necessary cleanup for the
10234 * device to be removed from the PCI subsystem properly. 10234 * device to be removed from the PCI subsystem properly.
10235 **/ 10235 **/
10236static void __devexit 10236static void
10237lpfc_pci_remove_one(struct pci_dev *pdev) 10237lpfc_pci_remove_one(struct pci_dev *pdev)
10238{ 10238{
10239 struct Scsi_Host *shost = pci_get_drvdata(pdev); 10239 struct Scsi_Host *shost = pci_get_drvdata(pdev);
@@ -10575,7 +10575,7 @@ static struct pci_driver lpfc_driver = {
10575 .name = LPFC_DRIVER_NAME, 10575 .name = LPFC_DRIVER_NAME,
10576 .id_table = lpfc_id_table, 10576 .id_table = lpfc_id_table,
10577 .probe = lpfc_pci_probe_one, 10577 .probe = lpfc_pci_probe_one,
10578 .remove = __devexit_p(lpfc_pci_remove_one), 10578 .remove = lpfc_pci_remove_one,
10579 .suspend = lpfc_pci_suspend_one, 10579 .suspend = lpfc_pci_suspend_one,
10580 .resume = lpfc_pci_resume_one, 10580 .resume = lpfc_pci_resume_one,
10581 .err_handler = &lpfc_err_handler, 10581 .err_handler = &lpfc_err_handler,
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
index 70eb1f79b1ba..994fc5caf036 100644
--- a/drivers/scsi/mac_esp.c
+++ b/drivers/scsi/mac_esp.c
@@ -481,7 +481,7 @@ static struct esp_driver_ops mac_esp_ops = {
481 .dma_error = mac_esp_dma_error, 481 .dma_error = mac_esp_dma_error,
482}; 482};
483 483
484static int __devinit esp_mac_probe(struct platform_device *dev) 484static int esp_mac_probe(struct platform_device *dev)
485{ 485{
486 struct scsi_host_template *tpnt = &scsi_esp_template; 486 struct scsi_host_template *tpnt = &scsi_esp_template;
487 struct Scsi_Host *host; 487 struct Scsi_Host *host;
@@ -591,7 +591,7 @@ fail:
591 return err; 591 return err;
592} 592}
593 593
594static int __devexit esp_mac_remove(struct platform_device *dev) 594static int esp_mac_remove(struct platform_device *dev)
595{ 595{
596 struct mac_esp_priv *mep = platform_get_drvdata(dev); 596 struct mac_esp_priv *mep = platform_get_drvdata(dev);
597 struct esp *esp = mep->esp; 597 struct esp *esp = mep->esp;
@@ -614,7 +614,7 @@ static int __devexit esp_mac_remove(struct platform_device *dev)
614 614
615static struct platform_driver esp_mac_driver = { 615static struct platform_driver esp_mac_driver = {
616 .probe = esp_mac_probe, 616 .probe = esp_mac_probe,
617 .remove = __devexit_p(esp_mac_remove), 617 .remove = esp_mac_remove,
618 .driver = { 618 .driver = {
619 .name = DRV_MODULE_NAME, 619 .name = DRV_MODULE_NAME,
620 .owner = THIS_MODULE, 620 .owner = THIS_MODULE,
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 76ad72d32c3f..9504ec0ec682 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4522,7 +4522,7 @@ static struct scsi_host_template megaraid_template = {
4522 .eh_host_reset_handler = megaraid_reset, 4522 .eh_host_reset_handler = megaraid_reset,
4523}; 4523};
4524 4524
4525static int __devinit 4525static int
4526megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) 4526megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4527{ 4527{
4528 struct Scsi_Host *host; 4528 struct Scsi_Host *host;
@@ -4914,7 +4914,7 @@ __megaraid_shutdown(adapter_t *adapter)
4914 mdelay(1000); 4914 mdelay(1000);
4915} 4915}
4916 4916
4917static void __devexit 4917static void
4918megaraid_remove_one(struct pci_dev *pdev) 4918megaraid_remove_one(struct pci_dev *pdev)
4919{ 4919{
4920 struct Scsi_Host *host = pci_get_drvdata(pdev); 4920 struct Scsi_Host *host = pci_get_drvdata(pdev);
@@ -5008,7 +5008,7 @@ static struct pci_driver megaraid_pci_driver = {
5008 .name = "megaraid_legacy", 5008 .name = "megaraid_legacy",
5009 .id_table = megaraid_pci_tbl, 5009 .id_table = megaraid_pci_tbl,
5010 .probe = megaraid_probe_one, 5010 .probe = megaraid_probe_one,
5011 .remove = __devexit_p(megaraid_remove_one), 5011 .remove = megaraid_remove_one,
5012 .shutdown = megaraid_shutdown, 5012 .shutdown = megaraid_shutdown,
5013}; 5013};
5014 5014
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 54b1c5bb310f..e6a1e0b38a19 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -305,7 +305,7 @@ static struct pci_driver megaraid_pci_driver = {
305 .name = "megaraid", 305 .name = "megaraid",
306 .id_table = pci_id_table_g, 306 .id_table = pci_id_table_g,
307 .probe = megaraid_probe_one, 307 .probe = megaraid_probe_one,
308 .remove = __devexit_p(megaraid_detach_one), 308 .remove = megaraid_detach_one,
309 .shutdown = megaraid_mbox_shutdown, 309 .shutdown = megaraid_mbox_shutdown,
310}; 310};
311 311
@@ -434,7 +434,7 @@ megaraid_exit(void)
434 * This routine should be called whenever a new adapter is detected by the 434 * This routine should be called whenever a new adapter is detected by the
435 * PCI hotplug susbsystem. 435 * PCI hotplug susbsystem.
436 */ 436 */
437static int __devinit 437static int
438megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) 438megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
439{ 439{
440 adapter_t *adapter; 440 adapter_t *adapter;
@@ -735,7 +735,7 @@ megaraid_io_detach(adapter_t *adapter)
735 * - Allocate memory required for all the commands 735 * - Allocate memory required for all the commands
736 * - Use internal library of FW routines, build up complete soft state 736 * - Use internal library of FW routines, build up complete soft state
737 */ 737 */
738static int __devinit 738static int
739megaraid_init_mbox(adapter_t *adapter) 739megaraid_init_mbox(adapter_t *adapter)
740{ 740{
741 struct pci_dev *pdev; 741 struct pci_dev *pdev;
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index e4f2baacf1e1..66a0fec0437b 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -3972,8 +3972,8 @@ fail_set_dma_mask:
3972 * @pdev: PCI device structure 3972 * @pdev: PCI device structure
3973 * @id: PCI ids of supported hotplugged adapter 3973 * @id: PCI ids of supported hotplugged adapter
3974 */ 3974 */
3975static int __devinit 3975static int megasas_probe_one(struct pci_dev *pdev,
3976megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) 3976 const struct pci_device_id *id)
3977{ 3977{
3978 int rval, pos, i, j; 3978 int rval, pos, i, j;
3979 struct Scsi_Host *host; 3979 struct Scsi_Host *host;
@@ -4525,7 +4525,7 @@ fail_ready_state:
4525 * megasas_detach_one - PCI hot"un"plug entry point 4525 * megasas_detach_one - PCI hot"un"plug entry point
4526 * @pdev: PCI device structure 4526 * @pdev: PCI device structure
4527 */ 4527 */
4528static void __devexit megasas_detach_one(struct pci_dev *pdev) 4528static void megasas_detach_one(struct pci_dev *pdev)
4529{ 4529{
4530 int i; 4530 int i;
4531 struct Scsi_Host *host; 4531 struct Scsi_Host *host;
@@ -5119,7 +5119,7 @@ static struct pci_driver megasas_pci_driver = {
5119 .name = "megaraid_sas", 5119 .name = "megaraid_sas",
5120 .id_table = megasas_pci_table, 5120 .id_table = megasas_pci_table,
5121 .probe = megasas_probe_one, 5121 .probe = megasas_probe_one,
5122 .remove = __devexit_p(megasas_detach_one), 5122 .remove = megasas_detach_one,
5123 .suspend = megasas_suspend, 5123 .suspend = megasas_suspend,
5124 .resume = megasas_resume, 5124 .resume = megasas_resume,
5125 .shutdown = megasas_shutdown, 5125 .shutdown = megasas_shutdown,
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index af4e6c451b1b..c6bdc9267229 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -7686,7 +7686,7 @@ _scsih_shutdown(struct pci_dev *pdev)
7686 * Routine called when unloading the driver. 7686 * Routine called when unloading the driver.
7687 * Return nothing. 7687 * Return nothing.
7688 */ 7688 */
7689static void __devexit 7689static void
7690_scsih_remove(struct pci_dev *pdev) 7690_scsih_remove(struct pci_dev *pdev)
7691{ 7691{
7692 struct Scsi_Host *shost = pci_get_drvdata(pdev); 7692 struct Scsi_Host *shost = pci_get_drvdata(pdev);
@@ -8338,7 +8338,7 @@ static struct pci_driver scsih_driver = {
8338 .name = MPT2SAS_DRIVER_NAME, 8338 .name = MPT2SAS_DRIVER_NAME,
8339 .id_table = scsih_pci_table, 8339 .id_table = scsih_pci_table,
8340 .probe = _scsih_probe, 8340 .probe = _scsih_probe,
8341 .remove = __devexit_p(_scsih_remove), 8341 .remove = _scsih_remove,
8342 .shutdown = _scsih_shutdown, 8342 .shutdown = _scsih_shutdown,
8343 .err_handler = &_scsih_err_handler, 8343 .err_handler = &_scsih_err_handler,
8344#ifdef CONFIG_PM 8344#ifdef CONFIG_PM
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 05f80450ac7e..6421a06c4ce2 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -7374,8 +7374,7 @@ _scsih_ir_shutdown(struct MPT3SAS_ADAPTER *ioc)
7374 * Routine called when unloading the driver. 7374 * Routine called when unloading the driver.
7375 * Return nothing. 7375 * Return nothing.
7376 */ 7376 */
7377static void __devexit 7377static void _scsih_remove(struct pci_dev *pdev)
7378_scsih_remove(struct pci_dev *pdev)
7379{ 7378{
7380 struct Scsi_Host *shost = pci_get_drvdata(pdev); 7379 struct Scsi_Host *shost = pci_get_drvdata(pdev);
7381 struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); 7380 struct MPT3SAS_ADAPTER *ioc = shost_priv(shost);
@@ -8044,7 +8043,7 @@ static struct pci_driver scsih_driver = {
8044 .name = MPT3SAS_DRIVER_NAME, 8043 .name = MPT3SAS_DRIVER_NAME,
8045 .id_table = scsih_pci_table, 8044 .id_table = scsih_pci_table,
8046 .probe = _scsih_probe, 8045 .probe = _scsih_probe,
8047 .remove = __devexit_p(_scsih_remove), 8046 .remove = _scsih_remove,
8048 .shutdown = _scsih_shutdown, 8047 .shutdown = _scsih_shutdown,
8049 .err_handler = &_scsih_err_handler, 8048 .err_handler = &_scsih_err_handler,
8050#ifdef CONFIG_PM 8049#ifdef CONFIG_PM
diff --git a/drivers/scsi/mvme16x_scsi.c b/drivers/scsi/mvme16x_scsi.c
index 39f554f5f261..8fbb97a8bfd3 100644
--- a/drivers/scsi/mvme16x_scsi.c
+++ b/drivers/scsi/mvme16x_scsi.c
@@ -34,8 +34,7 @@ static struct scsi_host_template mvme16x_scsi_driver_template = {
34 34
35static struct platform_device *mvme16x_scsi_device; 35static struct platform_device *mvme16x_scsi_device;
36 36
37static __devinit int 37static int mvme16x_probe(struct platform_device *dev)
38mvme16x_probe(struct platform_device *dev)
39{ 38{
40 struct Scsi_Host * host = NULL; 39 struct Scsi_Host * host = NULL;
41 struct NCR_700_Host_Parameters *hostdata; 40 struct NCR_700_Host_Parameters *hostdata;
@@ -103,8 +102,7 @@ mvme16x_probe(struct platform_device *dev)
103 return -ENODEV; 102 return -ENODEV;
104} 103}
105 104
106static __devexit int 105static int mvme16x_device_remove(struct platform_device *dev)
107mvme16x_device_remove(struct platform_device *dev)
108{ 106{
109 struct Scsi_Host *host = platform_get_drvdata(dev); 107 struct Scsi_Host *host = platform_get_drvdata(dev);
110 struct NCR_700_Host_Parameters *hostdata = shost_priv(host); 108 struct NCR_700_Host_Parameters *hostdata = shost_priv(host);
@@ -131,7 +129,7 @@ static struct platform_driver mvme16x_scsi_driver = {
131 .owner = THIS_MODULE, 129 .owner = THIS_MODULE,
132 }, 130 },
133 .probe = mvme16x_probe, 131 .probe = mvme16x_probe,
134 .remove = __devexit_p(mvme16x_device_remove), 132 .remove = mvme16x_device_remove,
135}; 133};
136 134
137static int __init mvme16x_scsi_init(void) 135static int __init mvme16x_scsi_init(void)
diff --git a/drivers/scsi/mvsas/mv_64xx.c b/drivers/scsi/mvsas/mv_64xx.c
index 8ba47229049f..8bb06995adfb 100644
--- a/drivers/scsi/mvsas/mv_64xx.c
+++ b/drivers/scsi/mvsas/mv_64xx.c
@@ -41,7 +41,7 @@ static void mvs_64xx_detect_porttype(struct mvs_info *mvi, int i)
41 phy->phy_type |= PORT_TYPE_SATA; 41 phy->phy_type |= PORT_TYPE_SATA;
42} 42}
43 43
44static void __devinit mvs_64xx_enable_xmt(struct mvs_info *mvi, int phy_id) 44static void mvs_64xx_enable_xmt(struct mvs_info *mvi, int phy_id)
45{ 45{
46 void __iomem *regs = mvi->regs; 46 void __iomem *regs = mvi->regs;
47 u32 tmp; 47 u32 tmp;
@@ -54,7 +54,7 @@ static void __devinit mvs_64xx_enable_xmt(struct mvs_info *mvi, int phy_id)
54 mw32(MVS_PCS, tmp); 54 mw32(MVS_PCS, tmp);
55} 55}
56 56
57static void __devinit mvs_64xx_phy_hacks(struct mvs_info *mvi) 57static void mvs_64xx_phy_hacks(struct mvs_info *mvi)
58{ 58{
59 void __iomem *regs = mvi->regs; 59 void __iomem *regs = mvi->regs;
60 int i; 60 int i;
@@ -156,7 +156,7 @@ void mvs_64xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set, u8 clear_all)
156 } 156 }
157} 157}
158 158
159static int __devinit mvs_64xx_chip_reset(struct mvs_info *mvi) 159static int mvs_64xx_chip_reset(struct mvs_info *mvi)
160{ 160{
161 void __iomem *regs = mvi->regs; 161 void __iomem *regs = mvi->regs;
162 u32 tmp; 162 u32 tmp;
@@ -250,7 +250,7 @@ static void mvs_64xx_phy_enable(struct mvs_info *mvi, u32 phy_id)
250 } 250 }
251} 251}
252 252
253static int __devinit mvs_64xx_init(struct mvs_info *mvi) 253static int mvs_64xx_init(struct mvs_info *mvi)
254{ 254{
255 void __iomem *regs = mvi->regs; 255 void __iomem *regs = mvi->regs;
256 int i; 256 int i;
diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c
index 7e423e5ad5e1..1e4479f3331a 100644
--- a/drivers/scsi/mvsas/mv_94xx.c
+++ b/drivers/scsi/mvsas/mv_94xx.c
@@ -216,8 +216,7 @@ void set_phy_rate(struct mvs_info *mvi, int phy_id, u8 rate)
216 mvs_write_port_vsr_data(mvi, phy_id, phy_cfg.v); 216 mvs_write_port_vsr_data(mvi, phy_id, phy_cfg.v);
217} 217}
218 218
219static void __devinit 219static void mvs_94xx_config_reg_from_hba(struct mvs_info *mvi, int phy_id)
220mvs_94xx_config_reg_from_hba(struct mvs_info *mvi, int phy_id)
221{ 220{
222 u32 temp; 221 u32 temp;
223 temp = (u32)(*(u32 *)&mvi->hba_info_param.phy_tuning[phy_id]); 222 temp = (u32)(*(u32 *)&mvi->hba_info_param.phy_tuning[phy_id]);
@@ -258,7 +257,7 @@ mvs_94xx_config_reg_from_hba(struct mvs_info *mvi, int phy_id)
258 mvi->hba_info_param.phy_rate[phy_id]); 257 mvi->hba_info_param.phy_rate[phy_id]);
259} 258}
260 259
261static void __devinit mvs_94xx_enable_xmt(struct mvs_info *mvi, int phy_id) 260static void mvs_94xx_enable_xmt(struct mvs_info *mvi, int phy_id)
262{ 261{
263 void __iomem *regs = mvi->regs; 262 void __iomem *regs = mvi->regs;
264 u32 tmp; 263 u32 tmp;
@@ -331,7 +330,7 @@ static void mvs_94xx_phy_enable(struct mvs_info *mvi, u32 phy_id)
331 mvs_write_port_vsr_data(mvi, phy_id, tmp & 0xfd7fffff); 330 mvs_write_port_vsr_data(mvi, phy_id, tmp & 0xfd7fffff);
332} 331}
333 332
334static int __devinit mvs_94xx_init(struct mvs_info *mvi) 333static int mvs_94xx_init(struct mvs_info *mvi)
335{ 334{
336 void __iomem *regs = mvi->regs; 335 void __iomem *regs = mvi->regs;
337 int i; 336 int i;
diff --git a/drivers/scsi/mvsas/mv_chips.h b/drivers/scsi/mvsas/mv_chips.h
index bcc408042cee..8c4479ab49e8 100644
--- a/drivers/scsi/mvsas/mv_chips.h
+++ b/drivers/scsi/mvsas/mv_chips.h
@@ -160,7 +160,7 @@ static inline void mvs_write_port_irq_mask(struct mvs_info *mvi,
160 MVS_P4_INT_MASK, port, val); 160 MVS_P4_INT_MASK, port, val);
161} 161}
162 162
163static inline void __devinit mvs_phy_hacks(struct mvs_info *mvi) 163static inline void mvs_phy_hacks(struct mvs_info *mvi)
164{ 164{
165 u32 tmp; 165 u32 tmp;
166 166
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index cc59dff3810b..ce90d0546cdd 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -96,7 +96,7 @@ static struct sas_domain_function_template mvs_transport_ops = {
96 96
97}; 97};
98 98
99static void __devinit mvs_phy_init(struct mvs_info *mvi, int phy_id) 99static void mvs_phy_init(struct mvs_info *mvi, int phy_id)
100{ 100{
101 struct mvs_phy *phy = &mvi->phy[phy_id]; 101 struct mvs_phy *phy = &mvi->phy[phy_id];
102 struct asd_sas_phy *sas_phy = &phy->sas_phy; 102 struct asd_sas_phy *sas_phy = &phy->sas_phy;
@@ -235,7 +235,7 @@ static irqreturn_t mvs_interrupt(int irq, void *opaque)
235 return IRQ_HANDLED; 235 return IRQ_HANDLED;
236} 236}
237 237
238static int __devinit mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) 238static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost)
239{ 239{
240 int i = 0, slot_nr; 240 int i = 0, slot_nr;
241 char pool_name[32]; 241 char pool_name[32];
@@ -373,7 +373,7 @@ void mvs_iounmap(void __iomem *regs)
373 iounmap(regs); 373 iounmap(regs);
374} 374}
375 375
376static struct mvs_info *__devinit mvs_pci_alloc(struct pci_dev *pdev, 376static struct mvs_info *mvs_pci_alloc(struct pci_dev *pdev,
377 const struct pci_device_id *ent, 377 const struct pci_device_id *ent,
378 struct Scsi_Host *shost, unsigned int id) 378 struct Scsi_Host *shost, unsigned int id)
379{ 379{
@@ -444,7 +444,7 @@ static int pci_go_64(struct pci_dev *pdev)
444 return rc; 444 return rc;
445} 445}
446 446
447static int __devinit mvs_prep_sas_ha_init(struct Scsi_Host *shost, 447static int mvs_prep_sas_ha_init(struct Scsi_Host *shost,
448 const struct mvs_chip_info *chip_info) 448 const struct mvs_chip_info *chip_info)
449{ 449{
450 int phy_nr, port_nr; unsigned short core_nr; 450 int phy_nr, port_nr; unsigned short core_nr;
@@ -486,7 +486,7 @@ exit_free:
486 486
487} 487}
488 488
489static void __devinit mvs_post_sas_ha_init(struct Scsi_Host *shost, 489static void mvs_post_sas_ha_init(struct Scsi_Host *shost,
490 const struct mvs_chip_info *chip_info) 490 const struct mvs_chip_info *chip_info)
491{ 491{
492 int can_queue, i = 0, j = 0; 492 int can_queue, i = 0, j = 0;
@@ -537,8 +537,7 @@ static void mvs_init_sas_add(struct mvs_info *mvi)
537 memcpy(mvi->sas_addr, &mvi->phy[0].dev_sas_addr, SAS_ADDR_SIZE); 537 memcpy(mvi->sas_addr, &mvi->phy[0].dev_sas_addr, SAS_ADDR_SIZE);
538} 538}
539 539
540static int __devinit mvs_pci_init(struct pci_dev *pdev, 540static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
541 const struct pci_device_id *ent)
542{ 541{
543 unsigned int rc, nhost = 0; 542 unsigned int rc, nhost = 0;
544 struct mvs_info *mvi; 543 struct mvs_info *mvi;
@@ -645,7 +644,7 @@ err_out_enable:
645 return rc; 644 return rc;
646} 645}
647 646
648static void __devexit mvs_pci_remove(struct pci_dev *pdev) 647static void mvs_pci_remove(struct pci_dev *pdev)
649{ 648{
650 unsigned short core_nr, i = 0; 649 unsigned short core_nr, i = 0;
651 struct sas_ha_struct *sha = pci_get_drvdata(pdev); 650 struct sas_ha_struct *sha = pci_get_drvdata(pdev);
@@ -677,7 +676,7 @@ static void __devexit mvs_pci_remove(struct pci_dev *pdev)
677 return; 676 return;
678} 677}
679 678
680static struct pci_device_id __devinitdata mvs_pci_table[] = { 679static struct pci_device_id mvs_pci_table[] = {
681 { PCI_VDEVICE(MARVELL, 0x6320), chip_6320 }, 680 { PCI_VDEVICE(MARVELL, 0x6320), chip_6320 },
682 { PCI_VDEVICE(MARVELL, 0x6340), chip_6440 }, 681 { PCI_VDEVICE(MARVELL, 0x6340), chip_6440 },
683 { 682 {
@@ -748,7 +747,7 @@ static struct pci_driver mvs_pci_driver = {
748 .name = DRV_NAME, 747 .name = DRV_NAME,
749 .id_table = mvs_pci_table, 748 .id_table = mvs_pci_table,
750 .probe = mvs_pci_init, 749 .probe = mvs_pci_init,
751 .remove = __devexit_p(mvs_pci_remove), 750 .remove = mvs_pci_remove,
752}; 751};
753 752
754static ssize_t 753static ssize_t
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index a3776d6ced60..078c63913b55 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -220,8 +220,8 @@ int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
220 return rc; 220 return rc;
221} 221}
222 222
223void __devinit mvs_set_sas_addr(struct mvs_info *mvi, int port_id, 223void mvs_set_sas_addr(struct mvs_info *mvi, int port_id, u32 off_lo,
224 u32 off_lo, u32 off_hi, u64 sas_addr) 224 u32 off_hi, u64 sas_addr)
225{ 225{
226 u32 lo = (u32)sas_addr; 226 u32 lo = (u32)sas_addr;
227 u32 hi = (u32)(sas_addr>>32); 227 u32 hi = (u32)(sas_addr>>32);
diff --git a/drivers/scsi/mvsas/mv_sas.h b/drivers/scsi/mvsas/mv_sas.h
index da249553858c..2ae77a0394b2 100644
--- a/drivers/scsi/mvsas/mv_sas.h
+++ b/drivers/scsi/mvsas/mv_sas.h
@@ -456,8 +456,8 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex);
456void mvs_phys_reset(struct mvs_info *mvi, u32 phy_mask, int hard); 456void mvs_phys_reset(struct mvs_info *mvi, u32 phy_mask, int hard);
457int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func, 457int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
458 void *funcdata); 458 void *funcdata);
459void __devinit mvs_set_sas_addr(struct mvs_info *mvi, int port_id, 459void mvs_set_sas_addr(struct mvs_info *mvi, int port_id, u32 off_lo,
460 u32 off_lo, u32 off_hi, u64 sas_addr); 460 u32 off_hi, u64 sas_addr);
461void mvs_scan_start(struct Scsi_Host *shost); 461void mvs_scan_start(struct Scsi_Host *shost);
462int mvs_scan_finished(struct Scsi_Host *shost, unsigned long time); 462int mvs_scan_finished(struct Scsi_Host *shost, unsigned long time);
463int mvs_queue_command(struct sas_task *task, const int num, 463int mvs_queue_command(struct sas_task *task, const int num,
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index c585a925b3cd..4594ccaaf49b 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -2506,8 +2506,7 @@ fail_add_device:
2506 * @pdev: PCI device structure 2506 * @pdev: PCI device structure
2507 * @id: PCI ids of supported hotplugged adapter 2507 * @id: PCI ids of supported hotplugged adapter
2508 */ 2508 */
2509static int __devinit mvumi_probe_one(struct pci_dev *pdev, 2509static int mvumi_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
2510 const struct pci_device_id *id)
2511{ 2510{
2512 struct Scsi_Host *host; 2511 struct Scsi_Host *host;
2513 struct mvumi_hba *mhba; 2512 struct mvumi_hba *mhba;
@@ -2728,7 +2727,7 @@ static struct pci_driver mvumi_pci_driver = {
2728 .name = MV_DRIVER_NAME, 2727 .name = MV_DRIVER_NAME,
2729 .id_table = mvumi_pci_table, 2728 .id_table = mvumi_pci_table,
2730 .probe = mvumi_probe_one, 2729 .probe = mvumi_probe_one,
2731 .remove = __devexit_p(mvumi_detach_one), 2730 .remove = mvumi_detach_one,
2732 .shutdown = mvumi_shutdown, 2731 .shutdown = mvumi_shutdown,
2733#ifdef CONFIG_PM 2732#ifdef CONFIG_PM
2734 .suspend = mvumi_suspend, 2733 .suspend = mvumi_suspend,
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 62b616891a33..1cc0c1c69c88 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -76,7 +76,7 @@ static const char *nsp32_release_version = "1.2";
76/**************************************************************************** 76/****************************************************************************
77 * Supported hardware 77 * Supported hardware
78 */ 78 */
79static struct pci_device_id nsp32_pci_table[] __devinitdata = { 79static struct pci_device_id nsp32_pci_table[] = {
80 { 80 {
81 .vendor = PCI_VENDOR_ID_IODATA, 81 .vendor = PCI_VENDOR_ID_IODATA,
82 .device = PCI_DEVICE_ID_NINJASCSI_32BI_CBSC_II, 82 .device = PCI_DEVICE_ID_NINJASCSI_32BI_CBSC_II,
@@ -186,10 +186,10 @@ static nsp32_sync_table nsp32_sync_table_pci[] = {
186 * function declaration 186 * function declaration
187 */ 187 */
188/* module entry point */ 188/* module entry point */
189static int __devinit nsp32_probe (struct pci_dev *, const struct pci_device_id *); 189static int nsp32_probe (struct pci_dev *, const struct pci_device_id *);
190static void __devexit nsp32_remove(struct pci_dev *); 190static void nsp32_remove(struct pci_dev *);
191static int __init init_nsp32 (void); 191static int __init init_nsp32 (void);
192static void __exit exit_nsp32 (void); 192static void __exit exit_nsp32 (void);
193 193
194/* struct struct scsi_host_template */ 194/* struct struct scsi_host_template */
195static int nsp32_proc_info (struct Scsi_Host *, char *, char **, off_t, int, int); 195static int nsp32_proc_info (struct Scsi_Host *, char *, char **, off_t, int, int);
@@ -3382,7 +3382,7 @@ static int nsp32_resume(struct pci_dev *pdev)
3382/************************************************************************ 3382/************************************************************************
3383 * PCI/Cardbus probe/remove routine 3383 * PCI/Cardbus probe/remove routine
3384 */ 3384 */
3385static int __devinit nsp32_probe(struct pci_dev *pdev, const struct pci_device_id *id) 3385static int nsp32_probe(struct pci_dev *pdev, const struct pci_device_id *id)
3386{ 3386{
3387 int ret; 3387 int ret;
3388 nsp32_hw_data *data = &nsp32_data_base; 3388 nsp32_hw_data *data = &nsp32_data_base;
@@ -3418,7 +3418,7 @@ static int __devinit nsp32_probe(struct pci_dev *pdev, const struct pci_device_i
3418 return ret; 3418 return ret;
3419} 3419}
3420 3420
3421static void __devexit nsp32_remove(struct pci_dev *pdev) 3421static void nsp32_remove(struct pci_dev *pdev)
3422{ 3422{
3423 struct Scsi_Host *host = pci_get_drvdata(pdev); 3423 struct Scsi_Host *host = pci_get_drvdata(pdev);
3424 3424
@@ -3435,7 +3435,7 @@ static struct pci_driver nsp32_driver = {
3435 .name = "nsp32", 3435 .name = "nsp32",
3436 .id_table = nsp32_pci_table, 3436 .id_table = nsp32_pci_table,
3437 .probe = nsp32_probe, 3437 .probe = nsp32_probe,
3438 .remove = __devexit_p(nsp32_remove), 3438 .remove = nsp32_remove,
3439#ifdef CONFIG_PM 3439#ifdef CONFIG_PM
3440 .suspend = nsp32_suspend, 3440 .suspend = nsp32_suspend,
3441 .resume = nsp32_resume, 3441 .resume = nsp32_resume,
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index bf54aafc2d71..b8dd05074abb 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -47,7 +47,7 @@
47 * read_main_config_table - read the configure table and save it. 47 * read_main_config_table - read the configure table and save it.
48 * @pm8001_ha: our hba card information 48 * @pm8001_ha: our hba card information
49 */ 49 */
50static void __devinit read_main_config_table(struct pm8001_hba_info *pm8001_ha) 50static void read_main_config_table(struct pm8001_hba_info *pm8001_ha)
51{ 51{
52 void __iomem *address = pm8001_ha->main_cfg_tbl_addr; 52 void __iomem *address = pm8001_ha->main_cfg_tbl_addr;
53 pm8001_ha->main_cfg_tbl.signature = pm8001_mr32(address, 0x00); 53 pm8001_ha->main_cfg_tbl.signature = pm8001_mr32(address, 0x00);
@@ -83,8 +83,7 @@ static void __devinit read_main_config_table(struct pm8001_hba_info *pm8001_ha)
83 * read_general_status_table - read the general status table and save it. 83 * read_general_status_table - read the general status table and save it.
84 * @pm8001_ha: our hba card information 84 * @pm8001_ha: our hba card information
85 */ 85 */
86static void __devinit 86static void read_general_status_table(struct pm8001_hba_info *pm8001_ha)
87read_general_status_table(struct pm8001_hba_info *pm8001_ha)
88{ 87{
89 void __iomem *address = pm8001_ha->general_stat_tbl_addr; 88 void __iomem *address = pm8001_ha->general_stat_tbl_addr;
90 pm8001_ha->gs_tbl.gst_len_mpistate = pm8001_mr32(address, 0x00); 89 pm8001_ha->gs_tbl.gst_len_mpistate = pm8001_mr32(address, 0x00);
@@ -118,8 +117,7 @@ read_general_status_table(struct pm8001_hba_info *pm8001_ha)
118 * read_inbnd_queue_table - read the inbound queue table and save it. 117 * read_inbnd_queue_table - read the inbound queue table and save it.
119 * @pm8001_ha: our hba card information 118 * @pm8001_ha: our hba card information
120 */ 119 */
121static void __devinit 120static void read_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha)
122read_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha)
123{ 121{
124 int inbQ_num = 1; 122 int inbQ_num = 1;
125 int i; 123 int i;
@@ -137,8 +135,7 @@ read_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha)
137 * read_outbnd_queue_table - read the outbound queue table and save it. 135 * read_outbnd_queue_table - read the outbound queue table and save it.
138 * @pm8001_ha: our hba card information 136 * @pm8001_ha: our hba card information
139 */ 137 */
140static void __devinit 138static void read_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha)
141read_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha)
142{ 139{
143 int outbQ_num = 1; 140 int outbQ_num = 1;
144 int i; 141 int i;
@@ -156,8 +153,7 @@ read_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha)
156 * init_default_table_values - init the default table. 153 * init_default_table_values - init the default table.
157 * @pm8001_ha: our hba card information 154 * @pm8001_ha: our hba card information
158 */ 155 */
159static void __devinit 156static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
160init_default_table_values(struct pm8001_hba_info *pm8001_ha)
161{ 157{
162 int qn = 1; 158 int qn = 1;
163 int i; 159 int i;
@@ -250,8 +246,7 @@ init_default_table_values(struct pm8001_hba_info *pm8001_ha)
250 * update_main_config_table - update the main default table to the HBA. 246 * update_main_config_table - update the main default table to the HBA.
251 * @pm8001_ha: our hba card information 247 * @pm8001_ha: our hba card information
252 */ 248 */
253static void __devinit 249static void update_main_config_table(struct pm8001_hba_info *pm8001_ha)
254update_main_config_table(struct pm8001_hba_info *pm8001_ha)
255{ 250{
256 void __iomem *address = pm8001_ha->main_cfg_tbl_addr; 251 void __iomem *address = pm8001_ha->main_cfg_tbl_addr;
257 pm8001_mw32(address, 0x24, 252 pm8001_mw32(address, 0x24,
@@ -297,8 +292,8 @@ update_main_config_table(struct pm8001_hba_info *pm8001_ha)
297 * update_inbnd_queue_table - update the inbound queue table to the HBA. 292 * update_inbnd_queue_table - update the inbound queue table to the HBA.
298 * @pm8001_ha: our hba card information 293 * @pm8001_ha: our hba card information
299 */ 294 */
300static void __devinit 295static void update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha,
301update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number) 296 int number)
302{ 297{
303 void __iomem *address = pm8001_ha->inbnd_q_tbl_addr; 298 void __iomem *address = pm8001_ha->inbnd_q_tbl_addr;
304 u16 offset = number * 0x20; 299 u16 offset = number * 0x20;
@@ -318,8 +313,8 @@ update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number)
318 * update_outbnd_queue_table - update the outbound queue table to the HBA. 313 * update_outbnd_queue_table - update the outbound queue table to the HBA.
319 * @pm8001_ha: our hba card information 314 * @pm8001_ha: our hba card information
320 */ 315 */
321static void __devinit 316static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha,
322update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number) 317 int number)
323{ 318{
324 void __iomem *address = pm8001_ha->outbnd_q_tbl_addr; 319 void __iomem *address = pm8001_ha->outbnd_q_tbl_addr;
325 u16 offset = number * 0x24; 320 u16 offset = number * 0x24;
@@ -370,8 +365,8 @@ int pm8001_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue)
370 * @pm8001_ha: our hba card information 365 * @pm8001_ha: our hba card information
371 * @SSCbit: set SSCbit to 0 to disable all phys ssc; 1 to enable all phys ssc. 366 * @SSCbit: set SSCbit to 0 to disable all phys ssc; 1 to enable all phys ssc.
372 */ 367 */
373static void __devinit 368static void mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha,
374mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, u32 SSCbit) 369 u32 SSCbit)
375{ 370{
376 u32 value, offset, i; 371 u32 value, offset, i;
377 unsigned long flags; 372 unsigned long flags;
@@ -438,9 +433,8 @@ mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, u32 SSCbit)
438 * @pm8001_ha: our hba card information 433 * @pm8001_ha: our hba card information
439 * @interval - interval time for each OPEN_REJECT (RETRY). The units are in 1us. 434 * @interval - interval time for each OPEN_REJECT (RETRY). The units are in 1us.
440 */ 435 */
441static void __devinit 436static void mpi_set_open_retry_interval_reg(struct pm8001_hba_info *pm8001_ha,
442mpi_set_open_retry_interval_reg(struct pm8001_hba_info *pm8001_ha, 437 u32 interval)
443 u32 interval)
444{ 438{
445 u32 offset; 439 u32 offset;
446 u32 value; 440 u32 value;
@@ -601,7 +595,7 @@ static void init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha)
601 * pm8001_chip_init - the main init function that initialize whole PM8001 chip. 595 * pm8001_chip_init - the main init function that initialize whole PM8001 chip.
602 * @pm8001_ha: our hba card information 596 * @pm8001_ha: our hba card information
603 */ 597 */
604static int __devinit pm8001_chip_init(struct pm8001_hba_info *pm8001_ha) 598static int pm8001_chip_init(struct pm8001_hba_info *pm8001_ha)
605{ 599{
606 /* check the firmware status */ 600 /* check the firmware status */
607 if (-1 == check_fw_ready(pm8001_ha)) { 601 if (-1 == check_fw_ready(pm8001_ha)) {
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 0267c22f8741..4c9fe733fe88 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -104,8 +104,7 @@ static struct sas_domain_function_template pm8001_transport_ops = {
104 *@pm8001_ha: our hba structure. 104 *@pm8001_ha: our hba structure.
105 *@phy_id: phy id. 105 *@phy_id: phy id.
106 */ 106 */
107static void __devinit pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, 107static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id)
108 int phy_id)
109{ 108{
110 struct pm8001_phy *phy = &pm8001_ha->phy[phy_id]; 109 struct pm8001_phy *phy = &pm8001_ha->phy[phy_id];
111 struct asd_sas_phy *sas_phy = &phy->sas_phy; 110 struct asd_sas_phy *sas_phy = &phy->sas_phy;
@@ -195,7 +194,7 @@ static irqreturn_t pm8001_interrupt(int irq, void *opaque)
195 * @pm8001_ha:our hba structure. 194 * @pm8001_ha:our hba structure.
196 * 195 *
197 */ 196 */
198static int __devinit pm8001_alloc(struct pm8001_hba_info *pm8001_ha) 197static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha)
199{ 198{
200 int i; 199 int i;
201 spin_lock_init(&pm8001_ha->lock); 200 spin_lock_init(&pm8001_ha->lock);
@@ -360,8 +359,9 @@ static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha)
360 * @ent: ent 359 * @ent: ent
361 * @shost: scsi host struct which has been initialized before. 360 * @shost: scsi host struct which has been initialized before.
362 */ 361 */
363static struct pm8001_hba_info *__devinit 362static struct pm8001_hba_info *pm8001_pci_alloc(struct pci_dev *pdev,
364pm8001_pci_alloc(struct pci_dev *pdev, u32 chip_id, struct Scsi_Host *shost) 363 u32 chip_id,
364 struct Scsi_Host *shost)
365{ 365{
366 struct pm8001_hba_info *pm8001_ha; 366 struct pm8001_hba_info *pm8001_ha;
367 struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost); 367 struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost);
@@ -433,8 +433,8 @@ static int pci_go_44(struct pci_dev *pdev)
433 * @shost: scsi host which has been allocated outside. 433 * @shost: scsi host which has been allocated outside.
434 * @chip_info: our ha struct. 434 * @chip_info: our ha struct.
435 */ 435 */
436static int __devinit pm8001_prep_sas_ha_init(struct Scsi_Host * shost, 436static int pm8001_prep_sas_ha_init(struct Scsi_Host *shost,
437 const struct pm8001_chip_info *chip_info) 437 const struct pm8001_chip_info *chip_info)
438{ 438{
439 int phy_nr, port_nr; 439 int phy_nr, port_nr;
440 struct asd_sas_phy **arr_phy; 440 struct asd_sas_phy **arr_phy;
@@ -479,8 +479,8 @@ exit:
479 * @shost: scsi host which has been allocated outside 479 * @shost: scsi host which has been allocated outside
480 * @chip_info: our ha struct. 480 * @chip_info: our ha struct.
481 */ 481 */
482static void __devinit pm8001_post_sas_ha_init(struct Scsi_Host *shost, 482static void pm8001_post_sas_ha_init(struct Scsi_Host *shost,
483 const struct pm8001_chip_info *chip_info) 483 const struct pm8001_chip_info *chip_info)
484{ 484{
485 int i = 0; 485 int i = 0;
486 struct pm8001_hba_info *pm8001_ha; 486 struct pm8001_hba_info *pm8001_ha;
@@ -615,8 +615,8 @@ intx:
615 * pci driver it is invoked, all struct an hardware initilization should be done 615 * pci driver it is invoked, all struct an hardware initilization should be done
616 * here, also, register interrupt 616 * here, also, register interrupt
617 */ 617 */
618static int __devinit pm8001_pci_probe(struct pci_dev *pdev, 618static int pm8001_pci_probe(struct pci_dev *pdev,
619 const struct pci_device_id *ent) 619 const struct pci_device_id *ent)
620{ 620{
621 unsigned int rc; 621 unsigned int rc;
622 u32 pci_reg; 622 u32 pci_reg;
@@ -707,7 +707,7 @@ err_out_enable:
707 return rc; 707 return rc;
708} 708}
709 709
710static void __devexit pm8001_pci_remove(struct pci_dev *pdev) 710static void pm8001_pci_remove(struct pci_dev *pdev)
711{ 711{
712 struct sas_ha_struct *sha = pci_get_drvdata(pdev); 712 struct sas_ha_struct *sha = pci_get_drvdata(pdev);
713 struct pm8001_hba_info *pm8001_ha; 713 struct pm8001_hba_info *pm8001_ha;
@@ -842,7 +842,7 @@ err_out_enable:
842 return rc; 842 return rc;
843} 843}
844 844
845static struct pci_device_id __devinitdata pm8001_pci_table[] = { 845static struct pci_device_id pm8001_pci_table[] = {
846 { 846 {
847 PCI_VDEVICE(PMC_Sierra, 0x8001), chip_8001 847 PCI_VDEVICE(PMC_Sierra, 0x8001), chip_8001
848 }, 848 },
@@ -857,7 +857,7 @@ static struct pci_driver pm8001_pci_driver = {
857 .name = DRV_NAME, 857 .name = DRV_NAME,
858 .id_table = pm8001_pci_table, 858 .id_table = pm8001_pci_table,
859 .probe = pm8001_pci_probe, 859 .probe = pm8001_pci_probe,
860 .remove = __devexit_p(pm8001_pci_remove), 860 .remove = pm8001_pci_remove,
861 .suspend = pm8001_pci_suspend, 861 .suspend = pm8001_pci_suspend,
862 .resume = pm8001_pci_resume, 862 .resume = pm8001_pci_resume,
863}; 863};
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index af763eab2039..b46f5e906837 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -125,7 +125,7 @@ static struct pmcraid_chip_details pmcraid_chip_cfg[] = {
125/* 125/*
126 * PCI device ids supported by pmcraid driver 126 * PCI device ids supported by pmcraid driver
127 */ 127 */
128static struct pci_device_id pmcraid_pci_table[] __devinitdata = { 128static struct pci_device_id pmcraid_pci_table[] = {
129 { PCI_DEVICE(PCI_VENDOR_ID_PMC, PCI_DEVICE_ID_PMC_MAXRAID), 129 { PCI_DEVICE(PCI_VENDOR_ID_PMC, PCI_DEVICE_ID_PMC_MAXRAID),
130 0, 0, (kernel_ulong_t)&pmcraid_chip_cfg[0] 130 0, 0, (kernel_ulong_t)&pmcraid_chip_cfg[0]
131 }, 131 },
@@ -4818,8 +4818,7 @@ pmcraid_release_control_blocks(
4818 * Return Value 4818 * Return Value
4819 * 0 in case of success; -ENOMEM in case of failure 4819 * 0 in case of success; -ENOMEM in case of failure
4820 */ 4820 */
4821static int __devinit 4821static int pmcraid_allocate_cmd_blocks(struct pmcraid_instance *pinstance)
4822pmcraid_allocate_cmd_blocks(struct pmcraid_instance *pinstance)
4823{ 4822{
4824 int i; 4823 int i;
4825 4824
@@ -4855,8 +4854,7 @@ pmcraid_allocate_cmd_blocks(struct pmcraid_instance *pinstance)
4855 * Return Value 4854 * Return Value
4856 * 0 in case it can allocate all control blocks, otherwise -ENOMEM 4855 * 0 in case it can allocate all control blocks, otherwise -ENOMEM
4857 */ 4856 */
4858static int __devinit 4857static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
4859pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
4860{ 4858{
4861 int i; 4859 int i;
4862 4860
@@ -4922,8 +4920,7 @@ pmcraid_release_host_rrqs(struct pmcraid_instance *pinstance, int maxindex)
4922 * Return value 4920 * Return value
4923 * 0 hrrq buffers are allocated, -ENOMEM otherwise. 4921 * 0 hrrq buffers are allocated, -ENOMEM otherwise.
4924 */ 4922 */
4925static int __devinit 4923static int pmcraid_allocate_host_rrqs(struct pmcraid_instance *pinstance)
4926pmcraid_allocate_host_rrqs(struct pmcraid_instance *pinstance)
4927{ 4924{
4928 int i, buffer_size; 4925 int i, buffer_size;
4929 4926
@@ -5062,8 +5059,7 @@ static void pmcraid_release_config_buffers(struct pmcraid_instance *pinstance)
5062 * Return Value 5059 * Return Value
5063 * 0 for successful allocation, -ENOMEM for any failure 5060 * 0 for successful allocation, -ENOMEM for any failure
5064 */ 5061 */
5065static int __devinit 5062static int pmcraid_allocate_config_buffers(struct pmcraid_instance *pinstance)
5066pmcraid_allocate_config_buffers(struct pmcraid_instance *pinstance)
5067{ 5063{
5068 int i; 5064 int i;
5069 5065
@@ -5181,7 +5177,7 @@ static void pmcraid_release_buffers(struct pmcraid_instance *pinstance)
5181 * Return Value 5177 * Return Value
5182 * 0 in case all of the blocks are allocated, -ENOMEM otherwise. 5178 * 0 in case all of the blocks are allocated, -ENOMEM otherwise.
5183 */ 5179 */
5184static int __devinit pmcraid_init_buffers(struct pmcraid_instance *pinstance) 5180static int pmcraid_init_buffers(struct pmcraid_instance *pinstance)
5185{ 5181{
5186 int i; 5182 int i;
5187 5183
@@ -5281,11 +5277,8 @@ static void pmcraid_reinit_buffers(struct pmcraid_instance *pinstance)
5281 * Return Value 5277 * Return Value
5282 * 0 on success, non-zero in case of any failure 5278 * 0 on success, non-zero in case of any failure
5283 */ 5279 */
5284static int __devinit pmcraid_init_instance( 5280static int pmcraid_init_instance(struct pci_dev *pdev, struct Scsi_Host *host,
5285 struct pci_dev *pdev, 5281 void __iomem *mapped_pci_addr)
5286 struct Scsi_Host *host,
5287 void __iomem *mapped_pci_addr
5288)
5289{ 5282{
5290 struct pmcraid_instance *pinstance = 5283 struct pmcraid_instance *pinstance =
5291 (struct pmcraid_instance *)host->hostdata; 5284 (struct pmcraid_instance *)host->hostdata;
@@ -5442,7 +5435,7 @@ static void pmcraid_release_chrdev(struct pmcraid_instance *pinstance)
5442 * Return value 5435 * Return value
5443 * none 5436 * none
5444 */ 5437 */
5445static void __devexit pmcraid_remove(struct pci_dev *pdev) 5438static void pmcraid_remove(struct pci_dev *pdev)
5446{ 5439{
5447 struct pmcraid_instance *pinstance = pci_get_drvdata(pdev); 5440 struct pmcraid_instance *pinstance = pci_get_drvdata(pdev);
5448 5441
@@ -5883,10 +5876,8 @@ static void pmcraid_querycfg(struct pmcraid_cmd *cmd)
5883 * returns 0 if the device is claimed and successfully configured. 5876 * returns 0 if the device is claimed and successfully configured.
5884 * returns non-zero error code in case of any failure 5877 * returns non-zero error code in case of any failure
5885 */ 5878 */
5886static int __devinit pmcraid_probe( 5879static int pmcraid_probe(struct pci_dev *pdev,
5887 struct pci_dev *pdev, 5880 const struct pci_device_id *dev_id)
5888 const struct pci_device_id *dev_id
5889)
5890{ 5881{
5891 struct pmcraid_instance *pinstance; 5882 struct pmcraid_instance *pinstance;
5892 struct Scsi_Host *host; 5883 struct Scsi_Host *host;
diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c
index 959f10055be7..e6e2a30493e6 100644
--- a/drivers/scsi/ps3rom.c
+++ b/drivers/scsi/ps3rom.c
@@ -359,7 +359,7 @@ static struct scsi_host_template ps3rom_host_template = {
359}; 359};
360 360
361 361
362static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev) 362static int ps3rom_probe(struct ps3_system_bus_device *_dev)
363{ 363{
364 struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); 364 struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
365 int error; 365 int error;
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 538230be5cca..5a522c5bbd43 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -1438,7 +1438,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp)
1438 * Returns: 1438 * Returns:
1439 * 0 = success 1439 * 0 = success
1440 */ 1440 */
1441static int __devinit 1441static int
1442qla1280_initialize_adapter(struct scsi_qla_host *ha) 1442qla1280_initialize_adapter(struct scsi_qla_host *ha)
1443{ 1443{
1444 struct device_reg __iomem *reg; 1444 struct device_reg __iomem *reg;
@@ -4230,7 +4230,7 @@ static struct scsi_host_template qla1280_driver_template = {
4230}; 4230};
4231 4231
4232 4232
4233static int __devinit 4233static int
4234qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) 4234qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4235{ 4235{
4236 int devnum = id->driver_data; 4236 int devnum = id->driver_data;
@@ -4399,7 +4399,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4399} 4399}
4400 4400
4401 4401
4402static void __devexit 4402static void
4403qla1280_remove_one(struct pci_dev *pdev) 4403qla1280_remove_one(struct pci_dev *pdev)
4404{ 4404{
4405 struct Scsi_Host *host = pci_get_drvdata(pdev); 4405 struct Scsi_Host *host = pci_get_drvdata(pdev);
@@ -4433,7 +4433,7 @@ static struct pci_driver qla1280_pci_driver = {
4433 .name = "qla1280", 4433 .name = "qla1280",
4434 .id_table = qla1280_pci_tbl, 4434 .id_table = qla1280_pci_tbl,
4435 .probe = qla1280_probe_one, 4435 .probe = qla1280_probe_one,
4436 .remove = __devexit_p(qla1280_remove_one), 4436 .remove = qla1280_remove_one,
4437}; 4437};
4438 4438
4439static int __init 4439static int __init
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 3a1661cf8c1e..10d23f8b7036 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2154,7 +2154,7 @@ qla2xxx_scan_finished(struct Scsi_Host *shost, unsigned long time)
2154/* 2154/*
2155 * PCI driver interface 2155 * PCI driver interface
2156 */ 2156 */
2157static int __devinit 2157static int
2158qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) 2158qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
2159{ 2159{
2160 int ret = -ENODEV; 2160 int ret = -ENODEV;
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index fbc546e893ac..4cec123a6a6a 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -5124,8 +5124,8 @@ void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset)
5124 * It returns zero if successful. It also initializes all data necessary for 5124 * It returns zero if successful. It also initializes all data necessary for
5125 * the driver. 5125 * the driver.
5126 **/ 5126 **/
5127static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev, 5127static int qla4xxx_probe_adapter(struct pci_dev *pdev,
5128 const struct pci_device_id *ent) 5128 const struct pci_device_id *ent)
5129{ 5129{
5130 int ret = -ENODEV, status; 5130 int ret = -ENODEV, status;
5131 struct Scsi_Host *host; 5131 struct Scsi_Host *host;
@@ -5464,7 +5464,7 @@ static void qla4xxx_destroy_fw_ddb_session(struct scsi_qla_host *ha)
5464 * qla4xxx_remove_adapter - callback function to remove adapter. 5464 * qla4xxx_remove_adapter - callback function to remove adapter.
5465 * @pci_dev: PCI device pointer 5465 * @pci_dev: PCI device pointer
5466 **/ 5466 **/
5467static void __devexit qla4xxx_remove_adapter(struct pci_dev *pdev) 5467static void qla4xxx_remove_adapter(struct pci_dev *pdev)
5468{ 5468{
5469 struct scsi_qla_host *ha; 5469 struct scsi_qla_host *ha;
5470 5470
diff --git a/drivers/scsi/qlogicfas.c b/drivers/scsi/qlogicfas.c
index 1e874f1fb5c6..13d628b56ff7 100644
--- a/drivers/scsi/qlogicfas.c
+++ b/drivers/scsi/qlogicfas.c
@@ -142,7 +142,7 @@ module_param_array(irq, int, NULL, 0);
142MODULE_PARM_DESC(iobase, "I/O address"); 142MODULE_PARM_DESC(iobase, "I/O address");
143MODULE_PARM_DESC(irq, "IRQ"); 143MODULE_PARM_DESC(irq, "IRQ");
144 144
145static int __devinit qlogicfas_detect(struct scsi_host_template *sht) 145static int qlogicfas_detect(struct scsi_host_template *sht)
146{ 146{
147 struct Scsi_Host *shost; 147 struct Scsi_Host *shost;
148 struct qlogicfas408_priv *priv; 148 struct qlogicfas408_priv *priv;
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 71fddbc60f18..6d48d30bed05 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -461,7 +461,7 @@ static int qlogicpti_reset_hardware(struct Scsi_Host *host)
461 461
462#define PTI_RESET_LIMIT 400 462#define PTI_RESET_LIMIT 400
463 463
464static int __devinit qlogicpti_load_firmware(struct qlogicpti *qpti) 464static int qlogicpti_load_firmware(struct qlogicpti *qpti)
465{ 465{
466 const struct firmware *fw; 466 const struct firmware *fw;
467 const char fwname[] = "qlogic/isp1000.bin"; 467 const char fwname[] = "qlogic/isp1000.bin";
@@ -670,7 +670,7 @@ static int qlogicpti_verify_tmon(struct qlogicpti *qpti)
670 670
671static irqreturn_t qpti_intr(int irq, void *dev_id); 671static irqreturn_t qpti_intr(int irq, void *dev_id);
672 672
673static void __devinit qpti_chain_add(struct qlogicpti *qpti) 673static void qpti_chain_add(struct qlogicpti *qpti)
674{ 674{
675 spin_lock_irq(&qptichain_lock); 675 spin_lock_irq(&qptichain_lock);
676 if (qptichain != NULL) { 676 if (qptichain != NULL) {
@@ -686,7 +686,7 @@ static void __devinit qpti_chain_add(struct qlogicpti *qpti)
686 spin_unlock_irq(&qptichain_lock); 686 spin_unlock_irq(&qptichain_lock);
687} 687}
688 688
689static void __devexit qpti_chain_del(struct qlogicpti *qpti) 689static void qpti_chain_del(struct qlogicpti *qpti)
690{ 690{
691 spin_lock_irq(&qptichain_lock); 691 spin_lock_irq(&qptichain_lock);
692 if (qptichain == qpti) { 692 if (qptichain == qpti) {
@@ -701,7 +701,7 @@ static void __devexit qpti_chain_del(struct qlogicpti *qpti)
701 spin_unlock_irq(&qptichain_lock); 701 spin_unlock_irq(&qptichain_lock);
702} 702}
703 703
704static int __devinit qpti_map_regs(struct qlogicpti *qpti) 704static int qpti_map_regs(struct qlogicpti *qpti)
705{ 705{
706 struct platform_device *op = qpti->op; 706 struct platform_device *op = qpti->op;
707 707
@@ -724,7 +724,7 @@ static int __devinit qpti_map_regs(struct qlogicpti *qpti)
724 return 0; 724 return 0;
725} 725}
726 726
727static int __devinit qpti_register_irq(struct qlogicpti *qpti) 727static int qpti_register_irq(struct qlogicpti *qpti)
728{ 728{
729 struct platform_device *op = qpti->op; 729 struct platform_device *op = qpti->op;
730 730
@@ -749,7 +749,7 @@ fail:
749 return -1; 749 return -1;
750} 750}
751 751
752static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti) 752static void qpti_get_scsi_id(struct qlogicpti *qpti)
753{ 753{
754 struct platform_device *op = qpti->op; 754 struct platform_device *op = qpti->op;
755 struct device_node *dp; 755 struct device_node *dp;
@@ -803,7 +803,7 @@ static void qpti_get_clock(struct qlogicpti *qpti)
803/* The request and response queues must each be aligned 803/* The request and response queues must each be aligned
804 * on a page boundary. 804 * on a page boundary.
805 */ 805 */
806static int __devinit qpti_map_queues(struct qlogicpti *qpti) 806static int qpti_map_queues(struct qlogicpti *qpti)
807{ 807{
808 struct platform_device *op = qpti->op; 808 struct platform_device *op = qpti->op;
809 809
@@ -1292,7 +1292,7 @@ static struct scsi_host_template qpti_template = {
1292}; 1292};
1293 1293
1294static const struct of_device_id qpti_match[]; 1294static const struct of_device_id qpti_match[];
1295static int __devinit qpti_sbus_probe(struct platform_device *op) 1295static int qpti_sbus_probe(struct platform_device *op)
1296{ 1296{
1297 struct device_node *dp = op->dev.of_node; 1297 struct device_node *dp = op->dev.of_node;
1298 struct Scsi_Host *host; 1298 struct Scsi_Host *host;
@@ -1402,7 +1402,7 @@ fail_unlink:
1402 return -ENODEV; 1402 return -ENODEV;
1403} 1403}
1404 1404
1405static int __devexit qpti_sbus_remove(struct platform_device *op) 1405static int qpti_sbus_remove(struct platform_device *op)
1406{ 1406{
1407 struct qlogicpti *qpti = dev_get_drvdata(&op->dev); 1407 struct qlogicpti *qpti = dev_get_drvdata(&op->dev);
1408 1408
@@ -1459,7 +1459,7 @@ static struct platform_driver qpti_sbus_driver = {
1459 .of_match_table = qpti_match, 1459 .of_match_table = qpti_match,
1460 }, 1460 },
1461 .probe = qpti_sbus_probe, 1461 .probe = qpti_sbus_probe,
1462 .remove = __devexit_p(qpti_sbus_remove), 1462 .remove = qpti_sbus_remove,
1463}; 1463};
1464 1464
1465static int __init qpti_init(void) 1465static int __init qpti_init(void)
diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c
index 3a9d85ca6047..a464d959f66e 100644
--- a/drivers/scsi/sgiwd93.c
+++ b/drivers/scsi/sgiwd93.c
@@ -226,7 +226,7 @@ static struct scsi_host_template sgiwd93_template = {
226 .use_clustering = DISABLE_CLUSTERING, 226 .use_clustering = DISABLE_CLUSTERING,
227}; 227};
228 228
229static int __devinit sgiwd93_probe(struct platform_device *pdev) 229static int sgiwd93_probe(struct platform_device *pdev)
230{ 230{
231 struct sgiwd93_platform_data *pd = pdev->dev.platform_data; 231 struct sgiwd93_platform_data *pd = pdev->dev.platform_data;
232 unsigned char *wdregs = pd->wdregs; 232 unsigned char *wdregs = pd->wdregs;
@@ -312,7 +312,7 @@ static int __exit sgiwd93_remove(struct platform_device *pdev)
312 312
313static struct platform_driver sgiwd93_driver = { 313static struct platform_driver sgiwd93_driver = {
314 .probe = sgiwd93_probe, 314 .probe = sgiwd93_probe,
315 .remove = __devexit_p(sgiwd93_remove), 315 .remove = sgiwd93_remove,
316 .driver = { 316 .driver = {
317 .name = "sgiwd93", 317 .name = "sgiwd93",
318 .owner = THIS_MODULE, 318 .owner = THIS_MODULE,
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c
index a318264a4ba1..3b3b56f4a830 100644
--- a/drivers/scsi/sim710.c
+++ b/drivers/scsi/sim710.c
@@ -94,9 +94,9 @@ static struct scsi_host_template sim710_driver_template = {
94 .module = THIS_MODULE, 94 .module = THIS_MODULE,
95}; 95};
96 96
97static __devinit int 97static int sim710_probe_common(struct device *dev, unsigned long base_addr,
98sim710_probe_common(struct device *dev, unsigned long base_addr, 98 int irq, int clock, int differential,
99 int irq, int clock, int differential, int scsi_id) 99 int scsi_id)
100{ 100{
101 struct Scsi_Host * host = NULL; 101 struct Scsi_Host * host = NULL;
102 struct NCR_700_Host_Parameters *hostdata = 102 struct NCR_700_Host_Parameters *hostdata =
@@ -153,8 +153,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
153 return -ENODEV; 153 return -ENODEV;
154} 154}
155 155
156static __devexit int 156static int sim710_device_remove(struct device *dev)
157sim710_device_remove(struct device *dev)
158{ 157{
159 struct Scsi_Host *host = dev_get_drvdata(dev); 158 struct Scsi_Host *host = dev_get_drvdata(dev);
160 struct NCR_700_Host_Parameters *hostdata = 159 struct NCR_700_Host_Parameters *hostdata =
@@ -221,7 +220,7 @@ static struct eisa_driver sim710_eisa_driver = {
221 .driver = { 220 .driver = {
222 .name = "sim710", 221 .name = "sim710",
223 .probe = sim710_eisa_probe, 222 .probe = sim710_eisa_probe,
224 .remove = __devexit_p(sim710_device_remove), 223 .remove = sim710_device_remove,
225 }, 224 },
226}; 225};
227#endif /* CONFIG_EISA */ 226#endif /* CONFIG_EISA */
diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c
index cf51432f8e72..52d54e7425db 100644
--- a/drivers/scsi/sni_53c710.c
+++ b/drivers/scsi/sni_53c710.c
@@ -65,7 +65,7 @@ static struct scsi_host_template snirm710_template = {
65 .module = THIS_MODULE, 65 .module = THIS_MODULE,
66}; 66};
67 67
68static int __devinit snirm710_probe(struct platform_device *dev) 68static int snirm710_probe(struct platform_device *dev)
69{ 69{
70 unsigned long base; 70 unsigned long base;
71 struct NCR_700_Host_Parameters *hostdata; 71 struct NCR_700_Host_Parameters *hostdata;
@@ -134,7 +134,7 @@ static int __exit snirm710_driver_remove(struct platform_device *dev)
134 134
135static struct platform_driver snirm710_driver = { 135static struct platform_driver snirm710_driver = {
136 .probe = snirm710_probe, 136 .probe = snirm710_probe,
137 .remove = __devexit_p(snirm710_driver_remove), 137 .remove = snirm710_driver_remove,
138 .driver = { 138 .driver = {
139 .name = "snirm_53c710", 139 .name = "snirm_53c710",
140 .owner = THIS_MODULE, 140 .owner = THIS_MODULE,
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 606215e54b88..325c31caa6e0 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1540,8 +1540,7 @@ static void stex_free_irq(struct st_hba *hba)
1540 pci_disable_msi(pdev); 1540 pci_disable_msi(pdev);
1541} 1541}
1542 1542
1543static int __devinit 1543static int stex_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1544stex_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1545{ 1544{
1546 struct st_hba *hba; 1545 struct st_hba *hba;
1547 struct Scsi_Host *host; 1546 struct Scsi_Host *host;
@@ -1815,7 +1814,7 @@ static struct pci_driver stex_pci_driver = {
1815 .name = DRV_NAME, 1814 .name = DRV_NAME,
1816 .id_table = stex_pci_tbl, 1815 .id_table = stex_pci_tbl,
1817 .probe = stex_probe, 1816 .probe = stex_probe,
1818 .remove = __devexit_p(stex_remove), 1817 .remove = stex_remove,
1819 .shutdown = stex_shutdown, 1818 .shutdown = stex_shutdown,
1820}; 1819};
1821 1820
diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c
index 0621037f0271..534eb96fc3a7 100644
--- a/drivers/scsi/sun3x_esp.c
+++ b/drivers/scsi/sun3x_esp.c
@@ -194,7 +194,7 @@ static const struct esp_driver_ops sun3x_esp_ops = {
194 .dma_error = sun3x_esp_dma_error, 194 .dma_error = sun3x_esp_dma_error,
195}; 195};
196 196
197static int __devinit esp_sun3x_probe(struct platform_device *dev) 197static int esp_sun3x_probe(struct platform_device *dev)
198{ 198{
199 struct scsi_host_template *tpnt = &scsi_esp_template; 199 struct scsi_host_template *tpnt = &scsi_esp_template;
200 struct Scsi_Host *host; 200 struct Scsi_Host *host;
@@ -268,7 +268,7 @@ fail:
268 return err; 268 return err;
269} 269}
270 270
271static int __devexit esp_sun3x_remove(struct platform_device *dev) 271static int esp_sun3x_remove(struct platform_device *dev)
272{ 272{
273 struct esp *esp = dev_get_drvdata(&dev->dev); 273 struct esp *esp = dev_get_drvdata(&dev->dev);
274 unsigned int irq = esp->host->irq; 274 unsigned int irq = esp->host->irq;
@@ -292,7 +292,7 @@ static int __devexit esp_sun3x_remove(struct platform_device *dev)
292 292
293static struct platform_driver esp_sun3x_driver = { 293static struct platform_driver esp_sun3x_driver = {
294 .probe = esp_sun3x_probe, 294 .probe = esp_sun3x_probe,
295 .remove = __devexit_p(esp_sun3x_remove), 295 .remove = esp_sun3x_remove,
296 .driver = { 296 .driver = {
297 .name = "sun3x_esp", 297 .name = "sun3x_esp",
298 .owner = THIS_MODULE, 298 .owner = THIS_MODULE,
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index 676fe9ac7f61..f2e68459f7ea 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -43,8 +43,7 @@ enum dvma_rev {
43 dvmahme 43 dvmahme
44}; 44};
45 45
46static int __devinit esp_sbus_setup_dma(struct esp *esp, 46static int esp_sbus_setup_dma(struct esp *esp, struct platform_device *dma_of)
47 struct platform_device *dma_of)
48{ 47{
49 esp->dma = dma_of; 48 esp->dma = dma_of;
50 49
@@ -79,7 +78,7 @@ static int __devinit esp_sbus_setup_dma(struct esp *esp,
79 78
80} 79}
81 80
82static int __devinit esp_sbus_map_regs(struct esp *esp, int hme) 81static int esp_sbus_map_regs(struct esp *esp, int hme)
83{ 82{
84 struct platform_device *op = esp->dev; 83 struct platform_device *op = esp->dev;
85 struct resource *res; 84 struct resource *res;
@@ -99,7 +98,7 @@ static int __devinit esp_sbus_map_regs(struct esp *esp, int hme)
99 return 0; 98 return 0;
100} 99}
101 100
102static int __devinit esp_sbus_map_command_block(struct esp *esp) 101static int esp_sbus_map_command_block(struct esp *esp)
103{ 102{
104 struct platform_device *op = esp->dev; 103 struct platform_device *op = esp->dev;
105 104
@@ -111,7 +110,7 @@ static int __devinit esp_sbus_map_command_block(struct esp *esp)
111 return 0; 110 return 0;
112} 111}
113 112
114static int __devinit esp_sbus_register_irq(struct esp *esp) 113static int esp_sbus_register_irq(struct esp *esp)
115{ 114{
116 struct Scsi_Host *host = esp->host; 115 struct Scsi_Host *host = esp->host;
117 struct platform_device *op = esp->dev; 116 struct platform_device *op = esp->dev;
@@ -120,7 +119,7 @@ static int __devinit esp_sbus_register_irq(struct esp *esp)
120 return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); 119 return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp);
121} 120}
122 121
123static void __devinit esp_get_scsi_id(struct esp *esp, struct platform_device *espdma) 122static void esp_get_scsi_id(struct esp *esp, struct platform_device *espdma)
124{ 123{
125 struct platform_device *op = esp->dev; 124 struct platform_device *op = esp->dev;
126 struct device_node *dp; 125 struct device_node *dp;
@@ -142,7 +141,7 @@ done:
142 esp->scsi_id_mask = (1 << esp->scsi_id); 141 esp->scsi_id_mask = (1 << esp->scsi_id);
143} 142}
144 143
145static void __devinit esp_get_differential(struct esp *esp) 144static void esp_get_differential(struct esp *esp)
146{ 145{
147 struct platform_device *op = esp->dev; 146 struct platform_device *op = esp->dev;
148 struct device_node *dp; 147 struct device_node *dp;
@@ -154,7 +153,7 @@ static void __devinit esp_get_differential(struct esp *esp)
154 esp->flags &= ~ESP_FLAG_DIFFERENTIAL; 153 esp->flags &= ~ESP_FLAG_DIFFERENTIAL;
155} 154}
156 155
157static void __devinit esp_get_clock_params(struct esp *esp) 156static void esp_get_clock_params(struct esp *esp)
158{ 157{
159 struct platform_device *op = esp->dev; 158 struct platform_device *op = esp->dev;
160 struct device_node *bus_dp, *dp; 159 struct device_node *bus_dp, *dp;
@@ -170,7 +169,7 @@ static void __devinit esp_get_clock_params(struct esp *esp)
170 esp->cfreq = fmhz; 169 esp->cfreq = fmhz;
171} 170}
172 171
173static void __devinit esp_get_bursts(struct esp *esp, struct platform_device *dma_of) 172static void esp_get_bursts(struct esp *esp, struct platform_device *dma_of)
174{ 173{
175 struct device_node *dma_dp = dma_of->dev.of_node; 174 struct device_node *dma_dp = dma_of->dev.of_node;
176 struct platform_device *op = esp->dev; 175 struct platform_device *op = esp->dev;
@@ -195,7 +194,7 @@ static void __devinit esp_get_bursts(struct esp *esp, struct platform_device *dm
195 esp->bursts = bursts; 194 esp->bursts = bursts;
196} 195}
197 196
198static void __devinit esp_sbus_get_props(struct esp *esp, struct platform_device *espdma) 197static void esp_sbus_get_props(struct esp *esp, struct platform_device *espdma)
199{ 198{
200 esp_get_scsi_id(esp, espdma); 199 esp_get_scsi_id(esp, espdma);
201 esp_get_differential(esp); 200 esp_get_differential(esp);
@@ -487,9 +486,8 @@ static const struct esp_driver_ops sbus_esp_ops = {
487 .dma_error = sbus_esp_dma_error, 486 .dma_error = sbus_esp_dma_error,
488}; 487};
489 488
490static int __devinit esp_sbus_probe_one(struct platform_device *op, 489static int esp_sbus_probe_one(struct platform_device *op,
491 struct platform_device *espdma, 490 struct platform_device *espdma, int hme)
492 int hme)
493{ 491{
494 struct scsi_host_template *tpnt = &scsi_esp_template; 492 struct scsi_host_template *tpnt = &scsi_esp_template;
495 struct Scsi_Host *host; 493 struct Scsi_Host *host;
@@ -562,7 +560,7 @@ fail:
562 return err; 560 return err;
563} 561}
564 562
565static int __devinit esp_sbus_probe(struct platform_device *op) 563static int esp_sbus_probe(struct platform_device *op)
566{ 564{
567 struct device_node *dma_node = NULL; 565 struct device_node *dma_node = NULL;
568 struct device_node *dp = op->dev.of_node; 566 struct device_node *dp = op->dev.of_node;
@@ -585,7 +583,7 @@ static int __devinit esp_sbus_probe(struct platform_device *op)
585 return esp_sbus_probe_one(op, dma_of, hme); 583 return esp_sbus_probe_one(op, dma_of, hme);
586} 584}
587 585
588static int __devexit esp_sbus_remove(struct platform_device *op) 586static int esp_sbus_remove(struct platform_device *op)
589{ 587{
590 struct esp *esp = dev_get_drvdata(&op->dev); 588 struct esp *esp = dev_get_drvdata(&op->dev);
591 struct platform_device *dma_of = esp->dma; 589 struct platform_device *dma_of = esp->dma;
@@ -639,7 +637,7 @@ static struct platform_driver esp_sbus_driver = {
639 .of_match_table = esp_match, 637 .of_match_table = esp_match,
640 }, 638 },
641 .probe = esp_sbus_probe, 639 .probe = esp_sbus_probe,
642 .remove = __devexit_p(esp_sbus_remove), 640 .remove = esp_sbus_remove,
643}; 641};
644 642
645static int __init sunesp_init(void) 643static int __init sunesp_init(void)
diff --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c
index ac4eca6a5328..0b7819f3e09b 100644
--- a/drivers/scsi/sym53c416.c
+++ b/drivers/scsi/sym53c416.c
@@ -581,7 +581,7 @@ static int sym53c416_test(int base)
581} 581}
582 582
583 583
584static struct isapnp_device_id id_table[] __devinitdata = { 584static struct isapnp_device_id id_table[] = {
585 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, 585 { ISAPNP_ANY_ID, ISAPNP_ANY_ID,
586 ISAPNP_VENDOR('S','L','I'), ISAPNP_FUNCTION(0x4161), 0 }, 586 ISAPNP_VENDOR('S','L','I'), ISAPNP_FUNCTION(0x4161), 0 },
587 { ISAPNP_ANY_ID, ISAPNP_ANY_ID, 587 { ISAPNP_ANY_ID, ISAPNP_ANY_ID,
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index e2b8e68b57e7..599568299fbe 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -1284,8 +1284,7 @@ static int sym53c8xx_proc_info(struct Scsi_Host *shost, char *buffer,
1284 * sym_free_resources() should be used instead of this function after calling 1284 * sym_free_resources() should be used instead of this function after calling
1285 * sym_attach(). 1285 * sym_attach().
1286 */ 1286 */
1287static void __devinit 1287static void sym_iounmap_device(struct sym_device *device)
1288sym_iounmap_device(struct sym_device *device)
1289{ 1288{
1290 if (device->s.ioaddr) 1289 if (device->s.ioaddr)
1291 pci_iounmap(device->pdev, device->s.ioaddr); 1290 pci_iounmap(device->pdev, device->s.ioaddr);
@@ -1325,8 +1324,8 @@ static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev,
1325 * If all is OK, install interrupt handling and 1324 * If all is OK, install interrupt handling and
1326 * start the timer daemon. 1325 * start the timer daemon.
1327 */ 1326 */
1328static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt, 1327static struct Scsi_Host *sym_attach(struct scsi_host_template *tpnt, int unit,
1329 int unit, struct sym_device *dev) 1328 struct sym_device *dev)
1330{ 1329{
1331 struct sym_data *sym_data; 1330 struct sym_data *sym_data;
1332 struct sym_hcb *np = NULL; 1331 struct sym_hcb *np = NULL;
@@ -1481,7 +1480,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
1481 * Detect and try to read SYMBIOS and TEKRAM NVRAM. 1480 * Detect and try to read SYMBIOS and TEKRAM NVRAM.
1482 */ 1481 */
1483#if SYM_CONF_NVRAM_SUPPORT 1482#if SYM_CONF_NVRAM_SUPPORT
1484static void __devinit sym_get_nvram(struct sym_device *devp, struct sym_nvram *nvp) 1483static void sym_get_nvram(struct sym_device *devp, struct sym_nvram *nvp)
1485{ 1484{
1486 devp->nvram = nvp; 1485 devp->nvram = nvp;
1487 nvp->type = 0; 1486 nvp->type = 0;
@@ -1494,7 +1493,7 @@ static inline void sym_get_nvram(struct sym_device *devp, struct sym_nvram *nvp)
1494} 1493}
1495#endif /* SYM_CONF_NVRAM_SUPPORT */ 1494#endif /* SYM_CONF_NVRAM_SUPPORT */
1496 1495
1497static int __devinit sym_check_supported(struct sym_device *device) 1496static int sym_check_supported(struct sym_device *device)
1498{ 1497{
1499 struct sym_chip *chip; 1498 struct sym_chip *chip;
1500 struct pci_dev *pdev = device->pdev; 1499 struct pci_dev *pdev = device->pdev;
@@ -1531,7 +1530,7 @@ static int __devinit sym_check_supported(struct sym_device *device)
1531 * Ignore Symbios chips controlled by various RAID controllers. 1530 * Ignore Symbios chips controlled by various RAID controllers.
1532 * These controllers set value 0x52414944 at RAM end - 16. 1531 * These controllers set value 0x52414944 at RAM end - 16.
1533 */ 1532 */
1534static int __devinit sym_check_raid(struct sym_device *device) 1533static int sym_check_raid(struct sym_device *device)
1535{ 1534{
1536 unsigned int ram_size, ram_val; 1535 unsigned int ram_size, ram_val;
1537 1536
@@ -1552,7 +1551,7 @@ static int __devinit sym_check_raid(struct sym_device *device)
1552 return -ENODEV; 1551 return -ENODEV;
1553} 1552}
1554 1553
1555static int __devinit sym_set_workarounds(struct sym_device *device) 1554static int sym_set_workarounds(struct sym_device *device)
1556{ 1555{
1557 struct sym_chip *chip = &device->chip; 1556 struct sym_chip *chip = &device->chip;
1558 struct pci_dev *pdev = device->pdev; 1557 struct pci_dev *pdev = device->pdev;
@@ -1602,8 +1601,7 @@ static int __devinit sym_set_workarounds(struct sym_device *device)
1602/* 1601/*
1603 * Map HBA registers and on-chip SRAM (if present). 1602 * Map HBA registers and on-chip SRAM (if present).
1604 */ 1603 */
1605static int __devinit 1604static int sym_iomap_device(struct sym_device *device)
1606sym_iomap_device(struct sym_device *device)
1607{ 1605{
1608 struct pci_dev *pdev = device->pdev; 1606 struct pci_dev *pdev = device->pdev;
1609 struct pci_bus_region bus_addr; 1607 struct pci_bus_region bus_addr;
@@ -1751,8 +1749,7 @@ static struct scsi_host_template sym2_template = {
1751 1749
1752static int attach_count; 1750static int attach_count;
1753 1751
1754static int __devinit sym2_probe(struct pci_dev *pdev, 1752static int sym2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1755 const struct pci_device_id *ent)
1756{ 1753{
1757 struct sym_device sym_dev; 1754 struct sym_device sym_dev;
1758 struct sym_nvram nvram; 1755 struct sym_nvram nvram;
@@ -2077,7 +2074,7 @@ static struct spi_function_template sym2_transport_functions = {
2077 .get_signalling = sym2_get_signalling, 2074 .get_signalling = sym2_get_signalling,
2078}; 2075};
2079 2076
2080static struct pci_device_id sym2_id_table[] __devinitdata = { 2077static struct pci_device_id sym2_id_table[] = {
2081 { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C810, 2078 { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C810,
2082 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, 2079 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
2083 { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C820, 2080 { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C820,
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c
index a1baccce05f0..9327f5fcec4e 100644
--- a/drivers/scsi/tmscsim.c
+++ b/drivers/scsi/tmscsim.c
@@ -2219,7 +2219,7 @@ static struct scsi_host_template driver_template = {
2219 * 2219 *
2220 **********************************************************************/ 2220 **********************************************************************/
2221 2221
2222static void __devinit dc390_eeprom_prepare_read(struct pci_dev *pdev, u8 cmd) 2222static void dc390_eeprom_prepare_read(struct pci_dev *pdev, u8 cmd)
2223{ 2223{
2224 u8 carryFlag = 1, j = 0x80, bval; 2224 u8 carryFlag = 1, j = 0x80, bval;
2225 int i; 2225 int i;
@@ -2242,7 +2242,7 @@ static void __devinit dc390_eeprom_prepare_read(struct pci_dev *pdev, u8 cmd)
2242 } 2242 }
2243} 2243}
2244 2244
2245static u16 __devinit dc390_eeprom_get_data(struct pci_dev *pdev) 2245static u16 dc390_eeprom_get_data(struct pci_dev *pdev)
2246{ 2246{
2247 int i; 2247 int i;
2248 u16 wval = 0; 2248 u16 wval = 0;
@@ -2264,7 +2264,7 @@ static u16 __devinit dc390_eeprom_get_data(struct pci_dev *pdev)
2264 return wval; 2264 return wval;
2265} 2265}
2266 2266
2267static void __devinit dc390_read_eeprom(struct pci_dev *pdev, u16 *ptr) 2267static void dc390_read_eeprom(struct pci_dev *pdev, u16 *ptr)
2268{ 2268{
2269 u8 cmd = EEPROM_READ, i; 2269 u8 cmd = EEPROM_READ, i;
2270 2270
@@ -2282,7 +2282,7 @@ static void __devinit dc390_read_eeprom(struct pci_dev *pdev, u16 *ptr)
2282} 2282}
2283 2283
2284/* Override EEprom values with explicitly set values */ 2284/* Override EEprom values with explicitly set values */
2285static void __devinit dc390_eeprom_override(u8 index) 2285static void dc390_eeprom_override(u8 index)
2286{ 2286{
2287 u8 *ptr = (u8 *) dc390_eepromBuf[index], id; 2287 u8 *ptr = (u8 *) dc390_eepromBuf[index], id;
2288 2288
@@ -2305,7 +2305,7 @@ static void __devinit dc390_eeprom_override(u8 index)
2305 } 2305 }
2306} 2306}
2307 2307
2308static int __devinitdata tmscsim_def[] = { 2308static int tmscsim_def[] = {
2309 7, 2309 7,
2310 0 /* 10MHz */, 2310 0 /* 10MHz */,
2311 PARITY_CHK_ | SEND_START_ | EN_DISCONNECT_ | SYNC_NEGO_ | TAG_QUEUEING_, 2311 PARITY_CHK_ | SEND_START_ | EN_DISCONNECT_ | SYNC_NEGO_ | TAG_QUEUEING_,
@@ -2315,7 +2315,7 @@ static int __devinitdata tmscsim_def[] = {
2315}; 2315};
2316 2316
2317/* Copy defaults over set values where missing */ 2317/* Copy defaults over set values where missing */
2318static void __devinit dc390_fill_with_defaults (void) 2318static void dc390_fill_with_defaults (void)
2319{ 2319{
2320 int i; 2320 int i;
2321 2321
@@ -2335,7 +2335,7 @@ static void __devinit dc390_fill_with_defaults (void)
2335 tmscsim[5] = 180; 2335 tmscsim[5] = 180;
2336} 2336}
2337 2337
2338static void __devinit dc390_check_eeprom(struct pci_dev *pdev, u8 index) 2338static void dc390_check_eeprom(struct pci_dev *pdev, u8 index)
2339{ 2339{
2340 u8 interpd[] = {1, 3, 5, 10, 16, 30, 60, 120}; 2340 u8 interpd[] = {1, 3, 5, 10, 16, 30, 60, 120};
2341 u8 EEbuf[128]; 2341 u8 EEbuf[128];
@@ -2372,7 +2372,7 @@ static void __devinit dc390_check_eeprom(struct pci_dev *pdev, u8 index)
2372 } 2372 }
2373} 2373}
2374 2374
2375static void __devinit dc390_init_hw(struct dc390_acb *pACB, u8 index) 2375static void dc390_init_hw(struct dc390_acb *pACB, u8 index)
2376{ 2376{
2377 struct Scsi_Host *shost = pACB->pScsiHost; 2377 struct Scsi_Host *shost = pACB->pScsiHost;
2378 u8 dstate; 2378 u8 dstate;
@@ -2422,8 +2422,7 @@ static void __devinit dc390_init_hw(struct dc390_acb *pACB, u8 index)
2422 DC390_write8(DMA_Status, dstate); 2422 DC390_write8(DMA_Status, dstate);
2423} 2423}
2424 2424
2425static int __devinit dc390_probe_one(struct pci_dev *pdev, 2425static int dc390_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
2426 const struct pci_device_id *id)
2427{ 2426{
2428 struct dc390_acb *pACB; 2427 struct dc390_acb *pACB;
2429 struct Scsi_Host *shost; 2428 struct Scsi_Host *shost;
@@ -2532,7 +2531,7 @@ static int __devinit dc390_probe_one(struct pci_dev *pdev,
2532 * 2531 *
2533 * @dev: The PCI device to remove. 2532 * @dev: The PCI device to remove.
2534 */ 2533 */
2535static void __devexit dc390_remove_one(struct pci_dev *dev) 2534static void dc390_remove_one(struct pci_dev *dev)
2536{ 2535{
2537 struct Scsi_Host *scsi_host = pci_get_drvdata(dev); 2536 struct Scsi_Host *scsi_host = pci_get_drvdata(dev);
2538 unsigned long iflags; 2537 unsigned long iflags;
@@ -2568,7 +2567,7 @@ static struct pci_driver dc390_driver = {
2568 .name = "tmscsim", 2567 .name = "tmscsim",
2569 .id_table = tmscsim_pci_tbl, 2568 .id_table = tmscsim_pci_tbl,
2570 .probe = dc390_probe_one, 2569 .probe = dc390_probe_one,
2571 .remove = __devexit_p(dc390_remove_one), 2570 .remove = dc390_remove_one,
2572}; 2571};
2573 2572
2574static int __init dc390_module_init(void) 2573static int __init dc390_module_init(void)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 58f4ba6fe412..91a4046ca9ba 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1811,8 +1811,7 @@ static int ufshcd_set_dma_mask(struct ufs_hba *hba)
1811 * 1811 *
1812 * Returns 0 on success, non-zero value on failure 1812 * Returns 0 on success, non-zero value on failure
1813 */ 1813 */
1814static int __devinit 1814static int ufshcd_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1815ufshcd_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1816{ 1815{
1817 struct Scsi_Host *host; 1816 struct Scsi_Host *host;
1818 struct ufs_hba *hba; 1817 struct ufs_hba *hba;
@@ -1947,7 +1946,7 @@ static struct pci_driver ufshcd_pci_driver = {
1947 .name = UFSHCD, 1946 .name = UFSHCD,
1948 .id_table = ufshcd_pci_tbl, 1947 .id_table = ufshcd_pci_tbl,
1949 .probe = ufshcd_probe, 1948 .probe = ufshcd_probe,
1950 .remove = __devexit_p(ufshcd_remove), 1949 .remove = ufshcd_remove,
1951 .shutdown = ufshcd_shutdown, 1950 .shutdown = ufshcd_shutdown,
1952#ifdef CONFIG_PM 1951#ifdef CONFIG_PM
1953 .suspend = ufshcd_suspend, 1952 .suspend = ufshcd_suspend,
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 74ab67a169ec..3449a1f8c656 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -679,7 +679,7 @@ out:
679 return err; 679 return err;
680} 680}
681 681
682static int __devinit virtscsi_probe(struct virtio_device *vdev) 682static int virtscsi_probe(struct virtio_device *vdev)
683{ 683{
684 struct Scsi_Host *shost; 684 struct Scsi_Host *shost;
685 struct virtio_scsi *vscsi; 685 struct virtio_scsi *vscsi;
@@ -733,7 +733,7 @@ virtscsi_init_failed:
733 return err; 733 return err;
734} 734}
735 735
736static void __devexit virtscsi_remove(struct virtio_device *vdev) 736static void virtscsi_remove(struct virtio_device *vdev)
737{ 737{
738 struct Scsi_Host *shost = virtio_scsi_host(vdev); 738 struct Scsi_Host *shost = virtio_scsi_host(vdev);
739 struct virtio_scsi *vscsi = shost_priv(shost); 739 struct virtio_scsi *vscsi = shost_priv(shost);
@@ -785,7 +785,7 @@ static struct virtio_driver virtio_scsi_driver = {
785 .freeze = virtscsi_freeze, 785 .freeze = virtscsi_freeze,
786 .restore = virtscsi_restore, 786 .restore = virtscsi_restore,
787#endif 787#endif
788 .remove = __devexit_p(virtscsi_remove), 788 .remove = virtscsi_remove,
789}; 789};
790 790
791static int __init init(void) 791static int __init init(void)
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index 20b3a483c2cc..3bfaa66fa0d1 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -397,7 +397,7 @@ static void pvscsi_unmap_buffers(const struct pvscsi_adapter *adapter,
397 SCSI_SENSE_BUFFERSIZE, PCI_DMA_FROMDEVICE); 397 SCSI_SENSE_BUFFERSIZE, PCI_DMA_FROMDEVICE);
398} 398}
399 399
400static int __devinit pvscsi_allocate_rings(struct pvscsi_adapter *adapter) 400static int pvscsi_allocate_rings(struct pvscsi_adapter *adapter)
401{ 401{
402 adapter->rings_state = pci_alloc_consistent(adapter->dev, PAGE_SIZE, 402 adapter->rings_state = pci_alloc_consistent(adapter->dev, PAGE_SIZE,
403 &adapter->ringStatePA); 403 &adapter->ringStatePA);
@@ -1152,7 +1152,7 @@ static void pvscsi_release_resources(struct pvscsi_adapter *adapter)
1152 * just use a statically allocated scatter list. 1152 * just use a statically allocated scatter list.
1153 * 1153 *
1154 */ 1154 */
1155static int __devinit pvscsi_allocate_sg(struct pvscsi_adapter *adapter) 1155static int pvscsi_allocate_sg(struct pvscsi_adapter *adapter)
1156{ 1156{
1157 struct pvscsi_ctx *ctx; 1157 struct pvscsi_ctx *ctx;
1158 int i; 1158 int i;
@@ -1233,8 +1233,7 @@ exit:
1233 return numPhys; 1233 return numPhys;
1234} 1234}
1235 1235
1236static int __devinit pvscsi_probe(struct pci_dev *pdev, 1236static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1237 const struct pci_device_id *id)
1238{ 1237{
1239 struct pvscsi_adapter *adapter; 1238 struct pvscsi_adapter *adapter;
1240 struct Scsi_Host *host; 1239 struct Scsi_Host *host;
@@ -1454,7 +1453,7 @@ static struct pci_driver pvscsi_pci_driver = {
1454 .name = "vmw_pvscsi", 1453 .name = "vmw_pvscsi",
1455 .id_table = pvscsi_pci_tbl, 1454 .id_table = pvscsi_pci_tbl,
1456 .probe = pvscsi_probe, 1455 .probe = pvscsi_probe,
1457 .remove = __devexit_p(pvscsi_remove), 1456 .remove = pvscsi_remove,
1458 .shutdown = pvscsi_shutdown, 1457 .shutdown = pvscsi_shutdown,
1459}; 1458};
1460 1459
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index 27e84e4b1fa9..97ccb0383539 100644
--- a/drivers/scsi/zalon.c
+++ b/drivers/scsi/zalon.c
@@ -182,7 +182,7 @@ static struct parisc_driver zalon_driver = {
182 .name = "zalon", 182 .name = "zalon",
183 .id_table = zalon_tbl, 183 .id_table = zalon_tbl,
184 .probe = zalon_probe, 184 .probe = zalon_probe,
185 .remove = __devexit_p(zalon_remove), 185 .remove = zalon_remove,
186}; 186};
187 187
188static int __init zalon7xx_init(void) 188static int __init zalon7xx_init(void)
diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c
index e17764d71476..cbf3476c68cd 100644
--- a/drivers/scsi/zorro7xx.c
+++ b/drivers/scsi/zorro7xx.c
@@ -38,7 +38,7 @@ static struct zorro_driver_data {
38 const char *name; 38 const char *name;
39 unsigned long offset; 39 unsigned long offset;
40 int absolute; /* offset is absolute address */ 40 int absolute; /* offset is absolute address */
41} zorro7xx_driver_data[] __devinitdata = { 41} zorro7xx_driver_data[] = {
42 { .name = "PowerUP 603e+", .offset = 0xf40000, .absolute = 1 }, 42 { .name = "PowerUP 603e+", .offset = 0xf40000, .absolute = 1 },
43 { .name = "WarpEngine 40xx", .offset = 0x40000 }, 43 { .name = "WarpEngine 40xx", .offset = 0x40000 },
44 { .name = "A4091", .offset = 0x800000 }, 44 { .name = "A4091", .offset = 0x800000 },
@@ -46,7 +46,7 @@ static struct zorro_driver_data {
46 { 0 } 46 { 0 }
47}; 47};
48 48
49static struct zorro_device_id zorro7xx_zorro_tbl[] __devinitdata = { 49static struct zorro_device_id zorro7xx_zorro_tbl[] = {
50 { 50 {
51 .id = ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS, 51 .id = ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS,
52 .driver_data = (unsigned long)&zorro7xx_driver_data[0], 52 .driver_data = (unsigned long)&zorro7xx_driver_data[0],
@@ -71,8 +71,8 @@ static struct zorro_device_id zorro7xx_zorro_tbl[] __devinitdata = {
71}; 71};
72MODULE_DEVICE_TABLE(zorro, zorro7xx_zorro_tbl); 72MODULE_DEVICE_TABLE(zorro, zorro7xx_zorro_tbl);
73 73
74static int __devinit zorro7xx_init_one(struct zorro_dev *z, 74static int zorro7xx_init_one(struct zorro_dev *z,
75 const struct zorro_device_id *ent) 75 const struct zorro_device_id *ent)
76{ 76{
77 struct Scsi_Host *host; 77 struct Scsi_Host *host;
78 struct NCR_700_Host_Parameters *hostdata; 78 struct NCR_700_Host_Parameters *hostdata;
@@ -150,7 +150,7 @@ static int __devinit zorro7xx_init_one(struct zorro_dev *z,
150 return -ENODEV; 150 return -ENODEV;
151} 151}
152 152
153static __devexit void zorro7xx_remove_one(struct zorro_dev *z) 153static void zorro7xx_remove_one(struct zorro_dev *z)
154{ 154{
155 struct Scsi_Host *host = zorro_get_drvdata(z); 155 struct Scsi_Host *host = zorro_get_drvdata(z);
156 struct NCR_700_Host_Parameters *hostdata = shost_priv(host); 156 struct NCR_700_Host_Parameters *hostdata = shost_priv(host);
@@ -167,7 +167,7 @@ static struct zorro_driver zorro7xx_driver = {
167 .name = "zorro7xx-scsi", 167 .name = "zorro7xx-scsi",
168 .id_table = zorro7xx_zorro_tbl, 168 .id_table = zorro7xx_zorro_tbl,
169 .probe = zorro7xx_init_one, 169 .probe = zorro7xx_init_one,
170 .remove = __devexit_p(zorro7xx_remove_one), 170 .remove = zorro7xx_remove_one,
171}; 171};
172 172
173static int __init zorro7xx_scsi_init(void) 173static int __init zorro7xx_scsi_init(void)
diff --git a/drivers/sh/pfc/gpio.c b/drivers/sh/pfc/gpio.c
index 038fa071382a..6a24f07c2013 100644
--- a/drivers/sh/pfc/gpio.c
+++ b/drivers/sh/pfc/gpio.c
@@ -165,7 +165,7 @@ static int sh_pfc_gpio_match(struct gpio_chip *gc, void *data)
165 return !!strstr(gc->label, data); 165 return !!strstr(gc->label, data);
166} 166}
167 167
168static int __devinit sh_pfc_gpio_probe(struct platform_device *pdev) 168static int sh_pfc_gpio_probe(struct platform_device *pdev)
169{ 169{
170 struct sh_pfc_chip *chip; 170 struct sh_pfc_chip *chip;
171 struct gpio_chip *gc; 171 struct gpio_chip *gc;
@@ -184,7 +184,7 @@ static int __devinit sh_pfc_gpio_probe(struct platform_device *pdev)
184 return 0; 184 return 0;
185} 185}
186 186
187static int __devexit sh_pfc_gpio_remove(struct platform_device *pdev) 187static int sh_pfc_gpio_remove(struct platform_device *pdev)
188{ 188{
189 struct sh_pfc_chip *chip = platform_get_drvdata(pdev); 189 struct sh_pfc_chip *chip = platform_get_drvdata(pdev);
190 int ret; 190 int ret;
@@ -199,7 +199,7 @@ static int __devexit sh_pfc_gpio_remove(struct platform_device *pdev)
199 199
200static struct platform_driver sh_pfc_gpio_driver = { 200static struct platform_driver sh_pfc_gpio_driver = {
201 .probe = sh_pfc_gpio_probe, 201 .probe = sh_pfc_gpio_probe,
202 .remove = __devexit_p(sh_pfc_gpio_remove), 202 .remove = sh_pfc_gpio_remove,
203 .driver = { 203 .driver = {
204 .name = KBUILD_MODNAME, 204 .name = KBUILD_MODNAME,
205 .owner = THIS_MODULE, 205 .owner = THIS_MODULE,
diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c
index 0646bf6e7889..4109b769eac0 100644
--- a/drivers/sh/pfc/pinctrl.c
+++ b/drivers/sh/pfc/pinctrl.c
@@ -328,10 +328,10 @@ static struct pinctrl_desc sh_pfc_pinctrl_desc = {
328 .confops = &sh_pfc_pinconf_ops, 328 .confops = &sh_pfc_pinconf_ops,
329}; 329};
330 330
331static inline void __devinit sh_pfc_map_one_gpio(struct sh_pfc *pfc, 331static inline void sh_pfc_map_one_gpio(struct sh_pfc *pfc,
332 struct sh_pfc_pinctrl *pmx, 332 struct sh_pfc_pinctrl *pmx,
333 struct pinmux_gpio *gpio, 333 struct pinmux_gpio *gpio,
334 unsigned offset) 334 unsigned offset)
335{ 335{
336 struct pinmux_data_reg *dummy; 336 struct pinmux_data_reg *dummy;
337 unsigned long flags; 337 unsigned long flags;
@@ -351,8 +351,7 @@ static inline void __devinit sh_pfc_map_one_gpio(struct sh_pfc *pfc,
351} 351}
352 352
353/* pinmux ranges -> pinctrl pin descs */ 353/* pinmux ranges -> pinctrl pin descs */
354static int __devinit sh_pfc_map_gpios(struct sh_pfc *pfc, 354static int sh_pfc_map_gpios(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
355 struct sh_pfc_pinctrl *pmx)
356{ 355{
357 unsigned long flags; 356 unsigned long flags;
358 int i; 357 int i;
@@ -396,8 +395,7 @@ static int __devinit sh_pfc_map_gpios(struct sh_pfc *pfc,
396 return 0; 395 return 0;
397} 396}
398 397
399static int __devinit sh_pfc_map_functions(struct sh_pfc *pfc, 398static int sh_pfc_map_functions(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
400 struct sh_pfc_pinctrl *pmx)
401{ 399{
402 unsigned long flags; 400 unsigned long flags;
403 int i, fn; 401 int i, fn;
@@ -421,7 +419,7 @@ static int __devinit sh_pfc_map_functions(struct sh_pfc *pfc,
421 return 0; 419 return 0;
422} 420}
423 421
424static int __devinit sh_pfc_pinctrl_probe(struct platform_device *pdev) 422static int sh_pfc_pinctrl_probe(struct platform_device *pdev)
425{ 423{
426 struct sh_pfc *pfc; 424 struct sh_pfc *pfc;
427 int ret; 425 int ret;
@@ -465,7 +463,7 @@ free_pads:
465 return ret; 463 return ret;
466} 464}
467 465
468static int __devexit sh_pfc_pinctrl_remove(struct platform_device *pdev) 466static int sh_pfc_pinctrl_remove(struct platform_device *pdev)
469{ 467{
470 struct sh_pfc_pinctrl *pmx = platform_get_drvdata(pdev); 468 struct sh_pfc_pinctrl *pmx = platform_get_drvdata(pdev);
471 469
@@ -482,7 +480,7 @@ static int __devexit sh_pfc_pinctrl_remove(struct platform_device *pdev)
482 480
483static struct platform_driver sh_pfc_pinctrl_driver = { 481static struct platform_driver sh_pfc_pinctrl_driver = {
484 .probe = sh_pfc_pinctrl_probe, 482 .probe = sh_pfc_pinctrl_probe,
485 .remove = __devexit_p(sh_pfc_pinctrl_remove), 483 .remove = sh_pfc_pinctrl_remove,
486 .driver = { 484 .driver = {
487 .name = DRV_NAME, 485 .name = DRV_NAME,
488 .owner = THIS_MODULE, 486 .owner = THIS_MODULE,
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c
index b3b33fa26acd..fb7ea0d9a734 100644
--- a/drivers/sn/ioc3.c
+++ b/drivers/sn/ioc3.c
@@ -575,11 +575,10 @@ void ioc3_unregister_submodule(struct ioc3_submodule *is)
575 * Device management * 575 * Device management *
576 *********************/ 576 *********************/
577 577
578static char * __devinitdata 578static char *ioc3_class_names[] = { "unknown", "IP27 BaseIO", "IP30 system",
579ioc3_class_names[]={"unknown", "IP27 BaseIO", "IP30 system", "MENET 1/2/3", 579 "MENET 1/2/3", "MENET 4", "CADduo", "Altix Serial" };
580 "MENET 4", "CADduo", "Altix Serial"};
581 580
582static int __devinit ioc3_class(struct ioc3_driver_data *idd) 581static int ioc3_class(struct ioc3_driver_data *idd)
583{ 582{
584 int res = IOC3_CLASS_NONE; 583 int res = IOC3_CLASS_NONE;
585 /* NIC-based logic */ 584 /* NIC-based logic */
@@ -602,8 +601,7 @@ static int __devinit ioc3_class(struct ioc3_driver_data *idd)
602 return res; 601 return res;
603} 602}
604/* Adds a new instance of an IOC3 card */ 603/* Adds a new instance of an IOC3 card */
605static int __devinit 604static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
606ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
607{ 605{
608 struct ioc3_driver_data *idd; 606 struct ioc3_driver_data *idd;
609 uint32_t pcmd; 607 uint32_t pcmd;
@@ -755,7 +753,7 @@ out:
755} 753}
756 754
757/* Removes a particular instance of an IOC3 card. */ 755/* Removes a particular instance of an IOC3 card. */
758static void __devexit ioc3_remove(struct pci_dev *pdev) 756static void ioc3_remove(struct pci_dev *pdev)
759{ 757{
760 int id; 758 int id;
761 struct ioc3_driver_data *idd; 759 struct ioc3_driver_data *idd;
@@ -807,7 +805,7 @@ static struct pci_driver ioc3_driver = {
807 .name = "IOC3", 805 .name = "IOC3",
808 .id_table = ioc3_id_table, 806 .id_table = ioc3_id_table,
809 .probe = ioc3_probe, 807 .probe = ioc3_probe,
810 .remove = __devexit_p(ioc3_remove), 808 .remove = ioc3_remove,
811}; 809};
812 810
813MODULE_DEVICE_TABLE(pci, ioc3_id_table); 811MODULE_DEVICE_TABLE(pci, ioc3_id_table);
diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
index ff3c8a21f10d..5d6f2ec1c705 100644
--- a/drivers/ssb/Kconfig
+++ b/drivers/ssb/Kconfig
@@ -162,8 +162,7 @@ config SSB_DRIVER_GIGE
162 162
163config SSB_DRIVER_GPIO 163config SSB_DRIVER_GPIO
164 bool "SSB GPIO driver" 164 bool "SSB GPIO driver"
165 depends on SSB 165 depends on SSB && GPIOLIB
166 select GPIOLIB
167 help 166 help
168 Driver to provide access to the GPIO pins on the bus. 167 Driver to provide access to the GPIO pins on the bus.
169 168
diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c
index f30ea689933a..21f71a1581fa 100644
--- a/drivers/ssb/driver_gige.c
+++ b/drivers/ssb/driver_gige.c
@@ -107,9 +107,8 @@ void gige_pcicfg_write32(struct ssb_gige *dev,
107 gige_write32(dev, SSB_GIGE_PCICFG + offset, value); 107 gige_write32(dev, SSB_GIGE_PCICFG + offset, value);
108} 108}
109 109
110static int __devinit ssb_gige_pci_read_config(struct pci_bus *bus, 110static int ssb_gige_pci_read_config(struct pci_bus *bus, unsigned int devfn,
111 unsigned int devfn, int reg, 111 int reg, int size, u32 *val)
112 int size, u32 *val)
113{ 112{
114 struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); 113 struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops);
115 unsigned long flags; 114 unsigned long flags;
@@ -138,9 +137,8 @@ static int __devinit ssb_gige_pci_read_config(struct pci_bus *bus,
138 return PCIBIOS_SUCCESSFUL; 137 return PCIBIOS_SUCCESSFUL;
139} 138}
140 139
141static int __devinit ssb_gige_pci_write_config(struct pci_bus *bus, 140static int ssb_gige_pci_write_config(struct pci_bus *bus, unsigned int devfn,
142 unsigned int devfn, int reg, 141 int reg, int size, u32 val)
143 int size, u32 val)
144{ 142{
145 struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); 143 struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops);
146 unsigned long flags; 144 unsigned long flags;
@@ -169,8 +167,8 @@ static int __devinit ssb_gige_pci_write_config(struct pci_bus *bus,
169 return PCIBIOS_SUCCESSFUL; 167 return PCIBIOS_SUCCESSFUL;
170} 168}
171 169
172static int __devinit ssb_gige_probe(struct ssb_device *sdev, 170static int ssb_gige_probe(struct ssb_device *sdev,
173 const struct ssb_device_id *id) 171 const struct ssb_device_id *id)
174{ 172{
175 struct ssb_gige *dev; 173 struct ssb_gige *dev;
176 u32 base, tmslow, tmshigh; 174 u32 base, tmslow, tmshigh;
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
index 49d209173f55..59801d23d7ec 100644
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -315,7 +315,7 @@ int ssb_pcicore_pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
315 return ssb_mips_irq(extpci_core->dev) + 2; 315 return ssb_mips_irq(extpci_core->dev) + 2;
316} 316}
317 317
318static void __devinit ssb_pcicore_init_hostmode(struct ssb_pcicore *pc) 318static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc)
319{ 319{
320 u32 val; 320 u32 val;
321 321
@@ -380,7 +380,7 @@ static void __devinit ssb_pcicore_init_hostmode(struct ssb_pcicore *pc)
380 register_pci_controller(&ssb_pcicore_controller); 380 register_pci_controller(&ssb_pcicore_controller);
381} 381}
382 382
383static int __devinit pcicore_is_in_hostmode(struct ssb_pcicore *pc) 383static int pcicore_is_in_hostmode(struct ssb_pcicore *pc)
384{ 384{
385 struct ssb_bus *bus = pc->dev->bus; 385 struct ssb_bus *bus = pc->dev->bus;
386 u16 chipid_top; 386 u16 chipid_top;
@@ -413,7 +413,7 @@ static int __devinit pcicore_is_in_hostmode(struct ssb_pcicore *pc)
413 * Workarounds. 413 * Workarounds.
414 **************************************************/ 414 **************************************************/
415 415
416static void __devinit ssb_pcicore_fix_sprom_core_index(struct ssb_pcicore *pc) 416static void ssb_pcicore_fix_sprom_core_index(struct ssb_pcicore *pc)
417{ 417{
418 u16 tmp = pcicore_read16(pc, SSB_PCICORE_SPROM(0)); 418 u16 tmp = pcicore_read16(pc, SSB_PCICORE_SPROM(0));
419 if (((tmp & 0xF000) >> 12) != pc->dev->core_index) { 419 if (((tmp & 0xF000) >> 12) != pc->dev->core_index) {
@@ -515,7 +515,7 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc)
515 * Generic and Clientmode operation code. 515 * Generic and Clientmode operation code.
516 **************************************************/ 516 **************************************************/
517 517
518static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) 518static void ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
519{ 519{
520 struct ssb_device *pdev = pc->dev; 520 struct ssb_device *pdev = pc->dev;
521 struct ssb_bus *bus = pdev->bus; 521 struct ssb_bus *bus = pdev->bus;
@@ -534,7 +534,7 @@ static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
534 } 534 }
535} 535}
536 536
537void __devinit ssb_pcicore_init(struct ssb_pcicore *pc) 537void ssb_pcicore_init(struct ssb_pcicore *pc)
538{ 538{
539 struct ssb_device *dev = pc->dev; 539 struct ssb_device *dev = pc->dev;
540 540
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index c82c5c95fe85..772ad9b5c304 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -548,7 +548,7 @@ error:
548} 548}
549 549
550/* Needs ssb_buses_lock() */ 550/* Needs ssb_buses_lock() */
551static int __devinit ssb_attach_queued_buses(void) 551static int ssb_attach_queued_buses(void)
552{ 552{
553 struct ssb_bus *bus, *n; 553 struct ssb_bus *bus, *n;
554 int err = 0; 554 int err = 0;
@@ -761,9 +761,9 @@ out:
761 return err; 761 return err;
762} 762}
763 763
764static int __devinit ssb_bus_register(struct ssb_bus *bus, 764static int ssb_bus_register(struct ssb_bus *bus,
765 ssb_invariants_func_t get_invariants, 765 ssb_invariants_func_t get_invariants,
766 unsigned long baseaddr) 766 unsigned long baseaddr)
767{ 767{
768 int err; 768 int err;
769 769
@@ -851,8 +851,7 @@ err_disable_xtal:
851} 851}
852 852
853#ifdef CONFIG_SSB_PCIHOST 853#ifdef CONFIG_SSB_PCIHOST
854int __devinit ssb_bus_pcibus_register(struct ssb_bus *bus, 854int ssb_bus_pcibus_register(struct ssb_bus *bus, struct pci_dev *host_pci)
855 struct pci_dev *host_pci)
856{ 855{
857 int err; 856 int err;
858 857
@@ -875,9 +874,9 @@ EXPORT_SYMBOL(ssb_bus_pcibus_register);
875#endif /* CONFIG_SSB_PCIHOST */ 874#endif /* CONFIG_SSB_PCIHOST */
876 875
877#ifdef CONFIG_SSB_PCMCIAHOST 876#ifdef CONFIG_SSB_PCMCIAHOST
878int __devinit ssb_bus_pcmciabus_register(struct ssb_bus *bus, 877int ssb_bus_pcmciabus_register(struct ssb_bus *bus,
879 struct pcmcia_device *pcmcia_dev, 878 struct pcmcia_device *pcmcia_dev,
880 unsigned long baseaddr) 879 unsigned long baseaddr)
881{ 880{
882 int err; 881 int err;
883 882
@@ -897,9 +896,8 @@ EXPORT_SYMBOL(ssb_bus_pcmciabus_register);
897#endif /* CONFIG_SSB_PCMCIAHOST */ 896#endif /* CONFIG_SSB_PCMCIAHOST */
898 897
899#ifdef CONFIG_SSB_SDIOHOST 898#ifdef CONFIG_SSB_SDIOHOST
900int __devinit ssb_bus_sdiobus_register(struct ssb_bus *bus, 899int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func,
901 struct sdio_func *func, 900 unsigned int quirks)
902 unsigned int quirks)
903{ 901{
904 int err; 902 int err;
905 903
@@ -919,9 +917,8 @@ int __devinit ssb_bus_sdiobus_register(struct ssb_bus *bus,
919EXPORT_SYMBOL(ssb_bus_sdiobus_register); 917EXPORT_SYMBOL(ssb_bus_sdiobus_register);
920#endif /* CONFIG_SSB_PCMCIAHOST */ 918#endif /* CONFIG_SSB_PCMCIAHOST */
921 919
922int __devinit ssb_bus_ssbbus_register(struct ssb_bus *bus, 920int ssb_bus_ssbbus_register(struct ssb_bus *bus, unsigned long baseaddr,
923 unsigned long baseaddr, 921 ssb_invariants_func_t get_invariants)
924 ssb_invariants_func_t get_invariants)
925{ 922{
926 int err; 923 int err;
927 924
diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c
index af5448f5e2d2..32ed1fa4a82e 100644
--- a/drivers/ssb/pcihost_wrapper.c
+++ b/drivers/ssb/pcihost_wrapper.c
@@ -54,8 +54,8 @@ static int ssb_pcihost_resume(struct pci_dev *dev)
54# define ssb_pcihost_resume NULL 54# define ssb_pcihost_resume NULL
55#endif /* CONFIG_PM */ 55#endif /* CONFIG_PM */
56 56
57static int __devinit ssb_pcihost_probe(struct pci_dev *dev, 57static int ssb_pcihost_probe(struct pci_dev *dev,
58 const struct pci_device_id *id) 58 const struct pci_device_id *id)
59{ 59{
60 struct ssb_bus *ssb; 60 struct ssb_bus *ssb;
61 int err = -ENOMEM; 61 int err = -ENOMEM;
@@ -111,7 +111,7 @@ static void ssb_pcihost_remove(struct pci_dev *dev)
111 pci_set_drvdata(dev, NULL); 111 pci_set_drvdata(dev, NULL);
112} 112}
113 113
114int __devinit ssb_pcihost_register(struct pci_driver *driver) 114int ssb_pcihost_register(struct pci_driver *driver)
115{ 115{
116 driver->probe = ssb_pcihost_probe; 116 driver->probe = ssb_pcihost_probe;
117 driver->remove = ssb_pcihost_remove; 117 driver->remove = ssb_pcihost_remove;
diff --git a/drivers/staging/omapdrm/omap_gem_dmabuf.c b/drivers/staging/omapdrm/omap_gem_dmabuf.c
index 9a302062b031..ea3840038250 100644
--- a/drivers/staging/omapdrm/omap_gem_dmabuf.c
+++ b/drivers/staging/omapdrm/omap_gem_dmabuf.c
@@ -207,7 +207,12 @@ struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev,
207 obj = buffer->priv; 207 obj = buffer->priv;
208 /* is it from our device? */ 208 /* is it from our device? */
209 if (obj->dev == dev) { 209 if (obj->dev == dev) {
210 /*
211 * Importing dmabuf exported from out own gem increases
212 * refcount on gem itself instead of f_count of dmabuf.
213 */
210 drm_gem_object_reference(obj); 214 drm_gem_object_reference(obj);
215 dma_buf_put(buffer);
211 return obj; 216 return obj;
212 } 217 }
213 } 218 }
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
index 7772d1603769..224751e9f5ff 100644
--- a/drivers/thermal/exynos_thermal.c
+++ b/drivers/thermal/exynos_thermal.c
@@ -832,7 +832,7 @@ static inline struct exynos_tmu_platform_data *exynos_get_driver_data(
832 return (struct exynos_tmu_platform_data *) 832 return (struct exynos_tmu_platform_data *)
833 platform_get_device_id(pdev)->driver_data; 833 platform_get_device_id(pdev)->driver_data;
834} 834}
835static int __devinit exynos_tmu_probe(struct platform_device *pdev) 835static int exynos_tmu_probe(struct platform_device *pdev)
836{ 836{
837 struct exynos_tmu_data *data; 837 struct exynos_tmu_data *data;
838 struct exynos_tmu_platform_data *pdata = pdev->dev.platform_data; 838 struct exynos_tmu_platform_data *pdata = pdev->dev.platform_data;
@@ -937,7 +937,7 @@ err_clk:
937 return ret; 937 return ret;
938} 938}
939 939
940static int __devexit exynos_tmu_remove(struct platform_device *pdev) 940static int exynos_tmu_remove(struct platform_device *pdev)
941{ 941{
942 struct exynos_tmu_data *data = platform_get_drvdata(pdev); 942 struct exynos_tmu_data *data = platform_get_drvdata(pdev);
943 943
@@ -985,7 +985,7 @@ static struct platform_driver exynos_tmu_driver = {
985 .of_match_table = exynos_tmu_match, 985 .of_match_table = exynos_tmu_match,
986 }, 986 },
987 .probe = exynos_tmu_probe, 987 .probe = exynos_tmu_probe,
988 .remove = __devexit_p(exynos_tmu_remove), 988 .remove = exynos_tmu_remove,
989 .id_table = exynos_tmu_driver_ids, 989 .id_table = exynos_tmu_driver_ids,
990}; 990};
991 991
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index a7d1f5b4c4ed..914a3ecfb5d3 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -325,7 +325,7 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev)
325 325
326MODULE_ALIAS("platform:orion-ehci"); 326MODULE_ALIAS("platform:orion-ehci");
327 327
328static const struct of_device_id ehci_orion_dt_ids[] __devinitdata = { 328static const struct of_device_id ehci_orion_dt_ids[] = {
329 { .compatible = "marvell,orion-ehci", }, 329 { .compatible = "marvell,orion-ehci", },
330 {}, 330 {},
331}; 331};
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index b303f1715065..6488a7351a60 100644
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -66,7 +66,7 @@
66 * have. Allow 1% either way on the nominal for TVs. 66 * have. Allow 1% either way on the nominal for TVs.
67 */ 67 */
68#define NR_MONTYPES 6 68#define NR_MONTYPES 6
69static struct fb_monspecs monspecs[NR_MONTYPES] __devinitdata = { 69static struct fb_monspecs monspecs[NR_MONTYPES] = {
70 { /* TV */ 70 { /* TV */
71 .hfmin = 15469, 71 .hfmin = 15469,
72 .hfmax = 15781, 72 .hfmax = 15781,
@@ -874,7 +874,7 @@ static struct fb_ops acornfb_ops = {
874/* 874/*
875 * Everything after here is initialisation!!! 875 * Everything after here is initialisation!!!
876 */ 876 */
877static struct fb_videomode modedb[] __devinitdata = { 877static struct fb_videomode modedb[] = {
878 { /* 320x256 @ 50Hz */ 878 { /* 320x256 @ 50Hz */
879 NULL, 50, 320, 256, 125000, 92, 62, 35, 19, 38, 2, 879 NULL, 50, 320, 256, 125000, 92, 62, 35, 19, 38, 2,
880 FB_SYNC_COMP_HIGH_ACT, 880 FB_SYNC_COMP_HIGH_ACT,
@@ -926,7 +926,7 @@ static struct fb_videomode modedb[] __devinitdata = {
926 } 926 }
927}; 927};
928 928
929static struct fb_videomode acornfb_default_mode __devinitdata = { 929static struct fb_videomode acornfb_default_mode = {
930 .name = NULL, 930 .name = NULL,
931 .refresh = 60, 931 .refresh = 60,
932 .xres = 640, 932 .xres = 640,
@@ -942,7 +942,7 @@ static struct fb_videomode acornfb_default_mode __devinitdata = {
942 .vmode = FB_VMODE_NONINTERLACED 942 .vmode = FB_VMODE_NONINTERLACED
943}; 943};
944 944
945static void __devinit acornfb_init_fbinfo(void) 945static void acornfb_init_fbinfo(void)
946{ 946{
947 static int first = 1; 947 static int first = 1;
948 948
@@ -1018,7 +1018,7 @@ static void __devinit acornfb_init_fbinfo(void)
1018 * size can optionally be followed by 'M' or 'K' for 1018 * size can optionally be followed by 'M' or 'K' for
1019 * MB or KB respectively. 1019 * MB or KB respectively.
1020 */ 1020 */
1021static void __devinit acornfb_parse_mon(char *opt) 1021static void acornfb_parse_mon(char *opt)
1022{ 1022{
1023 char *p = opt; 1023 char *p = opt;
1024 1024
@@ -1065,7 +1065,7 @@ bad:
1065 current_par.montype = -1; 1065 current_par.montype = -1;
1066} 1066}
1067 1067
1068static void __devinit acornfb_parse_montype(char *opt) 1068static void acornfb_parse_montype(char *opt)
1069{ 1069{
1070 current_par.montype = -2; 1070 current_par.montype = -2;
1071 1071
@@ -1106,7 +1106,7 @@ static void __devinit acornfb_parse_montype(char *opt)
1106 } 1106 }
1107} 1107}
1108 1108
1109static void __devinit acornfb_parse_dram(char *opt) 1109static void acornfb_parse_dram(char *opt)
1110{ 1110{
1111 unsigned int size; 1111 unsigned int size;
1112 1112
@@ -1131,14 +1131,14 @@ static void __devinit acornfb_parse_dram(char *opt)
1131static struct options { 1131static struct options {
1132 char *name; 1132 char *name;
1133 void (*parse)(char *opt); 1133 void (*parse)(char *opt);
1134} opt_table[] __devinitdata = { 1134} opt_table[] = {
1135 { "mon", acornfb_parse_mon }, 1135 { "mon", acornfb_parse_mon },
1136 { "montype", acornfb_parse_montype }, 1136 { "montype", acornfb_parse_montype },
1137 { "dram", acornfb_parse_dram }, 1137 { "dram", acornfb_parse_dram },
1138 { NULL, NULL } 1138 { NULL, NULL }
1139}; 1139};
1140 1140
1141static int __devinit acornfb_setup(char *options) 1141static int acornfb_setup(char *options)
1142{ 1142{
1143 struct options *optp; 1143 struct options *optp;
1144 char *opt; 1144 char *opt;
@@ -1175,7 +1175,7 @@ static int __devinit acornfb_setup(char *options)
1175 * Detect type of monitor connected 1175 * Detect type of monitor connected
1176 * For now, we just assume SVGA 1176 * For now, we just assume SVGA
1177 */ 1177 */
1178static int __devinit acornfb_detect_monitortype(void) 1178static int acornfb_detect_monitortype(void)
1179{ 1179{
1180 return 4; 1180 return 4;
1181} 1181}
@@ -1216,7 +1216,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end)
1216 printk("acornfb: freed %dK memory\n", mb_freed); 1216 printk("acornfb: freed %dK memory\n", mb_freed);
1217} 1217}
1218 1218
1219static int __devinit acornfb_probe(struct platform_device *dev) 1219static int acornfb_probe(struct platform_device *dev)
1220{ 1220{
1221 unsigned long size; 1221 unsigned long size;
1222 u_int h_sync, v_sync; 1222 u_int h_sync, v_sync;
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index 4659d5da6ff8..e43401afdd03 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -79,7 +79,7 @@ struct arcfb_par {
79 spinlock_t lock; 79 spinlock_t lock;
80}; 80};
81 81
82static struct fb_fix_screeninfo arcfb_fix __devinitdata = { 82static struct fb_fix_screeninfo arcfb_fix = {
83 .id = "arcfb", 83 .id = "arcfb",
84 .type = FB_TYPE_PACKED_PIXELS, 84 .type = FB_TYPE_PACKED_PIXELS,
85 .visual = FB_VISUAL_MONO01, 85 .visual = FB_VISUAL_MONO01,
@@ -89,7 +89,7 @@ static struct fb_fix_screeninfo arcfb_fix __devinitdata = {
89 .accel = FB_ACCEL_NONE, 89 .accel = FB_ACCEL_NONE,
90}; 90};
91 91
92static struct fb_var_screeninfo arcfb_var __devinitdata = { 92static struct fb_var_screeninfo arcfb_var = {
93 .xres = 128, 93 .xres = 128,
94 .yres = 64, 94 .yres = 64,
95 .xres_virtual = 128, 95 .xres_virtual = 128,
@@ -502,7 +502,7 @@ static struct fb_ops arcfb_ops = {
502 .fb_ioctl = arcfb_ioctl, 502 .fb_ioctl = arcfb_ioctl,
503}; 503};
504 504
505static int __devinit arcfb_probe(struct platform_device *dev) 505static int arcfb_probe(struct platform_device *dev)
506{ 506{
507 struct fb_info *info; 507 struct fb_info *info;
508 int retval = -ENOMEM; 508 int retval = -ENOMEM;
@@ -587,7 +587,7 @@ err:
587 return retval; 587 return retval;
588} 588}
589 589
590static int __devexit arcfb_remove(struct platform_device *dev) 590static int arcfb_remove(struct platform_device *dev)
591{ 591{
592 struct fb_info *info = platform_get_drvdata(dev); 592 struct fb_info *info = platform_get_drvdata(dev);
593 593
@@ -601,7 +601,7 @@ static int __devexit arcfb_remove(struct platform_device *dev)
601 601
602static struct platform_driver arcfb_driver = { 602static struct platform_driver arcfb_driver = {
603 .probe = arcfb_probe, 603 .probe = arcfb_probe,
604 .remove = __devexit_p(arcfb_remove), 604 .remove = arcfb_remove,
605 .driver = { 605 .driver = {
606 .name = "arcfb", 606 .name = "arcfb",
607 }, 607 },
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c
index 555dd4c64f5b..94a51f1ef904 100644
--- a/drivers/video/arkfb.c
+++ b/drivers/video/arkfb.c
@@ -100,7 +100,7 @@ static const struct svga_timing_regs ark_timing_regs = {
100 100
101/* Module parameters */ 101/* Module parameters */
102 102
103static char *mode_option __devinitdata = "640x480-8@60"; 103static char *mode_option = "640x480-8@60";
104 104
105#ifdef CONFIG_MTRR 105#ifdef CONFIG_MTRR
106static int mtrr = 1; 106static int mtrr = 1;
@@ -950,7 +950,7 @@ static struct fb_ops arkfb_ops = {
950 950
951 951
952/* PCI probe */ 952/* PCI probe */
953static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) 953static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
954{ 954{
955 struct pci_bus_region bus_reg; 955 struct pci_bus_region bus_reg;
956 struct resource vga_res; 956 struct resource vga_res;
@@ -1086,7 +1086,7 @@ err_enable_device:
1086 1086
1087/* PCI remove */ 1087/* PCI remove */
1088 1088
1089static void __devexit ark_pci_remove(struct pci_dev *dev) 1089static void ark_pci_remove(struct pci_dev *dev)
1090{ 1090{
1091 struct fb_info *info = pci_get_drvdata(dev); 1091 struct fb_info *info = pci_get_drvdata(dev);
1092 1092
@@ -1184,7 +1184,7 @@ fail:
1184 1184
1185/* List of boards that we are trying to support */ 1185/* List of boards that we are trying to support */
1186 1186
1187static struct pci_device_id ark_devices[] __devinitdata = { 1187static struct pci_device_id ark_devices[] = {
1188 {PCI_DEVICE(0xEDD8, 0xA099)}, 1188 {PCI_DEVICE(0xEDD8, 0xA099)},
1189 {0, 0, 0, 0, 0, 0, 0} 1189 {0, 0, 0, 0, 0, 0, 0}
1190}; 1190};
@@ -1196,7 +1196,7 @@ static struct pci_driver arkfb_pci_driver = {
1196 .name = "arkfb", 1196 .name = "arkfb",
1197 .id_table = ark_devices, 1197 .id_table = ark_devices,
1198 .probe = ark_pci_probe, 1198 .probe = ark_pci_probe,
1199 .remove = __devexit_p(ark_pci_remove), 1199 .remove = ark_pci_remove,
1200 .suspend = ark_pci_suspend, 1200 .suspend = ark_pci_suspend,
1201 .resume = ark_pci_resume, 1201 .resume = ark_pci_resume,
1202}; 1202};
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c
index 8cdf88e20b4b..d5a37d62847b 100644
--- a/drivers/video/asiliantfb.c
+++ b/drivers/video/asiliantfb.c
@@ -451,7 +451,7 @@ static struct chips_init_reg chips_init_xr[] =
451 {0xd1, 0x01}, 451 {0xd1, 0x01},
452}; 452};
453 453
454static void __devinit chips_hw_init(struct fb_info *p) 454static void chips_hw_init(struct fb_info *p)
455{ 455{
456 int i; 456 int i;
457 457
@@ -474,7 +474,7 @@ static void __devinit chips_hw_init(struct fb_info *p)
474 write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); 474 write_fr(chips_init_fr[i].addr, chips_init_fr[i].data);
475} 475}
476 476
477static struct fb_fix_screeninfo asiliantfb_fix __devinitdata = { 477static struct fb_fix_screeninfo asiliantfb_fix = {
478 .id = "Asiliant 69000", 478 .id = "Asiliant 69000",
479 .type = FB_TYPE_PACKED_PIXELS, 479 .type = FB_TYPE_PACKED_PIXELS,
480 .visual = FB_VISUAL_PSEUDOCOLOR, 480 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -483,7 +483,7 @@ static struct fb_fix_screeninfo asiliantfb_fix __devinitdata = {
483 .smem_len = 0x200000, /* 2MB */ 483 .smem_len = 0x200000, /* 2MB */
484}; 484};
485 485
486static struct fb_var_screeninfo asiliantfb_var __devinitdata = { 486static struct fb_var_screeninfo asiliantfb_var = {
487 .xres = 640, 487 .xres = 640,
488 .yres = 480, 488 .yres = 480,
489 .xres_virtual = 640, 489 .xres_virtual = 640,
@@ -504,7 +504,7 @@ static struct fb_var_screeninfo asiliantfb_var __devinitdata = {
504 .vsync_len = 2, 504 .vsync_len = 2,
505}; 505};
506 506
507static int __devinit init_asiliant(struct fb_info *p, unsigned long addr) 507static int init_asiliant(struct fb_info *p, unsigned long addr)
508{ 508{
509 int err; 509 int err;
510 510
@@ -535,8 +535,8 @@ static int __devinit init_asiliant(struct fb_info *p, unsigned long addr)
535 return 0; 535 return 0;
536} 536}
537 537
538static int __devinit 538static int asiliantfb_pci_init(struct pci_dev *dp,
539asiliantfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) 539 const struct pci_device_id *ent)
540{ 540{
541 unsigned long addr, size; 541 unsigned long addr, size;
542 struct fb_info *p; 542 struct fb_info *p;
@@ -581,7 +581,7 @@ asiliantfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
581 return 0; 581 return 0;
582} 582}
583 583
584static void __devexit asiliantfb_remove(struct pci_dev *dp) 584static void asiliantfb_remove(struct pci_dev *dp)
585{ 585{
586 struct fb_info *p = pci_get_drvdata(dp); 586 struct fb_info *p = pci_get_drvdata(dp);
587 587
@@ -593,7 +593,7 @@ static void __devexit asiliantfb_remove(struct pci_dev *dp)
593 framebuffer_release(p); 593 framebuffer_release(p);
594} 594}
595 595
596static struct pci_device_id asiliantfb_pci_tbl[] __devinitdata = { 596static struct pci_device_id asiliantfb_pci_tbl[] = {
597 { PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID }, 597 { PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID },
598 { 0 } 598 { 0 }
599}; 599};
@@ -604,7 +604,7 @@ static struct pci_driver asiliantfb_driver = {
604 .name = "asiliantfb", 604 .name = "asiliantfb",
605 .id_table = asiliantfb_pci_tbl, 605 .id_table = asiliantfb_pci_tbl,
606 .probe = asiliantfb_pci_init, 606 .probe = asiliantfb_pci_init,
607 .remove = __devexit_p(asiliantfb_remove), 607 .remove = asiliantfb_remove,
608}; 608};
609 609
610static int __init asiliantfb_init(void) 610static int __init asiliantfb_init(void)
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index 0fefa84ed9ae..8c55011313dc 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -98,7 +98,7 @@
98 98
99#ifndef CONFIG_PPC_PMAC 99#ifndef CONFIG_PPC_PMAC
100/* default mode */ 100/* default mode */
101static struct fb_var_screeninfo default_var __devinitdata = { 101static struct fb_var_screeninfo default_var = {
102 /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ 102 /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */
103 640, 480, 640, 480, 0, 0, 8, 0, 103 640, 480, 640, 480, 0, 0, 8, 0,
104 {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, 104 {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
@@ -121,7 +121,7 @@ static struct fb_var_screeninfo default_var = {
121 121
122/* default modedb mode */ 122/* default modedb mode */
123/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ 123/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
124static struct fb_videomode defaultmode __devinitdata = { 124static struct fb_videomode defaultmode = {
125 .refresh = 60, 125 .refresh = 60,
126 .xres = 640, 126 .xres = 640,
127 .yres = 480, 127 .yres = 480,
@@ -149,7 +149,7 @@ enum {
149}; 149};
150 150
151/* Must match above enum */ 151/* Must match above enum */
152static char * const r128_family[] __devinitconst = { 152static char * const r128_family[] = {
153 "AGP", 153 "AGP",
154 "PCI", 154 "PCI",
155 "PRO AGP", 155 "PRO AGP",
@@ -275,7 +275,7 @@ static struct pci_driver aty128fb_driver = {
275 .name = "aty128fb", 275 .name = "aty128fb",
276 .id_table = aty128_pci_tbl, 276 .id_table = aty128_pci_tbl,
277 .probe = aty128_probe, 277 .probe = aty128_probe,
278 .remove = __devexit_p(aty128_remove), 278 .remove = aty128_remove,
279 .suspend = aty128_pci_suspend, 279 .suspend = aty128_pci_suspend,
280 .resume = aty128_pci_resume, 280 .resume = aty128_pci_resume,
281}; 281};
@@ -333,7 +333,7 @@ static const struct aty128_meminfo sdr_sgram =
333static const struct aty128_meminfo ddr_sgram = 333static const struct aty128_meminfo ddr_sgram =
334 { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" }; 334 { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" };
335 335
336static struct fb_fix_screeninfo aty128fb_fix __devinitdata = { 336static struct fb_fix_screeninfo aty128fb_fix = {
337 .id = "ATY Rage128", 337 .id = "ATY Rage128",
338 .type = FB_TYPE_PACKED_PIXELS, 338 .type = FB_TYPE_PACKED_PIXELS,
339 .visual = FB_VISUAL_PSEUDOCOLOR, 339 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -343,24 +343,24 @@ static struct fb_fix_screeninfo aty128fb_fix __devinitdata = {
343 .accel = FB_ACCEL_ATI_RAGE128, 343 .accel = FB_ACCEL_ATI_RAGE128,
344}; 344};
345 345
346static char *mode_option __devinitdata = NULL; 346static char *mode_option = NULL;
347 347
348#ifdef CONFIG_PPC_PMAC 348#ifdef CONFIG_PPC_PMAC
349static int default_vmode __devinitdata = VMODE_1024_768_60; 349static int default_vmode = VMODE_1024_768_60;
350static int default_cmode __devinitdata = CMODE_8; 350static int default_cmode = CMODE_8;
351#endif 351#endif
352 352
353static int default_crt_on __devinitdata = 0; 353static int default_crt_on = 0;
354static int default_lcd_on __devinitdata = 1; 354static int default_lcd_on = 1;
355 355
356#ifdef CONFIG_MTRR 356#ifdef CONFIG_MTRR
357static bool mtrr = true; 357static bool mtrr = true;
358#endif 358#endif
359 359
360#ifdef CONFIG_PMAC_BACKLIGHT 360#ifdef CONFIG_PMAC_BACKLIGHT
361static int backlight __devinitdata = 1; 361static int backlight = 1;
362#else 362#else
363static int backlight __devinitdata = 0; 363static int backlight = 0;
364#endif 364#endif
365 365
366/* PLL constants */ 366/* PLL constants */
@@ -449,10 +449,9 @@ static int aty128_encode_var(struct fb_var_screeninfo *var,
449static int aty128_decode_var(struct fb_var_screeninfo *var, 449static int aty128_decode_var(struct fb_var_screeninfo *var,
450 struct aty128fb_par *par); 450 struct aty128fb_par *par);
451#if 0 451#if 0
452static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, 452static void aty128_get_pllinfo(struct aty128fb_par *par, void __iomem *bios);
453 void __iomem *bios); 453static void __iomem *aty128_map_ROM(struct pci_dev *pdev,
454static void __devinit __iomem *aty128_map_ROM(struct pci_dev *pdev, 454 const struct aty128fb_par *par);
455 const struct aty128fb_par *par);
456#endif 455#endif
457static void aty128_timings(struct aty128fb_par *par); 456static void aty128_timings(struct aty128fb_par *par);
458static void aty128_init_engine(struct aty128fb_par *par); 457static void aty128_init_engine(struct aty128fb_par *par);
@@ -582,7 +581,7 @@ static void aty_pll_writeupdate(const struct aty128fb_par *par)
582 581
583 582
584/* write to the scratch register to test r/w functionality */ 583/* write to the scratch register to test r/w functionality */
585static int __devinit register_test(const struct aty128fb_par *par) 584static int register_test(const struct aty128fb_par *par)
586{ 585{
587 u32 val; 586 u32 val;
588 int flag = 0; 587 int flag = 0;
@@ -781,8 +780,8 @@ static u32 depth_to_dst(u32 depth)
781 780
782 781
783#ifndef __sparc__ 782#ifndef __sparc__
784static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, 783static void __iomem *aty128_map_ROM(const struct aty128fb_par *par,
785 struct pci_dev *dev) 784 struct pci_dev *dev)
786{ 785{
787 u16 dptr; 786 u16 dptr;
788 u8 rom_type; 787 u8 rom_type;
@@ -868,8 +867,8 @@ static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par,
868 return NULL; 867 return NULL;
869} 868}
870 869
871static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, 870static void aty128_get_pllinfo(struct aty128fb_par *par,
872 unsigned char __iomem *bios) 871 unsigned char __iomem *bios)
873{ 872{
874 unsigned int bios_hdr; 873 unsigned int bios_hdr;
875 unsigned int bios_pll; 874 unsigned int bios_pll;
@@ -891,7 +890,7 @@ static void __devinit aty128_get_pllinfo(struct aty128fb_par *par,
891} 890}
892 891
893#ifdef CONFIG_X86 892#ifdef CONFIG_X86
894static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) 893static void __iomem *aty128_find_mem_vbios(struct aty128fb_par *par)
895{ 894{
896 /* I simplified this code as we used to miss the signatures in 895 /* I simplified this code as we used to miss the signatures in
897 * a lot of case. It's now closer to XFree, we just don't check 896 * a lot of case. It's now closer to XFree, we just don't check
@@ -916,7 +915,7 @@ static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par)
916#endif /* ndef(__sparc__) */ 915#endif /* ndef(__sparc__) */
917 916
918/* fill in known card constants if pll_block is not available */ 917/* fill in known card constants if pll_block is not available */
919static void __devinit aty128_timings(struct aty128fb_par *par) 918static void aty128_timings(struct aty128fb_par *par)
920{ 919{
921#ifdef CONFIG_PPC_OF 920#ifdef CONFIG_PPC_OF
922 /* instead of a table lookup, assume OF has properly 921 /* instead of a table lookup, assume OF has properly
@@ -1658,7 +1657,7 @@ static int aty128fb_sync(struct fb_info *info)
1658} 1657}
1659 1658
1660#ifndef MODULE 1659#ifndef MODULE
1661static int __devinit aty128fb_setup(char *options) 1660static int aty128fb_setup(char *options)
1662{ 1661{
1663 char *this_opt; 1662 char *this_opt;
1664 1663
@@ -1888,8 +1887,7 @@ static void aty128_early_resume(void *data)
1888} 1887}
1889#endif /* CONFIG_PPC_PMAC */ 1888#endif /* CONFIG_PPC_PMAC */
1890 1889
1891static int __devinit aty128_init(struct pci_dev *pdev, 1890static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)
1892 const struct pci_device_id *ent)
1893{ 1891{
1894 struct fb_info *info = pci_get_drvdata(pdev); 1892 struct fb_info *info = pci_get_drvdata(pdev);
1895 struct aty128fb_par *par = info->par; 1893 struct aty128fb_par *par = info->par;
@@ -2039,8 +2037,7 @@ static int __devinit aty128_init(struct pci_dev *pdev,
2039 2037
2040#ifdef CONFIG_PCI 2038#ifdef CONFIG_PCI
2041/* register a card ++ajoshi */ 2039/* register a card ++ajoshi */
2042static int __devinit aty128_probe(struct pci_dev *pdev, 2040static int aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2043 const struct pci_device_id *ent)
2044{ 2041{
2045 unsigned long fb_addr, reg_addr; 2042 unsigned long fb_addr, reg_addr;
2046 struct aty128fb_par *par; 2043 struct aty128fb_par *par;
@@ -2156,7 +2153,7 @@ err_free_fb:
2156 return -ENODEV; 2153 return -ENODEV;
2157} 2154}
2158 2155
2159static void __devexit aty128_remove(struct pci_dev *pdev) 2156static void aty128_remove(struct pci_dev *pdev)
2160{ 2157{
2161 struct fb_info *info = pci_get_drvdata(pdev); 2158 struct fb_info *info = pci_get_drvdata(pdev);
2162 struct aty128fb_par *par; 2159 struct aty128fb_par *par;
@@ -2558,7 +2555,7 @@ static int aty128_pci_resume(struct pci_dev *pdev)
2558} 2555}
2559 2556
2560 2557
2561static int __devinit aty128fb_init(void) 2558static int aty128fb_init(void)
2562{ 2559{
2563#ifndef MODULE 2560#ifndef MODULE
2564 char *option = NULL; 2561 char *option = NULL;
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 868932f904ef..4f27fdc58d84 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -214,7 +214,7 @@ struct pci_mmap_map {
214 unsigned long prot_mask; 214 unsigned long prot_mask;
215}; 215};
216 216
217static struct fb_fix_screeninfo atyfb_fix __devinitdata = { 217static struct fb_fix_screeninfo atyfb_fix = {
218 .id = "ATY Mach64", 218 .id = "ATY Mach64",
219 .type = FB_TYPE_PACKED_PIXELS, 219 .type = FB_TYPE_PACKED_PIXELS,
220 .visual = FB_VISUAL_PSEUDOCOLOR, 220 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -309,18 +309,18 @@ static int vram;
309static int pll; 309static int pll;
310static int mclk; 310static int mclk;
311static int xclk; 311static int xclk;
312static int comp_sync __devinitdata = -1; 312static int comp_sync = -1;
313static char *mode; 313static char *mode;
314 314
315#ifdef CONFIG_PMAC_BACKLIGHT 315#ifdef CONFIG_PMAC_BACKLIGHT
316static int backlight __devinitdata = 1; 316static int backlight = 1;
317#else 317#else
318static int backlight __devinitdata = 0; 318static int backlight = 0;
319#endif 319#endif
320 320
321#ifdef CONFIG_PPC 321#ifdef CONFIG_PPC
322static int default_vmode __devinitdata = VMODE_CHOOSE; 322static int default_vmode = VMODE_CHOOSE;
323static int default_cmode __devinitdata = CMODE_CHOOSE; 323static int default_cmode = CMODE_CHOOSE;
324 324
325module_param_named(vmode, default_vmode, int, 0); 325module_param_named(vmode, default_vmode, int, 0);
326MODULE_PARM_DESC(vmode, "int: video mode for mac"); 326MODULE_PARM_DESC(vmode, "int: video mode for mac");
@@ -329,10 +329,10 @@ MODULE_PARM_DESC(cmode, "int: color mode for mac");
329#endif 329#endif
330 330
331#ifdef CONFIG_ATARI 331#ifdef CONFIG_ATARI
332static unsigned int mach64_count __devinitdata = 0; 332static unsigned int mach64_count = 0;
333static unsigned long phys_vmembase[FB_MAX] __devinitdata = { 0, }; 333static unsigned long phys_vmembase[FB_MAX] = { 0, };
334static unsigned long phys_size[FB_MAX] __devinitdata = { 0, }; 334static unsigned long phys_size[FB_MAX] = { 0, };
335static unsigned long phys_guiregbase[FB_MAX] __devinitdata = { 0, }; 335static unsigned long phys_guiregbase[FB_MAX] = { 0, };
336#endif 336#endif
337 337
338/* top -> down is an evolution of mach64 chipset, any corrections? */ 338/* top -> down is an evolution of mach64 chipset, any corrections? */
@@ -371,7 +371,7 @@ static struct {
371 const char *name; 371 const char *name;
372 int pll, mclk, xclk, ecp_max; 372 int pll, mclk, xclk, ecp_max;
373 u32 features; 373 u32 features;
374} aty_chips[] __devinitdata = { 374} aty_chips[] = {
375#ifdef CONFIG_FB_ATY_GX 375#ifdef CONFIG_FB_ATY_GX
376 /* Mach64 GX */ 376 /* Mach64 GX */
377 { PCI_CHIP_MACH64GX, "ATI888GX00 (Mach64 GX)", 135, 50, 50, 0, ATI_CHIP_88800GX }, 377 { PCI_CHIP_MACH64GX, "ATI888GX00 (Mach64 GX)", 135, 50, 50, 0, ATI_CHIP_88800GX },
@@ -426,7 +426,7 @@ static struct {
426#endif /* CONFIG_FB_ATY_CT */ 426#endif /* CONFIG_FB_ATY_CT */
427}; 427};
428 428
429static int __devinit correct_chipset(struct atyfb_par *par) 429static int correct_chipset(struct atyfb_par *par)
430{ 430{
431 u8 rev; 431 u8 rev;
432 u16 type; 432 u16 type;
@@ -531,34 +531,34 @@ static int __devinit correct_chipset(struct atyfb_par *par)
531 return 0; 531 return 0;
532} 532}
533 533
534static char ram_dram[] __devinitdata = "DRAM"; 534static char ram_dram[] = "DRAM";
535static char ram_resv[] __devinitdata = "RESV"; 535static char ram_resv[] = "RESV";
536#ifdef CONFIG_FB_ATY_GX 536#ifdef CONFIG_FB_ATY_GX
537static char ram_vram[] __devinitdata = "VRAM"; 537static char ram_vram[] = "VRAM";
538#endif /* CONFIG_FB_ATY_GX */ 538#endif /* CONFIG_FB_ATY_GX */
539#ifdef CONFIG_FB_ATY_CT 539#ifdef CONFIG_FB_ATY_CT
540static char ram_edo[] __devinitdata = "EDO"; 540static char ram_edo[] = "EDO";
541static char ram_sdram[] __devinitdata = "SDRAM (1:1)"; 541static char ram_sdram[] = "SDRAM (1:1)";
542static char ram_sgram[] __devinitdata = "SGRAM (1:1)"; 542static char ram_sgram[] = "SGRAM (1:1)";
543static char ram_sdram32[] __devinitdata = "SDRAM (2:1) (32-bit)"; 543static char ram_sdram32[] = "SDRAM (2:1) (32-bit)";
544static char ram_wram[] __devinitdata = "WRAM"; 544static char ram_wram[] = "WRAM";
545static char ram_off[] __devinitdata = "OFF"; 545static char ram_off[] = "OFF";
546#endif /* CONFIG_FB_ATY_CT */ 546#endif /* CONFIG_FB_ATY_CT */
547 547
548 548
549#ifdef CONFIG_FB_ATY_GX 549#ifdef CONFIG_FB_ATY_GX
550static char *aty_gx_ram[8] __devinitdata = { 550static char *aty_gx_ram[8] = {
551 ram_dram, ram_vram, ram_vram, ram_dram, 551 ram_dram, ram_vram, ram_vram, ram_dram,
552 ram_dram, ram_vram, ram_vram, ram_resv 552 ram_dram, ram_vram, ram_vram, ram_resv
553}; 553};
554#endif /* CONFIG_FB_ATY_GX */ 554#endif /* CONFIG_FB_ATY_GX */
555 555
556#ifdef CONFIG_FB_ATY_CT 556#ifdef CONFIG_FB_ATY_CT
557static char *aty_ct_ram[8] __devinitdata = { 557static char *aty_ct_ram[8] = {
558 ram_off, ram_dram, ram_edo, ram_edo, 558 ram_off, ram_dram, ram_edo, ram_edo,
559 ram_sdram, ram_sgram, ram_wram, ram_resv 559 ram_sdram, ram_sgram, ram_wram, ram_resv
560}; 560};
561static char *aty_xl_ram[8] __devinitdata = { 561static char *aty_xl_ram[8] = {
562 ram_off, ram_dram, ram_edo, ram_edo, 562 ram_off, ram_dram, ram_edo, ram_edo,
563 ram_sdram, ram_sgram, ram_sdram32, ram_resv 563 ram_sdram, ram_sgram, ram_sdram32, ram_resv
564}; 564};
@@ -588,7 +588,7 @@ static u32 atyfb_get_pixclock(struct fb_var_screeninfo *var,
588 * Apple monitor sense 588 * Apple monitor sense
589 */ 589 */
590 590
591static int __devinit read_aty_sense(const struct atyfb_par *par) 591static int read_aty_sense(const struct atyfb_par *par)
592{ 592{
593 int sense, i; 593 int sense, i;
594 594
@@ -2273,7 +2273,7 @@ static void aty_bl_exit(struct backlight_device *bd)
2273 2273
2274#endif /* CONFIG_FB_ATY_BACKLIGHT */ 2274#endif /* CONFIG_FB_ATY_BACKLIGHT */
2275 2275
2276static void __devinit aty_calc_mem_refresh(struct atyfb_par *par, int xclk) 2276static void aty_calc_mem_refresh(struct atyfb_par *par, int xclk)
2277{ 2277{
2278 const int ragepro_tbl[] = { 2278 const int ragepro_tbl[] = {
2279 44, 50, 55, 66, 75, 80, 100 2279 44, 50, 55, 66, 75, 80, 100
@@ -2307,8 +2307,8 @@ static void __devinit aty_calc_mem_refresh(struct atyfb_par *par, int xclk)
2307static struct fb_info *fb_list = NULL; 2307static struct fb_info *fb_list = NULL;
2308 2308
2309#if defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) 2309#if defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD)
2310static int __devinit atyfb_get_timings_from_lcd(struct atyfb_par *par, 2310static int atyfb_get_timings_from_lcd(struct atyfb_par *par,
2311 struct fb_var_screeninfo *var) 2311 struct fb_var_screeninfo *var)
2312{ 2312{
2313 int ret = -EINVAL; 2313 int ret = -EINVAL;
2314 2314
@@ -2333,7 +2333,7 @@ static int __devinit atyfb_get_timings_from_lcd(struct atyfb_par *par,
2333} 2333}
2334#endif /* defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) */ 2334#endif /* defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) */
2335 2335
2336static int __devinit aty_init(struct fb_info *info) 2336static int aty_init(struct fb_info *info)
2337{ 2337{
2338 struct atyfb_par *par = (struct atyfb_par *) info->par; 2338 struct atyfb_par *par = (struct atyfb_par *) info->par;
2339 const char *ramname = NULL, *xtal; 2339 const char *ramname = NULL, *xtal;
@@ -2787,7 +2787,7 @@ aty_init_exit:
2787} 2787}
2788 2788
2789#if defined(CONFIG_ATARI) && !defined(MODULE) 2789#if defined(CONFIG_ATARI) && !defined(MODULE)
2790static int __devinit store_video_par(char *video_str, unsigned char m64_num) 2790static int store_video_par(char *video_str, unsigned char m64_num)
2791{ 2791{
2792 char *p; 2792 char *p;
2793 unsigned long vmembase, size, guiregbase; 2793 unsigned long vmembase, size, guiregbase;
@@ -2961,9 +2961,8 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
2961 2961
2962#ifdef __sparc__ 2962#ifdef __sparc__
2963 2963
2964static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, 2964static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info,
2965 struct fb_info *info, 2965 unsigned long addr)
2966 unsigned long addr)
2967{ 2966{
2968 struct atyfb_par *par = info->par; 2967 struct atyfb_par *par = info->par;
2969 struct device_node *dp; 2968 struct device_node *dp;
@@ -3161,7 +3160,7 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev,
3161 3160
3162#ifdef __i386__ 3161#ifdef __i386__
3163#ifdef CONFIG_FB_ATY_GENERIC_LCD 3162#ifdef CONFIG_FB_ATY_GENERIC_LCD
3164static void __devinit aty_init_lcd(struct atyfb_par *par, u32 bios_base) 3163static void aty_init_lcd(struct atyfb_par *par, u32 bios_base)
3165{ 3164{
3166 u32 driv_inf_tab, sig; 3165 u32 driv_inf_tab, sig;
3167 u16 lcd_ofs; 3166 u16 lcd_ofs;
@@ -3392,7 +3391,7 @@ static void __devinit aty_init_lcd(struct atyfb_par *par, u32 bios_base)
3392} 3391}
3393#endif /* CONFIG_FB_ATY_GENERIC_LCD */ 3392#endif /* CONFIG_FB_ATY_GENERIC_LCD */
3394 3393
3395static int __devinit init_from_bios(struct atyfb_par *par) 3394static int init_from_bios(struct atyfb_par *par)
3396{ 3395{
3397 u32 bios_base, rom_addr; 3396 u32 bios_base, rom_addr;
3398 int ret; 3397 int ret;
@@ -3445,9 +3444,8 @@ static int __devinit init_from_bios(struct atyfb_par *par)
3445} 3444}
3446#endif /* __i386__ */ 3445#endif /* __i386__ */
3447 3446
3448static int __devinit atyfb_setup_generic(struct pci_dev *pdev, 3447static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info,
3449 struct fb_info *info, 3448 unsigned long addr)
3450 unsigned long addr)
3451{ 3449{
3452 struct atyfb_par *par = info->par; 3450 struct atyfb_par *par = info->par;
3453 u16 tmp; 3451 u16 tmp;
@@ -3525,8 +3523,8 @@ atyfb_setup_generic_fail:
3525 3523
3526#endif /* !__sparc__ */ 3524#endif /* !__sparc__ */
3527 3525
3528static int __devinit atyfb_pci_probe(struct pci_dev *pdev, 3526static int atyfb_pci_probe(struct pci_dev *pdev,
3529 const struct pci_device_id *ent) 3527 const struct pci_device_id *ent)
3530{ 3528{
3531 unsigned long addr, res_start, res_size; 3529 unsigned long addr, res_start, res_size;
3532 struct fb_info *info; 3530 struct fb_info *info;
@@ -3714,7 +3712,7 @@ static int __init atyfb_atari_probe(void)
3714 3712
3715#ifdef CONFIG_PCI 3713#ifdef CONFIG_PCI
3716 3714
3717static void __devexit atyfb_remove(struct fb_info *info) 3715static void atyfb_remove(struct fb_info *info)
3718{ 3716{
3719 struct atyfb_par *par = (struct atyfb_par *) info->par; 3717 struct atyfb_par *par = (struct atyfb_par *) info->par;
3720 3718
@@ -3762,7 +3760,7 @@ static void __devexit atyfb_remove(struct fb_info *info)
3762} 3760}
3763 3761
3764 3762
3765static void __devexit atyfb_pci_remove(struct pci_dev *pdev) 3763static void atyfb_pci_remove(struct pci_dev *pdev)
3766{ 3764{
3767 struct fb_info *info = pci_get_drvdata(pdev); 3765 struct fb_info *info = pci_get_drvdata(pdev);
3768 3766
@@ -3834,7 +3832,7 @@ static struct pci_driver atyfb_driver = {
3834 .name = "atyfb", 3832 .name = "atyfb",
3835 .id_table = atyfb_pci_tbl, 3833 .id_table = atyfb_pci_tbl,
3836 .probe = atyfb_pci_probe, 3834 .probe = atyfb_pci_probe,
3837 .remove = __devexit_p(atyfb_pci_remove), 3835 .remove = atyfb_pci_remove,
3838#ifdef CONFIG_PM 3836#ifdef CONFIG_PM
3839 .suspend = atyfb_pci_suspend, 3837 .suspend = atyfb_pci_suspend,
3840 .resume = atyfb_pci_resume, 3838 .resume = atyfb_pci_resume,
diff --git a/drivers/video/aty/mach64_ct.c b/drivers/video/aty/mach64_ct.c
index 2745b8539485..51f29d627ceb 100644
--- a/drivers/video/aty/mach64_ct.c
+++ b/drivers/video/aty/mach64_ct.c
@@ -373,8 +373,7 @@ void aty_set_pll_ct(const struct fb_info *info, const union aty_pll *pll)
373#endif 373#endif
374} 374}
375 375
376static void __devinit aty_get_pll_ct(const struct fb_info *info, 376static void aty_get_pll_ct(const struct fb_info *info, union aty_pll *pll)
377 union aty_pll *pll)
378{ 377{
379 struct atyfb_par *par = (struct atyfb_par *) info->par; 378 struct atyfb_par *par = (struct atyfb_par *) info->par;
380 u8 tmp, clock; 379 u8 tmp, clock;
@@ -397,8 +396,7 @@ static void __devinit aty_get_pll_ct(const struct fb_info *info,
397 } 396 }
398} 397}
399 398
400static int __devinit aty_init_pll_ct(const struct fb_info *info, 399static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll)
401 union aty_pll *pll)
402{ 400{
403 struct atyfb_par *par = (struct atyfb_par *) info->par; 401 struct atyfb_par *par = (struct atyfb_par *) info->par;
404 u8 mpost_div, xpost_div, sclk_post_div_real; 402 u8 mpost_div, xpost_div, sclk_post_div_real;
diff --git a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c
index 46f72ed53510..95ec042ddbf8 100644
--- a/drivers/video/aty/mach64_cursor.c
+++ b/drivers/video/aty/mach64_cursor.c
@@ -183,7 +183,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
183 return 0; 183 return 0;
184} 184}
185 185
186int __devinit aty_init_cursor(struct fb_info *info) 186int aty_init_cursor(struct fb_info *info)
187{ 187{
188 unsigned long addr; 188 unsigned long addr;
189 189
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 9e279ee38da8..1e30b2b3e79f 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -293,7 +293,7 @@ static void radeon_unmap_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev)
293 pci_unmap_rom(dev, rinfo->bios_seg); 293 pci_unmap_rom(dev, rinfo->bios_seg);
294} 294}
295 295
296static int __devinit radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev) 296static int radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev)
297{ 297{
298 void __iomem *rom; 298 void __iomem *rom;
299 u16 dptr; 299 u16 dptr;
@@ -388,7 +388,7 @@ static int __devinit radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev
388} 388}
389 389
390#ifdef CONFIG_X86 390#ifdef CONFIG_X86
391static int __devinit radeon_find_mem_vbios(struct radeonfb_info *rinfo) 391static int radeon_find_mem_vbios(struct radeonfb_info *rinfo)
392{ 392{
393 /* I simplified this code as we used to miss the signatures in 393 /* I simplified this code as we used to miss the signatures in
394 * a lot of case. It's now closer to XFree, we just don't check 394 * a lot of case. It's now closer to XFree, we just don't check
@@ -423,7 +423,7 @@ static int __devinit radeon_find_mem_vbios(struct radeonfb_info *rinfo)
423 * Read XTAL (ref clock), SCLK and MCLK from Open Firmware device 423 * Read XTAL (ref clock), SCLK and MCLK from Open Firmware device
424 * tree. Hopefully, ATI OF driver is kind enough to fill these 424 * tree. Hopefully, ATI OF driver is kind enough to fill these
425 */ 425 */
426static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) 426static int radeon_read_xtal_OF(struct radeonfb_info *rinfo)
427{ 427{
428 struct device_node *dp = rinfo->of_node; 428 struct device_node *dp = rinfo->of_node;
429 const u32 *val; 429 const u32 *val;
@@ -453,7 +453,7 @@ static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo)
453/* 453/*
454 * Read PLL infos from chip registers 454 * Read PLL infos from chip registers
455 */ 455 */
456static int __devinit radeon_probe_pll_params(struct radeonfb_info *rinfo) 456static int radeon_probe_pll_params(struct radeonfb_info *rinfo)
457{ 457{
458 unsigned char ppll_div_sel; 458 unsigned char ppll_div_sel;
459 unsigned Ns, Nm, M; 459 unsigned Ns, Nm, M;
@@ -591,7 +591,7 @@ static int __devinit radeon_probe_pll_params(struct radeonfb_info *rinfo)
591/* 591/*
592 * Retrieve PLL infos by different means (BIOS, Open Firmware, register probing...) 592 * Retrieve PLL infos by different means (BIOS, Open Firmware, register probing...)
593 */ 593 */
594static void __devinit radeon_get_pllinfo(struct radeonfb_info *rinfo) 594static void radeon_get_pllinfo(struct radeonfb_info *rinfo)
595{ 595{
596 /* 596 /*
597 * In the case nothing works, these are defaults; they are mostly 597 * In the case nothing works, these are defaults; they are mostly
@@ -1868,7 +1868,7 @@ static struct fb_ops radeonfb_ops = {
1868}; 1868};
1869 1869
1870 1870
1871static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) 1871static int radeon_set_fbinfo(struct radeonfb_info *rinfo)
1872{ 1872{
1873 struct fb_info *info = rinfo->info; 1873 struct fb_info *info = rinfo->info;
1874 1874
@@ -2143,8 +2143,8 @@ static struct bin_attribute edid2_attr = {
2143}; 2143};
2144 2144
2145 2145
2146static int __devinit radeonfb_pci_register (struct pci_dev *pdev, 2146static int radeonfb_pci_register(struct pci_dev *pdev,
2147 const struct pci_device_id *ent) 2147 const struct pci_device_id *ent)
2148{ 2148{
2149 struct fb_info *info; 2149 struct fb_info *info;
2150 struct radeonfb_info *rinfo; 2150 struct radeonfb_info *rinfo;
@@ -2407,7 +2407,7 @@ err_out:
2407 2407
2408 2408
2409 2409
2410static void __devexit radeonfb_pci_unregister (struct pci_dev *pdev) 2410static void radeonfb_pci_unregister(struct pci_dev *pdev)
2411{ 2411{
2412 struct fb_info *info = pci_get_drvdata(pdev); 2412 struct fb_info *info = pci_get_drvdata(pdev);
2413 struct radeonfb_info *rinfo = info->par; 2413 struct radeonfb_info *rinfo = info->par;
@@ -2465,7 +2465,7 @@ static struct pci_driver radeonfb_driver = {
2465 .name = "radeonfb", 2465 .name = "radeonfb",
2466 .id_table = radeonfb_pci_table, 2466 .id_table = radeonfb_pci_table,
2467 .probe = radeonfb_pci_register, 2467 .probe = radeonfb_pci_register,
2468 .remove = __devexit_p(radeonfb_pci_unregister), 2468 .remove = radeonfb_pci_unregister,
2469#ifdef CONFIG_PM 2469#ifdef CONFIG_PM
2470 .suspend = radeonfb_pci_suspend, 2470 .suspend = radeonfb_pci_suspend,
2471 .resume = radeonfb_pci_resume, 2471 .resume = radeonfb_pci_resume,
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c
index 5c23eac0eb9a..bc078d50d8f1 100644
--- a/drivers/video/aty/radeon_monitor.c
+++ b/drivers/video/aty/radeon_monitor.c
@@ -62,8 +62,8 @@ static char *radeon_get_mon_name(int type)
62 * models with broken OF probing by hard-coding known EDIDs for some Mac 62 * models with broken OF probing by hard-coding known EDIDs for some Mac
63 * laptops internal LVDS panel. (XXX: not done yet) 63 * laptops internal LVDS panel. (XXX: not done yet)
64 */ 64 */
65static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_EDID, 65static int radeon_parse_montype_prop(struct device_node *dp, u8 **out_EDID,
66 int hdno) 66 int hdno)
67{ 67{
68 static char *propnames[] = { "DFP,EDID", "LCD,EDID", "EDID", 68 static char *propnames[] = { "DFP,EDID", "LCD,EDID", "EDID",
69 "EDID1", "EDID2", NULL }; 69 "EDID1", "EDID2", NULL };
@@ -115,8 +115,8 @@ static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_
115 return mt; 115 return mt;
116} 116}
117 117
118static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_no, 118static int radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_no,
119 u8 **out_EDID) 119 u8 **out_EDID)
120{ 120{
121 struct device_node *dp; 121 struct device_node *dp;
122 122
@@ -163,7 +163,7 @@ static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_
163#endif /* CONFIG_PPC_OF || CONFIG_SPARC */ 163#endif /* CONFIG_PPC_OF || CONFIG_SPARC */
164 164
165 165
166static int __devinit radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo) 166static int radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo)
167{ 167{
168 unsigned long tmp, tmp0; 168 unsigned long tmp, tmp0;
169 char stmp[30]; 169 char stmp[30];
@@ -251,7 +251,7 @@ static int __devinit radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo)
251 * doesn't quite work yet, but it's output is still useful for 251 * doesn't quite work yet, but it's output is still useful for
252 * debugging 252 * debugging
253 */ 253 */
254static void __devinit radeon_parse_connector_info(struct radeonfb_info *rinfo) 254static void radeon_parse_connector_info(struct radeonfb_info *rinfo)
255{ 255{
256 int offset, chips, connectors, tmp, i, conn, type; 256 int offset, chips, connectors, tmp, i, conn, type;
257 257
@@ -297,7 +297,7 @@ static void __devinit radeon_parse_connector_info(struct radeonfb_info *rinfo)
297 * as well and currently is only implemented for the CRT DAC, the 297 * as well and currently is only implemented for the CRT DAC, the
298 * code for the TVDAC is commented out in XFree as "non working" 298 * code for the TVDAC is commented out in XFree as "non working"
299 */ 299 */
300static int __devinit radeon_crt_is_connected(struct radeonfb_info *rinfo, int is_crt_dac) 300static int radeon_crt_is_connected(struct radeonfb_info *rinfo, int is_crt_dac)
301{ 301{
302 int connected = 0; 302 int connected = 0;
303 303
@@ -369,8 +369,8 @@ static int __devinit radeon_crt_is_connected(struct radeonfb_info *rinfo, int is
369 * Parse the "monitor_layout" string if any. This code is mostly 369 * Parse the "monitor_layout" string if any. This code is mostly
370 * copied from XFree's radeon driver 370 * copied from XFree's radeon driver
371 */ 371 */
372static int __devinit radeon_parse_monitor_layout(struct radeonfb_info *rinfo, 372static int radeon_parse_monitor_layout(struct radeonfb_info *rinfo,
373 const char *monitor_layout) 373 const char *monitor_layout)
374{ 374{
375 char s1[5], s2[5]; 375 char s1[5], s2[5];
376 int i = 0, second = 0; 376 int i = 0, second = 0;
@@ -433,8 +433,8 @@ static int __devinit radeon_parse_monitor_layout(struct radeonfb_info *rinfo,
433 * try to retrieve EDID. The algorithm here comes from XFree's radeon 433 * try to retrieve EDID. The algorithm here comes from XFree's radeon
434 * driver 434 * driver
435 */ 435 */
436void __devinit radeon_probe_screens(struct radeonfb_info *rinfo, 436void radeon_probe_screens(struct radeonfb_info *rinfo,
437 const char *monitor_layout, int ignore_edid) 437 const char *monitor_layout, int ignore_edid)
438{ 438{
439#ifdef CONFIG_FB_RADEON_I2C 439#ifdef CONFIG_FB_RADEON_I2C
440 int ddc_crt2_used = 0; 440 int ddc_crt2_used = 0;
@@ -753,7 +753,7 @@ static int is_powerblade(const char *model)
753 * Build the modedb for head 1 (head 2 will come later), check panel infos 753 * Build the modedb for head 1 (head 2 will come later), check panel infos
754 * from either BIOS or EDID, and pick up the default mode 754 * from either BIOS or EDID, and pick up the default mode
755 */ 755 */
756void __devinit radeon_check_modes(struct radeonfb_info *rinfo, const char *mode_option) 756void radeon_check_modes(struct radeonfb_info *rinfo, const char *mode_option)
757{ 757{
758 struct fb_info * info = rinfo->info; 758 struct fb_info * info = rinfo->info;
759 int has_default_mode = 0; 759 int has_default_mode = 0;
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
index fe3b6ec87122..ddabaa867b0d 100644
--- a/drivers/video/au1100fb.c
+++ b/drivers/video/au1100fb.c
@@ -83,7 +83,7 @@ struct fb_bitfield rgb_bitfields[][4] =
83 { { 8, 4, 0 }, { 4, 4, 0 }, { 0, 4, 0 }, { 0, 0, 0 } }, 83 { { 8, 4, 0 }, { 4, 4, 0 }, { 0, 4, 0 }, { 0, 0, 0 } },
84}; 84};
85 85
86static struct fb_fix_screeninfo au1100fb_fix __devinitdata = { 86static struct fb_fix_screeninfo au1100fb_fix = {
87 .id = "AU1100 FB", 87 .id = "AU1100 FB",
88 .xpanstep = 1, 88 .xpanstep = 1,
89 .ypanstep = 1, 89 .ypanstep = 1,
@@ -91,7 +91,7 @@ static struct fb_fix_screeninfo au1100fb_fix __devinitdata = {
91 .accel = FB_ACCEL_NONE, 91 .accel = FB_ACCEL_NONE,
92}; 92};
93 93
94static struct fb_var_screeninfo au1100fb_var __devinitdata = { 94static struct fb_var_screeninfo au1100fb_var = {
95 .activate = FB_ACTIVATE_NOW, 95 .activate = FB_ACTIVATE_NOW,
96 .height = -1, 96 .height = -1,
97 .width = -1, 97 .width = -1,
@@ -469,7 +469,7 @@ static int au1100fb_setup(struct au1100fb_device *fbdev)
469 return 0; 469 return 0;
470} 470}
471 471
472static int __devinit au1100fb_drv_probe(struct platform_device *dev) 472static int au1100fb_drv_probe(struct platform_device *dev)
473{ 473{
474 struct au1100fb_device *fbdev = NULL; 474 struct au1100fb_device *fbdev = NULL;
475 struct resource *regs_res; 475 struct resource *regs_res;
diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c
index 7ca79f02056e..1b59054fc6a4 100644
--- a/drivers/video/au1200fb.c
+++ b/drivers/video/au1200fb.c
@@ -1673,7 +1673,7 @@ out:
1673} 1673}
1674 1674
1675/* AU1200 LCD controller device driver */ 1675/* AU1200 LCD controller device driver */
1676static int __devinit au1200fb_drv_probe(struct platform_device *dev) 1676static int au1200fb_drv_probe(struct platform_device *dev)
1677{ 1677{
1678 struct au1200fb_device *fbdev; 1678 struct au1200fb_device *fbdev;
1679 struct au1200fb_platdata *pd; 1679 struct au1200fb_platdata *pd;
@@ -1798,7 +1798,7 @@ failed:
1798 return ret; 1798 return ret;
1799} 1799}
1800 1800
1801static int __devexit au1200fb_drv_remove(struct platform_device *dev) 1801static int au1200fb_drv_remove(struct platform_device *dev)
1802{ 1802{
1803 struct au1200fb_platdata *pd = platform_get_drvdata(dev); 1803 struct au1200fb_platdata *pd = platform_get_drvdata(dev);
1804 struct au1200fb_device *fbdev; 1804 struct au1200fb_device *fbdev;
@@ -1876,7 +1876,7 @@ static struct platform_driver au1200fb_driver = {
1876 .pm = AU1200FB_PMOPS, 1876 .pm = AU1200FB_PMOPS,
1877 }, 1877 },
1878 .probe = au1200fb_drv_probe, 1878 .probe = au1200fb_drv_probe,
1879 .remove = __devexit_p(au1200fb_drv_remove), 1879 .remove = au1200fb_drv_remove,
1880}; 1880};
1881 1881
1882/*-------------------------------------------------------------------------*/ 1882/*-------------------------------------------------------------------------*/
diff --git a/drivers/video/auo_k1900fb.c b/drivers/video/auo_k1900fb.c
index c36cf961dcb2..1a9ac6e1f4b3 100644
--- a/drivers/video/auo_k1900fb.c
+++ b/drivers/video/auo_k1900fb.c
@@ -156,7 +156,7 @@ static bool auok1900fb_need_refresh(struct auok190xfb_par *par)
156 return (par->update_cnt > 10); 156 return (par->update_cnt > 10);
157} 157}
158 158
159static int __devinit auok1900fb_probe(struct platform_device *pdev) 159static int auok1900fb_probe(struct platform_device *pdev)
160{ 160{
161 struct auok190x_init_data init; 161 struct auok190x_init_data init;
162 struct auok190x_board *board; 162 struct auok190x_board *board;
@@ -177,14 +177,14 @@ static int __devinit auok1900fb_probe(struct platform_device *pdev)
177 return auok190x_common_probe(pdev, &init); 177 return auok190x_common_probe(pdev, &init);
178} 178}
179 179
180static int __devexit auok1900fb_remove(struct platform_device *pdev) 180static int auok1900fb_remove(struct platform_device *pdev)
181{ 181{
182 return auok190x_common_remove(pdev); 182 return auok190x_common_remove(pdev);
183} 183}
184 184
185static struct platform_driver auok1900fb_driver = { 185static struct platform_driver auok1900fb_driver = {
186 .probe = auok1900fb_probe, 186 .probe = auok1900fb_probe,
187 .remove = __devexit_p(auok1900fb_remove), 187 .remove = auok1900fb_remove,
188 .driver = { 188 .driver = {
189 .owner = THIS_MODULE, 189 .owner = THIS_MODULE,
190 .name = "auo_k1900fb", 190 .name = "auo_k1900fb",
diff --git a/drivers/video/auo_k1901fb.c b/drivers/video/auo_k1901fb.c
index 1c054c18616e..d1db1653cd88 100644
--- a/drivers/video/auo_k1901fb.c
+++ b/drivers/video/auo_k1901fb.c
@@ -209,7 +209,7 @@ static bool auok1901fb_need_refresh(struct auok190xfb_par *par)
209 return (par->update_cnt > 10); 209 return (par->update_cnt > 10);
210} 210}
211 211
212static int __devinit auok1901fb_probe(struct platform_device *pdev) 212static int auok1901fb_probe(struct platform_device *pdev)
213{ 213{
214 struct auok190x_init_data init; 214 struct auok190x_init_data init;
215 struct auok190x_board *board; 215 struct auok190x_board *board;
@@ -230,14 +230,14 @@ static int __devinit auok1901fb_probe(struct platform_device *pdev)
230 return auok190x_common_probe(pdev, &init); 230 return auok190x_common_probe(pdev, &init);
231} 231}
232 232
233static int __devexit auok1901fb_remove(struct platform_device *pdev) 233static int auok1901fb_remove(struct platform_device *pdev)
234{ 234{
235 return auok190x_common_remove(pdev); 235 return auok190x_common_remove(pdev);
236} 236}
237 237
238static struct platform_driver auok1901fb_driver = { 238static struct platform_driver auok1901fb_driver = {
239 .probe = auok1901fb_probe, 239 .probe = auok1901fb_probe,
240 .remove = __devexit_p(auok1901fb_remove), 240 .remove = auok1901fb_remove,
241 .driver = { 241 .driver = {
242 .owner = THIS_MODULE, 242 .owner = THIS_MODULE,
243 .name = "auo_k1901fb", 243 .name = "auo_k1901fb",
diff --git a/drivers/video/auo_k190x.c b/drivers/video/auo_k190x.c
index c03ecdd31e4c..97f79356141e 100644
--- a/drivers/video/auo_k190x.c
+++ b/drivers/video/auo_k190x.c
@@ -773,8 +773,8 @@ EXPORT_SYMBOL_GPL(auok190x_pm);
773 * Common probe and remove code 773 * Common probe and remove code
774 */ 774 */
775 775
776int __devinit auok190x_common_probe(struct platform_device *pdev, 776int auok190x_common_probe(struct platform_device *pdev,
777 struct auok190x_init_data *init) 777 struct auok190x_init_data *init)
778{ 778{
779 struct auok190x_board *board = init->board; 779 struct auok190x_board *board = init->board;
780 struct auok190xfb_par *par; 780 struct auok190xfb_par *par;
@@ -1006,7 +1006,7 @@ err_reg:
1006} 1006}
1007EXPORT_SYMBOL_GPL(auok190x_common_probe); 1007EXPORT_SYMBOL_GPL(auok190x_common_probe);
1008 1008
1009int __devexit auok190x_common_remove(struct platform_device *pdev) 1009int auok190x_common_remove(struct platform_device *pdev)
1010{ 1010{
1011 struct fb_info *info = platform_get_drvdata(pdev); 1011 struct fb_info *info = platform_get_drvdata(pdev);
1012 struct auok190xfb_par *par = info->par; 1012 struct auok190xfb_par *par = info->par;
diff --git a/drivers/video/bf537-lq035.c b/drivers/video/bf537-lq035.c
index 7347aa1e5e4a..a82d2578d976 100644
--- a/drivers/video/bf537-lq035.c
+++ b/drivers/video/bf537-lq035.c
@@ -87,8 +87,8 @@ static void set_vcomm(void)
87 pr_err("i2c_smbus_write_byte_data fail: %d\n", nr); 87 pr_err("i2c_smbus_write_byte_data fail: %d\n", nr);
88} 88}
89 89
90static int __devinit ad5280_probe(struct i2c_client *client, 90static int ad5280_probe(struct i2c_client *client,
91 const struct i2c_device_id *id) 91 const struct i2c_device_id *id)
92{ 92{
93 int ret; 93 int ret;
94 if (!i2c_check_functionality(client->adapter, 94 if (!i2c_check_functionality(client->adapter,
@@ -108,7 +108,7 @@ static int __devinit ad5280_probe(struct i2c_client *client,
108 return 0; 108 return 0;
109} 109}
110 110
111static int __devexit ad5280_remove(struct i2c_client *client) 111static int ad5280_remove(struct i2c_client *client)
112{ 112{
113 ad5280_client = NULL; 113 ad5280_client = NULL;
114 return 0; 114 return 0;
@@ -126,7 +126,7 @@ static struct i2c_driver ad5280_driver = {
126 .name = "bf537-lq035-ad5280", 126 .name = "bf537-lq035-ad5280",
127 }, 127 },
128 .probe = ad5280_probe, 128 .probe = ad5280_probe,
129 .remove = __devexit_p(ad5280_remove), 129 .remove = ad5280_remove,
130 .id_table = ad5280_id, 130 .id_table = ad5280_id,
131}; 131};
132 132
@@ -360,7 +360,7 @@ static int config_dma(void)
360 return 0; 360 return 0;
361} 361}
362 362
363static int __devinit request_ports(void) 363static int request_ports(void)
364{ 364{
365 u16 tmr_req[] = TIMERS; 365 u16 tmr_req[] = TIMERS;
366 366
@@ -443,7 +443,7 @@ static struct fb_var_screeninfo bfin_lq035_fb_defined = {
443 .transp = {0, 0, 0}, 443 .transp = {0, 0, 0},
444}; 444};
445 445
446static struct fb_fix_screeninfo bfin_lq035_fb_fix __devinitdata = { 446static struct fb_fix_screeninfo bfin_lq035_fb_fix = {
447 .id = KBUILD_MODNAME, 447 .id = KBUILD_MODNAME,
448 .smem_len = ACTIVE_VIDEO_MEM_SIZE, 448 .smem_len = ACTIVE_VIDEO_MEM_SIZE,
449 .type = FB_TYPE_PACKED_PIXELS, 449 .type = FB_TYPE_PACKED_PIXELS,
@@ -686,7 +686,7 @@ static struct lcd_ops bfin_lcd_ops = {
686 686
687static struct lcd_device *lcd_dev; 687static struct lcd_device *lcd_dev;
688 688
689static int __devinit bfin_lq035_probe(struct platform_device *pdev) 689static int bfin_lq035_probe(struct platform_device *pdev)
690{ 690{
691 struct backlight_properties props; 691 struct backlight_properties props;
692 dma_addr_t dma_handle; 692 dma_addr_t dma_handle;
@@ -816,7 +816,7 @@ out_ports:
816 return ret; 816 return ret;
817} 817}
818 818
819static int __devexit bfin_lq035_remove(struct platform_device *pdev) 819static int bfin_lq035_remove(struct platform_device *pdev)
820{ 820{
821 if (fb_buffer != NULL) 821 if (fb_buffer != NULL)
822 dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0); 822 dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0);
@@ -889,7 +889,7 @@ static int bfin_lq035_resume(struct platform_device *pdev)
889 889
890static struct platform_driver bfin_lq035_driver = { 890static struct platform_driver bfin_lq035_driver = {
891 .probe = bfin_lq035_probe, 891 .probe = bfin_lq035_probe,
892 .remove = __devexit_p(bfin_lq035_remove), 892 .remove = bfin_lq035_remove,
893 .suspend = bfin_lq035_suspend, 893 .suspend = bfin_lq035_suspend,
894 .resume = bfin_lq035_resume, 894 .resume = bfin_lq035_resume,
895 .driver = { 895 .driver = {
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index ff5663f5c64f..2726a5b66741 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -497,7 +497,7 @@ static irqreturn_t bfin_bf54x_irq_error(int irq, void *dev_id)
497 return IRQ_HANDLED; 497 return IRQ_HANDLED;
498} 498}
499 499
500static int __devinit bfin_bf54x_probe(struct platform_device *pdev) 500static int bfin_bf54x_probe(struct platform_device *pdev)
501{ 501{
502#ifndef NO_BL_SUPPORT 502#ifndef NO_BL_SUPPORT
503 struct backlight_properties props; 503 struct backlight_properties props;
@@ -686,7 +686,7 @@ out1:
686 return ret; 686 return ret;
687} 687}
688 688
689static int __devexit bfin_bf54x_remove(struct platform_device *pdev) 689static int bfin_bf54x_remove(struct platform_device *pdev)
690{ 690{
691 691
692 struct fb_info *fbinfo = platform_get_drvdata(pdev); 692 struct fb_info *fbinfo = platform_get_drvdata(pdev);
@@ -754,7 +754,7 @@ static int bfin_bf54x_resume(struct platform_device *pdev)
754 754
755static struct platform_driver bfin_bf54x_driver = { 755static struct platform_driver bfin_bf54x_driver = {
756 .probe = bfin_bf54x_probe, 756 .probe = bfin_bf54x_probe,
757 .remove = __devexit_p(bfin_bf54x_remove), 757 .remove = bfin_bf54x_remove,
758 .suspend = bfin_bf54x_suspend, 758 .suspend = bfin_bf54x_suspend,
759 .resume = bfin_bf54x_resume, 759 .resume = bfin_bf54x_resume,
760 .driver = { 760 .driver = {
diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
index 6fbc75c2f0a1..29d8c0443a1f 100644
--- a/drivers/video/bfin-lq035q1-fb.c
+++ b/drivers/video/bfin-lq035q1-fb.c
@@ -137,7 +137,7 @@ static int lq035q1_control(struct spi_device *spi, unsigned char reg, unsigned s
137 return ret; 137 return ret;
138} 138}
139 139
140static int __devinit lq035q1_spidev_probe(struct spi_device *spi) 140static int lq035q1_spidev_probe(struct spi_device *spi)
141{ 141{
142 int ret; 142 int ret;
143 struct spi_control *ctl; 143 struct spi_control *ctl;
@@ -358,8 +358,8 @@ static inline void bfin_lq035q1_free_ports(unsigned ppi16)
358 gpio_free(P_IDENT(P_PPI0_FS3)); 358 gpio_free(P_IDENT(P_PPI0_FS3));
359} 359}
360 360
361static int __devinit bfin_lq035q1_request_ports(struct platform_device *pdev, 361static int bfin_lq035q1_request_ports(struct platform_device *pdev,
362 unsigned ppi16) 362 unsigned ppi16)
363{ 363{
364 int ret; 364 int ret;
365 /* ANOMALY_05000400 - PPI Does Not Start Properly In Specific Mode: 365 /* ANOMALY_05000400 - PPI Does Not Start Properly In Specific Mode:
@@ -555,7 +555,7 @@ static irqreturn_t bfin_lq035q1_irq_error(int irq, void *dev_id)
555 return IRQ_HANDLED; 555 return IRQ_HANDLED;
556} 556}
557 557
558static int __devinit bfin_lq035q1_probe(struct platform_device *pdev) 558static int bfin_lq035q1_probe(struct platform_device *pdev)
559{ 559{
560 struct bfin_lq035q1fb_info *info; 560 struct bfin_lq035q1fb_info *info;
561 struct fb_info *fbinfo; 561 struct fb_info *fbinfo;
@@ -706,7 +706,7 @@ static int __devinit bfin_lq035q1_probe(struct platform_device *pdev)
706 706
707 info->spidrv.driver.name = DRIVER_NAME"-spi"; 707 info->spidrv.driver.name = DRIVER_NAME"-spi";
708 info->spidrv.probe = lq035q1_spidev_probe; 708 info->spidrv.probe = lq035q1_spidev_probe;
709 info->spidrv.remove = __devexit_p(lq035q1_spidev_remove); 709 info->spidrv.remove = lq035q1_spidev_remove;
710 info->spidrv.shutdown = lq035q1_spidev_shutdown; 710 info->spidrv.shutdown = lq035q1_spidev_shutdown;
711 info->spidrv.suspend = lq035q1_spidev_suspend; 711 info->spidrv.suspend = lq035q1_spidev_suspend;
712 info->spidrv.resume = lq035q1_spidev_resume; 712 info->spidrv.resume = lq035q1_spidev_resume;
@@ -764,7 +764,7 @@ static int __devinit bfin_lq035q1_probe(struct platform_device *pdev)
764 return ret; 764 return ret;
765} 765}
766 766
767static int __devexit bfin_lq035q1_remove(struct platform_device *pdev) 767static int bfin_lq035q1_remove(struct platform_device *pdev)
768{ 768{
769 struct fb_info *fbinfo = platform_get_drvdata(pdev); 769 struct fb_info *fbinfo = platform_get_drvdata(pdev);
770 struct bfin_lq035q1fb_info *info = fbinfo->par; 770 struct bfin_lq035q1fb_info *info = fbinfo->par;
@@ -845,7 +845,7 @@ static struct dev_pm_ops bfin_lq035q1_dev_pm_ops = {
845 845
846static struct platform_driver bfin_lq035q1_driver = { 846static struct platform_driver bfin_lq035q1_driver = {
847 .probe = bfin_lq035q1_probe, 847 .probe = bfin_lq035q1_probe,
848 .remove = __devexit_p(bfin_lq035q1_remove), 848 .remove = bfin_lq035q1_remove,
849 .driver = { 849 .driver = {
850 .name = DRIVER_NAME, 850 .name = DRIVER_NAME,
851#ifdef CONFIG_PM 851#ifdef CONFIG_PM
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index ae0fb24b8b43..d46da01c31ae 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -418,7 +418,7 @@ static irqreturn_t bfin_t350mcqb_irq_error(int irq, void *dev_id)
418 return IRQ_HANDLED; 418 return IRQ_HANDLED;
419} 419}
420 420
421static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) 421static int bfin_t350mcqb_probe(struct platform_device *pdev)
422{ 422{
423#ifndef NO_BL_SUPPORT 423#ifndef NO_BL_SUPPORT
424 struct backlight_properties props; 424 struct backlight_properties props;
@@ -583,7 +583,7 @@ out1:
583 return ret; 583 return ret;
584} 584}
585 585
586static int __devexit bfin_t350mcqb_remove(struct platform_device *pdev) 586static int bfin_t350mcqb_remove(struct platform_device *pdev)
587{ 587{
588 588
589 struct fb_info *fbinfo = platform_get_drvdata(pdev); 589 struct fb_info *fbinfo = platform_get_drvdata(pdev);
@@ -658,7 +658,7 @@ static int bfin_t350mcqb_resume(struct platform_device *pdev)
658 658
659static struct platform_driver bfin_t350mcqb_driver = { 659static struct platform_driver bfin_t350mcqb_driver = {
660 .probe = bfin_t350mcqb_probe, 660 .probe = bfin_t350mcqb_probe,
661 .remove = __devexit_p(bfin_t350mcqb_remove), 661 .remove = bfin_t350mcqb_remove,
662 .suspend = bfin_t350mcqb_suspend, 662 .suspend = bfin_t350mcqb_suspend,
663 .resume = bfin_t350mcqb_resume, 663 .resume = bfin_t350mcqb_resume,
664 .driver = { 664 .driver = {
diff --git a/drivers/video/bfin_adv7393fb.c b/drivers/video/bfin_adv7393fb.c
index d0f121bd8b25..8d411a3c9966 100644
--- a/drivers/video/bfin_adv7393fb.c
+++ b/drivers/video/bfin_adv7393fb.c
@@ -88,7 +88,7 @@ static struct fb_var_screeninfo bfin_adv7393_fb_defined = {
88 .transp = {0, 0, 0}, 88 .transp = {0, 0, 0},
89}; 89};
90 90
91static struct fb_fix_screeninfo bfin_adv7393_fb_fix __devinitdata = { 91static struct fb_fix_screeninfo bfin_adv7393_fb_fix = {
92 .id = "BFIN ADV7393", 92 .id = "BFIN ADV7393",
93 .smem_len = 720 * 480 * 2, 93 .smem_len = 720 * 480 * 2,
94 .type = FB_TYPE_PACKED_PIXELS, 94 .type = FB_TYPE_PACKED_PIXELS,
@@ -368,8 +368,8 @@ adv7393_write_proc(struct file *file, const char __user * buffer,
368 return count; 368 return count;
369} 369}
370 370
371static int __devinit bfin_adv7393_fb_probe(struct i2c_client *client, 371static int bfin_adv7393_fb_probe(struct i2c_client *client,
372 const struct i2c_device_id *id) 372 const struct i2c_device_id *id)
373{ 373{
374 int ret = 0; 374 int ret = 0;
375 struct proc_dir_entry *entry; 375 struct proc_dir_entry *entry;
@@ -719,7 +719,7 @@ static int bfin_adv7393_fb_setcolreg(u_int regno, u_int red, u_int green,
719 return 0; 719 return 0;
720} 720}
721 721
722static int __devexit bfin_adv7393_fb_remove(struct i2c_client *client) 722static int bfin_adv7393_fb_remove(struct i2c_client *client)
723{ 723{
724 struct adv7393fb_device *fbdev = i2c_get_clientdata(client); 724 struct adv7393fb_device *fbdev = i2c_get_clientdata(client);
725 725
@@ -794,7 +794,7 @@ static struct i2c_driver bfin_adv7393_fb_driver = {
794#endif 794#endif
795 }, 795 },
796 .probe = bfin_adv7393_fb_probe, 796 .probe = bfin_adv7393_fb_probe,
797 .remove = __devexit_p(bfin_adv7393_fb_remove), 797 .remove = bfin_adv7393_fb_remove,
798 .id_table = bfin_adv7393_id, 798 .id_table = bfin_adv7393_id,
799}; 799};
800 800
diff --git a/drivers/video/broadsheetfb.c b/drivers/video/broadsheetfb.c
index c95b417d0d41..b09701c79432 100644
--- a/drivers/video/broadsheetfb.c
+++ b/drivers/video/broadsheetfb.c
@@ -91,7 +91,7 @@ static struct panel_info panel_table[] = {
91#define DPY_W 800 91#define DPY_W 800
92#define DPY_H 600 92#define DPY_H 600
93 93
94static struct fb_fix_screeninfo broadsheetfb_fix __devinitdata = { 94static struct fb_fix_screeninfo broadsheetfb_fix = {
95 .id = "broadsheetfb", 95 .id = "broadsheetfb",
96 .type = FB_TYPE_PACKED_PIXELS, 96 .type = FB_TYPE_PACKED_PIXELS,
97 .visual = FB_VISUAL_STATIC_PSEUDOCOLOR, 97 .visual = FB_VISUAL_STATIC_PSEUDOCOLOR,
@@ -102,7 +102,7 @@ static struct fb_fix_screeninfo broadsheetfb_fix __devinitdata = {
102 .accel = FB_ACCEL_NONE, 102 .accel = FB_ACCEL_NONE,
103}; 103};
104 104
105static struct fb_var_screeninfo broadsheetfb_var __devinitdata = { 105static struct fb_var_screeninfo broadsheetfb_var = {
106 .xres = DPY_W, 106 .xres = DPY_W,
107 .yres = DPY_H, 107 .yres = DPY_H,
108 .xres_virtual = DPY_W, 108 .xres_virtual = DPY_W,
@@ -774,7 +774,7 @@ static DEVICE_ATTR(loadstore_waveform, S_IWUSR, NULL,
774 broadsheet_loadstore_waveform); 774 broadsheet_loadstore_waveform);
775 775
776/* upper level functions that manipulate the display and other stuff */ 776/* upper level functions that manipulate the display and other stuff */
777static void __devinit broadsheet_init_display(struct broadsheetfb_par *par) 777static void broadsheet_init_display(struct broadsheetfb_par *par)
778{ 778{
779 u16 args[5]; 779 u16 args[5];
780 int xres = par->info->var.xres; 780 int xres = par->info->var.xres;
@@ -834,7 +834,7 @@ static void __devinit broadsheet_init_display(struct broadsheetfb_par *par)
834 par->board->wait_for_rdy(par); 834 par->board->wait_for_rdy(par);
835} 835}
836 836
837static void __devinit broadsheet_identify(struct broadsheetfb_par *par) 837static void broadsheet_identify(struct broadsheetfb_par *par)
838{ 838{
839 u16 rev, prc; 839 u16 rev, prc;
840 struct device *dev = par->info->device; 840 struct device *dev = par->info->device;
@@ -849,7 +849,7 @@ static void __devinit broadsheet_identify(struct broadsheetfb_par *par)
849 dev_warn(dev, "Unrecognized Broadsheet Revision\n"); 849 dev_warn(dev, "Unrecognized Broadsheet Revision\n");
850} 850}
851 851
852static void __devinit broadsheet_init(struct broadsheetfb_par *par) 852static void broadsheet_init(struct broadsheetfb_par *par)
853{ 853{
854 broadsheet_send_command(par, BS_CMD_INIT_SYS_RUN); 854 broadsheet_send_command(par, BS_CMD_INIT_SYS_RUN);
855 /* the controller needs a second */ 855 /* the controller needs a second */
@@ -1058,7 +1058,7 @@ static struct fb_deferred_io broadsheetfb_defio = {
1058 .deferred_io = broadsheetfb_dpy_deferred_io, 1058 .deferred_io = broadsheetfb_dpy_deferred_io,
1059}; 1059};
1060 1060
1061static int __devinit broadsheetfb_probe(struct platform_device *dev) 1061static int broadsheetfb_probe(struct platform_device *dev)
1062{ 1062{
1063 struct fb_info *info; 1063 struct fb_info *info;
1064 struct broadsheet_board *board; 1064 struct broadsheet_board *board;
@@ -1190,7 +1190,7 @@ err:
1190 1190
1191} 1191}
1192 1192
1193static int __devexit broadsheetfb_remove(struct platform_device *dev) 1193static int broadsheetfb_remove(struct platform_device *dev)
1194{ 1194{
1195 struct fb_info *info = platform_get_drvdata(dev); 1195 struct fb_info *info = platform_get_drvdata(dev);
1196 1196
@@ -1211,7 +1211,7 @@ static int __devexit broadsheetfb_remove(struct platform_device *dev)
1211 1211
1212static struct platform_driver broadsheetfb_driver = { 1212static struct platform_driver broadsheetfb_driver = {
1213 .probe = broadsheetfb_probe, 1213 .probe = broadsheetfb_probe,
1214 .remove = __devexit_p(broadsheetfb_remove), 1214 .remove = broadsheetfb_remove,
1215 .driver = { 1215 .driver = {
1216 .owner = THIS_MODULE, 1216 .owner = THIS_MODULE,
1217 .name = "broadsheetfb", 1217 .name = "broadsheetfb",
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
index 6bea9a936798..60017fc634b5 100644
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -179,7 +179,7 @@ static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
179 * Initialisation 179 * Initialisation
180 */ 180 */
181 181
182static void __devinit bw2_init_fix(struct fb_info *info, int linebytes) 182static void bw2_init_fix(struct fb_info *info, int linebytes)
183{ 183{
184 strlcpy(info->fix.id, "bwtwo", sizeof(info->fix.id)); 184 strlcpy(info->fix.id, "bwtwo", sizeof(info->fix.id));
185 185
@@ -191,44 +191,43 @@ static void __devinit bw2_init_fix(struct fb_info *info, int linebytes)
191 info->fix.accel = FB_ACCEL_SUN_BWTWO; 191 info->fix.accel = FB_ACCEL_SUN_BWTWO;
192} 192}
193 193
194static u8 bw2regs_1600[] __devinitdata = { 194static u8 bw2regs_1600[] = {
195 0x14, 0x8b, 0x15, 0x28, 0x16, 0x03, 0x17, 0x13, 195 0x14, 0x8b, 0x15, 0x28, 0x16, 0x03, 0x17, 0x13,
196 0x18, 0x7b, 0x19, 0x05, 0x1a, 0x34, 0x1b, 0x2e, 196 0x18, 0x7b, 0x19, 0x05, 0x1a, 0x34, 0x1b, 0x2e,
197 0x1c, 0x00, 0x1d, 0x0a, 0x1e, 0xff, 0x1f, 0x01, 197 0x1c, 0x00, 0x1d, 0x0a, 0x1e, 0xff, 0x1f, 0x01,
198 0x10, 0x21, 0 198 0x10, 0x21, 0
199}; 199};
200 200
201static u8 bw2regs_ecl[] __devinitdata = { 201static u8 bw2regs_ecl[] = {
202 0x14, 0x65, 0x15, 0x1e, 0x16, 0x04, 0x17, 0x0c, 202 0x14, 0x65, 0x15, 0x1e, 0x16, 0x04, 0x17, 0x0c,
203 0x18, 0x5e, 0x19, 0x03, 0x1a, 0xa7, 0x1b, 0x23, 203 0x18, 0x5e, 0x19, 0x03, 0x1a, 0xa7, 0x1b, 0x23,
204 0x1c, 0x00, 0x1d, 0x08, 0x1e, 0xff, 0x1f, 0x01, 204 0x1c, 0x00, 0x1d, 0x08, 0x1e, 0xff, 0x1f, 0x01,
205 0x10, 0x20, 0 205 0x10, 0x20, 0
206}; 206};
207 207
208static u8 bw2regs_analog[] __devinitdata = { 208static u8 bw2regs_analog[] = {
209 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x03, 0x17, 0x13, 209 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x03, 0x17, 0x13,
210 0x18, 0xb0, 0x19, 0x03, 0x1a, 0xa6, 0x1b, 0x22, 210 0x18, 0xb0, 0x19, 0x03, 0x1a, 0xa6, 0x1b, 0x22,
211 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, 211 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01,
212 0x10, 0x20, 0 212 0x10, 0x20, 0
213}; 213};
214 214
215static u8 bw2regs_76hz[] __devinitdata = { 215static u8 bw2regs_76hz[] = {
216 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, 216 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f,
217 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, 217 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a,
218 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, 218 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01,
219 0x10, 0x24, 0 219 0x10, 0x24, 0
220}; 220};
221 221
222static u8 bw2regs_66hz[] __devinitdata = { 222static u8 bw2regs_66hz[] = {
223 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, 223 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14,
224 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, 224 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24,
225 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, 225 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01,
226 0x10, 0x20, 0 226 0x10, 0x20, 0
227}; 227};
228 228
229static int __devinit bw2_do_default_mode(struct bw2_par *par, 229static int bw2_do_default_mode(struct bw2_par *par, struct fb_info *info,
230 struct fb_info *info, 230 int *linebytes)
231 int *linebytes)
232{ 231{
233 u8 status, mon; 232 u8 status, mon;
234 u8 *p; 233 u8 *p;
@@ -273,7 +272,7 @@ static int __devinit bw2_do_default_mode(struct bw2_par *par,
273 return 0; 272 return 0;
274} 273}
275 274
276static int __devinit bw2_probe(struct platform_device *op) 275static int bw2_probe(struct platform_device *op)
277{ 276{
278 struct device_node *dp = op->dev.of_node; 277 struct device_node *dp = op->dev.of_node;
279 struct fb_info *info; 278 struct fb_info *info;
@@ -352,7 +351,7 @@ out_err:
352 return err; 351 return err;
353} 352}
354 353
355static int __devexit bw2_remove(struct platform_device *op) 354static int bw2_remove(struct platform_device *op)
356{ 355{
357 struct fb_info *info = dev_get_drvdata(&op->dev); 356 struct fb_info *info = dev_get_drvdata(&op->dev);
358 struct bw2_par *par = info->par; 357 struct bw2_par *par = info->par;
@@ -384,7 +383,7 @@ static struct platform_driver bw2_driver = {
384 .of_match_table = bw2_match, 383 .of_match_table = bw2_match,
385 }, 384 },
386 .probe = bw2_probe, 385 .probe = bw2_probe,
387 .remove = __devexit_p(bw2_remove), 386 .remove = bw2_remove,
388}; 387};
389 388
390static int __init bw2_init(void) 389static int __init bw2_init(void)
diff --git a/drivers/video/carminefb.c b/drivers/video/carminefb.c
index 2c76fdf23f2a..153dd65b0ae8 100644
--- a/drivers/video/carminefb.c
+++ b/drivers/video/carminefb.c
@@ -78,7 +78,7 @@ struct carmine_fb {
78 u32 pseudo_palette[16]; 78 u32 pseudo_palette[16];
79}; 79};
80 80
81static struct fb_fix_screeninfo carminefb_fix __devinitdata = { 81static struct fb_fix_screeninfo carminefb_fix = {
82 .id = "Carmine", 82 .id = "Carmine",
83 .type = FB_TYPE_PACKED_PIXELS, 83 .type = FB_TYPE_PACKED_PIXELS,
84 .visual = FB_VISUAL_TRUECOLOR, 84 .visual = FB_VISUAL_TRUECOLOR,
@@ -537,8 +537,9 @@ static struct fb_ops carminefb_ops = {
537 .fb_setcolreg = carmine_setcolreg, 537 .fb_setcolreg = carmine_setcolreg,
538}; 538};
539 539
540static int __devinit alloc_carmine_fb(void __iomem *regs, void __iomem *smem_base, 540static int alloc_carmine_fb(void __iomem *regs, void __iomem *smem_base,
541 int smem_offset, struct device *device, struct fb_info **rinfo) 541 int smem_offset, struct device *device,
542 struct fb_info **rinfo)
542{ 543{
543 int ret; 544 int ret;
544 struct fb_info *info; 545 struct fb_info *info;
@@ -606,8 +607,7 @@ static void cleanup_fb_device(struct fb_info *info)
606 } 607 }
607} 608}
608 609
609static int __devinit carminefb_probe(struct pci_dev *dev, 610static int carminefb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
610 const struct pci_device_id *ent)
611{ 611{
612 struct carmine_hw *hw; 612 struct carmine_hw *hw;
613 struct device *device = &dev->dev; 613 struct device *device = &dev->dev;
@@ -721,7 +721,7 @@ err_enable_pci:
721 return ret; 721 return ret;
722} 722}
723 723
724static void __devexit carminefb_remove(struct pci_dev *dev) 724static void carminefb_remove(struct pci_dev *dev)
725{ 725{
726 struct carmine_hw *hw = pci_get_drvdata(dev); 726 struct carmine_hw *hw = pci_get_drvdata(dev);
727 struct fb_fix_screeninfo fix; 727 struct fb_fix_screeninfo fix;
@@ -752,7 +752,7 @@ static void __devexit carminefb_remove(struct pci_dev *dev)
752} 752}
753 753
754#define PCI_VENDOR_ID_FUJITU_LIMITED 0x10cf 754#define PCI_VENDOR_ID_FUJITU_LIMITED 0x10cf
755static struct pci_device_id carmine_devices[] __devinitdata = { 755static struct pci_device_id carmine_devices[] = {
756{ 756{
757 PCI_DEVICE(PCI_VENDOR_ID_FUJITU_LIMITED, 0x202b)}, 757 PCI_DEVICE(PCI_VENDOR_ID_FUJITU_LIMITED, 0x202b)},
758 {0, 0, 0, 0, 0, 0, 0} 758 {0, 0, 0, 0, 0, 0, 0}
@@ -764,7 +764,7 @@ static struct pci_driver carmine_pci_driver = {
764 .name = "carminefb", 764 .name = "carminefb",
765 .id_table = carmine_devices, 765 .id_table = carmine_devices,
766 .probe = carminefb_probe, 766 .probe = carminefb_probe,
767 .remove = __devexit_p(carminefb_remove), 767 .remove = carminefb_remove,
768}; 768};
769 769
770static int __init carminefb_init(void) 770static int __init carminefb_init(void)
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c
index f18895006627..ed3b8891e006 100644
--- a/drivers/video/cg14.c
+++ b/drivers/video/cg14.c
@@ -352,8 +352,8 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
352 * Initialisation 352 * Initialisation
353 */ 353 */
354 354
355static void __devinit cg14_init_fix(struct fb_info *info, int linebytes, 355static void cg14_init_fix(struct fb_info *info, int linebytes,
356 struct device_node *dp) 356 struct device_node *dp)
357{ 357{
358 const char *name = dp->name; 358 const char *name = dp->name;
359 359
@@ -367,7 +367,7 @@ static void __devinit cg14_init_fix(struct fb_info *info, int linebytes,
367 info->fix.accel = FB_ACCEL_SUN_CG14; 367 info->fix.accel = FB_ACCEL_SUN_CG14;
368} 368}
369 369
370static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __devinitdata = { 370static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] = {
371 { 371 {
372 .voff = CG14_REGS, 372 .voff = CG14_REGS,
373 .poff = 0x80000000, 373 .poff = 0x80000000,
@@ -463,7 +463,7 @@ static void cg14_unmap_regs(struct platform_device *op, struct fb_info *info,
463 info->screen_base, info->fix.smem_len); 463 info->screen_base, info->fix.smem_len);
464} 464}
465 465
466static int __devinit cg14_probe(struct platform_device *op) 466static int cg14_probe(struct platform_device *op)
467{ 467{
468 struct device_node *dp = op->dev.of_node; 468 struct device_node *dp = op->dev.of_node;
469 struct fb_info *info; 469 struct fb_info *info;
@@ -571,7 +571,7 @@ out_err:
571 return err; 571 return err;
572} 572}
573 573
574static int __devexit cg14_remove(struct platform_device *op) 574static int cg14_remove(struct platform_device *op)
575{ 575{
576 struct fb_info *info = dev_get_drvdata(&op->dev); 576 struct fb_info *info = dev_get_drvdata(&op->dev);
577 struct cg14_par *par = info->par; 577 struct cg14_par *par = info->par;
@@ -603,7 +603,7 @@ static struct platform_driver cg14_driver = {
603 .of_match_table = cg14_match, 603 .of_match_table = cg14_match,
604 }, 604 },
605 .probe = cg14_probe, 605 .probe = cg14_probe,
606 .remove = __devexit_p(cg14_remove), 606 .remove = cg14_remove,
607}; 607};
608 608
609static int __init cg14_init(void) 609static int __init cg14_init(void)
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
index c5e7612ff876..9f63507ded37 100644
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -243,8 +243,8 @@ static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
243 * Initialisation 243 * Initialisation
244 */ 244 */
245 245
246static void __devinit cg3_init_fix(struct fb_info *info, int linebytes, 246static void cg3_init_fix(struct fb_info *info, int linebytes,
247 struct device_node *dp) 247 struct device_node *dp)
248{ 248{
249 strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); 249 strlcpy(info->fix.id, dp->name, sizeof(info->fix.id));
250 250
@@ -256,8 +256,8 @@ static void __devinit cg3_init_fix(struct fb_info *info, int linebytes,
256 info->fix.accel = FB_ACCEL_SUN_CGTHREE; 256 info->fix.accel = FB_ACCEL_SUN_CGTHREE;
257} 257}
258 258
259static void __devinit cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, 259static void cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var,
260 struct device_node *dp) 260 struct device_node *dp)
261{ 261{
262 const char *params; 262 const char *params;
263 char *p; 263 char *p;
@@ -279,36 +279,36 @@ static void __devinit cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var,
279 } 279 }
280} 280}
281 281
282static u8 cg3regvals_66hz[] __devinitdata = { /* 1152 x 900, 66 Hz */ 282static u8 cg3regvals_66hz[] = { /* 1152 x 900, 66 Hz */
283 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, 283 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14,
284 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, 284 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24,
285 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, 285 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01,
286 0x10, 0x20, 0 286 0x10, 0x20, 0
287}; 287};
288 288
289static u8 cg3regvals_76hz[] __devinitdata = { /* 1152 x 900, 76 Hz */ 289static u8 cg3regvals_76hz[] = { /* 1152 x 900, 76 Hz */
290 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, 290 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f,
291 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, 291 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a,
292 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, 292 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01,
293 0x10, 0x24, 0 293 0x10, 0x24, 0
294}; 294};
295 295
296static u8 cg3regvals_rdi[] __devinitdata = { /* 640 x 480, cgRDI */ 296static u8 cg3regvals_rdi[] = { /* 640 x 480, cgRDI */
297 0x14, 0x70, 0x15, 0x20, 0x16, 0x08, 0x17, 0x10, 297 0x14, 0x70, 0x15, 0x20, 0x16, 0x08, 0x17, 0x10,
298 0x18, 0x06, 0x19, 0x02, 0x1a, 0x31, 0x1b, 0x51, 298 0x18, 0x06, 0x19, 0x02, 0x1a, 0x31, 0x1b, 0x51,
299 0x1c, 0x06, 0x1d, 0x0c, 0x1e, 0xff, 0x1f, 0x01, 299 0x1c, 0x06, 0x1d, 0x0c, 0x1e, 0xff, 0x1f, 0x01,
300 0x10, 0x22, 0 300 0x10, 0x22, 0
301}; 301};
302 302
303static u8 *cg3_regvals[] __devinitdata = { 303static u8 *cg3_regvals[] = {
304 cg3regvals_66hz, cg3regvals_76hz, cg3regvals_rdi 304 cg3regvals_66hz, cg3regvals_76hz, cg3regvals_rdi
305}; 305};
306 306
307static u_char cg3_dacvals[] __devinitdata = { 307static u_char cg3_dacvals[] = {
308 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0 308 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0
309}; 309};
310 310
311static int __devinit cg3_do_default_mode(struct cg3_par *par) 311static int cg3_do_default_mode(struct cg3_par *par)
312{ 312{
313 enum cg3_type type; 313 enum cg3_type type;
314 u8 *p; 314 u8 *p;
@@ -346,7 +346,7 @@ static int __devinit cg3_do_default_mode(struct cg3_par *par)
346 return 0; 346 return 0;
347} 347}
348 348
349static int __devinit cg3_probe(struct platform_device *op) 349static int cg3_probe(struct platform_device *op)
350{ 350{
351 struct device_node *dp = op->dev.of_node; 351 struct device_node *dp = op->dev.of_node;
352 struct fb_info *info; 352 struct fb_info *info;
@@ -433,7 +433,7 @@ out_err:
433 return err; 433 return err;
434} 434}
435 435
436static int __devexit cg3_remove(struct platform_device *op) 436static int cg3_remove(struct platform_device *op)
437{ 437{
438 struct fb_info *info = dev_get_drvdata(&op->dev); 438 struct fb_info *info = dev_get_drvdata(&op->dev);
439 struct cg3_par *par = info->par; 439 struct cg3_par *par = info->par;
@@ -469,7 +469,7 @@ static struct platform_driver cg3_driver = {
469 .of_match_table = cg3_match, 469 .of_match_table = cg3_match,
470 }, 470 },
471 .probe = cg3_probe, 471 .probe = cg3_probe,
472 .remove = __devexit_p(cg3_remove), 472 .remove = cg3_remove,
473}; 473};
474 474
475static int __init cg3_init(void) 475static int __init cg3_init(void)
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 179e96cdb323..3545decc7485 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -607,7 +607,7 @@ static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
607 * Initialisation 607 * Initialisation
608 */ 608 */
609 609
610static void __devinit cg6_init_fix(struct fb_info *info, int linebytes) 610static void cg6_init_fix(struct fb_info *info, int linebytes)
611{ 611{
612 struct cg6_par *par = (struct cg6_par *)info->par; 612 struct cg6_par *par = (struct cg6_par *)info->par;
613 const char *cg6_cpu_name, *cg6_card_name; 613 const char *cg6_cpu_name, *cg6_card_name;
@@ -649,7 +649,7 @@ static void __devinit cg6_init_fix(struct fb_info *info, int linebytes)
649} 649}
650 650
651/* Initialize Brooktree DAC */ 651/* Initialize Brooktree DAC */
652static void __devinit cg6_bt_init(struct cg6_par *par) 652static void cg6_bt_init(struct cg6_par *par)
653{ 653{
654 struct bt_regs __iomem *bt = par->bt; 654 struct bt_regs __iomem *bt = par->bt;
655 655
@@ -663,7 +663,7 @@ static void __devinit cg6_bt_init(struct cg6_par *par)
663 sbus_writel(0x00 << 24, &bt->control); 663 sbus_writel(0x00 << 24, &bt->control);
664} 664}
665 665
666static void __devinit cg6_chip_init(struct fb_info *info) 666static void cg6_chip_init(struct fb_info *info)
667{ 667{
668 struct cg6_par *par = (struct cg6_par *)info->par; 668 struct cg6_par *par = (struct cg6_par *)info->par;
669 struct cg6_tec __iomem *tec = par->tec; 669 struct cg6_tec __iomem *tec = par->tec;
@@ -737,7 +737,7 @@ static void cg6_unmap_regs(struct platform_device *op, struct fb_info *info,
737 info->fix.smem_len); 737 info->fix.smem_len);
738} 738}
739 739
740static int __devinit cg6_probe(struct platform_device *op) 740static int cg6_probe(struct platform_device *op)
741{ 741{
742 struct device_node *dp = op->dev.of_node; 742 struct device_node *dp = op->dev.of_node;
743 struct fb_info *info; 743 struct fb_info *info;
@@ -827,7 +827,7 @@ out_err:
827 return err; 827 return err;
828} 828}
829 829
830static int __devexit cg6_remove(struct platform_device *op) 830static int cg6_remove(struct platform_device *op)
831{ 831{
832 struct fb_info *info = dev_get_drvdata(&op->dev); 832 struct fb_info *info = dev_get_drvdata(&op->dev);
833 struct cg6_par *par = info->par; 833 struct cg6_par *par = info->par;
@@ -862,7 +862,7 @@ static struct platform_driver cg6_driver = {
862 .of_match_table = cg6_match, 862 .of_match_table = cg6_match,
863 }, 863 },
864 .probe = cg6_probe, 864 .probe = cg6_probe,
865 .remove = __devexit_p(cg6_remove), 865 .remove = cg6_remove,
866}; 866};
867 867
868static int __init cg6_init(void) 868static int __init cg6_init(void)
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c
index cff742abdc5d..206a66b61072 100644
--- a/drivers/video/chipsfb.c
+++ b/drivers/video/chipsfb.c
@@ -292,7 +292,7 @@ static void __init chips_hw_init(void)
292 write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); 292 write_fr(chips_init_fr[i].addr, chips_init_fr[i].data);
293} 293}
294 294
295static struct fb_fix_screeninfo chipsfb_fix __devinitdata = { 295static struct fb_fix_screeninfo chipsfb_fix = {
296 .id = "C&T 65550", 296 .id = "C&T 65550",
297 .type = FB_TYPE_PACKED_PIXELS, 297 .type = FB_TYPE_PACKED_PIXELS,
298 .visual = FB_VISUAL_PSEUDOCOLOR, 298 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -309,7 +309,7 @@ static struct fb_fix_screeninfo chipsfb_fix __devinitdata = {
309 .smem_len = 0x100000, /* 1MB */ 309 .smem_len = 0x100000, /* 1MB */
310}; 310};
311 311
312static struct fb_var_screeninfo chipsfb_var __devinitdata = { 312static struct fb_var_screeninfo chipsfb_var = {
313 .xres = 800, 313 .xres = 800,
314 .yres = 600, 314 .yres = 600,
315 .xres_virtual = 800, 315 .xres_virtual = 800,
@@ -330,7 +330,7 @@ static struct fb_var_screeninfo chipsfb_var __devinitdata = {
330 .vsync_len = 8, 330 .vsync_len = 8,
331}; 331};
332 332
333static void __devinit init_chips(struct fb_info *p, unsigned long addr) 333static void init_chips(struct fb_info *p, unsigned long addr)
334{ 334{
335 memset(p->screen_base, 0, 0x100000); 335 memset(p->screen_base, 0, 0x100000);
336 336
@@ -347,8 +347,7 @@ static void __devinit init_chips(struct fb_info *p, unsigned long addr)
347 chips_hw_init(); 347 chips_hw_init();
348} 348}
349 349
350static int __devinit 350static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
351chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
352{ 351{
353 struct fb_info *p; 352 struct fb_info *p;
354 unsigned long addr, size; 353 unsigned long addr, size;
@@ -438,7 +437,7 @@ chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
438 return rc; 437 return rc;
439} 438}
440 439
441static void __devexit chipsfb_remove(struct pci_dev *dp) 440static void chipsfb_remove(struct pci_dev *dp)
442{ 441{
443 struct fb_info *p = pci_get_drvdata(dp); 442 struct fb_info *p = pci_get_drvdata(dp);
444 443
@@ -495,7 +494,7 @@ static struct pci_driver chipsfb_driver = {
495 .name = "chipsfb", 494 .name = "chipsfb",
496 .id_table = chipsfb_pci_tbl, 495 .id_table = chipsfb_pci_tbl,
497 .probe = chipsfb_pci_init, 496 .probe = chipsfb_pci_init,
498 .remove = __devexit_p(chipsfb_remove), 497 .remove = chipsfb_remove,
499#ifdef CONFIG_PM 498#ifdef CONFIG_PM
500 .suspend = chipsfb_pci_suspend, 499 .suspend = chipsfb_pci_suspend,
501 .resume = chipsfb_pci_resume, 500 .resume = chipsfb_pci_resume,
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index bc67d05cad60..c3dbbe6e3acf 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -290,34 +290,34 @@ struct zorrocl {
290 zorro_id ramid2; /* Zorro ID of optional second RAM device */ 290 zorro_id ramid2; /* Zorro ID of optional second RAM device */
291}; 291};
292 292
293static const struct zorrocl zcl_sd64 __devinitconst = { 293static const struct zorrocl zcl_sd64 = {
294 .type = BT_SD64, 294 .type = BT_SD64,
295 .ramid = ZORRO_PROD_HELFRICH_SD64_RAM, 295 .ramid = ZORRO_PROD_HELFRICH_SD64_RAM,
296}; 296};
297 297
298static const struct zorrocl zcl_piccolo __devinitconst = { 298static const struct zorrocl zcl_piccolo = {
299 .type = BT_PICCOLO, 299 .type = BT_PICCOLO,
300 .ramid = ZORRO_PROD_HELFRICH_PICCOLO_RAM, 300 .ramid = ZORRO_PROD_HELFRICH_PICCOLO_RAM,
301}; 301};
302 302
303static const struct zorrocl zcl_picasso __devinitconst = { 303static const struct zorrocl zcl_picasso = {
304 .type = BT_PICASSO, 304 .type = BT_PICASSO,
305 .ramid = ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM, 305 .ramid = ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM,
306}; 306};
307 307
308static const struct zorrocl zcl_spectrum __devinitconst = { 308static const struct zorrocl zcl_spectrum = {
309 .type = BT_SPECTRUM, 309 .type = BT_SPECTRUM,
310 .ramid = ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM, 310 .ramid = ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM,
311}; 311};
312 312
313static const struct zorrocl zcl_picasso4_z3 __devinitconst = { 313static const struct zorrocl zcl_picasso4_z3 = {
314 .type = BT_PICASSO4, 314 .type = BT_PICASSO4,
315 .regoffset = 0x00600000, 315 .regoffset = 0x00600000,
316 .ramsize = 4 * MB_, 316 .ramsize = 4 * MB_,
317 .ramoffset = 0x01000000, /* 0x02000000 for 64 MiB boards */ 317 .ramoffset = 0x01000000, /* 0x02000000 for 64 MiB boards */
318}; 318};
319 319
320static const struct zorrocl zcl_picasso4_z2 __devinitconst = { 320static const struct zorrocl zcl_picasso4_z2 = {
321 .type = BT_PICASSO4, 321 .type = BT_PICASSO4,
322 .regoffset = 0x10000, 322 .regoffset = 0x10000,
323 .ramid = ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM1, 323 .ramid = ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM1,
@@ -325,7 +325,7 @@ static const struct zorrocl zcl_picasso4_z2 __devinitconst = {
325}; 325};
326 326
327 327
328static const struct zorro_device_id cirrusfb_zorro_table[] __devinitconst = { 328static const struct zorro_device_id cirrusfb_zorro_table[] = {
329 { 329 {
330 .id = ZORRO_PROD_HELFRICH_SD64_REG, 330 .id = ZORRO_PROD_HELFRICH_SD64_REG,
331 .driver_data = (unsigned long)&zcl_sd64, 331 .driver_data = (unsigned long)&zcl_sd64,
@@ -372,8 +372,8 @@ struct cirrusfb_info {
372 void (*unmap)(struct fb_info *info); 372 void (*unmap)(struct fb_info *info);
373}; 373};
374 374
375static bool noaccel __devinitdata; 375static bool noaccel;
376static char *mode_option __devinitdata = "640x480@60"; 376static char *mode_option = "640x480@60";
377 377
378/****************************************************************************/ 378/****************************************************************************/
379/**** BEGIN PROTOTYPES ******************************************************/ 379/**** BEGIN PROTOTYPES ******************************************************/
@@ -1892,8 +1892,8 @@ static int release_io_ports;
1892 * based on the DRAM bandwidth bit and DRAM bank switching bit. This 1892 * based on the DRAM bandwidth bit and DRAM bank switching bit. This
1893 * works with 1MB, 2MB and 4MB configurations (which the Motorola boards 1893 * works with 1MB, 2MB and 4MB configurations (which the Motorola boards
1894 * seem to have. */ 1894 * seem to have. */
1895static unsigned int __devinit cirrusfb_get_memsize(struct fb_info *info, 1895static unsigned int cirrusfb_get_memsize(struct fb_info *info,
1896 u8 __iomem *regbase) 1896 u8 __iomem *regbase)
1897{ 1897{
1898 unsigned long mem; 1898 unsigned long mem;
1899 struct cirrusfb_info *cinfo = info->par; 1899 struct cirrusfb_info *cinfo = info->par;
@@ -2003,7 +2003,7 @@ static struct fb_ops cirrusfb_ops = {
2003 .fb_imageblit = cirrusfb_imageblit, 2003 .fb_imageblit = cirrusfb_imageblit,
2004}; 2004};
2005 2005
2006static int __devinit cirrusfb_set_fbinfo(struct fb_info *info) 2006static int cirrusfb_set_fbinfo(struct fb_info *info)
2007{ 2007{
2008 struct cirrusfb_info *cinfo = info->par; 2008 struct cirrusfb_info *cinfo = info->par;
2009 struct fb_var_screeninfo *var = &info->var; 2009 struct fb_var_screeninfo *var = &info->var;
@@ -2052,7 +2052,7 @@ static int __devinit cirrusfb_set_fbinfo(struct fb_info *info)
2052 return 0; 2052 return 0;
2053} 2053}
2054 2054
2055static int __devinit cirrusfb_register(struct fb_info *info) 2055static int cirrusfb_register(struct fb_info *info)
2056{ 2056{
2057 struct cirrusfb_info *cinfo = info->par; 2057 struct cirrusfb_info *cinfo = info->par;
2058 int err; 2058 int err;
@@ -2096,7 +2096,7 @@ err_dealloc_cmap:
2096 return err; 2096 return err;
2097} 2097}
2098 2098
2099static void __devexit cirrusfb_cleanup(struct fb_info *info) 2099static void cirrusfb_cleanup(struct fb_info *info)
2100{ 2100{
2101 struct cirrusfb_info *cinfo = info->par; 2101 struct cirrusfb_info *cinfo = info->par;
2102 2102
@@ -2109,8 +2109,8 @@ static void __devexit cirrusfb_cleanup(struct fb_info *info)
2109} 2109}
2110 2110
2111#ifdef CONFIG_PCI 2111#ifdef CONFIG_PCI
2112static int __devinit cirrusfb_pci_register(struct pci_dev *pdev, 2112static int cirrusfb_pci_register(struct pci_dev *pdev,
2113 const struct pci_device_id *ent) 2113 const struct pci_device_id *ent)
2114{ 2114{
2115 struct cirrusfb_info *cinfo; 2115 struct cirrusfb_info *cinfo;
2116 struct fb_info *info; 2116 struct fb_info *info;
@@ -2215,7 +2215,7 @@ err_out:
2215 return ret; 2215 return ret;
2216} 2216}
2217 2217
2218static void __devexit cirrusfb_pci_unregister(struct pci_dev *pdev) 2218static void cirrusfb_pci_unregister(struct pci_dev *pdev)
2219{ 2219{
2220 struct fb_info *info = pci_get_drvdata(pdev); 2220 struct fb_info *info = pci_get_drvdata(pdev);
2221 2221
@@ -2226,7 +2226,7 @@ static struct pci_driver cirrusfb_pci_driver = {
2226 .name = "cirrusfb", 2226 .name = "cirrusfb",
2227 .id_table = cirrusfb_pci_table, 2227 .id_table = cirrusfb_pci_table,
2228 .probe = cirrusfb_pci_register, 2228 .probe = cirrusfb_pci_register,
2229 .remove = __devexit_p(cirrusfb_pci_unregister), 2229 .remove = cirrusfb_pci_unregister,
2230#ifdef CONFIG_PM 2230#ifdef CONFIG_PM
2231#if 0 2231#if 0
2232 .suspend = cirrusfb_pci_suspend, 2232 .suspend = cirrusfb_pci_suspend,
@@ -2237,8 +2237,8 @@ static struct pci_driver cirrusfb_pci_driver = {
2237#endif /* CONFIG_PCI */ 2237#endif /* CONFIG_PCI */
2238 2238
2239#ifdef CONFIG_ZORRO 2239#ifdef CONFIG_ZORRO
2240static int __devinit cirrusfb_zorro_register(struct zorro_dev *z, 2240static int cirrusfb_zorro_register(struct zorro_dev *z,
2241 const struct zorro_device_id *ent) 2241 const struct zorro_device_id *ent)
2242{ 2242{
2243 struct fb_info *info; 2243 struct fb_info *info;
2244 int error; 2244 int error;
@@ -2352,7 +2352,7 @@ err_release_fb:
2352 return error; 2352 return error;
2353} 2353}
2354 2354
2355void __devexit cirrusfb_zorro_unregister(struct zorro_dev *z) 2355void cirrusfb_zorro_unregister(struct zorro_dev *z)
2356{ 2356{
2357 struct fb_info *info = zorro_get_drvdata(z); 2357 struct fb_info *info = zorro_get_drvdata(z);
2358 2358
@@ -2364,7 +2364,7 @@ static struct zorro_driver cirrusfb_zorro_driver = {
2364 .name = "cirrusfb", 2364 .name = "cirrusfb",
2365 .id_table = cirrusfb_zorro_table, 2365 .id_table = cirrusfb_zorro_table,
2366 .probe = cirrusfb_zorro_register, 2366 .probe = cirrusfb_zorro_register,
2367 .remove = __devexit_p(cirrusfb_zorro_unregister), 2367 .remove = cirrusfb_zorro_unregister,
2368}; 2368};
2369#endif /* CONFIG_ZORRO */ 2369#endif /* CONFIG_ZORRO */
2370 2370
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
index 63ecdf8f7baf..5a7af0deced2 100644
--- a/drivers/video/clps711xfb.c
+++ b/drivers/video/clps711xfb.c
@@ -178,7 +178,7 @@ static struct fb_ops clps7111fb_ops = {
178 .fb_imageblit = cfb_imageblit, 178 .fb_imageblit = cfb_imageblit,
179}; 179};
180 180
181static void __devinit clps711x_guess_lcd_params(struct fb_info *info) 181static void clps711x_guess_lcd_params(struct fb_info *info)
182{ 182{
183 unsigned int lcdcon, syscon, size; 183 unsigned int lcdcon, syscon, size;
184 unsigned long phys_base = PAGE_OFFSET; 184 unsigned long phys_base = PAGE_OFFSET;
@@ -266,7 +266,7 @@ static void __devinit clps711x_guess_lcd_params(struct fb_info *info)
266 info->fix.type = FB_TYPE_PACKED_PIXELS; 266 info->fix.type = FB_TYPE_PACKED_PIXELS;
267} 267}
268 268
269static int __devinit clps711x_fb_probe(struct platform_device *pdev) 269static int clps711x_fb_probe(struct platform_device *pdev)
270{ 270{
271 int err = -ENOMEM; 271 int err = -ENOMEM;
272 272
@@ -291,7 +291,7 @@ static int __devinit clps711x_fb_probe(struct platform_device *pdev)
291out: return err; 291out: return err;
292} 292}
293 293
294static int __devexit clps711x_fb_remove(struct platform_device *pdev) 294static int clps711x_fb_remove(struct platform_device *pdev)
295{ 295{
296 unregister_framebuffer(cfb); 296 unregister_framebuffer(cfb);
297 kfree(cfb); 297 kfree(cfb);
@@ -305,7 +305,7 @@ static struct platform_driver clps711x_fb_driver = {
305 .owner = THIS_MODULE, 305 .owner = THIS_MODULE,
306 }, 306 },
307 .probe = clps711x_fb_probe, 307 .probe = clps711x_fb_probe,
308 .remove = __devexit_p(clps711x_fb_remove), 308 .remove = clps711x_fb_remove,
309}; 309};
310module_platform_driver(clps711x_fb_driver); 310module_platform_driver(clps711x_fb_driver);
311 311
diff --git a/drivers/video/cobalt_lcdfb.c b/drivers/video/cobalt_lcdfb.c
index 01a4ee7cc6b1..a9031498e10c 100644
--- a/drivers/video/cobalt_lcdfb.c
+++ b/drivers/video/cobalt_lcdfb.c
@@ -167,7 +167,7 @@ static void lcd_clear(struct fb_info *info)
167 lcd_write_control(info, LCD_RESET); 167 lcd_write_control(info, LCD_RESET);
168} 168}
169 169
170static struct fb_fix_screeninfo cobalt_lcdfb_fix __devinitdata = { 170static struct fb_fix_screeninfo cobalt_lcdfb_fix = {
171 .id = "cobalt-lcd", 171 .id = "cobalt-lcd",
172 .type = FB_TYPE_TEXT, 172 .type = FB_TYPE_TEXT,
173 .type_aux = FB_AUX_TEXT_MDA, 173 .type_aux = FB_AUX_TEXT_MDA,
@@ -331,7 +331,7 @@ static struct fb_ops cobalt_lcd_fbops = {
331 .fb_cursor = cobalt_lcdfb_cursor, 331 .fb_cursor = cobalt_lcdfb_cursor,
332}; 332};
333 333
334static int __devinit cobalt_lcdfb_probe(struct platform_device *dev) 334static int cobalt_lcdfb_probe(struct platform_device *dev)
335{ 335{
336 struct fb_info *info; 336 struct fb_info *info;
337 struct resource *res; 337 struct resource *res;
@@ -374,7 +374,7 @@ static int __devinit cobalt_lcdfb_probe(struct platform_device *dev)
374 return 0; 374 return 0;
375} 375}
376 376
377static int __devexit cobalt_lcdfb_remove(struct platform_device *dev) 377static int cobalt_lcdfb_remove(struct platform_device *dev)
378{ 378{
379 struct fb_info *info; 379 struct fb_info *info;
380 380
@@ -389,7 +389,7 @@ static int __devexit cobalt_lcdfb_remove(struct platform_device *dev)
389 389
390static struct platform_driver cobalt_lcdfb_driver = { 390static struct platform_driver cobalt_lcdfb_driver = {
391 .probe = cobalt_lcdfb_probe, 391 .probe = cobalt_lcdfb_probe,
392 .remove = __devexit_p(cobalt_lcdfb_remove), 392 .remove = cobalt_lcdfb_remove,
393 .driver = { 393 .driver = {
394 .name = "cobalt-lcd", 394 .name = "cobalt-lcd",
395 .owner = THIS_MODULE, 395 .owner = THIS_MODULE,
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c
index 39571f9e0162..35687fd56456 100644
--- a/drivers/video/console/sticore.c
+++ b/drivers/video/console/sticore.c
@@ -238,8 +238,7 @@ static void sti_flush(unsigned long start, unsigned long end)
238 flush_icache_range(start, end); 238 flush_icache_range(start, end);
239} 239}
240 240
241static void __devinit sti_rom_copy(unsigned long base, unsigned long count, 241static void sti_rom_copy(unsigned long base, unsigned long count, void *dest)
242 void *dest)
243{ 242{
244 unsigned long dest_start = (unsigned long) dest; 243 unsigned long dest_start = (unsigned long) dest;
245 244
@@ -266,7 +265,7 @@ static void __devinit sti_rom_copy(unsigned long base, unsigned long count,
266static char default_sti_path[21] __read_mostly; 265static char default_sti_path[21] __read_mostly;
267 266
268#ifndef MODULE 267#ifndef MODULE
269static int __devinit sti_setup(char *str) 268static int sti_setup(char *str)
270{ 269{
271 if (str) 270 if (str)
272 strlcpy (default_sti_path, str, sizeof (default_sti_path)); 271 strlcpy (default_sti_path, str, sizeof (default_sti_path));
@@ -285,12 +284,12 @@ __setup("sti=", sti_setup);
285 284
286 285
287 286
288static char __devinitdata *font_name[MAX_STI_ROMS] = { "VGA8x16", }; 287static char *font_name[MAX_STI_ROMS] = { "VGA8x16", };
289static int __devinitdata font_index[MAX_STI_ROMS], 288static int font_index[MAX_STI_ROMS],
290 font_height[MAX_STI_ROMS], 289 font_height[MAX_STI_ROMS],
291 font_width[MAX_STI_ROMS]; 290 font_width[MAX_STI_ROMS];
292#ifndef MODULE 291#ifndef MODULE
293static int __devinit sti_font_setup(char *str) 292static int sti_font_setup(char *str)
294{ 293{
295 char *x; 294 char *x;
296 int i = 0; 295 int i = 0;
@@ -343,8 +342,8 @@ __setup("sti_font=", sti_font_setup);
343 342
344 343
345 344
346static void __devinit 345static void sti_dump_globcfg(struct sti_glob_cfg *glob_cfg,
347sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) 346 unsigned int sti_mem_request)
348{ 347{
349 struct sti_glob_cfg_ext *cfg; 348 struct sti_glob_cfg_ext *cfg;
350 349
@@ -383,8 +382,7 @@ sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request)
383 cfg->sti_mem_addr, sti_mem_request)); 382 cfg->sti_mem_addr, sti_mem_request));
384} 383}
385 384
386static void __devinit 385static void sti_dump_outptr(struct sti_struct *sti)
387sti_dump_outptr(struct sti_struct *sti)
388{ 386{
389 DPRINTK((KERN_INFO 387 DPRINTK((KERN_INFO
390 "%d bits per pixel\n" 388 "%d bits per pixel\n"
@@ -397,9 +395,8 @@ sti_dump_outptr(struct sti_struct *sti)
397 sti->outptr.attributes)); 395 sti->outptr.attributes));
398} 396}
399 397
400static int __devinit 398static int sti_init_glob_cfg(struct sti_struct *sti, unsigned long rom_address,
401sti_init_glob_cfg(struct sti_struct *sti, 399 unsigned long hpa)
402 unsigned long rom_address, unsigned long hpa)
403{ 400{
404 struct sti_glob_cfg *glob_cfg; 401 struct sti_glob_cfg *glob_cfg;
405 struct sti_glob_cfg_ext *glob_cfg_ext; 402 struct sti_glob_cfg_ext *glob_cfg_ext;
@@ -479,8 +476,8 @@ sti_init_glob_cfg(struct sti_struct *sti,
479} 476}
480 477
481#ifdef CONFIG_FB 478#ifdef CONFIG_FB
482static struct sti_cooked_font __devinit 479static struct sti_cooked_font *
483*sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) 480sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
484{ 481{
485 const struct font_desc *fbfont; 482 const struct font_desc *fbfont;
486 unsigned int size, bpc; 483 unsigned int size, bpc;
@@ -535,16 +532,15 @@ static struct sti_cooked_font __devinit
535 return cooked_font; 532 return cooked_font;
536} 533}
537#else 534#else
538static struct sti_cooked_font __devinit 535static struct sti_cooked_font *
539*sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) 536sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
540{ 537{
541 return NULL; 538 return NULL;
542} 539}
543#endif 540#endif
544 541
545static struct sti_cooked_font __devinit 542static struct sti_cooked_font *sti_select_font(struct sti_cooked_rom *rom,
546*sti_select_font(struct sti_cooked_rom *rom, 543 int (*search_font_fnc)(struct sti_cooked_rom *, int, int))
547 int (*search_font_fnc)(struct sti_cooked_rom *, int, int))
548{ 544{
549 struct sti_cooked_font *font; 545 struct sti_cooked_font *font;
550 int i; 546 int i;
@@ -569,8 +565,7 @@ static struct sti_cooked_font __devinit
569} 565}
570 566
571 567
572static void __devinit 568static void sti_dump_rom(struct sti_rom *rom)
573sti_dump_rom(struct sti_rom *rom)
574{ 569{
575 printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", 570 printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n",
576 rom->graphics_id[0], 571 rom->graphics_id[0],
@@ -587,9 +582,8 @@ sti_dump_rom(struct sti_rom *rom)
587} 582}
588 583
589 584
590static int __devinit 585static int sti_cook_fonts(struct sti_cooked_rom *cooked_rom,
591sti_cook_fonts(struct sti_cooked_rom *cooked_rom, 586 struct sti_rom *raw_rom)
592 struct sti_rom *raw_rom)
593{ 587{
594 struct sti_rom_font *raw_font, *font_start; 588 struct sti_rom_font *raw_font, *font_start;
595 struct sti_cooked_font *cooked_font; 589 struct sti_cooked_font *cooked_font;
@@ -622,8 +616,7 @@ sti_cook_fonts(struct sti_cooked_rom *cooked_rom,
622} 616}
623 617
624 618
625static int __devinit 619static int sti_search_font(struct sti_cooked_rom *rom, int height, int width)
626sti_search_font(struct sti_cooked_rom *rom, int height, int width)
627{ 620{
628 struct sti_cooked_font *font; 621 struct sti_cooked_font *font;
629 int i = 0; 622 int i = 0;
@@ -639,8 +632,7 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width)
639#define BMODE_RELOCATE(offset) offset = (offset) / 4; 632#define BMODE_RELOCATE(offset) offset = (offset) / 4;
640#define BMODE_LAST_ADDR_OFFS 0x50 633#define BMODE_LAST_ADDR_OFFS 0x50
641 634
642static void * __devinit 635static void *sti_bmode_font_raw(struct sti_cooked_font *f)
643sti_bmode_font_raw(struct sti_cooked_font *f)
644{ 636{
645 unsigned char *n, *p, *q; 637 unsigned char *n, *p, *q;
646 int size = f->raw->bytes_per_char*256+sizeof(struct sti_rom_font); 638 int size = f->raw->bytes_per_char*256+sizeof(struct sti_rom_font);
@@ -657,8 +649,8 @@ sti_bmode_font_raw(struct sti_cooked_font *f)
657 return n + 3; 649 return n + 3;
658} 650}
659 651
660static void __devinit 652static void sti_bmode_rom_copy(unsigned long base, unsigned long count,
661sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) 653 void *dest)
662{ 654{
663 unsigned long dest_start = (unsigned long) dest; 655 unsigned long dest_start = (unsigned long) dest;
664 656
@@ -672,8 +664,7 @@ sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest)
672 sti_flush(dest_start, (unsigned long)dest); 664 sti_flush(dest_start, (unsigned long)dest);
673} 665}
674 666
675static struct sti_rom * __devinit 667static struct sti_rom *sti_get_bmode_rom (unsigned long address)
676sti_get_bmode_rom (unsigned long address)
677{ 668{
678 struct sti_rom *raw; 669 struct sti_rom *raw;
679 u32 size; 670 u32 size;
@@ -708,7 +699,7 @@ sti_get_bmode_rom (unsigned long address)
708 return raw; 699 return raw;
709} 700}
710 701
711static struct sti_rom __devinit *sti_get_wmode_rom(unsigned long address) 702static struct sti_rom *sti_get_wmode_rom(unsigned long address)
712{ 703{
713 struct sti_rom *raw; 704 struct sti_rom *raw;
714 unsigned long size; 705 unsigned long size;
@@ -723,8 +714,8 @@ static struct sti_rom __devinit *sti_get_wmode_rom(unsigned long address)
723 return raw; 714 return raw;
724} 715}
725 716
726static int __devinit sti_read_rom(int wordmode, struct sti_struct *sti, 717static int sti_read_rom(int wordmode, struct sti_struct *sti,
727 unsigned long address) 718 unsigned long address)
728{ 719{
729 struct sti_cooked_rom *cooked; 720 struct sti_cooked_rom *cooked;
730 struct sti_rom *raw = NULL; 721 struct sti_rom *raw = NULL;
@@ -806,8 +797,9 @@ out_err:
806 return 0; 797 return 0;
807} 798}
808 799
809static struct sti_struct * __devinit 800static struct sti_struct *sti_try_rom_generic(unsigned long address,
810sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd) 801 unsigned long hpa,
802 struct pci_dev *pd)
811{ 803{
812 struct sti_struct *sti; 804 struct sti_struct *sti;
813 int ok; 805 int ok;
@@ -921,7 +913,7 @@ out_err:
921 return NULL; 913 return NULL;
922} 914}
923 915
924static void __devinit sticore_check_for_default_sti(struct sti_struct *sti, char *path) 916static void sticore_check_for_default_sti(struct sti_struct *sti, char *path)
925{ 917{
926 if (strcmp (path, default_sti_path) == 0) 918 if (strcmp (path, default_sti_path) == 0)
927 default_sti = sti; 919 default_sti = sti;
@@ -932,7 +924,7 @@ static void __devinit sticore_check_for_default_sti(struct sti_struct *sti, char
932 * in the additional address field addr[1] while on 924 * in the additional address field addr[1] while on
933 * older Systems the PDC stores it in page0->proc_sti 925 * older Systems the PDC stores it in page0->proc_sti
934 */ 926 */
935static int __devinit sticore_pa_init(struct parisc_device *dev) 927static int sticore_pa_init(struct parisc_device *dev)
936{ 928{
937 char pa_path[21]; 929 char pa_path[21];
938 struct sti_struct *sti = NULL; 930 struct sti_struct *sti = NULL;
@@ -953,8 +945,7 @@ static int __devinit sticore_pa_init(struct parisc_device *dev)
953} 945}
954 946
955 947
956static int __devinit sticore_pci_init(struct pci_dev *pd, 948static int sticore_pci_init(struct pci_dev *pd, const struct pci_device_id *ent)
957 const struct pci_device_id *ent)
958{ 949{
959#ifdef CONFIG_PCI 950#ifdef CONFIG_PCI
960 unsigned long fb_base, rom_base; 951 unsigned long fb_base, rom_base;
@@ -1001,7 +992,7 @@ static int __devinit sticore_pci_init(struct pci_dev *pd,
1001} 992}
1002 993
1003 994
1004static void __devexit sticore_pci_remove(struct pci_dev *pd) 995static void sticore_pci_remove(struct pci_dev *pd)
1005{ 996{
1006 BUG(); 997 BUG();
1007} 998}
@@ -1043,7 +1034,7 @@ static struct parisc_driver pa_sti_driver = {
1043 1034
1044static int sticore_initialized __read_mostly; 1035static int sticore_initialized __read_mostly;
1045 1036
1046static void __devinit sti_init_roms(void) 1037static void sti_init_roms(void)
1047{ 1038{
1048 if (sticore_initialized) 1039 if (sticore_initialized)
1049 return; 1040 return;
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index e40125cb313e..57886787ead0 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -1230,7 +1230,7 @@ static int cyber2000fb_ddc_getsda(void *data)
1230 return retval; 1230 return retval;
1231} 1231}
1232 1232
1233static int __devinit cyber2000fb_setup_ddc_bus(struct cfb_info *cfb) 1233static int cyber2000fb_setup_ddc_bus(struct cfb_info *cfb)
1234{ 1234{
1235 strlcpy(cfb->ddc_adapter.name, cfb->fb.fix.id, 1235 strlcpy(cfb->ddc_adapter.name, cfb->fb.fix.id,
1236 sizeof(cfb->ddc_adapter.name)); 1236 sizeof(cfb->ddc_adapter.name));
@@ -1305,7 +1305,7 @@ static int cyber2000fb_i2c_getscl(void *data)
1305 return ret; 1305 return ret;
1306} 1306}
1307 1307
1308static int __devinit cyber2000fb_i2c_register(struct cfb_info *cfb) 1308static int cyber2000fb_i2c_register(struct cfb_info *cfb)
1309{ 1309{
1310 strlcpy(cfb->i2c_adapter.name, cfb->fb.fix.id, 1310 strlcpy(cfb->i2c_adapter.name, cfb->fb.fix.id,
1311 sizeof(cfb->i2c_adapter.name)); 1311 sizeof(cfb->i2c_adapter.name));
@@ -1336,7 +1336,7 @@ static void cyber2000fb_i2c_unregister(struct cfb_info *cfb)
1336 * These parameters give 1336 * These parameters give
1337 * 640x480, hsync 31.5kHz, vsync 60Hz 1337 * 640x480, hsync 31.5kHz, vsync 60Hz
1338 */ 1338 */
1339static struct fb_videomode __devinitdata cyber2000fb_default_mode = { 1339static struct fb_videomode cyber2000fb_default_mode = {
1340 .refresh = 60, 1340 .refresh = 60,
1341 .xres = 640, 1341 .xres = 640,
1342 .yres = 480, 1342 .yres = 480,
@@ -1404,8 +1404,7 @@ static void cyberpro_init_hw(struct cfb_info *cfb)
1404 } 1404 }
1405} 1405}
1406 1406
1407static struct cfb_info __devinit *cyberpro_alloc_fb_info(unsigned int id, 1407static struct cfb_info *cyberpro_alloc_fb_info(unsigned int id, char *name)
1408 char *name)
1409{ 1408{
1410 struct cfb_info *cfb; 1409 struct cfb_info *cfb;
1411 1410
@@ -1524,7 +1523,7 @@ static int cyber2000fb_setup(char *options)
1524 * - memory mapped access to the registers 1523 * - memory mapped access to the registers
1525 * - initialised mem_ctl1 and mem_ctl2 appropriately. 1524 * - initialised mem_ctl1 and mem_ctl2 appropriately.
1526 */ 1525 */
1527static int __devinit cyberpro_common_probe(struct cfb_info *cfb) 1526static int cyberpro_common_probe(struct cfb_info *cfb)
1528{ 1527{
1529 u_long smem_size; 1528 u_long smem_size;
1530 u_int h_sync, v_sync; 1529 u_int h_sync, v_sync;
@@ -1615,7 +1614,7 @@ failed:
1615 return err; 1614 return err;
1616} 1615}
1617 1616
1618static void __devexit cyberpro_common_remove(struct cfb_info *cfb) 1617static void cyberpro_common_remove(struct cfb_info *cfb)
1619{ 1618{
1620 unregister_framebuffer(&cfb->fb); 1619 unregister_framebuffer(&cfb->fb);
1621#ifdef CONFIG_FB_CYBER2000_DDC 1620#ifdef CONFIG_FB_CYBER2000_DDC
@@ -1646,7 +1645,7 @@ static void cyberpro_common_resume(struct cfb_info *cfb)
1646 1645
1647#include <mach/framebuffer.h> 1646#include <mach/framebuffer.h>
1648 1647
1649static int __devinit cyberpro_vl_probe(void) 1648static int cyberpro_vl_probe(void)
1650{ 1649{
1651 struct cfb_info *cfb; 1650 struct cfb_info *cfb;
1652 int err = -ENOMEM; 1651 int err = -ENOMEM;
@@ -1780,8 +1779,8 @@ static int cyberpro_pci_enable_mmio(struct cfb_info *cfb)
1780 return 0; 1779 return 0;
1781} 1780}
1782 1781
1783static int __devinit 1782static int cyberpro_pci_probe(struct pci_dev *dev,
1784cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) 1783 const struct pci_device_id *id)
1785{ 1784{
1786 struct cfb_info *cfb; 1785 struct cfb_info *cfb;
1787 char name[16]; 1786 char name[16];
@@ -1863,7 +1862,7 @@ failed_release:
1863 return err; 1862 return err;
1864} 1863}
1865 1864
1866static void __devexit cyberpro_pci_remove(struct pci_dev *dev) 1865static void cyberpro_pci_remove(struct pci_dev *dev)
1867{ 1866{
1868 struct cfb_info *cfb = pci_get_drvdata(dev); 1867 struct cfb_info *cfb = pci_get_drvdata(dev);
1869 1868
@@ -1923,7 +1922,7 @@ MODULE_DEVICE_TABLE(pci, cyberpro_pci_table);
1923static struct pci_driver cyberpro_driver = { 1922static struct pci_driver cyberpro_driver = {
1924 .name = "CyberPro", 1923 .name = "CyberPro",
1925 .probe = cyberpro_pci_probe, 1924 .probe = cyberpro_pci_probe,
1926 .remove = __devexit_p(cyberpro_pci_remove), 1925 .remove = cyberpro_pci_remove,
1927 .suspend = cyberpro_pci_suspend, 1926 .suspend = cyberpro_pci_suspend,
1928 .resume = cyberpro_pci_resume, 1927 .resume = cyberpro_pci_resume,
1929 .id_table = cyberpro_pci_table 1928 .id_table = cyberpro_pci_table
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 46534e00fe01..0810939936f4 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -185,7 +185,7 @@ struct da8xx_fb_par {
185}; 185};
186 186
187/* Variable Screen Information */ 187/* Variable Screen Information */
188static struct fb_var_screeninfo da8xx_fb_var __devinitdata = { 188static struct fb_var_screeninfo da8xx_fb_var = {
189 .xoffset = 0, 189 .xoffset = 0,
190 .yoffset = 0, 190 .yoffset = 0,
191 .transp = {0, 0, 0}, 191 .transp = {0, 0, 0},
@@ -202,7 +202,7 @@ static struct fb_var_screeninfo da8xx_fb_var __devinitdata = {
202 .vmode = FB_VMODE_NONINTERLACED 202 .vmode = FB_VMODE_NONINTERLACED
203}; 203};
204 204
205static struct fb_fix_screeninfo da8xx_fb_fix __devinitdata = { 205static struct fb_fix_screeninfo da8xx_fb_fix = {
206 .id = "DA8xx FB Drv", 206 .id = "DA8xx FB Drv",
207 .type = FB_TYPE_PACKED_PIXELS, 207 .type = FB_TYPE_PACKED_PIXELS,
208 .type_aux = 0, 208 .type_aux = 0,
@@ -993,7 +993,7 @@ static inline void lcd_da8xx_cpufreq_deregister(struct da8xx_fb_par *par)
993} 993}
994#endif 994#endif
995 995
996static int __devexit fb_remove(struct platform_device *dev) 996static int fb_remove(struct platform_device *dev)
997{ 997{
998 struct fb_info *info = dev_get_drvdata(&dev->dev); 998 struct fb_info *info = dev_get_drvdata(&dev->dev);
999 999
@@ -1211,7 +1211,7 @@ static unsigned int da8xxfb_pixel_clk_period(struct da8xx_fb_par *par)
1211 return pix_clk_period_picosec; 1211 return pix_clk_period_picosec;
1212} 1212}
1213 1213
1214static int __devinit fb_probe(struct platform_device *device) 1214static int fb_probe(struct platform_device *device)
1215{ 1215{
1216 struct da8xx_lcdc_platform_data *fb_pdata = 1216 struct da8xx_lcdc_platform_data *fb_pdata =
1217 device->dev.platform_data; 1217 device->dev.platform_data;
@@ -1580,7 +1580,7 @@ static int fb_resume(struct platform_device *dev)
1580 1580
1581static struct platform_driver da8xx_fb_driver = { 1581static struct platform_driver da8xx_fb_driver = {
1582 .probe = fb_probe, 1582 .probe = fb_probe,
1583 .remove = __devexit_p(fb_remove), 1583 .remove = fb_remove,
1584 .suspend = fb_suspend, 1584 .suspend = fb_suspend,
1585 .resume = fb_resume, 1585 .resume = fb_resume,
1586 .driver = { 1586 .driver = {
diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c
index 49e3dda1a361..3526899da61b 100644
--- a/drivers/video/dnfb.c
+++ b/drivers/video/dnfb.c
@@ -115,7 +115,7 @@ static struct fb_ops dn_fb_ops = {
115 .fb_imageblit = cfb_imageblit, 115 .fb_imageblit = cfb_imageblit,
116}; 116};
117 117
118struct fb_var_screeninfo dnfb_var __devinitdata = { 118struct fb_var_screeninfo dnfb_var = {
119 .xres = 1280, 119 .xres = 1280,
120 .yres = 1024, 120 .yres = 1024,
121 .xres_virtual = 2048, 121 .xres_virtual = 2048,
@@ -126,7 +126,7 @@ struct fb_var_screeninfo dnfb_var __devinitdata = {
126 .vmode = FB_VMODE_NONINTERLACED, 126 .vmode = FB_VMODE_NONINTERLACED,
127}; 127};
128 128
129static struct fb_fix_screeninfo dnfb_fix __devinitdata = { 129static struct fb_fix_screeninfo dnfb_fix = {
130 .id = "Apollo Mono", 130 .id = "Apollo Mono",
131 .smem_start = (FRAME_BUFFER_START + IO_BASE), 131 .smem_start = (FRAME_BUFFER_START + IO_BASE),
132 .smem_len = FRAME_BUFFER_LEN, 132 .smem_len = FRAME_BUFFER_LEN,
@@ -224,7 +224,7 @@ void dnfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
224 * Initialization 224 * Initialization
225 */ 225 */
226 226
227static int __devinit dnfb_probe(struct platform_device *dev) 227static int dnfb_probe(struct platform_device *dev)
228{ 228{
229 struct fb_info *info; 229 struct fb_info *info;
230 int err = 0; 230 int err = 0;
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index 932abaa58a89..50fe668c6172 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -20,7 +20,7 @@ static bool request_mem_succeeded = false;
20 20
21static struct pci_dev *default_vga; 21static struct pci_dev *default_vga;
22 22
23static struct fb_var_screeninfo efifb_defined __devinitdata = { 23static struct fb_var_screeninfo efifb_defined = {
24 .activate = FB_ACTIVATE_NOW, 24 .activate = FB_ACTIVATE_NOW,
25 .height = -1, 25 .height = -1,
26 .width = -1, 26 .width = -1,
@@ -31,7 +31,7 @@ static struct fb_var_screeninfo efifb_defined __devinitdata = {
31 .vmode = FB_VMODE_NONINTERLACED, 31 .vmode = FB_VMODE_NONINTERLACED,
32}; 32};
33 33
34static struct fb_fix_screeninfo efifb_fix __devinitdata = { 34static struct fb_fix_screeninfo efifb_fix = {
35 .id = "EFI VGA", 35 .id = "EFI VGA",
36 .type = FB_TYPE_PACKED_PIXELS, 36 .type = FB_TYPE_PACKED_PIXELS,
37 .accel = FB_ACCEL_NONE, 37 .accel = FB_ACCEL_NONE,
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c
index 755ef3e65caf..3f2519d30715 100644
--- a/drivers/video/ep93xx-fb.c
+++ b/drivers/video/ep93xx-fb.c
@@ -484,7 +484,7 @@ static void ep93xxfb_dealloc_videomem(struct fb_info *info)
484 info->screen_base, info->fix.smem_start); 484 info->screen_base, info->fix.smem_start);
485} 485}
486 486
487static int __devinit ep93xxfb_probe(struct platform_device *pdev) 487static int ep93xxfb_probe(struct platform_device *pdev)
488{ 488{
489 struct ep93xxfb_mach_info *mach_info = pdev->dev.platform_data; 489 struct ep93xxfb_mach_info *mach_info = pdev->dev.platform_data;
490 struct fb_info *info; 490 struct fb_info *info;
@@ -599,7 +599,7 @@ failed_cmap:
599 return err; 599 return err;
600} 600}
601 601
602static int __devexit ep93xxfb_remove(struct platform_device *pdev) 602static int ep93xxfb_remove(struct platform_device *pdev)
603{ 603{
604 struct fb_info *info = platform_get_drvdata(pdev); 604 struct fb_info *info = platform_get_drvdata(pdev);
605 struct ep93xx_fbi *fbi = info->par; 605 struct ep93xx_fbi *fbi = info->par;
@@ -620,14 +620,14 @@ static int __devexit ep93xxfb_remove(struct platform_device *pdev)
620 620
621static struct platform_driver ep93xxfb_driver = { 621static struct platform_driver ep93xxfb_driver = {
622 .probe = ep93xxfb_probe, 622 .probe = ep93xxfb_probe,
623 .remove = __devexit_p(ep93xxfb_remove), 623 .remove = ep93xxfb_remove,
624 .driver = { 624 .driver = {
625 .name = "ep93xx-fb", 625 .name = "ep93xx-fb",
626 .owner = THIS_MODULE, 626 .owner = THIS_MODULE,
627 }, 627 },
628}; 628};
629 629
630static int __devinit ep93xxfb_init(void) 630static int ep93xxfb_init(void)
631{ 631{
632 return platform_driver_register(&ep93xxfb_driver); 632 return platform_driver_register(&ep93xxfb_driver);
633} 633}
diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
index 28fd686c6b81..4ef18e2e90cc 100644
--- a/drivers/video/exynos/exynos_dp_core.c
+++ b/drivers/video/exynos/exynos_dp_core.c
@@ -1033,7 +1033,7 @@ static void exynos_dp_phy_exit(struct exynos_dp_device *dp)
1033} 1033}
1034#endif /* CONFIG_OF */ 1034#endif /* CONFIG_OF */
1035 1035
1036static int __devinit exynos_dp_probe(struct platform_device *pdev) 1036static int exynos_dp_probe(struct platform_device *pdev)
1037{ 1037{
1038 struct resource *res; 1038 struct resource *res;
1039 struct exynos_dp_device *dp; 1039 struct exynos_dp_device *dp;
@@ -1114,7 +1114,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
1114 return 0; 1114 return 0;
1115} 1115}
1116 1116
1117static int __devexit exynos_dp_remove(struct platform_device *pdev) 1117static int exynos_dp_remove(struct platform_device *pdev)
1118{ 1118{
1119 struct exynos_dp_platdata *pdata = pdev->dev.platform_data; 1119 struct exynos_dp_platdata *pdata = pdev->dev.platform_data;
1120 struct exynos_dp_device *dp = platform_get_drvdata(pdev); 1120 struct exynos_dp_device *dp = platform_get_drvdata(pdev);
@@ -1195,7 +1195,7 @@ MODULE_DEVICE_TABLE(of, exynos_dp_match);
1195 1195
1196static struct platform_driver exynos_dp_driver = { 1196static struct platform_driver exynos_dp_driver = {
1197 .probe = exynos_dp_probe, 1197 .probe = exynos_dp_probe,
1198 .remove = __devexit_p(exynos_dp_remove), 1198 .remove = exynos_dp_remove,
1199 .driver = { 1199 .driver = {
1200 .name = "exynos-dp", 1200 .name = "exynos-dp",
1201 .owner = THIS_MODULE, 1201 .owner = THIS_MODULE,
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index 07d70a3a628b..4a17cdccef34 100644
--- a/drivers/video/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/exynos/exynos_mipi_dsi.c
@@ -490,7 +490,7 @@ err_platform_get_irq:
490 return ret; 490 return ret;
491} 491}
492 492
493static int __devexit exynos_mipi_dsi_remove(struct platform_device *pdev) 493static int exynos_mipi_dsi_remove(struct platform_device *pdev)
494{ 494{
495 struct mipi_dsim_device *dsim = platform_get_drvdata(pdev); 495 struct mipi_dsim_device *dsim = platform_get_drvdata(pdev);
496 struct mipi_dsim_ddi *dsim_ddi, *next; 496 struct mipi_dsim_ddi *dsim_ddi, *next;
@@ -595,7 +595,7 @@ static const struct dev_pm_ops exynos_mipi_dsi_pm_ops = {
595 595
596static struct platform_driver exynos_mipi_dsi_driver = { 596static struct platform_driver exynos_mipi_dsi_driver = {
597 .probe = exynos_mipi_dsi_probe, 597 .probe = exynos_mipi_dsi_probe,
598 .remove = __devexit_p(exynos_mipi_dsi_remove), 598 .remove = exynos_mipi_dsi_remove,
599 .driver = { 599 .driver = {
600 .name = "exynos-mipi-dsim", 600 .name = "exynos-mipi-dsim",
601 .owner = THIS_MODULE, 601 .owner = THIS_MODULE,
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index 14102a3f70f5..6d2744794dd1 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -893,7 +893,7 @@ static void ffb_init_fix(struct fb_info *info)
893 info->fix.accel = FB_ACCEL_SUN_CREATOR; 893 info->fix.accel = FB_ACCEL_SUN_CREATOR;
894} 894}
895 895
896static int __devinit ffb_probe(struct platform_device *op) 896static int ffb_probe(struct platform_device *op)
897{ 897{
898 struct device_node *dp = op->dev.of_node; 898 struct device_node *dp = op->dev.of_node;
899 struct ffb_fbc __iomem *fbc; 899 struct ffb_fbc __iomem *fbc;
@@ -1022,7 +1022,7 @@ out_err:
1022 return err; 1022 return err;
1023} 1023}
1024 1024
1025static int __devexit ffb_remove(struct platform_device *op) 1025static int ffb_remove(struct platform_device *op)
1026{ 1026{
1027 struct fb_info *info = dev_get_drvdata(&op->dev); 1027 struct fb_info *info = dev_get_drvdata(&op->dev);
1028 struct ffb_par *par = info->par; 1028 struct ffb_par *par = info->par;
@@ -1058,7 +1058,7 @@ static struct platform_driver ffb_driver = {
1058 .of_match_table = ffb_match, 1058 .of_match_table = ffb_match,
1059 }, 1059 },
1060 .probe = ffb_probe, 1060 .probe = ffb_probe,
1061 .remove = __devexit_p(ffb_remove), 1061 .remove = ffb_remove,
1062}; 1062};
1063 1063
1064static int __init ffb_init(void) 1064static int __init ffb_init(void)
diff --git a/drivers/video/fm2fb.c b/drivers/video/fm2fb.c
index d0533b7aad79..c99c9671302b 100644
--- a/drivers/video/fm2fb.c
+++ b/drivers/video/fm2fb.c
@@ -127,7 +127,7 @@
127 127
128static volatile unsigned char *fm2fb_reg; 128static volatile unsigned char *fm2fb_reg;
129 129
130static struct fb_fix_screeninfo fb_fix __devinitdata = { 130static struct fb_fix_screeninfo fb_fix = {
131 .smem_len = FRAMEMASTER_REG, 131 .smem_len = FRAMEMASTER_REG,
132 .type = FB_TYPE_PACKED_PIXELS, 132 .type = FB_TYPE_PACKED_PIXELS,
133 .visual = FB_VISUAL_TRUECOLOR, 133 .visual = FB_VISUAL_TRUECOLOR,
@@ -136,12 +136,12 @@ static struct fb_fix_screeninfo fb_fix __devinitdata = {
136 .accel = FB_ACCEL_NONE, 136 .accel = FB_ACCEL_NONE,
137}; 137};
138 138
139static int fm2fb_mode __devinitdata = -1; 139static int fm2fb_mode = -1;
140 140
141#define FM2FB_MODE_PAL 0 141#define FM2FB_MODE_PAL 0
142#define FM2FB_MODE_NTSC 1 142#define FM2FB_MODE_NTSC 1
143 143
144static struct fb_var_screeninfo fb_var_modes[] __devinitdata = { 144static struct fb_var_screeninfo fb_var_modes[] = {
145 { 145 {
146 /* 768 x 576, 32 bpp (PAL) */ 146 /* 768 x 576, 32 bpp (PAL) */
147 768, 576, 768, 576, 0, 0, 32, 0, 147 768, 576, 768, 576, 0, 0, 32, 0,
@@ -211,10 +211,9 @@ static int fm2fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
211 * Initialisation 211 * Initialisation
212 */ 212 */
213 213
214static int __devinit fm2fb_probe(struct zorro_dev *z, 214static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id);
215 const struct zorro_device_id *id);
216 215
217static struct zorro_device_id fm2fb_devices[] __devinitdata = { 216static struct zorro_device_id fm2fb_devices[] = {
218 { ZORRO_PROD_BSC_FRAMEMASTER_II }, 217 { ZORRO_PROD_BSC_FRAMEMASTER_II },
219 { ZORRO_PROD_HELFRICH_RAINBOW_II }, 218 { ZORRO_PROD_HELFRICH_RAINBOW_II },
220 { 0 } 219 { 0 }
@@ -227,8 +226,7 @@ static struct zorro_driver fm2fb_driver = {
227 .probe = fm2fb_probe, 226 .probe = fm2fb_probe,
228}; 227};
229 228
230static int __devinit fm2fb_probe(struct zorro_dev *z, 229static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id)
231 const struct zorro_device_id *id)
232{ 230{
233 struct fb_info *info; 231 struct fb_info *info;
234 unsigned long *ptr; 232 unsigned long *ptr;
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index d3fc92eaee89..19cfd7a92563 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -55,7 +55,7 @@
55 * order if increasing resolution and frequency. The 320x240-60 mode is 55 * order if increasing resolution and frequency. The 320x240-60 mode is
56 * the initial AOI for the second and third planes. 56 * the initial AOI for the second and third planes.
57 */ 57 */
58static struct fb_videomode __devinitdata fsl_diu_mode_db[] = { 58static struct fb_videomode fsl_diu_mode_db[] = {
59 { 59 {
60 .refresh = 60, 60 .refresh = 60,
61 .xres = 1024, 61 .xres = 1024,
@@ -1307,7 +1307,7 @@ static struct fb_ops fsl_diu_ops = {
1307 .fb_release = fsl_diu_release, 1307 .fb_release = fsl_diu_release,
1308}; 1308};
1309 1309
1310static int __devinit install_fb(struct fb_info *info) 1310static int install_fb(struct fb_info *info)
1311{ 1311{
1312 int rc; 1312 int rc;
1313 struct mfb_info *mfbi = info->par; 1313 struct mfb_info *mfbi = info->par;
@@ -1518,7 +1518,7 @@ static ssize_t show_monitor(struct device *device,
1518 return 0; 1518 return 0;
1519} 1519}
1520 1520
1521static int __devinit fsl_diu_probe(struct platform_device *pdev) 1521static int fsl_diu_probe(struct platform_device *pdev)
1522{ 1522{
1523 struct device_node *np = pdev->dev.of_node; 1523 struct device_node *np = pdev->dev.of_node;
1524 struct mfb_info *mfbi; 1524 struct mfb_info *mfbi;
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index 3dad31975db8..bda5e3941510 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -91,10 +91,10 @@ static uint32_t pseudo_palette[16];
91static uint32_t gbe_cmap[256]; 91static uint32_t gbe_cmap[256];
92static int gbe_turned_on; /* 0 turned off, 1 turned on */ 92static int gbe_turned_on; /* 0 turned off, 1 turned on */
93 93
94static char *mode_option __devinitdata = NULL; 94static char *mode_option = NULL;
95 95
96/* default CRT mode */ 96/* default CRT mode */
97static struct fb_var_screeninfo default_var_CRT __devinitdata = { 97static struct fb_var_screeninfo default_var_CRT = {
98 /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ 98 /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */
99 .xres = 640, 99 .xres = 640,
100 .yres = 480, 100 .yres = 480,
@@ -125,7 +125,7 @@ static struct fb_var_screeninfo default_var_CRT __devinitdata = {
125}; 125};
126 126
127/* default LCD mode */ 127/* default LCD mode */
128static struct fb_var_screeninfo default_var_LCD __devinitdata = { 128static struct fb_var_screeninfo default_var_LCD = {
129 /* 1600x1024, 8 bpp */ 129 /* 1600x1024, 8 bpp */
130 .xres = 1600, 130 .xres = 1600,
131 .yres = 1024, 131 .yres = 1024,
@@ -157,7 +157,7 @@ static struct fb_var_screeninfo default_var_LCD __devinitdata = {
157 157
158/* default modedb mode */ 158/* default modedb mode */
159/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ 159/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
160static struct fb_videomode default_mode_CRT __devinitdata = { 160static struct fb_videomode default_mode_CRT = {
161 .refresh = 60, 161 .refresh = 60,
162 .xres = 640, 162 .xres = 640,
163 .yres = 480, 163 .yres = 480,
@@ -172,7 +172,7 @@ static struct fb_videomode default_mode_CRT __devinitdata = {
172 .vmode = FB_VMODE_NONINTERLACED, 172 .vmode = FB_VMODE_NONINTERLACED,
173}; 173};
174/* 1600x1024 SGI flatpanel 1600sw */ 174/* 1600x1024 SGI flatpanel 1600sw */
175static struct fb_videomode default_mode_LCD __devinitdata = { 175static struct fb_videomode default_mode_LCD = {
176 /* 1600x1024, 8 bpp */ 176 /* 1600x1024, 8 bpp */
177 .xres = 1600, 177 .xres = 1600,
178 .yres = 1024, 178 .yres = 1024,
@@ -186,8 +186,8 @@ static struct fb_videomode default_mode_LCD __devinitdata = {
186 .vmode = FB_VMODE_NONINTERLACED, 186 .vmode = FB_VMODE_NONINTERLACED,
187}; 187};
188 188
189static struct fb_videomode *default_mode __devinitdata = &default_mode_CRT; 189static struct fb_videomode *default_mode = &default_mode_CRT;
190static struct fb_var_screeninfo *default_var __devinitdata = &default_var_CRT; 190static struct fb_var_screeninfo *default_var = &default_var_CRT;
191 191
192static int flat_panel_enabled = 0; 192static int flat_panel_enabled = 0;
193 193
@@ -1082,7 +1082,7 @@ static ssize_t gbefb_show_rev(struct device *device, struct device_attribute *at
1082 1082
1083static DEVICE_ATTR(revision, S_IRUGO, gbefb_show_rev, NULL); 1083static DEVICE_ATTR(revision, S_IRUGO, gbefb_show_rev, NULL);
1084 1084
1085static void __devexit gbefb_remove_sysfs(struct device *dev) 1085static void gbefb_remove_sysfs(struct device *dev)
1086{ 1086{
1087 device_remove_file(dev, &dev_attr_size); 1087 device_remove_file(dev, &dev_attr_size);
1088 device_remove_file(dev, &dev_attr_revision); 1088 device_remove_file(dev, &dev_attr_revision);
@@ -1098,7 +1098,7 @@ static void gbefb_create_sysfs(struct device *dev)
1098 * Initialization 1098 * Initialization
1099 */ 1099 */
1100 1100
1101static int __devinit gbefb_setup(char *options) 1101static int gbefb_setup(char *options)
1102{ 1102{
1103 char *this_opt; 1103 char *this_opt;
1104 1104
@@ -1129,7 +1129,7 @@ static int __devinit gbefb_setup(char *options)
1129 return 0; 1129 return 0;
1130} 1130}
1131 1131
1132static int __devinit gbefb_probe(struct platform_device *p_dev) 1132static int gbefb_probe(struct platform_device *p_dev)
1133{ 1133{
1134 int i, ret = 0; 1134 int i, ret = 0;
1135 struct fb_info *info; 1135 struct fb_info *info;
@@ -1254,7 +1254,7 @@ out_release_framebuffer:
1254 return ret; 1254 return ret;
1255} 1255}
1256 1256
1257static int __devexit gbefb_remove(struct platform_device* p_dev) 1257static int gbefb_remove(struct platform_device* p_dev)
1258{ 1258{
1259 struct fb_info *info = platform_get_drvdata(p_dev); 1259 struct fb_info *info = platform_get_drvdata(p_dev);
1260 1260
@@ -1273,7 +1273,7 @@ static int __devexit gbefb_remove(struct platform_device* p_dev)
1273 1273
1274static struct platform_driver gbefb_driver = { 1274static struct platform_driver gbefb_driver = {
1275 .probe = gbefb_probe, 1275 .probe = gbefb_probe,
1276 .remove = __devexit_p(gbefb_remove), 1276 .remove = gbefb_remove,
1277 .driver = { 1277 .driver = {
1278 .name = "gbefb", 1278 .name = "gbefb",
1279 }, 1279 },
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
index 265c5ed59ade..ebbaada7b941 100644
--- a/drivers/video/geode/gx1fb_core.c
+++ b/drivers/video/geode/gx1fb_core.c
@@ -29,7 +29,7 @@ static int crt_option = 1;
29static char panel_option[32] = ""; 29static char panel_option[32] = "";
30 30
31/* Modes relevant to the GX1 (taken from modedb.c) */ 31/* Modes relevant to the GX1 (taken from modedb.c) */
32static const struct fb_videomode __devinitconst gx1_modedb[] = { 32static const struct fb_videomode gx1_modedb[] = {
33 /* 640x480-60 VESA */ 33 /* 640x480-60 VESA */
34 { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, 34 { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2,
35 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, 35 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
@@ -195,7 +195,7 @@ static int gx1fb_blank(int blank_mode, struct fb_info *info)
195 return par->vid_ops->blank_display(info, blank_mode); 195 return par->vid_ops->blank_display(info, blank_mode);
196} 196}
197 197
198static int __devinit gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev) 198static int gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev)
199{ 199{
200 struct geodefb_par *par = info->par; 200 struct geodefb_par *par = info->par;
201 unsigned gx_base; 201 unsigned gx_base;
@@ -268,7 +268,7 @@ static struct fb_ops gx1fb_ops = {
268 .fb_imageblit = cfb_imageblit, 268 .fb_imageblit = cfb_imageblit,
269}; 269};
270 270
271static struct fb_info * __devinit gx1fb_init_fbinfo(struct device *dev) 271static struct fb_info *gx1fb_init_fbinfo(struct device *dev)
272{ 272{
273 struct geodefb_par *par; 273 struct geodefb_par *par;
274 struct fb_info *info; 274 struct fb_info *info;
@@ -318,7 +318,7 @@ static struct fb_info * __devinit gx1fb_init_fbinfo(struct device *dev)
318 return info; 318 return info;
319} 319}
320 320
321static int __devinit gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) 321static int gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
322{ 322{
323 struct geodefb_par *par; 323 struct geodefb_par *par;
324 struct fb_info *info; 324 struct fb_info *info;
@@ -382,7 +382,7 @@ static int __devinit gx1fb_probe(struct pci_dev *pdev, const struct pci_device_i
382 return ret; 382 return ret;
383} 383}
384 384
385static void __devexit gx1fb_remove(struct pci_dev *pdev) 385static void gx1fb_remove(struct pci_dev *pdev)
386{ 386{
387 struct fb_info *info = pci_get_drvdata(pdev); 387 struct fb_info *info = pci_get_drvdata(pdev);
388 struct geodefb_par *par = info->par; 388 struct geodefb_par *par = info->par;
@@ -441,7 +441,7 @@ static struct pci_driver gx1fb_driver = {
441 .name = "gx1fb", 441 .name = "gx1fb",
442 .id_table = gx1fb_id_table, 442 .id_table = gx1fb_id_table,
443 .probe = gx1fb_probe, 443 .probe = gx1fb_probe,
444 .remove = __devexit_p(gx1fb_remove), 444 .remove = gx1fb_remove,
445}; 445};
446 446
447static int __init gx1fb_init(void) 447static int __init gx1fb_init(void)
@@ -456,7 +456,7 @@ static int __init gx1fb_init(void)
456 return pci_register_driver(&gx1fb_driver); 456 return pci_register_driver(&gx1fb_driver);
457} 457}
458 458
459static void __devexit gx1fb_cleanup(void) 459static void gx1fb_cleanup(void)
460{ 460{
461 pci_unregister_driver(&gx1fb_driver); 461 pci_unregister_driver(&gx1fb_driver);
462} 462}
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c
index b4f19db9bb54..19f0c1add747 100644
--- a/drivers/video/geode/gxfb_core.c
+++ b/drivers/video/geode/gxfb_core.c
@@ -40,7 +40,7 @@ static int vram;
40static int vt_switch; 40static int vt_switch;
41 41
42/* Modes relevant to the GX (taken from modedb.c) */ 42/* Modes relevant to the GX (taken from modedb.c) */
43static struct fb_videomode gx_modedb[] __devinitdata = { 43static struct fb_videomode gx_modedb[] = {
44 /* 640x480-60 VESA */ 44 /* 640x480-60 VESA */
45 { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, 45 { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2,
46 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, 46 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
@@ -110,15 +110,14 @@ static struct fb_videomode gx_modedb[] __devinitdata = {
110#ifdef CONFIG_OLPC 110#ifdef CONFIG_OLPC
111#include <asm/olpc.h> 111#include <asm/olpc.h>
112 112
113static struct fb_videomode gx_dcon_modedb[] __devinitdata = { 113static struct fb_videomode gx_dcon_modedb[] = {
114 /* The only mode the DCON has is 1200x900 */ 114 /* The only mode the DCON has is 1200x900 */
115 { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, 115 { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3,
116 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 116 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
117 FB_VMODE_NONINTERLACED, 0 } 117 FB_VMODE_NONINTERLACED, 0 }
118}; 118};
119 119
120static void __devinit get_modedb(struct fb_videomode **modedb, 120static void get_modedb(struct fb_videomode **modedb, unsigned int *size)
121 unsigned int *size)
122{ 121{
123 if (olpc_has_dcon()) { 122 if (olpc_has_dcon()) {
124 *modedb = (struct fb_videomode *) gx_dcon_modedb; 123 *modedb = (struct fb_videomode *) gx_dcon_modedb;
@@ -130,8 +129,7 @@ static void __devinit get_modedb(struct fb_videomode **modedb,
130} 129}
131 130
132#else 131#else
133static void __devinit get_modedb(struct fb_videomode **modedb, 132static void get_modedb(struct fb_videomode **modedb, unsigned int *size)
134 unsigned int *size)
135{ 133{
136 *modedb = (struct fb_videomode *) gx_modedb; 134 *modedb = (struct fb_videomode *) gx_modedb;
137 *size = ARRAY_SIZE(gx_modedb); 135 *size = ARRAY_SIZE(gx_modedb);
@@ -228,8 +226,7 @@ static int gxfb_blank(int blank_mode, struct fb_info *info)
228 return gx_blank_display(info, blank_mode); 226 return gx_blank_display(info, blank_mode);
229} 227}
230 228
231static int __devinit gxfb_map_video_memory(struct fb_info *info, 229static int gxfb_map_video_memory(struct fb_info *info, struct pci_dev *dev)
232 struct pci_dev *dev)
233{ 230{
234 struct gxfb_par *par = info->par; 231 struct gxfb_par *par = info->par;
235 int ret; 232 int ret;
@@ -293,7 +290,7 @@ static struct fb_ops gxfb_ops = {
293 .fb_imageblit = cfb_imageblit, 290 .fb_imageblit = cfb_imageblit,
294}; 291};
295 292
296static struct fb_info *__devinit gxfb_init_fbinfo(struct device *dev) 293static struct fb_info *gxfb_init_fbinfo(struct device *dev)
297{ 294{
298 struct gxfb_par *par; 295 struct gxfb_par *par;
299 struct fb_info *info; 296 struct fb_info *info;
@@ -374,8 +371,7 @@ static int gxfb_resume(struct pci_dev *pdev)
374} 371}
375#endif 372#endif
376 373
377static int __devinit gxfb_probe(struct pci_dev *pdev, 374static int gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
378 const struct pci_device_id *id)
379{ 375{
380 struct gxfb_par *par; 376 struct gxfb_par *par;
381 struct fb_info *info; 377 struct fb_info *info;
@@ -455,7 +451,7 @@ static int __devinit gxfb_probe(struct pci_dev *pdev,
455 return ret; 451 return ret;
456} 452}
457 453
458static void __devexit gxfb_remove(struct pci_dev *pdev) 454static void gxfb_remove(struct pci_dev *pdev)
459{ 455{
460 struct fb_info *info = pci_get_drvdata(pdev); 456 struct fb_info *info = pci_get_drvdata(pdev);
461 struct gxfb_par *par = info->par; 457 struct gxfb_par *par = info->par;
diff --git a/drivers/video/geode/lxfb_core.c b/drivers/video/geode/lxfb_core.c
index 416851ca8754..4dd7b5566962 100644
--- a/drivers/video/geode/lxfb_core.c
+++ b/drivers/video/geode/lxfb_core.c
@@ -35,7 +35,7 @@ static int vt_switch;
35 * we try to make it something sane - 640x480-60 is sane 35 * we try to make it something sane - 640x480-60 is sane
36 */ 36 */
37 37
38static struct fb_videomode geode_modedb[] __devinitdata = { 38static struct fb_videomode geode_modedb[] = {
39 /* 640x480-60 */ 39 /* 640x480-60 */
40 { NULL, 60, 640, 480, 39682, 48, 8, 25, 2, 88, 2, 40 { NULL, 60, 640, 480, 39682, 48, 8, 25, 2, 88, 2,
41 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 41 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
@@ -219,15 +219,14 @@ static struct fb_videomode geode_modedb[] __devinitdata = {
219#ifdef CONFIG_OLPC 219#ifdef CONFIG_OLPC
220#include <asm/olpc.h> 220#include <asm/olpc.h>
221 221
222static struct fb_videomode olpc_dcon_modedb[] __devinitdata = { 222static struct fb_videomode olpc_dcon_modedb[] = {
223 /* The only mode the DCON has is 1200x900 */ 223 /* The only mode the DCON has is 1200x900 */
224 { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, 224 { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3,
225 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 225 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
226 FB_VMODE_NONINTERLACED, 0 } 226 FB_VMODE_NONINTERLACED, 0 }
227}; 227};
228 228
229static void __devinit get_modedb(struct fb_videomode **modedb, 229static void get_modedb(struct fb_videomode **modedb, unsigned int *size)
230 unsigned int *size)
231{ 230{
232 if (olpc_has_dcon()) { 231 if (olpc_has_dcon()) {
233 *modedb = (struct fb_videomode *) olpc_dcon_modedb; 232 *modedb = (struct fb_videomode *) olpc_dcon_modedb;
@@ -239,8 +238,7 @@ static void __devinit get_modedb(struct fb_videomode **modedb,
239} 238}
240 239
241#else 240#else
242static void __devinit get_modedb(struct fb_videomode **modedb, 241static void get_modedb(struct fb_videomode **modedb, unsigned int *size)
243 unsigned int *size)
244{ 242{
245 *modedb = (struct fb_videomode *) geode_modedb; 243 *modedb = (struct fb_videomode *) geode_modedb;
246 *size = ARRAY_SIZE(geode_modedb); 244 *size = ARRAY_SIZE(geode_modedb);
@@ -336,8 +334,7 @@ static int lxfb_blank(int blank_mode, struct fb_info *info)
336} 334}
337 335
338 336
339static int __devinit lxfb_map_video_memory(struct fb_info *info, 337static int lxfb_map_video_memory(struct fb_info *info, struct pci_dev *dev)
340 struct pci_dev *dev)
341{ 338{
342 struct lxfb_par *par = info->par; 339 struct lxfb_par *par = info->par;
343 int ret; 340 int ret;
@@ -414,7 +411,7 @@ static struct fb_ops lxfb_ops = {
414 .fb_imageblit = cfb_imageblit, 411 .fb_imageblit = cfb_imageblit,
415}; 412};
416 413
417static struct fb_info * __devinit lxfb_init_fbinfo(struct device *dev) 414static struct fb_info *lxfb_init_fbinfo(struct device *dev)
418{ 415{
419 struct lxfb_par *par; 416 struct lxfb_par *par;
420 struct fb_info *info; 417 struct fb_info *info;
@@ -498,8 +495,7 @@ static int lxfb_resume(struct pci_dev *pdev)
498#define lxfb_resume NULL 495#define lxfb_resume NULL
499#endif 496#endif
500 497
501static int __devinit lxfb_probe(struct pci_dev *pdev, 498static int lxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
502 const struct pci_device_id *id)
503{ 499{
504 struct lxfb_par *par; 500 struct lxfb_par *par;
505 struct fb_info *info; 501 struct fb_info *info;
@@ -590,7 +586,7 @@ err:
590 return ret; 586 return ret;
591} 587}
592 588
593static void __devexit lxfb_remove(struct pci_dev *pdev) 589static void lxfb_remove(struct pci_dev *pdev)
594{ 590{
595 struct fb_info *info = pci_get_drvdata(pdev); 591 struct fb_info *info = pci_get_drvdata(pdev);
596 struct lxfb_par *par = info->par; 592 struct lxfb_par *par = info->par;
diff --git a/drivers/video/grvga.c b/drivers/video/grvga.c
index 5245f9a71892..861109e7de1b 100644
--- a/drivers/video/grvga.c
+++ b/drivers/video/grvga.c
@@ -70,7 +70,7 @@ static const struct fb_videomode grvga_modedb[] = {
70 } 70 }
71 }; 71 };
72 72
73static struct fb_fix_screeninfo grvga_fix __devinitdata = { 73static struct fb_fix_screeninfo grvga_fix = {
74 .id = "AG SVGACTRL", 74 .id = "AG SVGACTRL",
75 .type = FB_TYPE_PACKED_PIXELS, 75 .type = FB_TYPE_PACKED_PIXELS,
76 .visual = FB_VISUAL_PSEUDOCOLOR, 76 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -267,8 +267,8 @@ static struct fb_ops grvga_ops = {
267 .fb_imageblit = cfb_imageblit 267 .fb_imageblit = cfb_imageblit
268}; 268};
269 269
270static int __devinit grvga_parse_custom(char *options, 270static int grvga_parse_custom(char *options,
271 struct fb_var_screeninfo *screendata) 271 struct fb_var_screeninfo *screendata)
272{ 272{
273 char *this_opt; 273 char *this_opt;
274 int count = 0; 274 int count = 0;
@@ -329,7 +329,7 @@ static int __devinit grvga_parse_custom(char *options,
329 return 0; 329 return 0;
330} 330}
331 331
332static int __devinit grvga_probe(struct platform_device *dev) 332static int grvga_probe(struct platform_device *dev)
333{ 333{
334 struct fb_info *info; 334 struct fb_info *info;
335 int retval = -ENOMEM; 335 int retval = -ENOMEM;
@@ -512,7 +512,7 @@ free_fb:
512 return retval; 512 return retval;
513} 513}
514 514
515static int __devexit grvga_remove(struct platform_device *device) 515static int grvga_remove(struct platform_device *device)
516{ 516{
517 struct fb_info *info = dev_get_drvdata(&device->dev); 517 struct fb_info *info = dev_get_drvdata(&device->dev);
518 struct grvga_par *par = info->par; 518 struct grvga_par *par = info->par;
@@ -554,7 +554,7 @@ static struct platform_driver grvga_driver = {
554 .of_match_table = svgactrl_of_match, 554 .of_match_table = svgactrl_of_match,
555 }, 555 },
556 .probe = grvga_probe, 556 .probe = grvga_probe,
557 .remove = __devexit_p(grvga_remove), 557 .remove = grvga_remove,
558}; 558};
559 559
560 560
diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c
index 4bdea6e9bd55..c35663f6a54a 100644
--- a/drivers/video/gxt4500.c
+++ b/drivers/video/gxt4500.c
@@ -159,7 +159,7 @@ struct gxt4500_par {
159static char *mode_option; 159static char *mode_option;
160 160
161/* default mode: 1280x1024 @ 60 Hz, 8 bpp */ 161/* default mode: 1280x1024 @ 60 Hz, 8 bpp */
162static const struct fb_videomode defaultmode __devinitconst = { 162static const struct fb_videomode defaultmode = {
163 .refresh = 60, 163 .refresh = 60,
164 .xres = 1280, 164 .xres = 1280,
165 .yres = 1024, 165 .yres = 1024,
@@ -588,7 +588,7 @@ static int gxt4500_blank(int blank, struct fb_info *info)
588 return 0; 588 return 0;
589} 589}
590 590
591static const struct fb_fix_screeninfo gxt4500_fix __devinitconst = { 591static const struct fb_fix_screeninfo gxt4500_fix = {
592 .id = "IBM GXT4500P", 592 .id = "IBM GXT4500P",
593 .type = FB_TYPE_PACKED_PIXELS, 593 .type = FB_TYPE_PACKED_PIXELS,
594 .visual = FB_VISUAL_PSEUDOCOLOR, 594 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -610,8 +610,7 @@ static struct fb_ops gxt4500_ops = {
610}; 610};
611 611
612/* PCI functions */ 612/* PCI functions */
613static int __devinit gxt4500_probe(struct pci_dev *pdev, 613static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
614 const struct pci_device_id *ent)
615{ 614{
616 int err; 615 int err;
617 unsigned long reg_phys, fb_phys; 616 unsigned long reg_phys, fb_phys;
@@ -720,7 +719,7 @@ static int __devinit gxt4500_probe(struct pci_dev *pdev,
720 return -ENODEV; 719 return -ENODEV;
721} 720}
722 721
723static void __devexit gxt4500_remove(struct pci_dev *pdev) 722static void gxt4500_remove(struct pci_dev *pdev)
724{ 723{
725 struct fb_info *info = pci_get_drvdata(pdev); 724 struct fb_info *info = pci_get_drvdata(pdev);
726 struct gxt4500_par *par; 725 struct gxt4500_par *par;
@@ -758,10 +757,10 @@ static struct pci_driver gxt4500_driver = {
758 .name = "gxt4500", 757 .name = "gxt4500",
759 .id_table = gxt4500_pci_tbl, 758 .id_table = gxt4500_pci_tbl,
760 .probe = gxt4500_probe, 759 .probe = gxt4500_probe,
761 .remove = __devexit_p(gxt4500_remove), 760 .remove = gxt4500_remove,
762}; 761};
763 762
764static int __devinit gxt4500_init(void) 763static int gxt4500_init(void)
765{ 764{
766#ifndef MODULE 765#ifndef MODULE
767 if (fb_get_options("gxt4500", &mode_option)) 766 if (fb_get_options("gxt4500", &mode_option))
diff --git a/drivers/video/hecubafb.c b/drivers/video/hecubafb.c
index 614251a9af91..59d23181fdb0 100644
--- a/drivers/video/hecubafb.c
+++ b/drivers/video/hecubafb.c
@@ -47,7 +47,7 @@
47#define DPY_W 600 47#define DPY_W 600
48#define DPY_H 800 48#define DPY_H 800
49 49
50static struct fb_fix_screeninfo hecubafb_fix __devinitdata = { 50static struct fb_fix_screeninfo hecubafb_fix = {
51 .id = "hecubafb", 51 .id = "hecubafb",
52 .type = FB_TYPE_PACKED_PIXELS, 52 .type = FB_TYPE_PACKED_PIXELS,
53 .visual = FB_VISUAL_MONO01, 53 .visual = FB_VISUAL_MONO01,
@@ -58,7 +58,7 @@ static struct fb_fix_screeninfo hecubafb_fix __devinitdata = {
58 .accel = FB_ACCEL_NONE, 58 .accel = FB_ACCEL_NONE,
59}; 59};
60 60
61static struct fb_var_screeninfo hecubafb_var __devinitdata = { 61static struct fb_var_screeninfo hecubafb_var = {
62 .xres = DPY_W, 62 .xres = DPY_W,
63 .yres = DPY_H, 63 .yres = DPY_H,
64 .xres_virtual = DPY_W, 64 .xres_virtual = DPY_W,
@@ -211,7 +211,7 @@ static struct fb_deferred_io hecubafb_defio = {
211 .deferred_io = hecubafb_dpy_deferred_io, 211 .deferred_io = hecubafb_dpy_deferred_io,
212}; 212};
213 213
214static int __devinit hecubafb_probe(struct platform_device *dev) 214static int hecubafb_probe(struct platform_device *dev)
215{ 215{
216 struct fb_info *info; 216 struct fb_info *info;
217 struct hecuba_board *board; 217 struct hecuba_board *board;
@@ -280,7 +280,7 @@ err_videomem_alloc:
280 return retval; 280 return retval;
281} 281}
282 282
283static int __devexit hecubafb_remove(struct platform_device *dev) 283static int hecubafb_remove(struct platform_device *dev)
284{ 284{
285 struct fb_info *info = platform_get_drvdata(dev); 285 struct fb_info *info = platform_get_drvdata(dev);
286 286
@@ -299,7 +299,7 @@ static int __devexit hecubafb_remove(struct platform_device *dev)
299 299
300static struct platform_driver hecubafb_driver = { 300static struct platform_driver hecubafb_driver = {
301 .probe = hecubafb_probe, 301 .probe = hecubafb_probe,
302 .remove = __devexit_p(hecubafb_remove), 302 .remove = hecubafb_remove,
303 .driver = { 303 .driver = {
304 .owner = THIS_MODULE, 304 .owner = THIS_MODULE,
305 .name = "hecubafb", 305 .name = "hecubafb",
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index c645f9282650..1e9e2d819d1f 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -106,7 +106,7 @@ static DEFINE_SPINLOCK(hga_reg_lock);
106 106
107/* Framebuffer driver structures */ 107/* Framebuffer driver structures */
108 108
109static struct fb_var_screeninfo hga_default_var __devinitdata = { 109static struct fb_var_screeninfo hga_default_var = {
110 .xres = 720, 110 .xres = 720,
111 .yres = 348, 111 .yres = 348,
112 .xres_virtual = 720, 112 .xres_virtual = 720,
@@ -120,7 +120,7 @@ static struct fb_var_screeninfo hga_default_var __devinitdata = {
120 .width = -1, 120 .width = -1,
121}; 121};
122 122
123static struct fb_fix_screeninfo hga_fix __devinitdata = { 123static struct fb_fix_screeninfo hga_fix = {
124 .id = "HGA", 124 .id = "HGA",
125 .type = FB_TYPE_PACKED_PIXELS, /* (not sure) */ 125 .type = FB_TYPE_PACKED_PIXELS, /* (not sure) */
126 .visual = FB_VISUAL_MONO10, 126 .visual = FB_VISUAL_MONO10,
@@ -276,7 +276,7 @@ static void hga_blank(int blank_mode)
276 spin_unlock_irqrestore(&hga_reg_lock, flags); 276 spin_unlock_irqrestore(&hga_reg_lock, flags);
277} 277}
278 278
279static int __devinit hga_card_detect(void) 279static int hga_card_detect(void)
280{ 280{
281 int count = 0; 281 int count = 0;
282 void __iomem *p, *q; 282 void __iomem *p, *q;
@@ -546,7 +546,7 @@ static struct fb_ops hgafb_ops = {
546 * Initialization 546 * Initialization
547 */ 547 */
548 548
549static int __devinit hgafb_probe(struct platform_device *pdev) 549static int hgafb_probe(struct platform_device *pdev)
550{ 550{
551 struct fb_info *info; 551 struct fb_info *info;
552 552
@@ -592,7 +592,7 @@ static int __devinit hgafb_probe(struct platform_device *pdev)
592 return 0; 592 return 0;
593} 593}
594 594
595static int __devexit hgafb_remove(struct platform_device *pdev) 595static int hgafb_remove(struct platform_device *pdev)
596{ 596{
597 struct fb_info *info = platform_get_drvdata(pdev); 597 struct fb_info *info = platform_get_drvdata(pdev);
598 598
@@ -617,7 +617,7 @@ static int __devexit hgafb_remove(struct platform_device *pdev)
617 617
618static struct platform_driver hgafb_driver = { 618static struct platform_driver hgafb_driver = {
619 .probe = hgafb_probe, 619 .probe = hgafb_probe,
620 .remove = __devexit_p(hgafb_remove), 620 .remove = hgafb_remove,
621 .driver = { 621 .driver = {
622 .name = "hgafb", 622 .name = "hgafb",
623 }, 623 },
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index cfb8d6451014..c2414d6ab646 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -30,14 +30,14 @@
30 30
31#define WIDTH 640 31#define WIDTH 640
32 32
33static struct fb_var_screeninfo hitfb_var __devinitdata = { 33static struct fb_var_screeninfo hitfb_var = {
34 .activate = FB_ACTIVATE_NOW, 34 .activate = FB_ACTIVATE_NOW,
35 .height = -1, 35 .height = -1,
36 .width = -1, 36 .width = -1,
37 .vmode = FB_VMODE_NONINTERLACED, 37 .vmode = FB_VMODE_NONINTERLACED,
38}; 38};
39 39
40static struct fb_fix_screeninfo hitfb_fix __devinitdata = { 40static struct fb_fix_screeninfo hitfb_fix = {
41 .id = "Hitachi HD64461", 41 .id = "Hitachi HD64461",
42 .type = FB_TYPE_PACKED_PIXELS, 42 .type = FB_TYPE_PACKED_PIXELS,
43 .accel = FB_ACCEL_NONE, 43 .accel = FB_ACCEL_NONE,
@@ -324,7 +324,7 @@ static struct fb_ops hitfb_ops = {
324 .fb_imageblit = cfb_imageblit, 324 .fb_imageblit = cfb_imageblit,
325}; 325};
326 326
327static int __devinit hitfb_probe(struct platform_device *dev) 327static int hitfb_probe(struct platform_device *dev)
328{ 328{
329 unsigned short lcdclor, ldr3, ldvndr; 329 unsigned short lcdclor, ldr3, ldvndr;
330 struct fb_info *info; 330 struct fb_info *info;
@@ -417,7 +417,7 @@ err_fb:
417 return ret; 417 return ret;
418} 418}
419 419
420static int __devexit hitfb_remove(struct platform_device *dev) 420static int hitfb_remove(struct platform_device *dev)
421{ 421{
422 struct fb_info *info = platform_get_drvdata(dev); 422 struct fb_info *info = platform_get_drvdata(dev);
423 423
@@ -462,7 +462,7 @@ static const struct dev_pm_ops hitfb_dev_pm_ops = {
462 462
463static struct platform_driver hitfb_driver = { 463static struct platform_driver hitfb_driver = {
464 .probe = hitfb_probe, 464 .probe = hitfb_probe,
465 .remove = __devexit_p(hitfb_remove), 465 .remove = hitfb_remove,
466 .driver = { 466 .driver = {
467 .name = "hitfb", 467 .name = "hitfb",
468 .owner = THIS_MODULE, 468 .owner = THIS_MODULE,
diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c
index 7324865f965f..b802f93cef5d 100644
--- a/drivers/video/hpfb.c
+++ b/drivers/video/hpfb.c
@@ -206,8 +206,7 @@ static struct fb_ops hpfb_ops = {
206#define HPFB_FBOMSB 0x5d /* Frame buffer offset */ 206#define HPFB_FBOMSB 0x5d /* Frame buffer offset */
207#define HPFB_FBOLSB 0x5f 207#define HPFB_FBOLSB 0x5f
208 208
209static int __devinit hpfb_init_one(unsigned long phys_base, 209static int hpfb_init_one(unsigned long phys_base, unsigned long virt_base)
210 unsigned long virt_base)
211{ 210{
212 unsigned long fboff, fb_width, fb_height, fb_start; 211 unsigned long fboff, fb_width, fb_height, fb_start;
213 int ret; 212 int ret;
@@ -327,7 +326,7 @@ unmap_screen_base:
327/* 326/*
328 * Initialise the framebuffer 327 * Initialise the framebuffer
329 */ 328 */
330static int __devinit hpfb_dio_probe(struct dio_dev * d, const struct dio_device_id * ent) 329static int hpfb_dio_probe(struct dio_dev *d, const struct dio_device_id *ent)
331{ 330{
332 unsigned long paddr, vaddr; 331 unsigned long paddr, vaddr;
333 332
@@ -350,7 +349,7 @@ static int __devinit hpfb_dio_probe(struct dio_dev * d, const struct dio_device_
350 return 0; 349 return 0;
351} 350}
352 351
353static void __devexit hpfb_remove_one(struct dio_dev *d) 352static void hpfb_remove_one(struct dio_dev *d)
354{ 353{
355 unregister_framebuffer(&fb_info); 354 unregister_framebuffer(&fb_info);
356 if (d->scode >= DIOII_SCBASE) 355 if (d->scode >= DIOII_SCBASE)
@@ -373,7 +372,7 @@ static struct dio_driver hpfb_driver = {
373 .name = "hpfb", 372 .name = "hpfb",
374 .id_table = hpfb_dio_tbl, 373 .id_table = hpfb_dio_tbl,
375 .probe = hpfb_dio_probe, 374 .probe = hpfb_dio_probe,
376 .remove = __devexit_p(hpfb_remove_one), 375 .remove = hpfb_remove_one,
377}; 376};
378 377
379int __init hpfb_init(void) 378int __init hpfb_init(void)
diff --git a/drivers/video/i740fb.c b/drivers/video/i740fb.c
index ff3f8808e4e9..cfd0c52e8f73 100644
--- a/drivers/video/i740fb.c
+++ b/drivers/video/i740fb.c
@@ -33,10 +33,10 @@
33 33
34#include "i740_reg.h" 34#include "i740_reg.h"
35 35
36static char *mode_option __devinitdata; 36static char *mode_option;
37 37
38#ifdef CONFIG_MTRR 38#ifdef CONFIG_MTRR
39static int mtrr __devinitdata = 1; 39static int mtrr = 1;
40#endif 40#endif
41 41
42struct i740fb_par { 42struct i740fb_par {
@@ -91,7 +91,7 @@ struct i740fb_par {
91#define DACSPEED24_SD 128 91#define DACSPEED24_SD 128
92#define DACSPEED32 86 92#define DACSPEED32 86
93 93
94static struct fb_fix_screeninfo i740fb_fix __devinitdata = { 94static struct fb_fix_screeninfo i740fb_fix = {
95 .id = "i740fb", 95 .id = "i740fb",
96 .type = FB_TYPE_PACKED_PIXELS, 96 .type = FB_TYPE_PACKED_PIXELS,
97 .visual = FB_VISUAL_TRUECOLOR, 97 .visual = FB_VISUAL_TRUECOLOR,
@@ -163,7 +163,7 @@ static int i740fb_ddc_getsda(void *data)
163 return !!(i740inreg(par, XRX, REG_DDC_STATE) & DDC_SDA); 163 return !!(i740inreg(par, XRX, REG_DDC_STATE) & DDC_SDA);
164} 164}
165 165
166static int __devinit i740fb_setup_ddc_bus(struct fb_info *info) 166static int i740fb_setup_ddc_bus(struct fb_info *info)
167{ 167{
168 struct i740fb_par *par = info->par; 168 struct i740fb_par *par = info->par;
169 169
@@ -1007,8 +1007,7 @@ static struct fb_ops i740fb_ops = {
1007 1007
1008/* ------------------------------------------------------------------------- */ 1008/* ------------------------------------------------------------------------- */
1009 1009
1010static int __devinit i740fb_probe(struct pci_dev *dev, 1010static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
1011 const struct pci_device_id *ent)
1012{ 1011{
1013 struct fb_info *info; 1012 struct fb_info *info;
1014 struct i740fb_par *par; 1013 struct i740fb_par *par;
@@ -1174,7 +1173,7 @@ err_enable_device:
1174 return ret; 1173 return ret;
1175} 1174}
1176 1175
1177static void __devexit i740fb_remove(struct pci_dev *dev) 1176static void i740fb_remove(struct pci_dev *dev)
1178{ 1177{
1179 struct fb_info *info = pci_get_drvdata(dev); 1178 struct fb_info *info = pci_get_drvdata(dev);
1180 1179
@@ -1275,7 +1274,7 @@ static struct pci_driver i740fb_driver = {
1275 .name = "i740fb", 1274 .name = "i740fb",
1276 .id_table = i740fb_id_table, 1275 .id_table = i740fb_id_table,
1277 .probe = i740fb_probe, 1276 .probe = i740fb_probe,
1278 .remove = __devexit_p(i740fb_remove), 1277 .remove = i740fb_remove,
1279 .suspend = i740fb_suspend, 1278 .suspend = i740fb_suspend,
1280 .resume = i740fb_resume, 1279 .resume = i740fb_resume,
1281}; 1280};
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index 5c067816a81d..4ce3438ade6f 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -74,12 +74,12 @@
74 * 74 *
75 * Experiment with v_offset to find out which works best for you. 75 * Experiment with v_offset to find out which works best for you.
76 */ 76 */
77static u32 v_offset_default __devinitdata; /* For 32 MiB Aper size, 8 should be the default */ 77static u32 v_offset_default; /* For 32 MiB Aper size, 8 should be the default */
78static u32 voffset __devinitdata; 78static u32 voffset;
79 79
80static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor); 80static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor);
81static int __devinit i810fb_init_pci (struct pci_dev *dev, 81static int i810fb_init_pci(struct pci_dev *dev,
82 const struct pci_device_id *entry); 82 const struct pci_device_id *entry);
83static void __exit i810fb_remove_pci(struct pci_dev *dev); 83static void __exit i810fb_remove_pci(struct pci_dev *dev);
84static int i810fb_resume(struct pci_dev *dev); 84static int i810fb_resume(struct pci_dev *dev);
85static int i810fb_suspend(struct pci_dev *dev, pm_message_t state); 85static int i810fb_suspend(struct pci_dev *dev, pm_message_t state);
@@ -97,7 +97,7 @@ static int i810fb_blank (int blank_mode, struct fb_info *info);
97static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par); 97static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par);
98 98
99/* PCI */ 99/* PCI */
100static const char * const i810_pci_list[] __devinitconst = { 100static const char * const i810_pci_list[] = {
101 "Intel(R) 810 Framebuffer Device" , 101 "Intel(R) 810 Framebuffer Device" ,
102 "Intel(R) 810-DC100 Framebuffer Device" , 102 "Intel(R) 810-DC100 Framebuffer Device" ,
103 "Intel(R) 810E Framebuffer Device" , 103 "Intel(R) 810E Framebuffer Device" ,
@@ -132,22 +132,22 @@ static struct pci_driver i810fb_driver = {
132 .resume = i810fb_resume, 132 .resume = i810fb_resume,
133}; 133};
134 134
135static char *mode_option __devinitdata = NULL; 135static char *mode_option = NULL;
136static int vram __devinitdata = 4; 136static int vram = 4;
137static int bpp __devinitdata = 8; 137static int bpp = 8;
138static bool mtrr __devinitdata; 138static bool mtrr;
139static bool accel __devinitdata; 139static bool accel;
140static int hsync1 __devinitdata; 140static int hsync1;
141static int hsync2 __devinitdata; 141static int hsync2;
142static int vsync1 __devinitdata; 142static int vsync1;
143static int vsync2 __devinitdata; 143static int vsync2;
144static int xres __devinitdata; 144static int xres;
145static int yres; 145static int yres;
146static int vyres __devinitdata; 146static int vyres;
147static bool sync __devinitdata; 147static bool sync;
148static bool extvga __devinitdata; 148static bool extvga;
149static bool dcolor __devinitdata; 149static bool dcolor;
150static bool ddc3 __devinitdata; 150static bool ddc3;
151 151
152/*------------------------------------------------------------*/ 152/*------------------------------------------------------------*/
153 153
@@ -1541,7 +1541,7 @@ static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1541 return 0; 1541 return 0;
1542} 1542}
1543 1543
1544static struct fb_ops i810fb_ops __devinitdata = { 1544static struct fb_ops i810fb_ops = {
1545 .owner = THIS_MODULE, 1545 .owner = THIS_MODULE,
1546 .fb_open = i810fb_open, 1546 .fb_open = i810fb_open,
1547 .fb_release = i810fb_release, 1547 .fb_release = i810fb_release,
@@ -1628,7 +1628,7 @@ fail:
1628 * AGP resource allocation * 1628 * AGP resource allocation *
1629 ***********************************************************************/ 1629 ***********************************************************************/
1630 1630
1631static void __devinit i810_fix_pointers(struct i810fb_par *par) 1631static void i810_fix_pointers(struct i810fb_par *par)
1632{ 1632{
1633 par->fb.physical = par->aperture.physical+(par->fb.offset << 12); 1633 par->fb.physical = par->aperture.physical+(par->fb.offset << 12);
1634 par->fb.virtual = par->aperture.virtual+(par->fb.offset << 12); 1634 par->fb.virtual = par->aperture.virtual+(par->fb.offset << 12);
@@ -1640,7 +1640,7 @@ static void __devinit i810_fix_pointers(struct i810fb_par *par)
1640 (par->cursor_heap.offset << 12); 1640 (par->cursor_heap.offset << 12);
1641} 1641}
1642 1642
1643static void __devinit i810_fix_offsets(struct i810fb_par *par) 1643static void i810_fix_offsets(struct i810fb_par *par)
1644{ 1644{
1645 if (vram + 1 > par->aperture.size >> 20) 1645 if (vram + 1 > par->aperture.size >> 20)
1646 vram = (par->aperture.size >> 20) - 1; 1646 vram = (par->aperture.size >> 20) - 1;
@@ -1660,7 +1660,7 @@ static void __devinit i810_fix_offsets(struct i810fb_par *par)
1660 par->cursor_heap.size = 4096; 1660 par->cursor_heap.size = 4096;
1661} 1661}
1662 1662
1663static int __devinit i810_alloc_agp_mem(struct fb_info *info) 1663static int i810_alloc_agp_mem(struct fb_info *info)
1664{ 1664{
1665 struct i810fb_par *par = info->par; 1665 struct i810fb_par *par = info->par;
1666 int size; 1666 int size;
@@ -1723,7 +1723,7 @@ static int __devinit i810_alloc_agp_mem(struct fb_info *info)
1723 * Sets the user monitor's horizontal and vertical 1723 * Sets the user monitor's horizontal and vertical
1724 * frequency limits 1724 * frequency limits
1725 */ 1725 */
1726static void __devinit i810_init_monspecs(struct fb_info *info) 1726static void i810_init_monspecs(struct fb_info *info)
1727{ 1727{
1728 if (!hsync1) 1728 if (!hsync1)
1729 hsync1 = HFMIN; 1729 hsync1 = HFMIN;
@@ -1755,8 +1755,7 @@ static void __devinit i810_init_monspecs(struct fb_info *info)
1755 * @par: pointer to i810fb_par structure 1755 * @par: pointer to i810fb_par structure
1756 * @info: pointer to current fb_info structure 1756 * @info: pointer to current fb_info structure
1757 */ 1757 */
1758static void __devinit i810_init_defaults(struct i810fb_par *par, 1758static void i810_init_defaults(struct i810fb_par *par, struct fb_info *info)
1759 struct fb_info *info)
1760{ 1759{
1761 mutex_init(&par->open_lock); 1760 mutex_init(&par->open_lock);
1762 1761
@@ -1812,7 +1811,7 @@ static void __devinit i810_init_defaults(struct i810fb_par *par,
1812 * i810_init_device - initialize device 1811 * i810_init_device - initialize device
1813 * @par: pointer to i810fb_par structure 1812 * @par: pointer to i810fb_par structure
1814 */ 1813 */
1815static void __devinit i810_init_device(struct i810fb_par *par) 1814static void i810_init_device(struct i810fb_par *par)
1816{ 1815{
1817 u8 reg; 1816 u8 reg;
1818 u8 __iomem *mmio = par->mmio_start_virtual; 1817 u8 __iomem *mmio = par->mmio_start_virtual;
@@ -1833,9 +1832,8 @@ static void __devinit i810_init_device(struct i810fb_par *par)
1833 1832
1834} 1833}
1835 1834
1836static int __devinit 1835static int i810_allocate_pci_resource(struct i810fb_par *par,
1837i810_allocate_pci_resource(struct i810fb_par *par, 1836 const struct pci_device_id *entry)
1838 const struct pci_device_id *entry)
1839{ 1837{
1840 int err; 1838 int err;
1841 1839
@@ -1892,7 +1890,7 @@ i810_allocate_pci_resource(struct i810fb_par *par,
1892 return 0; 1890 return 0;
1893} 1891}
1894 1892
1895static void __devinit i810fb_find_init_mode(struct fb_info *info) 1893static void i810fb_find_init_mode(struct fb_info *info)
1896{ 1894{
1897 struct fb_videomode mode; 1895 struct fb_videomode mode;
1898 struct fb_var_screeninfo var; 1896 struct fb_var_screeninfo var;
@@ -1956,7 +1954,7 @@ static void __devinit i810fb_find_init_mode(struct fb_info *info)
1956} 1954}
1957 1955
1958#ifndef MODULE 1956#ifndef MODULE
1959static int __devinit i810fb_setup(char *options) 1957static int i810fb_setup(char *options)
1960{ 1958{
1961 char *this_opt, *suffix = NULL; 1959 char *this_opt, *suffix = NULL;
1962 1960
@@ -2007,8 +2005,8 @@ static int __devinit i810fb_setup(char *options)
2007} 2005}
2008#endif 2006#endif
2009 2007
2010static int __devinit i810fb_init_pci (struct pci_dev *dev, 2008static int i810fb_init_pci(struct pci_dev *dev,
2011 const struct pci_device_id *entry) 2009 const struct pci_device_id *entry)
2012{ 2010{
2013 struct fb_info *info; 2011 struct fb_info *info;
2014 struct i810fb_par *par = NULL; 2012 struct i810fb_par *par = NULL;
@@ -2136,7 +2134,7 @@ static void __exit i810fb_remove_pci(struct pci_dev *dev)
2136} 2134}
2137 2135
2138#ifndef MODULE 2136#ifndef MODULE
2139static int __devinit i810fb_init(void) 2137static int i810fb_init(void)
2140{ 2138{
2141 char *option = NULL; 2139 char *option = NULL;
2142 2140
@@ -2154,7 +2152,7 @@ static int __devinit i810fb_init(void)
2154 2152
2155#ifdef MODULE 2153#ifdef MODULE
2156 2154
2157static int __devinit i810fb_init(void) 2155static int i810fb_init(void)
2158{ 2156{
2159 hsync1 *= 1000; 2157 hsync1 *= 1000;
2160 hsync2 *= 1000; 2158 hsync2 *= 1000;
diff --git a/drivers/video/i810/i810_main.h b/drivers/video/i810/i810_main.h
index 51d4f3d4116d..a25afaa534ba 100644
--- a/drivers/video/i810/i810_main.h
+++ b/drivers/video/i810/i810_main.h
@@ -64,7 +64,7 @@ static inline void flush_cache(void)
64 64
65#include <asm/mtrr.h> 65#include <asm/mtrr.h>
66 66
67static inline void __devinit set_mtrr(struct i810fb_par *par) 67static inline void set_mtrr(struct i810fb_par *par)
68{ 68{
69 par->mtrr_reg = mtrr_add((u32) par->aperture.physical, 69 par->mtrr_reg = mtrr_add((u32) par->aperture.physical,
70 par->aperture.size, MTRR_TYPE_WRCOMB, 1); 70 par->aperture.size, MTRR_TYPE_WRCOMB, 1);
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index 2d97752f79a5..79cbfa7d1a9b 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -571,7 +571,7 @@ static int __init igafb_setup(char *options)
571 571
572module_init(igafb_init); 572module_init(igafb_init);
573MODULE_LICENSE("GPL"); 573MODULE_LICENSE("GPL");
574static struct pci_device_id igafb_pci_tbl[] __devinitdata = { 574static struct pci_device_id igafb_pci_tbl[] = {
575 { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682, 575 { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682,
576 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 576 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
577 { } 577 { }
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
index 8149356471e4..d5220cc90e93 100644
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -225,7 +225,7 @@ struct initvalues {
225 __u8 addr, value; 225 __u8 addr, value;
226}; 226};
227 227
228static struct initvalues ibm_initregs[] __devinitdata = { 228static struct initvalues ibm_initregs[] = {
229 { CLKCTL, 0x21 }, 229 { CLKCTL, 0x21 },
230 { SYNCCTL, 0x00 }, 230 { SYNCCTL, 0x00 },
231 { HSYNCPOS, 0x00 }, 231 { HSYNCPOS, 0x00 },
@@ -272,7 +272,7 @@ static struct initvalues ibm_initregs[] __devinitdata = {
272 { KEYCTL, 0x00 } 272 { KEYCTL, 0x00 }
273}; 273};
274 274
275static struct initvalues tvp_initregs[] __devinitdata = { 275static struct initvalues tvp_initregs[] = {
276 { TVPIRICC, 0x00 }, 276 { TVPIRICC, 0x00 },
277 { TVPIRBRC, 0xe4 }, 277 { TVPIRBRC, 0xe4 },
278 { TVPIRLAC, 0x06 }, 278 { TVPIRLAC, 0x06 },
@@ -336,7 +336,7 @@ enum {
336static int inverse = 0; 336static int inverse = 0;
337static char fontname[40] __initdata = { 0 }; 337static char fontname[40] __initdata = { 0 };
338#if defined(CONFIG_PPC) 338#if defined(CONFIG_PPC)
339static signed char init_vmode __devinitdata = -1, init_cmode __devinitdata = -1; 339static signed char init_vmode = -1, init_cmode = -1;
340#endif 340#endif
341 341
342static struct imstt_regvals tvp_reg_init_2 = { 342static struct imstt_regvals tvp_reg_init_2 = {
@@ -1333,7 +1333,7 @@ static struct pci_driver imsttfb_pci_driver = {
1333 .name = "imsttfb", 1333 .name = "imsttfb",
1334 .id_table = imsttfb_pci_tbl, 1334 .id_table = imsttfb_pci_tbl,
1335 .probe = imsttfb_probe, 1335 .probe = imsttfb_probe,
1336 .remove = __devexit_p(imsttfb_remove), 1336 .remove = imsttfb_remove,
1337}; 1337};
1338 1338
1339static struct fb_ops imsttfb_ops = { 1339static struct fb_ops imsttfb_ops = {
@@ -1349,8 +1349,7 @@ static struct fb_ops imsttfb_ops = {
1349 .fb_ioctl = imsttfb_ioctl, 1349 .fb_ioctl = imsttfb_ioctl,
1350}; 1350};
1351 1351
1352static void __devinit 1352static void init_imstt(struct fb_info *info)
1353init_imstt(struct fb_info *info)
1354{ 1353{
1355 struct imstt_par *par = info->par; 1354 struct imstt_par *par = info->par;
1356 __u32 i, tmp, *ip, *end; 1355 __u32 i, tmp, *ip, *end;
@@ -1466,8 +1465,7 @@ init_imstt(struct fb_info *info)
1466 info->node, info->fix.id, info->fix.smem_len >> 20, tmp); 1465 info->node, info->fix.id, info->fix.smem_len >> 20, tmp);
1467} 1466}
1468 1467
1469static int __devinit 1468static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1470imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1471{ 1469{
1472 unsigned long addr, size; 1470 unsigned long addr, size;
1473 struct imstt_par *par; 1471 struct imstt_par *par;
@@ -1534,8 +1532,7 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1534 return 0; 1532 return 0;
1535} 1533}
1536 1534
1537static void __devexit 1535static void imsttfb_remove(struct pci_dev *pdev)
1538imsttfb_remove(struct pci_dev *pdev)
1539{ 1536{
1540 struct fb_info *info = pci_get_drvdata(pdev); 1537 struct fb_info *info = pci_get_drvdata(pdev);
1541 struct imstt_par *par = info->par; 1538 struct imstt_par *par = info->par;
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index e501dbc966b3..12526787a7c7 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -917,7 +917,7 @@ failed_init:
917 return ret; 917 return ret;
918} 918}
919 919
920static int __devexit imxfb_remove(struct platform_device *pdev) 920static int imxfb_remove(struct platform_device *pdev)
921{ 921{
922 struct imx_fb_platform_data *pdata; 922 struct imx_fb_platform_data *pdata;
923 struct fb_info *info = platform_get_drvdata(pdev); 923 struct fb_info *info = platform_get_drvdata(pdev);
@@ -959,7 +959,7 @@ void imxfb_shutdown(struct platform_device * dev)
959static struct platform_driver imxfb_driver = { 959static struct platform_driver imxfb_driver = {
960 .suspend = imxfb_suspend, 960 .suspend = imxfb_suspend,
961 .resume = imxfb_resume, 961 .resume = imxfb_resume,
962 .remove = __devexit_p(imxfb_remove), 962 .remove = imxfb_remove,
963 .shutdown = imxfb_shutdown, 963 .shutdown = imxfb_shutdown,
964 .driver = { 964 .driver = {
965 .name = DRIVER_NAME, 965 .name = DRIVER_NAME,
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index bdcbfbae2777..8209e46c5d28 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -132,7 +132,7 @@
132#include "intelfbhw.h" 132#include "intelfbhw.h"
133#include "../edid.h" 133#include "../edid.h"
134 134
135static void __devinit get_initial_mode(struct intelfb_info *dinfo); 135static void get_initial_mode(struct intelfb_info *dinfo);
136static void update_dinfo(struct intelfb_info *dinfo, 136static void update_dinfo(struct intelfb_info *dinfo,
137 struct fb_var_screeninfo *var); 137 struct fb_var_screeninfo *var);
138static int intelfb_open(struct fb_info *info, int user); 138static int intelfb_open(struct fb_info *info, int user);
@@ -162,10 +162,10 @@ static int intelfb_sync(struct fb_info *info);
162static int intelfb_ioctl(struct fb_info *info, 162static int intelfb_ioctl(struct fb_info *info,
163 unsigned int cmd, unsigned long arg); 163 unsigned int cmd, unsigned long arg);
164 164
165static int __devinit intelfb_pci_register(struct pci_dev *pdev, 165static int intelfb_pci_register(struct pci_dev *pdev,
166 const struct pci_device_id *ent); 166 const struct pci_device_id *ent);
167static void __devexit intelfb_pci_unregister(struct pci_dev *pdev); 167static void intelfb_pci_unregister(struct pci_dev *pdev);
168static int __devinit intelfb_set_fbinfo(struct intelfb_info *dinfo); 168static int intelfb_set_fbinfo(struct intelfb_info *dinfo);
169 169
170/* 170/*
171 * Limiting the class to PCI_CLASS_DISPLAY_VGA prevents function 1 of the 171 * Limiting the class to PCI_CLASS_DISPLAY_VGA prevents function 1 of the
@@ -177,7 +177,7 @@ static int __devinit intelfb_set_fbinfo(struct intelfb_info *dinfo);
177#define INTELFB_CLASS_MASK 0 177#define INTELFB_CLASS_MASK 0
178#endif 178#endif
179 179
180static struct pci_device_id intelfb_pci_table[] __devinitdata = { 180static struct pci_device_id intelfb_pci_table[] = {
181 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830M, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_830M }, 181 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830M, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_830M },
182 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G }, 182 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G },
183 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM }, 183 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM },
@@ -219,7 +219,7 @@ static struct pci_driver intelfb_driver = {
219 .name = "intelfb", 219 .name = "intelfb",
220 .id_table = intelfb_pci_table, 220 .id_table = intelfb_pci_table,
221 .probe = intelfb_pci_register, 221 .probe = intelfb_pci_register,
222 .remove = __devexit_p(intelfb_pci_unregister) 222 .remove = intelfb_pci_unregister,
223}; 223};
224 224
225/* Module description/parameters */ 225/* Module description/parameters */
@@ -415,7 +415,7 @@ module_exit(intelfb_exit);
415 ***************************************************************/ 415 ***************************************************************/
416 416
417#ifdef CONFIG_MTRR 417#ifdef CONFIG_MTRR
418static inline void __devinit set_mtrr(struct intelfb_info *dinfo) 418static inline void set_mtrr(struct intelfb_info *dinfo)
419{ 419{
420 dinfo->mtrr_reg = mtrr_add(dinfo->aperture.physical, 420 dinfo->mtrr_reg = mtrr_add(dinfo->aperture.physical,
421 dinfo->aperture.size, MTRR_TYPE_WRCOMB, 1); 421 dinfo->aperture.size, MTRR_TYPE_WRCOMB, 1);
@@ -497,8 +497,8 @@ static void cleanup(struct intelfb_info *dinfo)
497} while (0) 497} while (0)
498 498
499 499
500static int __devinit intelfb_pci_register(struct pci_dev *pdev, 500static int intelfb_pci_register(struct pci_dev *pdev,
501 const struct pci_device_id *ent) 501 const struct pci_device_id *ent)
502{ 502{
503 struct fb_info *info; 503 struct fb_info *info;
504 struct intelfb_info *dinfo; 504 struct intelfb_info *dinfo;
@@ -921,8 +921,7 @@ err_out_cmap:
921 return -ENODEV; 921 return -ENODEV;
922} 922}
923 923
924static void __devexit 924static void intelfb_pci_unregister(struct pci_dev *pdev)
925intelfb_pci_unregister(struct pci_dev *pdev)
926{ 925{
927 struct intelfb_info *dinfo = pci_get_drvdata(pdev); 926 struct intelfb_info *dinfo = pci_get_drvdata(pdev);
928 927
@@ -970,7 +969,7 @@ static __inline__ int var_to_refresh(const struct fb_var_screeninfo *var)
970 * Various intialisation functions * 969 * Various intialisation functions *
971 ***************************************************************/ 970 ***************************************************************/
972 971
973static void __devinit get_initial_mode(struct intelfb_info *dinfo) 972static void get_initial_mode(struct intelfb_info *dinfo)
974{ 973{
975 struct fb_var_screeninfo *var; 974 struct fb_var_screeninfo *var;
976 int xtot, ytot; 975 int xtot, ytot;
@@ -1037,7 +1036,7 @@ static void __devinit get_initial_mode(struct intelfb_info *dinfo)
1037 } 1036 }
1038} 1037}
1039 1038
1040static int __devinit intelfb_init_var(struct intelfb_info *dinfo) 1039static int intelfb_init_var(struct intelfb_info *dinfo)
1041{ 1040{
1042 struct fb_var_screeninfo *var; 1041 struct fb_var_screeninfo *var;
1043 int msrc = 0; 1042 int msrc = 0;
@@ -1118,7 +1117,7 @@ static int __devinit intelfb_init_var(struct intelfb_info *dinfo)
1118 return 0; 1117 return 0;
1119} 1118}
1120 1119
1121static int __devinit intelfb_set_fbinfo(struct intelfb_info *dinfo) 1120static int intelfb_set_fbinfo(struct intelfb_info *dinfo)
1122{ 1121{
1123 struct fb_info *info = dinfo->info; 1122 struct fb_info *info = dinfo->info;
1124 1123
diff --git a/drivers/video/jz4740_fb.c b/drivers/video/jz4740_fb.c
index 4d25711b9982..d999bb5e0485 100644
--- a/drivers/video/jz4740_fb.c
+++ b/drivers/video/jz4740_fb.c
@@ -136,7 +136,7 @@ struct jzfb {
136 uint32_t pseudo_palette[16]; 136 uint32_t pseudo_palette[16];
137}; 137};
138 138
139static const struct fb_fix_screeninfo jzfb_fix __devinitconst = { 139static const struct fb_fix_screeninfo jzfb_fix = {
140 .id = "JZ4740 FB", 140 .id = "JZ4740 FB",
141 .type = FB_TYPE_PACKED_PIXELS, 141 .type = FB_TYPE_PACKED_PIXELS,
142 .visual = FB_VISUAL_TRUECOLOR, 142 .visual = FB_VISUAL_TRUECOLOR,
@@ -619,7 +619,7 @@ static struct fb_ops jzfb_ops = {
619 .fb_setcolreg = jzfb_setcolreg, 619 .fb_setcolreg = jzfb_setcolreg,
620}; 620};
621 621
622static int __devinit jzfb_probe(struct platform_device *pdev) 622static int jzfb_probe(struct platform_device *pdev)
623{ 623{
624 int ret; 624 int ret;
625 struct jzfb *jzfb; 625 struct jzfb *jzfb;
@@ -725,7 +725,7 @@ err_framebuffer_release:
725 return ret; 725 return ret;
726} 726}
727 727
728static int __devexit jzfb_remove(struct platform_device *pdev) 728static int jzfb_remove(struct platform_device *pdev)
729{ 729{
730 struct jzfb *jzfb = platform_get_drvdata(pdev); 730 struct jzfb *jzfb = platform_get_drvdata(pdev);
731 731
@@ -794,7 +794,7 @@ static const struct dev_pm_ops jzfb_pm_ops = {
794 794
795static struct platform_driver jzfb_driver = { 795static struct platform_driver jzfb_driver = {
796 .probe = jzfb_probe, 796 .probe = jzfb_probe,
797 .remove = __devexit_p(jzfb_remove), 797 .remove = jzfb_remove,
798 .driver = { 798 .driver = {
799 .name = "jz4740-fb", 799 .name = "jz4740-fb",
800 .pm = JZFB_PM_OPS, 800 .pm = JZFB_PM_OPS,
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
index acb9370fdb14..6157f74ac600 100644
--- a/drivers/video/kyro/fbdev.c
+++ b/drivers/video/kyro/fbdev.c
@@ -40,14 +40,14 @@
40#define KHZ2PICOS(a) (1000000000UL/(a)) 40#define KHZ2PICOS(a) (1000000000UL/(a))
41 41
42/****************************************************************************/ 42/****************************************************************************/
43static struct fb_fix_screeninfo kyro_fix __devinitdata = { 43static struct fb_fix_screeninfo kyro_fix = {
44 .id = "ST Kyro", 44 .id = "ST Kyro",
45 .type = FB_TYPE_PACKED_PIXELS, 45 .type = FB_TYPE_PACKED_PIXELS,
46 .visual = FB_VISUAL_TRUECOLOR, 46 .visual = FB_VISUAL_TRUECOLOR,
47 .accel = FB_ACCEL_NONE, 47 .accel = FB_ACCEL_NONE,
48}; 48};
49 49
50static struct fb_var_screeninfo kyro_var __devinitdata = { 50static struct fb_var_screeninfo kyro_var = {
51 /* 640x480, 16bpp @ 60 Hz */ 51 /* 640x480, 16bpp @ 60 Hz */
52 .xres = 640, 52 .xres = 640,
53 .yres = 480, 53 .yres = 480,
@@ -81,18 +81,18 @@ typedef struct {
81/* global graphics card info structure (one per card) */ 81/* global graphics card info structure (one per card) */
82static device_info_t deviceInfo; 82static device_info_t deviceInfo;
83 83
84static char *mode_option __devinitdata = NULL; 84static char *mode_option = NULL;
85static int nopan __devinitdata = 0; 85static int nopan = 0;
86static int nowrap __devinitdata = 1; 86static int nowrap = 1;
87#ifdef CONFIG_MTRR 87#ifdef CONFIG_MTRR
88static int nomtrr __devinitdata = 0; 88static int nomtrr = 0;
89#endif 89#endif
90 90
91/* PCI driver prototypes */ 91/* PCI driver prototypes */
92static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent); 92static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
93static void kyrofb_remove(struct pci_dev *pdev); 93static void kyrofb_remove(struct pci_dev *pdev);
94 94
95static struct fb_videomode kyro_modedb[] __devinitdata = { 95static struct fb_videomode kyro_modedb[] = {
96 { 96 {
97 /* 640x350 @ 85Hz */ 97 /* 640x350 @ 85Hz */
98 NULL, 85, 640, 350, KHZ2PICOS(31500), 98 NULL, 85, 640, 350, KHZ2PICOS(31500),
@@ -653,7 +653,7 @@ static struct pci_driver kyrofb_pci_driver = {
653 .name = "kyrofb", 653 .name = "kyrofb",
654 .id_table = kyrofb_pci_tbl, 654 .id_table = kyrofb_pci_tbl,
655 .probe = kyrofb_probe, 655 .probe = kyrofb_probe,
656 .remove = __devexit_p(kyrofb_remove), 656 .remove = kyrofb_remove,
657}; 657};
658 658
659static struct fb_ops kyrofb_ops = { 659static struct fb_ops kyrofb_ops = {
@@ -667,8 +667,7 @@ static struct fb_ops kyrofb_ops = {
667 .fb_imageblit = cfb_imageblit, 667 .fb_imageblit = cfb_imageblit,
668}; 668};
669 669
670static int __devinit kyrofb_probe(struct pci_dev *pdev, 670static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
671 const struct pci_device_id *ent)
672{ 671{
673 struct fb_info *info; 672 struct fb_info *info;
674 struct kyrofb_info *currentpar; 673 struct kyrofb_info *currentpar;
@@ -754,7 +753,7 @@ out_unmap:
754 return -EINVAL; 753 return -EINVAL;
755} 754}
756 755
757static void __devexit kyrofb_remove(struct pci_dev *pdev) 756static void kyrofb_remove(struct pci_dev *pdev)
758{ 757{
759 struct fb_info *info = pci_get_drvdata(pdev); 758 struct fb_info *info = pci_get_drvdata(pdev);
760 struct kyrofb_info *par = info->par; 759 struct kyrofb_info *par = info->par;
diff --git a/drivers/video/leo.c b/drivers/video/leo.c
index 9e946e2c1da9..b17f5009a436 100644
--- a/drivers/video/leo.c
+++ b/drivers/video/leo.c
@@ -547,7 +547,7 @@ static void leo_unmap_regs(struct platform_device *op, struct fb_info *info,
547 of_iounmap(&op->resource[0], info->screen_base, 0x800000); 547 of_iounmap(&op->resource[0], info->screen_base, 0x800000);
548} 548}
549 549
550static int __devinit leo_probe(struct platform_device *op) 550static int leo_probe(struct platform_device *op)
551{ 551{
552 struct device_node *dp = op->dev.of_node; 552 struct device_node *dp = op->dev.of_node;
553 struct fb_info *info; 553 struct fb_info *info;
@@ -636,7 +636,7 @@ out_err:
636 return err; 636 return err;
637} 637}
638 638
639static int __devexit leo_remove(struct platform_device *op) 639static int leo_remove(struct platform_device *op)
640{ 640{
641 struct fb_info *info = dev_get_drvdata(&op->dev); 641 struct fb_info *info = dev_get_drvdata(&op->dev);
642 struct leo_par *par = info->par; 642 struct leo_par *par = info->par;
@@ -668,7 +668,7 @@ static struct platform_driver leo_driver = {
668 .of_match_table = leo_match, 668 .of_match_table = leo_match,
669 }, 669 },
670 .probe = leo_probe, 670 .probe = leo_probe,
671 .remove = __devexit_p(leo_remove), 671 .remove = leo_remove,
672}; 672};
673 673
674static int __init leo_init(void) 674static int __init leo_init(void)
diff --git a/drivers/video/mb862xx/mb862xxfbdrv.c b/drivers/video/mb862xx/mb862xxfbdrv.c
index d68e332aa21c..91c59c9fb082 100644
--- a/drivers/video/mb862xx/mb862xxfbdrv.c
+++ b/drivers/video/mb862xx/mb862xxfbdrv.c
@@ -668,7 +668,7 @@ static int mb862xx_gdc_init(struct mb862xxfb_par *par)
668 return 0; 668 return 0;
669} 669}
670 670
671static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev) 671static int of_platform_mb862xx_probe(struct platform_device *ofdev)
672{ 672{
673 struct device_node *np = ofdev->dev.of_node; 673 struct device_node *np = ofdev->dev.of_node;
674 struct device *dev = &ofdev->dev; 674 struct device *dev = &ofdev->dev;
@@ -786,7 +786,7 @@ fbrel:
786 return ret; 786 return ret;
787} 787}
788 788
789static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev) 789static int of_platform_mb862xx_remove(struct platform_device *ofdev)
790{ 790{
791 struct fb_info *fbi = dev_get_drvdata(&ofdev->dev); 791 struct fb_info *fbi = dev_get_drvdata(&ofdev->dev);
792 struct mb862xxfb_par *par = fbi->par; 792 struct mb862xxfb_par *par = fbi->par;
@@ -823,7 +823,7 @@ static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev)
823/* 823/*
824 * common types 824 * common types
825 */ 825 */
826static struct of_device_id __devinitdata of_platform_mb862xx_tbl[] = { 826static struct of_device_id of_platform_mb862xx_tbl[] = {
827 { .compatible = "fujitsu,MB86276", }, 827 { .compatible = "fujitsu,MB86276", },
828 { .compatible = "fujitsu,lime", }, 828 { .compatible = "fujitsu,lime", },
829 { .compatible = "fujitsu,MB86277", }, 829 { .compatible = "fujitsu,MB86277", },
@@ -841,7 +841,7 @@ static struct platform_driver of_platform_mb862xxfb_driver = {
841 .of_match_table = of_platform_mb862xx_tbl, 841 .of_match_table = of_platform_mb862xx_tbl,
842 }, 842 },
843 .probe = of_platform_mb862xx_probe, 843 .probe = of_platform_mb862xx_probe,
844 .remove = __devexit_p(of_platform_mb862xx_remove), 844 .remove = of_platform_mb862xx_remove,
845}; 845};
846#endif 846#endif
847 847
@@ -984,7 +984,7 @@ static inline int mb862xx_pci_gdc_init(struct mb862xxfb_par *par)
984#define CHIP_ID(id) \ 984#define CHIP_ID(id) \
985 { PCI_DEVICE(PCI_VENDOR_ID_FUJITSU_LIMITED, id) } 985 { PCI_DEVICE(PCI_VENDOR_ID_FUJITSU_LIMITED, id) }
986 986
987static struct pci_device_id mb862xx_pci_tbl[] __devinitdata = { 987static struct pci_device_id mb862xx_pci_tbl[] = {
988 /* MB86295/MB86296 */ 988 /* MB86295/MB86296 */
989 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP), 989 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP),
990 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA), 990 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA),
@@ -995,8 +995,8 @@ static struct pci_device_id mb862xx_pci_tbl[] __devinitdata = {
995 995
996MODULE_DEVICE_TABLE(pci, mb862xx_pci_tbl); 996MODULE_DEVICE_TABLE(pci, mb862xx_pci_tbl);
997 997
998static int __devinit mb862xx_pci_probe(struct pci_dev *pdev, 998static int mb862xx_pci_probe(struct pci_dev *pdev,
999 const struct pci_device_id *ent) 999 const struct pci_device_id *ent)
1000{ 1000{
1001 struct mb862xxfb_par *par; 1001 struct mb862xxfb_par *par;
1002 struct fb_info *info; 1002 struct fb_info *info;
@@ -1133,7 +1133,7 @@ out:
1133 return ret; 1133 return ret;
1134} 1134}
1135 1135
1136static void __devexit mb862xx_pci_remove(struct pci_dev *pdev) 1136static void mb862xx_pci_remove(struct pci_dev *pdev)
1137{ 1137{
1138 struct fb_info *fbi = pci_get_drvdata(pdev); 1138 struct fb_info *fbi = pci_get_drvdata(pdev);
1139 struct mb862xxfb_par *par = fbi->par; 1139 struct mb862xxfb_par *par = fbi->par;
@@ -1174,11 +1174,11 @@ static struct pci_driver mb862xxfb_pci_driver = {
1174 .name = DRV_NAME, 1174 .name = DRV_NAME,
1175 .id_table = mb862xx_pci_tbl, 1175 .id_table = mb862xx_pci_tbl,
1176 .probe = mb862xx_pci_probe, 1176 .probe = mb862xx_pci_probe,
1177 .remove = __devexit_p(mb862xx_pci_remove), 1177 .remove = mb862xx_pci_remove,
1178}; 1178};
1179#endif 1179#endif
1180 1180
1181static int __devinit mb862xxfb_init(void) 1181static int mb862xxfb_init(void)
1182{ 1182{
1183 int ret = -ENODEV; 1183 int ret = -ENODEV;
1184 1184
diff --git a/drivers/video/mbx/mbxdebugfs.c b/drivers/video/mbx/mbxdebugfs.c
index 12dec7634c55..4449f249b0e7 100644
--- a/drivers/video/mbx/mbxdebugfs.c
+++ b/drivers/video/mbx/mbxdebugfs.c
@@ -213,7 +213,7 @@ static const struct file_operations misc_fops = {
213 .llseek = default_llseek, 213 .llseek = default_llseek,
214}; 214};
215 215
216static void __devinit mbxfb_debugfs_init(struct fb_info *fbi) 216static void mbxfb_debugfs_init(struct fb_info *fbi)
217{ 217{
218 struct mbxfb_info *mfbi = fbi->par; 218 struct mbxfb_info *mfbi = fbi->par;
219 struct mbxfb_debugfs_data *dbg; 219 struct mbxfb_debugfs_data *dbg;
@@ -236,7 +236,7 @@ static void __devinit mbxfb_debugfs_init(struct fb_info *fbi)
236 fbi, &misc_fops); 236 fbi, &misc_fops);
237} 237}
238 238
239static void __devexit mbxfb_debugfs_remove(struct fb_info *fbi) 239static void mbxfb_debugfs_remove(struct fb_info *fbi)
240{ 240{
241 struct mbxfb_info *mfbi = fbi->par; 241 struct mbxfb_info *mfbi = fbi->par;
242 struct mbxfb_debugfs_data *dbg = mfbi->debugfs_data; 242 struct mbxfb_debugfs_data *dbg = mfbi->debugfs_data;
diff --git a/drivers/video/mbx/mbxfb.c b/drivers/video/mbx/mbxfb.c
index 6563e50413c1..0c1a874ffd2b 100644
--- a/drivers/video/mbx/mbxfb.c
+++ b/drivers/video/mbx/mbxfb.c
@@ -79,7 +79,7 @@ struct mbxfb_info {
79 79
80}; 80};
81 81
82static struct fb_var_screeninfo mbxfb_default __devinitdata = { 82static struct fb_var_screeninfo mbxfb_default = {
83 .xres = 640, 83 .xres = 640,
84 .yres = 480, 84 .yres = 480,
85 .xres_virtual = 640, 85 .xres_virtual = 640,
@@ -102,7 +102,7 @@ static struct fb_var_screeninfo mbxfb_default __devinitdata = {
102 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 102 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
103}; 103};
104 104
105static struct fb_fix_screeninfo mbxfb_fix __devinitdata = { 105static struct fb_fix_screeninfo mbxfb_fix = {
106 .id = "MBX", 106 .id = "MBX",
107 .type = FB_TYPE_PACKED_PIXELS, 107 .type = FB_TYPE_PACKED_PIXELS,
108 .visual = FB_VISUAL_TRUECOLOR, 108 .visual = FB_VISUAL_TRUECOLOR,
@@ -687,7 +687,7 @@ static struct fb_ops mbxfb_ops = {
687 Enable external SDRAM controller. Assume that all clocks are active 687 Enable external SDRAM controller. Assume that all clocks are active
688 by now. 688 by now.
689*/ 689*/
690static void __devinit setup_memc(struct fb_info *fbi) 690static void setup_memc(struct fb_info *fbi)
691{ 691{
692 unsigned long tmp; 692 unsigned long tmp;
693 int i; 693 int i;
@@ -747,7 +747,7 @@ static void enable_clocks(struct fb_info *fbi)
747 write_reg_dly(0x00000001, PIXCLKDIV); 747 write_reg_dly(0x00000001, PIXCLKDIV);
748} 748}
749 749
750static void __devinit setup_graphics(struct fb_info *fbi) 750static void setup_graphics(struct fb_info *fbi)
751{ 751{
752 unsigned long gsctrl; 752 unsigned long gsctrl;
753 unsigned long vscadr; 753 unsigned long vscadr;
@@ -781,7 +781,7 @@ static void __devinit setup_graphics(struct fb_info *fbi)
781 write_reg_dly(vscadr, VSCADR); 781 write_reg_dly(vscadr, VSCADR);
782} 782}
783 783
784static void __devinit setup_display(struct fb_info *fbi) 784static void setup_display(struct fb_info *fbi)
785{ 785{
786 unsigned long dsctrl = 0; 786 unsigned long dsctrl = 0;
787 787
@@ -795,7 +795,7 @@ static void __devinit setup_display(struct fb_info *fbi)
795 write_reg_dly((readl(DSCTRL) | DSCTRL_SYNCGEN_EN), DSCTRL); 795 write_reg_dly((readl(DSCTRL) | DSCTRL_SYNCGEN_EN), DSCTRL);
796} 796}
797 797
798static void __devinit enable_controller(struct fb_info *fbi) 798static void enable_controller(struct fb_info *fbi)
799{ 799{
800 u32 svctrl, shctrl; 800 u32 svctrl, shctrl;
801 801
@@ -881,7 +881,7 @@ static int mbxfb_resume(struct platform_device *dev)
881 881
882#define res_size(_r) (((_r)->end - (_r)->start) + 1) 882#define res_size(_r) (((_r)->end - (_r)->start) + 1)
883 883
884static int __devinit mbxfb_probe(struct platform_device *dev) 884static int mbxfb_probe(struct platform_device *dev)
885{ 885{
886 int ret; 886 int ret;
887 struct fb_info *fbi; 887 struct fb_info *fbi;
@@ -1006,7 +1006,7 @@ err1:
1006 return ret; 1006 return ret;
1007} 1007}
1008 1008
1009static int __devexit mbxfb_remove(struct platform_device *dev) 1009static int mbxfb_remove(struct platform_device *dev)
1010{ 1010{
1011 struct fb_info *fbi = platform_get_drvdata(dev); 1011 struct fb_info *fbi = platform_get_drvdata(dev);
1012 1012
@@ -1038,7 +1038,7 @@ static int __devexit mbxfb_remove(struct platform_device *dev)
1038 1038
1039static struct platform_driver mbxfb_driver = { 1039static struct platform_driver mbxfb_driver = {
1040 .probe = mbxfb_probe, 1040 .probe = mbxfb_probe,
1041 .remove = __devexit_p(mbxfb_remove), 1041 .remove = mbxfb_remove,
1042 .suspend = mbxfb_suspend, 1042 .suspend = mbxfb_suspend,
1043 .resume = mbxfb_resume, 1043 .resume = mbxfb_resume,
1044 .driver = { 1044 .driver = {
diff --git a/drivers/video/metronomefb.c b/drivers/video/metronomefb.c
index 97d45e5115e2..f30150d71be9 100644
--- a/drivers/video/metronomefb.c
+++ b/drivers/video/metronomefb.c
@@ -99,7 +99,7 @@ static struct epd_frame epd_frame_table[] = {
99 }, 99 },
100}; 100};
101 101
102static struct fb_fix_screeninfo metronomefb_fix __devinitdata = { 102static struct fb_fix_screeninfo metronomefb_fix = {
103 .id = "metronomefb", 103 .id = "metronomefb",
104 .type = FB_TYPE_PACKED_PIXELS, 104 .type = FB_TYPE_PACKED_PIXELS,
105 .visual = FB_VISUAL_STATIC_PSEUDOCOLOR, 105 .visual = FB_VISUAL_STATIC_PSEUDOCOLOR,
@@ -110,7 +110,7 @@ static struct fb_fix_screeninfo metronomefb_fix __devinitdata = {
110 .accel = FB_ACCEL_NONE, 110 .accel = FB_ACCEL_NONE,
111}; 111};
112 112
113static struct fb_var_screeninfo metronomefb_var __devinitdata = { 113static struct fb_var_screeninfo metronomefb_var = {
114 .xres = DPY_W, 114 .xres = DPY_W,
115 .yres = DPY_H, 115 .yres = DPY_H,
116 .xres_virtual = DPY_W, 116 .xres_virtual = DPY_W,
@@ -167,8 +167,8 @@ static u16 calc_img_cksum(u16 *start, int length)
167} 167}
168 168
169/* here we decode the incoming waveform file and populate metromem */ 169/* here we decode the incoming waveform file and populate metromem */
170static int __devinit load_waveform(u8 *mem, size_t size, int m, int t, 170static int load_waveform(u8 *mem, size_t size, int m, int t,
171 struct metronomefb_par *par) 171 struct metronomefb_par *par)
172{ 172{
173 int tta; 173 int tta;
174 int wmta; 174 int wmta;
@@ -338,7 +338,7 @@ static int metronome_display_cmd(struct metronomefb_par *par)
338 return par->board->met_wait_event_intr(par); 338 return par->board->met_wait_event_intr(par);
339} 339}
340 340
341static int __devinit metronome_powerup_cmd(struct metronomefb_par *par) 341static int metronome_powerup_cmd(struct metronomefb_par *par)
342{ 342{
343 int i; 343 int i;
344 u16 cs; 344 u16 cs;
@@ -367,7 +367,7 @@ static int __devinit metronome_powerup_cmd(struct metronomefb_par *par)
367 return par->board->met_wait_event(par); 367 return par->board->met_wait_event(par);
368} 368}
369 369
370static int __devinit metronome_config_cmd(struct metronomefb_par *par) 370static int metronome_config_cmd(struct metronomefb_par *par)
371{ 371{
372 /* setup config command 372 /* setup config command
373 we can't immediately set the opcode since the controller 373 we can't immediately set the opcode since the controller
@@ -385,7 +385,7 @@ static int __devinit metronome_config_cmd(struct metronomefb_par *par)
385 return par->board->met_wait_event(par); 385 return par->board->met_wait_event(par);
386} 386}
387 387
388static int __devinit metronome_init_cmd(struct metronomefb_par *par) 388static int metronome_init_cmd(struct metronomefb_par *par)
389{ 389{
390 int i; 390 int i;
391 u16 cs; 391 u16 cs;
@@ -411,7 +411,7 @@ static int __devinit metronome_init_cmd(struct metronomefb_par *par)
411 return par->board->met_wait_event(par); 411 return par->board->met_wait_event(par);
412} 412}
413 413
414static int __devinit metronome_init_regs(struct metronomefb_par *par) 414static int metronome_init_regs(struct metronomefb_par *par)
415{ 415{
416 int res; 416 int res;
417 417
@@ -569,7 +569,7 @@ static struct fb_deferred_io metronomefb_defio = {
569 .deferred_io = metronomefb_dpy_deferred_io, 569 .deferred_io = metronomefb_dpy_deferred_io,
570}; 570};
571 571
572static int __devinit metronomefb_probe(struct platform_device *dev) 572static int metronomefb_probe(struct platform_device *dev)
573{ 573{
574 struct fb_info *info; 574 struct fb_info *info;
575 struct metronome_board *board; 575 struct metronome_board *board;
@@ -741,7 +741,7 @@ err:
741 return retval; 741 return retval;
742} 742}
743 743
744static int __devexit metronomefb_remove(struct platform_device *dev) 744static int metronomefb_remove(struct platform_device *dev)
745{ 745{
746 struct fb_info *info = platform_get_drvdata(dev); 746 struct fb_info *info = platform_get_drvdata(dev);
747 747
@@ -763,7 +763,7 @@ static int __devexit metronomefb_remove(struct platform_device *dev)
763 763
764static struct platform_driver metronomefb_driver = { 764static struct platform_driver metronomefb_driver = {
765 .probe = metronomefb_probe, 765 .probe = metronomefb_probe,
766 .remove = __devexit_p(metronomefb_remove), 766 .remove = metronomefb_remove,
767 .driver = { 767 .driver = {
768 .owner = THIS_MODULE, 768 .owner = THIS_MODULE,
769 .name = "metronomefb", 769 .name = "metronomefb",
diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c
index 35ac9e8bee63..e0f8011a3c4b 100644
--- a/drivers/video/msm/mddi.c
+++ b/drivers/video/msm/mddi.c
@@ -417,7 +417,7 @@ static void mddi_resume(struct msm_mddi_client_data *cdata)
417 mddi_set_auto_hibernate(&mddi->client_data, 1); 417 mddi_set_auto_hibernate(&mddi->client_data, 1);
418} 418}
419 419
420static int __devinit mddi_get_client_caps(struct mddi_info *mddi) 420static int mddi_get_client_caps(struct mddi_info *mddi)
421{ 421{
422 int i, j; 422 int i, j;
423 423
@@ -619,9 +619,8 @@ uint32_t mddi_remote_read(struct msm_mddi_client_data *cdata, uint32_t reg)
619 619
620static struct mddi_info mddi_info[2]; 620static struct mddi_info mddi_info[2];
621 621
622static int __devinit mddi_clk_setup(struct platform_device *pdev, 622static int mddi_clk_setup(struct platform_device *pdev, struct mddi_info *mddi,
623 struct mddi_info *mddi, 623 unsigned long clk_rate)
624 unsigned long clk_rate)
625{ 624{
626 int ret; 625 int ret;
627 626
@@ -664,7 +663,7 @@ static int __init mddi_rev_data_setup(struct mddi_info *mddi)
664 return 0; 663 return 0;
665} 664}
666 665
667static int __devinit mddi_probe(struct platform_device *pdev) 666static int mddi_probe(struct platform_device *pdev)
668{ 667{
669 struct msm_mddi_platform_data *pdata = pdev->dev.platform_data; 668 struct msm_mddi_platform_data *pdata = pdev->dev.platform_data;
670 struct mddi_info *mddi = &mddi_info[pdev->id]; 669 struct mddi_info *mddi = &mddi_info[pdev->id];
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 49619b441500..755556ca5b2d 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -369,7 +369,8 @@ static void mxsfb_disable_controller(struct fb_info *fb_info)
369 loop--; 369 loop--;
370 } 370 }
371 371
372 writel(VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4 + REG_CLR); 372 reg = readl(host->base + LCDC_VDCTRL4);
373 writel(reg & ~VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4);
373 374
374 clk_disable_unprepare(host->clk); 375 clk_disable_unprepare(host->clk);
375 376
@@ -586,7 +587,7 @@ static struct fb_ops mxsfb_ops = {
586 .fb_imageblit = cfb_imageblit, 587 .fb_imageblit = cfb_imageblit,
587}; 588};
588 589
589static int __devinit mxsfb_restore_mode(struct mxsfb_info *host) 590static int mxsfb_restore_mode(struct mxsfb_info *host)
590{ 591{
591 struct fb_info *fb_info = &host->fb_info; 592 struct fb_info *fb_info = &host->fb_info;
592 unsigned line_count; 593 unsigned line_count;
@@ -677,7 +678,7 @@ static int __devinit mxsfb_restore_mode(struct mxsfb_info *host)
677 return 0; 678 return 0;
678} 679}
679 680
680static int __devinit mxsfb_init_fbinfo(struct mxsfb_info *host) 681static int mxsfb_init_fbinfo(struct mxsfb_info *host)
681{ 682{
682 struct fb_info *fb_info = &host->fb_info; 683 struct fb_info *fb_info = &host->fb_info;
683 struct fb_var_screeninfo *var = &fb_info->var; 684 struct fb_var_screeninfo *var = &fb_info->var;
@@ -739,7 +740,7 @@ static int __devinit mxsfb_init_fbinfo(struct mxsfb_info *host)
739 return 0; 740 return 0;
740} 741}
741 742
742static void __devexit mxsfb_free_videomem(struct mxsfb_info *host) 743static void mxsfb_free_videomem(struct mxsfb_info *host)
743{ 744{
744 struct fb_info *fb_info = &host->fb_info; 745 struct fb_info *fb_info = &host->fb_info;
745 746
@@ -772,7 +773,7 @@ static const struct of_device_id mxsfb_dt_ids[] = {
772}; 773};
773MODULE_DEVICE_TABLE(of, mxsfb_dt_ids); 774MODULE_DEVICE_TABLE(of, mxsfb_dt_ids);
774 775
775static int __devinit mxsfb_probe(struct platform_device *pdev) 776static int mxsfb_probe(struct platform_device *pdev)
776{ 777{
777 const struct of_device_id *of_id = 778 const struct of_device_id *of_id =
778 of_match_device(mxsfb_dt_ids, &pdev->dev); 779 of_match_device(mxsfb_dt_ids, &pdev->dev);
@@ -912,7 +913,7 @@ error_alloc_info:
912 return ret; 913 return ret;
913} 914}
914 915
915static int __devexit mxsfb_remove(struct platform_device *pdev) 916static int mxsfb_remove(struct platform_device *pdev)
916{ 917{
917 struct fb_info *fb_info = platform_get_drvdata(pdev); 918 struct fb_info *fb_info = platform_get_drvdata(pdev);
918 struct mxsfb_info *host = to_imxfb_host(fb_info); 919 struct mxsfb_info *host = to_imxfb_host(fb_info);
@@ -949,7 +950,7 @@ static void mxsfb_shutdown(struct platform_device *pdev)
949 950
950static struct platform_driver mxsfb_driver = { 951static struct platform_driver mxsfb_driver = {
951 .probe = mxsfb_probe, 952 .probe = mxsfb_probe,
952 .remove = __devexit_p(mxsfb_remove), 953 .remove = mxsfb_remove,
953 .shutdown = mxsfb_shutdown, 954 .shutdown = mxsfb_shutdown,
954 .id_table = mxsfb_devtype, 955 .id_table = mxsfb_devtype,
955 .driver = { 956 .driver = {
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index afc9521173ef..7ef079c146e7 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -88,7 +88,7 @@ static bool external;
88static bool libretto; 88static bool libretto;
89static bool nostretch; 89static bool nostretch;
90static bool nopciburst; 90static bool nopciburst;
91static char *mode_option __devinitdata = NULL; 91static char *mode_option = NULL;
92 92
93#ifdef MODULE 93#ifdef MODULE
94 94
@@ -1632,7 +1632,7 @@ static struct fb_ops neofb_ops = {
1632 1632
1633/* --------------------------------------------------------------------- */ 1633/* --------------------------------------------------------------------- */
1634 1634
1635static struct fb_videomode __devinitdata mode800x480 = { 1635static struct fb_videomode mode800x480 = {
1636 .xres = 800, 1636 .xres = 800,
1637 .yres = 480, 1637 .yres = 480,
1638 .pixclock = 25000, 1638 .pixclock = 25000,
@@ -1646,8 +1646,7 @@ static struct fb_videomode __devinitdata mode800x480 = {
1646 .vmode = FB_VMODE_NONINTERLACED 1646 .vmode = FB_VMODE_NONINTERLACED
1647}; 1647};
1648 1648
1649static int __devinit neo_map_mmio(struct fb_info *info, 1649static int neo_map_mmio(struct fb_info *info, struct pci_dev *dev)
1650 struct pci_dev *dev)
1651{ 1650{
1652 struct neofb_par *par = info->par; 1651 struct neofb_par *par = info->par;
1653 1652
@@ -1707,8 +1706,8 @@ static void neo_unmap_mmio(struct fb_info *info)
1707 info->fix.mmio_len); 1706 info->fix.mmio_len);
1708} 1707}
1709 1708
1710static int __devinit neo_map_video(struct fb_info *info, 1709static int neo_map_video(struct fb_info *info, struct pci_dev *dev,
1711 struct pci_dev *dev, int video_len) 1710 int video_len)
1712{ 1711{
1713 //unsigned long addr; 1712 //unsigned long addr;
1714 1713
@@ -1772,7 +1771,7 @@ static void neo_unmap_video(struct fb_info *info)
1772 info->fix.smem_len); 1771 info->fix.smem_len);
1773} 1772}
1774 1773
1775static int __devinit neo_scan_monitor(struct fb_info *info) 1774static int neo_scan_monitor(struct fb_info *info)
1776{ 1775{
1777 struct neofb_par *par = info->par; 1776 struct neofb_par *par = info->par;
1778 unsigned char type, display; 1777 unsigned char type, display;
@@ -1851,7 +1850,7 @@ static int __devinit neo_scan_monitor(struct fb_info *info)
1851 return 0; 1850 return 0;
1852} 1851}
1853 1852
1854static int __devinit neo_init_hw(struct fb_info *info) 1853static int neo_init_hw(struct fb_info *info)
1855{ 1854{
1856 struct neofb_par *par = info->par; 1855 struct neofb_par *par = info->par;
1857 int videoRam = 896; 1856 int videoRam = 896;
@@ -1939,8 +1938,8 @@ static int __devinit neo_init_hw(struct fb_info *info)
1939} 1938}
1940 1939
1941 1940
1942static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const struct 1941static struct fb_info *neo_alloc_fb_info(struct pci_dev *dev,
1943 pci_device_id *id) 1942 const struct pci_device_id *id)
1944{ 1943{
1945 struct fb_info *info; 1944 struct fb_info *info;
1946 struct neofb_par *par; 1945 struct neofb_par *par;
@@ -2038,8 +2037,7 @@ static void neo_free_fb_info(struct fb_info *info)
2038 2037
2039/* --------------------------------------------------------------------- */ 2038/* --------------------------------------------------------------------- */
2040 2039
2041static int __devinit neofb_probe(struct pci_dev *dev, 2040static int neofb_probe(struct pci_dev *dev, const struct pci_device_id *id)
2042 const struct pci_device_id *id)
2043{ 2041{
2044 struct fb_info *info; 2042 struct fb_info *info;
2045 u_int h_sync, v_sync; 2043 u_int h_sync, v_sync;
@@ -2128,7 +2126,7 @@ err_map_mmio:
2128 return err; 2126 return err;
2129} 2127}
2130 2128
2131static void __devexit neofb_remove(struct pci_dev *dev) 2129static void neofb_remove(struct pci_dev *dev)
2132{ 2130{
2133 struct fb_info *info = pci_get_drvdata(dev); 2131 struct fb_info *info = pci_get_drvdata(dev);
2134 2132
@@ -2194,7 +2192,7 @@ static struct pci_driver neofb_driver = {
2194 .name = "neofb", 2192 .name = "neofb",
2195 .id_table = neofb_devices, 2193 .id_table = neofb_devices,
2196 .probe = neofb_probe, 2194 .probe = neofb_probe,
2197 .remove = __devexit_p(neofb_remove) 2195 .remove = neofb_remove,
2198}; 2196};
2199 2197
2200/* ************************* init in-kernel code ************************** */ 2198/* ************************* init in-kernel code ************************** */
diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c
index 475dfee82c4a..32581c72ad09 100644
--- a/drivers/video/nuc900fb.c
+++ b/drivers/video/nuc900fb.c
@@ -387,7 +387,7 @@ static int nuc900fb_init_registers(struct fb_info *info)
387 * The buffer should be a non-cached, non-buffered, memory region 387 * The buffer should be a non-cached, non-buffered, memory region
388 * to allow palette and pixel writes without flushing the cache. 388 * to allow palette and pixel writes without flushing the cache.
389 */ 389 */
390static int __devinit nuc900fb_map_video_memory(struct fb_info *info) 390static int nuc900fb_map_video_memory(struct fb_info *info)
391{ 391{
392 struct nuc900fb_info *fbi = info->par; 392 struct nuc900fb_info *fbi = info->par;
393 dma_addr_t map_dma; 393 dma_addr_t map_dma;
@@ -499,7 +499,7 @@ static inline void nuc900fb_cpufreq_deregister(struct nuc900fb_info *info)
499 499
500static char driver_name[] = "nuc900fb"; 500static char driver_name[] = "nuc900fb";
501 501
502static int __devinit nuc900fb_probe(struct platform_device *pdev) 502static int nuc900fb_probe(struct platform_device *pdev)
503{ 503{
504 struct nuc900fb_info *fbi; 504 struct nuc900fb_info *fbi;
505 struct nuc900fb_display *display; 505 struct nuc900fb_display *display;
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index fe13ac567d54..ff228713425e 100644
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -70,34 +70,34 @@ static struct pci_device_id nvidiafb_pci_tbl[] = {
70MODULE_DEVICE_TABLE(pci, nvidiafb_pci_tbl); 70MODULE_DEVICE_TABLE(pci, nvidiafb_pci_tbl);
71 71
72/* command line data, set in nvidiafb_setup() */ 72/* command line data, set in nvidiafb_setup() */
73static int flatpanel __devinitdata = -1; /* Autodetect later */ 73static int flatpanel = -1; /* Autodetect later */
74static int fpdither __devinitdata = -1; 74static int fpdither = -1;
75static int forceCRTC __devinitdata = -1; 75static int forceCRTC = -1;
76static int hwcur __devinitdata = 0; 76static int hwcur = 0;
77static int noaccel __devinitdata = 0; 77static int noaccel = 0;
78static int noscale __devinitdata = 0; 78static int noscale = 0;
79static int paneltweak __devinitdata = 0; 79static int paneltweak = 0;
80static int vram __devinitdata = 0; 80static int vram = 0;
81static int bpp __devinitdata = 8; 81static int bpp = 8;
82static int reverse_i2c __devinitdata; 82static int reverse_i2c;
83#ifdef CONFIG_MTRR 83#ifdef CONFIG_MTRR
84static bool nomtrr __devinitdata = false; 84static bool nomtrr = false;
85#endif 85#endif
86#ifdef CONFIG_PMAC_BACKLIGHT 86#ifdef CONFIG_PMAC_BACKLIGHT
87static int backlight __devinitdata = 1; 87static int backlight = 1;
88#else 88#else
89static int backlight __devinitdata = 0; 89static int backlight = 0;
90#endif 90#endif
91 91
92static char *mode_option __devinitdata = NULL; 92static char *mode_option = NULL;
93 93
94static struct fb_fix_screeninfo __devinitdata nvidiafb_fix = { 94static struct fb_fix_screeninfo nvidiafb_fix = {
95 .type = FB_TYPE_PACKED_PIXELS, 95 .type = FB_TYPE_PACKED_PIXELS,
96 .xpanstep = 8, 96 .xpanstep = 8,
97 .ypanstep = 1, 97 .ypanstep = 1,
98}; 98};
99 99
100static struct fb_var_screeninfo __devinitdata nvidiafb_default_var = { 100static struct fb_var_screeninfo nvidiafb_default_var = {
101 .xres = 640, 101 .xres = 640,
102 .yres = 480, 102 .yres = 480,
103 .xres_virtual = 640, 103 .xres_virtual = 640,
@@ -1105,7 +1105,7 @@ fail:
1105#define nvidiafb_resume NULL 1105#define nvidiafb_resume NULL
1106#endif 1106#endif
1107 1107
1108static int __devinit nvidia_set_fbinfo(struct fb_info *info) 1108static int nvidia_set_fbinfo(struct fb_info *info)
1109{ 1109{
1110 struct fb_monspecs *specs = &info->monspecs; 1110 struct fb_monspecs *specs = &info->monspecs;
1111 struct fb_videomode modedb; 1111 struct fb_videomode modedb;
@@ -1201,7 +1201,7 @@ static int __devinit nvidia_set_fbinfo(struct fb_info *info)
1201 return nvidiafb_check_var(&info->var, info); 1201 return nvidiafb_check_var(&info->var, info);
1202} 1202}
1203 1203
1204static u32 __devinit nvidia_get_chipset(struct fb_info *info) 1204static u32 nvidia_get_chipset(struct fb_info *info)
1205{ 1205{
1206 struct nvidia_par *par = info->par; 1206 struct nvidia_par *par = info->par;
1207 u32 id = (par->pci_dev->vendor << 16) | par->pci_dev->device; 1207 u32 id = (par->pci_dev->vendor << 16) | par->pci_dev->device;
@@ -1224,7 +1224,7 @@ static u32 __devinit nvidia_get_chipset(struct fb_info *info)
1224 return id; 1224 return id;
1225} 1225}
1226 1226
1227static u32 __devinit nvidia_get_arch(struct fb_info *info) 1227static u32 nvidia_get_arch(struct fb_info *info)
1228{ 1228{
1229 struct nvidia_par *par = info->par; 1229 struct nvidia_par *par = info->par;
1230 u32 arch = 0; 1230 u32 arch = 0;
@@ -1276,8 +1276,7 @@ static u32 __devinit nvidia_get_arch(struct fb_info *info)
1276 return arch; 1276 return arch;
1277} 1277}
1278 1278
1279static int __devinit nvidiafb_probe(struct pci_dev *pd, 1279static int nvidiafb_probe(struct pci_dev *pd, const struct pci_device_id *ent)
1280 const struct pci_device_id *ent)
1281{ 1280{
1282 struct nvidia_par *par; 1281 struct nvidia_par *par;
1283 struct fb_info *info; 1282 struct fb_info *info;
@@ -1438,7 +1437,7 @@ err_out:
1438 return -ENODEV; 1437 return -ENODEV;
1439} 1438}
1440 1439
1441static void __devexit nvidiafb_remove(struct pci_dev *pd) 1440static void nvidiafb_remove(struct pci_dev *pd)
1442{ 1441{
1443 struct fb_info *info = pci_get_drvdata(pd); 1442 struct fb_info *info = pci_get_drvdata(pd);
1444 struct nvidia_par *par = info->par; 1443 struct nvidia_par *par = info->par;
@@ -1473,7 +1472,7 @@ static void __devexit nvidiafb_remove(struct pci_dev *pd)
1473 * ------------------------------------------------------------------------- */ 1472 * ------------------------------------------------------------------------- */
1474 1473
1475#ifndef MODULE 1474#ifndef MODULE
1476static int __devinit nvidiafb_setup(char *options) 1475static int nvidiafb_setup(char *options)
1477{ 1476{
1478 char *this_opt; 1477 char *this_opt;
1479 1478
@@ -1529,7 +1528,7 @@ static struct pci_driver nvidiafb_driver = {
1529 .probe = nvidiafb_probe, 1528 .probe = nvidiafb_probe,
1530 .suspend = nvidiafb_suspend, 1529 .suspend = nvidiafb_suspend,
1531 .resume = nvidiafb_resume, 1530 .resume = nvidiafb_resume,
1532 .remove = __devexit_p(nvidiafb_remove), 1531 .remove = nvidiafb_remove,
1533}; 1532};
1534 1533
1535/* ------------------------------------------------------------------------- * 1534/* ------------------------------------------------------------------------- *
@@ -1538,7 +1537,7 @@ static struct pci_driver nvidiafb_driver = {
1538 * 1537 *
1539 * ------------------------------------------------------------------------- */ 1538 * ------------------------------------------------------------------------- */
1540 1539
1541static int __devinit nvidiafb_init(void) 1540static int nvidiafb_init(void)
1542{ 1541{
1543#ifndef MODULE 1542#ifndef MODULE
1544 char *option = NULL; 1543 char *option = NULL;
diff --git a/drivers/video/omap/lcd_mipid.c b/drivers/video/omap/lcd_mipid.c
index b739600c51ac..803fee618d57 100644
--- a/drivers/video/omap/lcd_mipid.c
+++ b/drivers/video/omap/lcd_mipid.c
@@ -606,7 +606,7 @@ static struct spi_driver mipid_spi_driver = {
606 .owner = THIS_MODULE, 606 .owner = THIS_MODULE,
607 }, 607 },
608 .probe = mipid_spi_probe, 608 .probe = mipid_spi_probe,
609 .remove = __devexit_p(mipid_spi_remove), 609 .remove = mipid_spi_remove,
610}; 610};
611 611
612module_spi_driver(mipid_spi_driver); 612module_spi_driver(mipid_spi_driver);
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c
index 65eb76c840a1..72699f88c002 100644
--- a/drivers/video/omap2/displays/panel-acx565akm.c
+++ b/drivers/video/omap2/displays/panel-acx565akm.c
@@ -777,7 +777,7 @@ static struct spi_driver acx565akm_spi_driver = {
777 .owner = THIS_MODULE, 777 .owner = THIS_MODULE,
778 }, 778 },
779 .probe = acx565akm_spi_probe, 779 .probe = acx565akm_spi_probe,
780 .remove = __devexit_p(acx565akm_spi_remove), 780 .remove = acx565akm_spi_remove,
781}; 781};
782 782
783module_spi_driver(acx565akm_spi_driver); 783module_spi_driver(acx565akm_spi_driver);
diff --git a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
index ace419b801eb..6e5abe8fd2dd 100644
--- a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
+++ b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
@@ -216,13 +216,13 @@ static void init_lb035q02_panel(struct spi_device *spi)
216 lb035q02_write_reg(spi, 0x3b, 0x0806); 216 lb035q02_write_reg(spi, 0x3b, 0x0806);
217} 217}
218 218
219static int __devinit lb035q02_panel_spi_probe(struct spi_device *spi) 219static int lb035q02_panel_spi_probe(struct spi_device *spi)
220{ 220{
221 init_lb035q02_panel(spi); 221 init_lb035q02_panel(spi);
222 return omap_dss_register_driver(&lb035q02_driver); 222 return omap_dss_register_driver(&lb035q02_driver);
223} 223}
224 224
225static int __devexit lb035q02_panel_spi_remove(struct spi_device *spi) 225static int lb035q02_panel_spi_remove(struct spi_device *spi)
226{ 226{
227 omap_dss_unregister_driver(&lb035q02_driver); 227 omap_dss_unregister_driver(&lb035q02_driver);
228 return 0; 228 return 0;
@@ -234,7 +234,7 @@ static struct spi_driver lb035q02_spi_driver = {
234 .owner = THIS_MODULE, 234 .owner = THIS_MODULE,
235 }, 235 },
236 .probe = lb035q02_panel_spi_probe, 236 .probe = lb035q02_panel_spi_probe,
237 .remove = __devexit_p(lb035q02_panel_spi_remove), 237 .remove = lb035q02_panel_spi_remove,
238}; 238};
239 239
240module_spi_driver(lb035q02_spi_driver); 240module_spi_driver(lb035q02_spi_driver);
diff --git a/drivers/video/omap2/displays/panel-n8x0.c b/drivers/video/omap2/displays/panel-n8x0.c
index d1cb722fcdbc..dd1294750802 100644
--- a/drivers/video/omap2/displays/panel-n8x0.c
+++ b/drivers/video/omap2/displays/panel-n8x0.c
@@ -680,7 +680,7 @@ static struct spi_driver mipid_spi_driver = {
680 .owner = THIS_MODULE, 680 .owner = THIS_MODULE,
681 }, 681 },
682 .probe = mipid_spi_probe, 682 .probe = mipid_spi_probe,
683 .remove = __devexit_p(mipid_spi_remove), 683 .remove = mipid_spi_remove,
684}; 684};
685module_spi_driver(mipid_spi_driver); 685module_spi_driver(mipid_spi_driver);
686 686
diff --git a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
index 2a79c283bebe..c4e9c2b1b465 100644
--- a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
+++ b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
@@ -323,7 +323,7 @@ static int nec_8048_spi_resume(struct spi_device *spi)
323 323
324static struct spi_driver nec_8048_spi_driver = { 324static struct spi_driver nec_8048_spi_driver = {
325 .probe = nec_8048_spi_probe, 325 .probe = nec_8048_spi_probe,
326 .remove = __devexit_p(nec_8048_spi_remove), 326 .remove = nec_8048_spi_remove,
327 .suspend = nec_8048_spi_suspend, 327 .suspend = nec_8048_spi_suspend,
328 .resume = nec_8048_spi_resume, 328 .resume = nec_8048_spi_resume,
329 .driver = { 329 .driver = {
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
index 316b3da6d2cb..6b6643911d29 100644
--- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
@@ -528,7 +528,7 @@ static int tpo_td043_spi_probe(struct spi_device *spi)
528 return 0; 528 return 0;
529} 529}
530 530
531static int __devexit tpo_td043_spi_remove(struct spi_device *spi) 531static int tpo_td043_spi_remove(struct spi_device *spi)
532{ 532{
533 struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&spi->dev); 533 struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&spi->dev);
534 534
@@ -580,7 +580,7 @@ static struct spi_driver tpo_td043_spi_driver = {
580 .pm = &tpo_td043_spi_pm, 580 .pm = &tpo_td043_spi_pm,
581 }, 581 },
582 .probe = tpo_td043_spi_probe, 582 .probe = tpo_td043_spi_probe,
583 .remove = __devexit_p(tpo_td043_spi_remove), 583 .remove = tpo_td043_spi_remove,
584}; 584};
585 585
586module_spi_driver(tpo_td043_spi_driver); 586module_spi_driver(tpo_td043_spi_driver);
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c
index d57cc58c5168..4b23af6e5c28 100644
--- a/drivers/video/p9100.c
+++ b/drivers/video/p9100.c
@@ -249,7 +249,7 @@ static void p9100_init_fix(struct fb_info *info, int linebytes, struct device_no
249 info->fix.accel = FB_ACCEL_SUN_CGTHREE; 249 info->fix.accel = FB_ACCEL_SUN_CGTHREE;
250} 250}
251 251
252static int __devinit p9100_probe(struct platform_device *op) 252static int p9100_probe(struct platform_device *op)
253{ 253{
254 struct device_node *dp = op->dev.of_node; 254 struct device_node *dp = op->dev.of_node;
255 struct fb_info *info; 255 struct fb_info *info;
@@ -326,7 +326,7 @@ out_err:
326 return err; 326 return err;
327} 327}
328 328
329static int __devexit p9100_remove(struct platform_device *op) 329static int p9100_remove(struct platform_device *op)
330{ 330{
331 struct fb_info *info = dev_get_drvdata(&op->dev); 331 struct fb_info *info = dev_get_drvdata(&op->dev);
332 struct p9100_par *par = info->par; 332 struct p9100_par *par = info->par;
@@ -359,7 +359,7 @@ static struct platform_driver p9100_driver = {
359 .of_match_table = p9100_match, 359 .of_match_table = p9100_match,
360 }, 360 },
361 .probe = p9100_probe, 361 .probe = p9100_probe,
362 .remove = __devexit_p(p9100_remove), 362 .remove = p9100_remove,
363}; 363};
364 364
365static int __init p9100_init(void) 365static int __init p9100_init(void)
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
index ae3caa6755c2..3d86bac62d3e 100644
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -313,7 +313,8 @@ static void platinum_set_hardware(struct fb_info_platinum *pinfo)
313/* 313/*
314 * Set misc info vars for this driver 314 * Set misc info vars for this driver
315 */ 315 */
316static void __devinit platinum_init_info(struct fb_info *info, struct fb_info_platinum *pinfo) 316static void platinum_init_info(struct fb_info *info,
317 struct fb_info_platinum *pinfo)
317{ 318{
318 /* Fill fb_info */ 319 /* Fill fb_info */
319 info->fbops = &platinumfb_ops; 320 info->fbops = &platinumfb_ops;
@@ -338,7 +339,7 @@ static void __devinit platinum_init_info(struct fb_info *info, struct fb_info_pl
338} 339}
339 340
340 341
341static int __devinit platinum_init_fb(struct fb_info *info) 342static int platinum_init_fb(struct fb_info *info)
342{ 343{
343 struct fb_info_platinum *pinfo = info->par; 344 struct fb_info_platinum *pinfo = info->par;
344 struct fb_var_screeninfo var; 345 struct fb_var_screeninfo var;
@@ -533,7 +534,7 @@ static int __init platinumfb_setup(char *options)
533#define invalidate_cache(addr) 534#define invalidate_cache(addr)
534#endif 535#endif
535 536
536static int __devinit platinumfb_probe(struct platform_device* odev) 537static int platinumfb_probe(struct platform_device* odev)
537{ 538{
538 struct device_node *dp = odev->dev.of_node; 539 struct device_node *dp = odev->dev.of_node;
539 struct fb_info *info; 540 struct fb_info *info;
@@ -645,7 +646,7 @@ static int __devinit platinumfb_probe(struct platform_device* odev)
645 return rc; 646 return rc;
646} 647}
647 648
648static int __devexit platinumfb_remove(struct platform_device* odev) 649static int platinumfb_remove(struct platform_device* odev)
649{ 650{
650 struct fb_info *info = dev_get_drvdata(&odev->dev); 651 struct fb_info *info = dev_get_drvdata(&odev->dev);
651 struct fb_info_platinum *pinfo = info->par; 652 struct fb_info_platinum *pinfo = info->par;
@@ -683,7 +684,7 @@ static struct platform_driver platinum_driver =
683 .of_match_table = platinumfb_match, 684 .of_match_table = platinumfb_match,
684 }, 685 },
685 .probe = platinumfb_probe, 686 .probe = platinumfb_probe,
686 .remove = __devexit_p(platinumfb_remove), 687 .remove = platinumfb_remove,
687}; 688};
688 689
689static int __init platinumfb_init(void) 690static int __init platinumfb_init(void)
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
index df31a24a5026..81354eeab021 100644
--- a/drivers/video/pm2fb.c
+++ b/drivers/video/pm2fb.c
@@ -67,7 +67,7 @@
67 * Driver data 67 * Driver data
68 */ 68 */
69static int hwcursor = 1; 69static int hwcursor = 1;
70static char *mode_option __devinitdata; 70static char *mode_option;
71 71
72/* 72/*
73 * The XFree GLINT driver will (I think to implement hardware cursor 73 * The XFree GLINT driver will (I think to implement hardware cursor
@@ -80,10 +80,10 @@ static char *mode_option __devinitdata;
80 */ 80 */
81static bool lowhsync; 81static bool lowhsync;
82static bool lowvsync; 82static bool lowvsync;
83static bool noaccel __devinitdata; 83static bool noaccel;
84/* mtrr option */ 84/* mtrr option */
85#ifdef CONFIG_MTRR 85#ifdef CONFIG_MTRR
86static bool nomtrr __devinitdata; 86static bool nomtrr;
87#endif 87#endif
88 88
89/* 89/*
@@ -107,7 +107,7 @@ struct pm2fb_par
107 * Here we define the default structs fb_fix_screeninfo and fb_var_screeninfo 107 * Here we define the default structs fb_fix_screeninfo and fb_var_screeninfo
108 * if we don't use modedb. 108 * if we don't use modedb.
109 */ 109 */
110static struct fb_fix_screeninfo pm2fb_fix __devinitdata = { 110static struct fb_fix_screeninfo pm2fb_fix = {
111 .id = "", 111 .id = "",
112 .type = FB_TYPE_PACKED_PIXELS, 112 .type = FB_TYPE_PACKED_PIXELS,
113 .visual = FB_VISUAL_PSEUDOCOLOR, 113 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -120,7 +120,7 @@ static struct fb_fix_screeninfo pm2fb_fix __devinitdata = {
120/* 120/*
121 * Default video mode. In case the modedb doesn't work. 121 * Default video mode. In case the modedb doesn't work.
122 */ 122 */
123static struct fb_var_screeninfo pm2fb_var __devinitdata = { 123static struct fb_var_screeninfo pm2fb_var = {
124 /* "640x480, 8 bpp @ 60 Hz */ 124 /* "640x480, 8 bpp @ 60 Hz */
125 .xres = 640, 125 .xres = 640,
126 .yres = 480, 126 .yres = 480,
@@ -1515,8 +1515,7 @@ static struct fb_ops pm2fb_ops = {
1515 * @param pdev PCI device. 1515 * @param pdev PCI device.
1516 * @param id PCI device ID. 1516 * @param id PCI device ID.
1517 */ 1517 */
1518static int __devinit pm2fb_probe(struct pci_dev *pdev, 1518static int pm2fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1519 const struct pci_device_id *id)
1520{ 1519{
1521 struct pm2fb_par *default_par; 1520 struct pm2fb_par *default_par;
1522 struct fb_info *info; 1521 struct fb_info *info;
@@ -1727,7 +1726,7 @@ static int __devinit pm2fb_probe(struct pci_dev *pdev,
1727 * 1726 *
1728 * @param pdev PCI device to clean up. 1727 * @param pdev PCI device to clean up.
1729 */ 1728 */
1730static void __devexit pm2fb_remove(struct pci_dev *pdev) 1729static void pm2fb_remove(struct pci_dev *pdev)
1731{ 1730{
1732 struct fb_info *info = pci_get_drvdata(pdev); 1731 struct fb_info *info = pci_get_drvdata(pdev);
1733 struct fb_fix_screeninfo *fix = &info->fix; 1732 struct fb_fix_screeninfo *fix = &info->fix;
@@ -1765,7 +1764,7 @@ static struct pci_driver pm2fb_driver = {
1765 .name = "pm2fb", 1764 .name = "pm2fb",
1766 .id_table = pm2fb_id_table, 1765 .id_table = pm2fb_id_table,
1767 .probe = pm2fb_probe, 1766 .probe = pm2fb_probe,
1768 .remove = __devexit_p(pm2fb_remove), 1767 .remove = pm2fb_remove,
1769}; 1768};
1770 1769
1771MODULE_DEVICE_TABLE(pci, pm2fb_id_table); 1770MODULE_DEVICE_TABLE(pci, pm2fb_id_table);
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 055e527a8e45..7718faa4a73b 100644
--- a/drivers/video/pm3fb.c
+++ b/drivers/video/pm3fb.c
@@ -56,12 +56,12 @@
56 * Driver data 56 * Driver data
57 */ 57 */
58static int hwcursor = 1; 58static int hwcursor = 1;
59static char *mode_option __devinitdata; 59static char *mode_option;
60static bool noaccel __devinitdata; 60static bool noaccel;
61 61
62/* mtrr option */ 62/* mtrr option */
63#ifdef CONFIG_MTRR 63#ifdef CONFIG_MTRR
64static bool nomtrr __devinitdata; 64static bool nomtrr;
65#endif 65#endif
66 66
67/* 67/*
@@ -84,7 +84,7 @@ struct pm3_par {
84 * if we don't use modedb. If we do use modedb see pm3fb_init how to use it 84 * if we don't use modedb. If we do use modedb see pm3fb_init how to use it
85 * to get a fb_var_screeninfo. Otherwise define a default var as well. 85 * to get a fb_var_screeninfo. Otherwise define a default var as well.
86 */ 86 */
87static struct fb_fix_screeninfo pm3fb_fix __devinitdata = { 87static struct fb_fix_screeninfo pm3fb_fix = {
88 .id = "Permedia3", 88 .id = "Permedia3",
89 .type = FB_TYPE_PACKED_PIXELS, 89 .type = FB_TYPE_PACKED_PIXELS,
90 .visual = FB_VISUAL_PSEUDOCOLOR, 90 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -1229,7 +1229,7 @@ static struct fb_ops pm3fb_ops = {
1229 1229
1230/* mmio register are already mapped when this function is called */ 1230/* mmio register are already mapped when this function is called */
1231/* the pm3fb_fix.smem_start is also set */ 1231/* the pm3fb_fix.smem_start is also set */
1232static unsigned long __devinit pm3fb_size_memory(struct pm3_par *par) 1232static unsigned long pm3fb_size_memory(struct pm3_par *par)
1233{ 1233{
1234 unsigned long memsize = 0; 1234 unsigned long memsize = 0;
1235 unsigned long tempBypass, i, temp1, temp2; 1235 unsigned long tempBypass, i, temp1, temp2;
@@ -1314,8 +1314,7 @@ static unsigned long __devinit pm3fb_size_memory(struct pm3_par *par)
1314 return memsize; 1314 return memsize;
1315} 1315}
1316 1316
1317static int __devinit pm3fb_probe(struct pci_dev *dev, 1317static int pm3fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
1318 const struct pci_device_id *ent)
1319{ 1318{
1320 struct fb_info *info; 1319 struct fb_info *info;
1321 struct pm3_par *par; 1320 struct pm3_par *par;
@@ -1469,7 +1468,7 @@ static int __devinit pm3fb_probe(struct pci_dev *dev,
1469 /* 1468 /*
1470 * Cleanup 1469 * Cleanup
1471 */ 1470 */
1472static void __devexit pm3fb_remove(struct pci_dev *dev) 1471static void pm3fb_remove(struct pci_dev *dev)
1473{ 1472{
1474 struct fb_info *info = pci_get_drvdata(dev); 1473 struct fb_info *info = pci_get_drvdata(dev);
1475 1474
@@ -1507,7 +1506,7 @@ static struct pci_driver pm3fb_driver = {
1507 .name = "pm3fb", 1506 .name = "pm3fb",
1508 .id_table = pm3fb_id_table, 1507 .id_table = pm3fb_id_table,
1509 .probe = pm3fb_probe, 1508 .probe = pm3fb_probe,
1510 .remove = __devexit_p(pm3fb_remove), 1509 .remove = pm3fb_remove,
1511}; 1510};
1512 1511
1513MODULE_DEVICE_TABLE(pci, pm3fb_id_table); 1512MODULE_DEVICE_TABLE(pci, pm3fb_id_table);
diff --git a/drivers/video/pmag-ba-fb.c b/drivers/video/pmag-ba-fb.c
index 9b4a60b52a4c..d1e46cedb1f7 100644
--- a/drivers/video/pmag-ba-fb.c
+++ b/drivers/video/pmag-ba-fb.c
@@ -43,7 +43,7 @@ struct pmagbafb_par {
43}; 43};
44 44
45 45
46static struct fb_var_screeninfo pmagbafb_defined __devinitdata = { 46static struct fb_var_screeninfo pmagbafb_defined = {
47 .xres = 1024, 47 .xres = 1024,
48 .yres = 864, 48 .yres = 864,
49 .xres_virtual = 1024, 49 .xres_virtual = 1024,
@@ -67,7 +67,7 @@ static struct fb_var_screeninfo pmagbafb_defined __devinitdata = {
67 .vmode = FB_VMODE_NONINTERLACED, 67 .vmode = FB_VMODE_NONINTERLACED,
68}; 68};
69 69
70static struct fb_fix_screeninfo pmagbafb_fix __devinitdata = { 70static struct fb_fix_screeninfo pmagbafb_fix = {
71 .id = "PMAG-BA", 71 .id = "PMAG-BA",
72 .smem_len = (1024 * 1024), 72 .smem_len = (1024 * 1024),
73 .type = FB_TYPE_PACKED_PIXELS, 73 .type = FB_TYPE_PACKED_PIXELS,
@@ -141,7 +141,7 @@ static void __init pmagbafb_erase_cursor(struct fb_info *info)
141} 141}
142 142
143 143
144static int __devinit pmagbafb_probe(struct device *dev) 144static int pmagbafb_probe(struct device *dev)
145{ 145{
146 struct tc_dev *tdev = to_tc_dev(dev); 146 struct tc_dev *tdev = to_tc_dev(dev);
147 resource_size_t start, len; 147 resource_size_t start, len;
diff --git a/drivers/video/pmagb-b-fb.c b/drivers/video/pmagb-b-fb.c
index 4e7a9c46e112..0e1317400328 100644
--- a/drivers/video/pmagb-b-fb.c
+++ b/drivers/video/pmagb-b-fb.c
@@ -44,7 +44,7 @@ struct pmagbbfb_par {
44}; 44};
45 45
46 46
47static struct fb_var_screeninfo pmagbbfb_defined __devinitdata = { 47static struct fb_var_screeninfo pmagbbfb_defined = {
48 .bits_per_pixel = 8, 48 .bits_per_pixel = 8,
49 .red.length = 8, 49 .red.length = 8,
50 .green.length = 8, 50 .green.length = 8,
@@ -57,7 +57,7 @@ static struct fb_var_screeninfo pmagbbfb_defined __devinitdata = {
57 .vmode = FB_VMODE_NONINTERLACED, 57 .vmode = FB_VMODE_NONINTERLACED,
58}; 58};
59 59
60static struct fb_fix_screeninfo pmagbbfb_fix __devinitdata = { 60static struct fb_fix_screeninfo pmagbbfb_fix = {
61 .id = "PMAGB-BA", 61 .id = "PMAGB-BA",
62 .smem_len = (2048 * 1024), 62 .smem_len = (2048 * 1024),
63 .type = FB_TYPE_PACKED_PIXELS, 63 .type = FB_TYPE_PACKED_PIXELS,
@@ -147,7 +147,7 @@ static void __init pmagbbfb_erase_cursor(struct fb_info *info)
147/* 147/*
148 * Set up screen parameters. 148 * Set up screen parameters.
149 */ 149 */
150static void __devinit pmagbbfb_screen_setup(struct fb_info *info) 150static void pmagbbfb_screen_setup(struct fb_info *info)
151{ 151{
152 struct pmagbbfb_par *par = info->par; 152 struct pmagbbfb_par *par = info->par;
153 153
@@ -179,9 +179,9 @@ static void __devinit pmagbbfb_screen_setup(struct fb_info *info)
179/* 179/*
180 * Determine oscillator configuration. 180 * Determine oscillator configuration.
181 */ 181 */
182static void __devinit pmagbbfb_osc_setup(struct fb_info *info) 182static void pmagbbfb_osc_setup(struct fb_info *info)
183{ 183{
184 static unsigned int pmagbbfb_freqs[] __devinitdata = { 184 static unsigned int pmagbbfb_freqs[] = {
185 130808, 119843, 104000, 92980, 74370, 72800, 185 130808, 119843, 104000, 92980, 74370, 72800,
186 69197, 66000, 65000, 50350, 36000, 32000, 25175 186 69197, 66000, 65000, 50350, 36000, 32000, 25175
187 }; 187 };
@@ -246,7 +246,7 @@ static void __devinit pmagbbfb_osc_setup(struct fb_info *info)
246}; 246};
247 247
248 248
249static int __devinit pmagbbfb_probe(struct device *dev) 249static int pmagbbfb_probe(struct device *dev)
250{ 250{
251 struct tc_dev *tdev = to_tc_dev(dev); 251 struct tc_dev *tdev = to_tc_dev(dev);
252 resource_size_t start, len; 252 resource_size_t start, len;
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
index 0b340d6ff8a4..920c27bf3947 100644
--- a/drivers/video/ps3fb.c
+++ b/drivers/video/ps3fb.c
@@ -259,7 +259,7 @@ static const struct fb_videomode ps3fb_modedb[] = {
259static int ps3fb_mode; 259static int ps3fb_mode;
260module_param(ps3fb_mode, int, 0); 260module_param(ps3fb_mode, int, 0);
261 261
262static char *mode_option __devinitdata; 262static char *mode_option;
263 263
264static int ps3fb_cmp_mode(const struct fb_videomode *vmode, 264static int ps3fb_cmp_mode(const struct fb_videomode *vmode,
265 const struct fb_var_screeninfo *var) 265 const struct fb_var_screeninfo *var)
@@ -965,7 +965,7 @@ static struct fb_fix_screeninfo ps3fb_fix __initdata = {
965 .accel = FB_ACCEL_NONE, 965 .accel = FB_ACCEL_NONE,
966}; 966};
967 967
968static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev) 968static int ps3fb_probe(struct ps3_system_bus_device *dev)
969{ 969{
970 struct fb_info *info; 970 struct fb_info *info;
971 struct ps3fb_par *par; 971 struct ps3fb_par *par;
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
index bcd44c32a2ed..df07860563e6 100644
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -112,11 +112,11 @@ enum { VO_PAL, VO_NTSC, VO_VGA };
112enum { PAL_ARGB1555, PAL_RGB565, PAL_ARGB4444, PAL_ARGB8888 }; 112enum { PAL_ARGB1555, PAL_RGB565, PAL_ARGB4444, PAL_ARGB8888 };
113 113
114struct pvr2_params { unsigned int val; char *name; }; 114struct pvr2_params { unsigned int val; char *name; };
115static struct pvr2_params cables[] __devinitdata = { 115static struct pvr2_params cables[] = {
116 { CT_VGA, "VGA" }, { CT_RGB, "RGB" }, { CT_COMPOSITE, "COMPOSITE" }, 116 { CT_VGA, "VGA" }, { CT_RGB, "RGB" }, { CT_COMPOSITE, "COMPOSITE" },
117}; 117};
118 118
119static struct pvr2_params outputs[] __devinitdata = { 119static struct pvr2_params outputs[] = {
120 { VO_PAL, "PAL" }, { VO_NTSC, "NTSC" }, { VO_VGA, "VGA" }, 120 { VO_PAL, "PAL" }, { VO_NTSC, "NTSC" }, { VO_VGA, "VGA" },
121}; 121};
122 122
@@ -145,7 +145,7 @@ static struct pvr2fb_par {
145 145
146static struct fb_info *fb_info; 146static struct fb_info *fb_info;
147 147
148static struct fb_fix_screeninfo pvr2_fix __devinitdata = { 148static struct fb_fix_screeninfo pvr2_fix = {
149 .id = "NEC PowerVR2", 149 .id = "NEC PowerVR2",
150 .type = FB_TYPE_PACKED_PIXELS, 150 .type = FB_TYPE_PACKED_PIXELS,
151 .visual = FB_VISUAL_TRUECOLOR, 151 .visual = FB_VISUAL_TRUECOLOR,
@@ -154,7 +154,7 @@ static struct fb_fix_screeninfo pvr2_fix __devinitdata = {
154 .accel = FB_ACCEL_NONE, 154 .accel = FB_ACCEL_NONE,
155}; 155};
156 156
157static struct fb_var_screeninfo pvr2_var __devinitdata = { 157static struct fb_var_screeninfo pvr2_var = {
158 .xres = 640, 158 .xres = 640,
159 .yres = 480, 159 .yres = 480,
160 .xres_virtual = 640, 160 .xres_virtual = 640,
@@ -226,7 +226,7 @@ static struct fb_ops pvr2fb_ops = {
226 .fb_imageblit = cfb_imageblit, 226 .fb_imageblit = cfb_imageblit,
227}; 227};
228 228
229static struct fb_videomode pvr2_modedb[] __devinitdata = { 229static struct fb_videomode pvr2_modedb[] = {
230 /* 230 /*
231 * Broadcast video modes (PAL and NTSC). I'm unfamiliar with 231 * Broadcast video modes (PAL and NTSC). I'm unfamiliar with
232 * PAL-M and PAL-N, but from what I've read both modes parallel PAL and 232 * PAL-M and PAL-N, but from what I've read both modes parallel PAL and
@@ -256,7 +256,7 @@ static struct fb_videomode pvr2_modedb[] __devinitdata = {
256#define DEFMODE_VGA 2 256#define DEFMODE_VGA 2
257 257
258static int defmode = DEFMODE_NTSC; 258static int defmode = DEFMODE_NTSC;
259static char *mode_option __devinitdata = NULL; 259static char *mode_option = NULL;
260 260
261static inline void pvr2fb_set_pal_type(unsigned int type) 261static inline void pvr2fb_set_pal_type(unsigned int type)
262{ 262{
@@ -763,7 +763,7 @@ out_unmap:
763 * in for flexibility anyways. Who knows, maybe someone has tv-out on a 763 * in for flexibility anyways. Who knows, maybe someone has tv-out on a
764 * PCI-based version of these things ;-) 764 * PCI-based version of these things ;-)
765 */ 765 */
766static int __devinit pvr2fb_common_init(void) 766static int pvr2fb_common_init(void)
767{ 767{
768 struct pvr2fb_par *par = currentpar; 768 struct pvr2fb_par *par = currentpar;
769 unsigned long modememused, rev; 769 unsigned long modememused, rev;
@@ -922,8 +922,8 @@ static void __exit pvr2fb_dc_exit(void)
922#endif /* CONFIG_SH_DREAMCAST */ 922#endif /* CONFIG_SH_DREAMCAST */
923 923
924#ifdef CONFIG_PCI 924#ifdef CONFIG_PCI
925static int __devinit pvr2fb_pci_probe(struct pci_dev *pdev, 925static int pvr2fb_pci_probe(struct pci_dev *pdev,
926 const struct pci_device_id *ent) 926 const struct pci_device_id *ent)
927{ 927{
928 int ret; 928 int ret;
929 929
@@ -953,7 +953,7 @@ static int __devinit pvr2fb_pci_probe(struct pci_dev *pdev,
953 return pvr2fb_common_init(); 953 return pvr2fb_common_init();
954} 954}
955 955
956static void __devexit pvr2fb_pci_remove(struct pci_dev *pdev) 956static void pvr2fb_pci_remove(struct pci_dev *pdev)
957{ 957{
958 if (fb_info->screen_base) { 958 if (fb_info->screen_base) {
959 iounmap(fb_info->screen_base); 959 iounmap(fb_info->screen_base);
@@ -967,7 +967,7 @@ static void __devexit pvr2fb_pci_remove(struct pci_dev *pdev)
967 pci_release_regions(pdev); 967 pci_release_regions(pdev);
968} 968}
969 969
970static struct pci_device_id pvr2fb_pci_tbl[] __devinitdata = { 970static struct pci_device_id pvr2fb_pci_tbl[] = {
971 { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250, 971 { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250,
972 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 972 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
973 { 0, }, 973 { 0, },
@@ -979,7 +979,7 @@ static struct pci_driver pvr2fb_pci_driver = {
979 .name = "pvr2fb", 979 .name = "pvr2fb",
980 .id_table = pvr2fb_pci_tbl, 980 .id_table = pvr2fb_pci_tbl,
981 .probe = pvr2fb_pci_probe, 981 .probe = pvr2fb_pci_probe,
982 .remove = __devexit_p(pvr2fb_pci_remove), 982 .remove = pvr2fb_pci_remove,
983}; 983};
984 984
985static int __init pvr2fb_pci_init(void) 985static int __init pvr2fb_pci_init(void)
@@ -993,8 +993,8 @@ static void __exit pvr2fb_pci_exit(void)
993} 993}
994#endif /* CONFIG_PCI */ 994#endif /* CONFIG_PCI */
995 995
996static int __devinit pvr2_get_param(const struct pvr2_params *p, const char *s, 996static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val,
997 int val, int size) 997 int size)
998{ 998{
999 int i; 999 int i;
1000 1000
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
index f146089261f4..aa9bd1f76d60 100644
--- a/drivers/video/pxa168fb.c
+++ b/drivers/video/pxa168fb.c
@@ -560,7 +560,7 @@ static struct fb_ops pxa168fb_ops = {
560 .fb_imageblit = cfb_imageblit, 560 .fb_imageblit = cfb_imageblit,
561}; 561};
562 562
563static int __devinit pxa168fb_init_mode(struct fb_info *info, 563static int pxa168fb_init_mode(struct fb_info *info,
564 struct pxa168fb_mach_info *mi) 564 struct pxa168fb_mach_info *mi)
565{ 565{
566 struct pxa168fb_info *fbi = info->par; 566 struct pxa168fb_info *fbi = info->par;
@@ -600,7 +600,7 @@ static int __devinit pxa168fb_init_mode(struct fb_info *info,
600 return ret; 600 return ret;
601} 601}
602 602
603static int __devinit pxa168fb_probe(struct platform_device *pdev) 603static int pxa168fb_probe(struct platform_device *pdev)
604{ 604{
605 struct pxa168fb_mach_info *mi; 605 struct pxa168fb_mach_info *mi;
606 struct fb_info *info = 0; 606 struct fb_info *info = 0;
@@ -783,7 +783,7 @@ failed_put_clk:
783 return ret; 783 return ret;
784} 784}
785 785
786static int __devexit pxa168fb_remove(struct platform_device *pdev) 786static int pxa168fb_remove(struct platform_device *pdev)
787{ 787{
788 struct pxa168fb_info *fbi = platform_get_drvdata(pdev); 788 struct pxa168fb_info *fbi = platform_get_drvdata(pdev);
789 struct fb_info *info; 789 struct fb_info *info;
@@ -826,7 +826,7 @@ static struct platform_driver pxa168fb_driver = {
826 .owner = THIS_MODULE, 826 .owner = THIS_MODULE,
827 }, 827 },
828 .probe = pxa168fb_probe, 828 .probe = pxa168fb_probe,
829 .remove = __devexit_p(pxa168fb_remove), 829 .remove = pxa168fb_remove,
830}; 830};
831 831
832module_platform_driver(pxa168fb_driver); 832module_platform_driver(pxa168fb_driver);
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c
index 0b4ae0cebeda..6c984eacc7e3 100644
--- a/drivers/video/pxa3xx-gcu.c
+++ b/drivers/video/pxa3xx-gcu.c
@@ -574,8 +574,7 @@ free_buffers(struct platform_device *dev,
574 priv->free = NULL; 574 priv->free = NULL;
575} 575}
576 576
577static int __devinit 577static int pxa3xx_gcu_probe(struct platform_device *dev)
578pxa3xx_gcu_probe(struct platform_device *dev)
579{ 578{
580 int i, ret, irq; 579 int i, ret, irq;
581 struct resource *r; 580 struct resource *r;
@@ -714,8 +713,7 @@ err_free_priv:
714 return ret; 713 return ret;
715} 714}
716 715
717static int __devexit 716static int pxa3xx_gcu_remove(struct platform_device *dev)
718pxa3xx_gcu_remove(struct platform_device *dev)
719{ 717{
720 struct pxa3xx_gcu_priv *priv = platform_get_drvdata(dev); 718 struct pxa3xx_gcu_priv *priv = platform_get_drvdata(dev);
721 struct resource *r = priv->resource_mem; 719 struct resource *r = priv->resource_mem;
@@ -737,7 +735,7 @@ pxa3xx_gcu_remove(struct platform_device *dev)
737 735
738static struct platform_driver pxa3xx_gcu_driver = { 736static struct platform_driver pxa3xx_gcu_driver = {
739 .probe = pxa3xx_gcu_probe, 737 .probe = pxa3xx_gcu_probe,
740 .remove = __devexit_p(pxa3xx_gcu_remove), 738 .remove = pxa3xx_gcu_remove,
741 .driver = { 739 .driver = {
742 .owner = THIS_MODULE, 740 .owner = THIS_MODULE,
743 .name = DRV_NAME, 741 .name = DRV_NAME,
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 4fa2ad43fd97..580f80cc586f 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -869,8 +869,8 @@ static struct fb_ops overlay_fb_ops = {
869 .fb_set_par = overlayfb_set_par, 869 .fb_set_par = overlayfb_set_par,
870}; 870};
871 871
872static void __devinit init_pxafb_overlay(struct pxafb_info *fbi, 872static void init_pxafb_overlay(struct pxafb_info *fbi, struct pxafb_layer *ofb,
873 struct pxafb_layer *ofb, int id) 873 int id)
874{ 874{
875 sprintf(ofb->fb.fix.id, "overlay%d", id + 1); 875 sprintf(ofb->fb.fix.id, "overlay%d", id + 1);
876 876
@@ -903,8 +903,8 @@ static inline int pxafb_overlay_supported(void)
903 return 0; 903 return 0;
904} 904}
905 905
906static int __devinit pxafb_overlay_map_video_memory(struct pxafb_info *pxafb, 906static int pxafb_overlay_map_video_memory(struct pxafb_info *pxafb,
907 struct pxafb_layer *ofb) 907 struct pxafb_layer *ofb)
908{ 908{
909 /* We assume that user will use at most video_mem_size for overlay fb, 909 /* We assume that user will use at most video_mem_size for overlay fb,
910 * anyway, it's useless to use 16bpp main plane and 24bpp overlay 910 * anyway, it's useless to use 16bpp main plane and 24bpp overlay
@@ -927,7 +927,7 @@ static int __devinit pxafb_overlay_map_video_memory(struct pxafb_info *pxafb,
927 return 0; 927 return 0;
928} 928}
929 929
930static void __devinit pxafb_overlay_init(struct pxafb_info *fbi) 930static void pxafb_overlay_init(struct pxafb_info *fbi)
931{ 931{
932 int i, ret; 932 int i, ret;
933 933
@@ -959,7 +959,7 @@ static void __devinit pxafb_overlay_init(struct pxafb_info *fbi)
959 pr_info("PXA Overlay driver loaded successfully!\n"); 959 pr_info("PXA Overlay driver loaded successfully!\n");
960} 960}
961 961
962static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi) 962static void pxafb_overlay_exit(struct pxafb_info *fbi)
963{ 963{
964 int i; 964 int i;
965 965
@@ -1706,7 +1706,7 @@ static const struct dev_pm_ops pxafb_pm_ops = {
1706}; 1706};
1707#endif 1707#endif
1708 1708
1709static int __devinit pxafb_init_video_memory(struct pxafb_info *fbi) 1709static int pxafb_init_video_memory(struct pxafb_info *fbi)
1710{ 1710{
1711 int size = PAGE_ALIGN(fbi->video_mem_size); 1711 int size = PAGE_ALIGN(fbi->video_mem_size);
1712 1712
@@ -1789,7 +1789,7 @@ decode_mode:
1789 fbi->video_mem_size = video_mem_size; 1789 fbi->video_mem_size = video_mem_size;
1790} 1790}
1791 1791
1792static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) 1792static struct pxafb_info *pxafb_init_fbinfo(struct device *dev)
1793{ 1793{
1794 struct pxafb_info *fbi; 1794 struct pxafb_info *fbi;
1795 void *addr; 1795 void *addr;
@@ -1853,7 +1853,7 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev)
1853} 1853}
1854 1854
1855#ifdef CONFIG_FB_PXA_PARAMETERS 1855#ifdef CONFIG_FB_PXA_PARAMETERS
1856static int __devinit parse_opt_mode(struct device *dev, const char *this_opt) 1856static int parse_opt_mode(struct device *dev, const char *this_opt)
1857{ 1857{
1858 struct pxafb_mach_info *inf = dev->platform_data; 1858 struct pxafb_mach_info *inf = dev->platform_data;
1859 1859
@@ -1912,7 +1912,7 @@ done:
1912 return 0; 1912 return 0;
1913} 1913}
1914 1914
1915static int __devinit parse_opt(struct device *dev, char *this_opt) 1915static int parse_opt(struct device *dev, char *this_opt)
1916{ 1916{
1917 struct pxafb_mach_info *inf = dev->platform_data; 1917 struct pxafb_mach_info *inf = dev->platform_data;
1918 struct pxafb_mode_info *mode = &inf->modes[0]; 1918 struct pxafb_mode_info *mode = &inf->modes[0];
@@ -2012,7 +2012,7 @@ static int __devinit parse_opt(struct device *dev, char *this_opt)
2012 return 0; 2012 return 0;
2013} 2013}
2014 2014
2015static int __devinit pxafb_parse_options(struct device *dev, char *options) 2015static int pxafb_parse_options(struct device *dev, char *options)
2016{ 2016{
2017 char *this_opt; 2017 char *this_opt;
2018 int ret; 2018 int ret;
@@ -2031,7 +2031,7 @@ static int __devinit pxafb_parse_options(struct device *dev, char *options)
2031 return 0; 2031 return 0;
2032} 2032}
2033 2033
2034static char g_options[256] __devinitdata = ""; 2034static char g_options[256] = "";
2035 2035
2036#ifndef MODULE 2036#ifndef MODULE
2037static int __init pxafb_setup_options(void) 2037static int __init pxafb_setup_options(void)
@@ -2061,8 +2061,7 @@ MODULE_PARM_DESC(options, "LCD parameters (see Documentation/fb/pxafb.txt)");
2061#ifdef DEBUG_VAR 2061#ifdef DEBUG_VAR
2062/* Check for various illegal bit-combinations. Currently only 2062/* Check for various illegal bit-combinations. Currently only
2063 * a warning is given. */ 2063 * a warning is given. */
2064static void __devinit pxafb_check_options(struct device *dev, 2064static void pxafb_check_options(struct device *dev, struct pxafb_mach_info *inf)
2065 struct pxafb_mach_info *inf)
2066{ 2065{
2067 if (inf->lcd_conn) 2066 if (inf->lcd_conn)
2068 return; 2067 return;
@@ -2094,7 +2093,7 @@ static void __devinit pxafb_check_options(struct device *dev,
2094#define pxafb_check_options(...) do {} while (0) 2093#define pxafb_check_options(...) do {} while (0)
2095#endif 2094#endif
2096 2095
2097static int __devinit pxafb_probe(struct platform_device *dev) 2096static int pxafb_probe(struct platform_device *dev)
2098{ 2097{
2099 struct pxafb_info *fbi; 2098 struct pxafb_info *fbi;
2100 struct pxafb_mach_info *inf; 2099 struct pxafb_mach_info *inf;
@@ -2263,7 +2262,7 @@ failed:
2263 return ret; 2262 return ret;
2264} 2263}
2265 2264
2266static int __devexit pxafb_remove(struct platform_device *dev) 2265static int pxafb_remove(struct platform_device *dev)
2267{ 2266{
2268 struct pxafb_info *fbi = platform_get_drvdata(dev); 2267 struct pxafb_info *fbi = platform_get_drvdata(dev);
2269 struct resource *r; 2268 struct resource *r;
@@ -2304,7 +2303,7 @@ static int __devexit pxafb_remove(struct platform_device *dev)
2304 2303
2305static struct platform_driver pxafb_driver = { 2304static struct platform_driver pxafb_driver = {
2306 .probe = pxafb_probe, 2305 .probe = pxafb_probe,
2307 .remove = __devexit_p(pxafb_remove), 2306 .remove = pxafb_remove,
2308 .driver = { 2307 .driver = {
2309 .owner = THIS_MODULE, 2308 .owner = THIS_MODULE,
2310 .name = "pxa2xx-fb", 2309 .name = "pxa2xx-fb",
diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c
index a104e8cd2f54..d44c7351de0f 100644
--- a/drivers/video/q40fb.c
+++ b/drivers/video/q40fb.c
@@ -27,7 +27,7 @@
27 27
28#define Q40_PHYS_SCREEN_ADDR 0xFE800000 28#define Q40_PHYS_SCREEN_ADDR 0xFE800000
29 29
30static struct fb_fix_screeninfo q40fb_fix __devinitdata = { 30static struct fb_fix_screeninfo q40fb_fix = {
31 .id = "Q40", 31 .id = "Q40",
32 .smem_len = 1024*1024, 32 .smem_len = 1024*1024,
33 .type = FB_TYPE_PACKED_PIXELS, 33 .type = FB_TYPE_PACKED_PIXELS,
@@ -36,7 +36,7 @@ static struct fb_fix_screeninfo q40fb_fix __devinitdata = {
36 .accel = FB_ACCEL_NONE, 36 .accel = FB_ACCEL_NONE,
37}; 37};
38 38
39static struct fb_var_screeninfo q40fb_var __devinitdata = { 39static struct fb_var_screeninfo q40fb_var = {
40 .xres = 1024, 40 .xres = 1024,
41 .yres = 512, 41 .yres = 512,
42 .xres_virtual = 1024, 42 .xres_virtual = 1024,
@@ -83,7 +83,7 @@ static struct fb_ops q40fb_ops = {
83 .fb_imageblit = cfb_imageblit, 83 .fb_imageblit = cfb_imageblit,
84}; 84};
85 85
86static int __devinit q40fb_probe(struct platform_device *dev) 86static int q40fb_probe(struct platform_device *dev)
87{ 87{
88 struct fb_info *info; 88 struct fb_info *info;
89 89
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index 90df1a60bd16..9536715b5a1b 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -205,28 +205,28 @@ MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl);
205 * ------------------------------------------------------------------------- */ 205 * ------------------------------------------------------------------------- */
206 206
207/* command line data, set in rivafb_setup() */ 207/* command line data, set in rivafb_setup() */
208static int flatpanel __devinitdata = -1; /* Autodetect later */ 208static int flatpanel = -1; /* Autodetect later */
209static int forceCRTC __devinitdata = -1; 209static int forceCRTC = -1;
210static bool noaccel __devinitdata = 0; 210static bool noaccel = 0;
211#ifdef CONFIG_MTRR 211#ifdef CONFIG_MTRR
212static bool nomtrr __devinitdata = 0; 212static bool nomtrr = 0;
213#endif 213#endif
214#ifdef CONFIG_PMAC_BACKLIGHT 214#ifdef CONFIG_PMAC_BACKLIGHT
215static int backlight __devinitdata = 1; 215static int backlight = 1;
216#else 216#else
217static int backlight __devinitdata = 0; 217static int backlight = 0;
218#endif 218#endif
219 219
220static char *mode_option __devinitdata = NULL; 220static char *mode_option = NULL;
221static bool strictmode = 0; 221static bool strictmode = 0;
222 222
223static struct fb_fix_screeninfo __devinitdata rivafb_fix = { 223static struct fb_fix_screeninfo rivafb_fix = {
224 .type = FB_TYPE_PACKED_PIXELS, 224 .type = FB_TYPE_PACKED_PIXELS,
225 .xpanstep = 1, 225 .xpanstep = 1,
226 .ypanstep = 1, 226 .ypanstep = 1,
227}; 227};
228 228
229static struct fb_var_screeninfo __devinitdata rivafb_default_var = { 229static struct fb_var_screeninfo rivafb_default_var = {
230 .xres = 640, 230 .xres = 640,
231 .yres = 480, 231 .yres = 480,
232 .xres_virtual = 640, 232 .xres_virtual = 640,
@@ -1709,7 +1709,7 @@ static struct fb_ops riva_fb_ops = {
1709 .fb_sync = rivafb_sync, 1709 .fb_sync = rivafb_sync,
1710}; 1710};
1711 1711
1712static int __devinit riva_set_fbinfo(struct fb_info *info) 1712static int riva_set_fbinfo(struct fb_info *info)
1713{ 1713{
1714 unsigned int cmap_len; 1714 unsigned int cmap_len;
1715 struct riva_par *par = info->par; 1715 struct riva_par *par = info->par;
@@ -1747,7 +1747,7 @@ static int __devinit riva_set_fbinfo(struct fb_info *info)
1747} 1747}
1748 1748
1749#ifdef CONFIG_PPC_OF 1749#ifdef CONFIG_PPC_OF
1750static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) 1750static int riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd)
1751{ 1751{
1752 struct riva_par *par = info->par; 1752 struct riva_par *par = info->par;
1753 struct device_node *dp; 1753 struct device_node *dp;
@@ -1780,7 +1780,7 @@ static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd)
1780#endif /* CONFIG_PPC_OF */ 1780#endif /* CONFIG_PPC_OF */
1781 1781
1782#if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF) 1782#if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF)
1783static int __devinit riva_get_EDID_i2c(struct fb_info *info) 1783static int riva_get_EDID_i2c(struct fb_info *info)
1784{ 1784{
1785 struct riva_par *par = info->par; 1785 struct riva_par *par = info->par;
1786 struct fb_var_screeninfo var; 1786 struct fb_var_screeninfo var;
@@ -1803,8 +1803,8 @@ static int __devinit riva_get_EDID_i2c(struct fb_info *info)
1803} 1803}
1804#endif /* CONFIG_FB_RIVA_I2C */ 1804#endif /* CONFIG_FB_RIVA_I2C */
1805 1805
1806static void __devinit riva_update_default_var(struct fb_var_screeninfo *var, 1806static void riva_update_default_var(struct fb_var_screeninfo *var,
1807 struct fb_info *info) 1807 struct fb_info *info)
1808{ 1808{
1809 struct fb_monspecs *specs = &info->monspecs; 1809 struct fb_monspecs *specs = &info->monspecs;
1810 struct fb_videomode modedb; 1810 struct fb_videomode modedb;
@@ -1836,7 +1836,7 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
1836} 1836}
1837 1837
1838 1838
1839static void __devinit riva_get_EDID(struct fb_info *info, struct pci_dev *pdev) 1839static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev)
1840{ 1840{
1841 NVTRACE_ENTER(); 1841 NVTRACE_ENTER();
1842#ifdef CONFIG_PPC_OF 1842#ifdef CONFIG_PPC_OF
@@ -1850,7 +1850,7 @@ static void __devinit riva_get_EDID(struct fb_info *info, struct pci_dev *pdev)
1850} 1850}
1851 1851
1852 1852
1853static void __devinit riva_get_edidinfo(struct fb_info *info) 1853static void riva_get_edidinfo(struct fb_info *info)
1854{ 1854{
1855 struct fb_var_screeninfo *var = &rivafb_default_var; 1855 struct fb_var_screeninfo *var = &rivafb_default_var;
1856 struct riva_par *par = info->par; 1856 struct riva_par *par = info->par;
@@ -1871,7 +1871,7 @@ static void __devinit riva_get_edidinfo(struct fb_info *info)
1871 * 1871 *
1872 * ------------------------------------------------------------------------- */ 1872 * ------------------------------------------------------------------------- */
1873 1873
1874static u32 __devinit riva_get_arch(struct pci_dev *pd) 1874static u32 riva_get_arch(struct pci_dev *pd)
1875{ 1875{
1876 u32 arch = 0; 1876 u32 arch = 0;
1877 1877
@@ -1909,8 +1909,7 @@ static u32 __devinit riva_get_arch(struct pci_dev *pd)
1909 return arch; 1909 return arch;
1910} 1910}
1911 1911
1912static int __devinit rivafb_probe(struct pci_dev *pd, 1912static int rivafb_probe(struct pci_dev *pd, const struct pci_device_id *ent)
1913 const struct pci_device_id *ent)
1914{ 1913{
1915 struct riva_par *default_par; 1914 struct riva_par *default_par;
1916 struct fb_info *info; 1915 struct fb_info *info;
@@ -2105,7 +2104,7 @@ err_ret:
2105 return ret; 2104 return ret;
2106} 2105}
2107 2106
2108static void __devexit rivafb_remove(struct pci_dev *pd) 2107static void rivafb_remove(struct pci_dev *pd)
2109{ 2108{
2110 struct fb_info *info = pci_get_drvdata(pd); 2109 struct fb_info *info = pci_get_drvdata(pd);
2111 struct riva_par *par = info->par; 2110 struct riva_par *par = info->par;
@@ -2145,7 +2144,7 @@ static void __devexit rivafb_remove(struct pci_dev *pd)
2145 * ------------------------------------------------------------------------- */ 2144 * ------------------------------------------------------------------------- */
2146 2145
2147#ifndef MODULE 2146#ifndef MODULE
2148static int __devinit rivafb_setup(char *options) 2147static int rivafb_setup(char *options)
2149{ 2148{
2150 char *this_opt; 2149 char *this_opt;
2151 2150
@@ -2186,7 +2185,7 @@ static struct pci_driver rivafb_driver = {
2186 .name = "rivafb", 2185 .name = "rivafb",
2187 .id_table = rivafb_pci_tbl, 2186 .id_table = rivafb_pci_tbl,
2188 .probe = rivafb_probe, 2187 .probe = rivafb_probe,
2189 .remove = __devexit_p(rivafb_remove), 2188 .remove = rivafb_remove,
2190}; 2189};
2191 2190
2192 2191
@@ -2197,7 +2196,7 @@ static struct pci_driver rivafb_driver = {
2197 * 2196 *
2198 * ------------------------------------------------------------------------- */ 2197 * ------------------------------------------------------------------------- */
2199 2198
2200static int __devinit rivafb_init(void) 2199static int rivafb_init(void)
2201{ 2200{
2202#ifndef MODULE 2201#ifndef MODULE
2203 char *option = NULL; 2202 char *option = NULL;
diff --git a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c
index 167400e2a182..6a183375ced1 100644
--- a/drivers/video/riva/rivafb-i2c.c
+++ b/drivers/video/riva/rivafb-i2c.c
@@ -86,9 +86,8 @@ static int riva_gpio_getsda(void* data)
86 return val; 86 return val;
87} 87}
88 88
89static int __devinit riva_setup_i2c_bus(struct riva_i2c_chan *chan, 89static int riva_setup_i2c_bus(struct riva_i2c_chan *chan, const char *name,
90 const char *name, 90 unsigned int i2c_class)
91 unsigned int i2c_class)
92{ 91{
93 int rc; 92 int rc;
94 93
@@ -124,7 +123,7 @@ static int __devinit riva_setup_i2c_bus(struct riva_i2c_chan *chan,
124 return rc; 123 return rc;
125} 124}
126 125
127void __devinit riva_create_i2c_busses(struct riva_par *par) 126void riva_create_i2c_busses(struct riva_par *par)
128{ 127{
129 par->chan[0].par = par; 128 par->chan[0].par = par;
130 par->chan[1].par = par; 129 par->chan[1].par = par;
@@ -150,7 +149,7 @@ void riva_delete_i2c_busses(struct riva_par *par)
150 } 149 }
151} 150}
152 151
153int __devinit riva_probe_i2c_connector(struct riva_par *par, int conn, u8 **out_edid) 152int riva_probe_i2c_connector(struct riva_par *par, int conn, u8 **out_edid)
154{ 153{
155 u8 *edid = NULL; 154 u8 *edid = NULL;
156 155
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c
index 28b1c6c3d8ac..76d9053d88c1 100644
--- a/drivers/video/s1d13xxxfb.c
+++ b/drivers/video/s1d13xxxfb.c
@@ -84,7 +84,7 @@ static const char *s1d13xxxfb_prod_names[] = {
84/* 84/*
85 * here we define the default struct fb_fix_screeninfo 85 * here we define the default struct fb_fix_screeninfo
86 */ 86 */
87static struct fb_fix_screeninfo __devinitdata s1d13xxxfb_fix = { 87static struct fb_fix_screeninfo s1d13xxxfb_fix = {
88 .id = S1D_FBID, 88 .id = S1D_FBID,
89 .type = FB_TYPE_PACKED_PIXELS, 89 .type = FB_TYPE_PACKED_PIXELS,
90 .visual = FB_VISUAL_PSEUDOCOLOR, 90 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -622,7 +622,7 @@ static struct fb_ops s1d13xxxfb_fbops = {
622 .fb_imageblit = cfb_imageblit, 622 .fb_imageblit = cfb_imageblit,
623}; 623};
624 624
625static int s1d13xxxfb_width_tab[2][4] __devinitdata = { 625static int s1d13xxxfb_width_tab[2][4] = {
626 {4, 8, 16, -1}, 626 {4, 8, 16, -1},
627 {9, 12, 18, -1}, 627 {9, 12, 18, -1},
628}; 628};
@@ -642,8 +642,7 @@ static int s1d13xxxfb_width_tab[2][4] __devinitdata = {
642 * Note: some of the hardcoded values here might need some love to 642 * Note: some of the hardcoded values here might need some love to
643 * work on various chips, and might need to no longer be hardcoded. 643 * work on various chips, and might need to no longer be hardcoded.
644 */ 644 */
645static void __devinit 645static void s1d13xxxfb_fetch_hw_state(struct fb_info *info)
646s1d13xxxfb_fetch_hw_state(struct fb_info *info)
647{ 646{
648 struct fb_var_screeninfo *var = &info->var; 647 struct fb_var_screeninfo *var = &info->var;
649 struct fb_fix_screeninfo *fix = &info->fix; 648 struct fb_fix_screeninfo *fix = &info->fix;
@@ -764,8 +763,7 @@ s1d13xxxfb_remove(struct platform_device *pdev)
764 return 0; 763 return 0;
765} 764}
766 765
767static int __devinit 766static int s1d13xxxfb_probe(struct platform_device *pdev)
768s1d13xxxfb_probe(struct platform_device *pdev)
769{ 767{
770 struct s1d13xxxfb_par *default_par; 768 struct s1d13xxxfb_par *default_par;
771 struct fb_info *info; 769 struct fb_info *info;
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 1a00ad241edd..9b57a235c9bc 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1081,8 +1081,7 @@ static void s3c_fb_missing_pixclock(struct fb_videomode *mode)
1081 * 1081 *
1082 * Allocate memory for the given framebuffer. 1082 * Allocate memory for the given framebuffer.
1083 */ 1083 */
1084static int __devinit s3c_fb_alloc_memory(struct s3c_fb *sfb, 1084static int s3c_fb_alloc_memory(struct s3c_fb *sfb, struct s3c_fb_win *win)
1085 struct s3c_fb_win *win)
1086{ 1085{
1087 struct s3c_fb_pd_win *windata = win->windata; 1086 struct s3c_fb_pd_win *windata = win->windata;
1088 unsigned int real_size, virt_size, size; 1087 unsigned int real_size, virt_size, size;
@@ -1172,9 +1171,9 @@ static void s3c_fb_release_win(struct s3c_fb *sfb, struct s3c_fb_win *win)
1172 * Allocate and do the basic initialisation for one of the hardware's graphics 1171 * Allocate and do the basic initialisation for one of the hardware's graphics
1173 * windows. 1172 * windows.
1174 */ 1173 */
1175static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no, 1174static int s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
1176 struct s3c_fb_win_variant *variant, 1175 struct s3c_fb_win_variant *variant,
1177 struct s3c_fb_win **res) 1176 struct s3c_fb_win **res)
1178{ 1177{
1179 struct fb_var_screeninfo *var; 1178 struct fb_var_screeninfo *var;
1180 struct fb_videomode initmode; 1179 struct fb_videomode initmode;
@@ -1360,7 +1359,7 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win)
1360 } 1359 }
1361} 1360}
1362 1361
1363static int __devinit s3c_fb_probe(struct platform_device *pdev) 1362static int s3c_fb_probe(struct platform_device *pdev)
1364{ 1363{
1365 const struct platform_device_id *platid; 1364 const struct platform_device_id *platid;
1366 struct s3c_fb_driverdata *fbdrv; 1365 struct s3c_fb_driverdata *fbdrv;
@@ -1521,7 +1520,7 @@ err_bus_clk:
1521 * Shutdown and then release all the resources that the driver allocated 1520 * Shutdown and then release all the resources that the driver allocated
1522 * on initialisation. 1521 * on initialisation.
1523 */ 1522 */
1524static int __devexit s3c_fb_remove(struct platform_device *pdev) 1523static int s3c_fb_remove(struct platform_device *pdev)
1525{ 1524{
1526 struct s3c_fb *sfb = platform_get_drvdata(pdev); 1525 struct s3c_fb *sfb = platform_get_drvdata(pdev);
1527 int win; 1526 int win;
@@ -2035,7 +2034,7 @@ static const struct dev_pm_ops s3cfb_pm_ops = {
2035 2034
2036static struct platform_driver s3c_fb_driver = { 2035static struct platform_driver s3c_fb_driver = {
2037 .probe = s3c_fb_probe, 2036 .probe = s3c_fb_probe,
2038 .remove = __devexit_p(s3c_fb_remove), 2037 .remove = s3c_fb_remove,
2039 .id_table = s3c_fb_driver_ids, 2038 .id_table = s3c_fb_driver_ids,
2040 .driver = { 2039 .driver = {
2041 .name = "s3c-fb", 2040 .name = "s3c-fb",
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index 1083bb9469ee..76a0e7fbd692 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -637,7 +637,7 @@ static struct fb_ops s3c2410fb_ops = {
637 * cache. Once this area is remapped, all virtual memory 637 * cache. Once this area is remapped, all virtual memory
638 * access to the video memory should occur at the new region. 638 * access to the video memory should occur at the new region.
639 */ 639 */
640static int __devinit s3c2410fb_map_video_memory(struct fb_info *info) 640static int s3c2410fb_map_video_memory(struct fb_info *info)
641{ 641{
642 struct s3c2410fb_info *fbi = info->par; 642 struct s3c2410fb_info *fbi = info->par;
643 dma_addr_t map_dma; 643 dma_addr_t map_dma;
@@ -819,8 +819,8 @@ static inline void s3c2410fb_cpufreq_deregister(struct s3c2410fb_info *info)
819 819
820static const char driver_name[] = "s3c2410fb"; 820static const char driver_name[] = "s3c2410fb";
821 821
822static int __devinit s3c24xxfb_probe(struct platform_device *pdev, 822static int s3c24xxfb_probe(struct platform_device *pdev,
823 enum s3c_drv_type drv_type) 823 enum s3c_drv_type drv_type)
824{ 824{
825 struct s3c2410fb_info *info; 825 struct s3c2410fb_info *info;
826 struct s3c2410fb_display *display; 826 struct s3c2410fb_display *display;
@@ -1010,12 +1010,12 @@ dealloc_fb:
1010 return ret; 1010 return ret;
1011} 1011}
1012 1012
1013static int __devinit s3c2410fb_probe(struct platform_device *pdev) 1013static int s3c2410fb_probe(struct platform_device *pdev)
1014{ 1014{
1015 return s3c24xxfb_probe(pdev, DRV_S3C2410); 1015 return s3c24xxfb_probe(pdev, DRV_S3C2410);
1016} 1016}
1017 1017
1018static int __devinit s3c2412fb_probe(struct platform_device *pdev) 1018static int s3c2412fb_probe(struct platform_device *pdev)
1019{ 1019{
1020 return s3c24xxfb_probe(pdev, DRV_S3C2412); 1020 return s3c24xxfb_probe(pdev, DRV_S3C2412);
1021} 1021}
@@ -1024,7 +1024,7 @@ static int __devinit s3c2412fb_probe(struct platform_device *pdev)
1024/* 1024/*
1025 * Cleanup 1025 * Cleanup
1026 */ 1026 */
1027static int __devexit s3c2410fb_remove(struct platform_device *pdev) 1027static int s3c2410fb_remove(struct platform_device *pdev)
1028{ 1028{
1029 struct fb_info *fbinfo = platform_get_drvdata(pdev); 1029 struct fb_info *fbinfo = platform_get_drvdata(pdev);
1030 struct s3c2410fb_info *info = fbinfo->par; 1030 struct s3c2410fb_info *info = fbinfo->par;
@@ -1101,7 +1101,7 @@ static int s3c2410fb_resume(struct platform_device *dev)
1101 1101
1102static struct platform_driver s3c2410fb_driver = { 1102static struct platform_driver s3c2410fb_driver = {
1103 .probe = s3c2410fb_probe, 1103 .probe = s3c2410fb_probe,
1104 .remove = __devexit_p(s3c2410fb_remove), 1104 .remove = s3c2410fb_remove,
1105 .suspend = s3c2410fb_suspend, 1105 .suspend = s3c2410fb_suspend,
1106 .resume = s3c2410fb_resume, 1106 .resume = s3c2410fb_resume,
1107 .driver = { 1107 .driver = {
@@ -1112,7 +1112,7 @@ static struct platform_driver s3c2410fb_driver = {
1112 1112
1113static struct platform_driver s3c2412fb_driver = { 1113static struct platform_driver s3c2412fb_driver = {
1114 .probe = s3c2412fb_probe, 1114 .probe = s3c2412fb_probe,
1115 .remove = __devexit_p(s3c2410fb_remove), 1115 .remove = s3c2410fb_remove,
1116 .suspend = s3c2410fb_suspend, 1116 .suspend = s3c2410fb_suspend,
1117 .resume = s3c2410fb_resume, 1117 .resume = s3c2410fb_resume,
1118 .driver = { 1118 .driver = {
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index 1d007366b917..47ca86c5c6c0 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -153,10 +153,10 @@ static const struct svga_timing_regs s3_timing_regs = {
153/* Module parameters */ 153/* Module parameters */
154 154
155 155
156static char *mode_option __devinitdata; 156static char *mode_option;
157 157
158#ifdef CONFIG_MTRR 158#ifdef CONFIG_MTRR
159static int mtrr __devinitdata = 1; 159static int mtrr = 1;
160#endif 160#endif
161 161
162static int fasttext = 1; 162static int fasttext = 1;
@@ -255,7 +255,7 @@ static int s3fb_ddc_getsda(void *data)
255 return !!(s3fb_ddc_read(par) & DDC_SDA_IN); 255 return !!(s3fb_ddc_read(par) & DDC_SDA_IN);
256} 256}
257 257
258static int __devinit s3fb_setup_ddc_bus(struct fb_info *info) 258static int s3fb_setup_ddc_bus(struct fb_info *info)
259{ 259{
260 struct s3fb_info *par = info->par; 260 struct s3fb_info *par = info->par;
261 261
@@ -1066,7 +1066,7 @@ static struct fb_ops s3fb_ops = {
1066 1066
1067/* ------------------------------------------------------------------------- */ 1067/* ------------------------------------------------------------------------- */
1068 1068
1069static int __devinit s3_identification(struct s3fb_info *par) 1069static int s3_identification(struct s3fb_info *par)
1070{ 1070{
1071 int chip = par->chip; 1071 int chip = par->chip;
1072 1072
@@ -1122,7 +1122,7 @@ static int __devinit s3_identification(struct s3fb_info *par)
1122 1122
1123/* PCI probe */ 1123/* PCI probe */
1124 1124
1125static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) 1125static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
1126{ 1126{
1127 struct pci_bus_region bus_reg; 1127 struct pci_bus_region bus_reg;
1128 struct resource vga_res; 1128 struct resource vga_res;
@@ -1403,7 +1403,7 @@ err_enable_device:
1403 1403
1404/* PCI remove */ 1404/* PCI remove */
1405 1405
1406static void __devexit s3_pci_remove(struct pci_dev *dev) 1406static void s3_pci_remove(struct pci_dev *dev)
1407{ 1407{
1408 struct fb_info *info = pci_get_drvdata(dev); 1408 struct fb_info *info = pci_get_drvdata(dev);
1409 struct s3fb_info __maybe_unused *par = info->par; 1409 struct s3fb_info __maybe_unused *par = info->par;
@@ -1509,7 +1509,7 @@ static int s3_pci_resume(struct pci_dev* dev)
1509 1509
1510/* List of boards that we are trying to support */ 1510/* List of boards that we are trying to support */
1511 1511
1512static struct pci_device_id s3_devices[] __devinitdata = { 1512static struct pci_device_id s3_devices[] = {
1513 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO}, 1513 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO},
1514 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO}, 1514 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO},
1515 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP}, 1515 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP},
@@ -1537,7 +1537,7 @@ static struct pci_driver s3fb_pci_driver = {
1537 .name = "s3fb", 1537 .name = "s3fb",
1538 .id_table = s3_devices, 1538 .id_table = s3_devices,
1539 .probe = s3_pci_probe, 1539 .probe = s3_pci_probe,
1540 .remove = __devexit_p(s3_pci_remove), 1540 .remove = s3_pci_remove,
1541 .suspend = s3_pci_suspend, 1541 .suspend = s3_pci_suspend,
1542 .resume = s3_pci_resume, 1542 .resume = s3_pci_resume,
1543}; 1543};
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index b6325848ad61..cfbde5e85cbf 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -1090,7 +1090,7 @@ static int sa1100fb_resume(struct platform_device *dev)
1090 * cache. Once this area is remapped, all virtual memory 1090 * cache. Once this area is remapped, all virtual memory
1091 * access to the video memory should occur at the new region. 1091 * access to the video memory should occur at the new region.
1092 */ 1092 */
1093static int __devinit sa1100fb_map_video_memory(struct sa1100fb_info *fbi) 1093static int sa1100fb_map_video_memory(struct sa1100fb_info *fbi)
1094{ 1094{
1095 /* 1095 /*
1096 * We reserve one page for the palette, plus the size 1096 * We reserve one page for the palette, plus the size
@@ -1116,7 +1116,7 @@ static int __devinit sa1100fb_map_video_memory(struct sa1100fb_info *fbi)
1116} 1116}
1117 1117
1118/* Fake monspecs to fill in fbinfo structure */ 1118/* Fake monspecs to fill in fbinfo structure */
1119static struct fb_monspecs monspecs __devinitdata = { 1119static struct fb_monspecs monspecs = {
1120 .hfmin = 30000, 1120 .hfmin = 30000,
1121 .hfmax = 70000, 1121 .hfmax = 70000,
1122 .vfmin = 50, 1122 .vfmin = 50,
@@ -1124,7 +1124,7 @@ static struct fb_monspecs monspecs __devinitdata = {
1124}; 1124};
1125 1125
1126 1126
1127static struct sa1100fb_info * __devinit sa1100fb_init_fbinfo(struct device *dev) 1127static struct sa1100fb_info *sa1100fb_init_fbinfo(struct device *dev)
1128{ 1128{
1129 struct sa1100fb_mach_info *inf = dev->platform_data; 1129 struct sa1100fb_mach_info *inf = dev->platform_data;
1130 struct sa1100fb_info *fbi; 1130 struct sa1100fb_info *fbi;
@@ -1205,7 +1205,7 @@ static struct sa1100fb_info * __devinit sa1100fb_init_fbinfo(struct device *dev)
1205 return fbi; 1205 return fbi;
1206} 1206}
1207 1207
1208static int __devinit sa1100fb_probe(struct platform_device *pdev) 1208static int sa1100fb_probe(struct platform_device *pdev)
1209{ 1209{
1210 struct sa1100fb_info *fbi; 1210 struct sa1100fb_info *fbi;
1211 struct resource *res; 1211 struct resource *res;
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index f4f53b082d05..741b2395d01e 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -69,7 +69,7 @@
69/* --------------------------------------------------------------------- */ 69/* --------------------------------------------------------------------- */
70 70
71 71
72static char *mode_option __devinitdata = NULL; 72static char *mode_option = NULL;
73 73
74#ifdef MODULE 74#ifdef MODULE
75 75
@@ -1664,7 +1664,7 @@ static struct fb_ops savagefb_ops = {
1664 1664
1665/* --------------------------------------------------------------------- */ 1665/* --------------------------------------------------------------------- */
1666 1666
1667static struct fb_var_screeninfo __devinitdata savagefb_var800x600x8 = { 1667static struct fb_var_screeninfo savagefb_var800x600x8 = {
1668 .accel_flags = FB_ACCELF_TEXT, 1668 .accel_flags = FB_ACCELF_TEXT,
1669 .xres = 800, 1669 .xres = 800,
1670 .yres = 600, 1670 .yres = 600,
@@ -1715,7 +1715,7 @@ static void savage_disable_mmio(struct savagefb_par *par)
1715} 1715}
1716 1716
1717 1717
1718static int __devinit savage_map_mmio(struct fb_info *info) 1718static int savage_map_mmio(struct fb_info *info)
1719{ 1719{
1720 struct savagefb_par *par = info->par; 1720 struct savagefb_par *par = info->par;
1721 DBG("savage_map_mmio"); 1721 DBG("savage_map_mmio");
@@ -1761,8 +1761,7 @@ static void savage_unmap_mmio(struct fb_info *info)
1761 } 1761 }
1762} 1762}
1763 1763
1764static int __devinit savage_map_video(struct fb_info *info, 1764static int savage_map_video(struct fb_info *info, int video_len)
1765 int video_len)
1766{ 1765{
1767 struct savagefb_par *par = info->par; 1766 struct savagefb_par *par = info->par;
1768 int resource; 1767 int resource;
@@ -2052,9 +2051,8 @@ static int savage_init_hw(struct savagefb_par *par)
2052 return videoRambytes; 2051 return videoRambytes;
2053} 2052}
2054 2053
2055static int __devinit savage_init_fb_info(struct fb_info *info, 2054static int savage_init_fb_info(struct fb_info *info, struct pci_dev *dev,
2056 struct pci_dev *dev, 2055 const struct pci_device_id *id)
2057 const struct pci_device_id *id)
2058{ 2056{
2059 struct savagefb_par *par = info->par; 2057 struct savagefb_par *par = info->par;
2060 int err = 0; 2058 int err = 0;
@@ -2178,8 +2176,7 @@ static int __devinit savage_init_fb_info(struct fb_info *info,
2178 2176
2179/* --------------------------------------------------------------------- */ 2177/* --------------------------------------------------------------------- */
2180 2178
2181static int __devinit savagefb_probe(struct pci_dev* dev, 2179static int savagefb_probe(struct pci_dev *dev, const struct pci_device_id *id)
2182 const struct pci_device_id* id)
2183{ 2180{
2184 struct fb_info *info; 2181 struct fb_info *info;
2185 struct savagefb_par *par; 2182 struct savagefb_par *par;
@@ -2340,7 +2337,7 @@ static int __devinit savagefb_probe(struct pci_dev* dev,
2340 return err; 2337 return err;
2341} 2338}
2342 2339
2343static void __devexit savagefb_remove(struct pci_dev *dev) 2340static void savagefb_remove(struct pci_dev *dev)
2344{ 2341{
2345 struct fb_info *info = pci_get_drvdata(dev); 2342 struct fb_info *info = pci_get_drvdata(dev);
2346 2343
@@ -2449,7 +2446,7 @@ static int savagefb_resume(struct pci_dev* dev)
2449} 2446}
2450 2447
2451 2448
2452static struct pci_device_id savagefb_devices[] __devinitdata = { 2449static struct pci_device_id savagefb_devices[] = {
2453 {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128, 2450 {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128,
2454 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE}, 2451 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
2455 2452
@@ -2530,7 +2527,7 @@ static struct pci_driver savagefb_driver = {
2530 .probe = savagefb_probe, 2527 .probe = savagefb_probe,
2531 .suspend = savagefb_suspend, 2528 .suspend = savagefb_suspend,
2532 .resume = savagefb_resume, 2529 .resume = savagefb_resume,
2533 .remove = __devexit_p(savagefb_remove) 2530 .remove = savagefb_remove,
2534}; 2531};
2535 2532
2536/* **************************** exit-time only **************************** */ 2533/* **************************** exit-time only **************************** */
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
index 53455f295510..2331fadc272b 100644
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -47,7 +47,7 @@ static int ywrap = 0;
47 47
48static int flatpanel_id = -1; 48static int flatpanel_id = -1;
49 49
50static struct fb_fix_screeninfo sgivwfb_fix __devinitdata = { 50static struct fb_fix_screeninfo sgivwfb_fix = {
51 .id = "SGI Vis WS FB", 51 .id = "SGI Vis WS FB",
52 .type = FB_TYPE_PACKED_PIXELS, 52 .type = FB_TYPE_PACKED_PIXELS,
53 .visual = FB_VISUAL_PSEUDOCOLOR, 53 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -57,7 +57,7 @@ static struct fb_fix_screeninfo sgivwfb_fix __devinitdata = {
57 .line_length = 640, 57 .line_length = 640,
58}; 58};
59 59
60static struct fb_var_screeninfo sgivwfb_var __devinitdata = { 60static struct fb_var_screeninfo sgivwfb_var = {
61 /* 640x480, 8 bpp */ 61 /* 640x480, 8 bpp */
62 .xres = 640, 62 .xres = 640,
63 .yres = 480, 63 .yres = 480,
@@ -79,7 +79,7 @@ static struct fb_var_screeninfo sgivwfb_var __devinitdata = {
79 .vmode = FB_VMODE_NONINTERLACED 79 .vmode = FB_VMODE_NONINTERLACED
80}; 80};
81 81
82static struct fb_var_screeninfo sgivwfb_var1600sw __devinitdata = { 82static struct fb_var_screeninfo sgivwfb_var1600sw = {
83 /* 1600x1024, 8 bpp */ 83 /* 1600x1024, 8 bpp */
84 .xres = 1600, 84 .xres = 1600,
85 .yres = 1024, 85 .yres = 1024,
@@ -745,7 +745,7 @@ int __init sgivwfb_setup(char *options)
745/* 745/*
746 * Initialisation 746 * Initialisation
747 */ 747 */
748static int __devinit sgivwfb_probe(struct platform_device *dev) 748static int sgivwfb_probe(struct platform_device *dev)
749{ 749{
750 struct sgivw_par *par; 750 struct sgivw_par *par;
751 struct fb_info *info; 751 struct fb_info *info;
@@ -825,7 +825,7 @@ fail_ioremap_regs:
825 return -ENXIO; 825 return -ENXIO;
826} 826}
827 827
828static int __devexit sgivwfb_remove(struct platform_device *dev) 828static int sgivwfb_remove(struct platform_device *dev)
829{ 829{
830 struct fb_info *info = platform_get_drvdata(dev); 830 struct fb_info *info = platform_get_drvdata(dev);
831 831
@@ -845,7 +845,7 @@ static int __devexit sgivwfb_remove(struct platform_device *dev)
845 845
846static struct platform_driver sgivwfb_driver = { 846static struct platform_driver sgivwfb_driver = {
847 .probe = sgivwfb_probe, 847 .probe = sgivwfb_probe,
848 .remove = __devexit_p(sgivwfb_remove), 848 .remove = sgivwfb_remove,
849 .driver = { 849 .driver = {
850 .name = "sgivwfb", 850 .name = "sgivwfb",
851 }, 851 },
diff --git a/drivers/video/sh7760fb.c b/drivers/video/sh7760fb.c
index 83b16e237a0e..5fbb0c7ab0c8 100644
--- a/drivers/video/sh7760fb.c
+++ b/drivers/video/sh7760fb.c
@@ -431,7 +431,7 @@ static int sh7760fb_alloc_mem(struct fb_info *info)
431 return 0; 431 return 0;
432} 432}
433 433
434static int __devinit sh7760fb_probe(struct platform_device *pdev) 434static int sh7760fb_probe(struct platform_device *pdev)
435{ 435{
436 struct fb_info *info; 436 struct fb_info *info;
437 struct resource *res; 437 struct resource *res;
@@ -557,7 +557,7 @@ out_fb:
557 return ret; 557 return ret;
558} 558}
559 559
560static int __devexit sh7760fb_remove(struct platform_device *dev) 560static int sh7760fb_remove(struct platform_device *dev)
561{ 561{
562 struct fb_info *info = platform_get_drvdata(dev); 562 struct fb_info *info = platform_get_drvdata(dev);
563 struct sh7760fb_par *par = info->par; 563 struct sh7760fb_par *par = info->par;
@@ -582,7 +582,7 @@ static struct platform_driver sh7760_lcdc_driver = {
582 .owner = THIS_MODULE, 582 .owner = THIS_MODULE,
583 }, 583 },
584 .probe = sh7760fb_probe, 584 .probe = sh7760fb_probe,
585 .remove = __devexit_p(sh7760fb_remove), 585 .remove = sh7760fb_remove,
586}; 586};
587 587
588module_platform_driver(sh7760_lcdc_driver); 588module_platform_driver(sh7760_lcdc_driver);
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c
index f4962292792c..701b461cf8a9 100644
--- a/drivers/video/sh_mipi_dsi.c
+++ b/drivers/video/sh_mipi_dsi.c
@@ -533,7 +533,7 @@ efindslot:
533 return ret; 533 return ret;
534} 534}
535 535
536static int __devexit sh_mipi_remove(struct platform_device *pdev) 536static int sh_mipi_remove(struct platform_device *pdev)
537{ 537{
538 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 538 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
539 struct resource *res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1); 539 struct resource *res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -574,7 +574,7 @@ static int __devexit sh_mipi_remove(struct platform_device *pdev)
574} 574}
575 575
576static struct platform_driver sh_mipi_driver = { 576static struct platform_driver sh_mipi_driver = {
577 .remove = __devexit_p(sh_mipi_remove), 577 .remove = sh_mipi_remove,
578 .shutdown = sh_mipi_shutdown, 578 .shutdown = sh_mipi_shutdown,
579 .driver = { 579 .driver = {
580 .name = "sh-mipi-dsi", 580 .name = "sh-mipi-dsi",
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index e78fe4bc1524..63203acef812 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1649,7 +1649,7 @@ sh_mobile_lcdc_overlay_fb_unregister(struct sh_mobile_lcdc_overlay *ovl)
1649 unregister_framebuffer(ovl->info); 1649 unregister_framebuffer(ovl->info);
1650} 1650}
1651 1651
1652static int __devinit 1652static int
1653sh_mobile_lcdc_overlay_fb_register(struct sh_mobile_lcdc_overlay *ovl) 1653sh_mobile_lcdc_overlay_fb_register(struct sh_mobile_lcdc_overlay *ovl)
1654{ 1654{
1655 struct sh_mobile_lcdc_priv *lcdc = ovl->channel->lcdc; 1655 struct sh_mobile_lcdc_priv *lcdc = ovl->channel->lcdc;
@@ -1688,7 +1688,7 @@ sh_mobile_lcdc_overlay_fb_cleanup(struct sh_mobile_lcdc_overlay *ovl)
1688 framebuffer_release(info); 1688 framebuffer_release(info);
1689} 1689}
1690 1690
1691static int __devinit 1691static int
1692sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl) 1692sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
1693{ 1693{
1694 struct sh_mobile_lcdc_priv *priv = ovl->channel->lcdc; 1694 struct sh_mobile_lcdc_priv *priv = ovl->channel->lcdc;
@@ -2137,7 +2137,7 @@ sh_mobile_lcdc_channel_fb_unregister(struct sh_mobile_lcdc_chan *ch)
2137 unregister_framebuffer(ch->info); 2137 unregister_framebuffer(ch->info);
2138} 2138}
2139 2139
2140static int __devinit 2140static int
2141sh_mobile_lcdc_channel_fb_register(struct sh_mobile_lcdc_chan *ch) 2141sh_mobile_lcdc_channel_fb_register(struct sh_mobile_lcdc_chan *ch)
2142{ 2142{
2143 struct fb_info *info = ch->info; 2143 struct fb_info *info = ch->info;
@@ -2185,7 +2185,7 @@ sh_mobile_lcdc_channel_fb_cleanup(struct sh_mobile_lcdc_chan *ch)
2185 framebuffer_release(info); 2185 framebuffer_release(info);
2186} 2186}
2187 2187
2188static int __devinit 2188static int
2189sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, 2189sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
2190 const struct fb_videomode *modes, 2190 const struct fb_videomode *modes,
2191 unsigned int num_modes) 2191 unsigned int num_modes)
@@ -2417,7 +2417,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb,
2417 * Probe/remove and driver init/exit 2417 * Probe/remove and driver init/exit
2418 */ 2418 */
2419 2419
2420static const struct fb_videomode default_720p __devinitconst = { 2420static const struct fb_videomode default_720p = {
2421 .name = "HDMI 720p", 2421 .name = "HDMI 720p",
2422 .xres = 1280, 2422 .xres = 1280,
2423 .yres = 720, 2423 .yres = 720,
@@ -2496,7 +2496,7 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
2496 return 0; 2496 return 0;
2497} 2497}
2498 2498
2499static int __devinit sh_mobile_lcdc_check_interface(struct sh_mobile_lcdc_chan *ch) 2499static int sh_mobile_lcdc_check_interface(struct sh_mobile_lcdc_chan *ch)
2500{ 2500{
2501 int interface_type = ch->cfg->interface_type; 2501 int interface_type = ch->cfg->interface_type;
2502 2502
@@ -2536,7 +2536,7 @@ static int __devinit sh_mobile_lcdc_check_interface(struct sh_mobile_lcdc_chan *
2536 return 0; 2536 return 0;
2537} 2537}
2538 2538
2539static int __devinit 2539static int
2540sh_mobile_lcdc_overlay_init(struct sh_mobile_lcdc_overlay *ovl) 2540sh_mobile_lcdc_overlay_init(struct sh_mobile_lcdc_overlay *ovl)
2541{ 2541{
2542 const struct sh_mobile_lcdc_format_info *format; 2542 const struct sh_mobile_lcdc_format_info *format;
@@ -2591,7 +2591,7 @@ sh_mobile_lcdc_overlay_init(struct sh_mobile_lcdc_overlay *ovl)
2591 return 0; 2591 return 0;
2592} 2592}
2593 2593
2594static int __devinit 2594static int
2595sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch) 2595sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch)
2596{ 2596{
2597 const struct sh_mobile_lcdc_format_info *format; 2597 const struct sh_mobile_lcdc_format_info *format;
@@ -2695,7 +2695,7 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch)
2695 return sh_mobile_lcdc_channel_fb_init(ch, mode, num_modes); 2695 return sh_mobile_lcdc_channel_fb_init(ch, mode, num_modes);
2696} 2696}
2697 2697
2698static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) 2698static int sh_mobile_lcdc_probe(struct platform_device *pdev)
2699{ 2699{
2700 struct sh_mobile_lcdc_info *pdata = pdev->dev.platform_data; 2700 struct sh_mobile_lcdc_info *pdata = pdev->dev.platform_data;
2701 struct sh_mobile_lcdc_priv *priv; 2701 struct sh_mobile_lcdc_priv *priv;
diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c
index 7a0ba8bb3fbe..e0f098562a74 100644
--- a/drivers/video/sh_mobile_meram.c
+++ b/drivers/video/sh_mobile_meram.c
@@ -620,7 +620,7 @@ static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops,
620 * Probe/remove and driver init/exit 620 * Probe/remove and driver init/exit
621 */ 621 */
622 622
623static int __devinit sh_mobile_meram_probe(struct platform_device *pdev) 623static int sh_mobile_meram_probe(struct platform_device *pdev)
624{ 624{
625 struct sh_mobile_meram_priv *priv; 625 struct sh_mobile_meram_priv *priv;
626 struct sh_mobile_meram_info *pdata = pdev->dev.platform_data; 626 struct sh_mobile_meram_info *pdata = pdev->dev.platform_data;
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index a7a48db64ce2..977e27927a21 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -106,8 +106,7 @@ sisfb_setdefaultparms(void)
106 106
107/* ------------- Parameter parsing -------------- */ 107/* ------------- Parameter parsing -------------- */
108 108
109static void __devinit 109static void sisfb_search_vesamode(unsigned int vesamode, bool quiet)
110sisfb_search_vesamode(unsigned int vesamode, bool quiet)
111{ 110{
112 int i = 0, j = 0; 111 int i = 0, j = 0;
113 112
@@ -146,8 +145,7 @@ sisfb_search_vesamode(unsigned int vesamode, bool quiet)
146 printk(KERN_ERR "sisfb: Invalid VESA mode 0x%x'\n", vesamode); 145 printk(KERN_ERR "sisfb: Invalid VESA mode 0x%x'\n", vesamode);
147} 146}
148 147
149static void __devinit 148static void sisfb_search_mode(char *name, bool quiet)
150sisfb_search_mode(char *name, bool quiet)
151{ 149{
152 unsigned int j = 0, xres = 0, yres = 0, depth = 0, rate = 0; 150 unsigned int j = 0, xres = 0, yres = 0, depth = 0, rate = 0;
153 int i = 0; 151 int i = 0;
@@ -225,8 +223,7 @@ sisfb_search_mode(char *name, bool quiet)
225} 223}
226 224
227#ifndef MODULE 225#ifndef MODULE
228static void __devinit 226static void sisfb_get_vga_mode_from_kernel(void)
229sisfb_get_vga_mode_from_kernel(void)
230{ 227{
231#ifdef CONFIG_X86 228#ifdef CONFIG_X86
232 char mymode[32]; 229 char mymode[32];
@@ -345,8 +342,7 @@ sisfb_search_specialtiming(const char *name)
345 342
346/* ----------- Various detection routines ----------- */ 343/* ----------- Various detection routines ----------- */
347 344
348static void __devinit 345static void sisfb_detect_custom_timing(struct sis_video_info *ivideo)
349sisfb_detect_custom_timing(struct sis_video_info *ivideo)
350{ 346{
351 unsigned char *biosver = NULL; 347 unsigned char *biosver = NULL;
352 unsigned char *biosdate = NULL; 348 unsigned char *biosdate = NULL;
@@ -403,8 +399,7 @@ sisfb_detect_custom_timing(struct sis_video_info *ivideo)
403 } while(mycustomttable[i].chipID); 399 } while(mycustomttable[i].chipID);
404} 400}
405 401
406static bool __devinit 402static bool sisfb_interpret_edid(struct sisfb_monitor *monitor, u8 *buffer)
407sisfb_interpret_edid(struct sisfb_monitor *monitor, u8 *buffer)
408{ 403{
409 int i, j, xres, yres, refresh, index; 404 int i, j, xres, yres, refresh, index;
410 u32 emodes; 405 u32 emodes;
@@ -505,8 +500,8 @@ sisfb_interpret_edid(struct sisfb_monitor *monitor, u8 *buffer)
505 return monitor->datavalid; 500 return monitor->datavalid;
506} 501}
507 502
508static void __devinit 503static void sisfb_handle_ddc(struct sis_video_info *ivideo,
509sisfb_handle_ddc(struct sis_video_info *ivideo, struct sisfb_monitor *monitor, int crtno) 504 struct sisfb_monitor *monitor, int crtno)
510{ 505{
511 unsigned short temp, i, realcrtno = crtno; 506 unsigned short temp, i, realcrtno = crtno;
512 unsigned char buffer[256]; 507 unsigned char buffer[256];
@@ -1898,8 +1893,7 @@ static struct fb_ops sisfb_ops = {
1898 1893
1899/* ---------------- Chip generation dependent routines ---------------- */ 1894/* ---------------- Chip generation dependent routines ---------------- */
1900 1895
1901static struct pci_dev * __devinit 1896static struct pci_dev *sisfb_get_northbridge(int basechipid)
1902sisfb_get_northbridge(int basechipid)
1903{ 1897{
1904 struct pci_dev *pdev = NULL; 1898 struct pci_dev *pdev = NULL;
1905 int nbridgenum, nbridgeidx, i; 1899 int nbridgenum, nbridgeidx, i;
@@ -1938,8 +1932,7 @@ sisfb_get_northbridge(int basechipid)
1938 return pdev; 1932 return pdev;
1939} 1933}
1940 1934
1941static int __devinit 1935static int sisfb_get_dram_size(struct sis_video_info *ivideo)
1942sisfb_get_dram_size(struct sis_video_info *ivideo)
1943{ 1936{
1944#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 1937#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
1945 u8 reg; 1938 u8 reg;
@@ -2038,8 +2031,7 @@ sisfb_get_dram_size(struct sis_video_info *ivideo)
2038 2031
2039/* -------------- video bridge device detection --------------- */ 2032/* -------------- video bridge device detection --------------- */
2040 2033
2041static void __devinit 2034static void sisfb_detect_VB_connect(struct sis_video_info *ivideo)
2042sisfb_detect_VB_connect(struct sis_video_info *ivideo)
2043{ 2035{
2044 u8 cr32, temp; 2036 u8 cr32, temp;
2045 2037
@@ -2164,8 +2156,7 @@ sisfb_detect_VB_connect(struct sis_video_info *ivideo)
2164 2156
2165/* ------------------ Sensing routines ------------------ */ 2157/* ------------------ Sensing routines ------------------ */
2166 2158
2167static bool __devinit 2159static bool sisfb_test_DDC1(struct sis_video_info *ivideo)
2168sisfb_test_DDC1(struct sis_video_info *ivideo)
2169{ 2160{
2170 unsigned short old; 2161 unsigned short old;
2171 int count = 48; 2162 int count = 48;
@@ -2177,8 +2168,7 @@ sisfb_test_DDC1(struct sis_video_info *ivideo)
2177 return (count != -1); 2168 return (count != -1);
2178} 2169}
2179 2170
2180static void __devinit 2171static void sisfb_sense_crt1(struct sis_video_info *ivideo)
2181sisfb_sense_crt1(struct sis_video_info *ivideo)
2182{ 2172{
2183 bool mustwait = false; 2173 bool mustwait = false;
2184 u8 sr1F, cr17; 2174 u8 sr1F, cr17;
@@ -2259,8 +2249,7 @@ sisfb_sense_crt1(struct sis_video_info *ivideo)
2259} 2249}
2260 2250
2261/* Determine and detect attached devices on SiS30x */ 2251/* Determine and detect attached devices on SiS30x */
2262static void __devinit 2252static void SiS_SenseLCD(struct sis_video_info *ivideo)
2263SiS_SenseLCD(struct sis_video_info *ivideo)
2264{ 2253{
2265 unsigned char buffer[256]; 2254 unsigned char buffer[256];
2266 unsigned short temp, realcrtno, i; 2255 unsigned short temp, realcrtno, i;
@@ -2347,8 +2336,7 @@ SiS_SenseLCD(struct sis_video_info *ivideo)
2347 ivideo->SiS_Pr.PanelSelfDetected = true; 2336 ivideo->SiS_Pr.PanelSelfDetected = true;
2348} 2337}
2349 2338
2350static int __devinit 2339static int SISDoSense(struct sis_video_info *ivideo, u16 type, u16 test)
2351SISDoSense(struct sis_video_info *ivideo, u16 type, u16 test)
2352{ 2340{
2353 int temp, mytest, result, i, j; 2341 int temp, mytest, result, i, j;
2354 2342
@@ -2377,8 +2365,7 @@ SISDoSense(struct sis_video_info *ivideo, u16 type, u16 test)
2377 return result; 2365 return result;
2378} 2366}
2379 2367
2380static void __devinit 2368static void SiS_Sense30x(struct sis_video_info *ivideo)
2381SiS_Sense30x(struct sis_video_info *ivideo)
2382{ 2369{
2383 u8 backupP4_0d,backupP2_00,backupP2_4d,backupSR_1e,biosflag=0; 2370 u8 backupP4_0d,backupP2_00,backupP2_4d,backupSR_1e,biosflag=0;
2384 u16 svhs=0, svhs_c=0; 2371 u16 svhs=0, svhs_c=0;
@@ -2518,8 +2505,7 @@ SiS_Sense30x(struct sis_video_info *ivideo)
2518} 2505}
2519 2506
2520/* Determine and detect attached TV's on Chrontel */ 2507/* Determine and detect attached TV's on Chrontel */
2521static void __devinit 2508static void SiS_SenseCh(struct sis_video_info *ivideo)
2522SiS_SenseCh(struct sis_video_info *ivideo)
2523{ 2509{
2524#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 2510#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
2525 u8 temp1, temp2; 2511 u8 temp1, temp2;
@@ -2643,8 +2629,7 @@ SiS_SenseCh(struct sis_video_info *ivideo)
2643 } 2629 }
2644} 2630}
2645 2631
2646static void __devinit 2632static void sisfb_get_VB_type(struct sis_video_info *ivideo)
2647sisfb_get_VB_type(struct sis_video_info *ivideo)
2648{ 2633{
2649 char stdstr[] = "sisfb: Detected"; 2634 char stdstr[] = "sisfb: Detected";
2650 char bridgestr[] = "video bridge"; 2635 char bridgestr[] = "video bridge";
@@ -2906,8 +2891,7 @@ sisfb_engine_init(struct sis_video_info *ivideo)
2906 ivideo->engineok = 1; 2891 ivideo->engineok = 1;
2907} 2892}
2908 2893
2909static void __devinit 2894static void sisfb_detect_lcd_type(struct sis_video_info *ivideo)
2910sisfb_detect_lcd_type(struct sis_video_info *ivideo)
2911{ 2895{
2912 u8 reg; 2896 u8 reg;
2913 int i; 2897 int i;
@@ -2962,8 +2946,7 @@ sisfb_detect_lcd_type(struct sis_video_info *ivideo)
2962 ivideo->lcdxres, ivideo->lcdyres); 2946 ivideo->lcdxres, ivideo->lcdyres);
2963} 2947}
2964 2948
2965static void __devinit 2949static void sisfb_save_pdc_emi(struct sis_video_info *ivideo)
2966sisfb_save_pdc_emi(struct sis_video_info *ivideo)
2967{ 2950{
2968#ifdef CONFIG_FB_SIS_300 2951#ifdef CONFIG_FB_SIS_300
2969 /* Save the current PanelDelayCompensation if the LCD is currently used */ 2952 /* Save the current PanelDelayCompensation if the LCD is currently used */
@@ -3081,8 +3064,7 @@ sisfb_save_pdc_emi(struct sis_video_info *ivideo)
3081 3064
3082/* -------------------- Memory manager routines ---------------------- */ 3065/* -------------------- Memory manager routines ---------------------- */
3083 3066
3084static u32 __devinit 3067static u32 sisfb_getheapstart(struct sis_video_info *ivideo)
3085sisfb_getheapstart(struct sis_video_info *ivideo)
3086{ 3068{
3087 u32 ret = ivideo->sisfb_parm_mem * 1024; 3069 u32 ret = ivideo->sisfb_parm_mem * 1024;
3088 u32 maxoffs = ivideo->video_size - ivideo->hwcursor_size - ivideo->cmdQueueSize; 3070 u32 maxoffs = ivideo->video_size - ivideo->hwcursor_size - ivideo->cmdQueueSize;
@@ -3128,8 +3110,7 @@ sisfb_getheapstart(struct sis_video_info *ivideo)
3128 return ret; 3110 return ret;
3129} 3111}
3130 3112
3131static u32 __devinit 3113static u32 sisfb_getheapsize(struct sis_video_info *ivideo)
3132sisfb_getheapsize(struct sis_video_info *ivideo)
3133{ 3114{
3134 u32 max = ivideo->video_size - ivideo->hwcursor_size - ivideo->cmdQueueSize; 3115 u32 max = ivideo->video_size - ivideo->hwcursor_size - ivideo->cmdQueueSize;
3135 u32 ret = 0; 3116 u32 ret = 0;
@@ -3154,8 +3135,7 @@ sisfb_getheapsize(struct sis_video_info *ivideo)
3154 return ret; 3135 return ret;
3155} 3136}
3156 3137
3157static int __devinit 3138static int sisfb_heap_init(struct sis_video_info *ivideo)
3158sisfb_heap_init(struct sis_video_info *ivideo)
3159{ 3139{
3160 struct SIS_OH *poh; 3140 struct SIS_OH *poh;
3161 3141
@@ -4061,8 +4041,8 @@ static int __init sisfb_setup(char *options)
4061} 4041}
4062#endif 4042#endif
4063 4043
4064static int __devinit 4044static int sisfb_check_rom(void __iomem *rom_base,
4065sisfb_check_rom(void __iomem *rom_base, struct sis_video_info *ivideo) 4045 struct sis_video_info *ivideo)
4066{ 4046{
4067 void __iomem *rom; 4047 void __iomem *rom;
4068 int romptr; 4048 int romptr;
@@ -4089,8 +4069,7 @@ sisfb_check_rom(void __iomem *rom_base, struct sis_video_info *ivideo)
4089 return 1; 4069 return 1;
4090} 4070}
4091 4071
4092static unsigned char * __devinit 4072static unsigned char *sisfb_find_rom(struct pci_dev *pdev)
4093sisfb_find_rom(struct pci_dev *pdev)
4094{ 4073{
4095 struct sis_video_info *ivideo = pci_get_drvdata(pdev); 4074 struct sis_video_info *ivideo = pci_get_drvdata(pdev);
4096 void __iomem *rom_base; 4075 void __iomem *rom_base;
@@ -4149,9 +4128,8 @@ sisfb_find_rom(struct pci_dev *pdev)
4149 return myrombase; 4128 return myrombase;
4150} 4129}
4151 4130
4152static void __devinit 4131static void sisfb_post_map_vram(struct sis_video_info *ivideo,
4153sisfb_post_map_vram(struct sis_video_info *ivideo, unsigned int *mapsize, 4132 unsigned int *mapsize, unsigned int min)
4154 unsigned int min)
4155{ 4133{
4156 if (*mapsize < (min << 20)) 4134 if (*mapsize < (min << 20))
4157 return; 4135 return;
@@ -4176,8 +4154,7 @@ sisfb_post_map_vram(struct sis_video_info *ivideo, unsigned int *mapsize,
4176} 4154}
4177 4155
4178#ifdef CONFIG_FB_SIS_300 4156#ifdef CONFIG_FB_SIS_300
4179static int __devinit 4157static int sisfb_post_300_buswidth(struct sis_video_info *ivideo)
4180sisfb_post_300_buswidth(struct sis_video_info *ivideo)
4181{ 4158{
4182 void __iomem *FBAddress = ivideo->video_vbase; 4159 void __iomem *FBAddress = ivideo->video_vbase;
4183 unsigned short temp; 4160 unsigned short temp;
@@ -4222,7 +4199,7 @@ sisfb_post_300_buswidth(struct sis_video_info *ivideo)
4222 return 1; /* 32bit */ 4199 return 1; /* 32bit */
4223} 4200}
4224 4201
4225static const unsigned short __devinitconst SiS_DRAMType[17][5] = { 4202static const unsigned short SiS_DRAMType[17][5] = {
4226 {0x0C,0x0A,0x02,0x40,0x39}, 4203 {0x0C,0x0A,0x02,0x40,0x39},
4227 {0x0D,0x0A,0x01,0x40,0x48}, 4204 {0x0D,0x0A,0x01,0x40,0x48},
4228 {0x0C,0x09,0x02,0x20,0x35}, 4205 {0x0C,0x09,0x02,0x20,0x35},
@@ -4242,10 +4219,9 @@ static const unsigned short __devinitconst SiS_DRAMType[17][5] = {
4242 {0x09,0x08,0x01,0x01,0x00} 4219 {0x09,0x08,0x01,0x01,0x00}
4243}; 4220};
4244 4221
4245static int __devinit 4222static int sisfb_post_300_rwtest(struct sis_video_info *ivideo, int iteration,
4246sisfb_post_300_rwtest(struct sis_video_info *ivideo, int iteration, int buswidth, 4223 int buswidth, int PseudoRankCapacity,
4247 int PseudoRankCapacity, int PseudoAdrPinCount, 4224 int PseudoAdrPinCount, unsigned int mapsize)
4248 unsigned int mapsize)
4249{ 4225{
4250 void __iomem *FBAddr = ivideo->video_vbase; 4226 void __iomem *FBAddr = ivideo->video_vbase;
4251 unsigned short sr14; 4227 unsigned short sr14;
@@ -4309,8 +4285,7 @@ sisfb_post_300_rwtest(struct sis_video_info *ivideo, int iteration, int buswidth
4309 return 0; 4285 return 0;
4310} 4286}
4311 4287
4312static void __devinit 4288static void sisfb_post_300_ramsize(struct pci_dev *pdev, unsigned int mapsize)
4313sisfb_post_300_ramsize(struct pci_dev *pdev, unsigned int mapsize)
4314{ 4289{
4315 struct sis_video_info *ivideo = pci_get_drvdata(pdev); 4290 struct sis_video_info *ivideo = pci_get_drvdata(pdev);
4316 int i, j, buswidth; 4291 int i, j, buswidth;
@@ -4335,8 +4310,7 @@ sisfb_post_300_ramsize(struct pci_dev *pdev, unsigned int mapsize)
4335 } 4310 }
4336} 4311}
4337 4312
4338static void __devinit 4313static void sisfb_post_sis300(struct pci_dev *pdev)
4339sisfb_post_sis300(struct pci_dev *pdev)
4340{ 4314{
4341 struct sis_video_info *ivideo = pci_get_drvdata(pdev); 4315 struct sis_video_info *ivideo = pci_get_drvdata(pdev);
4342 unsigned char *bios = ivideo->SiS_Pr.VirtualRomBase; 4316 unsigned char *bios = ivideo->SiS_Pr.VirtualRomBase;
@@ -4547,8 +4521,7 @@ sisfb_post_sis300(struct pci_dev *pdev)
4547 4521
4548#ifdef CONFIG_FB_SIS_315 4522#ifdef CONFIG_FB_SIS_315
4549#if 0 4523#if 0
4550static void __devinit 4524static void sisfb_post_sis315330(struct pci_dev *pdev)
4551sisfb_post_sis315330(struct pci_dev *pdev)
4552{ 4525{
4553 /* TODO */ 4526 /* TODO */
4554} 4527}
@@ -4559,8 +4532,7 @@ static inline int sisfb_xgi_is21(struct sis_video_info *ivideo)
4559 return ivideo->chip_real_id == XGI_21; 4532 return ivideo->chip_real_id == XGI_21;
4560} 4533}
4561 4534
4562static void __devinit 4535static void sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay)
4563sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay)
4564{ 4536{
4565 unsigned int i; 4537 unsigned int i;
4566 u8 reg; 4538 u8 reg;
@@ -4571,9 +4543,9 @@ sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay)
4571 } 4543 }
4572} 4544}
4573 4545
4574static int __devinit 4546static int sisfb_find_host_bridge(struct sis_video_info *ivideo,
4575sisfb_find_host_bridge(struct sis_video_info *ivideo, struct pci_dev *mypdev, 4547 struct pci_dev *mypdev,
4576 unsigned short pcivendor) 4548 unsigned short pcivendor)
4577{ 4549{
4578 struct pci_dev *pdev = NULL; 4550 struct pci_dev *pdev = NULL;
4579 unsigned short temp; 4551 unsigned short temp;
@@ -4591,9 +4563,8 @@ sisfb_find_host_bridge(struct sis_video_info *ivideo, struct pci_dev *mypdev,
4591 return ret; 4563 return ret;
4592} 4564}
4593 4565
4594static int __devinit 4566static int sisfb_post_xgi_rwtest(struct sis_video_info *ivideo, int starta,
4595sisfb_post_xgi_rwtest(struct sis_video_info *ivideo, int starta, 4567 unsigned int enda, unsigned int mapsize)
4596 unsigned int enda, unsigned int mapsize)
4597{ 4568{
4598 unsigned int pos; 4569 unsigned int pos;
4599 int i; 4570 int i;
@@ -4623,8 +4594,7 @@ sisfb_post_xgi_rwtest(struct sis_video_info *ivideo, int starta,
4623 return 1; 4594 return 1;
4624} 4595}
4625 4596
4626static int __devinit 4597static int sisfb_post_xgi_ramsize(struct sis_video_info *ivideo)
4627sisfb_post_xgi_ramsize(struct sis_video_info *ivideo)
4628{ 4598{
4629 unsigned int buswidth, ranksize, channelab, mapsize; 4599 unsigned int buswidth, ranksize, channelab, mapsize;
4630 int i, j, k, l, status; 4600 int i, j, k, l, status;
@@ -4876,8 +4846,7 @@ bail_out:
4876 return status; 4846 return status;
4877} 4847}
4878 4848
4879static void __devinit 4849static void sisfb_post_xgi_setclocks(struct sis_video_info *ivideo, u8 regb)
4880sisfb_post_xgi_setclocks(struct sis_video_info *ivideo, u8 regb)
4881{ 4850{
4882 u8 v1, v2, v3; 4851 u8 v1, v2, v3;
4883 int index; 4852 int index;
@@ -4932,8 +4901,8 @@ sisfb_post_xgi_setclocks(struct sis_video_info *ivideo, u8 regb)
4932 sisfb_post_xgi_delay(ivideo, 0x43); 4901 sisfb_post_xgi_delay(ivideo, 0x43);
4933} 4902}
4934 4903
4935static void __devinit 4904static void sisfb_post_xgi_ddr2_mrs_default(struct sis_video_info *ivideo,
4936sisfb_post_xgi_ddr2_mrs_default(struct sis_video_info *ivideo, u8 regb) 4905 u8 regb)
4937{ 4906{
4938 unsigned char *bios = ivideo->bios_abase; 4907 unsigned char *bios = ivideo->bios_abase;
4939 u8 v1; 4908 u8 v1;
@@ -4973,8 +4942,7 @@ sisfb_post_xgi_ddr2_mrs_default(struct sis_video_info *ivideo, u8 regb)
4973 sisfb_post_xgi_delay(ivideo, 1); 4942 sisfb_post_xgi_delay(ivideo, 1);
4974} 4943}
4975 4944
4976static void __devinit 4945static void sisfb_post_xgi_ddr2_mrs_xg21(struct sis_video_info *ivideo)
4977sisfb_post_xgi_ddr2_mrs_xg21(struct sis_video_info *ivideo)
4978{ 4946{
4979 sisfb_post_xgi_setclocks(ivideo, 1); 4947 sisfb_post_xgi_setclocks(ivideo, 1);
4980 4948
@@ -5015,8 +4983,7 @@ sisfb_post_xgi_ddr2_mrs_xg21(struct sis_video_info *ivideo)
5015 sisfb_post_xgi_delay(ivideo, 1); 4983 sisfb_post_xgi_delay(ivideo, 1);
5016} 4984}
5017 4985
5018static void __devinit 4986static void sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb)
5019sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb)
5020{ 4987{
5021 unsigned char *bios = ivideo->bios_abase; 4988 unsigned char *bios = ivideo->bios_abase;
5022 static const u8 cs158[8] = { 4989 static const u8 cs158[8] = {
@@ -5061,8 +5028,7 @@ sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb)
5061 sisfb_post_xgi_ddr2_mrs_default(ivideo, regb); 5028 sisfb_post_xgi_ddr2_mrs_default(ivideo, regb);
5062} 5029}
5063 5030
5064static u8 __devinit 5031static u8 sisfb_post_xgi_ramtype(struct sis_video_info *ivideo)
5065sisfb_post_xgi_ramtype(struct sis_video_info *ivideo)
5066{ 5032{
5067 unsigned char *bios = ivideo->bios_abase; 5033 unsigned char *bios = ivideo->bios_abase;
5068 u8 ramtype; 5034 u8 ramtype;
@@ -5101,8 +5067,7 @@ sisfb_post_xgi_ramtype(struct sis_video_info *ivideo)
5101 return ramtype; 5067 return ramtype;
5102} 5068}
5103 5069
5104static int __devinit 5070static int sisfb_post_xgi(struct pci_dev *pdev)
5105sisfb_post_xgi(struct pci_dev *pdev)
5106{ 5071{
5107 struct sis_video_info *ivideo = pci_get_drvdata(pdev); 5072 struct sis_video_info *ivideo = pci_get_drvdata(pdev);
5108 unsigned char *bios = ivideo->bios_abase; 5073 unsigned char *bios = ivideo->bios_abase;
@@ -5839,8 +5804,7 @@ sisfb_post_xgi(struct pci_dev *pdev)
5839} 5804}
5840#endif 5805#endif
5841 5806
5842static int __devinit 5807static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
5843sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
5844{ 5808{
5845 struct sisfb_chip_info *chipinfo = &sisfb_chip_info[ent->driver_data]; 5809 struct sisfb_chip_info *chipinfo = &sisfb_chip_info[ent->driver_data];
5846 struct sis_video_info *ivideo = NULL; 5810 struct sis_video_info *ivideo = NULL;
@@ -6530,7 +6494,7 @@ error_3: vfree(ivideo->bios_abase);
6530/* PCI DEVICE HANDLING */ 6494/* PCI DEVICE HANDLING */
6531/*****************************************************/ 6495/*****************************************************/
6532 6496
6533static void __devexit sisfb_remove(struct pci_dev *pdev) 6497static void sisfb_remove(struct pci_dev *pdev)
6534{ 6498{
6535 struct sis_video_info *ivideo = pci_get_drvdata(pdev); 6499 struct sis_video_info *ivideo = pci_get_drvdata(pdev);
6536 struct fb_info *sis_fb_info = ivideo->memyselfandi; 6500 struct fb_info *sis_fb_info = ivideo->memyselfandi;
@@ -6591,7 +6555,7 @@ static struct pci_driver sisfb_driver = {
6591 .name = "sisfb", 6555 .name = "sisfb",
6592 .id_table = sisfb_pci_table, 6556 .id_table = sisfb_pci_table,
6593 .probe = sisfb_probe, 6557 .probe = sisfb_probe,
6594 .remove = __devexit_p(sisfb_remove) 6558 .remove = sisfb_remove,
6595}; 6559};
6596 6560
6597static int __init sisfb_init(void) 6561static int __init sisfb_init(void)
diff --git a/drivers/video/sis/sis_main.h b/drivers/video/sis/sis_main.h
index 9540e977270e..32e23c209430 100644
--- a/drivers/video/sis/sis_main.h
+++ b/drivers/video/sis/sis_main.h
@@ -98,7 +98,7 @@ static struct sisfb_chip_info {
98 int hwcursor_size; 98 int hwcursor_size;
99 int CRT2_write_enable; 99 int CRT2_write_enable;
100 const char *chip_name; 100 const char *chip_name;
101} sisfb_chip_info[] __devinitdata = { 101} sisfb_chip_info[] = {
102 { SIS_300, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 300/305" }, 102 { SIS_300, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 300/305" },
103 { SIS_540, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 540" }, 103 { SIS_540, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 540" },
104 { SIS_630, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 630" }, 104 { SIS_630, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 630" },
@@ -113,7 +113,7 @@ static struct sisfb_chip_info {
113 { XGI_40, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "XGI V3XT/V5/V8" }, 113 { XGI_40, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "XGI V3XT/V5/V8" },
114}; 114};
115 115
116static struct pci_device_id __devinitdata sisfb_pci_table[] = { 116static struct pci_device_id sisfb_pci_table[] = {
117#ifdef CONFIG_FB_SIS_300 117#ifdef CONFIG_FB_SIS_300
118 { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 118 { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
119 { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 119 { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
@@ -317,7 +317,7 @@ static struct _sis_lcd_data {
317 u16 xres; 317 u16 xres;
318 u16 yres; 318 u16 yres;
319 u8 default_mode_idx; 319 u8 default_mode_idx;
320} sis_lcd_data[] __devinitdata = { 320} sis_lcd_data[] = {
321 { LCD_640x480, 640, 480, 23 }, 321 { LCD_640x480, 640, 480, 23 },
322 { LCD_800x600, 800, 600, 43 }, 322 { LCD_800x600, 800, 600, 43 },
323 { LCD_1024x600, 1024, 600, 67 }, 323 { LCD_1024x600, 1024, 600, 67 },
@@ -339,21 +339,21 @@ static struct _sis_lcd_data {
339}; 339};
340 340
341/* CR36 evaluation */ 341/* CR36 evaluation */
342static unsigned short sis300paneltype[] __devinitdata = { 342static unsigned short sis300paneltype[] = {
343 LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, 343 LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
344 LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768, 344 LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768,
345 LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, 345 LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN,
346 LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN 346 LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN
347}; 347};
348 348
349static unsigned short sis310paneltype[] __devinitdata = { 349static unsigned short sis310paneltype[] = {
350 LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, 350 LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
351 LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, 351 LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960,
352 LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, 352 LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200,
353 LCD_320x240_2, LCD_320x240_3, LCD_UNKNOWN, LCD_UNKNOWN 353 LCD_320x240_2, LCD_320x240_3, LCD_UNKNOWN, LCD_UNKNOWN
354}; 354};
355 355
356static unsigned short sis661paneltype[] __devinitdata = { 356static unsigned short sis661paneltype[] = {
357 LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, 357 LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
358 LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, 358 LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960,
359 LCD_1280x854, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, 359 LCD_1280x854, LCD_1400x1050, LCD_1280x768, LCD_1600x1200,
@@ -466,7 +466,7 @@ static struct _sisfbddcsmodes {
466 u16 h; 466 u16 h;
467 u16 v; 467 u16 v;
468 u32 d; 468 u32 d;
469} sisfb_ddcsmodes[] __devinitdata = { 469} sisfb_ddcsmodes[] = {
470 { 0x10000, 67, 75, 108000}, 470 { 0x10000, 67, 75, 108000},
471 { 0x08000, 48, 72, 50000}, 471 { 0x08000, 48, 72, 50000},
472 { 0x04000, 46, 75, 49500}, 472 { 0x04000, 46, 75, 49500},
@@ -488,7 +488,7 @@ static struct _sisfbddcfmodes {
488 u16 v; 488 u16 v;
489 u16 h; 489 u16 h;
490 u32 d; 490 u32 d;
491} sisfb_ddcfmodes[] __devinitdata = { 491} sisfb_ddcfmodes[] = {
492 { 1280, 1024, 85, 92, 157500}, 492 { 1280, 1024, 85, 92, 157500},
493 { 1600, 1200, 60, 75, 162000}, 493 { 1600, 1200, 60, 75, 162000},
494 { 1600, 1200, 65, 82, 175500}, 494 { 1600, 1200, 65, 82, 175500},
@@ -505,7 +505,7 @@ static struct _chswtable {
505 u16 subsysCard; 505 u16 subsysCard;
506 char *vendorName; 506 char *vendorName;
507 char *cardName; 507 char *cardName;
508} mychswtable[] __devinitdata = { 508} mychswtable[] = {
509 { 0x1631, 0x1002, "Mitachi", "0x1002" }, 509 { 0x1631, 0x1002, "Mitachi", "0x1002" },
510 { 0x1071, 0x7521, "Mitac" , "7521P" }, 510 { 0x1071, 0x7521, "Mitac" , "7521P" },
511 { 0, 0, "" , "" } 511 { 0, 0, "" , "" }
@@ -525,7 +525,7 @@ static struct _customttable {
525 char *cardName; 525 char *cardName;
526 u32 SpecialID; 526 u32 SpecialID;
527 char *optionName; 527 char *optionName;
528} mycustomttable[] __devinitdata = { 528} mycustomttable[] = {
529 { SIS_630, "2.00.07", "09/27/2002-13:38:25", 529 { SIS_630, "2.00.07", "09/27/2002-13:38:25",
530 0x3240A8, 530 0x3240A8,
531 { 0x220, 0x227, 0x228, 0x229, 0x0ee }, 531 { 0x220, 0x227, 0x228, 0x229, 0x0ee },
diff --git a/drivers/video/skeletonfb.c b/drivers/video/skeletonfb.c
index 5b6abc6de84b..2d4694c6b9e0 100644
--- a/drivers/video/skeletonfb.c
+++ b/drivers/video/skeletonfb.c
@@ -63,7 +63,7 @@
63/* 63/*
64 * Driver data 64 * Driver data
65 */ 65 */
66static char *mode_option __devinitdata; 66static char *mode_option;
67 67
68/* 68/*
69 * If your driver supports multiple boards, you should make the 69 * If your driver supports multiple boards, you should make the
@@ -84,7 +84,7 @@ struct xxx_par;
84 * if we don't use modedb. If we do use modedb see xxxfb_init how to use it 84 * if we don't use modedb. If we do use modedb see xxxfb_init how to use it
85 * to get a fb_var_screeninfo. Otherwise define a default var as well. 85 * to get a fb_var_screeninfo. Otherwise define a default var as well.
86 */ 86 */
87static struct fb_fix_screeninfo xxxfb_fix __devinitdata = { 87static struct fb_fix_screeninfo xxxfb_fix = {
88 .id = "FB's name", 88 .id = "FB's name",
89 .type = FB_TYPE_PACKED_PIXELS, 89 .type = FB_TYPE_PACKED_PIXELS,
90 .visual = FB_VISUAL_PSEUDOCOLOR, 90 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -678,8 +678,7 @@ static struct fb_ops xxxfb_ops = {
678 */ 678 */
679 679
680/* static int __init xxfb_probe (struct platform_device *pdev) -- for platform devs */ 680/* static int __init xxfb_probe (struct platform_device *pdev) -- for platform devs */
681static int __devinit xxxfb_probe(struct pci_dev *dev, 681static int xxxfb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
682 const struct pci_device_id *ent)
683{ 682{
684 struct fb_info *info; 683 struct fb_info *info;
685 struct xxx_par *par; 684 struct xxx_par *par;
@@ -705,9 +704,7 @@ static int __devinit xxxfb_probe(struct pci_dev *dev,
705 */ 704 */
706 info->screen_base = framebuffer_virtual_memory; 705 info->screen_base = framebuffer_virtual_memory;
707 info->fbops = &xxxfb_ops; 706 info->fbops = &xxxfb_ops;
708 info->fix = xxxfb_fix; /* this will be the only time xxxfb_fix will be 707 info->fix = xxxfb_fix;
709 * used, so mark it as __devinitdata
710 */
711 info->pseudo_palette = pseudo_palette; /* The pseudopalette is an 708 info->pseudo_palette = pseudo_palette; /* The pseudopalette is an
712 * 16-member array 709 * 16-member array
713 */ 710 */
@@ -836,8 +833,8 @@ static int __devinit xxxfb_probe(struct pci_dev *dev,
836 /* 833 /*
837 * Cleanup 834 * Cleanup
838 */ 835 */
839/* static void __devexit xxxfb_remove(struct platform_device *pdev) */ 836/* static void xxxfb_remove(struct platform_device *pdev) */
840static void __devexit xxxfb_remove(struct pci_dev *dev) 837static void xxxfb_remove(struct pci_dev *dev)
841{ 838{
842 struct fb_info *info = pci_get_drvdata(dev); 839 struct fb_info *info = pci_get_drvdata(dev);
843 /* or platform_get_drvdata(pdev); */ 840 /* or platform_get_drvdata(pdev); */
@@ -899,7 +896,7 @@ static struct pci_driver xxxfb_driver = {
899 .name = "xxxfb", 896 .name = "xxxfb",
900 .id_table = xxxfb_id_table, 897 .id_table = xxxfb_id_table,
901 .probe = xxxfb_probe, 898 .probe = xxxfb_probe,
902 .remove = __devexit_p(xxxfb_remove), 899 .remove = xxxfb_remove,
903 .suspend = xxxfb_suspend, /* optional but recommended */ 900 .suspend = xxxfb_suspend, /* optional but recommended */
904 .resume = xxxfb_resume, /* optional but recommended */ 901 .resume = xxxfb_resume, /* optional but recommended */
905}; 902};
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 3690effbedcc..1501979099dc 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -46,7 +46,7 @@
46static char *fb_mode = "640x480-16@60"; 46static char *fb_mode = "640x480-16@60";
47static unsigned long default_bpp = 16; 47static unsigned long default_bpp = 16;
48 48
49static struct fb_videomode __devinitdata sm501_default_mode = { 49static struct fb_videomode sm501_default_mode = {
50 .refresh = 60, 50 .refresh = 60,
51 .xres = 640, 51 .xres = 640,
52 .yres = 480, 52 .yres = 480,
@@ -1664,8 +1664,7 @@ static void sm501fb_stop(struct sm501fb_info *info)
1664 resource_size(info->regs_res)); 1664 resource_size(info->regs_res));
1665} 1665}
1666 1666
1667static int __devinit sm501fb_init_fb(struct fb_info *fb, 1667static int sm501fb_init_fb(struct fb_info *fb, enum sm501_controller head,
1668 enum sm501_controller head,
1669 const char *fbname) 1668 const char *fbname)
1670{ 1669{
1671 struct sm501_platdata_fbsub *pd; 1670 struct sm501_platdata_fbsub *pd;
@@ -1850,8 +1849,8 @@ static struct sm501_platdata_fb sm501fb_def_pdata = {
1850static char driver_name_crt[] = "sm501fb-crt"; 1849static char driver_name_crt[] = "sm501fb-crt";
1851static char driver_name_pnl[] = "sm501fb-panel"; 1850static char driver_name_pnl[] = "sm501fb-panel";
1852 1851
1853static int __devinit sm501fb_probe_one(struct sm501fb_info *info, 1852static int sm501fb_probe_one(struct sm501fb_info *info,
1854 enum sm501_controller head) 1853 enum sm501_controller head)
1855{ 1854{
1856 unsigned char *name = (head == HEAD_CRT) ? "crt" : "panel"; 1855 unsigned char *name = (head == HEAD_CRT) ? "crt" : "panel";
1857 struct sm501_platdata_fbsub *pd; 1856 struct sm501_platdata_fbsub *pd;
@@ -1892,9 +1891,8 @@ static void sm501_free_init_fb(struct sm501fb_info *info,
1892 fb_dealloc_cmap(&fbi->cmap); 1891 fb_dealloc_cmap(&fbi->cmap);
1893} 1892}
1894 1893
1895static int __devinit sm501fb_start_one(struct sm501fb_info *info, 1894static int sm501fb_start_one(struct sm501fb_info *info,
1896 enum sm501_controller head, 1895 enum sm501_controller head, const char *drvname)
1897 const char *drvname)
1898{ 1896{
1899 struct fb_info *fbi = info->fb[head]; 1897 struct fb_info *fbi = info->fb[head];
1900 int ret; 1898 int ret;
@@ -1922,7 +1920,7 @@ static int __devinit sm501fb_start_one(struct sm501fb_info *info,
1922 return 0; 1920 return 0;
1923} 1921}
1924 1922
1925static int __devinit sm501fb_probe(struct platform_device *pdev) 1923static int sm501fb_probe(struct platform_device *pdev)
1926{ 1924{
1927 struct sm501fb_info *info; 1925 struct sm501fb_info *info;
1928 struct device *dev = &pdev->dev; 1926 struct device *dev = &pdev->dev;
diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c
index 6101f5c2f62f..4d99dd7a6831 100644
--- a/drivers/video/ssd1307fb.c
+++ b/drivers/video/ssd1307fb.c
@@ -36,7 +36,7 @@ struct ssd1307fb_par {
36 int reset; 36 int reset;
37}; 37};
38 38
39static struct fb_fix_screeninfo ssd1307fb_fix __devinitdata = { 39static struct fb_fix_screeninfo ssd1307fb_fix = {
40 .id = "Solomon SSD1307", 40 .id = "Solomon SSD1307",
41 .type = FB_TYPE_PACKED_PIXELS, 41 .type = FB_TYPE_PACKED_PIXELS,
42 .visual = FB_VISUAL_MONO10, 42 .visual = FB_VISUAL_MONO10,
@@ -47,7 +47,7 @@ static struct fb_fix_screeninfo ssd1307fb_fix __devinitdata = {
47 .accel = FB_ACCEL_NONE, 47 .accel = FB_ACCEL_NONE,
48}; 48};
49 49
50static struct fb_var_screeninfo ssd1307fb_var __devinitdata = { 50static struct fb_var_screeninfo ssd1307fb_var = {
51 .xres = SSD1307FB_WIDTH, 51 .xres = SSD1307FB_WIDTH,
52 .yres = SSD1307FB_HEIGHT, 52 .yres = SSD1307FB_HEIGHT,
53 .xres_virtual = SSD1307FB_WIDTH, 53 .xres_virtual = SSD1307FB_WIDTH,
@@ -227,7 +227,8 @@ static struct fb_deferred_io ssd1307fb_defio = {
227 .deferred_io = ssd1307fb_deferred_io, 227 .deferred_io = ssd1307fb_deferred_io,
228}; 228};
229 229
230static int __devinit ssd1307fb_probe(struct i2c_client *client, const struct i2c_device_id *id) 230static int ssd1307fb_probe(struct i2c_client *client,
231 const struct i2c_device_id *id)
231{ 232{
232 struct fb_info *info; 233 struct fb_info *info;
233 u32 vmem_size = SSD1307FB_WIDTH * SSD1307FB_HEIGHT / 8; 234 u32 vmem_size = SSD1307FB_WIDTH * SSD1307FB_HEIGHT / 8;
@@ -352,7 +353,7 @@ fb_alloc_error:
352 return ret; 353 return ret;
353} 354}
354 355
355static int __devexit ssd1307fb_remove(struct i2c_client *client) 356static int ssd1307fb_remove(struct i2c_client *client)
356{ 357{
357 struct fb_info *info = i2c_get_clientdata(client); 358 struct fb_info *info = i2c_get_clientdata(client);
358 struct ssd1307fb_par *par = info->par; 359 struct ssd1307fb_par *par = info->par;
@@ -380,7 +381,7 @@ MODULE_DEVICE_TABLE(of, ssd1307fb_of_match);
380 381
381static struct i2c_driver ssd1307fb_driver = { 382static struct i2c_driver ssd1307fb_driver = {
382 .probe = ssd1307fb_probe, 383 .probe = ssd1307fb_probe,
383 .remove = __devexit_p(ssd1307fb_remove), 384 .remove = ssd1307fb_remove,
384 .id_table = ssd1307fb_i2c_id, 385 .id_table = ssd1307fb_i2c_id,
385 .driver = { 386 .driver = {
386 .name = "ssd1307fb", 387 .name = "ssd1307fb",
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
index 111fb32e8769..9c00026e3ae2 100644
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -104,7 +104,7 @@ static bool slowpci; /* slow PCI settings */
104*/ 104*/
105#define DEFAULT_VIDEO_MODE "640x480@60" 105#define DEFAULT_VIDEO_MODE "640x480@60"
106 106
107static char *mode_option __devinitdata = DEFAULT_VIDEO_MODE; 107static char *mode_option = DEFAULT_VIDEO_MODE;
108 108
109enum { 109enum {
110 ID_VOODOO1 = 0, 110 ID_VOODOO1 = 0,
@@ -113,7 +113,7 @@ enum {
113 113
114#define IS_VOODOO2(par) ((par)->type == ID_VOODOO2) 114#define IS_VOODOO2(par) ((par)->type == ID_VOODOO2)
115 115
116static struct sst_spec voodoo_spec[] __devinitdata = { 116static struct sst_spec voodoo_spec[] = {
117 { .name = "Voodoo Graphics", .default_gfx_clock = 50000, .max_gfxclk = 60 }, 117 { .name = "Voodoo Graphics", .default_gfx_clock = 50000, .max_gfxclk = 60 },
118 { .name = "Voodoo2", .default_gfx_clock = 75000, .max_gfxclk = 85 }, 118 { .name = "Voodoo2", .default_gfx_clock = 75000, .max_gfxclk = 85 },
119}; 119};
@@ -822,7 +822,7 @@ static void sstfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
822/* 822/*
823 * get lfb size 823 * get lfb size
824 */ 824 */
825static int __devinit sst_get_memsize(struct fb_info *info, __u32 *memsize) 825static int sst_get_memsize(struct fb_info *info, __u32 *memsize)
826{ 826{
827 u8 __iomem *fbbase_virt = info->screen_base; 827 u8 __iomem *fbbase_virt = info->screen_base;
828 828
@@ -865,7 +865,7 @@ static int __devinit sst_get_memsize(struct fb_info *info, __u32 *memsize)
865/* fbi should be idle, and fifo emty and mem disabled */ 865/* fbi should be idle, and fifo emty and mem disabled */
866/* supposed to detect AT&T ATT20C409 and Ti TVP3409 ramdacs */ 866/* supposed to detect AT&T ATT20C409 and Ti TVP3409 ramdacs */
867 867
868static int __devinit sst_detect_att(struct fb_info *info) 868static int sst_detect_att(struct fb_info *info)
869{ 869{
870 struct sstfb_par *par = info->par; 870 struct sstfb_par *par = info->par;
871 int i, mir, dir; 871 int i, mir, dir;
@@ -890,7 +890,7 @@ static int __devinit sst_detect_att(struct fb_info *info)
890 return 0; 890 return 0;
891} 891}
892 892
893static int __devinit sst_detect_ti(struct fb_info *info) 893static int sst_detect_ti(struct fb_info *info)
894{ 894{
895 struct sstfb_par *par = info->par; 895 struct sstfb_par *par = info->par;
896 int i, mir, dir; 896 int i, mir, dir;
@@ -926,7 +926,7 @@ static int __devinit sst_detect_ti(struct fb_info *info)
926 * touched... 926 * touched...
927 * is it really safe ? how can i reset this ramdac ? geee... 927 * is it really safe ? how can i reset this ramdac ? geee...
928 */ 928 */
929static int __devinit sst_detect_ics(struct fb_info *info) 929static int sst_detect_ics(struct fb_info *info)
930{ 930{
931 struct sstfb_par *par = info->par; 931 struct sstfb_par *par = info->par;
932 int m_clk0_1, m_clk0_7, m_clk1_b; 932 int m_clk0_1, m_clk0_7, m_clk1_b;
@@ -1105,7 +1105,7 @@ static void sst_set_vidmod_ics(struct fb_info *info, const int bpp)
1105 */ 1105 */
1106 1106
1107 1107
1108static struct dac_switch dacs[] __devinitdata = { 1108static struct dac_switch dacs[] = {
1109 { .name = "TI TVP3409", 1109 { .name = "TI TVP3409",
1110 .detect = sst_detect_ti, 1110 .detect = sst_detect_ti,
1111 .set_pll = sst_set_pll_att_ti, 1111 .set_pll = sst_set_pll_att_ti,
@@ -1121,7 +1121,7 @@ static struct dac_switch dacs[] __devinitdata = {
1121 .set_vidmod = sst_set_vidmod_ics }, 1121 .set_vidmod = sst_set_vidmod_ics },
1122}; 1122};
1123 1123
1124static int __devinit sst_detect_dactype(struct fb_info *info, struct sstfb_par *par) 1124static int sst_detect_dactype(struct fb_info *info, struct sstfb_par *par)
1125{ 1125{
1126 int i, ret = 0; 1126 int i, ret = 0;
1127 1127
@@ -1140,7 +1140,7 @@ static int __devinit sst_detect_dactype(struct fb_info *info, struct sstfb_par *
1140/* 1140/*
1141 * Internal Routines 1141 * Internal Routines
1142 */ 1142 */
1143static int __devinit sst_init(struct fb_info *info, struct sstfb_par *par) 1143static int sst_init(struct fb_info *info, struct sstfb_par *par)
1144{ 1144{
1145 u32 fbiinit0, fbiinit1, fbiinit4; 1145 u32 fbiinit0, fbiinit1, fbiinit4;
1146 struct pci_dev *dev = par->dev; 1146 struct pci_dev *dev = par->dev;
@@ -1239,7 +1239,7 @@ static int __devinit sst_init(struct fb_info *info, struct sstfb_par *par)
1239 return 1; 1239 return 1;
1240} 1240}
1241 1241
1242static void __devexit sst_shutdown(struct fb_info *info) 1242static void sst_shutdown(struct fb_info *info)
1243{ 1243{
1244 struct sstfb_par *par = info->par; 1244 struct sstfb_par *par = info->par;
1245 struct pci_dev *dev = par->dev; 1245 struct pci_dev *dev = par->dev;
@@ -1271,7 +1271,7 @@ static void __devexit sst_shutdown(struct fb_info *info)
1271/* 1271/*
1272 * Interface to the world 1272 * Interface to the world
1273 */ 1273 */
1274static int __devinit sstfb_setup(char *options) 1274static int sstfb_setup(char *options)
1275{ 1275{
1276 char *this_opt; 1276 char *this_opt;
1277 1277
@@ -1317,8 +1317,7 @@ static struct fb_ops sstfb_ops = {
1317 .fb_ioctl = sstfb_ioctl, 1317 .fb_ioctl = sstfb_ioctl,
1318}; 1318};
1319 1319
1320static int __devinit sstfb_probe(struct pci_dev *pdev, 1320static int sstfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1321 const struct pci_device_id *id)
1322{ 1321{
1323 struct fb_info *info; 1322 struct fb_info *info;
1324 struct fb_fix_screeninfo *fix; 1323 struct fb_fix_screeninfo *fix;
@@ -1458,7 +1457,7 @@ fail_mmio_mem:
1458 return -ENXIO; /* no voodoo detected */ 1457 return -ENXIO; /* no voodoo detected */
1459} 1458}
1460 1459
1461static void __devexit sstfb_remove(struct pci_dev *pdev) 1460static void sstfb_remove(struct pci_dev *pdev)
1462{ 1461{
1463 struct sstfb_par *par; 1462 struct sstfb_par *par;
1464 struct fb_info *info; 1463 struct fb_info *info;
@@ -1490,11 +1489,11 @@ static struct pci_driver sstfb_driver = {
1490 .name = "sstfb", 1489 .name = "sstfb",
1491 .id_table = sstfb_id_tbl, 1490 .id_table = sstfb_id_tbl,
1492 .probe = sstfb_probe, 1491 .probe = sstfb_probe,
1493 .remove = __devexit_p(sstfb_remove), 1492 .remove = sstfb_remove,
1494}; 1493};
1495 1494
1496 1495
1497static int __devinit sstfb_init(void) 1496static int sstfb_init(void)
1498{ 1497{
1499 char *option = NULL; 1498 char *option = NULL;
1500 1499
@@ -1505,7 +1504,7 @@ static int __devinit sstfb_init(void)
1505 return pci_register_driver(&sstfb_driver); 1504 return pci_register_driver(&sstfb_driver);
1506} 1505}
1507 1506
1508static void __devexit sstfb_exit(void) 1507static void sstfb_exit(void)
1509{ 1508{
1510 pci_unregister_driver(&sstfb_driver); 1509 pci_unregister_driver(&sstfb_driver);
1511} 1510}
diff --git a/drivers/video/sunxvr1000.c b/drivers/video/sunxvr1000.c
index 729a50722bdf..cc6f48bba36b 100644
--- a/drivers/video/sunxvr1000.c
+++ b/drivers/video/sunxvr1000.c
@@ -25,7 +25,7 @@ struct gfb_info {
25 u32 pseudo_palette[16]; 25 u32 pseudo_palette[16];
26}; 26};
27 27
28static int __devinit gfb_get_props(struct gfb_info *gp) 28static int gfb_get_props(struct gfb_info *gp)
29{ 29{
30 gp->width = of_getintprop_default(gp->of_node, "width", 0); 30 gp->width = of_getintprop_default(gp->of_node, "width", 0);
31 gp->height = of_getintprop_default(gp->of_node, "height", 0); 31 gp->height = of_getintprop_default(gp->of_node, "height", 0);
@@ -66,7 +66,7 @@ static struct fb_ops gfb_ops = {
66 .fb_imageblit = cfb_imageblit, 66 .fb_imageblit = cfb_imageblit,
67}; 67};
68 68
69static int __devinit gfb_set_fbinfo(struct gfb_info *gp) 69static int gfb_set_fbinfo(struct gfb_info *gp)
70{ 70{
71 struct fb_info *info = gp->info; 71 struct fb_info *info = gp->info;
72 struct fb_var_screeninfo *var = &info->var; 72 struct fb_var_screeninfo *var = &info->var;
@@ -111,7 +111,7 @@ static int __devinit gfb_set_fbinfo(struct gfb_info *gp)
111 return 0; 111 return 0;
112} 112}
113 113
114static int __devinit gfb_probe(struct platform_device *op) 114static int gfb_probe(struct platform_device *op)
115{ 115{
116 struct device_node *dp = op->dev.of_node; 116 struct device_node *dp = op->dev.of_node;
117 struct fb_info *info; 117 struct fb_info *info;
@@ -173,7 +173,7 @@ err_out:
173 return err; 173 return err;
174} 174}
175 175
176static int __devexit gfb_remove(struct platform_device *op) 176static int gfb_remove(struct platform_device *op)
177{ 177{
178 struct fb_info *info = dev_get_drvdata(&op->dev); 178 struct fb_info *info = dev_get_drvdata(&op->dev);
179 struct gfb_info *gp = info->par; 179 struct gfb_info *gp = info->par;
@@ -201,7 +201,7 @@ MODULE_DEVICE_TABLE(of, ffb_match);
201 201
202static struct platform_driver gfb_driver = { 202static struct platform_driver gfb_driver = {
203 .probe = gfb_probe, 203 .probe = gfb_probe,
204 .remove = __devexit_p(gfb_remove), 204 .remove = gfb_remove,
205 .driver = { 205 .driver = {
206 .name = "gfb", 206 .name = "gfb",
207 .owner = THIS_MODULE, 207 .owner = THIS_MODULE,
diff --git a/drivers/video/sunxvr2500.c b/drivers/video/sunxvr2500.c
index 7fbcba86d1a2..843b6bab0483 100644
--- a/drivers/video/sunxvr2500.c
+++ b/drivers/video/sunxvr2500.c
@@ -29,7 +29,7 @@ struct s3d_info {
29 u32 pseudo_palette[16]; 29 u32 pseudo_palette[16];
30}; 30};
31 31
32static int __devinit s3d_get_props(struct s3d_info *sp) 32static int s3d_get_props(struct s3d_info *sp)
33{ 33{
34 sp->width = of_getintprop_default(sp->of_node, "width", 0); 34 sp->width = of_getintprop_default(sp->of_node, "width", 0);
35 sp->height = of_getintprop_default(sp->of_node, "height", 0); 35 sp->height = of_getintprop_default(sp->of_node, "height", 0);
@@ -70,7 +70,7 @@ static struct fb_ops s3d_ops = {
70 .fb_imageblit = cfb_imageblit, 70 .fb_imageblit = cfb_imageblit,
71}; 71};
72 72
73static int __devinit s3d_set_fbinfo(struct s3d_info *sp) 73static int s3d_set_fbinfo(struct s3d_info *sp)
74{ 74{
75 struct fb_info *info = sp->info; 75 struct fb_info *info = sp->info;
76 struct fb_var_screeninfo *var = &info->var; 76 struct fb_var_screeninfo *var = &info->var;
@@ -115,8 +115,8 @@ static int __devinit s3d_set_fbinfo(struct s3d_info *sp)
115 return 0; 115 return 0;
116} 116}
117 117
118static int __devinit s3d_pci_register(struct pci_dev *pdev, 118static int s3d_pci_register(struct pci_dev *pdev,
119 const struct pci_device_id *ent) 119 const struct pci_device_id *ent)
120{ 120{
121 struct fb_info *info; 121 struct fb_info *info;
122 struct s3d_info *sp; 122 struct s3d_info *sp;
@@ -219,7 +219,7 @@ err_out:
219 return err; 219 return err;
220} 220}
221 221
222static void __devexit s3d_pci_unregister(struct pci_dev *pdev) 222static void s3d_pci_unregister(struct pci_dev *pdev)
223{ 223{
224 struct fb_info *info = pci_get_drvdata(pdev); 224 struct fb_info *info = pci_get_drvdata(pdev);
225 struct s3d_info *sp = info->par; 225 struct s3d_info *sp = info->par;
@@ -251,7 +251,7 @@ static struct pci_driver s3d_driver = {
251 .name = "s3d", 251 .name = "s3d",
252 .id_table = s3d_pci_table, 252 .id_table = s3d_pci_table,
253 .probe = s3d_pci_register, 253 .probe = s3d_pci_register,
254 .remove = __devexit_p(s3d_pci_unregister), 254 .remove = s3d_pci_unregister,
255}; 255};
256 256
257static int __init s3d_init(void) 257static int __init s3d_init(void)
diff --git a/drivers/video/sunxvr500.c b/drivers/video/sunxvr500.c
index 6c71b1b44477..387350d004df 100644
--- a/drivers/video/sunxvr500.c
+++ b/drivers/video/sunxvr500.c
@@ -51,7 +51,7 @@ struct e3d_info {
51 u32 pseudo_palette[16]; 51 u32 pseudo_palette[16];
52}; 52};
53 53
54static int __devinit e3d_get_props(struct e3d_info *ep) 54static int e3d_get_props(struct e3d_info *ep)
55{ 55{
56 ep->width = of_getintprop_default(ep->of_node, "width", 0); 56 ep->width = of_getintprop_default(ep->of_node, "width", 0);
57 ep->height = of_getintprop_default(ep->of_node, "height", 0); 57 ep->height = of_getintprop_default(ep->of_node, "height", 0);
@@ -193,7 +193,7 @@ static struct fb_ops e3d_ops = {
193 .fb_imageblit = e3d_imageblit, 193 .fb_imageblit = e3d_imageblit,
194}; 194};
195 195
196static int __devinit e3d_set_fbinfo(struct e3d_info *ep) 196static int e3d_set_fbinfo(struct e3d_info *ep)
197{ 197{
198 struct fb_info *info = ep->info; 198 struct fb_info *info = ep->info;
199 struct fb_var_screeninfo *var = &info->var; 199 struct fb_var_screeninfo *var = &info->var;
@@ -238,8 +238,8 @@ static int __devinit e3d_set_fbinfo(struct e3d_info *ep)
238 return 0; 238 return 0;
239} 239}
240 240
241static int __devinit e3d_pci_register(struct pci_dev *pdev, 241static int e3d_pci_register(struct pci_dev *pdev,
242 const struct pci_device_id *ent) 242 const struct pci_device_id *ent)
243{ 243{
244 struct device_node *of_node; 244 struct device_node *of_node;
245 const char *device_type; 245 const char *device_type;
@@ -392,7 +392,7 @@ err_out:
392 return err; 392 return err;
393} 393}
394 394
395static void __devexit e3d_pci_unregister(struct pci_dev *pdev) 395static void e3d_pci_unregister(struct pci_dev *pdev)
396{ 396{
397 struct fb_info *info = pci_get_drvdata(pdev); 397 struct fb_info *info = pci_get_drvdata(pdev);
398 struct e3d_info *ep = info->par; 398 struct e3d_info *ep = info->par;
@@ -437,7 +437,7 @@ static struct pci_driver e3d_driver = {
437 .name = "e3d", 437 .name = "e3d",
438 .id_table = e3d_pci_table, 438 .id_table = e3d_pci_table,
439 .probe = e3d_pci_register, 439 .probe = e3d_pci_register,
440 .remove = __devexit_p(e3d_pci_unregister), 440 .remove = e3d_pci_unregister,
441}; 441};
442 442
443static int __init e3d_init(void) 443static int __init e3d_init(void)
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c
index 07c66e946634..c000852500aa 100644
--- a/drivers/video/tcx.c
+++ b/drivers/video/tcx.c
@@ -362,7 +362,7 @@ static void tcx_unmap_regs(struct platform_device *op, struct fb_info *info,
362 info->screen_base, info->fix.smem_len); 362 info->screen_base, info->fix.smem_len);
363} 363}
364 364
365static int __devinit tcx_probe(struct platform_device *op) 365static int tcx_probe(struct platform_device *op)
366{ 366{
367 struct device_node *dp = op->dev.of_node; 367 struct device_node *dp = op->dev.of_node;
368 struct fb_info *info; 368 struct fb_info *info;
@@ -486,7 +486,7 @@ out_err:
486 return err; 486 return err;
487} 487}
488 488
489static int __devexit tcx_remove(struct platform_device *op) 489static int tcx_remove(struct platform_device *op)
490{ 490{
491 struct fb_info *info = dev_get_drvdata(&op->dev); 491 struct fb_info *info = dev_get_drvdata(&op->dev);
492 struct tcx_par *par = info->par; 492 struct tcx_par *par = info->par;
@@ -518,7 +518,7 @@ static struct platform_driver tcx_driver = {
518 .of_match_table = tcx_match, 518 .of_match_table = tcx_match,
519 }, 519 },
520 .probe = tcx_probe, 520 .probe = tcx_probe,
521 .remove = __devexit_p(tcx_remove), 521 .remove = tcx_remove,
522}; 522};
523 523
524static int __init tcx_init(void) 524static int __init tcx_init(void)
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
index e026724a3a56..64bc28ba4037 100644
--- a/drivers/video/tdfxfb.c
+++ b/drivers/video/tdfxfb.c
@@ -100,7 +100,7 @@ static inline int mtrr_del(int reg, unsigned long base,
100#define VOODOO3_MAX_PIXCLOCK 300000 100#define VOODOO3_MAX_PIXCLOCK 300000
101#define VOODOO5_MAX_PIXCLOCK 350000 101#define VOODOO5_MAX_PIXCLOCK 350000
102 102
103static struct fb_fix_screeninfo tdfx_fix __devinitdata = { 103static struct fb_fix_screeninfo tdfx_fix = {
104 .type = FB_TYPE_PACKED_PIXELS, 104 .type = FB_TYPE_PACKED_PIXELS,
105 .visual = FB_VISUAL_PSEUDOCOLOR, 105 .visual = FB_VISUAL_PSEUDOCOLOR,
106 .ypanstep = 1, 106 .ypanstep = 1,
@@ -108,7 +108,7 @@ static struct fb_fix_screeninfo tdfx_fix __devinitdata = {
108 .accel = FB_ACCEL_3DFX_BANSHEE 108 .accel = FB_ACCEL_3DFX_BANSHEE
109}; 109};
110 110
111static struct fb_var_screeninfo tdfx_var __devinitdata = { 111static struct fb_var_screeninfo tdfx_var = {
112 /* "640x480, 8 bpp @ 60 Hz */ 112 /* "640x480, 8 bpp @ 60 Hz */
113 .xres = 640, 113 .xres = 640,
114 .yres = 480, 114 .yres = 480,
@@ -135,9 +135,8 @@ static struct fb_var_screeninfo tdfx_var __devinitdata = {
135/* 135/*
136 * PCI driver prototypes 136 * PCI driver prototypes
137 */ 137 */
138static int __devinit tdfxfb_probe(struct pci_dev *pdev, 138static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id);
139 const struct pci_device_id *id); 139static void tdfxfb_remove(struct pci_dev *pdev);
140static void __devexit tdfxfb_remove(struct pci_dev *pdev);
141 140
142static struct pci_device_id tdfxfb_id_table[] = { 141static struct pci_device_id tdfxfb_id_table[] = {
143 { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE, 142 { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE,
@@ -156,7 +155,7 @@ static struct pci_driver tdfxfb_driver = {
156 .name = "tdfxfb", 155 .name = "tdfxfb",
157 .id_table = tdfxfb_id_table, 156 .id_table = tdfxfb_id_table,
158 .probe = tdfxfb_probe, 157 .probe = tdfxfb_probe,
159 .remove = __devexit_p(tdfxfb_remove), 158 .remove = tdfxfb_remove,
160}; 159};
161 160
162MODULE_DEVICE_TABLE(pci, tdfxfb_id_table); 161MODULE_DEVICE_TABLE(pci, tdfxfb_id_table);
@@ -167,9 +166,9 @@ MODULE_DEVICE_TABLE(pci, tdfxfb_id_table);
167static int nopan; 166static int nopan;
168static int nowrap = 1; /* not implemented (yet) */ 167static int nowrap = 1; /* not implemented (yet) */
169static int hwcursor = 1; 168static int hwcursor = 1;
170static char *mode_option __devinitdata; 169static char *mode_option;
171/* mtrr option */ 170/* mtrr option */
172static bool nomtrr __devinitdata; 171static bool nomtrr;
173 172
174/* ------------------------------------------------------------------------- 173/* -------------------------------------------------------------------------
175 * Hardware-specific funcions 174 * Hardware-specific funcions
@@ -1279,8 +1278,8 @@ static int tdfxfb_ddc_getsda(void *data)
1279 return (0 != (tdfx_inl(par, VIDSERPARPORT) & DDC_SDA_IN)); 1278 return (0 != (tdfx_inl(par, VIDSERPARPORT) & DDC_SDA_IN));
1280} 1279}
1281 1280
1282static int __devinit tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan, 1281static int tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan, const char *name,
1283 const char *name, struct device *dev) 1282 struct device *dev)
1284{ 1283{
1285 int rc; 1284 int rc;
1286 1285
@@ -1308,8 +1307,8 @@ static int __devinit tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan,
1308 return rc; 1307 return rc;
1309} 1308}
1310 1309
1311static int __devinit tdfxfb_setup_i2c_bus(struct tdfxfb_i2c_chan *chan, 1310static int tdfxfb_setup_i2c_bus(struct tdfxfb_i2c_chan *chan, const char *name,
1312 const char *name, struct device *dev) 1311 struct device *dev)
1313{ 1312{
1314 int rc; 1313 int rc;
1315 1314
@@ -1336,7 +1335,7 @@ static int __devinit tdfxfb_setup_i2c_bus(struct tdfxfb_i2c_chan *chan,
1336 return rc; 1335 return rc;
1337} 1336}
1338 1337
1339static void __devinit tdfxfb_create_i2c_busses(struct fb_info *info) 1338static void tdfxfb_create_i2c_busses(struct fb_info *info)
1340{ 1339{
1341 struct tdfx_par *par = info->par; 1340 struct tdfx_par *par = info->par;
1342 1341
@@ -1388,8 +1387,7 @@ static int tdfxfb_probe_i2c_connector(struct tdfx_par *par,
1388 * Initializes and allocates resources for PCI device @pdev. 1387 * Initializes and allocates resources for PCI device @pdev.
1389 * 1388 *
1390 */ 1389 */
1391static int __devinit tdfxfb_probe(struct pci_dev *pdev, 1390static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1392 const struct pci_device_id *id)
1393{ 1391{
1394 struct tdfx_par *default_par; 1392 struct tdfx_par *default_par;
1395 struct fb_info *info; 1393 struct fb_info *info;
@@ -1626,7 +1624,7 @@ static void __init tdfxfb_setup(char *options)
1626 * lifetime for the PCI device @pdev. 1624 * lifetime for the PCI device @pdev.
1627 * 1625 *
1628 */ 1626 */
1629static void __devexit tdfxfb_remove(struct pci_dev *pdev) 1627static void tdfxfb_remove(struct pci_dev *pdev)
1630{ 1628{
1631 struct fb_info *info = pci_get_drvdata(pdev); 1629 struct fb_info *info = pci_get_drvdata(pdev);
1632 struct tdfx_par *par = info->par; 1630 struct tdfx_par *par = info->par;
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c
index aba7686b1a32..c9c8e5a1fdee 100644
--- a/drivers/video/tgafb.c
+++ b/drivers/video/tgafb.c
@@ -61,8 +61,8 @@ static void tgafb_fillrect(struct fb_info *, const struct fb_fillrect *);
61static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *); 61static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *);
62static int tgafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); 62static int tgafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
63 63
64static int __devinit tgafb_register(struct device *dev); 64static int tgafb_register(struct device *dev);
65static void __devexit tgafb_unregister(struct device *dev); 65static void tgafb_unregister(struct device *dev);
66 66
67static const char *mode_option; 67static const char *mode_option;
68static const char *mode_option_pci = "640x480@60"; 68static const char *mode_option_pci = "640x480@60";
@@ -93,9 +93,8 @@ static struct fb_ops tgafb_ops = {
93/* 93/*
94 * PCI registration operations 94 * PCI registration operations
95 */ 95 */
96static int __devinit tgafb_pci_register(struct pci_dev *, 96static int tgafb_pci_register(struct pci_dev *, const struct pci_device_id *);
97 const struct pci_device_id *); 97static void tgafb_pci_unregister(struct pci_dev *);
98static void __devexit tgafb_pci_unregister(struct pci_dev *);
99 98
100static struct pci_device_id const tgafb_pci_table[] = { 99static struct pci_device_id const tgafb_pci_table[] = {
101 { PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA) }, 100 { PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA) },
@@ -107,17 +106,16 @@ static struct pci_driver tgafb_pci_driver = {
107 .name = "tgafb", 106 .name = "tgafb",
108 .id_table = tgafb_pci_table, 107 .id_table = tgafb_pci_table,
109 .probe = tgafb_pci_register, 108 .probe = tgafb_pci_register,
110 .remove = __devexit_p(tgafb_pci_unregister), 109 .remove = tgafb_pci_unregister,
111}; 110};
112 111
113static int __devinit 112static int tgafb_pci_register(struct pci_dev *pdev,
114tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) 113 const struct pci_device_id *ent)
115{ 114{
116 return tgafb_register(&pdev->dev); 115 return tgafb_register(&pdev->dev);
117} 116}
118 117
119static void __devexit 118static void tgafb_pci_unregister(struct pci_dev *pdev)
120tgafb_pci_unregister(struct pci_dev *pdev)
121{ 119{
122 tgafb_unregister(&pdev->dev); 120 tgafb_unregister(&pdev->dev);
123} 121}
@@ -127,8 +125,8 @@ tgafb_pci_unregister(struct pci_dev *pdev)
127/* 125/*
128 * TC registration operations 126 * TC registration operations
129 */ 127 */
130static int __devinit tgafb_tc_register(struct device *); 128static int tgafb_tc_register(struct device *);
131static int __devexit tgafb_tc_unregister(struct device *); 129static int tgafb_tc_unregister(struct device *);
132 130
133static struct tc_device_id const tgafb_tc_table[] = { 131static struct tc_device_id const tgafb_tc_table[] = {
134 { "DEC ", "PMAGD-AA" }, 132 { "DEC ", "PMAGD-AA" },
@@ -143,12 +141,11 @@ static struct tc_driver tgafb_tc_driver = {
143 .name = "tgafb", 141 .name = "tgafb",
144 .bus = &tc_bus_type, 142 .bus = &tc_bus_type,
145 .probe = tgafb_tc_register, 143 .probe = tgafb_tc_register,
146 .remove = __devexit_p(tgafb_tc_unregister), 144 .remove = tgafb_tc_unregister,
147 }, 145 },
148}; 146};
149 147
150static int __devinit 148static int tgafb_tc_register(struct device *dev)
151tgafb_tc_register(struct device *dev)
152{ 149{
153 int status = tgafb_register(dev); 150 int status = tgafb_register(dev);
154 if (!status) 151 if (!status)
@@ -156,8 +153,7 @@ tgafb_tc_register(struct device *dev)
156 return status; 153 return status;
157} 154}
158 155
159static int __devexit 156static int tgafb_tc_unregister(struct device *dev)
160tgafb_tc_unregister(struct device *dev)
161{ 157{
162 put_device(dev); 158 put_device(dev);
163 tgafb_unregister(dev); 159 tgafb_unregister(dev);
@@ -1546,8 +1542,7 @@ static int tgafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info
1546 return 0; 1542 return 0;
1547} 1543}
1548 1544
1549static int __devinit 1545static int tgafb_register(struct device *dev)
1550tgafb_register(struct device *dev)
1551{ 1546{
1552 static const struct fb_videomode modedb_tc = { 1547 static const struct fb_videomode modedb_tc = {
1553 /* 1280x1024 @ 72 Hz, 76.8 kHz hsync */ 1548 /* 1280x1024 @ 72 Hz, 76.8 kHz hsync */
@@ -1692,8 +1687,7 @@ tgafb_register(struct device *dev)
1692 return ret; 1687 return ret;
1693} 1688}
1694 1689
1695static void __devexit 1690static void tgafb_unregister(struct device *dev)
1696tgafb_unregister(struct device *dev)
1697{ 1691{
1698 resource_size_t bar0_start = 0, bar0_len = 0; 1692 resource_size_t bar0_start = 0, bar0_len = 0;
1699 int tga_bus_pci = TGA_BUS_PCI(dev); 1693 int tga_bus_pci = TGA_BUS_PCI(dev);
@@ -1721,16 +1715,14 @@ tgafb_unregister(struct device *dev)
1721 framebuffer_release(info); 1715 framebuffer_release(info);
1722} 1716}
1723 1717
1724static void __devexit 1718static void tgafb_exit(void)
1725tgafb_exit(void)
1726{ 1719{
1727 tc_unregister_driver(&tgafb_tc_driver); 1720 tc_unregister_driver(&tgafb_tc_driver);
1728 pci_unregister_driver(&tgafb_pci_driver); 1721 pci_unregister_driver(&tgafb_pci_driver);
1729} 1722}
1730 1723
1731#ifndef MODULE 1724#ifndef MODULE
1732static int __devinit 1725static int tgafb_setup(char *arg)
1733tgafb_setup(char *arg)
1734{ 1726{
1735 char *this_opt; 1727 char *this_opt;
1736 1728
@@ -1751,8 +1743,7 @@ tgafb_setup(char *arg)
1751} 1743}
1752#endif /* !MODULE */ 1744#endif /* !MODULE */
1753 1745
1754static int __devinit 1746static int tgafb_init(void)
1755tgafb_init(void)
1756{ 1747{
1757 int status; 1748 int status;
1758#ifndef MODULE 1749#ifndef MODULE
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
index b244f060f151..dc4fb8620156 100644
--- a/drivers/video/tmiofb.c
+++ b/drivers/video/tmiofb.c
@@ -191,7 +191,7 @@
191#define LCR_VCLKHW 0x1b4 /* VCLK High Width */ 191#define LCR_VCLKHW 0x1b4 /* VCLK High Width */
192#define LCR_OC 0x1b6 /* Output Control */ 192#define LCR_OC 0x1b6 /* Output Control */
193 193
194static char *mode_option __devinitdata; 194static char *mode_option;
195 195
196struct tmiofb_par { 196struct tmiofb_par {
197 u32 pseudo_palette[16]; 197 u32 pseudo_palette[16];
@@ -675,7 +675,7 @@ static struct fb_ops tmiofb_ops = {
675 675
676/*--------------------------------------------------------------------------*/ 676/*--------------------------------------------------------------------------*/
677 677
678static int __devinit tmiofb_probe(struct platform_device *dev) 678static int tmiofb_probe(struct platform_device *dev)
679{ 679{
680 const struct mfd_cell *cell = mfd_get_cell(dev); 680 const struct mfd_cell *cell = mfd_get_cell(dev);
681 struct tmio_fb_data *data = dev->dev.platform_data; 681 struct tmio_fb_data *data = dev->dev.platform_data;
@@ -807,7 +807,7 @@ err_ioremap_ccr:
807 return retval; 807 return retval;
808} 808}
809 809
810static int __devexit tmiofb_remove(struct platform_device *dev) 810static int tmiofb_remove(struct platform_device *dev)
811{ 811{
812 const struct mfd_cell *cell = mfd_get_cell(dev); 812 const struct mfd_cell *cell = mfd_get_cell(dev);
813 struct fb_info *info = platform_get_drvdata(dev); 813 struct fb_info *info = platform_get_drvdata(dev);
@@ -1002,7 +1002,7 @@ static struct platform_driver tmiofb_driver = {
1002 .driver.name = "tmio-fb", 1002 .driver.name = "tmio-fb",
1003 .driver.owner = THIS_MODULE, 1003 .driver.owner = THIS_MODULE,
1004 .probe = tmiofb_probe, 1004 .probe = tmiofb_probe,
1005 .remove = __devexit_p(tmiofb_remove), 1005 .remove = tmiofb_remove,
1006 .suspend = tmiofb_suspend, 1006 .suspend = tmiofb_suspend,
1007 .resume = tmiofb_resume, 1007 .resume = tmiofb_resume,
1008}; 1008};
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
index 34cf019bba44..ab57d387d6b5 100644
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -53,19 +53,19 @@ static struct fb_fix_screeninfo tridentfb_fix = {
53/* defaults which are normally overriden by user values */ 53/* defaults which are normally overriden by user values */
54 54
55/* video mode */ 55/* video mode */
56static char *mode_option __devinitdata = "640x480-8@60"; 56static char *mode_option = "640x480-8@60";
57static int bpp __devinitdata = 8; 57static int bpp = 8;
58 58
59static int noaccel __devinitdata; 59static int noaccel;
60 60
61static int center; 61static int center;
62static int stretch; 62static int stretch;
63 63
64static int fp __devinitdata; 64static int fp;
65static int crt __devinitdata; 65static int crt;
66 66
67static int memsize __devinitdata; 67static int memsize;
68static int memdiff __devinitdata; 68static int memdiff;
69static int nativex; 69static int nativex;
70 70
71module_param(mode_option, charp, 0); 71module_param(mode_option, charp, 0);
@@ -637,7 +637,7 @@ static inline void crtc_unlock(struct tridentfb_par *par)
637} 637}
638 638
639/* Return flat panel's maximum x resolution */ 639/* Return flat panel's maximum x resolution */
640static int __devinit get_nativex(struct tridentfb_par *par) 640static int get_nativex(struct tridentfb_par *par)
641{ 641{
642 int x, y, tmp; 642 int x, y, tmp;
643 643
@@ -771,7 +771,7 @@ static void set_number_of_lines(struct tridentfb_par *par, int lines)
771 * If we see that FP is active we assume we have one. 771 * If we see that FP is active we assume we have one.
772 * Otherwise we have a CRT display. User can override. 772 * Otherwise we have a CRT display. User can override.
773 */ 773 */
774static int __devinit is_flatpanel(struct tridentfb_par *par) 774static int is_flatpanel(struct tridentfb_par *par)
775{ 775{
776 if (fp) 776 if (fp)
777 return 1; 777 return 1;
@@ -781,7 +781,7 @@ static int __devinit is_flatpanel(struct tridentfb_par *par)
781} 781}
782 782
783/* Try detecting the video memory size */ 783/* Try detecting the video memory size */
784static unsigned int __devinit get_memsize(struct tridentfb_par *par) 784static unsigned int get_memsize(struct tridentfb_par *par)
785{ 785{
786 unsigned char tmp, tmp2; 786 unsigned char tmp, tmp2;
787 unsigned int k; 787 unsigned int k;
@@ -1331,8 +1331,8 @@ static struct fb_ops tridentfb_ops = {
1331 .fb_sync = tridentfb_sync, 1331 .fb_sync = tridentfb_sync,
1332}; 1332};
1333 1333
1334static int __devinit trident_pci_probe(struct pci_dev *dev, 1334static int trident_pci_probe(struct pci_dev *dev,
1335 const struct pci_device_id *id) 1335 const struct pci_device_id *id)
1336{ 1336{
1337 int err; 1337 int err;
1338 unsigned char revision; 1338 unsigned char revision;
@@ -1543,7 +1543,7 @@ out_unmap1:
1543 return err; 1543 return err;
1544} 1544}
1545 1545
1546static void __devexit trident_pci_remove(struct pci_dev *dev) 1546static void trident_pci_remove(struct pci_dev *dev)
1547{ 1547{
1548 struct fb_info *info = pci_get_drvdata(dev); 1548 struct fb_info *info = pci_get_drvdata(dev);
1549 struct tridentfb_par *par = info->par; 1549 struct tridentfb_par *par = info->par;
@@ -1591,7 +1591,7 @@ static struct pci_driver tridentfb_pci_driver = {
1591 .name = "tridentfb", 1591 .name = "tridentfb",
1592 .id_table = trident_devices, 1592 .id_table = trident_devices,
1593 .probe = trident_pci_probe, 1593 .probe = trident_pci_probe,
1594 .remove = __devexit_p(trident_pci_remove) 1594 .remove = trident_pci_remove,
1595}; 1595};
1596 1596
1597/* 1597/*
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 2f8f82d874a1..b75db0186488 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -36,26 +36,26 @@ static struct cb_id uvesafb_cn_id = {
36static char v86d_path[PATH_MAX] = "/sbin/v86d"; 36static char v86d_path[PATH_MAX] = "/sbin/v86d";
37static char v86d_started; /* has v86d been started by uvesafb? */ 37static char v86d_started; /* has v86d been started by uvesafb? */
38 38
39static struct fb_fix_screeninfo uvesafb_fix __devinitdata = { 39static struct fb_fix_screeninfo uvesafb_fix = {
40 .id = "VESA VGA", 40 .id = "VESA VGA",
41 .type = FB_TYPE_PACKED_PIXELS, 41 .type = FB_TYPE_PACKED_PIXELS,
42 .accel = FB_ACCEL_NONE, 42 .accel = FB_ACCEL_NONE,
43 .visual = FB_VISUAL_TRUECOLOR, 43 .visual = FB_VISUAL_TRUECOLOR,
44}; 44};
45 45
46static int mtrr __devinitdata = 3; /* enable mtrr by default */ 46static int mtrr = 3; /* enable mtrr by default */
47static bool blank = 1; /* enable blanking by default */ 47static bool blank = 1; /* enable blanking by default */
48static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */ 48static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */
49static bool pmi_setpal __devinitdata = true; /* use PMI for palette changes */ 49static bool pmi_setpal = true; /* use PMI for palette changes */
50static bool nocrtc __devinitdata; /* ignore CRTC settings */ 50static bool nocrtc; /* ignore CRTC settings */
51static bool noedid __devinitdata; /* don't try DDC transfers */ 51static bool noedid; /* don't try DDC transfers */
52static int vram_remap __devinitdata; /* set amt. of memory to be used */ 52static int vram_remap; /* set amt. of memory to be used */
53static int vram_total __devinitdata; /* set total amount of memory */ 53static int vram_total; /* set total amount of memory */
54static u16 maxclk __devinitdata; /* maximum pixel clock */ 54static u16 maxclk; /* maximum pixel clock */
55static u16 maxvf __devinitdata; /* maximum vertical frequency */ 55static u16 maxvf; /* maximum vertical frequency */
56static u16 maxhf __devinitdata; /* maximum horizontal frequency */ 56static u16 maxhf; /* maximum horizontal frequency */
57static u16 vbemode __devinitdata; /* force use of a specific VBE mode */ 57static u16 vbemode; /* force use of a specific VBE mode */
58static char *mode_option __devinitdata; 58static char *mode_option;
59static u8 dac_width = 6; 59static u8 dac_width = 6;
60 60
61static struct uvesafb_ktask *uvfb_tasks[UVESAFB_TASKS_MAX]; 61static struct uvesafb_ktask *uvfb_tasks[UVESAFB_TASKS_MAX];
@@ -418,8 +418,8 @@ static void uvesafb_vbe_state_restore(struct uvesafb_par *par, u8 *state_buf)
418 uvesafb_free(task); 418 uvesafb_free(task);
419} 419}
420 420
421static int __devinit uvesafb_vbe_getinfo(struct uvesafb_ktask *task, 421static int uvesafb_vbe_getinfo(struct uvesafb_ktask *task,
422 struct uvesafb_par *par) 422 struct uvesafb_par *par)
423{ 423{
424 int err; 424 int err;
425 425
@@ -477,8 +477,8 @@ static int __devinit uvesafb_vbe_getinfo(struct uvesafb_ktask *task,
477 return 0; 477 return 0;
478} 478}
479 479
480static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task, 480static int uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
481 struct uvesafb_par *par) 481 struct uvesafb_par *par)
482{ 482{
483 int off = 0, err; 483 int off = 0, err;
484 u16 *mode; 484 u16 *mode;
@@ -556,8 +556,8 @@ static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
556 * x86 and not x86_64. 556 * x86 and not x86_64.
557 */ 557 */
558#ifdef CONFIG_X86_32 558#ifdef CONFIG_X86_32
559static int __devinit uvesafb_vbe_getpmi(struct uvesafb_ktask *task, 559static int uvesafb_vbe_getpmi(struct uvesafb_ktask *task,
560 struct uvesafb_par *par) 560 struct uvesafb_par *par)
561{ 561{
562 int i, err; 562 int i, err;
563 563
@@ -602,8 +602,8 @@ static int __devinit uvesafb_vbe_getpmi(struct uvesafb_ktask *task,
602 * Check whether a video mode is supported by the Video BIOS and is 602 * Check whether a video mode is supported by the Video BIOS and is
603 * compatible with the monitor limits. 603 * compatible with the monitor limits.
604 */ 604 */
605static int __devinit uvesafb_is_valid_mode(struct fb_videomode *mode, 605static int uvesafb_is_valid_mode(struct fb_videomode *mode,
606 struct fb_info *info) 606 struct fb_info *info)
607{ 607{
608 if (info->monspecs.gtf) { 608 if (info->monspecs.gtf) {
609 fb_videomode_to_var(&info->var, mode); 609 fb_videomode_to_var(&info->var, mode);
@@ -618,8 +618,7 @@ static int __devinit uvesafb_is_valid_mode(struct fb_videomode *mode,
618 return 1; 618 return 1;
619} 619}
620 620
621static int __devinit uvesafb_vbe_getedid(struct uvesafb_ktask *task, 621static int uvesafb_vbe_getedid(struct uvesafb_ktask *task, struct fb_info *info)
622 struct fb_info *info)
623{ 622{
624 struct uvesafb_par *par = info->par; 623 struct uvesafb_par *par = info->par;
625 int err = 0; 624 int err = 0;
@@ -684,8 +683,8 @@ static int __devinit uvesafb_vbe_getedid(struct uvesafb_ktask *task,
684 return err; 683 return err;
685} 684}
686 685
687static void __devinit uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task, 686static void uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task,
688 struct fb_info *info) 687 struct fb_info *info)
689{ 688{
690 struct uvesafb_par *par = info->par; 689 struct uvesafb_par *par = info->par;
691 int i; 690 int i;
@@ -765,8 +764,8 @@ static void __devinit uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task,
765 return; 764 return;
766} 765}
767 766
768static void __devinit uvesafb_vbe_getstatesize(struct uvesafb_ktask *task, 767static void uvesafb_vbe_getstatesize(struct uvesafb_ktask *task,
769 struct uvesafb_par *par) 768 struct uvesafb_par *par)
770{ 769{
771 int err; 770 int err;
772 771
@@ -794,7 +793,7 @@ static void __devinit uvesafb_vbe_getstatesize(struct uvesafb_ktask *task,
794 par->vbe_state_size = 64 * (task->t.regs.ebx & 0xffff); 793 par->vbe_state_size = 64 * (task->t.regs.ebx & 0xffff);
795} 794}
796 795
797static int __devinit uvesafb_vbe_init(struct fb_info *info) 796static int uvesafb_vbe_init(struct fb_info *info)
798{ 797{
799 struct uvesafb_ktask *task = NULL; 798 struct uvesafb_ktask *task = NULL;
800 struct uvesafb_par *par = info->par; 799 struct uvesafb_par *par = info->par;
@@ -839,7 +838,7 @@ out: uvesafb_free(task);
839 return err; 838 return err;
840} 839}
841 840
842static int __devinit uvesafb_vbe_init_mode(struct fb_info *info) 841static int uvesafb_vbe_init_mode(struct fb_info *info)
843{ 842{
844 struct list_head *pos; 843 struct list_head *pos;
845 struct fb_modelist *modelist; 844 struct fb_modelist *modelist;
@@ -1444,8 +1443,7 @@ static struct fb_ops uvesafb_ops = {
1444 .fb_set_par = uvesafb_set_par, 1443 .fb_set_par = uvesafb_set_par,
1445}; 1444};
1446 1445
1447static void __devinit uvesafb_init_info(struct fb_info *info, 1446static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode)
1448 struct vbe_mode_ib *mode)
1449{ 1447{
1450 unsigned int size_vmode; 1448 unsigned int size_vmode;
1451 unsigned int size_remap; 1449 unsigned int size_remap;
@@ -1540,7 +1538,7 @@ static void __devinit uvesafb_init_info(struct fb_info *info,
1540 info->fbops->fb_pan_display = NULL; 1538 info->fbops->fb_pan_display = NULL;
1541} 1539}
1542 1540
1543static void __devinit uvesafb_init_mtrr(struct fb_info *info) 1541static void uvesafb_init_mtrr(struct fb_info *info)
1544{ 1542{
1545#ifdef CONFIG_MTRR 1543#ifdef CONFIG_MTRR
1546 if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { 1544 if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) {
@@ -1582,7 +1580,7 @@ static void __devinit uvesafb_init_mtrr(struct fb_info *info)
1582#endif /* CONFIG_MTRR */ 1580#endif /* CONFIG_MTRR */
1583} 1581}
1584 1582
1585static void __devinit uvesafb_ioremap(struct fb_info *info) 1583static void uvesafb_ioremap(struct fb_info *info)
1586{ 1584{
1587#ifdef CONFIG_X86 1585#ifdef CONFIG_X86
1588 switch (mtrr) { 1586 switch (mtrr) {
@@ -1738,7 +1736,7 @@ static struct attribute_group uvesafb_dev_attgrp = {
1738 .attrs = uvesafb_dev_attrs, 1736 .attrs = uvesafb_dev_attrs,
1739}; 1737};
1740 1738
1741static int __devinit uvesafb_probe(struct platform_device *dev) 1739static int uvesafb_probe(struct platform_device *dev)
1742{ 1740{
1743 struct fb_info *info; 1741 struct fb_info *info;
1744 struct vbe_mode_ib *mode = NULL; 1742 struct vbe_mode_ib *mode = NULL;
@@ -1882,7 +1880,7 @@ static struct platform_driver uvesafb_driver = {
1882static struct platform_device *uvesafb_device; 1880static struct platform_device *uvesafb_device;
1883 1881
1884#ifndef MODULE 1882#ifndef MODULE
1885static int __devinit uvesafb_setup(char *options) 1883static int uvesafb_setup(char *options)
1886{ 1884{
1887 char *this_opt; 1885 char *this_opt;
1888 1886
@@ -1950,7 +1948,7 @@ static ssize_t store_v86d(struct device_driver *dev, const char *buf,
1950 1948
1951static DRIVER_ATTR(v86d, S_IRUGO | S_IWUSR, show_v86d, store_v86d); 1949static DRIVER_ATTR(v86d, S_IRUGO | S_IWUSR, show_v86d, store_v86d);
1952 1950
1953static int __devinit uvesafb_init(void) 1951static int uvesafb_init(void)
1954{ 1952{
1955 int err; 1953 int err;
1956 1954
@@ -1994,7 +1992,7 @@ static int __devinit uvesafb_init(void)
1994 1992
1995module_init(uvesafb_init); 1993module_init(uvesafb_init);
1996 1994
1997static void __devexit uvesafb_exit(void) 1995static void uvesafb_exit(void)
1998{ 1996{
1999 struct uvesafb_ktask *task; 1997 struct uvesafb_ktask *task;
2000 1998
diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c
index 4709edc3cb7f..0aa516fc59cd 100644
--- a/drivers/video/vermilion/vermilion.c
+++ b/drivers/video/vermilion/vermilion.c
@@ -393,7 +393,7 @@ static void vmlfb_release_devices(struct vml_par *par)
393 * Free up allocated resources for a device. 393 * Free up allocated resources for a device.
394 */ 394 */
395 395
396static void __devexit vml_pci_remove(struct pci_dev *dev) 396static void vml_pci_remove(struct pci_dev *dev)
397{ 397{
398 struct fb_info *info; 398 struct fb_info *info;
399 struct vml_info *vinfo; 399 struct vml_info *vinfo;
@@ -452,8 +452,7 @@ static void vmlfb_set_pref_pixel_format(struct fb_var_screeninfo *var)
452 * struct per pipe. Currently we have only one pipe. 452 * struct per pipe. Currently we have only one pipe.
453 */ 453 */
454 454
455static int __devinit vml_pci_probe(struct pci_dev *dev, 455static int vml_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
456 const struct pci_device_id *id)
457{ 456{
458 struct vml_info *vinfo; 457 struct vml_info *vinfo;
459 struct fb_info *info; 458 struct fb_info *info;
@@ -1060,7 +1059,7 @@ static struct pci_driver vmlfb_pci_driver = {
1060 .name = "vmlfb", 1059 .name = "vmlfb",
1061 .id_table = vml_ids, 1060 .id_table = vml_ids,
1062 .probe = vml_pci_probe, 1061 .probe = vml_pci_probe,
1063 .remove = __devexit_p(vml_pci_remove) 1062 .remove = vml_pci_remove,
1064}; 1063};
1065 1064
1066static void __exit vmlfb_cleanup(void) 1065static void __exit vmlfb_cleanup(void)
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
index c7f692525b88..8bc1f9398945 100644
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -78,7 +78,7 @@ static void rvfree(void *mem, unsigned long size)
78 vfree(mem); 78 vfree(mem);
79} 79}
80 80
81static struct fb_var_screeninfo vfb_default __devinitdata = { 81static struct fb_var_screeninfo vfb_default = {
82 .xres = 640, 82 .xres = 640,
83 .yres = 480, 83 .yres = 480,
84 .xres_virtual = 640, 84 .xres_virtual = 640,
@@ -100,7 +100,7 @@ static struct fb_var_screeninfo vfb_default __devinitdata = {
100 .vmode = FB_VMODE_NONINTERLACED, 100 .vmode = FB_VMODE_NONINTERLACED,
101}; 101};
102 102
103static struct fb_fix_screeninfo vfb_fix __devinitdata = { 103static struct fb_fix_screeninfo vfb_fix = {
104 .id = "Virtual FB", 104 .id = "Virtual FB",
105 .type = FB_TYPE_PACKED_PIXELS, 105 .type = FB_TYPE_PACKED_PIXELS,
106 .visual = FB_VISUAL_PSEUDOCOLOR, 106 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -477,7 +477,7 @@ static int __init vfb_setup(char *options)
477 * Initialisation 477 * Initialisation
478 */ 478 */
479 479
480static int __devinit vfb_probe(struct platform_device *dev) 480static int vfb_probe(struct platform_device *dev)
481{ 481{
482 struct fb_info *info; 482 struct fb_info *info;
483 int retval = -ENOMEM; 483 int retval = -ENOMEM;
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
index 0267acd8dc83..545faeccdb44 100644
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -65,7 +65,7 @@ struct vga16fb_par {
65 65
66/* --------------------------------------------------------------------- */ 66/* --------------------------------------------------------------------- */
67 67
68static struct fb_var_screeninfo vga16fb_defined __devinitdata = { 68static struct fb_var_screeninfo vga16fb_defined = {
69 .xres = 640, 69 .xres = 640,
70 .yres = 480, 70 .yres = 480,
71 .xres_virtual = 640, 71 .xres_virtual = 640,
@@ -85,7 +85,7 @@ static struct fb_var_screeninfo vga16fb_defined __devinitdata = {
85}; 85};
86 86
87/* name should not depend on EGA/VGA */ 87/* name should not depend on EGA/VGA */
88static struct fb_fix_screeninfo vga16fb_fix __devinitdata = { 88static struct fb_fix_screeninfo vga16fb_fix = {
89 .id = "VGA16 VGA", 89 .id = "VGA16 VGA",
90 .smem_start = VGA_FB_PHYS, 90 .smem_start = VGA_FB_PHYS,
91 .smem_len = VGA_FB_PHYS_LEN, 91 .smem_len = VGA_FB_PHYS_LEN,
@@ -1303,7 +1303,7 @@ static int __init vga16fb_setup(char *options)
1303} 1303}
1304#endif 1304#endif
1305 1305
1306static int __devinit vga16fb_probe(struct platform_device *dev) 1306static int vga16fb_probe(struct platform_device *dev)
1307{ 1307{
1308 struct fb_info *info; 1308 struct fb_info *info;
1309 struct vga16fb_par *par; 1309 struct vga16fb_par *par;
@@ -1395,7 +1395,7 @@ static int __devinit vga16fb_probe(struct platform_device *dev)
1395 return ret; 1395 return ret;
1396} 1396}
1397 1397
1398static int __devexit vga16fb_remove(struct platform_device *dev) 1398static int vga16fb_remove(struct platform_device *dev)
1399{ 1399{
1400 struct fb_info *info = platform_get_drvdata(dev); 1400 struct fb_info *info = platform_get_drvdata(dev);
1401 1401
@@ -1407,7 +1407,7 @@ static int __devexit vga16fb_remove(struct platform_device *dev)
1407 1407
1408static struct platform_driver vga16fb_driver = { 1408static struct platform_driver vga16fb_driver = {
1409 .probe = vga16fb_probe, 1409 .probe = vga16fb_probe,
1410 .remove = __devexit_p(vga16fb_remove), 1410 .remove = vga16fb_remove,
1411 .driver = { 1411 .driver = {
1412 .name = "vga16fb", 1412 .name = "vga16fb",
1413 }, 1413 },
diff --git a/drivers/video/via/dvi.c b/drivers/video/via/dvi.c
index 6be72f0ba21d..7789553952d3 100644
--- a/drivers/video/via/dvi.c
+++ b/drivers/video/via/dvi.c
@@ -25,7 +25,7 @@
25static void tmds_register_write(int index, u8 data); 25static void tmds_register_write(int index, u8 data);
26static int tmds_register_read(int index); 26static int tmds_register_read(int index);
27static int tmds_register_read_bytes(int index, u8 *buff, int buff_len); 27static int tmds_register_read_bytes(int index, u8 *buff, int buff_len);
28static void __devinit dvi_get_panel_size_from_DDCv1( 28static void dvi_get_panel_size_from_DDCv1(
29 struct tmds_chip_information *tmds_chip, 29 struct tmds_chip_information *tmds_chip,
30 struct tmds_setting_information *tmds_setting); 30 struct tmds_setting_information *tmds_setting);
31static int viafb_dvi_query_EDID(void); 31static int viafb_dvi_query_EDID(void);
@@ -35,8 +35,8 @@ static inline bool check_tmds_chip(int device_id_subaddr, int device_id)
35 return tmds_register_read(device_id_subaddr) == device_id; 35 return tmds_register_read(device_id_subaddr) == device_id;
36} 36}
37 37
38void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, 38void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip,
39 struct tmds_setting_information *tmds_setting) 39 struct tmds_setting_information *tmds_setting)
40{ 40{
41 DEBUG_MSG(KERN_INFO "viafb_init_dvi_size()\n"); 41 DEBUG_MSG(KERN_INFO "viafb_init_dvi_size()\n");
42 42
@@ -47,7 +47,7 @@ void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip,
47 return; 47 return;
48} 48}
49 49
50bool __devinit viafb_tmds_trasmitter_identify(void) 50bool viafb_tmds_trasmitter_identify(void)
51{ 51{
52 unsigned char sr2a = 0, sr1e = 0, sr3e = 0; 52 unsigned char sr2a = 0, sr1e = 0, sr3e = 0;
53 53
@@ -285,7 +285,7 @@ static int viafb_dvi_query_EDID(void)
285} 285}
286 286
287/* Get Panel Size Using EDID1 Table */ 287/* Get Panel Size Using EDID1 Table */
288static void __devinit dvi_get_panel_size_from_DDCv1( 288static void dvi_get_panel_size_from_DDCv1(
289 struct tmds_chip_information *tmds_chip, 289 struct tmds_chip_information *tmds_chip,
290 struct tmds_setting_information *tmds_setting) 290 struct tmds_setting_information *tmds_setting)
291{ 291{
diff --git a/drivers/video/via/dvi.h b/drivers/video/via/dvi.h
index db757850c216..4c6bfba57d11 100644
--- a/drivers/video/via/dvi.h
+++ b/drivers/video/via/dvi.h
@@ -56,8 +56,8 @@
56int viafb_dvi_sense(void); 56int viafb_dvi_sense(void);
57void viafb_dvi_disable(void); 57void viafb_dvi_disable(void);
58void viafb_dvi_enable(void); 58void viafb_dvi_enable(void);
59bool __devinit viafb_tmds_trasmitter_identify(void); 59bool viafb_tmds_trasmitter_identify(void);
60void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, 60void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip,
61 struct tmds_setting_information *tmds_setting); 61 struct tmds_setting_information *tmds_setting);
62void viafb_dvi_set_mode(const struct fb_var_screeninfo *var, 62void viafb_dvi_set_mode(const struct fb_var_screeninfo *var,
63 u16 cxres, u16 cyres, int iga); 63 u16 cxres, u16 cyres, int iga);
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index 898590db5e14..80233dae358a 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -465,9 +465,9 @@ static struct via_device_mapping device_mapping[] = {
465static struct via_clock clock; 465static struct via_clock clock;
466 466
467static void load_fix_bit_crtc_reg(void); 467static void load_fix_bit_crtc_reg(void);
468static void __devinit init_gfx_chip_info(int chip_type); 468static void init_gfx_chip_info(int chip_type);
469static void __devinit init_tmds_chip_info(void); 469static void init_tmds_chip_info(void);
470static void __devinit init_lvds_chip_info(void); 470static void init_lvds_chip_info(void);
471static void device_screen_off(void); 471static void device_screen_off(void);
472static void device_screen_on(void); 472static void device_screen_on(void);
473static void set_display_channel(void); 473static void set_display_channel(void);
@@ -1507,7 +1507,7 @@ void viafb_fill_crtc_timing(const struct fb_var_screeninfo *var,
1507 viafb_set_vclock(PICOS2KHZ(var->pixclock) * 1000, iga); 1507 viafb_set_vclock(PICOS2KHZ(var->pixclock) * 1000, iga);
1508} 1508}
1509 1509
1510void __devinit viafb_init_chip_info(int chip_type) 1510void viafb_init_chip_info(int chip_type)
1511{ 1511{
1512 via_clock_init(&clock, chip_type); 1512 via_clock_init(&clock, chip_type);
1513 init_gfx_chip_info(chip_type); 1513 init_gfx_chip_info(chip_type);
@@ -1540,7 +1540,7 @@ void viafb_update_device_setting(int hres, int vres, int bpp, int flag)
1540 } 1540 }
1541} 1541}
1542 1542
1543static void __devinit init_gfx_chip_info(int chip_type) 1543static void init_gfx_chip_info(int chip_type)
1544{ 1544{
1545 u8 tmp; 1545 u8 tmp;
1546 1546
@@ -1593,7 +1593,7 @@ static void __devinit init_gfx_chip_info(int chip_type)
1593 } 1593 }
1594} 1594}
1595 1595
1596static void __devinit init_tmds_chip_info(void) 1596static void init_tmds_chip_info(void)
1597{ 1597{
1598 viafb_tmds_trasmitter_identify(); 1598 viafb_tmds_trasmitter_identify();
1599 1599
@@ -1638,7 +1638,7 @@ static void __devinit init_tmds_chip_info(void)
1638 &viaparinfo->shared->tmds_setting_info); 1638 &viaparinfo->shared->tmds_setting_info);
1639} 1639}
1640 1640
1641static void __devinit init_lvds_chip_info(void) 1641static void init_lvds_chip_info(void)
1642{ 1642{
1643 viafb_lvds_trasmitter_identify(); 1643 viafb_lvds_trasmitter_identify();
1644 viafb_init_lcd_size(); 1644 viafb_init_lcd_size();
@@ -1672,7 +1672,7 @@ static void __devinit init_lvds_chip_info(void)
1672 viaparinfo->chip_info->lvds_chip_info.output_interface); 1672 viaparinfo->chip_info->lvds_chip_info.output_interface);
1673} 1673}
1674 1674
1675void __devinit viafb_init_dac(int set_iga) 1675void viafb_init_dac(int set_iga)
1676{ 1676{
1677 int i; 1677 int i;
1678 u8 tmp; 1678 u8 tmp;
diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h
index 6be243cfc823..a8205754c736 100644
--- a/drivers/video/via/hw.h
+++ b/drivers/video/via/hw.h
@@ -663,8 +663,8 @@ void viafb_set_dpa_gfx(int output_interface, struct GFX_DPA_SETTING\
663int viafb_setmode(void); 663int viafb_setmode(void);
664void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, 664void viafb_fill_var_timing_info(struct fb_var_screeninfo *var,
665 const struct fb_videomode *mode); 665 const struct fb_videomode *mode);
666void __devinit viafb_init_chip_info(int chip_type); 666void viafb_init_chip_info(int chip_type);
667void __devinit viafb_init_dac(int set_iga); 667void viafb_init_dac(int set_iga);
668int viafb_get_refresh(int hres, int vres, u32 float_refresh); 668int viafb_get_refresh(int hres, int vres, u32 float_refresh);
669void viafb_update_device_setting(int hres, int vres, int bpp, int flag); 669void viafb_update_device_setting(int hres, int vres, int bpp, int flag);
670 670
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
index 165037910536..980ee1b1dcf3 100644
--- a/drivers/video/via/lcd.c
+++ b/drivers/video/via/lcd.c
@@ -49,7 +49,7 @@ static struct _lcd_scaling_factor lcd_scaling_factor_CLE = {
49}; 49};
50 50
51static bool lvds_identify_integratedlvds(void); 51static bool lvds_identify_integratedlvds(void);
52static void __devinit fp_id_to_vindex(int panel_id); 52static void fp_id_to_vindex(int panel_id);
53static int lvds_register_read(int index); 53static int lvds_register_read(int index);
54static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres, 54static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres,
55 int panel_vres); 55 int panel_vres);
@@ -81,7 +81,7 @@ static inline bool check_lvds_chip(int device_id_subaddr, int device_id)
81 return lvds_register_read(device_id_subaddr) == device_id; 81 return lvds_register_read(device_id_subaddr) == device_id;
82} 82}
83 83
84void __devinit viafb_init_lcd_size(void) 84void viafb_init_lcd_size(void)
85{ 85{
86 DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); 86 DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n");
87 87
@@ -139,7 +139,7 @@ static bool lvds_identify_integratedlvds(void)
139 return true; 139 return true;
140} 140}
141 141
142bool __devinit viafb_lvds_trasmitter_identify(void) 142bool viafb_lvds_trasmitter_identify(void)
143{ 143{
144 if (viafb_lvds_identify_vt1636(VIA_PORT_31)) { 144 if (viafb_lvds_identify_vt1636(VIA_PORT_31)) {
145 viaparinfo->chip_info->lvds_chip_info.i2c_port = VIA_PORT_31; 145 viaparinfo->chip_info->lvds_chip_info.i2c_port = VIA_PORT_31;
@@ -180,7 +180,7 @@ bool __devinit viafb_lvds_trasmitter_identify(void)
180 return false; 180 return false;
181} 181}
182 182
183static void __devinit fp_id_to_vindex(int panel_id) 183static void fp_id_to_vindex(int panel_id)
184{ 184{
185 DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n"); 185 DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n");
186 186
@@ -914,7 +914,7 @@ static void check_diport_of_integrated_lvds(
914 plvds_chip_info->output_interface); 914 plvds_chip_info->output_interface);
915} 915}
916 916
917void __devinit viafb_init_lvds_output_interface(struct lvds_chip_information 917void viafb_init_lvds_output_interface(struct lvds_chip_information
918 *plvds_chip_info, 918 *plvds_chip_info,
919 struct lvds_setting_information 919 struct lvds_setting_information
920 *plvds_setting_info) 920 *plvds_setting_info)
diff --git a/drivers/video/via/lcd.h b/drivers/video/via/lcd.h
index 8f3e4e06156c..5c988a063ad5 100644
--- a/drivers/video/via/lcd.h
+++ b/drivers/video/via/lcd.h
@@ -71,15 +71,15 @@ void viafb_enable_lvds_vt1636(struct lvds_setting_information
71 struct lvds_chip_information *plvds_chip_info); 71 struct lvds_chip_information *plvds_chip_info);
72void viafb_lcd_disable(void); 72void viafb_lcd_disable(void);
73void viafb_lcd_enable(void); 73void viafb_lcd_enable(void);
74void __devinit viafb_init_lcd_size(void); 74void viafb_init_lcd_size(void);
75void __devinit viafb_init_lvds_output_interface(struct lvds_chip_information 75void viafb_init_lvds_output_interface(struct lvds_chip_information
76 *plvds_chip_info, 76 *plvds_chip_info,
77 struct lvds_setting_information 77 struct lvds_setting_information
78 *plvds_setting_info); 78 *plvds_setting_info);
79void viafb_lcd_set_mode(const struct fb_var_screeninfo *var, u16 cxres, 79void viafb_lcd_set_mode(const struct fb_var_screeninfo *var, u16 cxres,
80 u16 cyres, struct lvds_setting_information *plvds_setting_info, 80 u16 cyres, struct lvds_setting_information *plvds_setting_info,
81 struct lvds_chip_information *plvds_chip_info); 81 struct lvds_chip_information *plvds_chip_info);
82bool __devinit viafb_lvds_trasmitter_identify(void); 82bool viafb_lvds_trasmitter_identify(void);
83void viafb_init_lvds_output_interface(struct lvds_chip_information 83void viafb_init_lvds_output_interface(struct lvds_chip_information
84 *plvds_chip_info, 84 *plvds_chip_info,
85 struct lvds_setting_information 85 struct lvds_setting_information
diff --git a/drivers/video/via/via-core.c b/drivers/video/via/via-core.c
index dd58b530c0df..6e274825fb31 100644
--- a/drivers/video/via/via-core.c
+++ b/drivers/video/via/via-core.c
@@ -80,7 +80,7 @@ static inline int viafb_mmio_read(int reg)
80 */ 80 */
81static u32 viafb_enabled_ints; 81static u32 viafb_enabled_ints;
82 82
83static void __devinit viafb_int_init(void) 83static void viafb_int_init(void)
84{ 84{
85 viafb_enabled_ints = 0; 85 viafb_enabled_ints = 0;
86 86
@@ -475,7 +475,7 @@ static int viafb_get_fb_size_from_pci(int chip_type)
475/* 475/*
476 * Figure out and map our MMIO regions. 476 * Figure out and map our MMIO regions.
477 */ 477 */
478static int __devinit via_pci_setup_mmio(struct viafb_dev *vdev) 478static int via_pci_setup_mmio(struct viafb_dev *vdev)
479{ 479{
480 int ret; 480 int ret;
481 /* 481 /*
@@ -550,8 +550,8 @@ static struct viafb_subdev_info {
550}; 550};
551#define N_SUBDEVS ARRAY_SIZE(viafb_subdevs) 551#define N_SUBDEVS ARRAY_SIZE(viafb_subdevs)
552 552
553static int __devinit via_create_subdev(struct viafb_dev *vdev, 553static int via_create_subdev(struct viafb_dev *vdev,
554 struct viafb_subdev_info *info) 554 struct viafb_subdev_info *info)
555{ 555{
556 int ret; 556 int ret;
557 557
@@ -573,7 +573,7 @@ static int __devinit via_create_subdev(struct viafb_dev *vdev,
573 return ret; 573 return ret;
574} 574}
575 575
576static int __devinit via_setup_subdevs(struct viafb_dev *vdev) 576static int via_setup_subdevs(struct viafb_dev *vdev)
577{ 577{
578 int i; 578 int i;
579 579
@@ -671,8 +671,7 @@ static int via_resume(struct pci_dev *pdev)
671} 671}
672#endif /* CONFIG_PM */ 672#endif /* CONFIG_PM */
673 673
674static int __devinit via_pci_probe(struct pci_dev *pdev, 674static int via_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
675 const struct pci_device_id *ent)
676{ 675{
677 int ret; 676 int ret;
678 677
@@ -716,7 +715,7 @@ out_disable:
716 return ret; 715 return ret;
717} 716}
718 717
719static void __devexit via_pci_remove(struct pci_dev *pdev) 718static void via_pci_remove(struct pci_dev *pdev)
720{ 719{
721 via_teardown_subdevs(); 720 via_teardown_subdevs();
722 via_fb_pci_remove(pdev); 721 via_fb_pci_remove(pdev);
@@ -725,7 +724,7 @@ static void __devexit via_pci_remove(struct pci_dev *pdev)
725} 724}
726 725
727 726
728static struct pci_device_id via_pci_table[] __devinitdata = { 727static struct pci_device_id via_pci_table[] = {
729 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID), 728 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID),
730 .driver_data = UNICHROME_CLE266 }, 729 .driver_data = UNICHROME_CLE266 },
731 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID), 730 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID),
@@ -760,7 +759,7 @@ static struct pci_driver via_driver = {
760 .name = "viafb", 759 .name = "viafb",
761 .id_table = via_pci_table, 760 .id_table = via_pci_table,
762 .probe = via_pci_probe, 761 .probe = via_pci_probe,
763 .remove = __devexit_p(via_pci_remove), 762 .remove = via_pci_remove,
764#ifdef CONFIG_PM 763#ifdef CONFIG_PM
765 .suspend = via_suspend, 764 .suspend = via_suspend,
766 .resume = via_resume, 765 .resume = via_resume,
diff --git a/drivers/video/via/via-gpio.c b/drivers/video/via/via-gpio.c
index d69cfef7c338..e408679081ab 100644
--- a/drivers/video/via/via-gpio.c
+++ b/drivers/video/via/via-gpio.c
@@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(viafb_gpio_lookup);
212/* 212/*
213 * Platform device stuff. 213 * Platform device stuff.
214 */ 214 */
215static __devinit int viafb_gpio_probe(struct platform_device *platdev) 215static int viafb_gpio_probe(struct platform_device *platdev)
216{ 216{
217 struct viafb_dev *vdev = platdev->dev.platform_data; 217 struct viafb_dev *vdev = platdev->dev.platform_data;
218 struct via_port_cfg *port_cfg = vdev->port_cfg; 218 struct via_port_cfg *port_cfg = vdev->port_cfg;
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index c80e770e1800..325c43c6ff97 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -1072,7 +1072,7 @@ static int __init parse_active_dev(void)
1072 return 0; 1072 return 0;
1073} 1073}
1074 1074
1075static int __devinit parse_port(char *opt_str, int *output_interface) 1075static int parse_port(char *opt_str, int *output_interface)
1076{ 1076{
1077 if (!strncmp(opt_str, "DVP0", 4)) 1077 if (!strncmp(opt_str, "DVP0", 4))
1078 *output_interface = INTERFACE_DVP0; 1078 *output_interface = INTERFACE_DVP0;
@@ -1089,7 +1089,7 @@ static int __devinit parse_port(char *opt_str, int *output_interface)
1089 return 0; 1089 return 0;
1090} 1090}
1091 1091
1092static void __devinit parse_lcd_port(void) 1092static void parse_lcd_port(void)
1093{ 1093{
1094 parse_port(viafb_lcd_port, &viaparinfo->chip_info->lvds_chip_info. 1094 parse_port(viafb_lcd_port, &viaparinfo->chip_info->lvds_chip_info.
1095 output_interface); 1095 output_interface);
@@ -1102,7 +1102,7 @@ static void __devinit parse_lcd_port(void)
1102 output_interface); 1102 output_interface);
1103} 1103}
1104 1104
1105static void __devinit parse_dvi_port(void) 1105static void parse_dvi_port(void)
1106{ 1106{
1107 parse_port(viafb_dvi_port, &viaparinfo->chip_info->tmds_chip_info. 1107 parse_port(viafb_dvi_port, &viaparinfo->chip_info->tmds_chip_info.
1108 output_interface); 1108 output_interface);
@@ -1727,7 +1727,7 @@ static struct viafb_pm_hooks viafb_fb_pm_hooks = {
1727 1727
1728#endif 1728#endif
1729 1729
1730static void __devinit i2c_bus_probe(struct viafb_shared *shared) 1730static void i2c_bus_probe(struct viafb_shared *shared)
1731{ 1731{
1732 /* should be always CRT */ 1732 /* should be always CRT */
1733 printk(KERN_INFO "viafb: Probing I2C bus 0x26\n"); 1733 printk(KERN_INFO "viafb: Probing I2C bus 0x26\n");
@@ -1753,7 +1753,7 @@ static void i2c_bus_free(struct viafb_shared *shared)
1753 via_aux_free(shared->i2c_2C); 1753 via_aux_free(shared->i2c_2C);
1754} 1754}
1755 1755
1756int __devinit via_fb_pci_probe(struct viafb_dev *vdev) 1756int via_fb_pci_probe(struct viafb_dev *vdev)
1757{ 1757{
1758 u32 default_xres, default_yres; 1758 u32 default_xres, default_yres;
1759 struct fb_var_screeninfo default_var; 1759 struct fb_var_screeninfo default_var;
@@ -1945,7 +1945,7 @@ out_fb_release:
1945 return rc; 1945 return rc;
1946} 1946}
1947 1947
1948void __devexit via_fb_pci_remove(struct pci_dev *pdev) 1948void via_fb_pci_remove(struct pci_dev *pdev)
1949{ 1949{
1950 DEBUG_MSG(KERN_INFO "via_pci_remove!\n"); 1950 DEBUG_MSG(KERN_INFO "via_pci_remove!\n");
1951 fb_dealloc_cmap(&viafbinfo->cmap); 1951 fb_dealloc_cmap(&viafbinfo->cmap);
diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c
index 9af8da70e781..aa2579c2364a 100644
--- a/drivers/video/vt8500lcdfb.c
+++ b/drivers/video/vt8500lcdfb.c
@@ -273,7 +273,7 @@ static irqreturn_t vt8500lcd_handle_irq(int irq, void *dev_id)
273 return IRQ_HANDLED; 273 return IRQ_HANDLED;
274} 274}
275 275
276static int __devinit vt8500lcd_probe(struct platform_device *pdev) 276static int vt8500lcd_probe(struct platform_device *pdev)
277{ 277{
278 struct vt8500lcd_info *fbi; 278 struct vt8500lcd_info *fbi;
279 struct resource *res; 279 struct resource *res;
@@ -469,7 +469,7 @@ failed:
469 return ret; 469 return ret;
470} 470}
471 471
472static int __devexit vt8500lcd_remove(struct platform_device *pdev) 472static int vt8500lcd_remove(struct platform_device *pdev)
473{ 473{
474 struct vt8500lcd_info *fbi = platform_get_drvdata(pdev); 474 struct vt8500lcd_info *fbi = platform_get_drvdata(pdev);
475 struct resource *res; 475 struct resource *res;
@@ -505,7 +505,7 @@ static const struct of_device_id via_dt_ids[] = {
505 505
506static struct platform_driver vt8500lcd_driver = { 506static struct platform_driver vt8500lcd_driver = {
507 .probe = vt8500lcd_probe, 507 .probe = vt8500lcd_probe,
508 .remove = __devexit_p(vt8500lcd_remove), 508 .remove = vt8500lcd_remove,
509 .driver = { 509 .driver = {
510 .owner = THIS_MODULE, 510 .owner = THIS_MODULE,
511 .name = "vt8500-lcd", 511 .name = "vt8500-lcd",
diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c
index 4e74d262cf3e..e9557fa014ee 100644
--- a/drivers/video/vt8623fb.c
+++ b/drivers/video/vt8623fb.c
@@ -660,7 +660,7 @@ static struct fb_ops vt8623fb_ops = {
660 660
661/* PCI probe */ 661/* PCI probe */
662 662
663static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) 663static int vt8623_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
664{ 664{
665 struct pci_bus_region bus_reg; 665 struct pci_bus_region bus_reg;
666 struct resource vga_res; 666 struct resource vga_res;
@@ -807,7 +807,7 @@ err_enable_device:
807 807
808/* PCI remove */ 808/* PCI remove */
809 809
810static void __devexit vt8623_pci_remove(struct pci_dev *dev) 810static void vt8623_pci_remove(struct pci_dev *dev)
811{ 811{
812 struct fb_info *info = pci_get_drvdata(dev); 812 struct fb_info *info = pci_get_drvdata(dev);
813 813
@@ -906,7 +906,7 @@ fail:
906 906
907/* List of boards that we are trying to support */ 907/* List of boards that we are trying to support */
908 908
909static struct pci_device_id vt8623_devices[] __devinitdata = { 909static struct pci_device_id vt8623_devices[] = {
910 {PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)}, 910 {PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)},
911 {0, 0, 0, 0, 0, 0, 0} 911 {0, 0, 0, 0, 0, 0, 0}
912}; 912};
@@ -917,7 +917,7 @@ static struct pci_driver vt8623fb_pci_driver = {
917 .name = "vt8623fb", 917 .name = "vt8623fb",
918 .id_table = vt8623_devices, 918 .id_table = vt8623_devices,
919 .probe = vt8623_pci_probe, 919 .probe = vt8623_pci_probe,
920 .remove = __devexit_p(vt8623_pci_remove), 920 .remove = vt8623_pci_remove,
921 .suspend = vt8623_pci_suspend, 921 .suspend = vt8623_pci_suspend,
922 .resume = vt8623_pci_resume, 922 .resume = vt8623_pci_resume,
923}; 923};
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index 2f6b2b835f88..7a299e951f75 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -54,7 +54,7 @@ static void w100_update_enable(void);
54static void w100_update_disable(void); 54static void w100_update_disable(void);
55static void calc_hsync(struct w100fb_par *par); 55static void calc_hsync(struct w100fb_par *par);
56static void w100_init_graphic_engine(struct w100fb_par *par); 56static void w100_init_graphic_engine(struct w100fb_par *par);
57struct w100_pll_info *w100_get_xtal_table(unsigned int freq) __devinit; 57struct w100_pll_info *w100_get_xtal_table(unsigned int freq);
58 58
59/* Pseudo palette size */ 59/* Pseudo palette size */
60#define MAX_PALETTES 16 60#define MAX_PALETTES 16
@@ -630,7 +630,7 @@ static int w100fb_resume(struct platform_device *dev)
630#endif 630#endif
631 631
632 632
633int __devinit w100fb_probe(struct platform_device *pdev) 633int w100fb_probe(struct platform_device *pdev)
634{ 634{
635 int err = -EIO; 635 int err = -EIO;
636 struct w100fb_mach_info *inf; 636 struct w100fb_mach_info *inf;
@@ -783,7 +783,7 @@ out:
783} 783}
784 784
785 785
786static int __devexit w100fb_remove(struct platform_device *pdev) 786static int w100fb_remove(struct platform_device *pdev)
787{ 787{
788 struct fb_info *info = platform_get_drvdata(pdev); 788 struct fb_info *info = platform_get_drvdata(pdev);
789 struct w100fb_par *par=info->par; 789 struct w100fb_par *par=info->par;
@@ -1021,7 +1021,7 @@ static struct pll_entries {
1021 { 0 }, 1021 { 0 },
1022}; 1022};
1023 1023
1024struct w100_pll_info __devinit *w100_get_xtal_table(unsigned int freq) 1024struct w100_pll_info *w100_get_xtal_table(unsigned int freq)
1025{ 1025{
1026 struct pll_entries *pll_entry = w100_pll_tables; 1026 struct pll_entries *pll_entry = w100_pll_tables;
1027 1027
@@ -1624,7 +1624,7 @@ static void w100_vsync(void)
1624 1624
1625static struct platform_driver w100fb_driver = { 1625static struct platform_driver w100fb_driver = {
1626 .probe = w100fb_probe, 1626 .probe = w100fb_probe,
1627 .remove = __devexit_p(w100fb_remove), 1627 .remove = w100fb_remove,
1628 .suspend = w100fb_suspend, 1628 .suspend = w100fb_suspend,
1629 .resume = w100fb_resume, 1629 .resume = w100fb_resume,
1630 .driver = { 1630 .driver = {
diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c
index 77539c1b56a0..4dd0580f96fd 100644
--- a/drivers/video/wm8505fb.c
+++ b/drivers/video/wm8505fb.c
@@ -260,7 +260,7 @@ static struct fb_ops wm8505fb_ops = {
260 .fb_blank = wm8505fb_blank, 260 .fb_blank = wm8505fb_blank,
261}; 261};
262 262
263static int __devinit wm8505fb_probe(struct platform_device *pdev) 263static int wm8505fb_probe(struct platform_device *pdev)
264{ 264{
265 struct wm8505fb_info *fbi; 265 struct wm8505fb_info *fbi;
266 struct resource *res; 266 struct resource *res;
@@ -431,7 +431,7 @@ failed:
431 return ret; 431 return ret;
432} 432}
433 433
434static int __devexit wm8505fb_remove(struct platform_device *pdev) 434static int wm8505fb_remove(struct platform_device *pdev)
435{ 435{
436 struct wm8505fb_info *fbi = platform_get_drvdata(pdev); 436 struct wm8505fb_info *fbi = platform_get_drvdata(pdev);
437 struct resource *res; 437 struct resource *res;
@@ -462,7 +462,7 @@ static const struct of_device_id wmt_dt_ids[] = {
462 462
463static struct platform_driver wm8505fb_driver = { 463static struct platform_driver wm8505fb_driver = {
464 .probe = wm8505fb_probe, 464 .probe = wm8505fb_probe,
465 .remove = __devexit_p(wm8505fb_remove), 465 .remove = wm8505fb_remove,
466 .driver = { 466 .driver = {
467 .owner = THIS_MODULE, 467 .owner = THIS_MODULE,
468 .name = DRIVER_NAME, 468 .name = DRIVER_NAME,
diff --git a/drivers/video/wmt_ge_rops.c b/drivers/video/wmt_ge_rops.c
index ba025b4c7d09..4aaeb18223bc 100644
--- a/drivers/video/wmt_ge_rops.c
+++ b/drivers/video/wmt_ge_rops.c
@@ -124,7 +124,7 @@ int wmt_ge_sync(struct fb_info *p)
124} 124}
125EXPORT_SYMBOL_GPL(wmt_ge_sync); 125EXPORT_SYMBOL_GPL(wmt_ge_sync);
126 126
127static int __devinit wmt_ge_rops_probe(struct platform_device *pdev) 127static int wmt_ge_rops_probe(struct platform_device *pdev)
128{ 128{
129 struct resource *res; 129 struct resource *res;
130 130
@@ -152,7 +152,7 @@ static int __devinit wmt_ge_rops_probe(struct platform_device *pdev)
152 return 0; 152 return 0;
153} 153}
154 154
155static int __devexit wmt_ge_rops_remove(struct platform_device *pdev) 155static int wmt_ge_rops_remove(struct platform_device *pdev)
156{ 156{
157 iounmap(regbase); 157 iounmap(regbase);
158 return 0; 158 return 0;
@@ -165,7 +165,7 @@ static const struct of_device_id wmt_dt_ids[] = {
165 165
166static struct platform_driver wmt_ge_rops_driver = { 166static struct platform_driver wmt_ge_rops_driver = {
167 .probe = wmt_ge_rops_probe, 167 .probe = wmt_ge_rops_probe,
168 .remove = __devexit_p(wmt_ge_rops_remove), 168 .remove = wmt_ge_rops_remove,
169 .driver = { 169 .driver = {
170 .owner = THIS_MODULE, 170 .owner = THIS_MODULE,
171 .name = "wmt_ge_rops", 171 .name = "wmt_ge_rops",
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c
index 917bb5681684..cd005c227a23 100644
--- a/drivers/video/xen-fbfront.c
+++ b/drivers/video/xen-fbfront.c
@@ -358,8 +358,8 @@ static irqreturn_t xenfb_event_handler(int rq, void *dev_id)
358 return IRQ_HANDLED; 358 return IRQ_HANDLED;
359} 359}
360 360
361static int __devinit xenfb_probe(struct xenbus_device *dev, 361static int xenfb_probe(struct xenbus_device *dev,
362 const struct xenbus_device_id *id) 362 const struct xenbus_device_id *id)
363{ 363{
364 struct xenfb_info *info; 364 struct xenfb_info *info;
365 struct fb_info *fb_info; 365 struct fb_info *fb_info;
@@ -487,8 +487,7 @@ error:
487 return ret; 487 return ret;
488} 488}
489 489
490static __devinit void 490static void xenfb_make_preferred_console(void)
491xenfb_make_preferred_console(void)
492{ 491{
493 struct console *c; 492 struct console *c;
494 493
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 18084525402a..af0b4fdf9aa9 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -403,7 +403,7 @@ static int xilinxfb_release(struct device *dev)
403 * OF bus binding 403 * OF bus binding
404 */ 404 */
405 405
406static int __devinit xilinxfb_of_probe(struct platform_device *op) 406static int xilinxfb_of_probe(struct platform_device *op)
407{ 407{
408 const u32 *prop; 408 const u32 *prop;
409 u32 *p; 409 u32 *p;
@@ -485,13 +485,13 @@ static int __devinit xilinxfb_of_probe(struct platform_device *op)
485 return -ENODEV; 485 return -ENODEV;
486} 486}
487 487
488static int __devexit xilinxfb_of_remove(struct platform_device *op) 488static int xilinxfb_of_remove(struct platform_device *op)
489{ 489{
490 return xilinxfb_release(&op->dev); 490 return xilinxfb_release(&op->dev);
491} 491}
492 492
493/* Match table for of_platform binding */ 493/* Match table for of_platform binding */
494static struct of_device_id xilinxfb_of_match[] __devinitdata = { 494static struct of_device_id xilinxfb_of_match[] = {
495 { .compatible = "xlnx,xps-tft-1.00.a", }, 495 { .compatible = "xlnx,xps-tft-1.00.a", },
496 { .compatible = "xlnx,xps-tft-2.00.a", }, 496 { .compatible = "xlnx,xps-tft-2.00.a", },
497 { .compatible = "xlnx,xps-tft-2.01.a", }, 497 { .compatible = "xlnx,xps-tft-2.01.a", },
@@ -503,7 +503,7 @@ MODULE_DEVICE_TABLE(of, xilinxfb_of_match);
503 503
504static struct platform_driver xilinxfb_of_driver = { 504static struct platform_driver xilinxfb_of_driver = {
505 .probe = xilinxfb_of_probe, 505 .probe = xilinxfb_of_probe,
506 .remove = __devexit_p(xilinxfb_of_remove), 506 .remove = xilinxfb_of_remove,
507 .driver = { 507 .driver = {
508 .name = DRIVER_NAME, 508 .name = DRIVER_NAME,
509 .owner = THIS_MODULE, 509 .owner = THIS_MODULE,
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index d19fe3e323b4..797e1c79a104 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -500,7 +500,7 @@ static void remove_common(struct virtio_balloon *vb)
500 vb->vdev->config->del_vqs(vb->vdev); 500 vb->vdev->config->del_vqs(vb->vdev);
501} 501}
502 502
503static void __devexit virtballoon_remove(struct virtio_device *vdev) 503static void virtballoon_remove(struct virtio_device *vdev)
504{ 504{
505 struct virtio_balloon *vb = vdev->priv; 505 struct virtio_balloon *vb = vdev->priv;
506 506
@@ -552,7 +552,7 @@ static struct virtio_driver virtio_balloon_driver = {
552 .driver.owner = THIS_MODULE, 552 .driver.owner = THIS_MODULE,
553 .id_table = id_table, 553 .id_table = id_table,
554 .probe = virtballoon_probe, 554 .probe = virtballoon_probe,
555 .remove = __devexit_p(virtballoon_remove), 555 .remove = virtballoon_remove,
556 .config_changed = virtballoon_changed, 556 .config_changed = virtballoon_changed,
557#ifdef CONFIG_PM 557#ifdef CONFIG_PM
558 .freeze = virtballoon_freeze, 558 .freeze = virtballoon_freeze,
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 634f80bcdbd7..31f966f4d27f 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -440,7 +440,7 @@ static struct virtio_config_ops virtio_mmio_config_ops = {
440 440
441/* Platform device */ 441/* Platform device */
442 442
443static int __devinit virtio_mmio_probe(struct platform_device *pdev) 443static int virtio_mmio_probe(struct platform_device *pdev)
444{ 444{
445 struct virtio_mmio_device *vm_dev; 445 struct virtio_mmio_device *vm_dev;
446 struct resource *mem; 446 struct resource *mem;
@@ -493,7 +493,7 @@ static int __devinit virtio_mmio_probe(struct platform_device *pdev)
493 return register_virtio_device(&vm_dev->vdev); 493 return register_virtio_device(&vm_dev->vdev);
494} 494}
495 495
496static int __devexit virtio_mmio_remove(struct platform_device *pdev) 496static int virtio_mmio_remove(struct platform_device *pdev)
497{ 497{
498 struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev); 498 struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
499 499
@@ -638,7 +638,7 @@ MODULE_DEVICE_TABLE(of, virtio_mmio_match);
638 638
639static struct platform_driver virtio_mmio_driver = { 639static struct platform_driver virtio_mmio_driver = {
640 .probe = virtio_mmio_probe, 640 .probe = virtio_mmio_probe,
641 .remove = __devexit_p(virtio_mmio_remove), 641 .remove = virtio_mmio_remove,
642 .driver = { 642 .driver = {
643 .name = "virtio-mmio", 643 .name = "virtio-mmio",
644 .owner = THIS_MODULE, 644 .owner = THIS_MODULE,
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index e3ecc94591ad..0c142892c105 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -676,8 +676,8 @@ static void virtio_pci_release_dev(struct device *_d)
676} 676}
677 677
678/* the PCI probing function */ 678/* the PCI probing function */
679static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, 679static int virtio_pci_probe(struct pci_dev *pci_dev,
680 const struct pci_device_id *id) 680 const struct pci_device_id *id)
681{ 681{
682 struct virtio_pci_device *vp_dev; 682 struct virtio_pci_device *vp_dev;
683 int err; 683 int err;
@@ -751,7 +751,7 @@ out:
751 return err; 751 return err;
752} 752}
753 753
754static void __devexit virtio_pci_remove(struct pci_dev *pci_dev) 754static void virtio_pci_remove(struct pci_dev *pci_dev)
755{ 755{
756 struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); 756 struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
757 757
@@ -822,7 +822,7 @@ static struct pci_driver virtio_pci_driver = {
822 .name = "virtio-pci", 822 .name = "virtio-pci",
823 .id_table = virtio_pci_id_table, 823 .id_table = virtio_pci_id_table,
824 .probe = virtio_pci_probe, 824 .probe = virtio_pci_probe,
825 .remove = __devexit_p(virtio_pci_remove), 825 .remove = virtio_pci_remove,
826#ifdef CONFIG_PM 826#ifdef CONFIG_PM
827 .driver.pm = &virtio_pci_pm_ops, 827 .driver.pm = &virtio_pci_pm_ops,
828#endif 828#endif
diff --git a/drivers/vlynq/vlynq.c b/drivers/vlynq/vlynq.c
index aa250cebecd2..7b07135ab26e 100644
--- a/drivers/vlynq/vlynq.c
+++ b/drivers/vlynq/vlynq.c
@@ -772,7 +772,7 @@ static int vlynq_remove(struct platform_device *pdev)
772static struct platform_driver vlynq_platform_driver = { 772static struct platform_driver vlynq_platform_driver = {
773 .driver.name = "vlynq", 773 .driver.name = "vlynq",
774 .probe = vlynq_probe, 774 .probe = vlynq_probe,
775 .remove = __devexit_p(vlynq_remove), 775 .remove = vlynq_remove,
776}; 776};
777 777
778struct bus_type vlynq_bus_type = { 778struct bus_type vlynq_bus_type = {
@@ -783,7 +783,7 @@ struct bus_type vlynq_bus_type = {
783}; 783};
784EXPORT_SYMBOL(vlynq_bus_type); 784EXPORT_SYMBOL(vlynq_bus_type);
785 785
786static int __devinit vlynq_init(void) 786static int vlynq_init(void)
787{ 787{
788 int res = 0; 788 int res = 0;
789 789
@@ -803,7 +803,7 @@ fail_bus:
803 return res; 803 return res;
804} 804}
805 805
806static void __devexit vlynq_exit(void) 806static void vlynq_exit(void)
807{ 807{
808 platform_driver_unregister(&vlynq_platform_driver); 808 platform_driver_unregister(&vlynq_platform_driver);
809 bus_unregister(&vlynq_bus_type); 809 bus_unregister(&vlynq_bus_type);
diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c
index d338b56ea2f0..708a25fc9961 100644
--- a/drivers/w1/masters/mxc_w1.c
+++ b/drivers/w1/masters/mxc_w1.c
@@ -191,7 +191,7 @@ static struct platform_driver mxc_w1_driver = {
191 .name = "mxc_w1", 191 .name = "mxc_w1",
192 }, 192 },
193 .probe = mxc_w1_probe, 193 .probe = mxc_w1_probe,
194 .remove = __devexit_p(mxc_w1_remove), 194 .remove = mxc_w1_remove,
195}; 195};
196module_platform_driver(mxc_w1_driver); 196module_platform_driver(mxc_w1_driver);
197 197
diff --git a/drivers/watchdog/da9055_wdt.c b/drivers/watchdog/da9055_wdt.c
index 709ea1aefebb..f5ad10546fc9 100644
--- a/drivers/watchdog/da9055_wdt.c
+++ b/drivers/watchdog/da9055_wdt.c
@@ -72,20 +72,21 @@ static int da9055_wdt_set_timeout(struct watchdog_device *wdt_dev,
72 DA9055_TWDSCALE_MASK, 72 DA9055_TWDSCALE_MASK,
73 da9055_wdt_maps[i].reg_val << 73 da9055_wdt_maps[i].reg_val <<
74 DA9055_TWDSCALE_SHIFT); 74 DA9055_TWDSCALE_SHIFT);
75 if (ret < 0) 75 if (ret < 0) {
76 dev_err(da9055->dev, 76 dev_err(da9055->dev,
77 "Failed to update timescale bit, %d\n", ret); 77 "Failed to update timescale bit, %d\n", ret);
78 return ret;
79 }
78 80
79 wdt_dev->timeout = timeout; 81 wdt_dev->timeout = timeout;
80 82
81 return ret; 83 return 0;
82} 84}
83 85
84static int da9055_wdt_ping(struct watchdog_device *wdt_dev) 86static int da9055_wdt_ping(struct watchdog_device *wdt_dev)
85{ 87{
86 struct da9055_wdt_data *driver_data = watchdog_get_drvdata(wdt_dev); 88 struct da9055_wdt_data *driver_data = watchdog_get_drvdata(wdt_dev);
87 struct da9055 *da9055 = driver_data->da9055; 89 struct da9055 *da9055 = driver_data->da9055;
88 int ret;
89 90
90 /* 91 /*
91 * We have a minimum time for watchdog window called TWDMIN. A write 92 * We have a minimum time for watchdog window called TWDMIN. A write
@@ -94,18 +95,12 @@ static int da9055_wdt_ping(struct watchdog_device *wdt_dev)
94 mdelay(DA9055_TWDMIN); 95 mdelay(DA9055_TWDMIN);
95 96
96 /* Reset the watchdog timer */ 97 /* Reset the watchdog timer */
97 ret = da9055_reg_update(da9055, DA9055_REG_CONTROL_E, 98 return da9055_reg_update(da9055, DA9055_REG_CONTROL_E,
98 DA9055_WATCHDOG_MASK, 1); 99 DA9055_WATCHDOG_MASK, 1);
99
100 return ret;
101} 100}
102 101
103static void da9055_wdt_release_resources(struct kref *r) 102static void da9055_wdt_release_resources(struct kref *r)
104{ 103{
105 struct da9055_wdt_data *driver_data =
106 container_of(r, struct da9055_wdt_data, kref);
107
108 kfree(driver_data);
109} 104}
110 105
111static void da9055_wdt_ref(struct watchdog_device *wdt_dev) 106static void da9055_wdt_ref(struct watchdog_device *wdt_dev)
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 34ed61ea02b4..b0e541d022e6 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -296,7 +296,6 @@ static int omap_wdt_remove(struct platform_device *pdev)
296{ 296{
297 struct watchdog_device *wdog = platform_get_drvdata(pdev); 297 struct watchdog_device *wdog = platform_get_drvdata(pdev);
298 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog); 298 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
299 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
300 299
301 pm_runtime_disable(wdev->dev); 300 pm_runtime_disable(wdev->dev);
302 watchdog_unregister_device(wdog); 301 watchdog_unregister_device(wdog);
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c
index 81918cf8993b..0f03106f7516 100644
--- a/drivers/watchdog/twl4030_wdt.c
+++ b/drivers/watchdog/twl4030_wdt.c
@@ -131,14 +131,21 @@ static int twl4030_wdt_resume(struct platform_device *pdev)
131#define twl4030_wdt_resume NULL 131#define twl4030_wdt_resume NULL
132#endif 132#endif
133 133
134static const struct of_device_id twl_wdt_of_match[] = {
135 { .compatible = "ti,twl4030-wdt", },
136 { },
137};
138MODULE_DEVICE_TABLE(of, twl_wdt_of_match);
139
134static struct platform_driver twl4030_wdt_driver = { 140static struct platform_driver twl4030_wdt_driver = {
135 .probe = twl4030_wdt_probe, 141 .probe = twl4030_wdt_probe,
136 .remove = twl4030_wdt_remove, 142 .remove = twl4030_wdt_remove,
137 .suspend = twl4030_wdt_suspend, 143 .suspend = twl4030_wdt_suspend,
138 .resume = twl4030_wdt_resume, 144 .resume = twl4030_wdt_resume,
139 .driver = { 145 .driver = {
140 .owner = THIS_MODULE, 146 .owner = THIS_MODULE,
141 .name = "twl4030_wdt", 147 .name = "twl4030_wdt",
148 .of_match_table = twl_wdt_of_match,
142 }, 149 },
143}; 150};
144 151
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index b91f14e83164..7038de53652b 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -1239,7 +1239,7 @@ int gnttab_init(void)
1239} 1239}
1240EXPORT_SYMBOL_GPL(gnttab_init); 1240EXPORT_SYMBOL_GPL(gnttab_init);
1241 1241
1242static int __devinit __gnttab_init(void) 1242static int __gnttab_init(void)
1243{ 1243{
1244 /* Delay grant-table initialization in the PV on HVM case */ 1244 /* Delay grant-table initialization in the PV on HVM case */
1245 if (xen_hvm_domain()) 1245 if (xen_hvm_domain())
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index 97ca359ae2bd..99db9e1eb8ba 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -101,8 +101,8 @@ static int platform_pci_resume(struct pci_dev *pdev)
101 return 0; 101 return 0;
102} 102}
103 103
104static int __devinit platform_pci_init(struct pci_dev *pdev, 104static int platform_pci_init(struct pci_dev *pdev,
105 const struct pci_device_id *ent) 105 const struct pci_device_id *ent)
106{ 106{
107 int i, ret; 107 int i, ret;
108 long ioaddr; 108 long ioaddr;
@@ -170,7 +170,7 @@ pci_out:
170 return ret; 170 return ret;
171} 171}
172 172
173static struct pci_device_id platform_pci_tbl[] __devinitdata = { 173static struct pci_device_id platform_pci_tbl[] = {
174 {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM, 174 {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM,
175 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 175 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
176 {0,} 176 {0,}
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index cd50d251998e..9204126f1560 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -272,8 +272,8 @@ void pcistub_put_pci_dev(struct pci_dev *dev)
272 up_write(&pcistub_sem); 272 up_write(&pcistub_sem);
273} 273}
274 274
275static int __devinit pcistub_match_one(struct pci_dev *dev, 275static int pcistub_match_one(struct pci_dev *dev,
276 struct pcistub_device_id *pdev_id) 276 struct pcistub_device_id *pdev_id)
277{ 277{
278 /* Match the specified device by domain, bus, slot, func and also if 278 /* Match the specified device by domain, bus, slot, func and also if
279 * any of the device's parent bridges match. 279 * any of the device's parent bridges match.
@@ -292,7 +292,7 @@ static int __devinit pcistub_match_one(struct pci_dev *dev,
292 return 0; 292 return 0;
293} 293}
294 294
295static int __devinit pcistub_match(struct pci_dev *dev) 295static int pcistub_match(struct pci_dev *dev)
296{ 296{
297 struct pcistub_device_id *pdev_id; 297 struct pcistub_device_id *pdev_id;
298 unsigned long flags; 298 unsigned long flags;
@@ -310,7 +310,7 @@ static int __devinit pcistub_match(struct pci_dev *dev)
310 return found; 310 return found;
311} 311}
312 312
313static int __devinit pcistub_init_device(struct pci_dev *dev) 313static int pcistub_init_device(struct pci_dev *dev)
314{ 314{
315 struct xen_pcibk_dev_data *dev_data; 315 struct xen_pcibk_dev_data *dev_data;
316 int err = 0; 316 int err = 0;
@@ -428,7 +428,7 @@ static int __init pcistub_init_devices_late(void)
428 return 0; 428 return 0;
429} 429}
430 430
431static int __devinit pcistub_seize(struct pci_dev *dev) 431static int pcistub_seize(struct pci_dev *dev)
432{ 432{
433 struct pcistub_device *psdev; 433 struct pcistub_device *psdev;
434 unsigned long flags; 434 unsigned long flags;
@@ -463,8 +463,7 @@ static int __devinit pcistub_seize(struct pci_dev *dev)
463 return err; 463 return err;
464} 464}
465 465
466static int __devinit pcistub_probe(struct pci_dev *dev, 466static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id)
467 const struct pci_device_id *id)
468{ 467{
469 int err = 0; 468 int err = 0;
470 469
diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c
index 229624f867d3..ac1db7f1bcab 100644
--- a/drivers/zorro/zorro-driver.c
+++ b/drivers/zorro/zorro-driver.c
@@ -142,7 +142,6 @@ static int zorro_bus_match(struct device *dev, struct device_driver *drv)
142 142
143static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env) 143static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env)
144{ 144{
145#ifdef CONFIG_HOTPLUG
146 struct zorro_dev *z; 145 struct zorro_dev *z;
147 146
148 if (!dev) 147 if (!dev)
@@ -159,9 +158,6 @@ static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env)
159 return -ENOMEM; 158 return -ENOMEM;
160 159
161 return 0; 160 return 0;
162#else /* !CONFIG_HOTPLUG */
163 return -ENODEV;
164#endif /* !CONFIG_HOTPLUG */
165} 161}
166 162
167struct bus_type zorro_bus_type = { 163struct bus_type zorro_bus_type = {
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index f653835d067b..de7f9168a118 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -228,7 +228,6 @@ cifs_alloc_inode(struct super_block *sb)
228 cifs_set_oplock_level(cifs_inode, 0); 228 cifs_set_oplock_level(cifs_inode, 0);
229 cifs_inode->delete_pending = false; 229 cifs_inode->delete_pending = false;
230 cifs_inode->invalid_mapping = false; 230 cifs_inode->invalid_mapping = false;
231 cifs_inode->leave_pages_clean = false;
232 cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ 231 cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */
233 cifs_inode->server_eof = 0; 232 cifs_inode->server_eof = 0;
234 cifs_inode->uniqueid = 0; 233 cifs_inode->uniqueid = 0;
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index aea1eec64911..e6899cea1c35 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -386,6 +386,7 @@ struct smb_version_values {
386 unsigned int cap_unix; 386 unsigned int cap_unix;
387 unsigned int cap_nt_find; 387 unsigned int cap_nt_find;
388 unsigned int cap_large_files; 388 unsigned int cap_large_files;
389 unsigned int oplock_read;
389}; 390};
390 391
391#define HEADER_SIZE(server) (server->vals->header_size) 392#define HEADER_SIZE(server) (server->vals->header_size)
@@ -1030,7 +1031,6 @@ struct cifsInodeInfo {
1030 bool clientCanCacheAll; /* read and writebehind oplock */ 1031 bool clientCanCacheAll; /* read and writebehind oplock */
1031 bool delete_pending; /* DELETE_ON_CLOSE is set */ 1032 bool delete_pending; /* DELETE_ON_CLOSE is set */
1032 bool invalid_mapping; /* pagecache is invalid */ 1033 bool invalid_mapping; /* pagecache is invalid */
1033 bool leave_pages_clean; /* protected by i_mutex, not set pages dirty */
1034 unsigned long time; /* jiffies of last update of inode */ 1034 unsigned long time; /* jiffies of last update of inode */
1035 u64 server_eof; /* current file size on server -- protected by i_lock */ 1035 u64 server_eof; /* current file size on server -- protected by i_lock */
1036 u64 uniqueid; /* server inode number */ 1036 u64 uniqueid; /* server inode number */
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 0a6677ba212b..8ea6ca50a665 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -238,6 +238,23 @@ out:
238 return rc; 238 return rc;
239} 239}
240 240
241static bool
242cifs_has_mand_locks(struct cifsInodeInfo *cinode)
243{
244 struct cifs_fid_locks *cur;
245 bool has_locks = false;
246
247 down_read(&cinode->lock_sem);
248 list_for_each_entry(cur, &cinode->llist, llist) {
249 if (!list_empty(&cur->locks)) {
250 has_locks = true;
251 break;
252 }
253 }
254 up_read(&cinode->lock_sem);
255 return has_locks;
256}
257
241struct cifsFileInfo * 258struct cifsFileInfo *
242cifs_new_fileinfo(struct cifs_fid *fid, struct file *file, 259cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,
243 struct tcon_link *tlink, __u32 oplock) 260 struct tcon_link *tlink, __u32 oplock)
@@ -248,6 +265,7 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,
248 struct cifsFileInfo *cfile; 265 struct cifsFileInfo *cfile;
249 struct cifs_fid_locks *fdlocks; 266 struct cifs_fid_locks *fdlocks;
250 struct cifs_tcon *tcon = tlink_tcon(tlink); 267 struct cifs_tcon *tcon = tlink_tcon(tlink);
268 struct TCP_Server_Info *server = tcon->ses->server;
251 269
252 cfile = kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL); 270 cfile = kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL);
253 if (cfile == NULL) 271 if (cfile == NULL)
@@ -276,12 +294,22 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,
276 INIT_WORK(&cfile->oplock_break, cifs_oplock_break); 294 INIT_WORK(&cfile->oplock_break, cifs_oplock_break);
277 mutex_init(&cfile->fh_mutex); 295 mutex_init(&cfile->fh_mutex);
278 296
297 /*
298 * If the server returned a read oplock and we have mandatory brlocks,
299 * set oplock level to None.
300 */
301 if (oplock == server->vals->oplock_read &&
302 cifs_has_mand_locks(cinode)) {
303 cFYI(1, "Reset oplock val from read to None due to mand locks");
304 oplock = 0;
305 }
306
279 spin_lock(&cifs_file_list_lock); 307 spin_lock(&cifs_file_list_lock);
280 if (fid->pending_open->oplock != CIFS_OPLOCK_NO_CHANGE) 308 if (fid->pending_open->oplock != CIFS_OPLOCK_NO_CHANGE && oplock)
281 oplock = fid->pending_open->oplock; 309 oplock = fid->pending_open->oplock;
282 list_del(&fid->pending_open->olist); 310 list_del(&fid->pending_open->olist);
283 311
284 tlink_tcon(tlink)->ses->server->ops->set_fid(cfile, fid, oplock); 312 server->ops->set_fid(cfile, fid, oplock);
285 313
286 list_add(&cfile->tlist, &tcon->openFileList); 314 list_add(&cfile->tlist, &tcon->openFileList);
287 /* if readable file instance put first in list*/ 315 /* if readable file instance put first in list*/
@@ -1422,6 +1450,7 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type,
1422 struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data; 1450 struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data;
1423 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); 1451 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1424 struct TCP_Server_Info *server = tcon->ses->server; 1452 struct TCP_Server_Info *server = tcon->ses->server;
1453 struct inode *inode = cfile->dentry->d_inode;
1425 1454
1426 if (posix_lck) { 1455 if (posix_lck) {
1427 int posix_lock_type; 1456 int posix_lock_type;
@@ -1459,6 +1488,21 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type,
1459 if (!rc) 1488 if (!rc)
1460 goto out; 1489 goto out;
1461 1490
1491 /*
1492 * Windows 7 server can delay breaking lease from read to None
1493 * if we set a byte-range lock on a file - break it explicitly
1494 * before sending the lock to the server to be sure the next
1495 * read won't conflict with non-overlapted locks due to
1496 * pagereading.
1497 */
1498 if (!CIFS_I(inode)->clientCanCacheAll &&
1499 CIFS_I(inode)->clientCanCacheRead) {
1500 cifs_invalidate_mapping(inode);
1501 cFYI(1, "Set no oplock for inode=%p due to mand locks",
1502 inode);
1503 CIFS_I(inode)->clientCanCacheRead = false;
1504 }
1505
1462 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length, 1506 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
1463 type, 1, 0, wait_flag); 1507 type, 1, 0, wait_flag);
1464 if (rc) { 1508 if (rc) {
@@ -2103,15 +2147,7 @@ static int cifs_write_end(struct file *file, struct address_space *mapping,
2103 } else { 2147 } else {
2104 rc = copied; 2148 rc = copied;
2105 pos += copied; 2149 pos += copied;
2106 /* 2150 set_page_dirty(page);
2107 * When we use strict cache mode and cifs_strict_writev was run
2108 * with level II oplock (indicated by leave_pages_clean field of
2109 * CIFS_I(inode)), we can leave pages clean - cifs_strict_writev
2110 * sent the data to the server itself.
2111 */
2112 if (!CIFS_I(inode)->leave_pages_clean ||
2113 !(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO))
2114 set_page_dirty(page);
2115 } 2151 }
2116 2152
2117 if (rc > 0) { 2153 if (rc > 0) {
@@ -2462,8 +2498,8 @@ ssize_t cifs_user_writev(struct kiocb *iocb, const struct iovec *iov,
2462} 2498}
2463 2499
2464static ssize_t 2500static ssize_t
2465cifs_pagecache_writev(struct kiocb *iocb, const struct iovec *iov, 2501cifs_writev(struct kiocb *iocb, const struct iovec *iov,
2466 unsigned long nr_segs, loff_t pos, bool cache_ex) 2502 unsigned long nr_segs, loff_t pos)
2467{ 2503{
2468 struct file *file = iocb->ki_filp; 2504 struct file *file = iocb->ki_filp;
2469 struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data; 2505 struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data;
@@ -2485,12 +2521,8 @@ cifs_pagecache_writev(struct kiocb *iocb, const struct iovec *iov,
2485 server->vals->exclusive_lock_type, NULL, 2521 server->vals->exclusive_lock_type, NULL,
2486 CIFS_WRITE_OP)) { 2522 CIFS_WRITE_OP)) {
2487 mutex_lock(&inode->i_mutex); 2523 mutex_lock(&inode->i_mutex);
2488 if (!cache_ex)
2489 cinode->leave_pages_clean = true;
2490 rc = __generic_file_aio_write(iocb, iov, nr_segs, 2524 rc = __generic_file_aio_write(iocb, iov, nr_segs,
2491 &iocb->ki_pos); 2525 &iocb->ki_pos);
2492 if (!cache_ex)
2493 cinode->leave_pages_clean = false;
2494 mutex_unlock(&inode->i_mutex); 2526 mutex_unlock(&inode->i_mutex);
2495 } 2527 }
2496 2528
@@ -2517,60 +2549,32 @@ cifs_strict_writev(struct kiocb *iocb, const struct iovec *iov,
2517 struct cifsFileInfo *cfile = (struct cifsFileInfo *) 2549 struct cifsFileInfo *cfile = (struct cifsFileInfo *)
2518 iocb->ki_filp->private_data; 2550 iocb->ki_filp->private_data;
2519 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); 2551 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
2520 ssize_t written, written2; 2552 ssize_t written;
2521 /*
2522 * We need to store clientCanCacheAll here to prevent race
2523 * conditions - this value can be changed during an execution
2524 * of generic_file_aio_write. For CIFS it can be changed from
2525 * true to false only, but for SMB2 it can be changed both from
2526 * true to false and vice versa. So, we can end up with a data
2527 * stored in the cache, not marked dirty and not sent to the
2528 * server if this value changes its state from false to true
2529 * after cifs_write_end.
2530 */
2531 bool cache_ex = cinode->clientCanCacheAll;
2532 bool cache_read = cinode->clientCanCacheRead;
2533 int rc;
2534 loff_t saved_pos;
2535 2553
2536 if (cache_ex) { 2554 if (cinode->clientCanCacheAll) {
2537 if (cap_unix(tcon->ses) && 2555 if (cap_unix(tcon->ses) &&
2538 ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0) && 2556 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability))
2539 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu( 2557 && ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0))
2540 tcon->fsUnixInfo.Capability)))
2541 return generic_file_aio_write(iocb, iov, nr_segs, pos); 2558 return generic_file_aio_write(iocb, iov, nr_segs, pos);
2542 return cifs_pagecache_writev(iocb, iov, nr_segs, pos, cache_ex); 2559 return cifs_writev(iocb, iov, nr_segs, pos);
2543 } 2560 }
2544
2545 /* 2561 /*
2546 * For files without exclusive oplock in strict cache mode we need to 2562 * For non-oplocked files in strict cache mode we need to write the data
2547 * write the data to the server exactly from the pos to pos+len-1 rather 2563 * to the server exactly from the pos to pos+len-1 rather than flush all
2548 * than flush all affected pages because it may cause a error with 2564 * affected pages because it may cause a error with mandatory locks on
2549 * mandatory locks on these pages but not on the region from pos to 2565 * these pages but not on the region from pos to ppos+len-1.
2550 * ppos+len-1.
2551 */ 2566 */
2552 written = cifs_user_writev(iocb, iov, nr_segs, pos); 2567 written = cifs_user_writev(iocb, iov, nr_segs, pos);
2553 if (!cache_read || written <= 0) 2568 if (written > 0 && cinode->clientCanCacheRead) {
2554 return written; 2569 /*
2555 2570 * Windows 7 server can delay breaking level2 oplock if a write
2556 saved_pos = iocb->ki_pos; 2571 * request comes - break it on the client to prevent reading
2557 iocb->ki_pos = pos; 2572 * an old data.
2558 /* we have a read oplock - need to store a data in the page cache */ 2573 */
2559 if (cap_unix(tcon->ses) && 2574 cifs_invalidate_mapping(inode);
2560 ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0) && 2575 cFYI(1, "Set no oplock for inode=%p after a write operation",
2561 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu( 2576 inode);
2562 tcon->fsUnixInfo.Capability))) 2577 cinode->clientCanCacheRead = false;
2563 written2 = generic_file_aio_write(iocb, iov, nr_segs, pos);
2564 else
2565 written2 = cifs_pagecache_writev(iocb, iov, nr_segs, pos,
2566 cache_ex);
2567 /* errors occured during writing - invalidate the page cache */
2568 if (written2 < 0) {
2569 rc = cifs_invalidate_mapping(inode);
2570 if (rc)
2571 written = (ssize_t)rc;
2572 else
2573 iocb->ki_pos = saved_pos;
2574 } 2578 }
2575 return written; 2579 return written;
2576} 2580}
@@ -3577,6 +3581,13 @@ void cifs_oplock_break(struct work_struct *work)
3577 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); 3581 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
3578 int rc = 0; 3582 int rc = 0;
3579 3583
3584 if (!cinode->clientCanCacheAll && cinode->clientCanCacheRead &&
3585 cifs_has_mand_locks(cinode)) {
3586 cFYI(1, "Reset oplock to None for inode=%p due to mand locks",
3587 inode);
3588 cinode->clientCanCacheRead = false;
3589 }
3590
3580 if (inode && S_ISREG(inode->i_mode)) { 3591 if (inode && S_ISREG(inode->i_mode)) {
3581 if (cinode->clientCanCacheRead) 3592 if (cinode->clientCanCacheRead)
3582 break_lease(inode, O_RDONLY); 3593 break_lease(inode, O_RDONLY);
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
index a5d234c8d5d9..47bc5a87f94e 100644
--- a/fs/cifs/smb1ops.c
+++ b/fs/cifs/smb1ops.c
@@ -53,6 +53,13 @@ send_nt_cancel(struct TCP_Server_Info *server, void *buf,
53 mutex_unlock(&server->srv_mutex); 53 mutex_unlock(&server->srv_mutex);
54 return rc; 54 return rc;
55 } 55 }
56
57 /*
58 * The response to this call was already factored into the sequence
59 * number when the call went out, so we must adjust it back downward
60 * after signing here.
61 */
62 --server->sequence_number;
56 rc = smb_send(server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); 63 rc = smb_send(server, in_buf, be32_to_cpu(in_buf->smb_buf_length));
57 mutex_unlock(&server->srv_mutex); 64 mutex_unlock(&server->srv_mutex);
58 65
@@ -952,4 +959,5 @@ struct smb_version_values smb1_values = {
952 .cap_unix = CAP_UNIX, 959 .cap_unix = CAP_UNIX,
953 .cap_nt_find = CAP_NT_SMBS | CAP_NT_FIND, 960 .cap_nt_find = CAP_NT_SMBS | CAP_NT_FIND,
954 .cap_large_files = CAP_LARGE_FILES, 961 .cap_large_files = CAP_LARGE_FILES,
962 .oplock_read = OPLOCK_READ,
955}; 963};
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index d79de7bc4435..c9c7aa7ed966 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -708,6 +708,7 @@ struct smb_version_values smb20_values = {
708 .cap_unix = 0, 708 .cap_unix = 0,
709 .cap_nt_find = SMB2_NT_FIND, 709 .cap_nt_find = SMB2_NT_FIND,
710 .cap_large_files = SMB2_LARGE_FILES, 710 .cap_large_files = SMB2_LARGE_FILES,
711 .oplock_read = SMB2_OPLOCK_LEVEL_II,
711}; 712};
712 713
713struct smb_version_values smb21_values = { 714struct smb_version_values smb21_values = {
@@ -725,6 +726,7 @@ struct smb_version_values smb21_values = {
725 .cap_unix = 0, 726 .cap_unix = 0,
726 .cap_nt_find = SMB2_NT_FIND, 727 .cap_nt_find = SMB2_NT_FIND,
727 .cap_large_files = SMB2_LARGE_FILES, 728 .cap_large_files = SMB2_LARGE_FILES,
729 .oplock_read = SMB2_OPLOCK_LEVEL_II,
728}; 730};
729 731
730struct smb_version_values smb30_values = { 732struct smb_version_values smb30_values = {
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 76d974c952fe..1a528680ec5a 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -144,9 +144,6 @@ smb_send_kvec(struct TCP_Server_Info *server, struct kvec *iov, size_t n_vec,
144 144
145 *sent = 0; 145 *sent = 0;
146 146
147 if (ssocket == NULL)
148 return -ENOTSOCK; /* BB eventually add reconnect code here */
149
150 smb_msg.msg_name = (struct sockaddr *) &server->dstaddr; 147 smb_msg.msg_name = (struct sockaddr *) &server->dstaddr;
151 smb_msg.msg_namelen = sizeof(struct sockaddr); 148 smb_msg.msg_namelen = sizeof(struct sockaddr);
152 smb_msg.msg_control = NULL; 149 smb_msg.msg_control = NULL;
@@ -291,6 +288,9 @@ smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst)
291 struct socket *ssocket = server->ssocket; 288 struct socket *ssocket = server->ssocket;
292 int val = 1; 289 int val = 1;
293 290
291 if (ssocket == NULL)
292 return -ENOTSOCK;
293
294 cFYI(1, "Sending smb: smb_len=%u", smb_buf_length); 294 cFYI(1, "Sending smb: smb_len=%u", smb_buf_length);
295 dump_smb(iov[0].iov_base, iov[0].iov_len); 295 dump_smb(iov[0].iov_base, iov[0].iov_len);
296 296
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index ea9931281557..a7b0c2dfb3db 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -1935,7 +1935,7 @@ static const unsigned char filename_rev_map[256] = {
1935 * @src: Source location for the filename to encode 1935 * @src: Source location for the filename to encode
1936 * @src_size: Size of the source in bytes 1936 * @src_size: Size of the source in bytes
1937 */ 1937 */
1938void ecryptfs_encode_for_filename(unsigned char *dst, size_t *dst_size, 1938static void ecryptfs_encode_for_filename(unsigned char *dst, size_t *dst_size,
1939 unsigned char *src, size_t src_size) 1939 unsigned char *src, size_t src_size)
1940{ 1940{
1941 size_t num_blocks; 1941 size_t num_blocks;
diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c
index 809e67d05ca3..f1ea610362c6 100644
--- a/fs/ecryptfs/kthread.c
+++ b/fs/ecryptfs/kthread.c
@@ -102,12 +102,12 @@ int __init ecryptfs_init_kthread(void)
102 102
103void ecryptfs_destroy_kthread(void) 103void ecryptfs_destroy_kthread(void)
104{ 104{
105 struct ecryptfs_open_req *req; 105 struct ecryptfs_open_req *req, *tmp;
106 106
107 mutex_lock(&ecryptfs_kthread_ctl.mux); 107 mutex_lock(&ecryptfs_kthread_ctl.mux);
108 ecryptfs_kthread_ctl.flags |= ECRYPTFS_KTHREAD_ZOMBIE; 108 ecryptfs_kthread_ctl.flags |= ECRYPTFS_KTHREAD_ZOMBIE;
109 list_for_each_entry(req, &ecryptfs_kthread_ctl.req_list, 109 list_for_each_entry_safe(req, tmp, &ecryptfs_kthread_ctl.req_list,
110 kthread_ctl_list) { 110 kthread_ctl_list) {
111 list_del(&req->kthread_ctl_list); 111 list_del(&req->kthread_ctl_list);
112 *req->lower_file = ERR_PTR(-EIO); 112 *req->lower_file = ERR_PTR(-EIO);
113 complete(&req->done); 113 complete(&req->done);
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index bd1d57f98f74..564a1fa34b99 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -338,7 +338,8 @@ static int ecryptfs_write_begin(struct file *file,
338 if (prev_page_end_size 338 if (prev_page_end_size
339 >= i_size_read(page->mapping->host)) { 339 >= i_size_read(page->mapping->host)) {
340 zero_user(page, 0, PAGE_CACHE_SIZE); 340 zero_user(page, 0, PAGE_CACHE_SIZE);
341 } else { 341 SetPageUptodate(page);
342 } else if (len < PAGE_CACHE_SIZE) {
342 rc = ecryptfs_decrypt_page(page); 343 rc = ecryptfs_decrypt_page(page);
343 if (rc) { 344 if (rc) {
344 printk(KERN_ERR "%s: Error decrypting " 345 printk(KERN_ERR "%s: Error decrypting "
@@ -348,8 +349,8 @@ static int ecryptfs_write_begin(struct file *file,
348 ClearPageUptodate(page); 349 ClearPageUptodate(page);
349 goto out; 350 goto out;
350 } 351 }
352 SetPageUptodate(page);
351 } 353 }
352 SetPageUptodate(page);
353 } 354 }
354 } 355 }
355 /* If creating a page or more of holes, zero them out via truncate. 356 /* If creating a page or more of holes, zero them out via truncate.
@@ -499,6 +500,13 @@ static int ecryptfs_write_end(struct file *file,
499 } 500 }
500 goto out; 501 goto out;
501 } 502 }
503 if (!PageUptodate(page)) {
504 if (copied < PAGE_CACHE_SIZE) {
505 rc = 0;
506 goto out;
507 }
508 SetPageUptodate(page);
509 }
502 /* Fills in zeros if 'to' goes beyond inode size */ 510 /* Fills in zeros if 'to' goes beyond inode size */
503 rc = fill_zeros_to_end_of_page(page, to); 511 rc = fill_zeros_to_end_of_page(page, to);
504 if (rc) { 512 if (rc) {
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index be56b21435f8..9fec1836057a 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1313,7 +1313,7 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, struct epoll_even
1313 * otherwise we might miss an event that happens between the 1313 * otherwise we might miss an event that happens between the
1314 * f_op->poll() call and the new event set registering. 1314 * f_op->poll() call and the new event set registering.
1315 */ 1315 */
1316 epi->event.events = event->events; 1316 epi->event.events = event->events; /* need barrier below */
1317 pt._key = event->events; 1317 pt._key = event->events;
1318 epi->event.data = event->data; /* protected by mtx */ 1318 epi->event.data = event->data; /* protected by mtx */
1319 if (epi->event.events & EPOLLWAKEUP) { 1319 if (epi->event.events & EPOLLWAKEUP) {
@@ -1324,6 +1324,26 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, struct epoll_even
1324 } 1324 }
1325 1325
1326 /* 1326 /*
1327 * The following barrier has two effects:
1328 *
1329 * 1) Flush epi changes above to other CPUs. This ensures
1330 * we do not miss events from ep_poll_callback if an
1331 * event occurs immediately after we call f_op->poll().
1332 * We need this because we did not take ep->lock while
1333 * changing epi above (but ep_poll_callback does take
1334 * ep->lock).
1335 *
1336 * 2) We also need to ensure we do not miss _past_ events
1337 * when calling f_op->poll(). This barrier also
1338 * pairs with the barrier in wq_has_sleeper (see
1339 * comments for wq_has_sleeper).
1340 *
1341 * This barrier will now guarantee ep_poll_callback or f_op->poll
1342 * (or both) will notice the readiness of an item.
1343 */
1344 smp_mb();
1345
1346 /*
1327 * Get current event bits. We can safely use the file* here because 1347 * Get current event bits. We can safely use the file* here because
1328 * its usage count has been increased by the caller of this function. 1348 * its usage count has been increased by the caller of this function.
1329 */ 1349 */
diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig
index 0a475c881852..987358740cb9 100644
--- a/fs/ext4/Kconfig
+++ b/fs/ext4/Kconfig
@@ -41,6 +41,7 @@ config EXT4_USE_FOR_EXT23
41 41
42config EXT4_FS_POSIX_ACL 42config EXT4_FS_POSIX_ACL
43 bool "Ext4 POSIX Access Control Lists" 43 bool "Ext4 POSIX Access Control Lists"
44 depends on EXT4_FS
44 select FS_POSIX_ACL 45 select FS_POSIX_ACL
45 help 46 help
46 POSIX Access Control Lists (ACLs) support permissions for users and 47 POSIX Access Control Lists (ACLs) support permissions for users and
@@ -53,6 +54,7 @@ config EXT4_FS_POSIX_ACL
53 54
54config EXT4_FS_SECURITY 55config EXT4_FS_SECURITY
55 bool "Ext4 Security Labels" 56 bool "Ext4 Security Labels"
57 depends on EXT4_FS
56 help 58 help
57 Security labels support alternative access control models 59 Security labels support alternative access control models
58 implemented by security modules like SELinux. This option 60 implemented by security modules like SELinux. This option
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 26af22832a84..5ae1674ec12f 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2226,13 +2226,14 @@ errout:
2226 * removes index from the index block. 2226 * removes index from the index block.
2227 */ 2227 */
2228static int ext4_ext_rm_idx(handle_t *handle, struct inode *inode, 2228static int ext4_ext_rm_idx(handle_t *handle, struct inode *inode,
2229 struct ext4_ext_path *path) 2229 struct ext4_ext_path *path, int depth)
2230{ 2230{
2231 int err; 2231 int err;
2232 ext4_fsblk_t leaf; 2232 ext4_fsblk_t leaf;
2233 2233
2234 /* free index block */ 2234 /* free index block */
2235 path--; 2235 depth--;
2236 path = path + depth;
2236 leaf = ext4_idx_pblock(path->p_idx); 2237 leaf = ext4_idx_pblock(path->p_idx);
2237 if (unlikely(path->p_hdr->eh_entries == 0)) { 2238 if (unlikely(path->p_hdr->eh_entries == 0)) {
2238 EXT4_ERROR_INODE(inode, "path->p_hdr->eh_entries == 0"); 2239 EXT4_ERROR_INODE(inode, "path->p_hdr->eh_entries == 0");
@@ -2257,6 +2258,19 @@ static int ext4_ext_rm_idx(handle_t *handle, struct inode *inode,
2257 2258
2258 ext4_free_blocks(handle, inode, NULL, leaf, 1, 2259 ext4_free_blocks(handle, inode, NULL, leaf, 1,
2259 EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET); 2260 EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET);
2261
2262 while (--depth >= 0) {
2263 if (path->p_idx != EXT_FIRST_INDEX(path->p_hdr))
2264 break;
2265 path--;
2266 err = ext4_ext_get_access(handle, inode, path);
2267 if (err)
2268 break;
2269 path->p_idx->ei_block = (path+1)->p_idx->ei_block;
2270 err = ext4_ext_dirty(handle, inode, path);
2271 if (err)
2272 break;
2273 }
2260 return err; 2274 return err;
2261} 2275}
2262 2276
@@ -2599,7 +2613,7 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
2599 /* if this leaf is free, then we should 2613 /* if this leaf is free, then we should
2600 * remove it from index block above */ 2614 * remove it from index block above */
2601 if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) 2615 if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL)
2602 err = ext4_ext_rm_idx(handle, inode, path + depth); 2616 err = ext4_ext_rm_idx(handle, inode, path, depth);
2603 2617
2604out: 2618out:
2605 return err; 2619 return err;
@@ -2802,7 +2816,7 @@ again:
2802 /* index is empty, remove it; 2816 /* index is empty, remove it;
2803 * handle must be already prepared by the 2817 * handle must be already prepared by the
2804 * truncatei_leaf() */ 2818 * truncatei_leaf() */
2805 err = ext4_ext_rm_idx(handle, inode, path + i); 2819 err = ext4_ext_rm_idx(handle, inode, path, i);
2806 } 2820 }
2807 /* root level has p_bh == NULL, brelse() eats this */ 2821 /* root level has p_bh == NULL, brelse() eats this */
2808 brelse(path[i].p_bh); 2822 brelse(path[i].p_bh);
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index d07c27ca594a..405565a62277 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -108,14 +108,6 @@ ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
108 108
109 /* Unaligned direct AIO must be serialized; see comment above */ 109 /* Unaligned direct AIO must be serialized; see comment above */
110 if (unaligned_aio) { 110 if (unaligned_aio) {
111 static unsigned long unaligned_warn_time;
112
113 /* Warn about this once per day */
114 if (printk_timed_ratelimit(&unaligned_warn_time, 60*60*24*HZ))
115 ext4_msg(inode->i_sb, KERN_WARNING,
116 "Unaligned AIO/DIO on inode %ld by %s; "
117 "performance will be poor.",
118 inode->i_ino, current->comm);
119 mutex_lock(ext4_aio_mutex(inode)); 111 mutex_lock(ext4_aio_mutex(inode));
120 ext4_unwritten_wait(inode); 112 ext4_unwritten_wait(inode);
121 } 113 }
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index dfbc1fe96674..3278e64e57b6 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -109,8 +109,6 @@ static int __sync_inode(struct inode *inode, int datasync)
109 * 109 *
110 * What we do is just kick off a commit and wait on it. This will snapshot the 110 * What we do is just kick off a commit and wait on it. This will snapshot the
111 * inode to disk. 111 * inode to disk.
112 *
113 * i_mutex lock is held when entering and exiting this function
114 */ 112 */
115 113
116int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) 114int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index cb1c1ab2720b..cbfe13bf5b2a 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2880,8 +2880,6 @@ static void ext4_invalidatepage_free_endio(struct page *page, unsigned long offs
2880 2880
2881static void ext4_invalidatepage(struct page *page, unsigned long offset) 2881static void ext4_invalidatepage(struct page *page, unsigned long offset)
2882{ 2882{
2883 journal_t *journal = EXT4_JOURNAL(page->mapping->host);
2884
2885 trace_ext4_invalidatepage(page, offset); 2883 trace_ext4_invalidatepage(page, offset);
2886 2884
2887 /* 2885 /*
@@ -2889,16 +2887,34 @@ static void ext4_invalidatepage(struct page *page, unsigned long offset)
2889 */ 2887 */
2890 if (ext4_should_dioread_nolock(page->mapping->host)) 2888 if (ext4_should_dioread_nolock(page->mapping->host))
2891 ext4_invalidatepage_free_endio(page, offset); 2889 ext4_invalidatepage_free_endio(page, offset);
2890
2891 /* No journalling happens on data buffers when this function is used */
2892 WARN_ON(page_has_buffers(page) && buffer_jbd(page_buffers(page)));
2893
2894 block_invalidatepage(page, offset);
2895}
2896
2897static int __ext4_journalled_invalidatepage(struct page *page,
2898 unsigned long offset)
2899{
2900 journal_t *journal = EXT4_JOURNAL(page->mapping->host);
2901
2902 trace_ext4_journalled_invalidatepage(page, offset);
2903
2892 /* 2904 /*
2893 * If it's a full truncate we just forget about the pending dirtying 2905 * If it's a full truncate we just forget about the pending dirtying
2894 */ 2906 */
2895 if (offset == 0) 2907 if (offset == 0)
2896 ClearPageChecked(page); 2908 ClearPageChecked(page);
2897 2909
2898 if (journal) 2910 return jbd2_journal_invalidatepage(journal, page, offset);
2899 jbd2_journal_invalidatepage(journal, page, offset); 2911}
2900 else 2912
2901 block_invalidatepage(page, offset); 2913/* Wrapper for aops... */
2914static void ext4_journalled_invalidatepage(struct page *page,
2915 unsigned long offset)
2916{
2917 WARN_ON(__ext4_journalled_invalidatepage(page, offset) < 0);
2902} 2918}
2903 2919
2904static int ext4_releasepage(struct page *page, gfp_t wait) 2920static int ext4_releasepage(struct page *page, gfp_t wait)
@@ -3264,7 +3280,7 @@ static const struct address_space_operations ext4_journalled_aops = {
3264 .write_end = ext4_journalled_write_end, 3280 .write_end = ext4_journalled_write_end,
3265 .set_page_dirty = ext4_journalled_set_page_dirty, 3281 .set_page_dirty = ext4_journalled_set_page_dirty,
3266 .bmap = ext4_bmap, 3282 .bmap = ext4_bmap,
3267 .invalidatepage = ext4_invalidatepage, 3283 .invalidatepage = ext4_journalled_invalidatepage,
3268 .releasepage = ext4_releasepage, 3284 .releasepage = ext4_releasepage,
3269 .direct_IO = ext4_direct_IO, 3285 .direct_IO = ext4_direct_IO,
3270 .is_partially_uptodate = block_is_partially_uptodate, 3286 .is_partially_uptodate = block_is_partially_uptodate,
@@ -4305,6 +4321,47 @@ int ext4_write_inode(struct inode *inode, struct writeback_control *wbc)
4305} 4321}
4306 4322
4307/* 4323/*
4324 * In data=journal mode ext4_journalled_invalidatepage() may fail to invalidate
4325 * buffers that are attached to a page stradding i_size and are undergoing
4326 * commit. In that case we have to wait for commit to finish and try again.
4327 */
4328static void ext4_wait_for_tail_page_commit(struct inode *inode)
4329{
4330 struct page *page;
4331 unsigned offset;
4332 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
4333 tid_t commit_tid = 0;
4334 int ret;
4335
4336 offset = inode->i_size & (PAGE_CACHE_SIZE - 1);
4337 /*
4338 * All buffers in the last page remain valid? Then there's nothing to
4339 * do. We do the check mainly to optimize the common PAGE_CACHE_SIZE ==
4340 * blocksize case
4341 */
4342 if (offset > PAGE_CACHE_SIZE - (1 << inode->i_blkbits))
4343 return;
4344 while (1) {
4345 page = find_lock_page(inode->i_mapping,
4346 inode->i_size >> PAGE_CACHE_SHIFT);
4347 if (!page)
4348 return;
4349 ret = __ext4_journalled_invalidatepage(page, offset);
4350 unlock_page(page);
4351 page_cache_release(page);
4352 if (ret != -EBUSY)
4353 return;
4354 commit_tid = 0;
4355 read_lock(&journal->j_state_lock);
4356 if (journal->j_committing_transaction)
4357 commit_tid = journal->j_committing_transaction->t_tid;
4358 read_unlock(&journal->j_state_lock);
4359 if (commit_tid)
4360 jbd2_log_wait_commit(journal, commit_tid);
4361 }
4362}
4363
4364/*
4308 * ext4_setattr() 4365 * ext4_setattr()
4309 * 4366 *
4310 * Called from notify_change. 4367 * Called from notify_change.
@@ -4417,16 +4474,28 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
4417 } 4474 }
4418 4475
4419 if (attr->ia_valid & ATTR_SIZE) { 4476 if (attr->ia_valid & ATTR_SIZE) {
4420 if (attr->ia_size != i_size_read(inode)) { 4477 if (attr->ia_size != inode->i_size) {
4421 truncate_setsize(inode, attr->ia_size); 4478 loff_t oldsize = inode->i_size;
4422 /* Inode size will be reduced, wait for dio in flight. 4479
4423 * Temporarily disable dioread_nolock to prevent 4480 i_size_write(inode, attr->ia_size);
4424 * livelock. */ 4481 /*
4482 * Blocks are going to be removed from the inode. Wait
4483 * for dio in flight. Temporarily disable
4484 * dioread_nolock to prevent livelock.
4485 */
4425 if (orphan) { 4486 if (orphan) {
4426 ext4_inode_block_unlocked_dio(inode); 4487 if (!ext4_should_journal_data(inode)) {
4427 inode_dio_wait(inode); 4488 ext4_inode_block_unlocked_dio(inode);
4428 ext4_inode_resume_unlocked_dio(inode); 4489 inode_dio_wait(inode);
4490 ext4_inode_resume_unlocked_dio(inode);
4491 } else
4492 ext4_wait_for_tail_page_commit(inode);
4429 } 4493 }
4494 /*
4495 * Truncate pagecache after we've waited for commit
4496 * in data=journal mode to make pages freeable.
4497 */
4498 truncate_pagecache(inode, oldsize, inode->i_size);
4430 } 4499 }
4431 ext4_truncate(inode); 4500 ext4_truncate(inode);
4432 } 4501 }
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index cac448282331..f9ed946a448e 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -722,7 +722,7 @@ dx_probe(const struct qstr *d_name, struct inode *dir,
722 ext4_warning(dir->i_sb, "Node failed checksum"); 722 ext4_warning(dir->i_sb, "Node failed checksum");
723 brelse(bh); 723 brelse(bh);
724 *err = ERR_BAD_DX_DIR; 724 *err = ERR_BAD_DX_DIR;
725 goto fail; 725 goto fail2;
726 } 726 }
727 set_buffer_verified(bh); 727 set_buffer_verified(bh);
728 728
@@ -2368,7 +2368,6 @@ static int ext4_init_new_dir(handle_t *handle, struct inode *dir,
2368 } 2368 }
2369 2369
2370 inode->i_size = EXT4_I(inode)->i_disksize = blocksize; 2370 inode->i_size = EXT4_I(inode)->i_disksize = blocksize;
2371 dir_block = ext4_bread(handle, inode, 0, 1, &err);
2372 if (!(dir_block = ext4_bread(handle, inode, 0, 1, &err))) { 2371 if (!(dir_block = ext4_bread(handle, inode, 0, 1, &err))) {
2373 if (!err) { 2372 if (!err) {
2374 err = -EIO; 2373 err = -EIO;
@@ -2648,7 +2647,8 @@ int ext4_orphan_del(handle_t *handle, struct inode *inode)
2648 struct ext4_iloc iloc; 2647 struct ext4_iloc iloc;
2649 int err = 0; 2648 int err = 0;
2650 2649
2651 if (!EXT4_SB(inode->i_sb)->s_journal) 2650 if ((!EXT4_SB(inode->i_sb)->s_journal) &&
2651 !(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ORPHAN_FS))
2652 return 0; 2652 return 0;
2653 2653
2654 mutex_lock(&EXT4_SB(inode->i_sb)->s_orphan_lock); 2654 mutex_lock(&EXT4_SB(inode->i_sb)->s_orphan_lock);
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3cdb0a2fc648..3d4fb81bacd5 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1645,9 +1645,7 @@ static int parse_options(char *options, struct super_block *sb,
1645 unsigned int *journal_ioprio, 1645 unsigned int *journal_ioprio,
1646 int is_remount) 1646 int is_remount)
1647{ 1647{
1648#ifdef CONFIG_QUOTA
1649 struct ext4_sb_info *sbi = EXT4_SB(sb); 1648 struct ext4_sb_info *sbi = EXT4_SB(sb);
1650#endif
1651 char *p; 1649 char *p;
1652 substring_t args[MAX_OPT_ARGS]; 1650 substring_t args[MAX_OPT_ARGS];
1653 int token; 1651 int token;
@@ -1696,6 +1694,16 @@ static int parse_options(char *options, struct super_block *sb,
1696 } 1694 }
1697 } 1695 }
1698#endif 1696#endif
1697 if (test_opt(sb, DIOREAD_NOLOCK)) {
1698 int blocksize =
1699 BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
1700
1701 if (blocksize < PAGE_CACHE_SIZE) {
1702 ext4_msg(sb, KERN_ERR, "can't mount with "
1703 "dioread_nolock if block size != PAGE_SIZE");
1704 return 0;
1705 }
1706 }
1699 return 1; 1707 return 1;
1700} 1708}
1701 1709
@@ -2212,7 +2220,9 @@ static void ext4_orphan_cleanup(struct super_block *sb,
2212 __func__, inode->i_ino, inode->i_size); 2220 __func__, inode->i_ino, inode->i_size);
2213 jbd_debug(2, "truncating inode %lu to %lld bytes\n", 2221 jbd_debug(2, "truncating inode %lu to %lld bytes\n",
2214 inode->i_ino, inode->i_size); 2222 inode->i_ino, inode->i_size);
2223 mutex_lock(&inode->i_mutex);
2215 ext4_truncate(inode); 2224 ext4_truncate(inode);
2225 mutex_unlock(&inode->i_mutex);
2216 nr_truncates++; 2226 nr_truncates++;
2217 } else { 2227 } else {
2218 ext4_msg(sb, KERN_DEBUG, 2228 ext4_msg(sb, KERN_DEBUG,
@@ -3223,6 +3233,10 @@ int ext4_calculate_overhead(struct super_block *sb)
3223 memset(buf, 0, PAGE_SIZE); 3233 memset(buf, 0, PAGE_SIZE);
3224 cond_resched(); 3234 cond_resched();
3225 } 3235 }
3236 /* Add the journal blocks as well */
3237 if (sbi->s_journal)
3238 overhead += EXT4_B2C(sbi, sbi->s_journal->j_maxlen);
3239
3226 sbi->s_overhead = overhead; 3240 sbi->s_overhead = overhead;
3227 smp_wmb(); 3241 smp_wmb();
3228 free_page((unsigned long) buf); 3242 free_page((unsigned long) buf);
@@ -3436,15 +3450,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
3436 clear_opt(sb, DELALLOC); 3450 clear_opt(sb, DELALLOC);
3437 } 3451 }
3438 3452
3439 blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size);
3440 if (test_opt(sb, DIOREAD_NOLOCK)) {
3441 if (blocksize < PAGE_SIZE) {
3442 ext4_msg(sb, KERN_ERR, "can't mount with "
3443 "dioread_nolock if block size != PAGE_SIZE");
3444 goto failed_mount;
3445 }
3446 }
3447
3448 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 3453 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
3449 (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0); 3454 (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
3450 3455
@@ -3486,6 +3491,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
3486 if (!ext4_feature_set_ok(sb, (sb->s_flags & MS_RDONLY))) 3491 if (!ext4_feature_set_ok(sb, (sb->s_flags & MS_RDONLY)))
3487 goto failed_mount; 3492 goto failed_mount;
3488 3493
3494 blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size);
3489 if (blocksize < EXT4_MIN_BLOCK_SIZE || 3495 if (blocksize < EXT4_MIN_BLOCK_SIZE ||
3490 blocksize > EXT4_MAX_BLOCK_SIZE) { 3496 blocksize > EXT4_MAX_BLOCK_SIZE) {
3491 ext4_msg(sb, KERN_ERR, 3497 ext4_msg(sb, KERN_ERR,
@@ -4725,7 +4731,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
4725 } 4731 }
4726 4732
4727 ext4_setup_system_zone(sb); 4733 ext4_setup_system_zone(sb);
4728 if (sbi->s_journal == NULL) 4734 if (sbi->s_journal == NULL && !(old_sb_flags & MS_RDONLY))
4729 ext4_commit_super(sb, 1); 4735 ext4_commit_super(sb, 1);
4730 4736
4731#ifdef CONFIG_QUOTA 4737#ifdef CONFIG_QUOTA
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index fed74d193ffb..e95b94945d5f 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -82,7 +82,6 @@ static struct posix_acl *f2fs_acl_from_disk(const char *value, size_t size)
82 case ACL_GROUP_OBJ: 82 case ACL_GROUP_OBJ:
83 case ACL_MASK: 83 case ACL_MASK:
84 case ACL_OTHER: 84 case ACL_OTHER:
85 acl->a_entries[i].e_id = ACL_UNDEFINED_ID;
86 entry = (struct f2fs_acl_entry *)((char *)entry + 85 entry = (struct f2fs_acl_entry *)((char *)entry +
87 sizeof(struct f2fs_acl_entry_short)); 86 sizeof(struct f2fs_acl_entry_short));
88 break; 87 break;
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 655aeabc1dd4..3aa5ce7cab83 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -16,6 +16,7 @@
16#include <linux/backing-dev.h> 16#include <linux/backing-dev.h>
17#include <linux/blkdev.h> 17#include <linux/blkdev.h>
18#include <linux/bio.h> 18#include <linux/bio.h>
19#include <linux/prefetch.h>
19 20
20#include "f2fs.h" 21#include "f2fs.h"
21#include "node.h" 22#include "node.h"
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index b4e24f32b54e..951ed52748f6 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -11,6 +11,7 @@
11#include <linux/fs.h> 11#include <linux/fs.h>
12#include <linux/f2fs_fs.h> 12#include <linux/f2fs_fs.h>
13#include "f2fs.h" 13#include "f2fs.h"
14#include "node.h"
14#include "acl.h" 15#include "acl.h"
15 16
16static unsigned long dir_blocks(struct inode *inode) 17static unsigned long dir_blocks(struct inode *inode)
@@ -74,7 +75,7 @@ static unsigned long dir_block_index(unsigned int level, unsigned int idx)
74 return bidx; 75 return bidx;
75} 76}
76 77
77static bool early_match_name(const char *name, int namelen, 78static bool early_match_name(const char *name, size_t namelen,
78 f2fs_hash_t namehash, struct f2fs_dir_entry *de) 79 f2fs_hash_t namehash, struct f2fs_dir_entry *de)
79{ 80{
80 if (le16_to_cpu(de->name_len) != namelen) 81 if (le16_to_cpu(de->name_len) != namelen)
@@ -87,7 +88,7 @@ static bool early_match_name(const char *name, int namelen,
87} 88}
88 89
89static struct f2fs_dir_entry *find_in_block(struct page *dentry_page, 90static struct f2fs_dir_entry *find_in_block(struct page *dentry_page,
90 const char *name, int namelen, int *max_slots, 91 const char *name, size_t namelen, int *max_slots,
91 f2fs_hash_t namehash, struct page **res_page) 92 f2fs_hash_t namehash, struct page **res_page)
92{ 93{
93 struct f2fs_dir_entry *de; 94 struct f2fs_dir_entry *de;
@@ -126,7 +127,7 @@ found:
126} 127}
127 128
128static struct f2fs_dir_entry *find_in_level(struct inode *dir, 129static struct f2fs_dir_entry *find_in_level(struct inode *dir,
129 unsigned int level, const char *name, int namelen, 130 unsigned int level, const char *name, size_t namelen,
130 f2fs_hash_t namehash, struct page **res_page) 131 f2fs_hash_t namehash, struct page **res_page)
131{ 132{
132 int s = GET_DENTRY_SLOTS(namelen); 133 int s = GET_DENTRY_SLOTS(namelen);
@@ -181,7 +182,7 @@ struct f2fs_dir_entry *f2fs_find_entry(struct inode *dir,
181 struct qstr *child, struct page **res_page) 182 struct qstr *child, struct page **res_page)
182{ 183{
183 const char *name = child->name; 184 const char *name = child->name;
184 int namelen = child->len; 185 size_t namelen = child->len;
185 unsigned long npages = dir_blocks(dir); 186 unsigned long npages = dir_blocks(dir);
186 struct f2fs_dir_entry *de = NULL; 187 struct f2fs_dir_entry *de = NULL;
187 f2fs_hash_t name_hash; 188 f2fs_hash_t name_hash;
@@ -308,6 +309,7 @@ static int init_inode_metadata(struct inode *inode, struct dentry *dentry)
308 ipage = get_node_page(F2FS_SB(dir->i_sb), inode->i_ino); 309 ipage = get_node_page(F2FS_SB(dir->i_sb), inode->i_ino);
309 if (IS_ERR(ipage)) 310 if (IS_ERR(ipage))
310 return PTR_ERR(ipage); 311 return PTR_ERR(ipage);
312 set_cold_node(inode, ipage);
311 init_dent_inode(dentry, ipage); 313 init_dent_inode(dentry, ipage);
312 f2fs_put_page(ipage, 1); 314 f2fs_put_page(ipage, 1);
313 } 315 }
@@ -381,7 +383,7 @@ int f2fs_add_link(struct dentry *dentry, struct inode *inode)
381 struct inode *dir = dentry->d_parent->d_inode; 383 struct inode *dir = dentry->d_parent->d_inode;
382 struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); 384 struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb);
383 const char *name = dentry->d_name.name; 385 const char *name = dentry->d_name.name;
384 int namelen = dentry->d_name.len; 386 size_t namelen = dentry->d_name.len;
385 struct page *dentry_page = NULL; 387 struct page *dentry_page = NULL;
386 struct f2fs_dentry_block *dentry_blk = NULL; 388 struct f2fs_dentry_block *dentry_blk = NULL;
387 int slots = GET_DENTRY_SLOTS(namelen); 389 int slots = GET_DENTRY_SLOTS(namelen);
@@ -540,13 +542,13 @@ int f2fs_make_empty(struct inode *inode, struct inode *parent)
540 542
541 de = &dentry_blk->dentry[0]; 543 de = &dentry_blk->dentry[0];
542 de->name_len = cpu_to_le16(1); 544 de->name_len = cpu_to_le16(1);
543 de->hash_code = 0; 545 de->hash_code = f2fs_dentry_hash(".", 1);
544 de->ino = cpu_to_le32(inode->i_ino); 546 de->ino = cpu_to_le32(inode->i_ino);
545 memcpy(dentry_blk->filename[0], ".", 1); 547 memcpy(dentry_blk->filename[0], ".", 1);
546 set_de_type(de, inode); 548 set_de_type(de, inode);
547 549
548 de = &dentry_blk->dentry[1]; 550 de = &dentry_blk->dentry[1];
549 de->hash_code = 0; 551 de->hash_code = f2fs_dentry_hash("..", 2);
550 de->name_len = cpu_to_le16(2); 552 de->name_len = cpu_to_le16(2);
551 de->ino = cpu_to_le32(parent->i_ino); 553 de->ino = cpu_to_le32(parent->i_ino);
552 memcpy(dentry_blk->filename[1], "..", 2); 554 memcpy(dentry_blk->filename[1], "..", 2);
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index a18d63db2fb6..13c6dfbb7183 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -881,7 +881,7 @@ int f2fs_sync_fs(struct super_block *, int);
881/* 881/*
882 * hash.c 882 * hash.c
883 */ 883 */
884f2fs_hash_t f2fs_dentry_hash(const char *, int); 884f2fs_hash_t f2fs_dentry_hash(const char *, size_t);
885 885
886/* 886/*
887 * node.c 887 * node.c
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index f9e085dfb1f0..7f9ea9271ebe 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -160,15 +160,17 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
160 if (need_to_sync_dir(sbi, inode)) 160 if (need_to_sync_dir(sbi, inode))
161 need_cp = true; 161 need_cp = true;
162 162
163 f2fs_write_inode(inode, NULL);
164
165 if (need_cp) { 163 if (need_cp) {
166 /* all the dirty node pages should be flushed for POR */ 164 /* all the dirty node pages should be flushed for POR */
167 ret = f2fs_sync_fs(inode->i_sb, 1); 165 ret = f2fs_sync_fs(inode->i_sb, 1);
168 clear_inode_flag(F2FS_I(inode), FI_NEED_CP); 166 clear_inode_flag(F2FS_I(inode), FI_NEED_CP);
169 } else { 167 } else {
170 while (sync_node_pages(sbi, inode->i_ino, &wbc) == 0) 168 /* if there is no written node page, write its inode page */
171 f2fs_write_inode(inode, NULL); 169 while (!sync_node_pages(sbi, inode->i_ino, &wbc)) {
170 ret = f2fs_write_inode(inode, NULL);
171 if (ret)
172 goto out;
173 }
172 filemap_fdatawait_range(sbi->node_inode->i_mapping, 174 filemap_fdatawait_range(sbi->node_inode->i_mapping,
173 0, LONG_MAX); 175 0, LONG_MAX);
174 } 176 }
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 644aa3808273..b0ec721e984a 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -390,9 +390,7 @@ next_step:
390 } 390 }
391 391
392 err = check_valid_map(sbi, segno, off); 392 err = check_valid_map(sbi, segno, off);
393 if (err == GC_ERROR) 393 if (err == GC_NEXT)
394 return err;
395 else if (err == GC_NEXT)
396 continue; 394 continue;
397 395
398 if (initial) { 396 if (initial) {
@@ -430,28 +428,22 @@ next_step:
430 */ 428 */
431block_t start_bidx_of_node(unsigned int node_ofs) 429block_t start_bidx_of_node(unsigned int node_ofs)
432{ 430{
433 block_t start_bidx; 431 unsigned int indirect_blks = 2 * NIDS_PER_BLOCK + 4;
434 unsigned int bidx, indirect_blks; 432 unsigned int bidx;
435 int dec;
436 433
437 indirect_blks = 2 * NIDS_PER_BLOCK + 4; 434 if (node_ofs == 0)
435 return 0;
438 436
439 start_bidx = 1; 437 if (node_ofs <= 2) {
440 if (node_ofs == 0) {
441 start_bidx = 0;
442 } else if (node_ofs <= 2) {
443 bidx = node_ofs - 1; 438 bidx = node_ofs - 1;
444 } else if (node_ofs <= indirect_blks) { 439 } else if (node_ofs <= indirect_blks) {
445 dec = (node_ofs - 4) / (NIDS_PER_BLOCK + 1); 440 int dec = (node_ofs - 4) / (NIDS_PER_BLOCK + 1);
446 bidx = node_ofs - 2 - dec; 441 bidx = node_ofs - 2 - dec;
447 } else { 442 } else {
448 dec = (node_ofs - indirect_blks - 3) / (NIDS_PER_BLOCK + 1); 443 int dec = (node_ofs - indirect_blks - 3) / (NIDS_PER_BLOCK + 1);
449 bidx = node_ofs - 5 - dec; 444 bidx = node_ofs - 5 - dec;
450 } 445 }
451 446 return bidx * ADDRS_PER_BLOCK + ADDRS_PER_INODE;
452 if (start_bidx)
453 start_bidx = bidx * ADDRS_PER_BLOCK + ADDRS_PER_INODE;
454 return start_bidx;
455} 447}
456 448
457static int check_dnode(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, 449static int check_dnode(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
@@ -556,9 +548,7 @@ next_step:
556 } 548 }
557 549
558 err = check_valid_map(sbi, segno, off); 550 err = check_valid_map(sbi, segno, off);
559 if (err == GC_ERROR) 551 if (err == GC_NEXT)
560 goto stop;
561 else if (err == GC_NEXT)
562 continue; 552 continue;
563 553
564 if (phase == 0) { 554 if (phase == 0) {
@@ -568,9 +558,7 @@ next_step:
568 558
569 /* Get an inode by ino with checking validity */ 559 /* Get an inode by ino with checking validity */
570 err = check_dnode(sbi, entry, &dni, start_addr + off, &nofs); 560 err = check_dnode(sbi, entry, &dni, start_addr + off, &nofs);
571 if (err == GC_ERROR) 561 if (err == GC_NEXT)
572 goto stop;
573 else if (err == GC_NEXT)
574 continue; 562 continue;
575 563
576 if (phase == 1) { 564 if (phase == 1) {
diff --git a/fs/f2fs/hash.c b/fs/f2fs/hash.c
index a60f04200f8b..6eb8d269b53b 100644
--- a/fs/f2fs/hash.c
+++ b/fs/f2fs/hash.c
@@ -42,7 +42,7 @@ static void TEA_transform(unsigned int buf[4], unsigned int const in[])
42 buf[1] += b1; 42 buf[1] += b1;
43} 43}
44 44
45static void str2hashbuf(const char *msg, int len, unsigned int *buf, int num) 45static void str2hashbuf(const char *msg, size_t len, unsigned int *buf, int num)
46{ 46{
47 unsigned pad, val; 47 unsigned pad, val;
48 int i; 48 int i;
@@ -69,13 +69,17 @@ static void str2hashbuf(const char *msg, int len, unsigned int *buf, int num)
69 *buf++ = pad; 69 *buf++ = pad;
70} 70}
71 71
72f2fs_hash_t f2fs_dentry_hash(const char *name, int len) 72f2fs_hash_t f2fs_dentry_hash(const char *name, size_t len)
73{ 73{
74 __u32 hash, minor_hash; 74 __u32 hash;
75 f2fs_hash_t f2fs_hash; 75 f2fs_hash_t f2fs_hash;
76 const char *p; 76 const char *p;
77 __u32 in[8], buf[4]; 77 __u32 in[8], buf[4];
78 78
79 if ((len <= 2) && (name[0] == '.') &&
80 (name[1] == '.' || name[1] == '\0'))
81 return 0;
82
79 /* Initialize the default seed for the hash checksum functions */ 83 /* Initialize the default seed for the hash checksum functions */
80 buf[0] = 0x67452301; 84 buf[0] = 0x67452301;
81 buf[1] = 0xefcdab89; 85 buf[1] = 0xefcdab89;
@@ -83,15 +87,15 @@ f2fs_hash_t f2fs_dentry_hash(const char *name, int len)
83 buf[3] = 0x10325476; 87 buf[3] = 0x10325476;
84 88
85 p = name; 89 p = name;
86 while (len > 0) { 90 while (1) {
87 str2hashbuf(p, len, in, 4); 91 str2hashbuf(p, len, in, 4);
88 TEA_transform(buf, in); 92 TEA_transform(buf, in);
89 len -= 16;
90 p += 16; 93 p += 16;
94 if (len <= 16)
95 break;
96 len -= 16;
91 } 97 }
92 hash = buf[0]; 98 hash = buf[0];
93 minor_hash = buf[1];
94
95 f2fs_hash = cpu_to_le32(hash & ~F2FS_HASH_COL_BIT); 99 f2fs_hash = cpu_to_le32(hash & ~F2FS_HASH_COL_BIT);
96 return f2fs_hash; 100 return f2fs_hash;
97} 101}
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index df5fb381ebf1..bf20b4d03214 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -203,6 +203,7 @@ void update_inode(struct inode *inode, struct page *node_page)
203 ri->i_flags = cpu_to_le32(F2FS_I(inode)->i_flags); 203 ri->i_flags = cpu_to_le32(F2FS_I(inode)->i_flags);
204 ri->i_pino = cpu_to_le32(F2FS_I(inode)->i_pino); 204 ri->i_pino = cpu_to_le32(F2FS_I(inode)->i_pino);
205 ri->i_generation = cpu_to_le32(inode->i_generation); 205 ri->i_generation = cpu_to_le32(inode->i_generation);
206 set_cold_node(inode, node_page);
206 set_page_dirty(node_page); 207 set_page_dirty(node_page);
207} 208}
208 209
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 89b7675dc377..1a49b881bac0 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -77,8 +77,8 @@ fail:
77 77
78static int is_multimedia_file(const unsigned char *s, const char *sub) 78static int is_multimedia_file(const unsigned char *s, const char *sub)
79{ 79{
80 int slen = strlen(s); 80 size_t slen = strlen(s);
81 int sublen = strlen(sub); 81 size_t sublen = strlen(sub);
82 int ret; 82 int ret;
83 83
84 if (sublen > slen) 84 if (sublen > slen)
@@ -123,6 +123,8 @@ static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
123 nid_t ino = 0; 123 nid_t ino = 0;
124 int err; 124 int err;
125 125
126 f2fs_balance_fs(sbi);
127
126 inode = f2fs_new_inode(dir, mode); 128 inode = f2fs_new_inode(dir, mode);
127 if (IS_ERR(inode)) 129 if (IS_ERR(inode))
128 return PTR_ERR(inode); 130 return PTR_ERR(inode);
@@ -144,8 +146,6 @@ static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
144 if (!sbi->por_doing) 146 if (!sbi->por_doing)
145 d_instantiate(dentry, inode); 147 d_instantiate(dentry, inode);
146 unlock_new_inode(inode); 148 unlock_new_inode(inode);
147
148 f2fs_balance_fs(sbi);
149 return 0; 149 return 0;
150out: 150out:
151 clear_nlink(inode); 151 clear_nlink(inode);
@@ -163,6 +163,8 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,
163 struct f2fs_sb_info *sbi = F2FS_SB(sb); 163 struct f2fs_sb_info *sbi = F2FS_SB(sb);
164 int err; 164 int err;
165 165
166 f2fs_balance_fs(sbi);
167
166 inode->i_ctime = CURRENT_TIME; 168 inode->i_ctime = CURRENT_TIME;
167 atomic_inc(&inode->i_count); 169 atomic_inc(&inode->i_count);
168 170
@@ -172,8 +174,6 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,
172 goto out; 174 goto out;
173 175
174 d_instantiate(dentry, inode); 176 d_instantiate(dentry, inode);
175
176 f2fs_balance_fs(sbi);
177 return 0; 177 return 0;
178out: 178out:
179 clear_inode_flag(F2FS_I(inode), FI_INC_LINK); 179 clear_inode_flag(F2FS_I(inode), FI_INC_LINK);
@@ -223,6 +223,8 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
223 struct page *page; 223 struct page *page;
224 int err = -ENOENT; 224 int err = -ENOENT;
225 225
226 f2fs_balance_fs(sbi);
227
226 de = f2fs_find_entry(dir, &dentry->d_name, &page); 228 de = f2fs_find_entry(dir, &dentry->d_name, &page);
227 if (!de) 229 if (!de)
228 goto fail; 230 goto fail;
@@ -238,7 +240,6 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
238 240
239 /* In order to evict this inode, we set it dirty */ 241 /* In order to evict this inode, we set it dirty */
240 mark_inode_dirty(inode); 242 mark_inode_dirty(inode);
241 f2fs_balance_fs(sbi);
242fail: 243fail:
243 return err; 244 return err;
244} 245}
@@ -249,9 +250,11 @@ static int f2fs_symlink(struct inode *dir, struct dentry *dentry,
249 struct super_block *sb = dir->i_sb; 250 struct super_block *sb = dir->i_sb;
250 struct f2fs_sb_info *sbi = F2FS_SB(sb); 251 struct f2fs_sb_info *sbi = F2FS_SB(sb);
251 struct inode *inode; 252 struct inode *inode;
252 unsigned symlen = strlen(symname) + 1; 253 size_t symlen = strlen(symname) + 1;
253 int err; 254 int err;
254 255
256 f2fs_balance_fs(sbi);
257
255 inode = f2fs_new_inode(dir, S_IFLNK | S_IRWXUGO); 258 inode = f2fs_new_inode(dir, S_IFLNK | S_IRWXUGO);
256 if (IS_ERR(inode)) 259 if (IS_ERR(inode))
257 return PTR_ERR(inode); 260 return PTR_ERR(inode);
@@ -268,9 +271,6 @@ static int f2fs_symlink(struct inode *dir, struct dentry *dentry,
268 271
269 d_instantiate(dentry, inode); 272 d_instantiate(dentry, inode);
270 unlock_new_inode(inode); 273 unlock_new_inode(inode);
271
272 f2fs_balance_fs(sbi);
273
274 return err; 274 return err;
275out: 275out:
276 clear_nlink(inode); 276 clear_nlink(inode);
@@ -286,6 +286,8 @@ static int f2fs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
286 struct inode *inode; 286 struct inode *inode;
287 int err; 287 int err;
288 288
289 f2fs_balance_fs(sbi);
290
289 inode = f2fs_new_inode(dir, S_IFDIR | mode); 291 inode = f2fs_new_inode(dir, S_IFDIR | mode);
290 if (IS_ERR(inode)) 292 if (IS_ERR(inode))
291 return PTR_ERR(inode); 293 return PTR_ERR(inode);
@@ -305,7 +307,6 @@ static int f2fs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
305 d_instantiate(dentry, inode); 307 d_instantiate(dentry, inode);
306 unlock_new_inode(inode); 308 unlock_new_inode(inode);
307 309
308 f2fs_balance_fs(sbi);
309 return 0; 310 return 0;
310 311
311out_fail: 312out_fail:
@@ -336,6 +337,8 @@ static int f2fs_mknod(struct inode *dir, struct dentry *dentry,
336 if (!new_valid_dev(rdev)) 337 if (!new_valid_dev(rdev))
337 return -EINVAL; 338 return -EINVAL;
338 339
340 f2fs_balance_fs(sbi);
341
339 inode = f2fs_new_inode(dir, mode); 342 inode = f2fs_new_inode(dir, mode);
340 if (IS_ERR(inode)) 343 if (IS_ERR(inode))
341 return PTR_ERR(inode); 344 return PTR_ERR(inode);
@@ -350,9 +353,6 @@ static int f2fs_mknod(struct inode *dir, struct dentry *dentry,
350 alloc_nid_done(sbi, inode->i_ino); 353 alloc_nid_done(sbi, inode->i_ino);
351 d_instantiate(dentry, inode); 354 d_instantiate(dentry, inode);
352 unlock_new_inode(inode); 355 unlock_new_inode(inode);
353
354 f2fs_balance_fs(sbi);
355
356 return 0; 356 return 0;
357out: 357out:
358 clear_nlink(inode); 358 clear_nlink(inode);
@@ -376,6 +376,8 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
376 struct f2fs_dir_entry *new_entry; 376 struct f2fs_dir_entry *new_entry;
377 int err = -ENOENT; 377 int err = -ENOENT;
378 378
379 f2fs_balance_fs(sbi);
380
379 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); 381 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page);
380 if (!old_entry) 382 if (!old_entry)
381 goto out; 383 goto out;
@@ -441,8 +443,6 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
441 } 443 }
442 444
443 mutex_unlock_op(sbi, RENAME); 445 mutex_unlock_op(sbi, RENAME);
444
445 f2fs_balance_fs(sbi);
446 return 0; 446 return 0;
447 447
448out_dir: 448out_dir:
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 19870361497e..5066bfd256c9 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -484,12 +484,14 @@ static void truncate_node(struct dnode_of_data *dn)
484 struct node_info ni; 484 struct node_info ni;
485 485
486 get_node_info(sbi, dn->nid, &ni); 486 get_node_info(sbi, dn->nid, &ni);
487 if (dn->inode->i_blocks == 0) {
488 BUG_ON(ni.blk_addr != NULL_ADDR);
489 goto invalidate;
490 }
487 BUG_ON(ni.blk_addr == NULL_ADDR); 491 BUG_ON(ni.blk_addr == NULL_ADDR);
488 492
489 if (ni.blk_addr != NULL_ADDR)
490 invalidate_blocks(sbi, ni.blk_addr);
491
492 /* Deallocate node address */ 493 /* Deallocate node address */
494 invalidate_blocks(sbi, ni.blk_addr);
493 dec_valid_node_count(sbi, dn->inode, 1); 495 dec_valid_node_count(sbi, dn->inode, 1);
494 set_node_addr(sbi, &ni, NULL_ADDR); 496 set_node_addr(sbi, &ni, NULL_ADDR);
495 497
@@ -499,7 +501,7 @@ static void truncate_node(struct dnode_of_data *dn)
499 } else { 501 } else {
500 sync_inode_page(dn); 502 sync_inode_page(dn);
501 } 503 }
502 504invalidate:
503 clear_node_page_dirty(dn->node_page); 505 clear_node_page_dirty(dn->node_page);
504 F2FS_SET_SB_DIRT(sbi); 506 F2FS_SET_SB_DIRT(sbi);
505 507
@@ -768,20 +770,12 @@ int remove_inode_page(struct inode *inode)
768 dn.inode_page_locked = 1; 770 dn.inode_page_locked = 1;
769 truncate_node(&dn); 771 truncate_node(&dn);
770 } 772 }
771 if (inode->i_blocks == 1) {
772 /* inernally call f2fs_put_page() */
773 set_new_dnode(&dn, inode, page, page, ino);
774 truncate_node(&dn);
775 } else if (inode->i_blocks == 0) {
776 struct node_info ni;
777 get_node_info(sbi, inode->i_ino, &ni);
778 773
779 /* called after f2fs_new_inode() is failed */ 774 /* 0 is possible, after f2fs_new_inode() is failed */
780 BUG_ON(ni.blk_addr != NULL_ADDR); 775 BUG_ON(inode->i_blocks != 0 && inode->i_blocks != 1);
781 f2fs_put_page(page, 1); 776 set_new_dnode(&dn, inode, page, page, ino);
782 } else { 777 truncate_node(&dn);
783 BUG(); 778
784 }
785 mutex_unlock_op(sbi, NODE_TRUNC); 779 mutex_unlock_op(sbi, NODE_TRUNC);
786 return 0; 780 return 0;
787} 781}
@@ -834,17 +828,18 @@ struct page *new_node_page(struct dnode_of_data *dn, unsigned int ofs)
834 goto fail; 828 goto fail;
835 } 829 }
836 set_node_addr(sbi, &new_ni, NEW_ADDR); 830 set_node_addr(sbi, &new_ni, NEW_ADDR);
831 set_cold_node(dn->inode, page);
837 832
838 dn->node_page = page; 833 dn->node_page = page;
839 sync_inode_page(dn); 834 sync_inode_page(dn);
840 set_page_dirty(page); 835 set_page_dirty(page);
841 set_cold_node(dn->inode, page);
842 if (ofs == 0) 836 if (ofs == 0)
843 inc_valid_inode_count(sbi); 837 inc_valid_inode_count(sbi);
844 838
845 return page; 839 return page;
846 840
847fail: 841fail:
842 clear_node_page_dirty(page);
848 f2fs_put_page(page, 1); 843 f2fs_put_page(page, 1);
849 return ERR_PTR(err); 844 return ERR_PTR(err);
850} 845}
@@ -1093,7 +1088,6 @@ static int f2fs_write_node_page(struct page *page,
1093{ 1088{
1094 struct f2fs_sb_info *sbi = F2FS_SB(page->mapping->host->i_sb); 1089 struct f2fs_sb_info *sbi = F2FS_SB(page->mapping->host->i_sb);
1095 nid_t nid; 1090 nid_t nid;
1096 unsigned int nofs;
1097 block_t new_addr; 1091 block_t new_addr;
1098 struct node_info ni; 1092 struct node_info ni;
1099 1093
@@ -1110,7 +1104,6 @@ static int f2fs_write_node_page(struct page *page,
1110 1104
1111 /* get old block addr of this node page */ 1105 /* get old block addr of this node page */
1112 nid = nid_of_node(page); 1106 nid = nid_of_node(page);
1113 nofs = ofs_of_node(page);
1114 BUG_ON(page->index != nid); 1107 BUG_ON(page->index != nid);
1115 1108
1116 get_node_info(sbi, nid, &ni); 1109 get_node_info(sbi, nid, &ni);
@@ -1571,7 +1564,7 @@ void flush_nat_entries(struct f2fs_sb_info *sbi)
1571 nid_t nid; 1564 nid_t nid;
1572 struct f2fs_nat_entry raw_ne; 1565 struct f2fs_nat_entry raw_ne;
1573 int offset = -1; 1566 int offset = -1;
1574 block_t old_blkaddr, new_blkaddr; 1567 block_t new_blkaddr;
1575 1568
1576 ne = list_entry(cur, struct nat_entry, list); 1569 ne = list_entry(cur, struct nat_entry, list);
1577 nid = nat_get_nid(ne); 1570 nid = nat_get_nid(ne);
@@ -1585,7 +1578,6 @@ void flush_nat_entries(struct f2fs_sb_info *sbi)
1585 offset = lookup_journal_in_cursum(sum, NAT_JOURNAL, nid, 1); 1578 offset = lookup_journal_in_cursum(sum, NAT_JOURNAL, nid, 1);
1586 if (offset >= 0) { 1579 if (offset >= 0) {
1587 raw_ne = nat_in_journal(sum, offset); 1580 raw_ne = nat_in_journal(sum, offset);
1588 old_blkaddr = le32_to_cpu(raw_ne.block_addr);
1589 goto flush_now; 1581 goto flush_now;
1590 } 1582 }
1591to_nat_page: 1583to_nat_page:
@@ -1607,7 +1599,6 @@ to_nat_page:
1607 1599
1608 BUG_ON(!nat_blk); 1600 BUG_ON(!nat_blk);
1609 raw_ne = nat_blk->entries[nid - start_nid]; 1601 raw_ne = nat_blk->entries[nid - start_nid];
1610 old_blkaddr = le32_to_cpu(raw_ne.block_addr);
1611flush_now: 1602flush_now:
1612 new_blkaddr = nat_get_blkaddr(ne); 1603 new_blkaddr = nat_get_blkaddr(ne);
1613 1604
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index b07e9b6ef376..b571fee677d5 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -144,14 +144,15 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
144 goto out; 144 goto out;
145 } 145 }
146 146
147 INIT_LIST_HEAD(&entry->list);
148 list_add_tail(&entry->list, head);
149
150 entry->inode = f2fs_iget(sbi->sb, ino_of_node(page)); 147 entry->inode = f2fs_iget(sbi->sb, ino_of_node(page));
151 if (IS_ERR(entry->inode)) { 148 if (IS_ERR(entry->inode)) {
152 err = PTR_ERR(entry->inode); 149 err = PTR_ERR(entry->inode);
150 kmem_cache_free(fsync_entry_slab, entry);
153 goto out; 151 goto out;
154 } 152 }
153
154 INIT_LIST_HEAD(&entry->list);
155 list_add_tail(&entry->list, head);
155 entry->blkaddr = blkaddr; 156 entry->blkaddr = blkaddr;
156 } 157 }
157 if (IS_INODE(page)) { 158 if (IS_INODE(page)) {
@@ -228,6 +229,9 @@ static void check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
228 229
229 /* Deallocate previous index in the node page */ 230 /* Deallocate previous index in the node page */
230 inode = f2fs_iget_nowait(sbi->sb, ino); 231 inode = f2fs_iget_nowait(sbi->sb, ino);
232 if (IS_ERR(inode))
233 return;
234
231 truncate_hole(inode, bidx, bidx + 1); 235 truncate_hole(inode, bidx, bidx + 1);
232 iput(inode); 236 iput(inode);
233} 237}
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 1b26e4ea1016..de6240922b0a 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -12,54 +12,23 @@
12#include <linux/f2fs_fs.h> 12#include <linux/f2fs_fs.h>
13#include <linux/bio.h> 13#include <linux/bio.h>
14#include <linux/blkdev.h> 14#include <linux/blkdev.h>
15#include <linux/prefetch.h>
15#include <linux/vmalloc.h> 16#include <linux/vmalloc.h>
16 17
17#include "f2fs.h" 18#include "f2fs.h"
18#include "segment.h" 19#include "segment.h"
19#include "node.h" 20#include "node.h"
20 21
21static int need_to_flush(struct f2fs_sb_info *sbi)
22{
23 unsigned int pages_per_sec = (1 << sbi->log_blocks_per_seg) *
24 sbi->segs_per_sec;
25 int node_secs = ((get_pages(sbi, F2FS_DIRTY_NODES) + pages_per_sec - 1)
26 >> sbi->log_blocks_per_seg) / sbi->segs_per_sec;
27 int dent_secs = ((get_pages(sbi, F2FS_DIRTY_DENTS) + pages_per_sec - 1)
28 >> sbi->log_blocks_per_seg) / sbi->segs_per_sec;
29
30 if (sbi->por_doing)
31 return 0;
32
33 if (free_sections(sbi) <= (node_secs + 2 * dent_secs +
34 reserved_sections(sbi)))
35 return 1;
36 return 0;
37}
38
39/* 22/*
40 * This function balances dirty node and dentry pages. 23 * This function balances dirty node and dentry pages.
41 * In addition, it controls garbage collection. 24 * In addition, it controls garbage collection.
42 */ 25 */
43void f2fs_balance_fs(struct f2fs_sb_info *sbi) 26void f2fs_balance_fs(struct f2fs_sb_info *sbi)
44{ 27{
45 struct writeback_control wbc = {
46 .sync_mode = WB_SYNC_ALL,
47 .nr_to_write = LONG_MAX,
48 .for_reclaim = 0,
49 };
50
51 if (sbi->por_doing)
52 return;
53
54 /* 28 /*
55 * We should do checkpoint when there are so many dirty node pages 29 * We should do GC or end up with checkpoint, if there are so many dirty
56 * with enough free segments. After then, we should do GC. 30 * dir/node pages without enough free segments.
57 */ 31 */
58 if (need_to_flush(sbi)) {
59 sync_dirty_dir_inodes(sbi);
60 sync_node_pages(sbi, 0, &wbc);
61 }
62
63 if (has_not_enough_free_secs(sbi)) { 32 if (has_not_enough_free_secs(sbi)) {
64 mutex_lock(&sbi->gc_mutex); 33 mutex_lock(&sbi->gc_mutex);
65 f2fs_gc(sbi, 1); 34 f2fs_gc(sbi, 1);
@@ -631,7 +600,6 @@ static void f2fs_end_io_write(struct bio *bio, int err)
631 if (page->mapping) 600 if (page->mapping)
632 set_bit(AS_EIO, &page->mapping->flags); 601 set_bit(AS_EIO, &page->mapping->flags);
633 set_ckpt_flags(p->sbi->ckpt, CP_ERROR_FLAG); 602 set_ckpt_flags(p->sbi->ckpt, CP_ERROR_FLAG);
634 set_page_dirty(page);
635 } 603 }
636 end_page_writeback(page); 604 end_page_writeback(page);
637 dec_page_count(p->sbi, F2FS_WRITEBACK); 605 dec_page_count(p->sbi, F2FS_WRITEBACK);
@@ -791,11 +759,10 @@ static int __get_segment_type(struct page *page, enum page_type p_type)
791 return __get_segment_type_2(page, p_type); 759 return __get_segment_type_2(page, p_type);
792 case 4: 760 case 4:
793 return __get_segment_type_4(page, p_type); 761 return __get_segment_type_4(page, p_type);
794 case 6:
795 return __get_segment_type_6(page, p_type);
796 default:
797 BUG();
798 } 762 }
763 /* NR_CURSEG_TYPE(6) logs by default */
764 BUG_ON(sbi->active_logs != NR_CURSEG_TYPE);
765 return __get_segment_type_6(page, p_type);
799} 766}
800 767
801static void do_write_page(struct f2fs_sb_info *sbi, struct page *page, 768static void do_write_page(struct f2fs_sb_info *sbi, struct page *page,
@@ -1608,7 +1575,6 @@ static int build_dirty_segmap(struct f2fs_sb_info *sbi)
1608 1575
1609 for (i = 0; i < NR_DIRTY_TYPE; i++) { 1576 for (i = 0; i < NR_DIRTY_TYPE; i++) {
1610 dirty_i->dirty_segmap[i] = kzalloc(bitmap_size, GFP_KERNEL); 1577 dirty_i->dirty_segmap[i] = kzalloc(bitmap_size, GFP_KERNEL);
1611 dirty_i->nr_dirty[i] = 0;
1612 if (!dirty_i->dirty_segmap[i]) 1578 if (!dirty_i->dirty_segmap[i])
1613 return -ENOMEM; 1579 return -ENOMEM;
1614 } 1580 }
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 0948405af6f5..66a288a52fd3 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -459,7 +459,20 @@ static inline int get_ssr_segment(struct f2fs_sb_info *sbi, int type)
459 459
460static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi) 460static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi)
461{ 461{
462 return free_sections(sbi) <= reserved_sections(sbi); 462 unsigned int pages_per_sec = (1 << sbi->log_blocks_per_seg) *
463 sbi->segs_per_sec;
464 int node_secs = ((get_pages(sbi, F2FS_DIRTY_NODES) + pages_per_sec - 1)
465 >> sbi->log_blocks_per_seg) / sbi->segs_per_sec;
466 int dent_secs = ((get_pages(sbi, F2FS_DIRTY_DENTS) + pages_per_sec - 1)
467 >> sbi->log_blocks_per_seg) / sbi->segs_per_sec;
468
469 if (sbi->por_doing)
470 return false;
471
472 if (free_sections(sbi) <= (node_secs + 2 * dent_secs +
473 reserved_sections(sbi)))
474 return true;
475 return false;
463} 476}
464 477
465static inline int utilization(struct f2fs_sb_info *sbi) 478static inline int utilization(struct f2fs_sb_info *sbi)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 13867322cf5a..08a94c814bdc 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -119,7 +119,6 @@ static void f2fs_put_super(struct super_block *sb)
119int f2fs_sync_fs(struct super_block *sb, int sync) 119int f2fs_sync_fs(struct super_block *sb, int sync)
120{ 120{
121 struct f2fs_sb_info *sbi = F2FS_SB(sb); 121 struct f2fs_sb_info *sbi = F2FS_SB(sb);
122 int ret = 0;
123 122
124 if (!sbi->s_dirty && !get_pages(sbi, F2FS_DIRTY_NODES)) 123 if (!sbi->s_dirty && !get_pages(sbi, F2FS_DIRTY_NODES))
125 return 0; 124 return 0;
@@ -127,7 +126,7 @@ int f2fs_sync_fs(struct super_block *sb, int sync)
127 if (sync) 126 if (sync)
128 write_checkpoint(sbi, false, false); 127 write_checkpoint(sbi, false, false);
129 128
130 return ret; 129 return 0;
131} 130}
132 131
133static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf) 132static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf)
@@ -148,8 +147,8 @@ static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf)
148 buf->f_bfree = buf->f_blocks - valid_user_blocks(sbi) - ovp_count; 147 buf->f_bfree = buf->f_blocks - valid_user_blocks(sbi) - ovp_count;
149 buf->f_bavail = user_block_count - valid_user_blocks(sbi); 148 buf->f_bavail = user_block_count - valid_user_blocks(sbi);
150 149
151 buf->f_files = valid_inode_count(sbi); 150 buf->f_files = sbi->total_node_count;
152 buf->f_ffree = sbi->total_node_count - valid_node_count(sbi); 151 buf->f_ffree = sbi->total_node_count - valid_inode_count(sbi);
153 152
154 buf->f_namelen = F2FS_MAX_NAME_LEN; 153 buf->f_namelen = F2FS_MAX_NAME_LEN;
155 buf->f_fsid.val[0] = (u32)id; 154 buf->f_fsid.val[0] = (u32)id;
@@ -302,7 +301,7 @@ static int parse_options(struct f2fs_sb_info *sbi, char *options)
302 case Opt_active_logs: 301 case Opt_active_logs:
303 if (args->from && match_int(args, &arg)) 302 if (args->from && match_int(args, &arg))
304 return -EINVAL; 303 return -EINVAL;
305 if (arg != 2 && arg != 4 && arg != 6) 304 if (arg != 2 && arg != 4 && arg != NR_CURSEG_TYPE)
306 return -EINVAL; 305 return -EINVAL;
307 sbi->active_logs = arg; 306 sbi->active_logs = arg;
308 break; 307 break;
@@ -528,8 +527,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
528 527
529 /* if there are nt orphan nodes free them */ 528 /* if there are nt orphan nodes free them */
530 err = -EINVAL; 529 err = -EINVAL;
531 if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG) && 530 if (recover_orphan_inodes(sbi))
532 recover_orphan_inodes(sbi))
533 goto free_node_inode; 531 goto free_node_inode;
534 532
535 /* read root inode and dentry */ 533 /* read root inode and dentry */
@@ -548,8 +546,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
548 } 546 }
549 547
550 /* recover fsynced data */ 548 /* recover fsynced data */
551 if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG) && 549 if (!test_opt(sbi, DISABLE_ROLL_FORWARD))
552 !test_opt(sbi, DISABLE_ROLL_FORWARD))
553 recover_fsync_data(sbi); 550 recover_fsync_data(sbi);
554 551
555 /* After POR, we can run background GC thread */ 552 /* After POR, we can run background GC thread */
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index 7d52e8dc0c59..940136a3d3a6 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -208,7 +208,7 @@ int f2fs_getxattr(struct inode *inode, int name_index, const char *name,
208 struct page *page; 208 struct page *page;
209 void *base_addr; 209 void *base_addr;
210 int error = 0, found = 0; 210 int error = 0, found = 0;
211 int value_len, name_len; 211 size_t value_len, name_len;
212 212
213 if (name == NULL) 213 if (name == NULL)
214 return -EINVAL; 214 return -EINVAL;
@@ -304,7 +304,8 @@ int f2fs_setxattr(struct inode *inode, int name_index, const char *name,
304 struct f2fs_xattr_entry *here, *last; 304 struct f2fs_xattr_entry *here, *last;
305 struct page *page; 305 struct page *page;
306 void *base_addr; 306 void *base_addr;
307 int error, found, free, name_len, newsize; 307 int error, found, free, newsize;
308 size_t name_len;
308 char *pval; 309 char *pval;
309 310
310 if (name == NULL) 311 if (name == NULL)
diff --git a/fs/file.c b/fs/file.c
index 15cb8618e95d..2b3570b7caeb 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -490,7 +490,7 @@ void exit_files(struct task_struct *tsk)
490 } 490 }
491} 491}
492 492
493static void __devinit fdtable_defer_list_init(int cpu) 493static void fdtable_defer_list_init(int cpu)
494{ 494{
495 struct fdtable_defer *fddef = &per_cpu(fdtable_defer_list, cpu); 495 struct fdtable_defer *fddef = &per_cpu(fdtable_defer_list, cpu);
496 spin_lock_init(&fddef->lock); 496 spin_lock_init(&fddef->lock);
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
index 8dad6b093716..b906ed17a839 100644
--- a/fs/gfs2/lock_dlm.c
+++ b/fs/gfs2/lock_dlm.c
@@ -241,6 +241,7 @@ static u32 make_flags(struct gfs2_glock *gl, const unsigned int gfs_flags,
241 241
242static void gfs2_reverse_hex(char *c, u64 value) 242static void gfs2_reverse_hex(char *c, u64 value)
243{ 243{
244 *c = '0';
244 while (value) { 245 while (value) {
245 *c-- = hex_asc[value & 0x0f]; 246 *c-- = hex_asc[value & 0x0f];
246 value >>= 4; 247 value >>= 4;
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 37ee061d899e..b7eff078fe90 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -350,10 +350,14 @@ static u32 gfs2_free_extlen(const struct gfs2_rbm *rrbm, u32 len)
350 BUG_ON(len < chunk_size); 350 BUG_ON(len < chunk_size);
351 len -= chunk_size; 351 len -= chunk_size;
352 block = gfs2_rbm_to_block(&rbm); 352 block = gfs2_rbm_to_block(&rbm);
353 gfs2_rbm_from_block(&rbm, block + chunk_size); 353 if (gfs2_rbm_from_block(&rbm, block + chunk_size)) {
354 n_unaligned = 3; 354 n_unaligned = 0;
355 if (ptr)
356 break; 355 break;
356 }
357 if (ptr) {
358 n_unaligned = 3;
359 break;
360 }
357 n_unaligned = len & 3; 361 n_unaligned = len & 3;
358 } 362 }
359 363
@@ -557,22 +561,20 @@ void gfs2_free_clones(struct gfs2_rgrpd *rgd)
557 */ 561 */
558int gfs2_rs_alloc(struct gfs2_inode *ip) 562int gfs2_rs_alloc(struct gfs2_inode *ip)
559{ 563{
560 struct gfs2_blkreserv *res; 564 int error = 0;
561 565
566 down_write(&ip->i_rw_mutex);
562 if (ip->i_res) 567 if (ip->i_res)
563 return 0; 568 goto out;
564
565 res = kmem_cache_zalloc(gfs2_rsrv_cachep, GFP_NOFS);
566 if (!res)
567 return -ENOMEM;
568 569
569 RB_CLEAR_NODE(&res->rs_node); 570 ip->i_res = kmem_cache_zalloc(gfs2_rsrv_cachep, GFP_NOFS);
571 if (!ip->i_res) {
572 error = -ENOMEM;
573 goto out;
574 }
570 575
571 down_write(&ip->i_rw_mutex); 576 RB_CLEAR_NODE(&ip->i_res->rs_node);
572 if (ip->i_res) 577out:
573 kmem_cache_free(gfs2_rsrv_cachep, res);
574 else
575 ip->i_res = res;
576 up_write(&ip->i_rw_mutex); 578 up_write(&ip->i_rw_mutex);
577 return 0; 579 return 0;
578} 580}
@@ -1424,6 +1426,9 @@ static void rg_mblk_search(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip,
1424 rs->rs_free = extlen; 1426 rs->rs_free = extlen;
1425 rs->rs_inum = ip->i_no_addr; 1427 rs->rs_inum = ip->i_no_addr;
1426 rs_insert(ip); 1428 rs_insert(ip);
1429 } else {
1430 if (goal == rgd->rd_last_alloc + rgd->rd_data0)
1431 rgd->rd_last_alloc = 0;
1427 } 1432 }
1428} 1433}
1429 1434
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 42f6615af0ac..df9f29760efa 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -209,7 +209,8 @@ repeat:
209 if (!new_transaction) 209 if (!new_transaction)
210 goto alloc_transaction; 210 goto alloc_transaction;
211 write_lock(&journal->j_state_lock); 211 write_lock(&journal->j_state_lock);
212 if (!journal->j_running_transaction) { 212 if (!journal->j_running_transaction &&
213 !journal->j_barrier_count) {
213 jbd2_get_transaction(journal, new_transaction); 214 jbd2_get_transaction(journal, new_transaction);
214 new_transaction = NULL; 215 new_transaction = NULL;
215 } 216 }
@@ -1839,7 +1840,6 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh,
1839 1840
1840 BUFFER_TRACE(bh, "entry"); 1841 BUFFER_TRACE(bh, "entry");
1841 1842
1842retry:
1843 /* 1843 /*
1844 * It is safe to proceed here without the j_list_lock because the 1844 * It is safe to proceed here without the j_list_lock because the
1845 * buffers cannot be stolen by try_to_free_buffers as long as we are 1845 * buffers cannot be stolen by try_to_free_buffers as long as we are
@@ -1934,14 +1934,11 @@ retry:
1934 * for commit and try again. 1934 * for commit and try again.
1935 */ 1935 */
1936 if (partial_page) { 1936 if (partial_page) {
1937 tid_t tid = journal->j_committing_transaction->t_tid;
1938
1939 jbd2_journal_put_journal_head(jh); 1937 jbd2_journal_put_journal_head(jh);
1940 spin_unlock(&journal->j_list_lock); 1938 spin_unlock(&journal->j_list_lock);
1941 jbd_unlock_bh_state(bh); 1939 jbd_unlock_bh_state(bh);
1942 write_unlock(&journal->j_state_lock); 1940 write_unlock(&journal->j_state_lock);
1943 jbd2_log_wait_commit(journal, tid); 1941 return -EBUSY;
1944 goto retry;
1945 } 1942 }
1946 /* 1943 /*
1947 * OK, buffer won't be reachable after truncate. We just set 1944 * OK, buffer won't be reachable after truncate. We just set
@@ -2002,21 +1999,23 @@ zap_buffer_unlocked:
2002 * @page: page to flush 1999 * @page: page to flush
2003 * @offset: length of page to invalidate. 2000 * @offset: length of page to invalidate.
2004 * 2001 *
2005 * Reap page buffers containing data after offset in page. 2002 * Reap page buffers containing data after offset in page. Can return -EBUSY
2006 * 2003 * if buffers are part of the committing transaction and the page is straddling
2004 * i_size. Caller then has to wait for current commit and try again.
2007 */ 2005 */
2008void jbd2_journal_invalidatepage(journal_t *journal, 2006int jbd2_journal_invalidatepage(journal_t *journal,
2009 struct page *page, 2007 struct page *page,
2010 unsigned long offset) 2008 unsigned long offset)
2011{ 2009{
2012 struct buffer_head *head, *bh, *next; 2010 struct buffer_head *head, *bh, *next;
2013 unsigned int curr_off = 0; 2011 unsigned int curr_off = 0;
2014 int may_free = 1; 2012 int may_free = 1;
2013 int ret = 0;
2015 2014
2016 if (!PageLocked(page)) 2015 if (!PageLocked(page))
2017 BUG(); 2016 BUG();
2018 if (!page_has_buffers(page)) 2017 if (!page_has_buffers(page))
2019 return; 2018 return 0;
2020 2019
2021 /* We will potentially be playing with lists other than just the 2020 /* We will potentially be playing with lists other than just the
2022 * data lists (especially for journaled data mode), so be 2021 * data lists (especially for journaled data mode), so be
@@ -2030,9 +2029,11 @@ void jbd2_journal_invalidatepage(journal_t *journal,
2030 if (offset <= curr_off) { 2029 if (offset <= curr_off) {
2031 /* This block is wholly outside the truncation point */ 2030 /* This block is wholly outside the truncation point */
2032 lock_buffer(bh); 2031 lock_buffer(bh);
2033 may_free &= journal_unmap_buffer(journal, bh, 2032 ret = journal_unmap_buffer(journal, bh, offset > 0);
2034 offset > 0);
2035 unlock_buffer(bh); 2033 unlock_buffer(bh);
2034 if (ret < 0)
2035 return ret;
2036 may_free &= ret;
2036 } 2037 }
2037 curr_off = next_off; 2038 curr_off = next_off;
2038 bh = next; 2039 bh = next;
@@ -2043,6 +2044,7 @@ void jbd2_journal_invalidatepage(journal_t *journal,
2043 if (may_free && try_to_free_buffers(page)) 2044 if (may_free && try_to_free_buffers(page))
2044 J_ASSERT(!page_has_buffers(page)); 2045 J_ASSERT(!page_has_buffers(page));
2045 } 2046 }
2047 return 0;
2046} 2048}
2047 2049
2048/* 2050/*
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index c89b26bc9759..264d1aa935f2 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -206,7 +206,7 @@ static u32 initiate_bulk_draining(struct nfs_client *clp,
206 206
207 list_for_each_entry(lo, &server->layouts, plh_layouts) { 207 list_for_each_entry(lo, &server->layouts, plh_layouts) {
208 ino = igrab(lo->plh_inode); 208 ino = igrab(lo->plh_inode);
209 if (ino) 209 if (!ino)
210 continue; 210 continue;
211 spin_lock(&ino->i_lock); 211 spin_lock(&ino->i_lock);
212 /* Is this layout in the process of being freed? */ 212 /* Is this layout in the process of being freed? */
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 32e6c53520e2..1b2d7eb93796 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2153,12 +2153,16 @@ static int nfs_open_permission_mask(int openflags)
2153{ 2153{
2154 int mask = 0; 2154 int mask = 0;
2155 2155
2156 if ((openflags & O_ACCMODE) != O_WRONLY) 2156 if (openflags & __FMODE_EXEC) {
2157 mask |= MAY_READ; 2157 /* ONLY check exec rights */
2158 if ((openflags & O_ACCMODE) != O_RDONLY) 2158 mask = MAY_EXEC;
2159 mask |= MAY_WRITE; 2159 } else {
2160 if (openflags & __FMODE_EXEC) 2160 if ((openflags & O_ACCMODE) != O_WRONLY)
2161 mask |= MAY_EXEC; 2161 mask |= MAY_READ;
2162 if ((openflags & O_ACCMODE) != O_RDONLY)
2163 mask |= MAY_WRITE;
2164 }
2165
2162 return mask; 2166 return mask;
2163} 2167}
2164 2168
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 5d864fb36578..cf747ef86650 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1626,7 +1626,8 @@ static int _nfs4_recover_proc_open(struct nfs4_opendata *data)
1626 1626
1627static int nfs4_opendata_access(struct rpc_cred *cred, 1627static int nfs4_opendata_access(struct rpc_cred *cred,
1628 struct nfs4_opendata *opendata, 1628 struct nfs4_opendata *opendata,
1629 struct nfs4_state *state, fmode_t fmode) 1629 struct nfs4_state *state, fmode_t fmode,
1630 int openflags)
1630{ 1631{
1631 struct nfs_access_entry cache; 1632 struct nfs_access_entry cache;
1632 u32 mask; 1633 u32 mask;
@@ -1638,11 +1639,14 @@ static int nfs4_opendata_access(struct rpc_cred *cred,
1638 1639
1639 mask = 0; 1640 mask = 0;
1640 /* don't check MAY_WRITE - a newly created file may not have 1641 /* don't check MAY_WRITE - a newly created file may not have
1641 * write mode bits, but POSIX allows the creating process to write */ 1642 * write mode bits, but POSIX allows the creating process to write.
1642 if (fmode & FMODE_READ) 1643 * use openflags to check for exec, because fmode won't
1643 mask |= MAY_READ; 1644 * always have FMODE_EXEC set when file open for exec. */
1644 if (fmode & FMODE_EXEC) 1645 if (openflags & __FMODE_EXEC) {
1645 mask |= MAY_EXEC; 1646 /* ONLY check for exec rights */
1647 mask = MAY_EXEC;
1648 } else if (fmode & FMODE_READ)
1649 mask = MAY_READ;
1646 1650
1647 cache.cred = cred; 1651 cache.cred = cred;
1648 cache.jiffies = jiffies; 1652 cache.jiffies = jiffies;
@@ -1896,7 +1900,7 @@ static int _nfs4_do_open(struct inode *dir,
1896 if (server->caps & NFS_CAP_POSIX_LOCK) 1900 if (server->caps & NFS_CAP_POSIX_LOCK)
1897 set_bit(NFS_STATE_POSIX_LOCKS, &state->flags); 1901 set_bit(NFS_STATE_POSIX_LOCKS, &state->flags);
1898 1902
1899 status = nfs4_opendata_access(cred, opendata, state, fmode); 1903 status = nfs4_opendata_access(cred, opendata, state, fmode, flags);
1900 if (status != 0) 1904 if (status != 0)
1901 goto err_opendata_put; 1905 goto err_opendata_put;
1902 1906
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index e7165d915362..d00260b08103 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -254,7 +254,7 @@ static void
254pnfs_layout_set_fail_bit(struct pnfs_layout_hdr *lo, int fail_bit) 254pnfs_layout_set_fail_bit(struct pnfs_layout_hdr *lo, int fail_bit)
255{ 255{
256 lo->plh_retry_timestamp = jiffies; 256 lo->plh_retry_timestamp = jiffies;
257 if (test_and_set_bit(fail_bit, &lo->plh_flags)) 257 if (!test_and_set_bit(fail_bit, &lo->plh_flags))
258 atomic_inc(&lo->plh_refcount); 258 atomic_inc(&lo->plh_refcount);
259} 259}
260 260
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index b6bdb18e892c..a5e5d9899d56 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -91,12 +91,16 @@ void nfs_readdata_release(struct nfs_read_data *rdata)
91 put_nfs_open_context(rdata->args.context); 91 put_nfs_open_context(rdata->args.context);
92 if (rdata->pages.pagevec != rdata->pages.page_array) 92 if (rdata->pages.pagevec != rdata->pages.page_array)
93 kfree(rdata->pages.pagevec); 93 kfree(rdata->pages.pagevec);
94 if (rdata != &read_header->rpc_data) 94 if (rdata == &read_header->rpc_data) {
95 kfree(rdata);
96 else
97 rdata->header = NULL; 95 rdata->header = NULL;
96 rdata = NULL;
97 }
98 if (atomic_dec_and_test(&hdr->refcnt)) 98 if (atomic_dec_and_test(&hdr->refcnt))
99 hdr->completion_ops->completion(hdr); 99 hdr->completion_ops->completion(hdr);
100 /* Note: we only free the rpc_task after callbacks are done.
101 * See the comment in rpc_free_task() for why
102 */
103 kfree(rdata);
100} 104}
101EXPORT_SYMBOL_GPL(nfs_readdata_release); 105EXPORT_SYMBOL_GPL(nfs_readdata_release);
102 106
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index c25cadf8f8c4..2e7e8c878e5d 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1152,7 +1152,7 @@ static int nfs_get_option_str(substring_t args[], char **option)
1152{ 1152{
1153 kfree(*option); 1153 kfree(*option);
1154 *option = match_strdup(args); 1154 *option = match_strdup(args);
1155 return !option; 1155 return !*option;
1156} 1156}
1157 1157
1158static int nfs_get_option_ul(substring_t args[], unsigned long *option) 1158static int nfs_get_option_ul(substring_t args[], unsigned long *option)
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index b673be31590e..c483cc50b82e 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -126,12 +126,16 @@ void nfs_writedata_release(struct nfs_write_data *wdata)
126 put_nfs_open_context(wdata->args.context); 126 put_nfs_open_context(wdata->args.context);
127 if (wdata->pages.pagevec != wdata->pages.page_array) 127 if (wdata->pages.pagevec != wdata->pages.page_array)
128 kfree(wdata->pages.pagevec); 128 kfree(wdata->pages.pagevec);
129 if (wdata != &write_header->rpc_data) 129 if (wdata == &write_header->rpc_data) {
130 kfree(wdata);
131 else
132 wdata->header = NULL; 130 wdata->header = NULL;
131 wdata = NULL;
132 }
133 if (atomic_dec_and_test(&hdr->refcnt)) 133 if (atomic_dec_and_test(&hdr->refcnt))
134 hdr->completion_ops->completion(hdr); 134 hdr->completion_ops->completion(hdr);
135 /* Note: we only free the rpc_task after callbacks are done.
136 * See the comment in rpc_free_task() for why
137 */
138 kfree(wdata);
135} 139}
136EXPORT_SYMBOL_GPL(nfs_writedata_release); 140EXPORT_SYMBOL_GPL(nfs_writedata_release);
137 141
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index e064f562b1f7..76ddae83daa5 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -352,18 +352,18 @@ retry:
352 if (!ida_pre_get(&proc_inum_ida, GFP_KERNEL)) 352 if (!ida_pre_get(&proc_inum_ida, GFP_KERNEL))
353 return -ENOMEM; 353 return -ENOMEM;
354 354
355 spin_lock_bh(&proc_inum_lock); 355 spin_lock_irq(&proc_inum_lock);
356 error = ida_get_new(&proc_inum_ida, &i); 356 error = ida_get_new(&proc_inum_ida, &i);
357 spin_unlock_bh(&proc_inum_lock); 357 spin_unlock_irq(&proc_inum_lock);
358 if (error == -EAGAIN) 358 if (error == -EAGAIN)
359 goto retry; 359 goto retry;
360 else if (error) 360 else if (error)
361 return error; 361 return error;
362 362
363 if (i > UINT_MAX - PROC_DYNAMIC_FIRST) { 363 if (i > UINT_MAX - PROC_DYNAMIC_FIRST) {
364 spin_lock_bh(&proc_inum_lock); 364 spin_lock_irq(&proc_inum_lock);
365 ida_remove(&proc_inum_ida, i); 365 ida_remove(&proc_inum_ida, i);
366 spin_unlock_bh(&proc_inum_lock); 366 spin_unlock_irq(&proc_inum_lock);
367 return -ENOSPC; 367 return -ENOSPC;
368 } 368 }
369 *inum = PROC_DYNAMIC_FIRST + i; 369 *inum = PROC_DYNAMIC_FIRST + i;
@@ -372,9 +372,10 @@ retry:
372 372
373void proc_free_inum(unsigned int inum) 373void proc_free_inum(unsigned int inum)
374{ 374{
375 spin_lock_bh(&proc_inum_lock); 375 unsigned long flags;
376 spin_lock_irqsave(&proc_inum_lock, flags);
376 ida_remove(&proc_inum_ida, inum - PROC_DYNAMIC_FIRST); 377 ida_remove(&proc_inum_ida, inum - PROC_DYNAMIC_FIRST);
377 spin_unlock_bh(&proc_inum_lock); 378 spin_unlock_irqrestore(&proc_inum_lock, flags);
378} 379}
379 380
380static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd) 381static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 448455b7fd91..ca5ce7f9f800 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1278,7 +1278,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
1278 walk.mm = mm; 1278 walk.mm = mm;
1279 1279
1280 pol = get_vma_policy(task, vma, vma->vm_start); 1280 pol = get_vma_policy(task, vma, vma->vm_start);
1281 mpol_to_str(buffer, sizeof(buffer), pol, 0); 1281 mpol_to_str(buffer, sizeof(buffer), pol);
1282 mpol_cond_put(pol); 1282 mpol_cond_put(pol);
1283 1283
1284 seq_printf(m, "%08lx %s", vma->vm_start, buffer); 1284 seq_printf(m, "%08lx %s", vma->vm_start, buffer);
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index f883e7e74305..7003e5266f25 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -291,9 +291,8 @@ static void ramoops_free_przs(struct ramoops_context *cxt)
291 kfree(cxt->przs); 291 kfree(cxt->przs);
292} 292}
293 293
294static int __devinit ramoops_init_przs(struct device *dev, 294static int ramoops_init_przs(struct device *dev, struct ramoops_context *cxt,
295 struct ramoops_context *cxt, 295 phys_addr_t *paddr, size_t dump_mem_sz)
296 phys_addr_t *paddr, size_t dump_mem_sz)
297{ 296{
298 int err = -ENOMEM; 297 int err = -ENOMEM;
299 int i; 298 int i;
@@ -336,10 +335,9 @@ fail_prz:
336 return err; 335 return err;
337} 336}
338 337
339static int __devinit ramoops_init_prz(struct device *dev, 338static int ramoops_init_prz(struct device *dev, struct ramoops_context *cxt,
340 struct ramoops_context *cxt, 339 struct persistent_ram_zone **prz,
341 struct persistent_ram_zone **prz, 340 phys_addr_t *paddr, size_t sz, u32 sig)
342 phys_addr_t *paddr, size_t sz, u32 sig)
343{ 341{
344 if (!sz) 342 if (!sz)
345 return 0; 343 return 0;
@@ -367,7 +365,7 @@ static int __devinit ramoops_init_prz(struct device *dev,
367 return 0; 365 return 0;
368} 366}
369 367
370static int __devinit ramoops_probe(struct platform_device *pdev) 368static int ramoops_probe(struct platform_device *pdev)
371{ 369{
372 struct device *dev = &pdev->dev; 370 struct device *dev = &pdev->dev;
373 struct ramoops_platform_data *pdata = pdev->dev.platform_data; 371 struct ramoops_platform_data *pdata = pdev->dev.platform_data;
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index eecd2a8a84dd..0306303be372 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -390,8 +390,8 @@ static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size,
390 return 0; 390 return 0;
391} 391}
392 392
393static int __devinit persistent_ram_post_init(struct persistent_ram_zone *prz, 393static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig,
394 u32 sig, int ecc_size) 394 int ecc_size)
395{ 395{
396 int ret; 396 int ret;
397 397
@@ -443,9 +443,8 @@ void persistent_ram_free(struct persistent_ram_zone *prz)
443 kfree(prz); 443 kfree(prz);
444} 444}
445 445
446struct persistent_ram_zone * __devinit persistent_ram_new(phys_addr_t start, 446struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size,
447 size_t size, u32 sig, 447 u32 sig, int ecc_size)
448 int ecc_size)
449{ 448{
450 struct persistent_ram_zone *prz; 449 struct persistent_ram_zone *prz;
451 int ret = -ENOMEM; 450 int ret = -ENOMEM;
diff --git a/fs/splice.c b/fs/splice.c
index 8890604e3fcd..6909d89d0da5 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -696,8 +696,10 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe,
696 return -EINVAL; 696 return -EINVAL;
697 697
698 more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0; 698 more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0;
699 if (sd->len < sd->total_len) 699
700 if (sd->len < sd->total_len && pipe->nrbufs > 1)
700 more |= MSG_SENDPAGE_NOTLAST; 701 more |= MSG_SENDPAGE_NOTLAST;
702
701 return file->f_op->sendpage(file, buf->page, buf->offset, 703 return file->f_op->sendpage(file, buf->page, buf->offset,
702 sd->len, &pos, more); 704 sd->len, &pos, more);
703} 705}
diff --git a/include/Kbuild b/include/Kbuild
index 83256b64166a..1dfd33e8d43b 100644
--- a/include/Kbuild
+++ b/include/Kbuild
@@ -1,8 +1,5 @@
1# Top-level Makefile calls into asm-$(ARCH) 1# Top-level Makefile calls into asm-$(ARCH)
2# List only non-arch directories below 2# List only non-arch directories below
3 3
4header-y += linux/
5header-y += sound/
6header-y += rdma/
7header-y += video/ 4header-y += video/
8header-y += scsi/ 5header-y += scsi/
diff --git a/include/asm-generic/parport.h b/include/asm-generic/parport.h
index 40528cb977e8..2c9f9d4336ca 100644
--- a/include/asm-generic/parport.h
+++ b/include/asm-generic/parport.h
@@ -10,8 +10,8 @@
10 * to devices on the PCI bus. 10 * to devices on the PCI bus.
11 */ 11 */
12 12
13static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); 13static int parport_pc_find_isa_ports(int autoirq, int autodma);
14static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) 14static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
15{ 15{
16#ifdef CONFIG_ISA 16#ifdef CONFIG_ISA
17 return parport_pc_find_isa_ports(autoirq, autodma); 17 return parport_pc_find_isa_ports(autoirq, autodma);
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index ed6642ad03e0..25f01d0bc149 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -78,6 +78,14 @@ struct mmu_gather_batch {
78#define MAX_GATHER_BATCH \ 78#define MAX_GATHER_BATCH \
79 ((PAGE_SIZE - sizeof(struct mmu_gather_batch)) / sizeof(void *)) 79 ((PAGE_SIZE - sizeof(struct mmu_gather_batch)) / sizeof(void *))
80 80
81/*
82 * Limit the maximum number of mmu_gather batches to reduce a risk of soft
83 * lockups for non-preemptible kernels on huge machines when a lot of memory
84 * is zapped during unmapping.
85 * 10K pages freed at once should be safe even without a preemption point.
86 */
87#define MAX_GATHER_BATCH_COUNT (10000UL/MAX_GATHER_BATCH)
88
81/* struct mmu_gather is an opaque type used by the mm code for passing around 89/* struct mmu_gather is an opaque type used by the mm code for passing around
82 * any data needed by arch specific code for tlb_remove_page. 90 * any data needed by arch specific code for tlb_remove_page.
83 */ 91 */
@@ -96,6 +104,7 @@ struct mmu_gather {
96 struct mmu_gather_batch *active; 104 struct mmu_gather_batch *active;
97 struct mmu_gather_batch local; 105 struct mmu_gather_batch local;
98 struct page *__pages[MMU_GATHER_BUNDLE]; 106 struct page *__pages[MMU_GATHER_BUNDLE];
107 unsigned int batch_count;
99}; 108};
100 109
101#define HAVE_GENERIC_MMU_GATHER 110#define HAVE_GENERIC_MMU_GATHER
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
index 06d7f798a08c..0f4a366f6fa6 100644
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
@@ -158,12 +158,29 @@ static inline struct drm_mm_node *drm_mm_get_block_atomic_range(
158 return drm_mm_get_block_range_generic(parent, size, alignment, 0, 158 return drm_mm_get_block_range_generic(parent, size, alignment, 0,
159 start, end, 1); 159 start, end, 1);
160} 160}
161extern int drm_mm_insert_node(struct drm_mm *mm, struct drm_mm_node *node, 161
162 unsigned long size, unsigned alignment); 162extern int drm_mm_insert_node(struct drm_mm *mm,
163 struct drm_mm_node *node,
164 unsigned long size,
165 unsigned alignment);
163extern int drm_mm_insert_node_in_range(struct drm_mm *mm, 166extern int drm_mm_insert_node_in_range(struct drm_mm *mm,
164 struct drm_mm_node *node, 167 struct drm_mm_node *node,
165 unsigned long size, unsigned alignment, 168 unsigned long size,
166 unsigned long start, unsigned long end); 169 unsigned alignment,
170 unsigned long start,
171 unsigned long end);
172extern int drm_mm_insert_node_generic(struct drm_mm *mm,
173 struct drm_mm_node *node,
174 unsigned long size,
175 unsigned alignment,
176 unsigned long color);
177extern int drm_mm_insert_node_in_range_generic(struct drm_mm *mm,
178 struct drm_mm_node *node,
179 unsigned long size,
180 unsigned alignment,
181 unsigned long color,
182 unsigned long start,
183 unsigned long end);
167extern void drm_mm_put_block(struct drm_mm_node *cur); 184extern void drm_mm_put_block(struct drm_mm_node *cur);
168extern void drm_mm_remove_node(struct drm_mm_node *node); 185extern void drm_mm_remove_node(struct drm_mm_node *node);
169extern void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new); 186extern void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new);
diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h
index 808dad29607a..d6aeaf3c6d6c 100644
--- a/include/drm/exynos_drm.h
+++ b/include/drm/exynos_drm.h
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28#ifndef _EXYNOS_DRM_H_ 14#ifndef _EXYNOS_DRM_H_
29#define _EXYNOS_DRM_H_ 15#define _EXYNOS_DRM_H_
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
deleted file mode 100644
index 7fe2dae251e5..000000000000
--- a/include/linux/Kbuild
+++ /dev/null
@@ -1,5 +0,0 @@
1header-y += dvb/
2header-y += hdlc/
3header-y += hsi/
4header-y += raid/
5header-y += usb/
diff --git a/include/linux/ata_platform.h b/include/linux/ata_platform.h
index fe9989636b62..b9fde17f767c 100644
--- a/include/linux/ata_platform.h
+++ b/include/linux/ata_platform.h
@@ -15,12 +15,12 @@ struct pata_platform_info {
15 unsigned int irq_flags; 15 unsigned int irq_flags;
16}; 16};
17 17
18extern int __devinit __pata_platform_probe(struct device *dev, 18extern int __pata_platform_probe(struct device *dev,
19 struct resource *io_res, 19 struct resource *io_res,
20 struct resource *ctl_res, 20 struct resource *ctl_res,
21 struct resource *irq_res, 21 struct resource *irq_res,
22 unsigned int ioport_shift, 22 unsigned int ioport_shift,
23 int __pio_mask); 23 int __pio_mask);
24 24
25/* 25/*
26 * Marvell SATA private data 26 * Marvell SATA private data
diff --git a/include/linux/bcma/bcma_driver_gmac_cmn.h b/include/linux/bcma/bcma_driver_gmac_cmn.h
index def894b83b0d..4dd1f33e36a2 100644
--- a/include/linux/bcma/bcma_driver_gmac_cmn.h
+++ b/include/linux/bcma/bcma_driver_gmac_cmn.h
@@ -92,7 +92,7 @@ struct bcma_drv_gmac_cmn {
92#define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val) 92#define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val)
93 93
94#ifdef CONFIG_BCMA_DRIVER_GMAC_CMN 94#ifdef CONFIG_BCMA_DRIVER_GMAC_CMN
95extern void __devinit bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc); 95extern void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc);
96#else 96#else
97static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { } 97static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { }
98#endif 98#endif
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h
index 41da581e1612..c48d98d27b77 100644
--- a/include/linux/bcma/bcma_driver_pci.h
+++ b/include/linux/bcma/bcma_driver_pci.h
@@ -214,7 +214,7 @@ struct bcma_drv_pci {
214#define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val) 214#define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val)
215#define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) 215#define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val)
216 216
217extern void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc); 217extern void bcma_core_pci_init(struct bcma_drv_pci *pc);
218extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, 218extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc,
219 struct bcma_device *core, bool enable); 219 struct bcma_device *core, bool enable);
220extern void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend); 220extern void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend);
diff --git a/include/linux/cred.h b/include/linux/cred.h
index abb2cd50f6b2..04421e825365 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -128,7 +128,6 @@ struct cred {
128 struct key *process_keyring; /* keyring private to this process */ 128 struct key *process_keyring; /* keyring private to this process */
129 struct key *thread_keyring; /* keyring private to this thread */ 129 struct key *thread_keyring; /* keyring private to this thread */
130 struct key *request_key_auth; /* assumed request_key authority */ 130 struct key *request_key_auth; /* assumed request_key authority */
131 struct thread_group_cred *tgcred; /* thread-group shared credentials */
132#endif 131#endif
133#ifdef CONFIG_SECURITY 132#ifdef CONFIG_SECURITY
134 void *security; /* subjective LSM security */ 133 void *security; /* subjective LSM security */
diff --git a/include/linux/hdlc/Kbuild b/include/linux/hdlc/Kbuild
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/include/linux/hdlc/Kbuild
+++ /dev/null
diff --git a/include/linux/hsi/Kbuild b/include/linux/hsi/Kbuild
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/include/linux/hsi/Kbuild
+++ /dev/null
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index fe771978e877..ae221a7b5092 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -24,6 +24,7 @@ struct ipc_ids {
24 unsigned short seq_max; 24 unsigned short seq_max;
25 struct rw_semaphore rw_mutex; 25 struct rw_semaphore rw_mutex;
26 struct idr ipcs_idr; 26 struct idr ipcs_idr;
27 int next_id;
27}; 28};
28 29
29struct ipc_namespace { 30struct ipc_namespace {
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 1be23d9fdacb..e30b66346942 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1098,7 +1098,7 @@ void jbd2_journal_set_triggers(struct buffer_head *,
1098extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); 1098extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *);
1099extern int jbd2_journal_forget (handle_t *, struct buffer_head *); 1099extern int jbd2_journal_forget (handle_t *, struct buffer_head *);
1100extern void journal_sync_buffer (struct buffer_head *); 1100extern void journal_sync_buffer (struct buffer_head *);
1101extern void jbd2_journal_invalidatepage(journal_t *, 1101extern int jbd2_journal_invalidatepage(journal_t *,
1102 struct page *, unsigned long); 1102 struct page *, unsigned long);
1103extern int jbd2_journal_try_to_free_buffers(journal_t *, struct page *, gfp_t); 1103extern int jbd2_journal_try_to_free_buffers(journal_t *, struct page *, gfp_t);
1104extern int jbd2_journal_stop(handle_t *); 1104extern int jbd2_journal_stop(handle_t *);
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 9adc270de7ef..0d7df39a5885 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -123,7 +123,7 @@ struct sp_node {
123 123
124struct shared_policy { 124struct shared_policy {
125 struct rb_root root; 125 struct rb_root root;
126 struct mutex mutex; 126 spinlock_t lock;
127}; 127};
128 128
129void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol); 129void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol);
@@ -165,11 +165,10 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
165 165
166 166
167#ifdef CONFIG_TMPFS 167#ifdef CONFIG_TMPFS
168extern int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context); 168extern int mpol_parse_str(char *str, struct mempolicy **mpol);
169#endif 169#endif
170 170
171extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, 171extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol);
172 int no_context);
173 172
174/* Check if a vma is migratable */ 173/* Check if a vma is migratable */
175static inline int vma_migratable(struct vm_area_struct *vma) 174static inline int vma_migratable(struct vm_area_struct *vma)
@@ -296,15 +295,13 @@ static inline void check_highest_zone(int k)
296} 295}
297 296
298#ifdef CONFIG_TMPFS 297#ifdef CONFIG_TMPFS
299static inline int mpol_parse_str(char *str, struct mempolicy **mpol, 298static inline int mpol_parse_str(char *str, struct mempolicy **mpol)
300 int no_context)
301{ 299{
302 return 1; /* error */ 300 return 1; /* error */
303} 301}
304#endif 302#endif
305 303
306static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, 304static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
307 int no_context)
308{ 305{
309 return 0; 306 return 0;
310} 307}
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 4bec5be82cab..73b64a38b984 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -503,14 +503,6 @@ struct zone {
503 * rarely used fields: 503 * rarely used fields:
504 */ 504 */
505 const char *name; 505 const char *name;
506#ifdef CONFIG_MEMORY_ISOLATION
507 /*
508 * the number of MIGRATE_ISOLATE *pageblock*.
509 * We need this for free page counting. Look at zone_watermark_ok_safe.
510 * It's protected by zone->lock
511 */
512 int nr_pageblock_isolate;
513#endif
514} ____cacheline_internodealigned_in_smp; 506} ____cacheline_internodealigned_in_smp;
515 507
516typedef enum { 508typedef enum {
diff --git a/include/linux/msg.h b/include/linux/msg.h
index 7a4b9e97d29a..391af8d11cce 100644
--- a/include/linux/msg.h
+++ b/include/linux/msg.h
@@ -34,7 +34,9 @@ struct msg_queue {
34/* Helper routines for sys_msgsnd and sys_msgrcv */ 34/* Helper routines for sys_msgsnd and sys_msgrcv */
35extern long do_msgsnd(int msqid, long mtype, void __user *mtext, 35extern long do_msgsnd(int msqid, long mtype, void __user *mtext,
36 size_t msgsz, int msgflg); 36 size_t msgsz, int msgflg);
37extern long do_msgrcv(int msqid, long *pmtype, void __user *mtext, 37extern long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
38 size_t msgsz, long msgtyp, int msgflg); 38 int msgflg,
39 long (*msg_fill)(void __user *, struct msg_msg *,
40 size_t));
39 41
40#endif /* _LINUX_MSG_H */ 42#endif /* _LINUX_MSG_H */
diff --git a/include/linux/namei.h b/include/linux/namei.h
index e998c030061d..5a5ff57ceed4 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -2,6 +2,7 @@
2#define _LINUX_NAMEI_H 2#define _LINUX_NAMEI_H
3 3
4#include <linux/dcache.h> 4#include <linux/dcache.h>
5#include <linux/errno.h>
5#include <linux/linkage.h> 6#include <linux/linkage.h>
6#include <linux/path.h> 7#include <linux/path.h>
7 8
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 02e0f6b156c3..c599e4782d45 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1576,7 +1576,7 @@ extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1576 1576
1577extern rwlock_t dev_base_lock; /* Device list lock */ 1577extern rwlock_t dev_base_lock; /* Device list lock */
1578 1578
1579extern seqlock_t devnet_rename_seq; /* Device rename lock */ 1579extern seqcount_t devnet_rename_seq; /* Device rename seq */
1580 1580
1581 1581
1582#define for_each_netdev(net, d) \ 1582#define for_each_netdev(net, d) \
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index b5d13841604e..70473da47b3f 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -362,7 +362,7 @@ static inline void ClearPageCompound(struct page *page)
362 * pages on the LRU and/or pagecache. 362 * pages on the LRU and/or pagecache.
363 */ 363 */
364TESTPAGEFLAG(Compound, compound) 364TESTPAGEFLAG(Compound, compound)
365__PAGEFLAG(Head, compound) 365__SETPAGEFLAG(Head, compound) __CLEARPAGEFLAG(Head, compound)
366 366
367/* 367/*
368 * PG_reclaim is used in combination with PG_compound to mark the 368 * PG_reclaim is used in combination with PG_compound to mark the
@@ -374,8 +374,14 @@ __PAGEFLAG(Head, compound)
374 * PG_compound & PG_reclaim => Tail page 374 * PG_compound & PG_reclaim => Tail page
375 * PG_compound & ~PG_reclaim => Head page 375 * PG_compound & ~PG_reclaim => Head page
376 */ 376 */
377#define PG_head_mask ((1L << PG_compound))
377#define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) 378#define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim))
378 379
380static inline int PageHead(struct page *page)
381{
382 return ((page->flags & PG_head_tail_mask) == PG_head_mask);
383}
384
379static inline int PageTail(struct page *page) 385static inline int PageTail(struct page *page)
380{ 386{
381 return ((page->flags & PG_head_tail_mask) == PG_head_tail_mask); 387 return ((page->flags & PG_head_tail_mask) == PG_head_tail_mask);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 0f8447376ddb..0eb65796bcb9 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1568,6 +1568,7 @@
1568#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 1568#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476
1569#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 1569#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478
1570#define PCI_DEVICE_ID_RICOH_R5C822 0x0822 1570#define PCI_DEVICE_ID_RICOH_R5C822 0x0822
1571#define PCI_DEVICE_ID_RICOH_R5CE822 0xe822
1571#define PCI_DEVICE_ID_RICOH_R5CE823 0xe823 1572#define PCI_DEVICE_ID_RICOH_R5CE823 0xe823
1572#define PCI_DEVICE_ID_RICOH_R5C832 0x0832 1573#define PCI_DEVICE_ID_RICOH_R5C832 0x0832
1573#define PCI_DEVICE_ID_RICOH_R5C843 0x0843 1574#define PCI_DEVICE_ID_RICOH_R5C843 0x0843
diff --git a/include/linux/pid.h b/include/linux/pid.h
index b152d44fb181..2381c973d897 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -121,6 +121,7 @@ int next_pidmap(struct pid_namespace *pid_ns, unsigned int last);
121 121
122extern struct pid *alloc_pid(struct pid_namespace *ns); 122extern struct pid *alloc_pid(struct pid_namespace *ns);
123extern void free_pid(struct pid *pid); 123extern void free_pid(struct pid *pid);
124extern void disable_pid_allocation(struct pid_namespace *ns);
124 125
125/* 126/*
126 * ns_of_pid() returns the pid namespace in which the specified pid was 127 * ns_of_pid() returns the pid namespace in which the specified pid was
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index bf285999273a..215e5e3dda10 100644
--- a/include/linux/pid_namespace.h
+++ b/include/linux/pid_namespace.h
@@ -21,7 +21,7 @@ struct pid_namespace {
21 struct kref kref; 21 struct kref kref;
22 struct pidmap pidmap[PIDMAP_ENTRIES]; 22 struct pidmap pidmap[PIDMAP_ENTRIES];
23 int last_pid; 23 int last_pid;
24 int nr_hashed; 24 unsigned int nr_hashed;
25 struct task_struct *child_reaper; 25 struct task_struct *child_reaper;
26 struct kmem_cache *pid_cachep; 26 struct kmem_cache *pid_cachep;
27 unsigned int level; 27 unsigned int level;
@@ -42,6 +42,8 @@ struct pid_namespace {
42 42
43extern struct pid_namespace init_pid_ns; 43extern struct pid_namespace init_pid_ns;
44 44
45#define PIDNS_HASH_ADDING (1U << 31)
46
45#ifdef CONFIG_PID_NS 47#ifdef CONFIG_PID_NS
46static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns) 48static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
47{ 49{
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h
index 098d2a838296..cb6ab5feab67 100644
--- a/include/linux/pstore_ram.h
+++ b/include/linux/pstore_ram.h
@@ -46,9 +46,8 @@ struct persistent_ram_zone {
46 size_t old_log_size; 46 size_t old_log_size;
47}; 47};
48 48
49struct persistent_ram_zone * __devinit persistent_ram_new(phys_addr_t start, 49struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size,
50 size_t size, u32 sig, 50 u32 sig, int ecc_size);
51 int ecc_size);
52void persistent_ram_free(struct persistent_ram_zone *prz); 51void persistent_ram_free(struct persistent_ram_zone *prz);
53void persistent_ram_zap(struct persistent_ram_zone *prz); 52void persistent_ram_zap(struct persistent_ram_zone *prz);
54 53
diff --git a/include/linux/raid/Kbuild b/include/linux/raid/Kbuild
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/include/linux/raid/Kbuild
+++ /dev/null
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/include/linux/usb/Kbuild
+++ /dev/null
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
index a1d83cc8bf85..923cb20051ed 100644
--- a/include/net/netns/conntrack.h
+++ b/include/net/netns/conntrack.h
@@ -71,6 +71,7 @@ struct netns_ct {
71 struct hlist_head *expect_hash; 71 struct hlist_head *expect_hash;
72 struct hlist_nulls_head unconfirmed; 72 struct hlist_nulls_head unconfirmed;
73 struct hlist_nulls_head dying; 73 struct hlist_nulls_head dying;
74 struct hlist_nulls_head tmpl;
74 struct ip_conntrack_stat __percpu *stat; 75 struct ip_conntrack_stat __percpu *stat;
75 struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; 76 struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
76 struct nf_exp_event_notifier __rcu *nf_expect_event_cb; 77 struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h
index 591db7d657a3..c24060ee411e 100644
--- a/include/net/netns/x_tables.h
+++ b/include/net/netns/x_tables.h
@@ -8,6 +8,7 @@ struct ebt_table;
8 8
9struct netns_xt { 9struct netns_xt {
10 struct list_head tables[NFPROTO_NUMPROTO]; 10 struct list_head tables[NFPROTO_NUMPROTO];
11 bool notrack_deprecated_warning;
11#if defined(CONFIG_BRIDGE_NF_EBTABLES) || \ 12#if defined(CONFIG_BRIDGE_NF_EBTABLES) || \
12 defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE) 13 defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE)
13 struct ebt_table *broute_table; 14 struct ebt_table *broute_table;
diff --git a/include/net/sock.h b/include/net/sock.h
index 93a6745bfdb2..182ca99405ad 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -367,7 +367,7 @@ struct sock {
367 unsigned short sk_ack_backlog; 367 unsigned short sk_ack_backlog;
368 unsigned short sk_max_ack_backlog; 368 unsigned short sk_max_ack_backlog;
369 __u32 sk_priority; 369 __u32 sk_priority;
370#ifdef CONFIG_CGROUPS 370#if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
371 __u32 sk_cgrp_prioidx; 371 __u32 sk_cgrp_prioidx;
372#endif 372#endif
373 struct pid *sk_peer_pid; 373 struct pid *sk_peer_pid;
diff --git a/include/rdma/Kbuild b/include/rdma/Kbuild
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/include/rdma/Kbuild
+++ /dev/null
diff --git a/include/sound/Kbuild b/include/sound/Kbuild
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/include/sound/Kbuild
+++ /dev/null
diff --git a/include/sound/cs4271.h b/include/sound/cs4271.h
index 6d9e15ed1dcf..dd8c48d14ed9 100644
--- a/include/sound/cs4271.h
+++ b/include/sound/cs4271.h
@@ -19,7 +19,7 @@
19 19
20struct cs4271_platform_data { 20struct cs4271_platform_data {
21 int gpio_nreset; /* GPIO driving Reset pin, if any */ 21 int gpio_nreset; /* GPIO driving Reset pin, if any */
22 int amutec_eq_bmutec:1; /* flag to enable AMUTEC=BMUTEC */ 22 bool amutec_eq_bmutec; /* flag to enable AMUTEC=BMUTEC */
23}; 23};
24 24
25#endif /* __CS4271_H */ 25#endif /* __CS4271_H */
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 769e27c774a3..bc56738cb109 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -58,8 +58,9 @@
58 .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \ 58 .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \
59 .put = snd_soc_put_volsw_range, \ 59 .put = snd_soc_put_volsw_range, \
60 .private_value = (unsigned long)&(struct soc_mixer_control) \ 60 .private_value = (unsigned long)&(struct soc_mixer_control) \
61 {.reg = xreg, .shift = xshift, .min = xmin,\ 61 {.reg = xreg, .rreg = xreg, .shift = xshift, \
62 .max = xmax, .platform_max = xmax, .invert = xinvert} } 62 .rshift = xshift, .min = xmin, .max = xmax, \
63 .platform_max = xmax, .invert = xinvert} }
63#define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \ 64#define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \
64{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 65{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
65 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ 66 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
@@ -88,8 +89,9 @@
88 .info = snd_soc_info_volsw_range, \ 89 .info = snd_soc_info_volsw_range, \
89 .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \ 90 .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \
90 .private_value = (unsigned long)&(struct soc_mixer_control) \ 91 .private_value = (unsigned long)&(struct soc_mixer_control) \
91 {.reg = xreg, .shift = xshift, .min = xmin,\ 92 {.reg = xreg, .rreg = xreg, .shift = xshift, \
92 .max = xmax, .platform_max = xmax, .invert = xinvert} } 93 .rshift = xshift, .min = xmin, .max = xmax, \
94 .platform_max = xmax, .invert = xinvert} }
93#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \ 95#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \
94{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ 96{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
95 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ 97 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index f6372b011366..7e8c36bc7082 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -451,7 +451,7 @@ DEFINE_EVENT(ext4__page_op, ext4_releasepage,
451 TP_ARGS(page) 451 TP_ARGS(page)
452); 452);
453 453
454TRACE_EVENT(ext4_invalidatepage, 454DECLARE_EVENT_CLASS(ext4_invalidatepage_op,
455 TP_PROTO(struct page *page, unsigned long offset), 455 TP_PROTO(struct page *page, unsigned long offset),
456 456
457 TP_ARGS(page, offset), 457 TP_ARGS(page, offset),
@@ -477,6 +477,18 @@ TRACE_EVENT(ext4_invalidatepage,
477 (unsigned long) __entry->index, __entry->offset) 477 (unsigned long) __entry->index, __entry->offset)
478); 478);
479 479
480DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage,
481 TP_PROTO(struct page *page, unsigned long offset),
482
483 TP_ARGS(page, offset)
484);
485
486DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage,
487 TP_PROTO(struct page *page, unsigned long offset),
488
489 TP_ARGS(page, offset)
490);
491
480TRACE_EVENT(ext4_discard_blocks, 492TRACE_EVENT(ext4_discard_blocks,
481 TP_PROTO(struct super_block *sb, unsigned long long blk, 493 TP_PROTO(struct super_block *sb, unsigned long long blk,
482 unsigned long long count), 494 unsigned long long count),
diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h
index e7f52c334005..d5844122ff32 100644
--- a/include/uapi/drm/exynos_drm.h
+++ b/include/uapi/drm/exynos_drm.h
@@ -6,24 +6,10 @@
6 * Joonyoung Shim <jy0922.shim@samsung.com> 6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com> 7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a 9 * This program is free software; you can redistribute it and/or modify it
10 * copy of this software and associated documentation files (the "Software"), 10 * under the terms of the GNU General Public License as published by the
11 * to deal in the Software without restriction, including without limitation 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * option) any later version.
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */ 13 */
28 14
29#ifndef _UAPI_EXYNOS_DRM_H_ 15#ifndef _UAPI_EXYNOS_DRM_H_
@@ -185,6 +171,8 @@ enum drm_exynos_flip {
185 EXYNOS_DRM_FLIP_NONE = (0 << 0), 171 EXYNOS_DRM_FLIP_NONE = (0 << 0),
186 EXYNOS_DRM_FLIP_VERTICAL = (1 << 0), 172 EXYNOS_DRM_FLIP_VERTICAL = (1 << 0),
187 EXYNOS_DRM_FLIP_HORIZONTAL = (1 << 1), 173 EXYNOS_DRM_FLIP_HORIZONTAL = (1 << 1),
174 EXYNOS_DRM_FLIP_BOTH = EXYNOS_DRM_FLIP_VERTICAL |
175 EXYNOS_DRM_FLIP_HORIZONTAL,
188}; 176};
189 177
190enum drm_exynos_degree { 178enum drm_exynos_degree {
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index b746a3cf5fa9..c4d2e9c74002 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -307,6 +307,7 @@ typedef struct drm_i915_irq_wait {
307#define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21 307#define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21
308#define I915_PARAM_RSVD_FOR_FUTURE_USE 22 308#define I915_PARAM_RSVD_FOR_FUTURE_USE 22
309#define I915_PARAM_HAS_SECURE_BATCHES 23 309#define I915_PARAM_HAS_SECURE_BATCHES 23
310#define I915_PARAM_HAS_PINNED_BATCHES 24
310 311
311typedef struct drm_i915_getparam { 312typedef struct drm_i915_getparam {
312 int param; 313 int param;
@@ -677,6 +678,15 @@ struct drm_i915_gem_execbuffer2 {
677 */ 678 */
678#define I915_EXEC_SECURE (1<<9) 679#define I915_EXEC_SECURE (1<<9)
679 680
681/** Inform the kernel that the batch is and will always be pinned. This
682 * negates the requirement for a workaround to be performed to avoid
683 * an incoherent CS (such as can be found on 830/845). If this flag is
684 * not passed, the kernel will endeavour to make sure the batch is
685 * coherent with the CS before execution. If this flag is passed,
686 * userspace assumes the responsibility for ensuring the same.
687 */
688#define I915_EXEC_IS_PINNED (1<<10)
689
680#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) 690#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
681#define i915_execbuffer2_set_context_id(eb2, context) \ 691#define i915_execbuffer2_set_context_id(eb2, context) \
682 (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK 692 (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK
diff --git a/include/uapi/linux/msg.h b/include/uapi/linux/msg.h
index 78dbd2f996a3..22d95c6854e0 100644
--- a/include/uapi/linux/msg.h
+++ b/include/uapi/linux/msg.h
@@ -10,6 +10,7 @@
10/* msgrcv options */ 10/* msgrcv options */
11#define MSG_NOERROR 010000 /* no error if message is too big */ 11#define MSG_NOERROR 010000 /* no error if message is too big */
12#define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/ 12#define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/
13#define MSG_COPY 040000 /* copy (not remove) all queue messages */
13 14
14/* Obsolete, used only for backwards compatibility and libc5 compiles */ 15/* Obsolete, used only for backwards compatibility and libc5 compiles */
15struct msqid_ds { 16struct msqid_ds {
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index 6b7b6f1e2fd6..ebfadc56d1b4 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -458,6 +458,8 @@
458#define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ 458#define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */
459#define PCI_EXP_LNKCAP 12 /* Link Capabilities */ 459#define PCI_EXP_LNKCAP 12 /* Link Capabilities */
460#define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */ 460#define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */
461#define PCI_EXP_LNKCAP_SLS_2_5GB 0x1 /* LNKCAP2 SLS Vector bit 0 (2.5GT/s) */
462#define PCI_EXP_LNKCAP_SLS_5_0GB 0x2 /* LNKCAP2 SLS Vector bit 1 (5.0GT/s) */
461#define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */ 463#define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */
462#define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ 464#define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */
463#define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ 465#define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */
diff --git a/ipc/compat.c b/ipc/compat.c
index ad9518eb26e0..2547f29dcd1b 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -306,6 +306,20 @@ static long do_compat_semctl(int first, int second, int third, u32 pad)
306 return err; 306 return err;
307} 307}
308 308
309long compat_do_msg_fill(void __user *dest, struct msg_msg *msg, size_t bufsz)
310{
311 struct compat_msgbuf __user *msgp = dest;
312 size_t msgsz;
313
314 if (put_user(msg->m_type, &msgp->mtype))
315 return -EFAULT;
316
317 msgsz = (bufsz > msg->m_ts) ? msg->m_ts : bufsz;
318 if (store_msg(msgp->mtext, msg, msgsz))
319 return -EFAULT;
320 return msgsz;
321}
322
309#ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC 323#ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC
310long compat_sys_semctl(int first, int second, int third, void __user *uptr) 324long compat_sys_semctl(int first, int second, int third, void __user *uptr)
311{ 325{
@@ -337,10 +351,6 @@ long compat_sys_msgsnd(int first, int second, int third, void __user *uptr)
337long compat_sys_msgrcv(int first, int second, int msgtyp, int third, 351long compat_sys_msgrcv(int first, int second, int msgtyp, int third,
338 int version, void __user *uptr) 352 int version, void __user *uptr)
339{ 353{
340 struct compat_msgbuf __user *up;
341 long type;
342 int err;
343
344 if (first < 0) 354 if (first < 0)
345 return -EINVAL; 355 return -EINVAL;
346 if (second < 0) 356 if (second < 0)
@@ -348,23 +358,15 @@ long compat_sys_msgrcv(int first, int second, int msgtyp, int third,
348 358
349 if (!version) { 359 if (!version) {
350 struct compat_ipc_kludge ipck; 360 struct compat_ipc_kludge ipck;
351 err = -EINVAL;
352 if (!uptr) 361 if (!uptr)
353 goto out; 362 return -EINVAL;
354 err = -EFAULT;
355 if (copy_from_user (&ipck, uptr, sizeof(ipck))) 363 if (copy_from_user (&ipck, uptr, sizeof(ipck)))
356 goto out; 364 return -EFAULT;
357 uptr = compat_ptr(ipck.msgp); 365 uptr = compat_ptr(ipck.msgp);
358 msgtyp = ipck.msgtyp; 366 msgtyp = ipck.msgtyp;
359 } 367 }
360 up = uptr; 368 return do_msgrcv(first, uptr, second, msgtyp, third,
361 err = do_msgrcv(first, &type, up->mtext, second, msgtyp, third); 369 compat_do_msg_fill);
362 if (err < 0)
363 goto out;
364 if (put_user(type, &up->mtype))
365 err = -EFAULT;
366out:
367 return err;
368} 370}
369#else 371#else
370long compat_sys_semctl(int semid, int semnum, int cmd, int arg) 372long compat_sys_semctl(int semid, int semnum, int cmd, int arg)
@@ -385,16 +387,8 @@ long compat_sys_msgsnd(int msqid, struct compat_msgbuf __user *msgp,
385long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp, 387long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp,
386 compat_ssize_t msgsz, long msgtyp, int msgflg) 388 compat_ssize_t msgsz, long msgtyp, int msgflg)
387{ 389{
388 long err, mtype; 390 return do_msgrcv(msqid, msgp, (ssize_t)msgsz, msgtyp, msgflg,
389 391 compat_do_msg_fill);
390 err = do_msgrcv(msqid, &mtype, msgp->mtext, (ssize_t)msgsz, msgtyp, msgflg);
391 if (err < 0)
392 goto out;
393
394 if (put_user(mtype, &msgp->mtype))
395 err = -EFAULT;
396 out:
397 return err;
398} 392}
399#endif 393#endif
400 394
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 00fba2bab87d..130dfece27ac 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -158,6 +158,9 @@ static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write,
158 158
159static int zero; 159static int zero;
160static int one = 1; 160static int one = 1;
161#ifdef CONFIG_CHECKPOINT_RESTORE
162static int int_max = INT_MAX;
163#endif
161 164
162static struct ctl_table ipc_kern_table[] = { 165static struct ctl_table ipc_kern_table[] = {
163 { 166 {
@@ -227,6 +230,35 @@ static struct ctl_table ipc_kern_table[] = {
227 .extra1 = &zero, 230 .extra1 = &zero,
228 .extra2 = &one, 231 .extra2 = &one,
229 }, 232 },
233#ifdef CONFIG_CHECKPOINT_RESTORE
234 {
235 .procname = "sem_next_id",
236 .data = &init_ipc_ns.ids[IPC_SEM_IDS].next_id,
237 .maxlen = sizeof(init_ipc_ns.ids[IPC_SEM_IDS].next_id),
238 .mode = 0644,
239 .proc_handler = proc_ipc_dointvec_minmax,
240 .extra1 = &zero,
241 .extra2 = &int_max,
242 },
243 {
244 .procname = "msg_next_id",
245 .data = &init_ipc_ns.ids[IPC_MSG_IDS].next_id,
246 .maxlen = sizeof(init_ipc_ns.ids[IPC_MSG_IDS].next_id),
247 .mode = 0644,
248 .proc_handler = proc_ipc_dointvec_minmax,
249 .extra1 = &zero,
250 .extra2 = &int_max,
251 },
252 {
253 .procname = "shm_next_id",
254 .data = &init_ipc_ns.ids[IPC_SHM_IDS].next_id,
255 .maxlen = sizeof(init_ipc_ns.ids[IPC_SHM_IDS].next_id),
256 .mode = 0644,
257 .proc_handler = proc_ipc_dointvec_minmax,
258 .extra1 = &zero,
259 .extra2 = &int_max,
260 },
261#endif
230 {} 262 {}
231}; 263};
232 264
diff --git a/ipc/msg.c b/ipc/msg.c
index a71af5a65abf..950572f9d796 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -755,26 +755,91 @@ static inline int convert_mode(long *msgtyp, int msgflg)
755 return SEARCH_EQUAL; 755 return SEARCH_EQUAL;
756} 756}
757 757
758long do_msgrcv(int msqid, long *pmtype, void __user *mtext, 758static long do_msg_fill(void __user *dest, struct msg_msg *msg, size_t bufsz)
759 size_t msgsz, long msgtyp, int msgflg) 759{
760 struct msgbuf __user *msgp = dest;
761 size_t msgsz;
762
763 if (put_user(msg->m_type, &msgp->mtype))
764 return -EFAULT;
765
766 msgsz = (bufsz > msg->m_ts) ? msg->m_ts : bufsz;
767 if (store_msg(msgp->mtext, msg, msgsz))
768 return -EFAULT;
769 return msgsz;
770}
771
772#ifdef CONFIG_CHECKPOINT_RESTORE
773/*
774 * This function creates new kernel message structure, large enough to store
775 * bufsz message bytes.
776 */
777static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz,
778 int msgflg, long *msgtyp,
779 unsigned long *copy_number)
780{
781 struct msg_msg *copy;
782
783 *copy_number = *msgtyp;
784 *msgtyp = 0;
785 /*
786 * Create dummy message to copy real message to.
787 */
788 copy = load_msg(buf, bufsz);
789 if (!IS_ERR(copy))
790 copy->m_ts = bufsz;
791 return copy;
792}
793
794static inline void free_copy(struct msg_msg *copy)
795{
796 if (copy)
797 free_msg(copy);
798}
799#else
800static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz,
801 int msgflg, long *msgtyp,
802 unsigned long *copy_number)
803{
804 return ERR_PTR(-ENOSYS);
805}
806
807static inline void free_copy(struct msg_msg *copy)
808{
809}
810#endif
811
812long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
813 int msgflg,
814 long (*msg_handler)(void __user *, struct msg_msg *, size_t))
760{ 815{
761 struct msg_queue *msq; 816 struct msg_queue *msq;
762 struct msg_msg *msg; 817 struct msg_msg *msg;
763 int mode; 818 int mode;
764 struct ipc_namespace *ns; 819 struct ipc_namespace *ns;
820 struct msg_msg *copy = NULL;
821 unsigned long copy_number = 0;
765 822
766 if (msqid < 0 || (long) msgsz < 0) 823 if (msqid < 0 || (long) bufsz < 0)
767 return -EINVAL; 824 return -EINVAL;
825 if (msgflg & MSG_COPY) {
826 copy = prepare_copy(buf, bufsz, msgflg, &msgtyp, &copy_number);
827 if (IS_ERR(copy))
828 return PTR_ERR(copy);
829 }
768 mode = convert_mode(&msgtyp, msgflg); 830 mode = convert_mode(&msgtyp, msgflg);
769 ns = current->nsproxy->ipc_ns; 831 ns = current->nsproxy->ipc_ns;
770 832
771 msq = msg_lock_check(ns, msqid); 833 msq = msg_lock_check(ns, msqid);
772 if (IS_ERR(msq)) 834 if (IS_ERR(msq)) {
835 free_copy(copy);
773 return PTR_ERR(msq); 836 return PTR_ERR(msq);
837 }
774 838
775 for (;;) { 839 for (;;) {
776 struct msg_receiver msr_d; 840 struct msg_receiver msr_d;
777 struct list_head *tmp; 841 struct list_head *tmp;
842 long msg_counter = 0;
778 843
779 msg = ERR_PTR(-EACCES); 844 msg = ERR_PTR(-EACCES);
780 if (ipcperms(ns, &msq->q_perm, S_IRUGO)) 845 if (ipcperms(ns, &msq->q_perm, S_IRUGO))
@@ -793,12 +858,21 @@ long do_msgrcv(int msqid, long *pmtype, void __user *mtext,
793 msg = walk_msg; 858 msg = walk_msg;
794 if (mode == SEARCH_LESSEQUAL && 859 if (mode == SEARCH_LESSEQUAL &&
795 walk_msg->m_type != 1) { 860 walk_msg->m_type != 1) {
796 msg = walk_msg;
797 msgtyp = walk_msg->m_type - 1; 861 msgtyp = walk_msg->m_type - 1;
798 } else { 862 } else if (msgflg & MSG_COPY) {
799 msg = walk_msg; 863 if (copy_number == msg_counter) {
864 /*
865 * Found requested message.
866 * Copy it.
867 */
868 msg = copy_msg(msg, copy);
869 if (IS_ERR(msg))
870 goto out_unlock;
871 break;
872 }
873 } else
800 break; 874 break;
801 } 875 msg_counter++;
802 } 876 }
803 tmp = tmp->next; 877 tmp = tmp->next;
804 } 878 }
@@ -807,10 +881,16 @@ long do_msgrcv(int msqid, long *pmtype, void __user *mtext,
807 * Found a suitable message. 881 * Found a suitable message.
808 * Unlink it from the queue. 882 * Unlink it from the queue.
809 */ 883 */
810 if ((msgsz < msg->m_ts) && !(msgflg & MSG_NOERROR)) { 884 if ((bufsz < msg->m_ts) && !(msgflg & MSG_NOERROR)) {
811 msg = ERR_PTR(-E2BIG); 885 msg = ERR_PTR(-E2BIG);
812 goto out_unlock; 886 goto out_unlock;
813 } 887 }
888 /*
889 * If we are copying, then do not unlink message and do
890 * not update queue parameters.
891 */
892 if (msgflg & MSG_COPY)
893 goto out_unlock;
814 list_del(&msg->m_list); 894 list_del(&msg->m_list);
815 msq->q_qnum--; 895 msq->q_qnum--;
816 msq->q_rtime = get_seconds(); 896 msq->q_rtime = get_seconds();
@@ -834,7 +914,7 @@ long do_msgrcv(int msqid, long *pmtype, void __user *mtext,
834 if (msgflg & MSG_NOERROR) 914 if (msgflg & MSG_NOERROR)
835 msr_d.r_maxsize = INT_MAX; 915 msr_d.r_maxsize = INT_MAX;
836 else 916 else
837 msr_d.r_maxsize = msgsz; 917 msr_d.r_maxsize = bufsz;
838 msr_d.r_msg = ERR_PTR(-EAGAIN); 918 msr_d.r_msg = ERR_PTR(-EAGAIN);
839 current->state = TASK_INTERRUPTIBLE; 919 current->state = TASK_INTERRUPTIBLE;
840 msg_unlock(msq); 920 msg_unlock(msq);
@@ -894,32 +974,21 @@ out_unlock:
894 break; 974 break;
895 } 975 }
896 } 976 }
897 if (IS_ERR(msg)) 977 if (IS_ERR(msg)) {
978 free_copy(copy);
898 return PTR_ERR(msg); 979 return PTR_ERR(msg);
980 }
899 981
900 msgsz = (msgsz > msg->m_ts) ? msg->m_ts : msgsz; 982 bufsz = msg_handler(buf, msg, bufsz);
901 *pmtype = msg->m_type;
902 if (store_msg(mtext, msg, msgsz))
903 msgsz = -EFAULT;
904
905 free_msg(msg); 983 free_msg(msg);
906 984
907 return msgsz; 985 return bufsz;
908} 986}
909 987
910SYSCALL_DEFINE5(msgrcv, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz, 988SYSCALL_DEFINE5(msgrcv, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz,
911 long, msgtyp, int, msgflg) 989 long, msgtyp, int, msgflg)
912{ 990{
913 long err, mtype; 991 return do_msgrcv(msqid, msgp, msgsz, msgtyp, msgflg, do_msg_fill);
914
915 err = do_msgrcv(msqid, &mtype, msgp->mtext, msgsz, msgtyp, msgflg);
916 if (err < 0)
917 goto out;
918
919 if (put_user(mtype, &msgp->mtype))
920 err = -EFAULT;
921out:
922 return err;
923} 992}
924 993
925#ifdef CONFIG_PROC_FS 994#ifdef CONFIG_PROC_FS
diff --git a/ipc/msgutil.c b/ipc/msgutil.c
index 6471f1bdae96..ebfcbfa8b7f2 100644
--- a/ipc/msgutil.c
+++ b/ipc/msgutil.c
@@ -102,7 +102,50 @@ out_err:
102 free_msg(msg); 102 free_msg(msg);
103 return ERR_PTR(err); 103 return ERR_PTR(err);
104} 104}
105#ifdef CONFIG_CHECKPOINT_RESTORE
106struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst)
107{
108 struct msg_msgseg *dst_pseg, *src_pseg;
109 int len = src->m_ts;
110 int alen;
111
112 BUG_ON(dst == NULL);
113 if (src->m_ts > dst->m_ts)
114 return ERR_PTR(-EINVAL);
105 115
116 alen = len;
117 if (alen > DATALEN_MSG)
118 alen = DATALEN_MSG;
119
120 dst->next = NULL;
121 dst->security = NULL;
122
123 memcpy(dst + 1, src + 1, alen);
124
125 len -= alen;
126 dst_pseg = dst->next;
127 src_pseg = src->next;
128 while (len > 0) {
129 alen = len;
130 if (alen > DATALEN_SEG)
131 alen = DATALEN_SEG;
132 memcpy(dst_pseg + 1, src_pseg + 1, alen);
133 dst_pseg = dst_pseg->next;
134 len -= alen;
135 src_pseg = src_pseg->next;
136 }
137
138 dst->m_type = src->m_type;
139 dst->m_ts = src->m_ts;
140
141 return dst;
142}
143#else
144struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst)
145{
146 return ERR_PTR(-ENOSYS);
147}
148#endif
106int store_msg(void __user *dest, struct msg_msg *msg, int len) 149int store_msg(void __user *dest, struct msg_msg *msg, int len)
107{ 150{
108 int alen; 151 int alen;
diff --git a/ipc/util.c b/ipc/util.c
index 72fd0785ac94..74e1d9c7a98a 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -122,6 +122,7 @@ void ipc_init_ids(struct ipc_ids *ids)
122 122
123 ids->in_use = 0; 123 ids->in_use = 0;
124 ids->seq = 0; 124 ids->seq = 0;
125 ids->next_id = -1;
125 { 126 {
126 int seq_limit = INT_MAX/SEQ_MULTIPLIER; 127 int seq_limit = INT_MAX/SEQ_MULTIPLIER;
127 if (seq_limit > USHRT_MAX) 128 if (seq_limit > USHRT_MAX)
@@ -252,6 +253,7 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size)
252 kuid_t euid; 253 kuid_t euid;
253 kgid_t egid; 254 kgid_t egid;
254 int id, err; 255 int id, err;
256 int next_id = ids->next_id;
255 257
256 if (size > IPCMNI) 258 if (size > IPCMNI)
257 size = IPCMNI; 259 size = IPCMNI;
@@ -264,7 +266,8 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size)
264 rcu_read_lock(); 266 rcu_read_lock();
265 spin_lock(&new->lock); 267 spin_lock(&new->lock);
266 268
267 err = idr_get_new(&ids->ipcs_idr, new, &id); 269 err = idr_get_new_above(&ids->ipcs_idr, new,
270 (next_id < 0) ? 0 : ipcid_to_idx(next_id), &id);
268 if (err) { 271 if (err) {
269 spin_unlock(&new->lock); 272 spin_unlock(&new->lock);
270 rcu_read_unlock(); 273 rcu_read_unlock();
@@ -277,9 +280,14 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size)
277 new->cuid = new->uid = euid; 280 new->cuid = new->uid = euid;
278 new->gid = new->cgid = egid; 281 new->gid = new->cgid = egid;
279 282
280 new->seq = ids->seq++; 283 if (next_id < 0) {
281 if(ids->seq > ids->seq_max) 284 new->seq = ids->seq++;
282 ids->seq = 0; 285 if (ids->seq > ids->seq_max)
286 ids->seq = 0;
287 } else {
288 new->seq = ipcid_to_seqx(next_id);
289 ids->next_id = -1;
290 }
283 291
284 new->id = ipc_buildid(id, new->seq); 292 new->id = ipc_buildid(id, new->seq);
285 return id; 293 return id;
diff --git a/ipc/util.h b/ipc/util.h
index c8fe2f7631e9..eeb79a1fbd83 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -92,6 +92,7 @@ void __init ipc_init_proc_interface(const char *path, const char *header,
92#define IPC_SHM_IDS 2 92#define IPC_SHM_IDS 2
93 93
94#define ipcid_to_idx(id) ((id) % SEQ_MULTIPLIER) 94#define ipcid_to_idx(id) ((id) % SEQ_MULTIPLIER)
95#define ipcid_to_seqx(id) ((id) / SEQ_MULTIPLIER)
95 96
96/* must be called with ids->rw_mutex acquired for writing */ 97/* must be called with ids->rw_mutex acquired for writing */
97int ipc_addid(struct ipc_ids *, struct kern_ipc_perm *, int); 98int ipc_addid(struct ipc_ids *, struct kern_ipc_perm *, int);
@@ -139,6 +140,7 @@ int ipc_parse_version (int *cmd);
139 140
140extern void free_msg(struct msg_msg *msg); 141extern void free_msg(struct msg_msg *msg);
141extern struct msg_msg *load_msg(const void __user *src, int len); 142extern struct msg_msg *load_msg(const void __user *src, int len);
143extern struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst);
142extern int store_msg(void __user *dest, struct msg_msg *msg, int len); 144extern int store_msg(void __user *dest, struct msg_msg *msg, int len);
143 145
144extern void recompute_msgmni(struct ipc_namespace *); 146extern void recompute_msgmni(struct ipc_namespace *);
diff --git a/kernel/fork.c b/kernel/fork.c
index a31b823b3c2d..65ca6d27f24e 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1166,6 +1166,14 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1166 current->signal->flags & SIGNAL_UNKILLABLE) 1166 current->signal->flags & SIGNAL_UNKILLABLE)
1167 return ERR_PTR(-EINVAL); 1167 return ERR_PTR(-EINVAL);
1168 1168
1169 /*
1170 * If the new process will be in a different pid namespace
1171 * don't allow the creation of threads.
1172 */
1173 if ((clone_flags & (CLONE_VM|CLONE_NEWPID)) &&
1174 (task_active_pid_ns(current) != current->nsproxy->pid_ns))
1175 return ERR_PTR(-EINVAL);
1176
1169 retval = security_task_create(clone_flags); 1177 retval = security_task_create(clone_flags);
1170 if (retval) 1178 if (retval)
1171 goto fork_out; 1179 goto fork_out;
diff --git a/kernel/pid.c b/kernel/pid.c
index 36aa02ff17d6..de9af600006f 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -270,7 +270,6 @@ void free_pid(struct pid *pid)
270 wake_up_process(ns->child_reaper); 270 wake_up_process(ns->child_reaper);
271 break; 271 break;
272 case 0: 272 case 0:
273 ns->nr_hashed = -1;
274 schedule_work(&ns->proc_work); 273 schedule_work(&ns->proc_work);
275 break; 274 break;
276 } 275 }
@@ -319,7 +318,7 @@ struct pid *alloc_pid(struct pid_namespace *ns)
319 318
320 upid = pid->numbers + ns->level; 319 upid = pid->numbers + ns->level;
321 spin_lock_irq(&pidmap_lock); 320 spin_lock_irq(&pidmap_lock);
322 if (ns->nr_hashed < 0) 321 if (!(ns->nr_hashed & PIDNS_HASH_ADDING))
323 goto out_unlock; 322 goto out_unlock;
324 for ( ; upid >= pid->numbers; --upid) { 323 for ( ; upid >= pid->numbers; --upid) {
325 hlist_add_head_rcu(&upid->pid_chain, 324 hlist_add_head_rcu(&upid->pid_chain,
@@ -342,6 +341,13 @@ out_free:
342 goto out; 341 goto out;
343} 342}
344 343
344void disable_pid_allocation(struct pid_namespace *ns)
345{
346 spin_lock_irq(&pidmap_lock);
347 ns->nr_hashed &= ~PIDNS_HASH_ADDING;
348 spin_unlock_irq(&pidmap_lock);
349}
350
345struct pid *find_pid_ns(int nr, struct pid_namespace *ns) 351struct pid *find_pid_ns(int nr, struct pid_namespace *ns)
346{ 352{
347 struct hlist_node *elem; 353 struct hlist_node *elem;
@@ -573,6 +579,9 @@ void __init pidhash_init(void)
573 579
574void __init pidmap_init(void) 580void __init pidmap_init(void)
575{ 581{
582 /* Veryify no one has done anything silly */
583 BUILD_BUG_ON(PID_MAX_LIMIT >= PIDNS_HASH_ADDING);
584
576 /* bump default and minimum pid_max based on number of cpus */ 585 /* bump default and minimum pid_max based on number of cpus */
577 pid_max = min(pid_max_max, max_t(int, pid_max, 586 pid_max = min(pid_max_max, max_t(int, pid_max,
578 PIDS_PER_CPU_DEFAULT * num_possible_cpus())); 587 PIDS_PER_CPU_DEFAULT * num_possible_cpus()));
@@ -584,7 +593,7 @@ void __init pidmap_init(void)
584 /* Reserve PID 0. We never call free_pidmap(0) */ 593 /* Reserve PID 0. We never call free_pidmap(0) */
585 set_bit(0, init_pid_ns.pidmap[0].page); 594 set_bit(0, init_pid_ns.pidmap[0].page);
586 atomic_dec(&init_pid_ns.pidmap[0].nr_free); 595 atomic_dec(&init_pid_ns.pidmap[0].nr_free);
587 init_pid_ns.nr_hashed = 1; 596 init_pid_ns.nr_hashed = PIDNS_HASH_ADDING;
588 597
589 init_pid_ns.pid_cachep = KMEM_CACHE(pid, 598 init_pid_ns.pid_cachep = KMEM_CACHE(pid,
590 SLAB_HWCACHE_ALIGN | SLAB_PANIC); 599 SLAB_HWCACHE_ALIGN | SLAB_PANIC);
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index fdbd0cdf271a..c1c3dc1c6023 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -115,6 +115,7 @@ static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns
115 ns->level = level; 115 ns->level = level;
116 ns->parent = get_pid_ns(parent_pid_ns); 116 ns->parent = get_pid_ns(parent_pid_ns);
117 ns->user_ns = get_user_ns(user_ns); 117 ns->user_ns = get_user_ns(user_ns);
118 ns->nr_hashed = PIDNS_HASH_ADDING;
118 INIT_WORK(&ns->proc_work, proc_cleanup_work); 119 INIT_WORK(&ns->proc_work, proc_cleanup_work);
119 120
120 set_bit(0, ns->pidmap[0].page); 121 set_bit(0, ns->pidmap[0].page);
@@ -181,6 +182,9 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns)
181 int rc; 182 int rc;
182 struct task_struct *task, *me = current; 183 struct task_struct *task, *me = current;
183 184
185 /* Don't allow any more processes into the pid namespace */
186 disable_pid_allocation(pid_ns);
187
184 /* Ignore SIGCHLD causing any terminated children to autoreap */ 188 /* Ignore SIGCHLD causing any terminated children to autoreap */
185 spin_lock_irq(&me->sighand->siglock); 189 spin_lock_irq(&me->sighand->siglock);
186 me->sighand->action[SIGCHLD - 1].sa.sa_handler = SIG_IGN; 190 me->sighand->action[SIGCHLD - 1].sa.sa_handler = SIG_IGN;
diff --git a/kernel/printk.c b/kernel/printk.c
index 19c0d7bcf24a..357f714ddd49 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -870,10 +870,11 @@ static size_t print_time(u64 ts, char *buf)
870 if (!printk_time) 870 if (!printk_time)
871 return 0; 871 return 0;
872 872
873 rem_nsec = do_div(ts, 1000000000);
874
873 if (!buf) 875 if (!buf)
874 return 15; 876 return snprintf(NULL, 0, "[%5lu.000000] ", (unsigned long)ts);
875 877
876 rem_nsec = do_div(ts, 1000000000);
877 return sprintf(buf, "[%5lu.%06lu] ", 878 return sprintf(buf, "[%5lu.%06lu] ",
878 (unsigned long)ts, rem_nsec / 1000); 879 (unsigned long)ts, rem_nsec / 1000);
879} 880}
diff --git a/kernel/signal.c b/kernel/signal.c
index 7aaa51d8e5b8..372771e948c2 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2528,11 +2528,8 @@ static void __set_task_blocked(struct task_struct *tsk, const sigset_t *newset)
2528 */ 2528 */
2529void set_current_blocked(sigset_t *newset) 2529void set_current_blocked(sigset_t *newset)
2530{ 2530{
2531 struct task_struct *tsk = current;
2532 sigdelsetmask(newset, sigmask(SIGKILL) | sigmask(SIGSTOP)); 2531 sigdelsetmask(newset, sigmask(SIGKILL) | sigmask(SIGSTOP));
2533 spin_lock_irq(&tsk->sighand->siglock); 2532 __set_current_blocked(newset);
2534 __set_task_blocked(tsk, newset);
2535 spin_unlock_irq(&tsk->sighand->siglock);
2536} 2533}
2537 2534
2538void __set_current_blocked(const sigset_t *newset) 2535void __set_current_blocked(const sigset_t *newset)
@@ -3204,7 +3201,6 @@ SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, nset,
3204 if (nset) { 3201 if (nset) {
3205 if (copy_from_user(&new_set, nset, sizeof(*nset))) 3202 if (copy_from_user(&new_set, nset, sizeof(*nset)))
3206 return -EFAULT; 3203 return -EFAULT;
3207 new_set &= ~(sigmask(SIGKILL) | sigmask(SIGSTOP));
3208 3204
3209 new_blocked = current->blocked; 3205 new_blocked = current->blocked;
3210 3206
@@ -3222,7 +3218,7 @@ SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, nset,
3222 return -EINVAL; 3218 return -EINVAL;
3223 } 3219 }
3224 3220
3225 __set_current_blocked(&new_blocked); 3221 set_current_blocked(&new_blocked);
3226 } 3222 }
3227 3223
3228 if (oset) { 3224 if (oset) {
@@ -3286,6 +3282,7 @@ SYSCALL_DEFINE1(ssetmask, int, newmask)
3286 int old = current->blocked.sig[0]; 3282 int old = current->blocked.sig[0];
3287 sigset_t newset; 3283 sigset_t newset;
3288 3284
3285 siginitset(&newset, newmask);
3289 set_current_blocked(&newset); 3286 set_current_blocked(&newset);
3290 3287
3291 return old; 3288 return old;
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 3a353091a903..67604e599384 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -134,7 +134,7 @@ config DEBUG_SECTION_MISMATCH
134 any use of code/data previously in these sections would 134 any use of code/data previously in these sections would
135 most likely result in an oops. 135 most likely result in an oops.
136 In the code, functions and variables are annotated with 136 In the code, functions and variables are annotated with
137 __init, __devinit, etc. (see the full list in include/linux/init.h), 137 __init, __cpuinit, etc. (see the full list in include/linux/init.h),
138 which results in the code/data being placed in specific sections. 138 which results in the code/data being placed in specific sections.
139 The section mismatch analysis is always performed after a full 139 The section mismatch analysis is always performed after a full
140 kernel build, and enabling this option causes the following 140 kernel build, and enabling this option causes the following
diff --git a/mm/memory.c b/mm/memory.c
index e0a9b0ce4f10..bb1369f7b9b4 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -184,10 +184,14 @@ static int tlb_next_batch(struct mmu_gather *tlb)
184 return 1; 184 return 1;
185 } 185 }
186 186
187 if (tlb->batch_count == MAX_GATHER_BATCH_COUNT)
188 return 0;
189
187 batch = (void *)__get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0); 190 batch = (void *)__get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0);
188 if (!batch) 191 if (!batch)
189 return 0; 192 return 0;
190 193
194 tlb->batch_count++;
191 batch->next = NULL; 195 batch->next = NULL;
192 batch->nr = 0; 196 batch->nr = 0;
193 batch->max = MAX_GATHER_BATCH; 197 batch->max = MAX_GATHER_BATCH;
@@ -216,6 +220,7 @@ void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, bool fullmm)
216 tlb->local.nr = 0; 220 tlb->local.nr = 0;
217 tlb->local.max = ARRAY_SIZE(tlb->__pages); 221 tlb->local.max = ARRAY_SIZE(tlb->__pages);
218 tlb->active = &tlb->local; 222 tlb->active = &tlb->local;
223 tlb->batch_count = 0;
219 224
220#ifdef CONFIG_HAVE_RCU_TABLE_FREE 225#ifdef CONFIG_HAVE_RCU_TABLE_FREE
221 tlb->batch = NULL; 226 tlb->batch = NULL;
@@ -3706,6 +3711,14 @@ retry:
3706 if (pmd_trans_huge(orig_pmd)) { 3711 if (pmd_trans_huge(orig_pmd)) {
3707 unsigned int dirty = flags & FAULT_FLAG_WRITE; 3712 unsigned int dirty = flags & FAULT_FLAG_WRITE;
3708 3713
3714 /*
3715 * If the pmd is splitting, return and retry the
3716 * the fault. Alternative: wait until the split
3717 * is done, and goto retry.
3718 */
3719 if (pmd_trans_splitting(orig_pmd))
3720 return 0;
3721
3709 if (pmd_numa(orig_pmd)) 3722 if (pmd_numa(orig_pmd))
3710 return do_huge_pmd_numa_page(mm, vma, address, 3723 return do_huge_pmd_numa_page(mm, vma, address,
3711 orig_pmd, pmd); 3724 orig_pmd, pmd);
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index d1b315e98627..e2df1c1fb41f 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2132,7 +2132,7 @@ bool __mpol_equal(struct mempolicy *a, struct mempolicy *b)
2132 */ 2132 */
2133 2133
2134/* lookup first element intersecting start-end */ 2134/* lookup first element intersecting start-end */
2135/* Caller holds sp->mutex */ 2135/* Caller holds sp->lock */
2136static struct sp_node * 2136static struct sp_node *
2137sp_lookup(struct shared_policy *sp, unsigned long start, unsigned long end) 2137sp_lookup(struct shared_policy *sp, unsigned long start, unsigned long end)
2138{ 2138{
@@ -2196,13 +2196,13 @@ mpol_shared_policy_lookup(struct shared_policy *sp, unsigned long idx)
2196 2196
2197 if (!sp->root.rb_node) 2197 if (!sp->root.rb_node)
2198 return NULL; 2198 return NULL;
2199 mutex_lock(&sp->mutex); 2199 spin_lock(&sp->lock);
2200 sn = sp_lookup(sp, idx, idx+1); 2200 sn = sp_lookup(sp, idx, idx+1);
2201 if (sn) { 2201 if (sn) {
2202 mpol_get(sn->policy); 2202 mpol_get(sn->policy);
2203 pol = sn->policy; 2203 pol = sn->policy;
2204 } 2204 }
2205 mutex_unlock(&sp->mutex); 2205 spin_unlock(&sp->lock);
2206 return pol; 2206 return pol;
2207} 2207}
2208 2208
@@ -2328,6 +2328,14 @@ static void sp_delete(struct shared_policy *sp, struct sp_node *n)
2328 sp_free(n); 2328 sp_free(n);
2329} 2329}
2330 2330
2331static void sp_node_init(struct sp_node *node, unsigned long start,
2332 unsigned long end, struct mempolicy *pol)
2333{
2334 node->start = start;
2335 node->end = end;
2336 node->policy = pol;
2337}
2338
2331static struct sp_node *sp_alloc(unsigned long start, unsigned long end, 2339static struct sp_node *sp_alloc(unsigned long start, unsigned long end,
2332 struct mempolicy *pol) 2340 struct mempolicy *pol)
2333{ 2341{
@@ -2344,10 +2352,7 @@ static struct sp_node *sp_alloc(unsigned long start, unsigned long end,
2344 return NULL; 2352 return NULL;
2345 } 2353 }
2346 newpol->flags |= MPOL_F_SHARED; 2354 newpol->flags |= MPOL_F_SHARED;
2347 2355 sp_node_init(n, start, end, newpol);
2348 n->start = start;
2349 n->end = end;
2350 n->policy = newpol;
2351 2356
2352 return n; 2357 return n;
2353} 2358}
@@ -2357,9 +2362,12 @@ static int shared_policy_replace(struct shared_policy *sp, unsigned long start,
2357 unsigned long end, struct sp_node *new) 2362 unsigned long end, struct sp_node *new)
2358{ 2363{
2359 struct sp_node *n; 2364 struct sp_node *n;
2365 struct sp_node *n_new = NULL;
2366 struct mempolicy *mpol_new = NULL;
2360 int ret = 0; 2367 int ret = 0;
2361 2368
2362 mutex_lock(&sp->mutex); 2369restart:
2370 spin_lock(&sp->lock);
2363 n = sp_lookup(sp, start, end); 2371 n = sp_lookup(sp, start, end);
2364 /* Take care of old policies in the same range. */ 2372 /* Take care of old policies in the same range. */
2365 while (n && n->start < end) { 2373 while (n && n->start < end) {
@@ -2372,14 +2380,16 @@ static int shared_policy_replace(struct shared_policy *sp, unsigned long start,
2372 } else { 2380 } else {
2373 /* Old policy spanning whole new range. */ 2381 /* Old policy spanning whole new range. */
2374 if (n->end > end) { 2382 if (n->end > end) {
2375 struct sp_node *new2; 2383 if (!n_new)
2376 new2 = sp_alloc(end, n->end, n->policy); 2384 goto alloc_new;
2377 if (!new2) { 2385
2378 ret = -ENOMEM; 2386 *mpol_new = *n->policy;
2379 goto out; 2387 atomic_set(&mpol_new->refcnt, 1);
2380 } 2388 sp_node_init(n_new, n->end, end, mpol_new);
2389 sp_insert(sp, n_new);
2381 n->end = start; 2390 n->end = start;
2382 sp_insert(sp, new2); 2391 n_new = NULL;
2392 mpol_new = NULL;
2383 break; 2393 break;
2384 } else 2394 } else
2385 n->end = start; 2395 n->end = start;
@@ -2390,9 +2400,27 @@ static int shared_policy_replace(struct shared_policy *sp, unsigned long start,
2390 } 2400 }
2391 if (new) 2401 if (new)
2392 sp_insert(sp, new); 2402 sp_insert(sp, new);
2393out: 2403 spin_unlock(&sp->lock);
2394 mutex_unlock(&sp->mutex); 2404 ret = 0;
2405
2406err_out:
2407 if (mpol_new)
2408 mpol_put(mpol_new);
2409 if (n_new)
2410 kmem_cache_free(sn_cache, n_new);
2411
2395 return ret; 2412 return ret;
2413
2414alloc_new:
2415 spin_unlock(&sp->lock);
2416 ret = -ENOMEM;
2417 n_new = kmem_cache_alloc(sn_cache, GFP_KERNEL);
2418 if (!n_new)
2419 goto err_out;
2420 mpol_new = kmem_cache_alloc(policy_cache, GFP_KERNEL);
2421 if (!mpol_new)
2422 goto err_out;
2423 goto restart;
2396} 2424}
2397 2425
2398/** 2426/**
@@ -2410,7 +2438,7 @@ void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol)
2410 int ret; 2438 int ret;
2411 2439
2412 sp->root = RB_ROOT; /* empty tree == default mempolicy */ 2440 sp->root = RB_ROOT; /* empty tree == default mempolicy */
2413 mutex_init(&sp->mutex); 2441 spin_lock_init(&sp->lock);
2414 2442
2415 if (mpol) { 2443 if (mpol) {
2416 struct vm_area_struct pvma; 2444 struct vm_area_struct pvma;
@@ -2476,14 +2504,14 @@ void mpol_free_shared_policy(struct shared_policy *p)
2476 2504
2477 if (!p->root.rb_node) 2505 if (!p->root.rb_node)
2478 return; 2506 return;
2479 mutex_lock(&p->mutex); 2507 spin_lock(&p->lock);
2480 next = rb_first(&p->root); 2508 next = rb_first(&p->root);
2481 while (next) { 2509 while (next) {
2482 n = rb_entry(next, struct sp_node, nd); 2510 n = rb_entry(next, struct sp_node, nd);
2483 next = rb_next(&n->nd); 2511 next = rb_next(&n->nd);
2484 sp_delete(p, n); 2512 sp_delete(p, n);
2485 } 2513 }
2486 mutex_unlock(&p->mutex); 2514 spin_unlock(&p->lock);
2487} 2515}
2488 2516
2489#ifdef CONFIG_NUMA_BALANCING 2517#ifdef CONFIG_NUMA_BALANCING
@@ -2595,8 +2623,7 @@ void numa_default_policy(void)
2595 */ 2623 */
2596 2624
2597/* 2625/*
2598 * "local" is pseudo-policy: MPOL_PREFERRED with MPOL_F_LOCAL flag 2626 * "local" is implemented internally by MPOL_PREFERRED with MPOL_F_LOCAL flag.
2599 * Used only for mpol_parse_str() and mpol_to_str()
2600 */ 2627 */
2601static const char * const policy_modes[] = 2628static const char * const policy_modes[] =
2602{ 2629{
@@ -2610,28 +2637,20 @@ static const char * const policy_modes[] =
2610 2637
2611#ifdef CONFIG_TMPFS 2638#ifdef CONFIG_TMPFS
2612/** 2639/**
2613 * mpol_parse_str - parse string to mempolicy 2640 * mpol_parse_str - parse string to mempolicy, for tmpfs mpol mount option.
2614 * @str: string containing mempolicy to parse 2641 * @str: string containing mempolicy to parse
2615 * @mpol: pointer to struct mempolicy pointer, returned on success. 2642 * @mpol: pointer to struct mempolicy pointer, returned on success.
2616 * @no_context: flag whether to "contextualize" the mempolicy
2617 * 2643 *
2618 * Format of input: 2644 * Format of input:
2619 * <mode>[=<flags>][:<nodelist>] 2645 * <mode>[=<flags>][:<nodelist>]
2620 * 2646 *
2621 * if @no_context is true, save the input nodemask in w.user_nodemask in
2622 * the returned mempolicy. This will be used to "clone" the mempolicy in
2623 * a specific context [cpuset] at a later time. Used to parse tmpfs mpol
2624 * mount option. Note that if 'static' or 'relative' mode flags were
2625 * specified, the input nodemask will already have been saved. Saving
2626 * it again is redundant, but safe.
2627 *
2628 * On success, returns 0, else 1 2647 * On success, returns 0, else 1
2629 */ 2648 */
2630int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) 2649int mpol_parse_str(char *str, struct mempolicy **mpol)
2631{ 2650{
2632 struct mempolicy *new = NULL; 2651 struct mempolicy *new = NULL;
2633 unsigned short mode; 2652 unsigned short mode;
2634 unsigned short uninitialized_var(mode_flags); 2653 unsigned short mode_flags;
2635 nodemask_t nodes; 2654 nodemask_t nodes;
2636 char *nodelist = strchr(str, ':'); 2655 char *nodelist = strchr(str, ':');
2637 char *flags = strchr(str, '='); 2656 char *flags = strchr(str, '=');
@@ -2719,24 +2738,23 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
2719 if (IS_ERR(new)) 2738 if (IS_ERR(new))
2720 goto out; 2739 goto out;
2721 2740
2722 if (no_context) { 2741 /*
2723 /* save for contextualization */ 2742 * Save nodes for mpol_to_str() to show the tmpfs mount options
2724 new->w.user_nodemask = nodes; 2743 * for /proc/mounts, /proc/pid/mounts and /proc/pid/mountinfo.
2725 } else { 2744 */
2726 int ret; 2745 if (mode != MPOL_PREFERRED)
2727 NODEMASK_SCRATCH(scratch); 2746 new->v.nodes = nodes;
2728 if (scratch) { 2747 else if (nodelist)
2729 task_lock(current); 2748 new->v.preferred_node = first_node(nodes);
2730 ret = mpol_set_nodemask(new, &nodes, scratch); 2749 else
2731 task_unlock(current); 2750 new->flags |= MPOL_F_LOCAL;
2732 } else 2751
2733 ret = -ENOMEM; 2752 /*
2734 NODEMASK_SCRATCH_FREE(scratch); 2753 * Save nodes for contextualization: this will be used to "clone"
2735 if (ret) { 2754 * the mempolicy in a specific context [cpuset] at a later time.
2736 mpol_put(new); 2755 */
2737 goto out; 2756 new->w.user_nodemask = nodes;
2738 } 2757
2739 }
2740 err = 0; 2758 err = 0;
2741 2759
2742out: 2760out:
@@ -2756,13 +2774,12 @@ out:
2756 * @buffer: to contain formatted mempolicy string 2774 * @buffer: to contain formatted mempolicy string
2757 * @maxlen: length of @buffer 2775 * @maxlen: length of @buffer
2758 * @pol: pointer to mempolicy to be formatted 2776 * @pol: pointer to mempolicy to be formatted
2759 * @no_context: "context free" mempolicy - use nodemask in w.user_nodemask
2760 * 2777 *
2761 * Convert a mempolicy into a string. 2778 * Convert a mempolicy into a string.
2762 * Returns the number of characters in buffer (if positive) 2779 * Returns the number of characters in buffer (if positive)
2763 * or an error (negative) 2780 * or an error (negative)
2764 */ 2781 */
2765int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, int no_context) 2782int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
2766{ 2783{
2767 char *p = buffer; 2784 char *p = buffer;
2768 int l; 2785 int l;
@@ -2788,7 +2805,7 @@ int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, int no_context)
2788 case MPOL_PREFERRED: 2805 case MPOL_PREFERRED:
2789 nodes_clear(nodes); 2806 nodes_clear(nodes);
2790 if (flags & MPOL_F_LOCAL) 2807 if (flags & MPOL_F_LOCAL)
2791 mode = MPOL_LOCAL; /* pseudo-policy */ 2808 mode = MPOL_LOCAL;
2792 else 2809 else
2793 node_set(pol->v.preferred_node, nodes); 2810 node_set(pol->v.preferred_node, nodes);
2794 break; 2811 break;
@@ -2796,10 +2813,7 @@ int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, int no_context)
2796 case MPOL_BIND: 2813 case MPOL_BIND:
2797 /* Fall through */ 2814 /* Fall through */
2798 case MPOL_INTERLEAVE: 2815 case MPOL_INTERLEAVE:
2799 if (no_context) 2816 nodes = pol->v.nodes;
2800 nodes = pol->w.user_nodemask;
2801 else
2802 nodes = pol->v.nodes;
2803 break; 2817 break;
2804 2818
2805 default: 2819 default:
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 4ba5e37127fc..bc6cc0e913bd 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -221,11 +221,6 @@ EXPORT_SYMBOL(nr_online_nodes);
221 221
222int page_group_by_mobility_disabled __read_mostly; 222int page_group_by_mobility_disabled __read_mostly;
223 223
224/*
225 * NOTE:
226 * Don't use set_pageblock_migratetype(page, MIGRATE_ISOLATE) directly.
227 * Instead, use {un}set_pageblock_isolate.
228 */
229void set_pageblock_migratetype(struct page *page, int migratetype) 224void set_pageblock_migratetype(struct page *page, int migratetype)
230{ 225{
231 226
@@ -1655,20 +1650,6 @@ static bool __zone_watermark_ok(struct zone *z, int order, unsigned long mark,
1655 return true; 1650 return true;
1656} 1651}
1657 1652
1658#ifdef CONFIG_MEMORY_ISOLATION
1659static inline unsigned long nr_zone_isolate_freepages(struct zone *zone)
1660{
1661 if (unlikely(zone->nr_pageblock_isolate))
1662 return zone->nr_pageblock_isolate * pageblock_nr_pages;
1663 return 0;
1664}
1665#else
1666static inline unsigned long nr_zone_isolate_freepages(struct zone *zone)
1667{
1668 return 0;
1669}
1670#endif
1671
1672bool zone_watermark_ok(struct zone *z, int order, unsigned long mark, 1653bool zone_watermark_ok(struct zone *z, int order, unsigned long mark,
1673 int classzone_idx, int alloc_flags) 1654 int classzone_idx, int alloc_flags)
1674{ 1655{
@@ -1684,14 +1665,6 @@ bool zone_watermark_ok_safe(struct zone *z, int order, unsigned long mark,
1684 if (z->percpu_drift_mark && free_pages < z->percpu_drift_mark) 1665 if (z->percpu_drift_mark && free_pages < z->percpu_drift_mark)
1685 free_pages = zone_page_state_snapshot(z, NR_FREE_PAGES); 1666 free_pages = zone_page_state_snapshot(z, NR_FREE_PAGES);
1686 1667
1687 /*
1688 * If the zone has MIGRATE_ISOLATE type free pages, we should consider
1689 * it. nr_zone_isolate_freepages is never accurate so kswapd might not
1690 * sleep although it could do so. But this is more desirable for memory
1691 * hotplug than sleeping which can cause a livelock in the direct
1692 * reclaim path.
1693 */
1694 free_pages -= nr_zone_isolate_freepages(z);
1695 return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags, 1668 return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags,
1696 free_pages); 1669 free_pages);
1697} 1670}
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 9d2264ea4606..383bdbb98b04 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -8,28 +8,6 @@
8#include <linux/memory.h> 8#include <linux/memory.h>
9#include "internal.h" 9#include "internal.h"
10 10
11/* called while holding zone->lock */
12static void set_pageblock_isolate(struct page *page)
13{
14 if (get_pageblock_migratetype(page) == MIGRATE_ISOLATE)
15 return;
16
17 set_pageblock_migratetype(page, MIGRATE_ISOLATE);
18 page_zone(page)->nr_pageblock_isolate++;
19}
20
21/* called while holding zone->lock */
22static void restore_pageblock_isolate(struct page *page, int migratetype)
23{
24 struct zone *zone = page_zone(page);
25 if (WARN_ON(get_pageblock_migratetype(page) != MIGRATE_ISOLATE))
26 return;
27
28 BUG_ON(zone->nr_pageblock_isolate <= 0);
29 set_pageblock_migratetype(page, migratetype);
30 zone->nr_pageblock_isolate--;
31}
32
33int set_migratetype_isolate(struct page *page, bool skip_hwpoisoned_pages) 11int set_migratetype_isolate(struct page *page, bool skip_hwpoisoned_pages)
34{ 12{
35 struct zone *zone; 13 struct zone *zone;
@@ -80,7 +58,7 @@ out:
80 unsigned long nr_pages; 58 unsigned long nr_pages;
81 int migratetype = get_pageblock_migratetype(page); 59 int migratetype = get_pageblock_migratetype(page);
82 60
83 set_pageblock_isolate(page); 61 set_pageblock_migratetype(page, MIGRATE_ISOLATE);
84 nr_pages = move_freepages_block(zone, page, MIGRATE_ISOLATE); 62 nr_pages = move_freepages_block(zone, page, MIGRATE_ISOLATE);
85 63
86 __mod_zone_freepage_state(zone, -nr_pages, migratetype); 64 __mod_zone_freepage_state(zone, -nr_pages, migratetype);
@@ -103,7 +81,7 @@ void unset_migratetype_isolate(struct page *page, unsigned migratetype)
103 goto out; 81 goto out;
104 nr_pages = move_freepages_block(zone, page, migratetype); 82 nr_pages = move_freepages_block(zone, page, migratetype);
105 __mod_zone_freepage_state(zone, nr_pages, migratetype); 83 __mod_zone_freepage_state(zone, nr_pages, migratetype);
106 restore_pageblock_isolate(page, migratetype); 84 set_pageblock_migratetype(page, migratetype);
107out: 85out:
108 spin_unlock_irqrestore(&zone->lock, flags); 86 spin_unlock_irqrestore(&zone->lock, flags);
109} 87}
diff --git a/mm/shmem.c b/mm/shmem.c
index 5c90d84c2b02..5dd56f6efdbd 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -889,7 +889,7 @@ static void shmem_show_mpol(struct seq_file *seq, struct mempolicy *mpol)
889 if (!mpol || mpol->mode == MPOL_DEFAULT) 889 if (!mpol || mpol->mode == MPOL_DEFAULT)
890 return; /* show nothing */ 890 return; /* show nothing */
891 891
892 mpol_to_str(buffer, sizeof(buffer), mpol, 1); 892 mpol_to_str(buffer, sizeof(buffer), mpol);
893 893
894 seq_printf(seq, ",mpol=%s", buffer); 894 seq_printf(seq, ",mpol=%s", buffer);
895} 895}
@@ -2463,7 +2463,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
2463 if (!gid_valid(sbinfo->gid)) 2463 if (!gid_valid(sbinfo->gid))
2464 goto bad_val; 2464 goto bad_val;
2465 } else if (!strcmp(this_char,"mpol")) { 2465 } else if (!strcmp(this_char,"mpol")) {
2466 if (mpol_parse_str(value, &sbinfo->mpol, 1)) 2466 if (mpol_parse_str(value, &sbinfo->mpol))
2467 goto bad_val; 2467 goto bad_val;
2468 } else { 2468 } else {
2469 printk(KERN_ERR "tmpfs: Bad mount option %s\n", 2469 printk(KERN_ERR "tmpfs: Bad mount option %s\n",
diff --git a/mm/vmscan.c b/mm/vmscan.c
index adc7e9058181..196709f5ee58 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2452,12 +2452,16 @@ static bool zone_balanced(struct zone *zone, int order,
2452} 2452}
2453 2453
2454/* 2454/*
2455 * pgdat_balanced is used when checking if a node is balanced for high-order 2455 * pgdat_balanced() is used when checking if a node is balanced.
2456 * allocations. Only zones that meet watermarks and are in a zone allowed 2456 *
2457 * by the callers classzone_idx are added to balanced_pages. The total of 2457 * For order-0, all zones must be balanced!
2458 * balanced pages must be at least 25% of the zones allowed by classzone_idx 2458 *
2459 * for the node to be considered balanced. Forcing all zones to be balanced 2459 * For high-order allocations only zones that meet watermarks and are in a
2460 * for high orders can cause excessive reclaim when there are imbalanced zones. 2460 * zone allowed by the callers classzone_idx are added to balanced_pages. The
2461 * total of balanced pages must be at least 25% of the zones allowed by
2462 * classzone_idx for the node to be considered balanced. Forcing all zones to
2463 * be balanced for high orders can cause excessive reclaim when there are
2464 * imbalanced zones.
2461 * The choice of 25% is due to 2465 * The choice of 25% is due to
2462 * o a 16M DMA zone that is balanced will not balance a zone on any 2466 * o a 16M DMA zone that is balanced will not balance a zone on any
2463 * reasonable sized machine 2467 * reasonable sized machine
@@ -2467,17 +2471,43 @@ static bool zone_balanced(struct zone *zone, int order,
2467 * Similarly, on x86-64 the Normal zone would need to be at least 1G 2471 * Similarly, on x86-64 the Normal zone would need to be at least 1G
2468 * to balance a node on its own. These seemed like reasonable ratios. 2472 * to balance a node on its own. These seemed like reasonable ratios.
2469 */ 2473 */
2470static bool pgdat_balanced(pg_data_t *pgdat, unsigned long balanced_pages, 2474static bool pgdat_balanced(pg_data_t *pgdat, int order, int classzone_idx)
2471 int classzone_idx)
2472{ 2475{
2473 unsigned long present_pages = 0; 2476 unsigned long present_pages = 0;
2477 unsigned long balanced_pages = 0;
2474 int i; 2478 int i;
2475 2479
2476 for (i = 0; i <= classzone_idx; i++) 2480 /* Check the watermark levels */
2477 present_pages += pgdat->node_zones[i].present_pages; 2481 for (i = 0; i <= classzone_idx; i++) {
2482 struct zone *zone = pgdat->node_zones + i;
2478 2483
2479 /* A special case here: if zone has no page, we think it's balanced */ 2484 if (!populated_zone(zone))
2480 return balanced_pages >= (present_pages >> 2); 2485 continue;
2486
2487 present_pages += zone->present_pages;
2488
2489 /*
2490 * A special case here:
2491 *
2492 * balance_pgdat() skips over all_unreclaimable after
2493 * DEF_PRIORITY. Effectively, it considers them balanced so
2494 * they must be considered balanced here as well!
2495 */
2496 if (zone->all_unreclaimable) {
2497 balanced_pages += zone->present_pages;
2498 continue;
2499 }
2500
2501 if (zone_balanced(zone, order, 0, i))
2502 balanced_pages += zone->present_pages;
2503 else if (!order)
2504 return false;
2505 }
2506
2507 if (order)
2508 return balanced_pages >= (present_pages >> 2);
2509 else
2510 return true;
2481} 2511}
2482 2512
2483/* 2513/*
@@ -2489,10 +2519,6 @@ static bool pgdat_balanced(pg_data_t *pgdat, unsigned long balanced_pages,
2489static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, long remaining, 2519static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, long remaining,
2490 int classzone_idx) 2520 int classzone_idx)
2491{ 2521{
2492 int i;
2493 unsigned long balanced = 0;
2494 bool all_zones_ok = true;
2495
2496 /* If a direct reclaimer woke kswapd within HZ/10, it's premature */ 2522 /* If a direct reclaimer woke kswapd within HZ/10, it's premature */
2497 if (remaining) 2523 if (remaining)
2498 return false; 2524 return false;
@@ -2511,39 +2537,7 @@ static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, long remaining,
2511 return false; 2537 return false;
2512 } 2538 }
2513 2539
2514 /* Check the watermark levels */ 2540 return pgdat_balanced(pgdat, order, classzone_idx);
2515 for (i = 0; i <= classzone_idx; i++) {
2516 struct zone *zone = pgdat->node_zones + i;
2517
2518 if (!populated_zone(zone))
2519 continue;
2520
2521 /*
2522 * balance_pgdat() skips over all_unreclaimable after
2523 * DEF_PRIORITY. Effectively, it considers them balanced so
2524 * they must be considered balanced here as well if kswapd
2525 * is to sleep
2526 */
2527 if (zone->all_unreclaimable) {
2528 balanced += zone->present_pages;
2529 continue;
2530 }
2531
2532 if (!zone_balanced(zone, order, 0, i))
2533 all_zones_ok = false;
2534 else
2535 balanced += zone->present_pages;
2536 }
2537
2538 /*
2539 * For high-order requests, the balanced zones must contain at least
2540 * 25% of the nodes pages for kswapd to sleep. For order-0, all zones
2541 * must be balanced
2542 */
2543 if (order)
2544 return pgdat_balanced(pgdat, balanced, classzone_idx);
2545 else
2546 return all_zones_ok;
2547} 2541}
2548 2542
2549/* 2543/*
@@ -2571,7 +2565,6 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
2571 int *classzone_idx) 2565 int *classzone_idx)
2572{ 2566{
2573 struct zone *unbalanced_zone; 2567 struct zone *unbalanced_zone;
2574 unsigned long balanced;
2575 int i; 2568 int i;
2576 int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */ 2569 int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */
2577 unsigned long total_scanned; 2570 unsigned long total_scanned;
@@ -2605,7 +2598,6 @@ loop_again:
2605 int has_under_min_watermark_zone = 0; 2598 int has_under_min_watermark_zone = 0;
2606 2599
2607 unbalanced_zone = NULL; 2600 unbalanced_zone = NULL;
2608 balanced = 0;
2609 2601
2610 /* 2602 /*
2611 * Scan in the highmem->dma direction for the highest 2603 * Scan in the highmem->dma direction for the highest
@@ -2761,8 +2753,6 @@ loop_again:
2761 * speculatively avoid congestion waits 2753 * speculatively avoid congestion waits
2762 */ 2754 */
2763 zone_clear_flag(zone, ZONE_CONGESTED); 2755 zone_clear_flag(zone, ZONE_CONGESTED);
2764 if (i <= *classzone_idx)
2765 balanced += zone->present_pages;
2766 } 2756 }
2767 2757
2768 } 2758 }
@@ -2776,7 +2766,7 @@ loop_again:
2776 pfmemalloc_watermark_ok(pgdat)) 2766 pfmemalloc_watermark_ok(pgdat))
2777 wake_up(&pgdat->pfmemalloc_wait); 2767 wake_up(&pgdat->pfmemalloc_wait);
2778 2768
2779 if (!unbalanced_zone || (order && pgdat_balanced(pgdat, balanced, *classzone_idx))) 2769 if (pgdat_balanced(pgdat, order, *classzone_idx))
2780 break; /* kswapd: all done */ 2770 break; /* kswapd: all done */
2781 /* 2771 /*
2782 * OK, kswapd is getting into trouble. Take a nap, then take 2772 * OK, kswapd is getting into trouble. Take a nap, then take
@@ -2785,7 +2775,7 @@ loop_again:
2785 if (total_scanned && (sc.priority < DEF_PRIORITY - 2)) { 2775 if (total_scanned && (sc.priority < DEF_PRIORITY - 2)) {
2786 if (has_under_min_watermark_zone) 2776 if (has_under_min_watermark_zone)
2787 count_vm_event(KSWAPD_SKIP_CONGESTION_WAIT); 2777 count_vm_event(KSWAPD_SKIP_CONGESTION_WAIT);
2788 else 2778 else if (unbalanced_zone)
2789 wait_iff_congested(unbalanced_zone, BLK_RW_ASYNC, HZ/10); 2779 wait_iff_congested(unbalanced_zone, BLK_RW_ASYNC, HZ/10);
2790 } 2780 }
2791 2781
@@ -2800,12 +2790,7 @@ loop_again:
2800 } while (--sc.priority >= 0); 2790 } while (--sc.priority >= 0);
2801out: 2791out:
2802 2792
2803 /* 2793 if (!pgdat_balanced(pgdat, order, *classzone_idx)) {
2804 * order-0: All zones must meet high watermark for a balanced node
2805 * high-order: Balanced zones must make up at least 25% of the node
2806 * for the node to be balanced
2807 */
2808 if (unbalanced_zone && (!order || !pgdat_balanced(pgdat, balanced, *classzone_idx))) {
2809 cond_resched(); 2794 cond_resched();
2810 2795
2811 try_to_freeze(); 2796 try_to_freeze();
@@ -3137,8 +3122,8 @@ unsigned long shrink_all_memory(unsigned long nr_to_reclaim)
3137 not required for correctness. So if the last cpu in a node goes 3122 not required for correctness. So if the last cpu in a node goes
3138 away, we get changed to run anywhere: as the first one comes back, 3123 away, we get changed to run anywhere: as the first one comes back,
3139 restore their cpu bindings. */ 3124 restore their cpu bindings. */
3140static int __devinit cpu_callback(struct notifier_block *nfb, 3125static int cpu_callback(struct notifier_block *nfb, unsigned long action,
3141 unsigned long action, void *hcpu) 3126 void *hcpu)
3142{ 3127{
3143 int nid; 3128 int nid;
3144 3129
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 9f3925a85aab..7d02ebd11a7f 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -123,7 +123,7 @@ batadv_iv_ogm_emit_send_time(const struct batadv_priv *bat_priv)
123 unsigned int msecs; 123 unsigned int msecs;
124 124
125 msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER; 125 msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER;
126 msecs += (random32() % 2 * BATADV_JITTER); 126 msecs += random32() % (2 * BATADV_JITTER);
127 127
128 return jiffies + msecs_to_jiffies(msecs); 128 return jiffies + msecs_to_jiffies(msecs);
129} 129}
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 1c8fdc3558cd..37fe693471a8 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -366,11 +366,11 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
366 366
367 err = netdev_set_master(dev, br->dev); 367 err = netdev_set_master(dev, br->dev);
368 if (err) 368 if (err)
369 goto err3; 369 goto err4;
370 370
371 err = netdev_rx_handler_register(dev, br_handle_frame, p); 371 err = netdev_rx_handler_register(dev, br_handle_frame, p);
372 if (err) 372 if (err)
373 goto err4; 373 goto err5;
374 374
375 dev->priv_flags |= IFF_BRIDGE_PORT; 375 dev->priv_flags |= IFF_BRIDGE_PORT;
376 376
@@ -402,8 +402,10 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
402 402
403 return 0; 403 return 0;
404 404
405err4: 405err5:
406 netdev_set_master(dev, NULL); 406 netdev_set_master(dev, NULL);
407err4:
408 br_netpoll_disable(p);
407err3: 409err3:
408 sysfs_remove_link(br->ifobj, p->dev->name); 410 sysfs_remove_link(br->ifobj, p->dev->name);
409err2: 411err2:
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 5391ca43336a..6d6f26531de2 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1608,7 +1608,6 @@ void br_multicast_init(struct net_bridge *br)
1608 br_multicast_querier_expired, (unsigned long)br); 1608 br_multicast_querier_expired, (unsigned long)br);
1609 setup_timer(&br->multicast_query_timer, br_multicast_query_expired, 1609 setup_timer(&br->multicast_query_timer, br_multicast_query_expired,
1610 (unsigned long)br); 1610 (unsigned long)br);
1611 br_mdb_init();
1612} 1611}
1613 1612
1614void br_multicast_open(struct net_bridge *br) 1613void br_multicast_open(struct net_bridge *br)
@@ -1633,7 +1632,6 @@ void br_multicast_stop(struct net_bridge *br)
1633 del_timer_sync(&br->multicast_querier_timer); 1632 del_timer_sync(&br->multicast_querier_timer);
1634 del_timer_sync(&br->multicast_query_timer); 1633 del_timer_sync(&br->multicast_query_timer);
1635 1634
1636 br_mdb_uninit();
1637 spin_lock_bh(&br->multicast_lock); 1635 spin_lock_bh(&br->multicast_lock);
1638 mdb = mlock_dereference(br->mdb, br); 1636 mdb = mlock_dereference(br->mdb, br);
1639 if (!mdb) 1637 if (!mdb)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 97ba0189c6f7..5dc66abcc9e2 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -299,10 +299,21 @@ struct rtnl_link_ops br_link_ops __read_mostly = {
299 299
300int __init br_netlink_init(void) 300int __init br_netlink_init(void)
301{ 301{
302 return rtnl_link_register(&br_link_ops); 302 int err;
303
304 br_mdb_init();
305 err = rtnl_link_register(&br_link_ops);
306 if (err)
307 goto out;
308
309 return 0;
310out:
311 br_mdb_uninit();
312 return err;
303} 313}
304 314
305void __exit br_netlink_fini(void) 315void __exit br_netlink_fini(void)
306{ 316{
317 br_mdb_uninit();
307 rtnl_link_unregister(&br_link_ops); 318 rtnl_link_unregister(&br_link_ops);
308} 319}
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 8d83be5ffedc..711094aed41a 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -526,6 +526,12 @@ static inline bool br_multicast_is_router(struct net_bridge *br)
526{ 526{
527 return 0; 527 return 0;
528} 528}
529static inline void br_mdb_init(void)
530{
531}
532static inline void br_mdb_uninit(void)
533{
534}
529#endif 535#endif
530 536
531/* br_netfilter.c */ 537/* br_netfilter.c */
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 4d111fd2b492..5ccf87ed8d68 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -506,6 +506,7 @@ static void reset_connection(struct ceph_connection *con)
506{ 506{
507 /* reset connection, out_queue, msg_ and connect_seq */ 507 /* reset connection, out_queue, msg_ and connect_seq */
508 /* discard existing out_queue and msg_seq */ 508 /* discard existing out_queue and msg_seq */
509 dout("reset_connection %p\n", con);
509 ceph_msg_remove_list(&con->out_queue); 510 ceph_msg_remove_list(&con->out_queue);
510 ceph_msg_remove_list(&con->out_sent); 511 ceph_msg_remove_list(&con->out_sent);
511 512
@@ -561,7 +562,7 @@ void ceph_con_open(struct ceph_connection *con,
561 mutex_lock(&con->mutex); 562 mutex_lock(&con->mutex);
562 dout("con_open %p %s\n", con, ceph_pr_addr(&addr->in_addr)); 563 dout("con_open %p %s\n", con, ceph_pr_addr(&addr->in_addr));
563 564
564 BUG_ON(con->state != CON_STATE_CLOSED); 565 WARN_ON(con->state != CON_STATE_CLOSED);
565 con->state = CON_STATE_PREOPEN; 566 con->state = CON_STATE_PREOPEN;
566 567
567 con->peer_name.type = (__u8) entity_type; 568 con->peer_name.type = (__u8) entity_type;
@@ -1506,13 +1507,6 @@ static int process_banner(struct ceph_connection *con)
1506 return 0; 1507 return 0;
1507} 1508}
1508 1509
1509static void fail_protocol(struct ceph_connection *con)
1510{
1511 reset_connection(con);
1512 BUG_ON(con->state != CON_STATE_NEGOTIATING);
1513 con->state = CON_STATE_CLOSED;
1514}
1515
1516static int process_connect(struct ceph_connection *con) 1510static int process_connect(struct ceph_connection *con)
1517{ 1511{
1518 u64 sup_feat = con->msgr->supported_features; 1512 u64 sup_feat = con->msgr->supported_features;
@@ -1530,7 +1524,7 @@ static int process_connect(struct ceph_connection *con)
1530 ceph_pr_addr(&con->peer_addr.in_addr), 1524 ceph_pr_addr(&con->peer_addr.in_addr),
1531 sup_feat, server_feat, server_feat & ~sup_feat); 1525 sup_feat, server_feat, server_feat & ~sup_feat);
1532 con->error_msg = "missing required protocol features"; 1526 con->error_msg = "missing required protocol features";
1533 fail_protocol(con); 1527 reset_connection(con);
1534 return -1; 1528 return -1;
1535 1529
1536 case CEPH_MSGR_TAG_BADPROTOVER: 1530 case CEPH_MSGR_TAG_BADPROTOVER:
@@ -1541,7 +1535,7 @@ static int process_connect(struct ceph_connection *con)
1541 le32_to_cpu(con->out_connect.protocol_version), 1535 le32_to_cpu(con->out_connect.protocol_version),
1542 le32_to_cpu(con->in_reply.protocol_version)); 1536 le32_to_cpu(con->in_reply.protocol_version));
1543 con->error_msg = "protocol version mismatch"; 1537 con->error_msg = "protocol version mismatch";
1544 fail_protocol(con); 1538 reset_connection(con);
1545 return -1; 1539 return -1;
1546 1540
1547 case CEPH_MSGR_TAG_BADAUTHORIZER: 1541 case CEPH_MSGR_TAG_BADAUTHORIZER:
@@ -1631,11 +1625,11 @@ static int process_connect(struct ceph_connection *con)
1631 ceph_pr_addr(&con->peer_addr.in_addr), 1625 ceph_pr_addr(&con->peer_addr.in_addr),
1632 req_feat, server_feat, req_feat & ~server_feat); 1626 req_feat, server_feat, req_feat & ~server_feat);
1633 con->error_msg = "missing required protocol features"; 1627 con->error_msg = "missing required protocol features";
1634 fail_protocol(con); 1628 reset_connection(con);
1635 return -1; 1629 return -1;
1636 } 1630 }
1637 1631
1638 BUG_ON(con->state != CON_STATE_NEGOTIATING); 1632 WARN_ON(con->state != CON_STATE_NEGOTIATING);
1639 con->state = CON_STATE_OPEN; 1633 con->state = CON_STATE_OPEN;
1640 1634
1641 con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq); 1635 con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq);
@@ -2132,7 +2126,6 @@ more:
2132 if (ret < 0) 2126 if (ret < 0)
2133 goto out; 2127 goto out;
2134 2128
2135 BUG_ON(con->state != CON_STATE_CONNECTING);
2136 con->state = CON_STATE_NEGOTIATING; 2129 con->state = CON_STATE_NEGOTIATING;
2137 2130
2138 /* 2131 /*
@@ -2160,7 +2153,7 @@ more:
2160 goto more; 2153 goto more;
2161 } 2154 }
2162 2155
2163 BUG_ON(con->state != CON_STATE_OPEN); 2156 WARN_ON(con->state != CON_STATE_OPEN);
2164 2157
2165 if (con->in_base_pos < 0) { 2158 if (con->in_base_pos < 0) {
2166 /* 2159 /*
@@ -2382,7 +2375,7 @@ static void ceph_fault(struct ceph_connection *con)
2382 dout("fault %p state %lu to peer %s\n", 2375 dout("fault %p state %lu to peer %s\n",
2383 con, con->state, ceph_pr_addr(&con->peer_addr.in_addr)); 2376 con, con->state, ceph_pr_addr(&con->peer_addr.in_addr));
2384 2377
2385 BUG_ON(con->state != CON_STATE_CONNECTING && 2378 WARN_ON(con->state != CON_STATE_CONNECTING &&
2386 con->state != CON_STATE_NEGOTIATING && 2379 con->state != CON_STATE_NEGOTIATING &&
2387 con->state != CON_STATE_OPEN); 2380 con->state != CON_STATE_OPEN);
2388 2381
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 780caf6b0491..eb9a44478764 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1270,7 +1270,7 @@ static void reset_changed_osds(struct ceph_osd_client *osdc)
1270 * Requeue requests whose mapping to an OSD has changed. If requests map to 1270 * Requeue requests whose mapping to an OSD has changed. If requests map to
1271 * no osd, request a new map. 1271 * no osd, request a new map.
1272 * 1272 *
1273 * Caller should hold map_sem for read and request_mutex. 1273 * Caller should hold map_sem for read.
1274 */ 1274 */
1275static void kick_requests(struct ceph_osd_client *osdc, int force_resend) 1275static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
1276{ 1276{
@@ -1284,6 +1284,24 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
1284 for (p = rb_first(&osdc->requests); p; ) { 1284 for (p = rb_first(&osdc->requests); p; ) {
1285 req = rb_entry(p, struct ceph_osd_request, r_node); 1285 req = rb_entry(p, struct ceph_osd_request, r_node);
1286 p = rb_next(p); 1286 p = rb_next(p);
1287
1288 /*
1289 * For linger requests that have not yet been
1290 * registered, move them to the linger list; they'll
1291 * be sent to the osd in the loop below. Unregister
1292 * the request before re-registering it as a linger
1293 * request to ensure the __map_request() below
1294 * will decide it needs to be sent.
1295 */
1296 if (req->r_linger && list_empty(&req->r_linger_item)) {
1297 dout("%p tid %llu restart on osd%d\n",
1298 req, req->r_tid,
1299 req->r_osd ? req->r_osd->o_osd : -1);
1300 __unregister_request(osdc, req);
1301 __register_linger_request(osdc, req);
1302 continue;
1303 }
1304
1287 err = __map_request(osdc, req, force_resend); 1305 err = __map_request(osdc, req, force_resend);
1288 if (err < 0) 1306 if (err < 0)
1289 continue; /* error */ 1307 continue; /* error */
@@ -1298,17 +1316,6 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
1298 req->r_flags |= CEPH_OSD_FLAG_RETRY; 1316 req->r_flags |= CEPH_OSD_FLAG_RETRY;
1299 } 1317 }
1300 } 1318 }
1301 if (req->r_linger && list_empty(&req->r_linger_item)) {
1302 /*
1303 * register as a linger so that we will
1304 * re-submit below and get a new tid
1305 */
1306 dout("%p tid %llu restart on osd%d\n",
1307 req, req->r_tid,
1308 req->r_osd ? req->r_osd->o_osd : -1);
1309 __register_linger_request(osdc, req);
1310 __unregister_request(osdc, req);
1311 }
1312 } 1319 }
1313 1320
1314 list_for_each_entry_safe(req, nreq, &osdc->req_linger, 1321 list_for_each_entry_safe(req, nreq, &osdc->req_linger,
@@ -1316,6 +1323,7 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
1316 dout("linger req=%p req->r_osd=%p\n", req, req->r_osd); 1323 dout("linger req=%p req->r_osd=%p\n", req, req->r_osd);
1317 1324
1318 err = __map_request(osdc, req, force_resend); 1325 err = __map_request(osdc, req, force_resend);
1326 dout("__map_request returned %d\n", err);
1319 if (err == 0) 1327 if (err == 0)
1320 continue; /* no change and no osd was specified */ 1328 continue; /* no change and no osd was specified */
1321 if (err < 0) 1329 if (err < 0)
@@ -1337,6 +1345,7 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
1337 dout("%d requests for down osds, need new map\n", needmap); 1345 dout("%d requests for down osds, need new map\n", needmap);
1338 ceph_monc_request_next_osdmap(&osdc->client->monc); 1346 ceph_monc_request_next_osdmap(&osdc->client->monc);
1339 } 1347 }
1348 reset_changed_osds(osdc);
1340} 1349}
1341 1350
1342 1351
@@ -1393,7 +1402,6 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
1393 osdc->osdmap = newmap; 1402 osdc->osdmap = newmap;
1394 } 1403 }
1395 kick_requests(osdc, 0); 1404 kick_requests(osdc, 0);
1396 reset_changed_osds(osdc);
1397 } else { 1405 } else {
1398 dout("ignoring incremental map %u len %d\n", 1406 dout("ignoring incremental map %u len %d\n",
1399 epoch, maplen); 1407 epoch, maplen);
diff --git a/net/core/dev.c b/net/core/dev.c
index d0cbc93fcf32..515473ee52cb 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -203,7 +203,7 @@ static struct list_head offload_base __read_mostly;
203DEFINE_RWLOCK(dev_base_lock); 203DEFINE_RWLOCK(dev_base_lock);
204EXPORT_SYMBOL(dev_base_lock); 204EXPORT_SYMBOL(dev_base_lock);
205 205
206DEFINE_SEQLOCK(devnet_rename_seq); 206seqcount_t devnet_rename_seq;
207 207
208static inline void dev_base_seq_inc(struct net *net) 208static inline void dev_base_seq_inc(struct net *net)
209{ 209{
@@ -1093,10 +1093,10 @@ int dev_change_name(struct net_device *dev, const char *newname)
1093 if (dev->flags & IFF_UP) 1093 if (dev->flags & IFF_UP)
1094 return -EBUSY; 1094 return -EBUSY;
1095 1095
1096 write_seqlock(&devnet_rename_seq); 1096 write_seqcount_begin(&devnet_rename_seq);
1097 1097
1098 if (strncmp(newname, dev->name, IFNAMSIZ) == 0) { 1098 if (strncmp(newname, dev->name, IFNAMSIZ) == 0) {
1099 write_sequnlock(&devnet_rename_seq); 1099 write_seqcount_end(&devnet_rename_seq);
1100 return 0; 1100 return 0;
1101 } 1101 }
1102 1102
@@ -1104,7 +1104,7 @@ int dev_change_name(struct net_device *dev, const char *newname)
1104 1104
1105 err = dev_get_valid_name(net, dev, newname); 1105 err = dev_get_valid_name(net, dev, newname);
1106 if (err < 0) { 1106 if (err < 0) {
1107 write_sequnlock(&devnet_rename_seq); 1107 write_seqcount_end(&devnet_rename_seq);
1108 return err; 1108 return err;
1109 } 1109 }
1110 1110
@@ -1112,11 +1112,11 @@ rollback:
1112 ret = device_rename(&dev->dev, dev->name); 1112 ret = device_rename(&dev->dev, dev->name);
1113 if (ret) { 1113 if (ret) {
1114 memcpy(dev->name, oldname, IFNAMSIZ); 1114 memcpy(dev->name, oldname, IFNAMSIZ);
1115 write_sequnlock(&devnet_rename_seq); 1115 write_seqcount_end(&devnet_rename_seq);
1116 return ret; 1116 return ret;
1117 } 1117 }
1118 1118
1119 write_sequnlock(&devnet_rename_seq); 1119 write_seqcount_end(&devnet_rename_seq);
1120 1120
1121 write_lock_bh(&dev_base_lock); 1121 write_lock_bh(&dev_base_lock);
1122 hlist_del_rcu(&dev->name_hlist); 1122 hlist_del_rcu(&dev->name_hlist);
@@ -1135,7 +1135,7 @@ rollback:
1135 /* err >= 0 after dev_alloc_name() or stores the first errno */ 1135 /* err >= 0 after dev_alloc_name() or stores the first errno */
1136 if (err >= 0) { 1136 if (err >= 0) {
1137 err = ret; 1137 err = ret;
1138 write_seqlock(&devnet_rename_seq); 1138 write_seqcount_begin(&devnet_rename_seq);
1139 memcpy(dev->name, oldname, IFNAMSIZ); 1139 memcpy(dev->name, oldname, IFNAMSIZ);
1140 goto rollback; 1140 goto rollback;
1141 } else { 1141 } else {
@@ -4180,7 +4180,7 @@ static int dev_ifname(struct net *net, struct ifreq __user *arg)
4180 return -EFAULT; 4180 return -EFAULT;
4181 4181
4182retry: 4182retry:
4183 seq = read_seqbegin(&devnet_rename_seq); 4183 seq = read_seqcount_begin(&devnet_rename_seq);
4184 rcu_read_lock(); 4184 rcu_read_lock();
4185 dev = dev_get_by_index_rcu(net, ifr.ifr_ifindex); 4185 dev = dev_get_by_index_rcu(net, ifr.ifr_ifindex);
4186 if (!dev) { 4186 if (!dev) {
@@ -4190,7 +4190,7 @@ retry:
4190 4190
4191 strcpy(ifr.ifr_name, dev->name); 4191 strcpy(ifr.ifr_name, dev->name);
4192 rcu_read_unlock(); 4192 rcu_read_unlock();
4193 if (read_seqretry(&devnet_rename_seq, seq)) 4193 if (read_seqcount_retry(&devnet_rename_seq, seq))
4194 goto retry; 4194 goto retry;
4195 4195
4196 if (copy_to_user(arg, &ifr, sizeof(struct ifreq))) 4196 if (copy_to_user(arg, &ifr, sizeof(struct ifreq)))
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 334efd5d67a9..28c5f5aa7ca7 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1334,7 +1334,6 @@ struct kobj_ns_type_operations net_ns_type_operations = {
1334}; 1334};
1335EXPORT_SYMBOL_GPL(net_ns_type_operations); 1335EXPORT_SYMBOL_GPL(net_ns_type_operations);
1336 1336
1337#ifdef CONFIG_HOTPLUG
1338static int netdev_uevent(struct device *d, struct kobj_uevent_env *env) 1337static int netdev_uevent(struct device *d, struct kobj_uevent_env *env)
1339{ 1338{
1340 struct net_device *dev = to_net_dev(d); 1339 struct net_device *dev = to_net_dev(d);
@@ -1353,7 +1352,6 @@ static int netdev_uevent(struct device *d, struct kobj_uevent_env *env)
1353exit: 1352exit:
1354 return retval; 1353 return retval;
1355} 1354}
1356#endif
1357 1355
1358/* 1356/*
1359 * netdev_release -- destroy and free a dead device. 1357 * netdev_release -- destroy and free a dead device.
@@ -1382,9 +1380,7 @@ static struct class net_class = {
1382#ifdef CONFIG_SYSFS 1380#ifdef CONFIG_SYSFS
1383 .dev_attrs = net_class_attributes, 1381 .dev_attrs = net_class_attributes,
1384#endif /* CONFIG_SYSFS */ 1382#endif /* CONFIG_SYSFS */
1385#ifdef CONFIG_HOTPLUG
1386 .dev_uevent = netdev_uevent, 1383 .dev_uevent = netdev_uevent,
1387#endif
1388 .ns_type = &net_ns_type_operations, 1384 .ns_type = &net_ns_type_operations,
1389 .namespace = net_namespace, 1385 .namespace = net_namespace,
1390}; 1386};
diff --git a/net/core/sock.c b/net/core/sock.c
index a692ef49c9bb..bc131d419683 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -583,7 +583,7 @@ static int sock_getbindtodevice(struct sock *sk, char __user *optval,
583 goto out; 583 goto out;
584 584
585retry: 585retry:
586 seq = read_seqbegin(&devnet_rename_seq); 586 seq = read_seqcount_begin(&devnet_rename_seq);
587 rcu_read_lock(); 587 rcu_read_lock();
588 dev = dev_get_by_index_rcu(net, sk->sk_bound_dev_if); 588 dev = dev_get_by_index_rcu(net, sk->sk_bound_dev_if);
589 ret = -ENODEV; 589 ret = -ENODEV;
@@ -594,7 +594,7 @@ retry:
594 594
595 strcpy(devname, dev->name); 595 strcpy(devname, dev->name);
596 rcu_read_unlock(); 596 rcu_read_unlock();
597 if (read_seqretry(&devnet_rename_seq, seq)) 597 if (read_seqcount_retry(&devnet_rename_seq, seq))
598 goto retry; 598 goto retry;
599 599
600 len = strlen(devname) + 1; 600 len = strlen(devname) + 1;
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index ce6fbdfd40b8..9547a273b9e9 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -321,7 +321,7 @@ static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb)
321static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) 321static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
322{ 322{
323 __be32 saddr = 0; 323 __be32 saddr = 0;
324 u8 *dst_ha = NULL; 324 u8 dst_ha[MAX_ADDR_LEN], *dst_hw = NULL;
325 struct net_device *dev = neigh->dev; 325 struct net_device *dev = neigh->dev;
326 __be32 target = *(__be32 *)neigh->primary_key; 326 __be32 target = *(__be32 *)neigh->primary_key;
327 int probes = atomic_read(&neigh->probes); 327 int probes = atomic_read(&neigh->probes);
@@ -363,8 +363,8 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
363 if (probes < 0) { 363 if (probes < 0) {
364 if (!(neigh->nud_state & NUD_VALID)) 364 if (!(neigh->nud_state & NUD_VALID))
365 pr_debug("trying to ucast probe in NUD_INVALID\n"); 365 pr_debug("trying to ucast probe in NUD_INVALID\n");
366 dst_ha = neigh->ha; 366 neigh_ha_snapshot(dst_ha, neigh, dev);
367 read_lock_bh(&neigh->lock); 367 dst_hw = dst_ha;
368 } else { 368 } else {
369 probes -= neigh->parms->app_probes; 369 probes -= neigh->parms->app_probes;
370 if (probes < 0) { 370 if (probes < 0) {
@@ -376,9 +376,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
376 } 376 }
377 377
378 arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr, 378 arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr,
379 dst_ha, dev->dev_addr, NULL); 379 dst_hw, dev->dev_addr, NULL);
380 if (dst_ha)
381 read_unlock_bh(&neigh->lock);
382} 380}
383 381
384static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip) 382static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index cc06a47f1216..a8e4f2665d5e 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -823,9 +823,9 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
823 if (!ifa) { 823 if (!ifa) {
824 ret = -ENOBUFS; 824 ret = -ENOBUFS;
825 ifa = inet_alloc_ifa(); 825 ifa = inet_alloc_ifa();
826 INIT_HLIST_NODE(&ifa->hash);
827 if (!ifa) 826 if (!ifa)
828 break; 827 break;
828 INIT_HLIST_NODE(&ifa->hash);
829 if (colon) 829 if (colon)
830 memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); 830 memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
831 else 831 else
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index a85ae2f7a21c..303012adf9e6 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -750,6 +750,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
750 int gre_hlen; 750 int gre_hlen;
751 __be32 dst; 751 __be32 dst;
752 int mtu; 752 int mtu;
753 u8 ttl;
753 754
754 if (skb->ip_summed == CHECKSUM_PARTIAL && 755 if (skb->ip_summed == CHECKSUM_PARTIAL &&
755 skb_checksum_help(skb)) 756 skb_checksum_help(skb))
@@ -760,7 +761,10 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
760 761
761 if (dev->header_ops && dev->type == ARPHRD_IPGRE) { 762 if (dev->header_ops && dev->type == ARPHRD_IPGRE) {
762 gre_hlen = 0; 763 gre_hlen = 0;
763 tiph = (const struct iphdr *)skb->data; 764 if (skb->protocol == htons(ETH_P_IP))
765 tiph = (const struct iphdr *)skb->data;
766 else
767 tiph = &tunnel->parms.iph;
764 } else { 768 } else {
765 gre_hlen = tunnel->hlen; 769 gre_hlen = tunnel->hlen;
766 tiph = &tunnel->parms.iph; 770 tiph = &tunnel->parms.iph;
@@ -812,6 +816,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
812 goto tx_error; 816 goto tx_error;
813 } 817 }
814 818
819 ttl = tiph->ttl;
815 tos = tiph->tos; 820 tos = tiph->tos;
816 if (tos == 1) { 821 if (tos == 1) {
817 tos = 0; 822 tos = 0;
@@ -904,11 +909,12 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
904 dev_kfree_skb(skb); 909 dev_kfree_skb(skb);
905 skb = new_skb; 910 skb = new_skb;
906 old_iph = ip_hdr(skb); 911 old_iph = ip_hdr(skb);
912 /* Warning : tiph value might point to freed memory */
907 } 913 }
908 914
909 skb_reset_transport_header(skb);
910 skb_push(skb, gre_hlen); 915 skb_push(skb, gre_hlen);
911 skb_reset_network_header(skb); 916 skb_reset_network_header(skb);
917 skb_set_transport_header(skb, sizeof(*iph));
912 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); 918 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
913 IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | 919 IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED |
914 IPSKB_REROUTED); 920 IPSKB_REROUTED);
@@ -927,8 +933,9 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
927 iph->tos = ipgre_ecn_encapsulate(tos, old_iph, skb); 933 iph->tos = ipgre_ecn_encapsulate(tos, old_iph, skb);
928 iph->daddr = fl4.daddr; 934 iph->daddr = fl4.daddr;
929 iph->saddr = fl4.saddr; 935 iph->saddr = fl4.saddr;
936 iph->ttl = ttl;
930 937
931 if ((iph->ttl = tiph->ttl) == 0) { 938 if (ttl == 0) {
932 if (skb->protocol == htons(ETH_P_IP)) 939 if (skb->protocol == htons(ETH_P_IP))
933 iph->ttl = old_iph->ttl; 940 iph->ttl = old_iph->ttl;
934#if IS_ENABLED(CONFIG_IPV6) 941#if IS_ENABLED(CONFIG_IPV6)
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index d763701cff1b..a2e50ae80b53 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -136,6 +136,8 @@ __be32 ic_myaddr = NONE; /* My IP address */
136static __be32 ic_netmask = NONE; /* Netmask for local subnet */ 136static __be32 ic_netmask = NONE; /* Netmask for local subnet */
137__be32 ic_gateway = NONE; /* Gateway IP address */ 137__be32 ic_gateway = NONE; /* Gateway IP address */
138 138
139__be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */
140
139__be32 ic_servaddr = NONE; /* Boot server IP address */ 141__be32 ic_servaddr = NONE; /* Boot server IP address */
140 142
141__be32 root_server_addr = NONE; /* Address of NFS server */ 143__be32 root_server_addr = NONE; /* Address of NFS server */
@@ -558,6 +560,7 @@ ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
558 if (ic_myaddr == NONE) 560 if (ic_myaddr == NONE)
559 ic_myaddr = tip; 561 ic_myaddr = tip;
560 ic_servaddr = sip; 562 ic_servaddr = sip;
563 ic_addrservaddr = sip;
561 ic_got_reply = IC_RARP; 564 ic_got_reply = IC_RARP;
562 565
563drop_unlock: 566drop_unlock:
@@ -1068,7 +1071,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
1068 ic_servaddr = server_id; 1071 ic_servaddr = server_id;
1069#ifdef IPCONFIG_DEBUG 1072#ifdef IPCONFIG_DEBUG
1070 printk("DHCP: Offered address %pI4 by server %pI4\n", 1073 printk("DHCP: Offered address %pI4 by server %pI4\n",
1071 &ic_myaddr, &ic_servaddr); 1074 &ic_myaddr, &b->iph.saddr);
1072#endif 1075#endif
1073 /* The DHCP indicated server address takes 1076 /* The DHCP indicated server address takes
1074 * precedence over the bootp header one if 1077 * precedence over the bootp header one if
@@ -1113,6 +1116,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
1113 ic_dev = dev; 1116 ic_dev = dev;
1114 ic_myaddr = b->your_ip; 1117 ic_myaddr = b->your_ip;
1115 ic_servaddr = b->server_ip; 1118 ic_servaddr = b->server_ip;
1119 ic_addrservaddr = b->iph.saddr;
1116 if (ic_gateway == NONE && b->relay_ip) 1120 if (ic_gateway == NONE && b->relay_ip)
1117 ic_gateway = b->relay_ip; 1121 ic_gateway = b->relay_ip;
1118 if (ic_nameservers[0] == NONE) 1122 if (ic_nameservers[0] == NONE)
@@ -1268,7 +1272,7 @@ static int __init ic_dynamic(void)
1268 printk("IP-Config: Got %s answer from %pI4, ", 1272 printk("IP-Config: Got %s answer from %pI4, ",
1269 ((ic_got_reply & IC_RARP) ? "RARP" 1273 ((ic_got_reply & IC_RARP) ? "RARP"
1270 : (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"), 1274 : (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"),
1271 &ic_servaddr); 1275 &ic_addrservaddr);
1272 pr_cont("my address is %pI4\n", &ic_myaddr); 1276 pr_cont("my address is %pI4\n", &ic_myaddr);
1273 1277
1274 return 0; 1278 return 0;
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index 51f13f8ec724..04b18c1ac345 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -81,6 +81,7 @@ static void send_reset(struct sk_buff *oldskb, int hook)
81 niph->saddr = oiph->daddr; 81 niph->saddr = oiph->daddr;
82 niph->daddr = oiph->saddr; 82 niph->daddr = oiph->saddr;
83 83
84 skb_reset_transport_header(nskb);
84 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); 85 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr));
85 memset(tcph, 0, sizeof(*tcph)); 86 memset(tcph, 0, sizeof(*tcph));
86 tcph->source = oth->dest; 87 tcph->source = oth->dest;
diff --git a/net/ipv4/netfilter/iptable_nat.c b/net/ipv4/netfilter/iptable_nat.c
index da2c8a368f68..eeaff7e4acb5 100644
--- a/net/ipv4/netfilter/iptable_nat.c
+++ b/net/ipv4/netfilter/iptable_nat.c
@@ -124,23 +124,28 @@ nf_nat_ipv4_fn(unsigned int hooknum,
124 ret = nf_nat_rule_find(skb, hooknum, in, out, ct); 124 ret = nf_nat_rule_find(skb, hooknum, in, out, ct);
125 if (ret != NF_ACCEPT) 125 if (ret != NF_ACCEPT)
126 return ret; 126 return ret;
127 } else 127 } else {
128 pr_debug("Already setup manip %s for ct %p\n", 128 pr_debug("Already setup manip %s for ct %p\n",
129 maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST", 129 maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST",
130 ct); 130 ct);
131 if (nf_nat_oif_changed(hooknum, ctinfo, nat, out))
132 goto oif_changed;
133 }
131 break; 134 break;
132 135
133 default: 136 default:
134 /* ESTABLISHED */ 137 /* ESTABLISHED */
135 NF_CT_ASSERT(ctinfo == IP_CT_ESTABLISHED || 138 NF_CT_ASSERT(ctinfo == IP_CT_ESTABLISHED ||
136 ctinfo == IP_CT_ESTABLISHED_REPLY); 139 ctinfo == IP_CT_ESTABLISHED_REPLY);
137 if (nf_nat_oif_changed(hooknum, ctinfo, nat, out)) { 140 if (nf_nat_oif_changed(hooknum, ctinfo, nat, out))
138 nf_ct_kill_acct(ct, ctinfo, skb); 141 goto oif_changed;
139 return NF_DROP;
140 }
141 } 142 }
142 143
143 return nf_nat_packet(ct, ctinfo, hooknum, skb); 144 return nf_nat_packet(ct, ctinfo, hooknum, skb);
145
146oif_changed:
147 nf_ct_kill_acct(ct, ctinfo, skb);
148 return NF_DROP;
144} 149}
145 150
146static unsigned int 151static unsigned int
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index a13692560e63..a28e4db8a952 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5543,6 +5543,9 @@ slow_path:
5543 if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb)) 5543 if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb))
5544 goto csum_error; 5544 goto csum_error;
5545 5545
5546 if (!th->ack)
5547 goto discard;
5548
5546 /* 5549 /*
5547 * Standard slow path. 5550 * Standard slow path.
5548 */ 5551 */
@@ -5551,7 +5554,7 @@ slow_path:
5551 return 0; 5554 return 0;
5552 5555
5553step5: 5556step5:
5554 if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0) 5557 if (tcp_ack(sk, skb, FLAG_SLOWPATH) < 0)
5555 goto discard; 5558 goto discard;
5556 5559
5557 /* ts_recent update must be made after we are sure that the packet 5560 /* ts_recent update must be made after we are sure that the packet
@@ -5984,11 +5987,15 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
5984 if (tcp_check_req(sk, skb, req, NULL, true) == NULL) 5987 if (tcp_check_req(sk, skb, req, NULL, true) == NULL)
5985 goto discard; 5988 goto discard;
5986 } 5989 }
5990
5991 if (!th->ack)
5992 goto discard;
5993
5987 if (!tcp_validate_incoming(sk, skb, th, 0)) 5994 if (!tcp_validate_incoming(sk, skb, th, 0))
5988 return 0; 5995 return 0;
5989 5996
5990 /* step 5: check the ACK field */ 5997 /* step 5: check the ACK field */
5991 if (th->ack) { 5998 if (true) {
5992 int acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH) > 0; 5999 int acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH) > 0;
5993 6000
5994 switch (sk->sk_state) { 6001 switch (sk->sk_state) {
@@ -6138,8 +6145,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
6138 } 6145 }
6139 break; 6146 break;
6140 } 6147 }
6141 } else 6148 }
6142 goto discard;
6143 6149
6144 /* ts_recent update must be made after we are sure that the packet 6150 /* ts_recent update must be made after we are sure that the packet
6145 * is in window. 6151 * is in window.
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 867466c96aac..c727e4712751 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -758,8 +758,6 @@ static netdev_tx_t ip6gre_xmit2(struct sk_buff *skb,
758 skb_dst_set_noref(skb, dst); 758 skb_dst_set_noref(skb, dst);
759 } 759 }
760 760
761 skb->transport_header = skb->network_header;
762
763 proto = NEXTHDR_GRE; 761 proto = NEXTHDR_GRE;
764 if (encap_limit >= 0) { 762 if (encap_limit >= 0) {
765 init_tel_txopt(&opt, encap_limit); 763 init_tel_txopt(&opt, encap_limit);
@@ -768,6 +766,7 @@ static netdev_tx_t ip6gre_xmit2(struct sk_buff *skb,
768 766
769 skb_push(skb, gre_hlen); 767 skb_push(skb, gre_hlen);
770 skb_reset_network_header(skb); 768 skb_reset_network_header(skb);
769 skb_set_transport_header(skb, sizeof(*ipv6h));
771 770
772 /* 771 /*
773 * Push down and install the IP header. 772 * Push down and install the IP header.
diff --git a/net/ipv6/netfilter/ip6t_NPT.c b/net/ipv6/netfilter/ip6t_NPT.c
index e9486915eff6..7302b0b7b642 100644
--- a/net/ipv6/netfilter/ip6t_NPT.c
+++ b/net/ipv6/netfilter/ip6t_NPT.c
@@ -14,42 +14,23 @@
14#include <linux/netfilter_ipv6/ip6t_NPT.h> 14#include <linux/netfilter_ipv6/ip6t_NPT.h>
15#include <linux/netfilter/x_tables.h> 15#include <linux/netfilter/x_tables.h>
16 16
17static __sum16 csum16_complement(__sum16 a)
18{
19 return (__force __sum16)(0xffff - (__force u16)a);
20}
21
22static __sum16 csum16_add(__sum16 a, __sum16 b)
23{
24 u16 sum;
25
26 sum = (__force u16)a + (__force u16)b;
27 sum += (__force u16)a < (__force u16)b;
28 return (__force __sum16)sum;
29}
30
31static __sum16 csum16_sub(__sum16 a, __sum16 b)
32{
33 return csum16_add(a, csum16_complement(b));
34}
35
36static int ip6t_npt_checkentry(const struct xt_tgchk_param *par) 17static int ip6t_npt_checkentry(const struct xt_tgchk_param *par)
37{ 18{
38 struct ip6t_npt_tginfo *npt = par->targinfo; 19 struct ip6t_npt_tginfo *npt = par->targinfo;
39 __sum16 src_sum = 0, dst_sum = 0; 20 __wsum src_sum = 0, dst_sum = 0;
40 unsigned int i; 21 unsigned int i;
41 22
42 if (npt->src_pfx_len > 64 || npt->dst_pfx_len > 64) 23 if (npt->src_pfx_len > 64 || npt->dst_pfx_len > 64)
43 return -EINVAL; 24 return -EINVAL;
44 25
45 for (i = 0; i < ARRAY_SIZE(npt->src_pfx.in6.s6_addr16); i++) { 26 for (i = 0; i < ARRAY_SIZE(npt->src_pfx.in6.s6_addr16); i++) {
46 src_sum = csum16_add(src_sum, 27 src_sum = csum_add(src_sum,
47 (__force __sum16)npt->src_pfx.in6.s6_addr16[i]); 28 (__force __wsum)npt->src_pfx.in6.s6_addr16[i]);
48 dst_sum = csum16_add(dst_sum, 29 dst_sum = csum_add(dst_sum,
49 (__force __sum16)npt->dst_pfx.in6.s6_addr16[i]); 30 (__force __wsum)npt->dst_pfx.in6.s6_addr16[i]);
50 } 31 }
51 32
52 npt->adjustment = csum16_sub(src_sum, dst_sum); 33 npt->adjustment = (__force __sum16) csum_sub(src_sum, dst_sum);
53 return 0; 34 return 0;
54} 35}
55 36
@@ -85,7 +66,7 @@ static bool ip6t_npt_map_pfx(const struct ip6t_npt_tginfo *npt,
85 return false; 66 return false;
86 } 67 }
87 68
88 sum = csum16_add((__force __sum16)addr->s6_addr16[idx], 69 sum = (__force __sum16) csum_add((__force __wsum)addr->s6_addr16[idx],
89 npt->adjustment); 70 npt->adjustment);
90 if (sum == CSUM_MANGLED_0) 71 if (sum == CSUM_MANGLED_0)
91 sum = 0; 72 sum = 0;
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
index fd4fb34c51c7..029623dbd411 100644
--- a/net/ipv6/netfilter/ip6t_REJECT.c
+++ b/net/ipv6/netfilter/ip6t_REJECT.c
@@ -132,6 +132,7 @@ static void send_reset(struct net *net, struct sk_buff *oldskb)
132 ip6h->saddr = oip6h->daddr; 132 ip6h->saddr = oip6h->daddr;
133 ip6h->daddr = oip6h->saddr; 133 ip6h->daddr = oip6h->saddr;
134 134
135 skb_reset_transport_header(nskb);
135 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); 136 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr));
136 /* Truncate to length (no data) */ 137 /* Truncate to length (no data) */
137 tcph->doff = sizeof(struct tcphdr)/4; 138 tcph->doff = sizeof(struct tcphdr)/4;
diff --git a/net/ipv6/netfilter/ip6table_nat.c b/net/ipv6/netfilter/ip6table_nat.c
index 6c8ae24b85eb..e0e788d25b14 100644
--- a/net/ipv6/netfilter/ip6table_nat.c
+++ b/net/ipv6/netfilter/ip6table_nat.c
@@ -127,23 +127,28 @@ nf_nat_ipv6_fn(unsigned int hooknum,
127 ret = nf_nat_rule_find(skb, hooknum, in, out, ct); 127 ret = nf_nat_rule_find(skb, hooknum, in, out, ct);
128 if (ret != NF_ACCEPT) 128 if (ret != NF_ACCEPT)
129 return ret; 129 return ret;
130 } else 130 } else {
131 pr_debug("Already setup manip %s for ct %p\n", 131 pr_debug("Already setup manip %s for ct %p\n",
132 maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST", 132 maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST",
133 ct); 133 ct);
134 if (nf_nat_oif_changed(hooknum, ctinfo, nat, out))
135 goto oif_changed;
136 }
134 break; 137 break;
135 138
136 default: 139 default:
137 /* ESTABLISHED */ 140 /* ESTABLISHED */
138 NF_CT_ASSERT(ctinfo == IP_CT_ESTABLISHED || 141 NF_CT_ASSERT(ctinfo == IP_CT_ESTABLISHED ||
139 ctinfo == IP_CT_ESTABLISHED_REPLY); 142 ctinfo == IP_CT_ESTABLISHED_REPLY);
140 if (nf_nat_oif_changed(hooknum, ctinfo, nat, out)) { 143 if (nf_nat_oif_changed(hooknum, ctinfo, nat, out))
141 nf_ct_kill_acct(ct, ctinfo, skb); 144 goto oif_changed;
142 return NF_DROP;
143 }
144 } 145 }
145 146
146 return nf_nat_packet(ct, ctinfo, hooknum, skb); 147 return nf_nat_packet(ct, ctinfo, hooknum, skb);
148
149oif_changed:
150 nf_ct_kill_acct(ct, ctinfo, skb);
151 return NF_DROP;
147} 152}
148 153
149static unsigned int 154static unsigned int
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
index 00ee17c3e893..137e245860ab 100644
--- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
@@ -81,8 +81,8 @@ static int ipv6_get_l4proto(const struct sk_buff *skb, unsigned int nhoff,
81 } 81 }
82 protoff = ipv6_skip_exthdr(skb, extoff, &nexthdr, &frag_off); 82 protoff = ipv6_skip_exthdr(skb, extoff, &nexthdr, &frag_off);
83 /* 83 /*
84 * (protoff == skb->len) mean that the packet doesn't have no data 84 * (protoff == skb->len) means the packet has not data, just
85 * except of IPv6 & ext headers. but it's tracked anyway. - YK 85 * IPv6 and possibly extensions headers, but it is tracked anyway
86 */ 86 */
87 if (protoff < 0 || (frag_off & htons(~0x7)) != 0) { 87 if (protoff < 0 || (frag_off & htons(~0x7)) != 0) {
88 pr_debug("ip6_conntrack_core: can't find proto in pkt\n"); 88 pr_debug("ip6_conntrack_core: can't find proto in pkt\n");
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 22c8ea951185..3dacecc99065 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -311,7 +311,10 @@ found:
311 else 311 else
312 fq->q.fragments = skb; 312 fq->q.fragments = skb;
313 313
314 skb->dev = NULL; 314 if (skb->dev) {
315 fq->iif = skb->dev->ifindex;
316 skb->dev = NULL;
317 }
315 fq->q.stamp = skb->tstamp; 318 fq->q.stamp = skb->tstamp;
316 fq->q.meat += skb->len; 319 fq->q.meat += skb->len;
317 if (payload_len > fq->q.max_size) 320 if (payload_len > fq->q.max_size)
diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c
index 1191039c2b1b..199b92261e94 100644
--- a/net/mac802154/wpan.c
+++ b/net/mac802154/wpan.c
@@ -389,7 +389,7 @@ void mac802154_wpan_setup(struct net_device *dev)
389 389
390static int mac802154_process_data(struct net_device *dev, struct sk_buff *skb) 390static int mac802154_process_data(struct net_device *dev, struct sk_buff *skb)
391{ 391{
392 return netif_rx(skb); 392 return netif_rx_ni(skb);
393} 393}
394 394
395static int 395static int
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index fefa514b9917..49e96df5fbc4 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -680,6 +680,13 @@ config NETFILTER_XT_TARGET_NFQUEUE
680 680
681 To compile it as a module, choose M here. If unsure, say N. 681 To compile it as a module, choose M here. If unsure, say N.
682 682
683config NETFILTER_XT_TARGET_NOTRACK
684 tristate '"NOTRACK" target support (DEPRECATED)'
685 depends on NF_CONNTRACK
686 depends on IP_NF_RAW || IP6_NF_RAW
687 depends on NETFILTER_ADVANCED
688 select NETFILTER_XT_TARGET_CT
689
683config NETFILTER_XT_TARGET_RATEEST 690config NETFILTER_XT_TARGET_RATEEST
684 tristate '"RATEEST" target support' 691 tristate '"RATEEST" target support'
685 depends on NETFILTER_ADVANCED 692 depends on NETFILTER_ADVANCED
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 08cdc71d8e87..016d95ead930 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1526,6 +1526,7 @@ err_extend:
1526 */ 1526 */
1527#define UNCONFIRMED_NULLS_VAL ((1<<30)+0) 1527#define UNCONFIRMED_NULLS_VAL ((1<<30)+0)
1528#define DYING_NULLS_VAL ((1<<30)+1) 1528#define DYING_NULLS_VAL ((1<<30)+1)
1529#define TEMPLATE_NULLS_VAL ((1<<30)+2)
1529 1530
1530static int nf_conntrack_init_net(struct net *net) 1531static int nf_conntrack_init_net(struct net *net)
1531{ 1532{
@@ -1534,6 +1535,7 @@ static int nf_conntrack_init_net(struct net *net)
1534 atomic_set(&net->ct.count, 0); 1535 atomic_set(&net->ct.count, 0);
1535 INIT_HLIST_NULLS_HEAD(&net->ct.unconfirmed, UNCONFIRMED_NULLS_VAL); 1536 INIT_HLIST_NULLS_HEAD(&net->ct.unconfirmed, UNCONFIRMED_NULLS_VAL);
1536 INIT_HLIST_NULLS_HEAD(&net->ct.dying, DYING_NULLS_VAL); 1537 INIT_HLIST_NULLS_HEAD(&net->ct.dying, DYING_NULLS_VAL);
1538 INIT_HLIST_NULLS_HEAD(&net->ct.tmpl, TEMPLATE_NULLS_VAL);
1537 net->ct.stat = alloc_percpu(struct ip_conntrack_stat); 1539 net->ct.stat = alloc_percpu(struct ip_conntrack_stat);
1538 if (!net->ct.stat) { 1540 if (!net->ct.stat) {
1539 ret = -ENOMEM; 1541 ret = -ENOMEM;
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 4e078cd84d83..627b0e50b238 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -2624,7 +2624,7 @@ ctnetlink_create_expect(struct net *net, u16 zone,
2624 if (!help) { 2624 if (!help) {
2625 if (!cda[CTA_EXPECT_TIMEOUT]) { 2625 if (!cda[CTA_EXPECT_TIMEOUT]) {
2626 err = -EINVAL; 2626 err = -EINVAL;
2627 goto out; 2627 goto err_out;
2628 } 2628 }
2629 exp->timeout.expires = 2629 exp->timeout.expires =
2630 jiffies + ntohl(nla_get_be32(cda[CTA_EXPECT_TIMEOUT])) * HZ; 2630 jiffies + ntohl(nla_get_be32(cda[CTA_EXPECT_TIMEOUT])) * HZ;
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 9f199f2e31fa..92fd8eca0d31 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -13,6 +13,7 @@
13 */ 13 */
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/skbuff.h> 15#include <linux/skbuff.h>
16#include <linux/if_arp.h>
16#include <linux/init.h> 17#include <linux/init.h>
17#include <linux/ip.h> 18#include <linux/ip.h>
18#include <linux/ipv6.h> 19#include <linux/ipv6.h>
@@ -384,6 +385,7 @@ __build_packet_message(struct nfulnl_instance *inst,
384 struct nfgenmsg *nfmsg; 385 struct nfgenmsg *nfmsg;
385 sk_buff_data_t old_tail = inst->skb->tail; 386 sk_buff_data_t old_tail = inst->skb->tail;
386 struct sock *sk; 387 struct sock *sk;
388 const unsigned char *hwhdrp;
387 389
388 nlh = nlmsg_put(inst->skb, 0, 0, 390 nlh = nlmsg_put(inst->skb, 0, 0,
389 NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET, 391 NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET,
@@ -485,9 +487,17 @@ __build_packet_message(struct nfulnl_instance *inst,
485 if (indev && skb_mac_header_was_set(skb)) { 487 if (indev && skb_mac_header_was_set(skb)) {
486 if (nla_put_be16(inst->skb, NFULA_HWTYPE, htons(skb->dev->type)) || 488 if (nla_put_be16(inst->skb, NFULA_HWTYPE, htons(skb->dev->type)) ||
487 nla_put_be16(inst->skb, NFULA_HWLEN, 489 nla_put_be16(inst->skb, NFULA_HWLEN,
488 htons(skb->dev->hard_header_len)) || 490 htons(skb->dev->hard_header_len)))
489 nla_put(inst->skb, NFULA_HWHEADER, skb->dev->hard_header_len, 491 goto nla_put_failure;
490 skb_mac_header(skb))) 492
493 hwhdrp = skb_mac_header(skb);
494
495 if (skb->dev->type == ARPHRD_SIT)
496 hwhdrp -= ETH_HLEN;
497
498 if (hwhdrp >= skb->head &&
499 nla_put(inst->skb, NFULA_HWHEADER,
500 skb->dev->hard_header_len, hwhdrp))
491 goto nla_put_failure; 501 goto nla_put_failure;
492 } 502 }
493 503
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index ae7f5daeee43..2a0843081840 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -149,6 +149,10 @@ static int xt_ct_tg_check_v0(const struct xt_tgchk_param *par)
149 149
150 __set_bit(IPS_TEMPLATE_BIT, &ct->status); 150 __set_bit(IPS_TEMPLATE_BIT, &ct->status);
151 __set_bit(IPS_CONFIRMED_BIT, &ct->status); 151 __set_bit(IPS_CONFIRMED_BIT, &ct->status);
152
153 /* Overload tuple linked list to put us in template list. */
154 hlist_nulls_add_head_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode,
155 &par->net->ct.tmpl);
152out: 156out:
153 info->ct = ct; 157 info->ct = ct;
154 return 0; 158 return 0;
@@ -289,6 +293,10 @@ static int xt_ct_tg_check_v1(const struct xt_tgchk_param *par)
289 293
290 __set_bit(IPS_TEMPLATE_BIT, &ct->status); 294 __set_bit(IPS_TEMPLATE_BIT, &ct->status);
291 __set_bit(IPS_CONFIRMED_BIT, &ct->status); 295 __set_bit(IPS_CONFIRMED_BIT, &ct->status);
296
297 /* Overload tuple linked list to put us in template list. */
298 hlist_nulls_add_head_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode,
299 &par->net->ct.tmpl);
292out: 300out:
293 info->ct = ct; 301 info->ct = ct;
294 return 0; 302 return 0;
@@ -377,14 +385,60 @@ static struct xt_target xt_ct_tg_reg[] __read_mostly = {
377 }, 385 },
378}; 386};
379 387
388static unsigned int
389notrack_tg(struct sk_buff *skb, const struct xt_action_param *par)
390{
391 /* Previously seen (loopback)? Ignore. */
392 if (skb->nfct != NULL)
393 return XT_CONTINUE;
394
395 skb->nfct = &nf_ct_untracked_get()->ct_general;
396 skb->nfctinfo = IP_CT_NEW;
397 nf_conntrack_get(skb->nfct);
398
399 return XT_CONTINUE;
400}
401
402static int notrack_chk(const struct xt_tgchk_param *par)
403{
404 if (!par->net->xt.notrack_deprecated_warning) {
405 pr_info("netfilter: NOTRACK target is deprecated, "
406 "use CT instead or upgrade iptables\n");
407 par->net->xt.notrack_deprecated_warning = true;
408 }
409 return 0;
410}
411
412static struct xt_target notrack_tg_reg __read_mostly = {
413 .name = "NOTRACK",
414 .revision = 0,
415 .family = NFPROTO_UNSPEC,
416 .checkentry = notrack_chk,
417 .target = notrack_tg,
418 .table = "raw",
419 .me = THIS_MODULE,
420};
421
380static int __init xt_ct_tg_init(void) 422static int __init xt_ct_tg_init(void)
381{ 423{
382 return xt_register_targets(xt_ct_tg_reg, ARRAY_SIZE(xt_ct_tg_reg)); 424 int ret;
425
426 ret = xt_register_target(&notrack_tg_reg);
427 if (ret < 0)
428 return ret;
429
430 ret = xt_register_targets(xt_ct_tg_reg, ARRAY_SIZE(xt_ct_tg_reg));
431 if (ret < 0) {
432 xt_unregister_target(&notrack_tg_reg);
433 return ret;
434 }
435 return 0;
383} 436}
384 437
385static void __exit xt_ct_tg_exit(void) 438static void __exit xt_ct_tg_exit(void)
386{ 439{
387 xt_unregister_targets(xt_ct_tg_reg, ARRAY_SIZE(xt_ct_tg_reg)); 440 xt_unregister_targets(xt_ct_tg_reg, ARRAY_SIZE(xt_ct_tg_reg));
441 xt_unregister_target(&notrack_tg_reg);
388} 442}
389 443
390module_init(xt_ct_tg_init); 444module_init(xt_ct_tg_init);
@@ -394,3 +448,5 @@ MODULE_LICENSE("GPL");
394MODULE_DESCRIPTION("Xtables: connection tracking target"); 448MODULE_DESCRIPTION("Xtables: connection tracking target");
395MODULE_ALIAS("ipt_CT"); 449MODULE_ALIAS("ipt_CT");
396MODULE_ALIAS("ip6t_CT"); 450MODULE_ALIAS("ip6t_CT");
451MODULE_ALIAS("ipt_NOTRACK");
452MODULE_ALIAS("ip6t_NOTRACK");
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 26a668a84aa2..a9d7af953ceb 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -157,11 +157,22 @@ dsthash_find(const struct xt_hashlimit_htable *ht,
157/* allocate dsthash_ent, initialize dst, put in htable and lock it */ 157/* allocate dsthash_ent, initialize dst, put in htable and lock it */
158static struct dsthash_ent * 158static struct dsthash_ent *
159dsthash_alloc_init(struct xt_hashlimit_htable *ht, 159dsthash_alloc_init(struct xt_hashlimit_htable *ht,
160 const struct dsthash_dst *dst) 160 const struct dsthash_dst *dst, bool *race)
161{ 161{
162 struct dsthash_ent *ent; 162 struct dsthash_ent *ent;
163 163
164 spin_lock(&ht->lock); 164 spin_lock(&ht->lock);
165
166 /* Two or more packets may race to create the same entry in the
167 * hashtable, double check if this packet lost race.
168 */
169 ent = dsthash_find(ht, dst);
170 if (ent != NULL) {
171 spin_unlock(&ht->lock);
172 *race = true;
173 return ent;
174 }
175
165 /* initialize hash with random val at the time we allocate 176 /* initialize hash with random val at the time we allocate
166 * the first hashtable entry */ 177 * the first hashtable entry */
167 if (unlikely(!ht->rnd_initialized)) { 178 if (unlikely(!ht->rnd_initialized)) {
@@ -318,7 +329,10 @@ static void htable_destroy(struct xt_hashlimit_htable *hinfo)
318 parent = hashlimit_net->ipt_hashlimit; 329 parent = hashlimit_net->ipt_hashlimit;
319 else 330 else
320 parent = hashlimit_net->ip6t_hashlimit; 331 parent = hashlimit_net->ip6t_hashlimit;
321 remove_proc_entry(hinfo->pde->name, parent); 332
333 if(parent != NULL)
334 remove_proc_entry(hinfo->pde->name, parent);
335
322 htable_selective_cleanup(hinfo, select_all); 336 htable_selective_cleanup(hinfo, select_all);
323 vfree(hinfo); 337 vfree(hinfo);
324} 338}
@@ -585,6 +599,7 @@ hashlimit_mt(const struct sk_buff *skb, struct xt_action_param *par)
585 unsigned long now = jiffies; 599 unsigned long now = jiffies;
586 struct dsthash_ent *dh; 600 struct dsthash_ent *dh;
587 struct dsthash_dst dst; 601 struct dsthash_dst dst;
602 bool race = false;
588 u32 cost; 603 u32 cost;
589 604
590 if (hashlimit_init_dst(hinfo, &dst, skb, par->thoff) < 0) 605 if (hashlimit_init_dst(hinfo, &dst, skb, par->thoff) < 0)
@@ -593,13 +608,18 @@ hashlimit_mt(const struct sk_buff *skb, struct xt_action_param *par)
593 rcu_read_lock_bh(); 608 rcu_read_lock_bh();
594 dh = dsthash_find(hinfo, &dst); 609 dh = dsthash_find(hinfo, &dst);
595 if (dh == NULL) { 610 if (dh == NULL) {
596 dh = dsthash_alloc_init(hinfo, &dst); 611 dh = dsthash_alloc_init(hinfo, &dst, &race);
597 if (dh == NULL) { 612 if (dh == NULL) {
598 rcu_read_unlock_bh(); 613 rcu_read_unlock_bh();
599 goto hotdrop; 614 goto hotdrop;
615 } else if (race) {
616 /* Already got an entry, update expiration timeout */
617 dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire);
618 rateinfo_recalc(dh, now, hinfo->cfg.mode);
619 } else {
620 dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire);
621 rateinfo_init(dh, hinfo);
600 } 622 }
601 dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire);
602 rateinfo_init(dh, hinfo);
603 } else { 623 } else {
604 /* update expiration timeout */ 624 /* update expiration timeout */
605 dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); 625 dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire);
@@ -856,6 +876,27 @@ static int __net_init hashlimit_proc_net_init(struct net *net)
856 876
857static void __net_exit hashlimit_proc_net_exit(struct net *net) 877static void __net_exit hashlimit_proc_net_exit(struct net *net)
858{ 878{
879 struct xt_hashlimit_htable *hinfo;
880 struct hlist_node *pos;
881 struct proc_dir_entry *pde;
882 struct hashlimit_net *hashlimit_net = hashlimit_pernet(net);
883
884 /* recent_net_exit() is called before recent_mt_destroy(). Make sure
885 * that the parent xt_recent proc entry is is empty before trying to
886 * remove it.
887 */
888 mutex_lock(&hashlimit_mutex);
889 pde = hashlimit_net->ipt_hashlimit;
890 if (pde == NULL)
891 pde = hashlimit_net->ip6t_hashlimit;
892
893 hlist_for_each_entry(hinfo, pos, &hashlimit_net->htables, node)
894 remove_proc_entry(hinfo->pde->name, pde);
895
896 hashlimit_net->ipt_hashlimit = NULL;
897 hashlimit_net->ip6t_hashlimit = NULL;
898 mutex_unlock(&hashlimit_mutex);
899
859 proc_net_remove(net, "ipt_hashlimit"); 900 proc_net_remove(net, "ipt_hashlimit");
860#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) 901#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
861 proc_net_remove(net, "ip6t_hashlimit"); 902 proc_net_remove(net, "ip6t_hashlimit");
@@ -872,9 +913,6 @@ static int __net_init hashlimit_net_init(struct net *net)
872 913
873static void __net_exit hashlimit_net_exit(struct net *net) 914static void __net_exit hashlimit_net_exit(struct net *net)
874{ 915{
875 struct hashlimit_net *hashlimit_net = hashlimit_pernet(net);
876
877 BUG_ON(!hlist_empty(&hashlimit_net->htables));
878 hashlimit_proc_net_exit(net); 916 hashlimit_proc_net_exit(net);
879} 917}
880 918
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c
index 4635c9b00459..978efc9b555a 100644
--- a/net/netfilter/xt_recent.c
+++ b/net/netfilter/xt_recent.c
@@ -29,6 +29,7 @@
29#include <linux/skbuff.h> 29#include <linux/skbuff.h>
30#include <linux/inet.h> 30#include <linux/inet.h>
31#include <linux/slab.h> 31#include <linux/slab.h>
32#include <linux/vmalloc.h>
32#include <net/net_namespace.h> 33#include <net/net_namespace.h>
33#include <net/netns/generic.h> 34#include <net/netns/generic.h>
34 35
@@ -310,6 +311,14 @@ out:
310 return ret; 311 return ret;
311} 312}
312 313
314static void recent_table_free(void *addr)
315{
316 if (is_vmalloc_addr(addr))
317 vfree(addr);
318 else
319 kfree(addr);
320}
321
313static int recent_mt_check(const struct xt_mtchk_param *par, 322static int recent_mt_check(const struct xt_mtchk_param *par,
314 const struct xt_recent_mtinfo_v1 *info) 323 const struct xt_recent_mtinfo_v1 *info)
315{ 324{
@@ -322,6 +331,7 @@ static int recent_mt_check(const struct xt_mtchk_param *par,
322#endif 331#endif
323 unsigned int i; 332 unsigned int i;
324 int ret = -EINVAL; 333 int ret = -EINVAL;
334 size_t sz;
325 335
326 if (unlikely(!hash_rnd_inited)) { 336 if (unlikely(!hash_rnd_inited)) {
327 get_random_bytes(&hash_rnd, sizeof(hash_rnd)); 337 get_random_bytes(&hash_rnd, sizeof(hash_rnd));
@@ -360,8 +370,11 @@ static int recent_mt_check(const struct xt_mtchk_param *par,
360 goto out; 370 goto out;
361 } 371 }
362 372
363 t = kzalloc(sizeof(*t) + sizeof(t->iphash[0]) * ip_list_hash_size, 373 sz = sizeof(*t) + sizeof(t->iphash[0]) * ip_list_hash_size;
364 GFP_KERNEL); 374 if (sz <= PAGE_SIZE)
375 t = kzalloc(sz, GFP_KERNEL);
376 else
377 t = vzalloc(sz);
365 if (t == NULL) { 378 if (t == NULL) {
366 ret = -ENOMEM; 379 ret = -ENOMEM;
367 goto out; 380 goto out;
@@ -377,14 +390,14 @@ static int recent_mt_check(const struct xt_mtchk_param *par,
377 uid = make_kuid(&init_user_ns, ip_list_uid); 390 uid = make_kuid(&init_user_ns, ip_list_uid);
378 gid = make_kgid(&init_user_ns, ip_list_gid); 391 gid = make_kgid(&init_user_ns, ip_list_gid);
379 if (!uid_valid(uid) || !gid_valid(gid)) { 392 if (!uid_valid(uid) || !gid_valid(gid)) {
380 kfree(t); 393 recent_table_free(t);
381 ret = -EINVAL; 394 ret = -EINVAL;
382 goto out; 395 goto out;
383 } 396 }
384 pde = proc_create_data(t->name, ip_list_perms, recent_net->xt_recent, 397 pde = proc_create_data(t->name, ip_list_perms, recent_net->xt_recent,
385 &recent_mt_fops, t); 398 &recent_mt_fops, t);
386 if (pde == NULL) { 399 if (pde == NULL) {
387 kfree(t); 400 recent_table_free(t);
388 ret = -ENOMEM; 401 ret = -ENOMEM;
389 goto out; 402 goto out;
390 } 403 }
@@ -431,10 +444,11 @@ static void recent_mt_destroy(const struct xt_mtdtor_param *par)
431 list_del(&t->list); 444 list_del(&t->list);
432 spin_unlock_bh(&recent_lock); 445 spin_unlock_bh(&recent_lock);
433#ifdef CONFIG_PROC_FS 446#ifdef CONFIG_PROC_FS
434 remove_proc_entry(t->name, recent_net->xt_recent); 447 if (recent_net->xt_recent != NULL)
448 remove_proc_entry(t->name, recent_net->xt_recent);
435#endif 449#endif
436 recent_table_flush(t); 450 recent_table_flush(t);
437 kfree(t); 451 recent_table_free(t);
438 } 452 }
439 mutex_unlock(&recent_mutex); 453 mutex_unlock(&recent_mutex);
440} 454}
@@ -615,6 +629,20 @@ static int __net_init recent_proc_net_init(struct net *net)
615 629
616static void __net_exit recent_proc_net_exit(struct net *net) 630static void __net_exit recent_proc_net_exit(struct net *net)
617{ 631{
632 struct recent_net *recent_net = recent_pernet(net);
633 struct recent_table *t;
634
635 /* recent_net_exit() is called before recent_mt_destroy(). Make sure
636 * that the parent xt_recent proc entry is is empty before trying to
637 * remove it.
638 */
639 spin_lock_bh(&recent_lock);
640 list_for_each_entry(t, &recent_net->tables, list)
641 remove_proc_entry(t->name, recent_net->xt_recent);
642
643 recent_net->xt_recent = NULL;
644 spin_unlock_bh(&recent_lock);
645
618 proc_net_remove(net, "xt_recent"); 646 proc_net_remove(net, "xt_recent");
619} 647}
620#else 648#else
@@ -638,9 +666,6 @@ static int __net_init recent_net_init(struct net *net)
638 666
639static void __net_exit recent_net_exit(struct net *net) 667static void __net_exit recent_net_exit(struct net *net)
640{ 668{
641 struct recent_net *recent_net = recent_pernet(net);
642
643 BUG_ON(!list_empty(&recent_net->tables));
644 recent_proc_net_exit(net); 669 recent_proc_net_exit(net);
645} 670}
646 671
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index a1e116277477..31b74f5e61ad 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -434,12 +434,11 @@ static u32 rds_ib_protocol_compatible(struct rdma_cm_event *event)
434 version = RDS_PROTOCOL_3_0; 434 version = RDS_PROTOCOL_3_0;
435 while ((common >>= 1) != 0) 435 while ((common >>= 1) != 0)
436 version++; 436 version++;
437 } 437 } else
438 printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using " 438 printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using incompatible protocol version %u.%u\n",
439 "incompatible protocol version %u.%u\n", 439 &dp->dp_saddr,
440 &dp->dp_saddr, 440 dp->dp_protocol_major,
441 dp->dp_protocol_major, 441 dp->dp_protocol_minor);
442 dp->dp_protocol_minor);
443 return version; 442 return version;
444} 443}
445 444
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index 8c5bc857f04d..8eb9501e3d60 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -339,8 +339,8 @@ static int rds_ib_recv_refill_one(struct rds_connection *conn,
339 sge->length = sizeof(struct rds_header); 339 sge->length = sizeof(struct rds_header);
340 340
341 sge = &recv->r_sge[1]; 341 sge = &recv->r_sge[1];
342 sge->addr = sg_dma_address(&recv->r_frag->f_sg); 342 sge->addr = ib_sg_dma_address(ic->i_cm_id->device, &recv->r_frag->f_sg);
343 sge->length = sg_dma_len(&recv->r_frag->f_sg); 343 sge->length = ib_sg_dma_len(ic->i_cm_id->device, &recv->r_frag->f_sg);
344 344
345 ret = 0; 345 ret = 0;
346out: 346out:
@@ -381,7 +381,10 @@ void rds_ib_recv_refill(struct rds_connection *conn, int prefill)
381 ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr); 381 ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr);
382 rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv, 382 rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv,
383 recv->r_ibinc, sg_page(&recv->r_frag->f_sg), 383 recv->r_ibinc, sg_page(&recv->r_frag->f_sg),
384 (long) sg_dma_address(&recv->r_frag->f_sg), ret); 384 (long) ib_sg_dma_address(
385 ic->i_cm_id->device,
386 &recv->r_frag->f_sg),
387 ret);
385 if (ret) { 388 if (ret) {
386 rds_ib_conn_error(conn, "recv post on " 389 rds_ib_conn_error(conn, "recv post on "
387 "%pI4 returned %d, disconnecting and " 390 "%pI4 returned %d, disconnecting and "
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index d2922c0ef57a..51561eafcb72 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -919,7 +919,7 @@ ok:
919 q->now = ktime_to_ns(ktime_get()); 919 q->now = ktime_to_ns(ktime_get());
920 start_at = jiffies; 920 start_at = jiffies;
921 921
922 next_event = q->now + 5 * NSEC_PER_SEC; 922 next_event = q->now + 5LLU * NSEC_PER_SEC;
923 923
924 for (level = 0; level < TC_HTB_MAXDEPTH; level++) { 924 for (level = 0; level < TC_HTB_MAXDEPTH; level++) {
925 /* common case optimization - skip event handler quickly */ 925 /* common case optimization - skip event handler quickly */
diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
index c26210618e14..7521d944c0fb 100644
--- a/net/sctp/Kconfig
+++ b/net/sctp/Kconfig
@@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT
68 If unsure, say N 68 If unsure, say N
69choice 69choice
70 prompt "Default SCTP cookie HMAC encoding" 70 prompt "Default SCTP cookie HMAC encoding"
71 default SCTP_COOKIE_HMAC_MD5 71 default SCTP_DEFAULT_COOKIE_HMAC_MD5
72 help 72 help
73 This option sets the default sctp cookie hmac algorithm 73 This option sets the default sctp cookie hmac algorithm
74 when in doubt select 'md5' 74 when in doubt select 'md5'
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 822f020fa7f4..1915ffe598e3 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -610,11 +610,6 @@ EXPORT_SYMBOL_GPL(rpc_killall_tasks);
610 */ 610 */
611void rpc_shutdown_client(struct rpc_clnt *clnt) 611void rpc_shutdown_client(struct rpc_clnt *clnt)
612{ 612{
613 /*
614 * To avoid deadlock, never call rpc_shutdown_client from a
615 * workqueue context!
616 */
617 WARN_ON_ONCE(current->flags & PF_WQ_WORKER);
618 might_sleep(); 613 might_sleep();
619 614
620 dprintk_rcu("RPC: shutting down %s client for %s\n", 615 dprintk_rcu("RPC: shutting down %s client for %s\n",
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index d17a704aaf5f..b4133bd13915 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -934,16 +934,35 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data)
934 return task; 934 return task;
935} 935}
936 936
937/*
938 * rpc_free_task - release rpc task and perform cleanups
939 *
940 * Note that we free up the rpc_task _after_ rpc_release_calldata()
941 * in order to work around a workqueue dependency issue.
942 *
943 * Tejun Heo states:
944 * "Workqueue currently considers two work items to be the same if they're
945 * on the same address and won't execute them concurrently - ie. it
946 * makes a work item which is queued again while being executed wait
947 * for the previous execution to complete.
948 *
949 * If a work function frees the work item, and then waits for an event
950 * which should be performed by another work item and *that* work item
951 * recycles the freed work item, it can create a false dependency loop.
952 * There really is no reliable way to detect this short of verifying
953 * every memory free."
954 *
955 */
937static void rpc_free_task(struct rpc_task *task) 956static void rpc_free_task(struct rpc_task *task)
938{ 957{
939 const struct rpc_call_ops *tk_ops = task->tk_ops; 958 unsigned short tk_flags = task->tk_flags;
940 void *calldata = task->tk_calldata; 959
960 rpc_release_calldata(task->tk_ops, task->tk_calldata);
941 961
942 if (task->tk_flags & RPC_TASK_DYNAMIC) { 962 if (tk_flags & RPC_TASK_DYNAMIC) {
943 dprintk("RPC: %5u freeing task\n", task->tk_pid); 963 dprintk("RPC: %5u freeing task\n", task->tk_pid);
944 mempool_free(task, rpc_task_mempool); 964 mempool_free(task, rpc_task_mempool);
945 } 965 }
946 rpc_release_calldata(tk_ops, calldata);
947} 966}
948 967
949static void rpc_async_release(struct work_struct *work) 968static void rpc_async_release(struct work_struct *work)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 6e5308998e30..82c4fc7c994c 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2365,7 +2365,6 @@ int set_regdom(const struct ieee80211_regdomain *rd)
2365 return r; 2365 return r;
2366} 2366}
2367 2367
2368#ifdef CONFIG_HOTPLUG
2369int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env) 2368int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env)
2370{ 2369{
2371 if (last_request && !last_request->processed) { 2370 if (last_request && !last_request->processed) {
@@ -2377,12 +2376,6 @@ int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env)
2377 2376
2378 return 0; 2377 return 0;
2379} 2378}
2380#else
2381int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env)
2382{
2383 return -ENODEV;
2384}
2385#endif /* CONFIG_HOTPLUG */
2386 2379
2387void wiphy_regulatory_register(struct wiphy *wiphy) 2380void wiphy_regulatory_register(struct wiphy *wiphy)
2388{ 2381{
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c
index 9bf6d5e32166..1f6f01e2dc4c 100644
--- a/net/wireless/sysfs.c
+++ b/net/wireless/sysfs.c
@@ -77,13 +77,11 @@ static void wiphy_dev_release(struct device *dev)
77 cfg80211_dev_free(rdev); 77 cfg80211_dev_free(rdev);
78} 78}
79 79
80#ifdef CONFIG_HOTPLUG
81static int wiphy_uevent(struct device *dev, struct kobj_uevent_env *env) 80static int wiphy_uevent(struct device *dev, struct kobj_uevent_env *env)
82{ 81{
83 /* TODO, we probably need stuff here */ 82 /* TODO, we probably need stuff here */
84 return 0; 83 return 0;
85} 84}
86#endif
87 85
88static int wiphy_suspend(struct device *dev, pm_message_t state) 86static int wiphy_suspend(struct device *dev, pm_message_t state)
89{ 87{
@@ -134,9 +132,7 @@ struct class ieee80211_class = {
134 .owner = THIS_MODULE, 132 .owner = THIS_MODULE,
135 .dev_release = wiphy_dev_release, 133 .dev_release = wiphy_dev_release,
136 .dev_attrs = ieee80211_dev_attrs, 134 .dev_attrs = ieee80211_dev_attrs,
137#ifdef CONFIG_HOTPLUG
138 .dev_uevent = wiphy_uevent, 135 .dev_uevent = wiphy_uevent,
139#endif
140 .suspend = wiphy_suspend, 136 .suspend = wiphy_suspend,
141 .resume = wiphy_resume, 137 .resume = wiphy_resume,
142 .ns_type = &net_ns_type_operations, 138 .ns_type = &net_ns_type_operations,
diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c
index 23ea9f2ae11d..59b13440813d 100644
--- a/samples/rpmsg/rpmsg_client_sample.c
+++ b/samples/rpmsg/rpmsg_client_sample.c
@@ -64,7 +64,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev)
64 return 0; 64 return 0;
65} 65}
66 66
67static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev) 67static void rpmsg_sample_remove(struct rpmsg_channel *rpdev)
68{ 68{
69 dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); 69 dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n");
70} 70}
@@ -81,7 +81,7 @@ static struct rpmsg_driver rpmsg_sample_client = {
81 .id_table = rpmsg_driver_sample_id_table, 81 .id_table = rpmsg_driver_sample_id_table,
82 .probe = rpmsg_sample_probe, 82 .probe = rpmsg_sample_probe,
83 .callback = rpmsg_sample_cb, 83 .callback = rpmsg_sample_cb,
84 .remove = __devexit_p(rpmsg_sample_remove), 84 .remove = rpmsg_sample_remove,
85}; 85};
86 86
87static int __init rpmsg_client_sample_init(void) 87static int __init rpmsg_client_sample_init(void)
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
index 6c353ae8a451..581ca99c96f2 100644
--- a/scripts/headers_install.pl
+++ b/scripts/headers_install.pl
@@ -42,9 +42,9 @@ foreach my $filename (@files) {
42 $line =~ s/(^|\s)(inline)\b/$1__$2__/g; 42 $line =~ s/(^|\s)(inline)\b/$1__$2__/g;
43 $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; 43 $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
44 $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; 44 $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
45 $line =~ s/#ifndef _UAPI/#ifndef /; 45 $line =~ s/#ifndef\s+_UAPI/#ifndef /;
46 $line =~ s/#define _UAPI/#define /; 46 $line =~ s/#define\s+_UAPI/#define /;
47 $line =~ s!#endif /[*] _UAPI!#endif /* !; 47 $line =~ s!#endif\s+/[*]\s*_UAPI!#endif /* !;
48 printf {$out} "%s", $line; 48 printf {$out} "%s", $line;
49 } 49 }
50 close $out; 50 close $out;
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 28b761567815..f565536a2bef 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2079,7 +2079,6 @@ sub dump_function($$) {
2079 $prototype =~ s/^__inline +//; 2079 $prototype =~ s/^__inline +//;
2080 $prototype =~ s/^__always_inline +//; 2080 $prototype =~ s/^__always_inline +//;
2081 $prototype =~ s/^noinline +//; 2081 $prototype =~ s/^noinline +//;
2082 $prototype =~ s/__devinit +//;
2083 $prototype =~ s/__init +//; 2082 $prototype =~ s/__init +//;
2084 $prototype =~ s/__init_or_module +//; 2083 $prototype =~ s/__init_or_module +//;
2085 $prototype =~ s/__must_check +//; 2084 $prototype =~ s/__must_check +//;
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
index 3b2adb794f15..079a85dc37b2 100644
--- a/security/integrity/ima/ima.h
+++ b/security/integrity/ima/ima.h
@@ -139,6 +139,7 @@ void ima_delete_rules(void);
139/* Appraise integrity measurements */ 139/* Appraise integrity measurements */
140#define IMA_APPRAISE_ENFORCE 0x01 140#define IMA_APPRAISE_ENFORCE 0x01
141#define IMA_APPRAISE_FIX 0x02 141#define IMA_APPRAISE_FIX 0x02
142#define IMA_APPRAISE_MODULES 0x04
142 143
143#ifdef CONFIG_IMA_APPRAISE 144#ifdef CONFIG_IMA_APPRAISE
144int ima_appraise_measurement(struct integrity_iint_cache *iint, 145int ima_appraise_measurement(struct integrity_iint_cache *iint,
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 45de18e9a6f2..dba965de90d3 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -291,11 +291,15 @@ EXPORT_SYMBOL_GPL(ima_file_check);
291 */ 291 */
292int ima_module_check(struct file *file) 292int ima_module_check(struct file *file)
293{ 293{
294 int rc; 294 int rc = 0;
295 295
296 if (!file) 296 if (!file) {
297 rc = INTEGRITY_UNKNOWN; 297 if (ima_appraise & IMA_APPRAISE_MODULES) {
298 else 298#ifndef CONFIG_MODULE_SIG_FORCE
299 rc = -EACCES; /* INTEGRITY_UNKNOWN */
300#endif
301 }
302 } else
299 rc = process_measurement(file, file->f_dentry->d_name.name, 303 rc = process_measurement(file, file->f_dentry->d_name.name,
300 MAY_EXEC, MODULE_CHECK); 304 MAY_EXEC, MODULE_CHECK);
301 return (ima_appraise & IMA_APPRAISE_ENFORCE) ? rc : 0; 305 return (ima_appraise & IMA_APPRAISE_ENFORCE) ? rc : 0;
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index af7d182d5a46..479fca940bb5 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -523,7 +523,8 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
523 } 523 }
524 if (!result && (entry->action == UNKNOWN)) 524 if (!result && (entry->action == UNKNOWN))
525 result = -EINVAL; 525 result = -EINVAL;
526 526 else if (entry->func == MODULE_CHECK)
527 ima_appraise |= IMA_APPRAISE_MODULES;
527 audit_log_format(ab, "res=%d", !result); 528 audit_log_format(ab, "res=%d", !result);
528 audit_log_end(ab); 529 audit_log_end(ab);
529 return result; 530 return result;
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index 6fc0ae90e5b1..fff7753e35c1 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -18,6 +18,7 @@
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/gpio.h>
21 22
22#include <sound/ac97_codec.h> 23#include <sound/ac97_codec.h>
23#include <sound/pxa2xx-lib.h> 24#include <sound/pxa2xx-lib.h>
@@ -148,6 +149,8 @@ static inline void pxa_ac97_warm_pxa27x(void)
148 149
149static inline void pxa_ac97_cold_pxa27x(void) 150static inline void pxa_ac97_cold_pxa27x(void)
150{ 151{
152 unsigned int timeout;
153
151 GCR &= GCR_COLD_RST; /* clear everything but nCRST */ 154 GCR &= GCR_COLD_RST; /* clear everything but nCRST */
152 GCR &= ~GCR_COLD_RST; /* then assert nCRST */ 155 GCR &= ~GCR_COLD_RST; /* then assert nCRST */
153 156
@@ -157,8 +160,10 @@ static inline void pxa_ac97_cold_pxa27x(void)
157 clk_enable(ac97conf_clk); 160 clk_enable(ac97conf_clk);
158 udelay(5); 161 udelay(5);
159 clk_disable(ac97conf_clk); 162 clk_disable(ac97conf_clk);
160 GCR = GCR_COLD_RST; 163 GCR = GCR_COLD_RST | GCR_WARM_RST;
161 udelay(50); 164 timeout = 100; /* wait for the codec-ready bit to be set */
165 while (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR)) && timeout--)
166 mdelay(1);
162} 167}
163#endif 168#endif
164 169
@@ -340,8 +345,21 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
340 } 345 }
341 346
342 if (cpu_is_pxa27x()) { 347 if (cpu_is_pxa27x()) {
343 /* Use GPIO 113 as AC97 Reset on Bulverde */ 348 /*
349 * This gpio is needed for a work-around to a bug in the ac97
350 * controller during warm reset. The direction and level is set
351 * here so that it is an output driven high when switching from
352 * AC97_nRESET alt function to generic gpio.
353 */
354 ret = gpio_request_one(reset_gpio, GPIOF_OUT_INIT_HIGH,
355 "pxa27x ac97 reset");
356 if (ret < 0) {
357 pr_err("%s: gpio_request_one() failed: %d\n",
358 __func__, ret);
359 goto err_conf;
360 }
344 pxa27x_assert_ac97reset(reset_gpio, 0); 361 pxa27x_assert_ac97reset(reset_gpio, 0);
362
345 ac97conf_clk = clk_get(&dev->dev, "AC97CONFCLK"); 363 ac97conf_clk = clk_get(&dev->dev, "AC97CONFCLK");
346 if (IS_ERR(ac97conf_clk)) { 364 if (IS_ERR(ac97conf_clk)) {
347 ret = PTR_ERR(ac97conf_clk); 365 ret = PTR_ERR(ac97conf_clk);
@@ -384,6 +402,8 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_probe);
384 402
385void pxa2xx_ac97_hw_remove(struct platform_device *dev) 403void pxa2xx_ac97_hw_remove(struct platform_device *dev)
386{ 404{
405 if (cpu_is_pxa27x())
406 gpio_free(reset_gpio);
387 GCR |= GCR_ACLINK_OFF; 407 GCR |= GCR_ACLINK_OFF;
388 free_irq(IRQ_AC97, NULL); 408 free_irq(IRQ_AC97, NULL);
389 if (ac97conf_clk) { 409 if (ac97conf_clk) {
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index adf397b9d0e6..1d8bb5917594 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -446,15 +446,9 @@ static int arizona_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
446 case SND_SOC_DAIFMT_DSP_A: 446 case SND_SOC_DAIFMT_DSP_A:
447 mode = 0; 447 mode = 0;
448 break; 448 break;
449 case SND_SOC_DAIFMT_DSP_B:
450 mode = 1;
451 break;
452 case SND_SOC_DAIFMT_I2S: 449 case SND_SOC_DAIFMT_I2S:
453 mode = 2; 450 mode = 2;
454 break; 451 break;
455 case SND_SOC_DAIFMT_LEFT_J:
456 mode = 3;
457 break;
458 default: 452 default:
459 arizona_aif_err(dai, "Unsupported DAI format %d\n", 453 arizona_aif_err(dai, "Unsupported DAI format %d\n",
460 fmt & SND_SOC_DAIFMT_FORMAT_MASK); 454 fmt & SND_SOC_DAIFMT_FORMAT_MASK);
@@ -714,7 +708,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
714 snd_soc_update_bits(codec, ARIZONA_ASYNC_SAMPLE_RATE_1, 708 snd_soc_update_bits(codec, ARIZONA_ASYNC_SAMPLE_RATE_1,
715 ARIZONA_ASYNC_SAMPLE_RATE_MASK, sr_val); 709 ARIZONA_ASYNC_SAMPLE_RATE_MASK, sr_val);
716 snd_soc_update_bits(codec, base + ARIZONA_AIF_RATE_CTRL, 710 snd_soc_update_bits(codec, base + ARIZONA_AIF_RATE_CTRL,
717 ARIZONA_AIF1_RATE_MASK, 8); 711 ARIZONA_AIF1_RATE_MASK,
712 8 << ARIZONA_AIF1_RATE_SHIFT);
718 break; 713 break;
719 default: 714 default:
720 arizona_aif_err(dai, "Invalid clock %d\n", dai_priv->clk); 715 arizona_aif_err(dai, "Invalid clock %d\n", dai_priv->clk);
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h
index 41dae1ed3b71..4deebeb07177 100644
--- a/sound/soc/codecs/arizona.h
+++ b/sound/soc/codecs/arizona.h
@@ -34,15 +34,15 @@
34 34
35#define ARIZONA_FLL_SRC_MCLK1 0 35#define ARIZONA_FLL_SRC_MCLK1 0
36#define ARIZONA_FLL_SRC_MCLK2 1 36#define ARIZONA_FLL_SRC_MCLK2 1
37#define ARIZONA_FLL_SRC_SLIMCLK 2 37#define ARIZONA_FLL_SRC_SLIMCLK 3
38#define ARIZONA_FLL_SRC_FLL1 3 38#define ARIZONA_FLL_SRC_FLL1 4
39#define ARIZONA_FLL_SRC_FLL2 4 39#define ARIZONA_FLL_SRC_FLL2 5
40#define ARIZONA_FLL_SRC_AIF1BCLK 5 40#define ARIZONA_FLL_SRC_AIF1BCLK 8
41#define ARIZONA_FLL_SRC_AIF2BCLK 6 41#define ARIZONA_FLL_SRC_AIF2BCLK 9
42#define ARIZONA_FLL_SRC_AIF3BCLK 7 42#define ARIZONA_FLL_SRC_AIF3BCLK 10
43#define ARIZONA_FLL_SRC_AIF1LRCLK 8 43#define ARIZONA_FLL_SRC_AIF1LRCLK 12
44#define ARIZONA_FLL_SRC_AIF2LRCLK 9 44#define ARIZONA_FLL_SRC_AIF2LRCLK 13
45#define ARIZONA_FLL_SRC_AIF3LRCLK 10 45#define ARIZONA_FLL_SRC_AIF3LRCLK 14
46 46
47#define ARIZONA_MIXER_VOL_MASK 0x00FE 47#define ARIZONA_MIXER_VOL_MASK 0x00FE
48#define ARIZONA_MIXER_VOL_SHIFT 1 48#define ARIZONA_MIXER_VOL_SHIFT 1
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index 4f1127935fdf..ac8742a1f25a 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -474,16 +474,16 @@ static int cs4271_probe(struct snd_soc_codec *codec)
474 struct cs4271_platform_data *cs4271plat = codec->dev->platform_data; 474 struct cs4271_platform_data *cs4271plat = codec->dev->platform_data;
475 int ret; 475 int ret;
476 int gpio_nreset = -EINVAL; 476 int gpio_nreset = -EINVAL;
477 int amutec_eq_bmutec = 0; 477 bool amutec_eq_bmutec = false;
478 478
479#ifdef CONFIG_OF 479#ifdef CONFIG_OF
480 if (of_match_device(cs4271_dt_ids, codec->dev)) { 480 if (of_match_device(cs4271_dt_ids, codec->dev)) {
481 gpio_nreset = of_get_named_gpio(codec->dev->of_node, 481 gpio_nreset = of_get_named_gpio(codec->dev->of_node,
482 "reset-gpio", 0); 482 "reset-gpio", 0);
483 483
484 if (!of_get_property(codec->dev->of_node, 484 if (of_get_property(codec->dev->of_node,
485 "cirrus,amutec-eq-bmutec", NULL)) 485 "cirrus,amutec-eq-bmutec", NULL))
486 amutec_eq_bmutec = 1; 486 amutec_eq_bmutec = true;
487 } 487 }
488#endif 488#endif
489 489
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 99bb1c69499e..9811a5478c87 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -737,7 +737,7 @@ static const struct cs42l52_clk_para clk_map_table[] = {
737 737
738static int cs42l52_get_clk(int mclk, int rate) 738static int cs42l52_get_clk(int mclk, int rate)
739{ 739{
740 int i, ret = 0; 740 int i, ret = -EINVAL;
741 u_int mclk1, mclk2 = 0; 741 u_int mclk1, mclk2 = 0;
742 742
743 for (i = 0; i < ARRAY_SIZE(clk_map_table); i++) { 743 for (i = 0; i < ARRAY_SIZE(clk_map_table); i++) {
@@ -749,8 +749,6 @@ static int cs42l52_get_clk(int mclk, int rate)
749 } 749 }
750 } 750 }
751 } 751 }
752 if (ret > ARRAY_SIZE(clk_map_table))
753 return -EINVAL;
754 return ret; 752 return ret;
755} 753}
756 754
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index d75257d40a49..e19490cfb3a8 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -111,9 +111,9 @@ static struct reg_default lm49453_reg_defs[] = {
111 { 101, 0x00 }, 111 { 101, 0x00 },
112 { 102, 0x00 }, 112 { 102, 0x00 },
113 { 103, 0x01 }, 113 { 103, 0x01 },
114 { 105, 0x01 }, 114 { 104, 0x01 },
115 { 106, 0x00 }, 115 { 105, 0x00 },
116 { 107, 0x01 }, 116 { 106, 0x01 },
117 { 107, 0x00 }, 117 { 107, 0x00 },
118 { 108, 0x00 }, 118 { 108, 0x00 },
119 { 109, 0x00 }, 119 { 109, 0x00 },
@@ -163,56 +163,25 @@ static struct reg_default lm49453_reg_defs[] = {
163 { 184, 0x00 }, 163 { 184, 0x00 },
164 { 185, 0x00 }, 164 { 185, 0x00 },
165 { 186, 0x00 }, 165 { 186, 0x00 },
166 { 189, 0x00 }, 166 { 187, 0x00 },
167 { 188, 0x00 }, 167 { 188, 0x00 },
168 { 194, 0x00 }, 168 { 189, 0x00 },
169 { 195, 0x00 }, 169 { 208, 0x06 },
170 { 196, 0x00 },
171 { 197, 0x00 },
172 { 200, 0x00 },
173 { 201, 0x00 },
174 { 202, 0x00 },
175 { 203, 0x00 },
176 { 204, 0x00 },
177 { 205, 0x00 },
178 { 208, 0x00 },
179 { 209, 0x00 }, 170 { 209, 0x00 },
180 { 210, 0x00 }, 171 { 210, 0x08 },
181 { 211, 0x00 }, 172 { 211, 0x54 },
182 { 213, 0x00 }, 173 { 212, 0x14 },
183 { 214, 0x00 }, 174 { 213, 0x0d },
184 { 215, 0x00 }, 175 { 214, 0x0d },
185 { 216, 0x00 }, 176 { 215, 0x14 },
186 { 217, 0x00 }, 177 { 216, 0x60 },
187 { 218, 0x00 },
188 { 219, 0x00 },
189 { 221, 0x00 }, 178 { 221, 0x00 },
190 { 222, 0x00 }, 179 { 222, 0x00 },
180 { 223, 0x00 },
191 { 224, 0x00 }, 181 { 224, 0x00 },
192 { 225, 0x00 },
193 { 226, 0x00 },
194 { 227, 0x00 },
195 { 228, 0x00 },
196 { 229, 0x00 },
197 { 230, 0x13 },
198 { 231, 0x00 },
199 { 232, 0x80 },
200 { 233, 0x0C },
201 { 234, 0xDD },
202 { 235, 0x00 },
203 { 236, 0x04 },
204 { 237, 0x00 },
205 { 238, 0x00 },
206 { 239, 0x00 },
207 { 240, 0x00 },
208 { 241, 0x00 },
209 { 242, 0x00 },
210 { 243, 0x00 },
211 { 244, 0x00 },
212 { 245, 0x00 },
213 { 248, 0x00 }, 182 { 248, 0x00 },
214 { 249, 0x00 }, 183 { 249, 0x00 },
215 { 254, 0x00 }, 184 { 250, 0x00 },
216 { 255, 0x00 }, 185 { 255, 0x00 },
217}; 186};
218 187
@@ -525,36 +494,41 @@ SOC_DAPM_SINGLE("Port2_2 Switch", LM49453_P0_PORT2_TX2_REG, 7, 1, 0),
525}; 494};
526 495
527/* TLV Declarations */ 496/* TLV Declarations */
528static const DECLARE_TLV_DB_SCALE(digital_tlv, -7650, 150, 1); 497static const DECLARE_TLV_DB_SCALE(adc_dac_tlv, -7650, 150, 1);
529static const DECLARE_TLV_DB_SCALE(port_tlv, 0, 600, 0); 498static const DECLARE_TLV_DB_SCALE(mic_tlv, 0, 200, 1);
499static const DECLARE_TLV_DB_SCALE(port_tlv, -1800, 600, 0);
500static const DECLARE_TLV_DB_SCALE(stn_tlv, -7200, 150, 0);
530 501
531static const struct snd_kcontrol_new lm49453_sidetone_mixer_controls[] = { 502static const struct snd_kcontrol_new lm49453_sidetone_mixer_controls[] = {
532/* Sidetone supports mono only */ 503/* Sidetone supports mono only */
533SOC_DAPM_SINGLE_TLV("Sidetone ADCL Volume", LM49453_P0_STN_VOL_ADCL_REG, 504SOC_DAPM_SINGLE_TLV("Sidetone ADCL Volume", LM49453_P0_STN_VOL_ADCL_REG,
534 0, 0x3F, 0, digital_tlv), 505 0, 0x3F, 0, stn_tlv),
535SOC_DAPM_SINGLE_TLV("Sidetone ADCR Volume", LM49453_P0_STN_VOL_ADCR_REG, 506SOC_DAPM_SINGLE_TLV("Sidetone ADCR Volume", LM49453_P0_STN_VOL_ADCR_REG,
536 0, 0x3F, 0, digital_tlv), 507 0, 0x3F, 0, stn_tlv),
537SOC_DAPM_SINGLE_TLV("Sidetone DMIC1L Volume", LM49453_P0_STN_VOL_DMIC1L_REG, 508SOC_DAPM_SINGLE_TLV("Sidetone DMIC1L Volume", LM49453_P0_STN_VOL_DMIC1L_REG,
538 0, 0x3F, 0, digital_tlv), 509 0, 0x3F, 0, stn_tlv),
539SOC_DAPM_SINGLE_TLV("Sidetone DMIC1R Volume", LM49453_P0_STN_VOL_DMIC1R_REG, 510SOC_DAPM_SINGLE_TLV("Sidetone DMIC1R Volume", LM49453_P0_STN_VOL_DMIC1R_REG,
540 0, 0x3F, 0, digital_tlv), 511 0, 0x3F, 0, stn_tlv),
541SOC_DAPM_SINGLE_TLV("Sidetone DMIC2L Volume", LM49453_P0_STN_VOL_DMIC2L_REG, 512SOC_DAPM_SINGLE_TLV("Sidetone DMIC2L Volume", LM49453_P0_STN_VOL_DMIC2L_REG,
542 0, 0x3F, 0, digital_tlv), 513 0, 0x3F, 0, stn_tlv),
543SOC_DAPM_SINGLE_TLV("Sidetone DMIC2R Volume", LM49453_P0_STN_VOL_DMIC2R_REG, 514SOC_DAPM_SINGLE_TLV("Sidetone DMIC2R Volume", LM49453_P0_STN_VOL_DMIC2R_REG,
544 0, 0x3F, 0, digital_tlv), 515 0, 0x3F, 0, stn_tlv),
545}; 516};
546 517
547static const struct snd_kcontrol_new lm49453_snd_controls[] = { 518static const struct snd_kcontrol_new lm49453_snd_controls[] = {
548 /* mic1 and mic2 supports mono only */ 519 /* mic1 and mic2 supports mono only */
549 SOC_SINGLE_TLV("Mic1 Volume", LM49453_P0_ADC_LEVELL_REG, 0, 6, 520 SOC_SINGLE_TLV("Mic1 Volume", LM49453_P0_MICL_REG, 0, 15, 0, mic_tlv),
550 0, digital_tlv), 521 SOC_SINGLE_TLV("Mic2 Volume", LM49453_P0_MICR_REG, 0, 15, 0, mic_tlv),
551 SOC_SINGLE_TLV("Mic2 Volume", LM49453_P0_ADC_LEVELR_REG, 0, 6, 522
552 0, digital_tlv), 523 SOC_SINGLE_TLV("ADCL Volume", LM49453_P0_ADC_LEVELL_REG, 0, 63,
524 0, adc_dac_tlv),
525 SOC_SINGLE_TLV("ADCR Volume", LM49453_P0_ADC_LEVELR_REG, 0, 63,
526 0, adc_dac_tlv),
553 527
554 SOC_DOUBLE_R_TLV("DMIC1 Volume", LM49453_P0_DMIC1_LEVELL_REG, 528 SOC_DOUBLE_R_TLV("DMIC1 Volume", LM49453_P0_DMIC1_LEVELL_REG,
555 LM49453_P0_DMIC1_LEVELR_REG, 0, 6, 0, digital_tlv), 529 LM49453_P0_DMIC1_LEVELR_REG, 0, 63, 0, adc_dac_tlv),
556 SOC_DOUBLE_R_TLV("DMIC2 Volume", LM49453_P0_DMIC2_LEVELL_REG, 530 SOC_DOUBLE_R_TLV("DMIC2 Volume", LM49453_P0_DMIC2_LEVELL_REG,
557 LM49453_P0_DMIC2_LEVELR_REG, 0, 6, 0, digital_tlv), 531 LM49453_P0_DMIC2_LEVELR_REG, 0, 63, 0, adc_dac_tlv),
558 532
559 SOC_DAPM_ENUM("Mic2Mode", lm49453_mic2mode_enum), 533 SOC_DAPM_ENUM("Mic2Mode", lm49453_mic2mode_enum),
560 SOC_DAPM_ENUM("DMIC12 SRC", lm49453_dmic12_cfg_enum), 534 SOC_DAPM_ENUM("DMIC12 SRC", lm49453_dmic12_cfg_enum),
@@ -569,16 +543,16 @@ static const struct snd_kcontrol_new lm49453_snd_controls[] = {
569 2, 1, 0), 543 2, 1, 0),
570 544
571 SOC_DOUBLE_R_TLV("DAC HP Volume", LM49453_P0_DAC_HP_LEVELL_REG, 545 SOC_DOUBLE_R_TLV("DAC HP Volume", LM49453_P0_DAC_HP_LEVELL_REG,
572 LM49453_P0_DAC_HP_LEVELR_REG, 0, 6, 0, digital_tlv), 546 LM49453_P0_DAC_HP_LEVELR_REG, 0, 63, 0, adc_dac_tlv),
573 SOC_DOUBLE_R_TLV("DAC LO Volume", LM49453_P0_DAC_LO_LEVELL_REG, 547 SOC_DOUBLE_R_TLV("DAC LO Volume", LM49453_P0_DAC_LO_LEVELL_REG,
574 LM49453_P0_DAC_LO_LEVELR_REG, 0, 6, 0, digital_tlv), 548 LM49453_P0_DAC_LO_LEVELR_REG, 0, 63, 0, adc_dac_tlv),
575 SOC_DOUBLE_R_TLV("DAC LS Volume", LM49453_P0_DAC_LS_LEVELL_REG, 549 SOC_DOUBLE_R_TLV("DAC LS Volume", LM49453_P0_DAC_LS_LEVELL_REG,
576 LM49453_P0_DAC_LS_LEVELR_REG, 0, 6, 0, digital_tlv), 550 LM49453_P0_DAC_LS_LEVELR_REG, 0, 63, 0, adc_dac_tlv),
577 SOC_DOUBLE_R_TLV("DAC HA Volume", LM49453_P0_DAC_HA_LEVELL_REG, 551 SOC_DOUBLE_R_TLV("DAC HA Volume", LM49453_P0_DAC_HA_LEVELL_REG,
578 LM49453_P0_DAC_HA_LEVELR_REG, 0, 6, 0, digital_tlv), 552 LM49453_P0_DAC_HA_LEVELR_REG, 0, 63, 0, adc_dac_tlv),
579 553
580 SOC_SINGLE_TLV("EP Volume", LM49453_P0_DAC_LS_LEVELL_REG, 554 SOC_SINGLE_TLV("EP Volume", LM49453_P0_DAC_LS_LEVELL_REG,
581 0, 6, 0, digital_tlv), 555 0, 63, 0, adc_dac_tlv),
582 556
583 SOC_SINGLE_TLV("PORT1_1_RX_LVL Volume", LM49453_P0_PORT1_RX_LVL1_REG, 557 SOC_SINGLE_TLV("PORT1_1_RX_LVL Volume", LM49453_P0_PORT1_RX_LVL1_REG,
584 0, 3, 0, port_tlv), 558 0, 3, 0, port_tlv),
@@ -1218,7 +1192,7 @@ static int lm49453_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
1218 } 1192 }
1219 1193
1220 snd_soc_update_bits(codec, LM49453_P0_AUDIO_PORT1_BASIC_REG, 1194 snd_soc_update_bits(codec, LM49453_P0_AUDIO_PORT1_BASIC_REG,
1221 LM49453_AUDIO_PORT1_BASIC_FMT_MASK|BIT(1)|BIT(5), 1195 LM49453_AUDIO_PORT1_BASIC_FMT_MASK|BIT(0)|BIT(5),
1222 (aif_val | mode | clk_phase)); 1196 (aif_val | mode | clk_phase));
1223 1197
1224 snd_soc_write(codec, LM49453_P0_AUDIO_PORT1_RX_MSB_REG, clk_shift); 1198 snd_soc_write(codec, LM49453_P0_AUDIO_PORT1_RX_MSB_REG, clk_shift);
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index cb1675cd8e1c..92bbfec9b107 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -401,7 +401,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
401 5, 1, 0), 401 5, 1, 0),
402 402
403 SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL, 403 SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL,
404 0, 4, 0, mic_gain_tlv), 404 0, 3, 0, mic_gain_tlv),
405}; 405};
406 406
407/* mute the codec used by alsa core */ 407/* mute the codec used by alsa core */
@@ -1344,7 +1344,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
1344 SGTL5000_HP_ZCD_EN | 1344 SGTL5000_HP_ZCD_EN |
1345 SGTL5000_ADC_ZCD_EN); 1345 SGTL5000_ADC_ZCD_EN);
1346 1346
1347 snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 0); 1347 snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 2);
1348 1348
1349 /* 1349 /*
1350 * disable DAP 1350 * disable DAP
diff --git a/sound/soc/codecs/sta529.c b/sound/soc/codecs/sta529.c
index ab355c4f0b2d..40c07be9b581 100644
--- a/sound/soc/codecs/sta529.c
+++ b/sound/soc/codecs/sta529.c
@@ -74,9 +74,10 @@
74 SNDRV_PCM_FMTBIT_S32_LE) 74 SNDRV_PCM_FMTBIT_S32_LE)
75#define S2PC_VALUE 0x98 75#define S2PC_VALUE 0x98
76#define CLOCK_OUT 0x60 76#define CLOCK_OUT 0x60
77#define LEFT_J_DATA_FORMAT 0x10 77#define DATA_FORMAT_MSK 0x0E
78#define I2S_DATA_FORMAT 0x12 78#define LEFT_J_DATA_FORMAT 0x00
79#define RIGHT_J_DATA_FORMAT 0x14 79#define I2S_DATA_FORMAT 0x02
80#define RIGHT_J_DATA_FORMAT 0x04
80#define CODEC_MUTE_VAL 0x80 81#define CODEC_MUTE_VAL 0x80
81 82
82#define POWER_CNTLMSAK 0x40 83#define POWER_CNTLMSAK 0x40
@@ -289,7 +290,7 @@ static int sta529_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt)
289 return -EINVAL; 290 return -EINVAL;
290 } 291 }
291 292
292 snd_soc_update_bits(codec, STA529_S2PCFG0, 0x0D, mode); 293 snd_soc_update_bits(codec, STA529_S2PCFG0, DATA_FORMAT_MSK, mode);
293 294
294 return 0; 295 return 0;
295} 296}
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 1cbe88f01d63..12bcae63a7f0 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -209,9 +209,9 @@ static int wm2000_power_up(struct i2c_client *i2c, int analogue)
209 209
210 ret = wm2000_read(i2c, WM2000_REG_SPEECH_CLARITY); 210 ret = wm2000_read(i2c, WM2000_REG_SPEECH_CLARITY);
211 if (wm2000->speech_clarity) 211 if (wm2000->speech_clarity)
212 ret &= ~WM2000_SPEECH_CLARITY;
213 else
214 ret |= WM2000_SPEECH_CLARITY; 212 ret |= WM2000_SPEECH_CLARITY;
213 else
214 ret &= ~WM2000_SPEECH_CLARITY;
215 wm2000_write(i2c, WM2000_REG_SPEECH_CLARITY, ret); 215 wm2000_write(i2c, WM2000_REG_SPEECH_CLARITY, ret);
216 216
217 wm2000_write(i2c, WM2000_REG_SYS_START0, 0x33); 217 wm2000_write(i2c, WM2000_REG_SYS_START0, 0x33);
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index afcf31df77e0..e6cefe1ac677 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -1566,15 +1566,9 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
1566 case SND_SOC_DAIFMT_DSP_A: 1566 case SND_SOC_DAIFMT_DSP_A:
1567 fmt_val = 0; 1567 fmt_val = 0;
1568 break; 1568 break;
1569 case SND_SOC_DAIFMT_DSP_B:
1570 fmt_val = 1;
1571 break;
1572 case SND_SOC_DAIFMT_I2S: 1569 case SND_SOC_DAIFMT_I2S:
1573 fmt_val = 2; 1570 fmt_val = 2;
1574 break; 1571 break;
1575 case SND_SOC_DAIFMT_LEFT_J:
1576 fmt_val = 3;
1577 break;
1578 default: 1572 default:
1579 dev_err(codec->dev, "Unsupported DAI format %d\n", 1573 dev_err(codec->dev, "Unsupported DAI format %d\n",
1580 fmt & SND_SOC_DAIFMT_FORMAT_MASK); 1574 fmt & SND_SOC_DAIFMT_FORMAT_MASK);
@@ -1626,7 +1620,7 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
1626 WM2200_AIF1TX_LRCLK_MSTR | WM2200_AIF1TX_LRCLK_INV, 1620 WM2200_AIF1TX_LRCLK_MSTR | WM2200_AIF1TX_LRCLK_INV,
1627 lrclk); 1621 lrclk);
1628 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_5, 1622 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_5,
1629 WM2200_AIF1_FMT_MASK << 1, fmt_val << 1); 1623 WM2200_AIF1_FMT_MASK, fmt_val);
1630 1624
1631 return 0; 1625 return 0;
1632} 1626}
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 5a5f36936235..54397a508073 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -1279,15 +1279,9 @@ static int wm5100_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
1279 case SND_SOC_DAIFMT_DSP_A: 1279 case SND_SOC_DAIFMT_DSP_A:
1280 mask = 0; 1280 mask = 0;
1281 break; 1281 break;
1282 case SND_SOC_DAIFMT_DSP_B:
1283 mask = 1;
1284 break;
1285 case SND_SOC_DAIFMT_I2S: 1282 case SND_SOC_DAIFMT_I2S:
1286 mask = 2; 1283 mask = 2;
1287 break; 1284 break;
1288 case SND_SOC_DAIFMT_LEFT_J:
1289 mask = 3;
1290 break;
1291 default: 1285 default:
1292 dev_err(codec->dev, "Unsupported DAI format %d\n", 1286 dev_err(codec->dev, "Unsupported DAI format %d\n",
1293 fmt & SND_SOC_DAIFMT_FORMAT_MASK); 1287 fmt & SND_SOC_DAIFMT_FORMAT_MASK);
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 688ade080589..7a9048dad1cd 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -36,6 +36,9 @@
36struct wm5102_priv { 36struct wm5102_priv {
37 struct arizona_priv core; 37 struct arizona_priv core;
38 struct arizona_fll fll[2]; 38 struct arizona_fll fll[2];
39
40 unsigned int spk_ena:2;
41 unsigned int spk_ena_pending:1;
39}; 42};
40 43
41static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0); 44static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0);
@@ -787,6 +790,47 @@ ARIZONA_MIXER_CONTROLS("AIF3TX1", ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE),
787ARIZONA_MIXER_CONTROLS("AIF3TX2", ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE), 790ARIZONA_MIXER_CONTROLS("AIF3TX2", ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE),
788}; 791};
789 792
793static int wm5102_spk_ev(struct snd_soc_dapm_widget *w,
794 struct snd_kcontrol *kcontrol,
795 int event)
796{
797 struct snd_soc_codec *codec = w->codec;
798 struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
799 struct wm5102_priv *wm5102 = snd_soc_codec_get_drvdata(codec);
800
801 if (arizona->rev < 1)
802 return 0;
803
804 switch (event) {
805 case SND_SOC_DAPM_PRE_PMU:
806 if (!wm5102->spk_ena) {
807 snd_soc_write(codec, 0x4f5, 0x25a);
808 wm5102->spk_ena_pending = true;
809 }
810 break;
811 case SND_SOC_DAPM_POST_PMU:
812 if (wm5102->spk_ena_pending) {
813 msleep(75);
814 snd_soc_write(codec, 0x4f5, 0xda);
815 wm5102->spk_ena_pending = false;
816 wm5102->spk_ena++;
817 }
818 break;
819 case SND_SOC_DAPM_PRE_PMD:
820 wm5102->spk_ena--;
821 if (!wm5102->spk_ena)
822 snd_soc_write(codec, 0x4f5, 0x25a);
823 break;
824 case SND_SOC_DAPM_POST_PMD:
825 if (!wm5102->spk_ena)
826 snd_soc_write(codec, 0x4f5, 0x0da);
827 break;
828 }
829
830 return 0;
831}
832
833
790ARIZONA_MIXER_ENUMS(EQ1, ARIZONA_EQ1MIX_INPUT_1_SOURCE); 834ARIZONA_MIXER_ENUMS(EQ1, ARIZONA_EQ1MIX_INPUT_1_SOURCE);
791ARIZONA_MIXER_ENUMS(EQ2, ARIZONA_EQ2MIX_INPUT_1_SOURCE); 835ARIZONA_MIXER_ENUMS(EQ2, ARIZONA_EQ2MIX_INPUT_1_SOURCE);
792ARIZONA_MIXER_ENUMS(EQ3, ARIZONA_EQ3MIX_INPUT_1_SOURCE); 836ARIZONA_MIXER_ENUMS(EQ3, ARIZONA_EQ3MIX_INPUT_1_SOURCE);
@@ -1034,10 +1078,10 @@ SND_SOC_DAPM_PGA_E("OUT3L", ARIZONA_OUTPUT_ENABLES_1,
1034 ARIZONA_OUT3L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, 1078 ARIZONA_OUT3L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev,
1035 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 1079 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
1036SND_SOC_DAPM_PGA_E("OUT4L", ARIZONA_OUTPUT_ENABLES_1, 1080SND_SOC_DAPM_PGA_E("OUT4L", ARIZONA_OUTPUT_ENABLES_1,
1037 ARIZONA_OUT4L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, 1081 ARIZONA_OUT4L_ENA_SHIFT, 0, NULL, 0, wm5102_spk_ev,
1038 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 1082 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
1039SND_SOC_DAPM_PGA_E("OUT4R", ARIZONA_OUTPUT_ENABLES_1, 1083SND_SOC_DAPM_PGA_E("OUT4R", ARIZONA_OUTPUT_ENABLES_1,
1040 ARIZONA_OUT4R_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, 1084 ARIZONA_OUT4R_ENA_SHIFT, 0, NULL, 0, wm5102_spk_ev,
1041 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 1085 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
1042SND_SOC_DAPM_PGA_E("OUT5L", ARIZONA_OUTPUT_ENABLES_1, 1086SND_SOC_DAPM_PGA_E("OUT5L", ARIZONA_OUTPUT_ENABLES_1,
1043 ARIZONA_OUT5L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, 1087 ARIZONA_OUT5L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev,
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index ffc89fab96fb..7b198c38f3ef 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -169,6 +169,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
169 const struct wm_adsp_region *mem; 169 const struct wm_adsp_region *mem;
170 const char *region_name; 170 const char *region_name;
171 char *file, *text; 171 char *file, *text;
172 void *buf;
172 unsigned int reg; 173 unsigned int reg;
173 int regions = 0; 174 int regions = 0;
174 int ret, offset, type, sizes; 175 int ret, offset, type, sizes;
@@ -322,8 +323,18 @@ static int wm_adsp_load(struct wm_adsp *dsp)
322 } 323 }
323 324
324 if (reg) { 325 if (reg) {
325 ret = regmap_raw_write(regmap, reg, region->data, 326 buf = kmemdup(region->data, le32_to_cpu(region->len),
327 GFP_KERNEL);
328 if (!buf) {
329 adsp_err(dsp, "Out of memory\n");
330 return -ENOMEM;
331 }
332
333 ret = regmap_raw_write(regmap, reg, buf,
326 le32_to_cpu(region->len)); 334 le32_to_cpu(region->len));
335
336 kfree(buf);
337
327 if (ret != 0) { 338 if (ret != 0) {
328 adsp_err(dsp, 339 adsp_err(dsp,
329 "%s.%d: Failed to write %d bytes at %d in %s: %d\n", 340 "%s.%d: Failed to write %d bytes at %d in %s: %d\n",
@@ -359,6 +370,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
359 const char *region_name; 370 const char *region_name;
360 int ret, pos, blocks, type, offset, reg; 371 int ret, pos, blocks, type, offset, reg;
361 char *file; 372 char *file;
373 void *buf;
362 374
363 file = kzalloc(PAGE_SIZE, GFP_KERNEL); 375 file = kzalloc(PAGE_SIZE, GFP_KERNEL);
364 if (file == NULL) 376 if (file == NULL)
@@ -426,6 +438,13 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
426 } 438 }
427 439
428 if (reg) { 440 if (reg) {
441 buf = kmemdup(blk->data, le32_to_cpu(blk->len),
442 GFP_KERNEL);
443 if (!buf) {
444 adsp_err(dsp, "Out of memory\n");
445 return -ENOMEM;
446 }
447
429 ret = regmap_raw_write(regmap, reg, blk->data, 448 ret = regmap_raw_write(regmap, reg, blk->data,
430 le32_to_cpu(blk->len)); 449 le32_to_cpu(blk->len));
431 if (ret != 0) { 450 if (ret != 0) {
@@ -433,6 +452,8 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
433 "%s.%d: Failed to write to %x in %s\n", 452 "%s.%d: Failed to write to %x in %s\n",
434 file, blocks, reg, region_name); 453 file, blocks, reg, region_name);
435 } 454 }
455
456 kfree(buf);
436 } 457 }
437 458
438 pos += le32_to_cpu(blk->len) + sizeof(*blk); 459 pos += le32_to_cpu(blk->len) + sizeof(*blk);
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 91d592ff67b7..2370063b5824 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1255,6 +1255,8 @@ static int soc_post_component_init(struct snd_soc_card *card,
1255 INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_CAPTURE].fe_clients); 1255 INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_CAPTURE].fe_clients);
1256 ret = device_add(rtd->dev); 1256 ret = device_add(rtd->dev);
1257 if (ret < 0) { 1257 if (ret < 0) {
1258 /* calling put_device() here to free the rtd->dev */
1259 put_device(rtd->dev);
1258 dev_err(card->dev, 1260 dev_err(card->dev,
1259 "ASoC: failed to register runtime device: %d\n", ret); 1261 "ASoC: failed to register runtime device: %d\n", ret);
1260 return ret; 1262 return ret;
@@ -1554,7 +1556,7 @@ static void soc_remove_aux_dev(struct snd_soc_card *card, int num)
1554 /* unregister the rtd device */ 1556 /* unregister the rtd device */
1555 if (rtd->dev_registered) { 1557 if (rtd->dev_registered) {
1556 device_remove_file(rtd->dev, &dev_attr_codec_reg); 1558 device_remove_file(rtd->dev, &dev_attr_codec_reg);
1557 device_del(rtd->dev); 1559 device_unregister(rtd->dev);
1558 rtd->dev_registered = 0; 1560 rtd->dev_registered = 0;
1559 } 1561 }
1560 1562
@@ -2917,7 +2919,7 @@ int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol,
2917 platform_max = mc->platform_max; 2919 platform_max = mc->platform_max;
2918 2920
2919 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 2921 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
2920 uinfo->count = 1; 2922 uinfo->count = snd_soc_volsw_is_stereo(mc) ? 2 : 1;
2921 uinfo->value.integer.min = 0; 2923 uinfo->value.integer.min = 0;
2922 uinfo->value.integer.max = platform_max - min; 2924 uinfo->value.integer.max = platform_max - min;
2923 2925
@@ -2941,12 +2943,14 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
2941 (struct soc_mixer_control *)kcontrol->private_value; 2943 (struct soc_mixer_control *)kcontrol->private_value;
2942 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 2944 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
2943 unsigned int reg = mc->reg; 2945 unsigned int reg = mc->reg;
2946 unsigned int rreg = mc->rreg;
2944 unsigned int shift = mc->shift; 2947 unsigned int shift = mc->shift;
2945 int min = mc->min; 2948 int min = mc->min;
2946 int max = mc->max; 2949 int max = mc->max;
2947 unsigned int mask = (1 << fls(max)) - 1; 2950 unsigned int mask = (1 << fls(max)) - 1;
2948 unsigned int invert = mc->invert; 2951 unsigned int invert = mc->invert;
2949 unsigned int val, val_mask; 2952 unsigned int val, val_mask;
2953 int ret;
2950 2954
2951 val = ((ucontrol->value.integer.value[0] + min) & mask); 2955 val = ((ucontrol->value.integer.value[0] + min) & mask);
2952 if (invert) 2956 if (invert)
@@ -2954,7 +2958,21 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
2954 val_mask = mask << shift; 2958 val_mask = mask << shift;
2955 val = val << shift; 2959 val = val << shift;
2956 2960
2957 return snd_soc_update_bits_locked(codec, reg, val_mask, val); 2961 ret = snd_soc_update_bits_locked(codec, reg, val_mask, val);
2962 if (ret != 0)
2963 return ret;
2964
2965 if (snd_soc_volsw_is_stereo(mc)) {
2966 val = ((ucontrol->value.integer.value[1] + min) & mask);
2967 if (invert)
2968 val = max - val;
2969 val_mask = mask << shift;
2970 val = val << shift;
2971
2972 ret = snd_soc_update_bits_locked(codec, rreg, val_mask, val);
2973 }
2974
2975 return ret;
2958} 2976}
2959EXPORT_SYMBOL_GPL(snd_soc_put_volsw_range); 2977EXPORT_SYMBOL_GPL(snd_soc_put_volsw_range);
2960 2978
@@ -2974,6 +2992,7 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
2974 (struct soc_mixer_control *)kcontrol->private_value; 2992 (struct soc_mixer_control *)kcontrol->private_value;
2975 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 2993 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
2976 unsigned int reg = mc->reg; 2994 unsigned int reg = mc->reg;
2995 unsigned int rreg = mc->rreg;
2977 unsigned int shift = mc->shift; 2996 unsigned int shift = mc->shift;
2978 int min = mc->min; 2997 int min = mc->min;
2979 int max = mc->max; 2998 int max = mc->max;
@@ -2988,6 +3007,16 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
2988 ucontrol->value.integer.value[0] = 3007 ucontrol->value.integer.value[0] =
2989 ucontrol->value.integer.value[0] - min; 3008 ucontrol->value.integer.value[0] - min;
2990 3009
3010 if (snd_soc_volsw_is_stereo(mc)) {
3011 ucontrol->value.integer.value[1] =
3012 (snd_soc_read(codec, rreg) >> shift) & mask;
3013 if (invert)
3014 ucontrol->value.integer.value[1] =
3015 max - ucontrol->value.integer.value[1];
3016 ucontrol->value.integer.value[1] =
3017 ucontrol->value.integer.value[1] - min;
3018 }
3019
2991 return 0; 3020 return 0;
2992} 3021}
2993EXPORT_SYMBOL_GPL(snd_soc_get_volsw_range); 3022EXPORT_SYMBOL_GPL(snd_soc_get_volsw_range);
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index d7711fce119b..cf191e6aebbe 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1243,6 +1243,7 @@ static int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream)
1243 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && 1243 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
1244 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && 1244 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
1245 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && 1245 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
1246 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) &&
1246 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) 1247 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP))
1247 continue; 1248 continue;
1248 1249
diff --git a/tools/testing/selftests/ipc/Makefile b/tools/testing/selftests/ipc/Makefile
new file mode 100644
index 000000000000..5386fd7c43ae
--- /dev/null
+++ b/tools/testing/selftests/ipc/Makefile
@@ -0,0 +1,25 @@
1uname_M := $(shell uname -m 2>/dev/null || echo not)
2ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
3ifeq ($(ARCH),i386)
4 ARCH := X86
5 CFLAGS := -DCONFIG_X86_32 -D__i386__
6endif
7ifeq ($(ARCH),x86_64)
8 ARCH := X86
9 CFLAGS := -DCONFIG_X86_64 -D__x86_64__
10endif
11
12CFLAGS += -I../../../../usr/include/
13
14all:
15ifeq ($(ARCH),X86)
16 gcc $(CFLAGS) msgque.c -o msgque_test
17else
18 echo "Not an x86 target, can't build msgque selftest"
19endif
20
21run_tests: all
22 ./msgque_test
23
24clean:
25 rm -fr ./msgque_test
diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c
new file mode 100644
index 000000000000..d66418237d21
--- /dev/null
+++ b/tools/testing/selftests/ipc/msgque.c
@@ -0,0 +1,246 @@
1#include <stdlib.h>
2#include <stdio.h>
3#include <string.h>
4#include <errno.h>
5#include <linux/msg.h>
6#include <fcntl.h>
7
8#define MAX_MSG_SIZE 32
9
10struct msg1 {
11 int msize;
12 long mtype;
13 char mtext[MAX_MSG_SIZE];
14};
15
16#define TEST_STRING "Test sysv5 msg"
17#define MSG_TYPE 1
18
19#define ANOTHER_TEST_STRING "Yet another test sysv5 msg"
20#define ANOTHER_MSG_TYPE 26538
21
22struct msgque_data {
23 key_t key;
24 int msq_id;
25 int qbytes;
26 int qnum;
27 int mode;
28 struct msg1 *messages;
29};
30
31int restore_queue(struct msgque_data *msgque)
32{
33 int fd, ret, id, i;
34 char buf[32];
35
36 fd = open("/proc/sys/kernel/msg_next_id", O_WRONLY);
37 if (fd == -1) {
38 printf("Failed to open /proc/sys/kernel/msg_next_id\n");
39 return -errno;
40 }
41 sprintf(buf, "%d", msgque->msq_id);
42
43 ret = write(fd, buf, strlen(buf));
44 if (ret != strlen(buf)) {
45 printf("Failed to write to /proc/sys/kernel/msg_next_id\n");
46 return -errno;
47 }
48
49 id = msgget(msgque->key, msgque->mode | IPC_CREAT | IPC_EXCL);
50 if (id == -1) {
51 printf("Failed to create queue\n");
52 return -errno;
53 }
54
55 if (id != msgque->msq_id) {
56 printf("Restored queue has wrong id (%d instead of %d)\n",
57 id, msgque->msq_id);
58 ret = -EFAULT;
59 goto destroy;
60 }
61
62 for (i = 0; i < msgque->qnum; i++) {
63 if (msgsnd(msgque->msq_id, &msgque->messages[i].mtype,
64 msgque->messages[i].msize, IPC_NOWAIT) != 0) {
65 printf("msgsnd failed (%m)\n");
66 ret = -errno;
67 goto destroy;
68 };
69 }
70 return 0;
71
72destroy:
73 if (msgctl(id, IPC_RMID, 0))
74 printf("Failed to destroy queue: %d\n", -errno);
75 return ret;
76}
77
78int check_and_destroy_queue(struct msgque_data *msgque)
79{
80 struct msg1 message;
81 int cnt = 0, ret;
82
83 while (1) {
84 ret = msgrcv(msgque->msq_id, &message.mtype, MAX_MSG_SIZE,
85 0, IPC_NOWAIT);
86 if (ret < 0) {
87 if (errno == ENOMSG)
88 break;
89 printf("Failed to read IPC message: %m\n");
90 ret = -errno;
91 goto err;
92 }
93 if (ret != msgque->messages[cnt].msize) {
94 printf("Wrong message size: %d (expected %d)\n", ret,
95 msgque->messages[cnt].msize);
96 ret = -EINVAL;
97 goto err;
98 }
99 if (message.mtype != msgque->messages[cnt].mtype) {
100 printf("Wrong message type\n");
101 ret = -EINVAL;
102 goto err;
103 }
104 if (memcmp(message.mtext, msgque->messages[cnt].mtext, ret)) {
105 printf("Wrong message content\n");
106 ret = -EINVAL;
107 goto err;
108 }
109 cnt++;
110 }
111
112 if (cnt != msgque->qnum) {
113 printf("Wrong message number\n");
114 ret = -EINVAL;
115 goto err;
116 }
117
118 ret = 0;
119err:
120 if (msgctl(msgque->msq_id, IPC_RMID, 0)) {
121 printf("Failed to destroy queue: %d\n", -errno);
122 return -errno;
123 }
124 return ret;
125}
126
127int dump_queue(struct msgque_data *msgque)
128{
129 struct msqid64_ds ds;
130 int kern_id;
131 int i, ret;
132
133 for (kern_id = 0; kern_id < 256; kern_id++) {
134 ret = msgctl(kern_id, MSG_STAT, &ds);
135 if (ret < 0) {
136 if (errno == -EINVAL)
137 continue;
138 printf("Failed to get stats for IPC queue with id %d\n",
139 kern_id);
140 return -errno;
141 }
142
143 if (ret == msgque->msq_id)
144 break;
145 }
146
147 msgque->messages = malloc(sizeof(struct msg1) * ds.msg_qnum);
148 if (msgque->messages == NULL) {
149 printf("Failed to get stats for IPC queue\n");
150 return -ENOMEM;
151 }
152
153 msgque->qnum = ds.msg_qnum;
154 msgque->mode = ds.msg_perm.mode;
155 msgque->qbytes = ds.msg_qbytes;
156
157 for (i = 0; i < msgque->qnum; i++) {
158 ret = msgrcv(msgque->msq_id, &msgque->messages[i].mtype,
159 MAX_MSG_SIZE, i, IPC_NOWAIT | MSG_COPY);
160 if (ret < 0) {
161 printf("Failed to copy IPC message: %m (%d)\n", errno);
162 return -errno;
163 }
164 msgque->messages[i].msize = ret;
165 }
166 return 0;
167}
168
169int fill_msgque(struct msgque_data *msgque)
170{
171 struct msg1 msgbuf;
172
173 msgbuf.mtype = MSG_TYPE;
174 memcpy(msgbuf.mtext, TEST_STRING, sizeof(TEST_STRING));
175 if (msgsnd(msgque->msq_id, &msgbuf.mtype, sizeof(TEST_STRING),
176 IPC_NOWAIT) != 0) {
177 printf("First message send failed (%m)\n");
178 return -errno;
179 };
180
181 msgbuf.mtype = ANOTHER_MSG_TYPE;
182 memcpy(msgbuf.mtext, ANOTHER_TEST_STRING, sizeof(ANOTHER_TEST_STRING));
183 if (msgsnd(msgque->msq_id, &msgbuf.mtype, sizeof(ANOTHER_TEST_STRING),
184 IPC_NOWAIT) != 0) {
185 printf("Second message send failed (%m)\n");
186 return -errno;
187 };
188 return 0;
189}
190
191int main(int argc, char **argv)
192{
193 int msg, pid, err;
194 struct msgque_data msgque;
195
196 msgque.key = ftok(argv[0], 822155650);
197 if (msgque.key == -1) {
198 printf("Can't make key\n");
199 return -errno;
200 }
201
202 msgque.msq_id = msgget(msgque.key, IPC_CREAT | IPC_EXCL | 0666);
203 if (msgque.msq_id == -1) {
204 printf("Can't create queue\n");
205 goto err_out;
206 }
207
208 err = fill_msgque(&msgque);
209 if (err) {
210 printf("Failed to fill queue\n");
211 goto err_destroy;
212 }
213
214 err = dump_queue(&msgque);
215 if (err) {
216 printf("Failed to dump queue\n");
217 goto err_destroy;
218 }
219
220 err = check_and_destroy_queue(&msgque);
221 if (err) {
222 printf("Failed to check and destroy queue\n");
223 goto err_out;
224 }
225
226 err = restore_queue(&msgque);
227 if (err) {
228 printf("Failed to restore queue\n");
229 goto err_destroy;
230 }
231
232 err = check_and_destroy_queue(&msgque);
233 if (err) {
234 printf("Failed to test queue\n");
235 goto err_out;
236 }
237 return 0;
238
239err_destroy:
240 if (msgctl(msgque.msq_id, IPC_RMID, 0)) {
241 printf("Failed to destroy queue: %d\n", -errno);
242 return -errno;
243 }
244err_out:
245 return err;
246}