All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: More modaliases + patchtool
       [not found] <4C6BE292.3060307@bspu.unibel.by>
@ 2010-08-19  0:50 ` Rusty Russell
  2010-08-19 14:58   ` #3 (Re: More modaliases + patchtool) Dzianis Kahanovich
       [not found]   ` <4C6D26BC.9040805@bspu.unibel.by>
  0 siblings, 2 replies; 28+ messages in thread
From: Rusty Russell @ 2010-08-19  0:50 UTC (permalink / raw)
  To: mahatma; +Cc: linux-kernel

On Wed, 18 Aug 2010 11:09:30 pm Dzianis Kahanovich wrote:
> First I post into linux-modules@vger.kernel.org, but Jon Masters suggest to
> send this to you. There are some more against maillist:
> 
> Some of modules have no MODULE_DEVICE_TABLE(...) and do not export hardware
> ("pnp") aliases, but have all required data to do this. I found it after
> ioatdma module (currently fixed in tree). This information may be useful to
> hardware/modules detection.

> [+] Also known problem: 2 modules (in 2.6.36 state) - scx200_acb.c & pch_dma.c
> - have not NULL-terminated pci_device_id record. This is "easy" to fix, but
> currently I excluding this modules in script. For you I attaching patch for
> this modules and related script ("modulesfix4patched") too.

Thanks, can you format that patch with a simple description and a
Signed-off-by: line and I'll apply it (see Documentation/SubmittingPatches,
especially part 12).

Then can you send me another patch with the results of your script.

Finally, I suggest that your script should only fix files when passed --fix,
and create a config option to run it (without --fix) under in
lib/Kconfig.debug.

Thanks!
Rusty.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* #3 (Re: More modaliases + patchtool)
  2010-08-19  0:50 ` More modaliases + patchtool Rusty Russell
@ 2010-08-19 14:58   ` Dzianis Kahanovich
       [not found]   ` <4C6D26BC.9040805@bspu.unibel.by>
  1 sibling, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-08-19 14:58 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

Rusty Russell пишет:

> Finally, I suggest that your script should only fix files when passed --fix,
> and create a config option to run it (without --fix) under in
> lib/Kconfig.debug.

This is fixed script and patch for lib/Kconfig.debug & Makefile.
I am unsure in patch (mostly Makefile inclusions) - FIXME.
For example, I unsure in "PHONY += check_modaliases" requirement (and sense).

Also may be suggested negative exitcode to strict check. (?)

-- 
WBR, Dzianis Kahanovich AKA Denis Kaganovich, http://mahatma.bspu.unibel.by/


[-- Attachment #2: modulesfix --]
[-- Type: text/plain, Size: 1302 bytes --]

#!/bin/bash
## (c) Denis Kaganovich
## v5
## grep-pcre required

#BUS="pci"
BUS="\w+"

STR="^(?:static\s+)?(?:const\s+)?struct\s+"

fnd(){
local msg="Fixing:"
$fix || msg="Need to fix:"
grep -Prhl "${STR}${BUS}_device_id\s+" $1 --include="*.c" | while read i ; do
	local bus=`grep -Prho "${STR}${BUS}_device_id.*\s+" $i`
	bus="${bus#*struct }"
	local n="${bus%%[*}"
	n="${n%%=*}"
	n="${n##*device_id }"
	n="${n// }"
	bus="${bus%%_device_id*}"
	grep -Pq "^module_init\s*\(" $i || continue
	grep -q "MODULE_DEVICE_TABLE" $i && continue
	local ii="${i#$1}"
	ii="${ii#/}"

#	case $ii in
#	*/mdio-gpio.c)
#		echo "BROKEN: $bus: $ii"
#		continue
#	;;
#	esac

	bus="${bus%%_*}"
	local BU
	case "$bus" in
	sdio)BU=MMC;;
	*)BU="${bus^^}";;
	esac
	if grep -Prq "^\s*(?:menu)?config\s+$BU(?:\s.*)?$" $1 --include="Kconfig*"; then
		echo "$msg $BU: ($n) $ii"
		$fix && sed -i -e 's/^\(module_init.*\)$/\n#ifdef CONFIG_'"$BU"'\nMODULE_DEVICE_TABLE('"$bus, $n"');\n#endif\n\n\1/' $i
	else
		echo "$msg $bus: ($n) $ii"
		$fix && sed -i -e 's/^\(module_init.*\)$/\nMODULE_DEVICE_TABLE('"$bus, $n"');\n\n\1/' $i
	fi
done
}

p=""
fix=false
while [[ -n "$*" ]]; do
	case "$1" in
	--fix)fix=true;;
	*)p="$p $1";;
	esac
	shift
done
[[ -z "$p" ]] && echo "$0 [--fix] <path_to_kernel>
(grep+pcre required)" && exit 1

fnd $p

[-- Attachment #3: modulesfix_config.patch --]
[-- Type: text/plain, Size: 1693 bytes --]

Run "scripts/modulesfix" if CONFIG_CHECK_MODULE_DEVICE_TABLE.

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

diff -pruN b/lib/Kconfig.debug c/lib/Kconfig.debug
--- b/lib/Kconfig.debug	2010-08-19 15:20:58.000000000 +0300
+++ c/lib/Kconfig.debug	2010-08-19 17:33:12.594764954 +0300
@@ -1147,6 +1147,13 @@ config ATOMIC64_SELFTEST
 
 	  If unsure, say N.
 
+config CHECK_MODULE_DEVICE_TABLE
+	bool "Perform check MODULE_DEVICE_TABLE in modules"
+	help
+	  Enable this option to check MODULE_DEVICE_TABLE in modules.
+	  Some of new modules sometimes have no MODULE_DEVICE_TABLE declaration
+	  and do not export hardware module alias. Say Y to find this modules.
+
 source "samples/Kconfig"
 
 source "lib/Kconfig.kgdb"
diff -pruN b/Makefile c/Makefile
--- b/Makefile	2010-08-19 15:20:58.000000000 +0300
+++ c/Makefile	2010-08-19 17:43:05.044764987 +0300
@@ -874,6 +874,13 @@ ifdef CONFIG_KALLSYMS
 .tmp_vmlinux1: vmlinux.o
 endif
 
+ifdef CONFIG_CHECK_MODULE_DEVICE_TABLE
+check_modaliases:
+	$(srctree)/scripts/modulesfix $(srctree)
+else
+check_modaliases:
+endif
+
 modpost-init := $(filter-out init/built-in.o, $(vmlinux-init))
 vmlinux.o: $(modpost-init) $(vmlinux-main) FORCE
 	$(call if_changed_rule,vmlinux-modpost)
@@ -1034,7 +1041,7 @@ all: modules
 #	using awk while concatenating to the final file.
 
 PHONY += modules
-modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
+modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin check_modaliases
 	$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
 	@$(kecho) '  Building modules, stage 2.';
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: #2 (Re: More modaliases + patchtool)
       [not found]   ` <4C6D26BC.9040805@bspu.unibel.by>
@ 2010-09-11  2:14     ` Rusty Russell
  2010-09-11  3:36       ` Jeremy Fitzhardinge
                         ` (17 more replies)
  0 siblings, 18 replies; 28+ messages in thread
From: Rusty Russell @ 2010-09-11  2:14 UTC (permalink / raw)
  To: mahatma; +Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

On Thu, 19 Aug 2010 10:12:36 pm Dzianis Kahanovich wrote:
> diff -pruN a/arch/ia64/hp/common/aml_nfw.c b/arch/ia64/hp/common/aml_nfw.c
> --- a/arch/ia64/hp/common/aml_nfw.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/arch/ia64/hp/common/aml_nfw.c	2010-08-19 15:23:40.124764995 +0300
> @@ -232,5 +232,10 @@ static void __exit aml_nfw_exit(void)
>  	aml_nfw_remove_global_handler();
>  }
>  
> +
> +#ifdef CONFIG_ACPI
> +MODULE_DEVICE_TABLE(acpi, aml_nfw_ids);
> +#endif
> +
>  module_init(aml_nfw_init);
>  module_exit(aml_nfw_exit);

Hi Dzianis,

   Sorry it took me so long to reply.  It looks very much like some of
these cannot be modules anyway.  aml_nfw can't be (the Kconfig is a bool).
Strange that it has an exit function!

> diff -pruN a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
> --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c	2010-08-19 15:20:56.064764994 +0300
> +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c	2010-08-19 15:23:40.254764992 +0300
> @@ -554,6 +554,11 @@ static int __init mpc52xx_lpbfifo_init(v
>  	pr_debug("Registering LocalPlus bus FIFO driver\n");
>  	return of_register_platform_driver(&mpc52xx_lpbfifo_driver);
>  }
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, mpc52xx_lpbfifo_match);
> +#endif
> +
>  module_init(mpc52xx_lpbfifo_init);
>  
>  static void __exit mpc52xx_lpbfifo_exit(void)
> diff -pruN a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
> --- a/arch/powerpc/platforms/83xx/suspend.c	2010-08-19 15:20:56.064764994 +0300
> +++ b/arch/powerpc/platforms/83xx/suspend.c	2010-08-19 15:23:40.364764995 +0300
> @@ -437,4 +437,9 @@ static int pmc_init(void)
>  	return of_register_platform_driver(&pmc_driver);
>  }
>  
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, pmc_match);
> +#endif
> +
>  module_init(pmc_init);
> diff -pruN a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
> --- a/arch/powerpc/sysdev/axonram.c	2010-08-19 15:20:56.074764995 +0300
> +++ b/arch/powerpc/sysdev/axonram.c	2010-08-19 15:23:40.514764994 +0300
> @@ -363,6 +363,11 @@ axon_ram_exit(void)
>  	unregister_blkdev(azfs_major, AXON_RAM_DEVICE_NAME);
>  }
>  
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, axon_ram_device_id);
> +#endif
> +
>  module_init(axon_ram_init);
>  module_exit(axon_ram_exit);

These seem valid at a glance, but should go through the PowerPC maintainer.
  
> diff -pruN a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
> --- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c	2010-08-19 15:20:56.234765003 +0300
> +++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c	2010-08-19 15:23:40.564764991 +0300
> @@ -512,6 +512,11 @@ MODULE_AUTHOR("Hiroshi Miura <miura@da-c
>  MODULE_DESCRIPTION("Cpufreq driver for Cyrix MediaGX and NatSemi Geode");
>  MODULE_LICENSE("GPL");
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, gx_chipset_tbl);
> +#endif
> +
>  module_init(cpufreq_gx_init);
>  module_exit(cpufreq_gx_exit);
>  
> diff -pruN a/drivers/block/swim3.c b/drivers/block/swim3.c
> --- a/drivers/block/swim3.c	2010-08-19 15:20:56.344764984 +0300
> +++ b/drivers/block/swim3.c	2010-08-19 15:23:40.954764998 +0300
> @@ -1203,6 +1203,11 @@ int swim3_init(void)
>  	return 0;
>  }
>  
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, swim3_match);
> +#endif
> +
>  module_init(swim3_init)
>  
>  MODULE_LICENSE("GPL");
> diff -pruN a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> --- a/drivers/block/xen-blkfront.c	2010-08-19 15:20:56.344764984 +0300
> +++ b/drivers/block/xen-blkfront.c	2010-08-19 15:23:41.104764997 +0300
> @@ -1306,6 +1306,9 @@ static int __init xlblk_init(void)
>  
>  	return xenbus_register_frontend(&blkfront);
>  }
> +
> +MODULE_DEVICE_TABLE(xenbus, blkfront_ids);
> +
>  module_init(xlblk_init);

This seems very logical.  Jeremy?

> diff -pruN a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c
> --- a/drivers/char/hw_random/pasemi-rng.c	2010-08-19 15:20:56.354764978 +0300
> +++ b/drivers/char/hw_random/pasemi-rng.c	2010-08-19 15:23:41.284764991 +0300
> @@ -153,6 +153,11 @@ static int __init rng_init(void)
>  {
>  	return of_register_platform_driver(&rng_driver);
>  }
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, rng_match);
> +#endif
> +
>  module_init(rng_init);

Do we really need all these #ifdef CONFIG_OF wrappers?

>  static void __exit rng_exit(void)
> diff -pruN a/drivers/char/sonypi.c b/drivers/char/sonypi.c
> --- a/drivers/char/sonypi.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/drivers/char/sonypi.c	2010-08-19 15:23:41.374764992 +0300
> @@ -1565,5 +1565,10 @@ static void __exit sonypi_exit(void)
>  	printk(KERN_INFO "sonypi: removed.\n");
>  }
>  
> +
> +#ifdef CONFIG_ACPI
> +MODULE_DEVICE_TABLE(acpi, sonypi_device_ids);
> +#endif
> +
>  module_init(sonypi_init);
>  module_exit(sonypi_exit);
> diff -pruN a/drivers/char/sysrq.c b/drivers/char/sysrq.c
> --- a/drivers/char/sysrq.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/drivers/char/sysrq.c	2010-08-19 15:23:41.444764991 +0300
> @@ -799,4 +799,9 @@ static int __init sysrq_init(void)
>  
>  	return 0;
>  }
> +
> +#ifdef CONFIG_INPUT
> +MODULE_DEVICE_TABLE(input, sysrq_ids);
> +#endif
> +
>  module_init(sysrq_init);

Hmm, Dmitry?  Do we want this auto-loaded?

> diff -pruN a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c
> --- a/drivers/crypto/amcc/crypto4xx_core.c	2010-08-19 15:20:56.384765007 +0300
> +++ b/drivers/crypto/amcc/crypto4xx_core.c	2010-08-19 15:23:41.594764998 +0300
> @@ -1300,6 +1300,11 @@ static void __exit crypto4xx_exit(void)
>  	of_unregister_platform_driver(&crypto4xx_driver);
>  }
>  
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, crypto4xx_match);
> +#endif
> +
>  module_init(crypto4xx_init);
>  module_exit(crypto4xx_exit);
>  
> diff -pruN a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c
> --- a/drivers/dma/mpc512x_dma.c	2010-08-19 15:20:56.384765007 +0300
> +++ b/drivers/dma/mpc512x_dma.c	2010-08-19 15:23:41.714764994 +0300
> @@ -784,6 +784,11 @@ static int __init mpc_dma_init(void)
>  {
>  	return of_register_platform_driver(&mpc_dma_driver);
>  }
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, mpc_dma_match);
> +#endif
> +
>  module_init(mpc_dma_init);
>  
>  static void __exit mpc_dma_exit(void)
> diff -pruN a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
> --- a/drivers/dma/pch_dma.c	2010-08-19 15:24:05.484765021 +0300
> +++ b/drivers/dma/pch_dma.c	2010-08-19 15:23:41.624764993 +0300
> @@ -950,6 +950,11 @@ static void __exit pch_dma_exit(void)
>  	pci_unregister_driver(&pch_dma_driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, pch_dma_id_table);
> +#endif
> +
>  module_init(pch_dma_init);
>  module_exit(pch_dma_exit);
>  
> diff -pruN a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
> --- a/drivers/edac/ppc4xx_edac.c	2010-08-19 15:20:56.394765000 +0300
> +++ b/drivers/edac/ppc4xx_edac.c	2010-08-19 15:23:41.864764986 +0300
> @@ -1437,6 +1437,11 @@ ppc4xx_edac_exit(void)
>  	of_unregister_platform_driver(&ppc4xx_edac_driver);
>  }
>  
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, ppc4xx_edac_match);
> +#endif
> +
>  module_init(ppc4xx_edac_init);
>  module_exit(ppc4xx_edac_exit);
>  
> diff -pruN a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
> --- a/drivers/gpu/drm/i810/i810_drv.c	2010-08-19 15:20:56.414764981 +0300
> +++ b/drivers/gpu/drm/i810/i810_drv.c	2010-08-19 15:23:41.924764989 +0300
> @@ -89,6 +89,11 @@ static void __exit i810_exit(void)
>  	drm_exit(&driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, pciidlist);
> +#endif
> +
>  module_init(i810_init);
>  module_exit(i810_exit);
>  
> diff -pruN a/drivers/gpu/drm/i830/i830_drv.c b/drivers/gpu/drm/i830/i830_drv.c
> --- a/drivers/gpu/drm/i830/i830_drv.c	2010-08-19 15:20:56.414764981 +0300
> +++ b/drivers/gpu/drm/i830/i830_drv.c	2010-08-19 15:23:41.944765010 +0300
> @@ -100,6 +100,11 @@ static void __exit i830_exit(void)
>  	drm_exit(&driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, pciidlist);
> +#endif
> +
>  module_init(i830_init);
>  module_exit(i830_exit);
>  
> diff -pruN a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c
> --- a/drivers/gpu/drm/mga/mga_drv.c	2010-08-19 15:20:56.424764989 +0300
> +++ b/drivers/gpu/drm/mga/mga_drv.c	2010-08-19 15:23:41.954765003 +0300
> @@ -100,6 +100,11 @@ static void __exit mga_exit(void)
>  	drm_exit(&driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, pciidlist);
> +#endif
> +
>  module_init(mga_init);
>  module_exit(mga_exit);
>  
> diff -pruN a/drivers/gpu/drm/r128/r128_drv.c b/drivers/gpu/drm/r128/r128_drv.c
> --- a/drivers/gpu/drm/r128/r128_drv.c	2010-08-19 15:20:56.454765003 +0300
> +++ b/drivers/gpu/drm/r128/r128_drv.c	2010-08-19 15:23:41.974764991 +0300
> @@ -102,6 +102,11 @@ static void __exit r128_exit(void)
>  	drm_exit(&driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, pciidlist);
> +#endif
> +
>  module_init(r128_init);
>  module_exit(r128_exit);
>  
> diff -pruN a/drivers/gpu/drm/savage/savage_drv.c b/drivers/gpu/drm/savage/savage_drv.c
> --- a/drivers/gpu/drm/savage/savage_drv.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/drivers/gpu/drm/savage/savage_drv.c	2010-08-19 15:23:41.994764993 +0300
> @@ -80,6 +80,11 @@ static void __exit savage_exit(void)
>  	drm_exit(&driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, pciidlist);
> +#endif
> +
>  module_init(savage_init);
>  module_exit(savage_exit);
>  
> diff -pruN a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c
> --- a/drivers/gpu/drm/sis/sis_drv.c	2010-08-19 15:20:56.474764991 +0300
> +++ b/drivers/gpu/drm/sis/sis_drv.c	2010-08-19 15:23:42.004764994 +0300
> @@ -108,6 +108,11 @@ static void __exit sis_exit(void)
>  	drm_exit(&driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, pciidlist);
> +#endif
> +
>  module_init(sis_init);
>  module_exit(sis_exit);
>  
> diff -pruN a/drivers/gpu/drm/tdfx/tdfx_drv.c b/drivers/gpu/drm/tdfx/tdfx_drv.c
> --- a/drivers/gpu/drm/tdfx/tdfx_drv.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/drivers/gpu/drm/tdfx/tdfx_drv.c	2010-08-19 15:23:42.024764996 +0300
> @@ -76,6 +76,11 @@ static void __exit tdfx_exit(void)
>  	drm_exit(&driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, pciidlist);
> +#endif
> +
>  module_init(tdfx_init);
>  module_exit(tdfx_exit);
>  
> diff -pruN a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c
> --- a/drivers/gpu/drm/via/via_drv.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/drivers/gpu/drm/via/via_drv.c	2010-08-19 15:23:42.034764997 +0300
> @@ -88,6 +88,11 @@ static void __exit via_exit(void)
>  	drm_exit(&driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, pciidlist);
> +#endif
> +
>  module_init(via_init);
>  module_exit(via_exit);
>  
> diff -pruN a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c	2010-08-19 15:20:56.484764992 +0300
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c	2010-08-19 15:23:42.044765004 +0300
> @@ -781,6 +781,11 @@ static void __exit vmwgfx_exit(void)
>  	drm_exit(&driver);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, vmw_pci_id_list);
> +#endif
> +
>  module_init(vmwgfx_init);
>  module_exit(vmwgfx_exit);
>  
> diff -pruN a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> --- a/drivers/hid/hid-core.c	2010-08-19 15:20:56.484764992 +0300
> +++ b/drivers/hid/hid-core.c	2010-08-19 15:23:42.244764996 +0300
> @@ -1957,6 +1957,11 @@ static void __exit hid_exit(void)
>  	bus_unregister(&hid_bus_type);
>  }
>  
> +
> +#ifdef CONFIG_HID
> +MODULE_DEVICE_TABLE(hid, hid_hiddev_list);
> +#endif
> +
>  module_init(hid_init);
>  module_exit(hid_exit);
>  
> diff -pruN a/drivers/hwmon/ad7414.c b/drivers/hwmon/ad7414.c
> --- a/drivers/hwmon/ad7414.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/drivers/hwmon/ad7414.c	2010-08-19 15:23:42.334765000 +0300
> @@ -254,6 +254,11 @@ static int __init ad7414_init(void)
>  {
>  	return i2c_add_driver(&ad7414_driver);
>  }
> +
> +#ifdef CONFIG_I2C
> +MODULE_DEVICE_TABLE(i2c, ad7414_id);
> +#endif
> +
>  module_init(ad7414_init);
>  
>  static void __exit ad7414_exit(void)
> diff -pruN a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c
> --- a/drivers/hwmon/adt7411.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/drivers/hwmon/adt7411.c	2010-08-19 15:23:42.434764993 +0300
> @@ -351,6 +351,11 @@ static int __init sensors_adt7411_init(v
>  {
>  	return i2c_add_driver(&adt7411_driver);
>  }
> +
> +#ifdef CONFIG_I2C
> +MODULE_DEVICE_TABLE(i2c, adt7411_id);
> +#endif
> +
>  module_init(sensors_adt7411_init)
>  
>  static void __exit sensors_adt7411_exit(void)
> diff -pruN a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
> --- a/drivers/i2c/busses/i2c-ibm_iic.c	2010-08-19 15:20:56.504764994 +0300
> +++ b/drivers/i2c/busses/i2c-ibm_iic.c	2010-08-19 15:23:42.814765003 +0300
> @@ -824,5 +824,10 @@ static void __exit iic_exit(void)
>  	of_unregister_platform_driver(&ibm_iic_driver);
>  }
>  
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, ibm_iic_match);
> +#endif
> +
>  module_init(iic_init);
>  module_exit(iic_exit);
> diff -pruN a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
> --- a/drivers/i2c/busses/scx200_acb.c	2010-08-19 15:24:05.484765021 +0300
> +++ b/drivers/i2c/busses/scx200_acb.c	2010-08-19 15:23:42.664764994 +0300
> @@ -654,5 +654,10 @@ static void __exit scx200_acb_cleanup(vo
>  	mutex_unlock(&scx200_acb_list_mutex);
>  }
>  
> +
> +#ifdef CONFIG_PCI
> +MODULE_DEVICE_TABLE(pci, scx200_pci);
> +#endif
> +
>  module_init(scx200_acb_init);
>  module_exit(scx200_acb_cleanup);
> diff -pruN a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
> --- a/drivers/ide/ide-pnp.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/drivers/ide/ide-pnp.c	2010-08-19 15:23:42.964764986 +0300
> @@ -105,6 +105,11 @@ static void __exit pnpide_exit(void)
>  	pnp_unregister_driver(&idepnp_driver);
>  }
>  
> +
> +#ifdef CONFIG_PNP
> +MODULE_DEVICE_TABLE(pnp, idepnp_devices);
> +#endif
> +
>  module_init(pnpide_init);
>  module_exit(pnpide_exit);
>  
> diff -pruN a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
> --- a/drivers/input/keyboard/hil_kbd.c	2010-08-19 15:20:56.534764997 +0300
> +++ b/drivers/input/keyboard/hil_kbd.c	2010-08-19 15:23:43.254765003 +0300
> @@ -591,5 +591,10 @@ static void __exit hil_dev_exit(void)
>  	serio_unregister_driver(&hil_serio_drv);
>  }
>  
> +
> +#ifdef CONFIG_SERIO
> +MODULE_DEVICE_TABLE(serio, hil_dev_ids);
> +#endif
> +
>  module_init(hil_dev_init);
>  module_exit(hil_dev_exit);
> diff -pruN a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
> --- a/drivers/input/misc/sparcspkr.c	2010-08-19 15:20:56.544765004 +0300
> +++ b/drivers/input/misc/sparcspkr.c	2010-08-19 15:23:43.394764978 +0300
> @@ -370,5 +370,10 @@ static void __exit sparcspkr_exit(void)
>  	of_unregister_platform_driver(&grover_beep_driver);
>  }
>  
> +
> +#ifdef CONFIG_OF
> +MODULE_DEVICE_TABLE(of, bbc_beep_match);
> +#endif
> +
>  module_init(sparcspkr_init);
>  module_exit(sparcspkr_exit);
> diff -pruN a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
> --- a/drivers/input/serio/hil_mlc.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/drivers/input/serio/hil_mlc.c	2010-08-19 15:23:43.494765003 +0300
> @@ -1010,5 +1010,10 @@ static void __exit hil_mlc_exit(void)
>  	tasklet_kill(&hil_mlcs_tasklet);
>  }
>  
> +
> +#ifdef CONFIG_SERIO
> +MODULE_DEVICE_TABLE(serio, hil_mlc_serio_id);
> +#endif
> +
>  module_init(hil_mlc_init);
>  module_exit(hil_mlc_exit);
> diff -pruN a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c
> --- a/drivers/input/xen-kbdfront.c	2010-08-19 15:20:56.554764997 +0300
> +++ b/drivers/input/xen-kbdfront.c	2010-08-19 15:23:43.754764993 +0300
> @@ -354,6 +354,9 @@ static void __exit xenkbd_cleanup(void)
>  	xenbus_unregister_driver(&xenkbd_driver);
>  }
>  
> +
> +MODULE_DEVICE_TABLE(xenbus, xenkbd_ids);
> +
>  module_init(xenkbd_init);
>  module_exit(xenkbd_cleanup);

This one, too, seems to make sense.

[ Remaining 2/3 of patch cut here ].

I think the best way to split this patch is by bus type.  Drop the #ifdef's
if you think it's a good idea, do some compile testing, then forward to the
specific maintainers for each type.  I'm happy to do that for you if you
want (though these kind of patches are Morton-worthy IMHO).

Cheers,
Rusty.


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: #2 (Re: More modaliases + patchtool)
  2010-09-11  2:14     ` #2 " Rusty Russell
@ 2010-09-11  3:36       ` Jeremy Fitzhardinge
  2010-09-13  3:03         ` Rusty Russell
  2010-09-11 17:51       ` Dmitry Torokhov
                         ` (16 subsequent siblings)
  17 siblings, 1 reply; 28+ messages in thread
From: Jeremy Fitzhardinge @ 2010-09-11  3:36 UTC (permalink / raw)
  To: Rusty Russell; +Cc: mahatma, linux-kernel, Dmitry Torokhov, Andrew Morton

 On 09/11/2010 12:14 PM, Rusty Russell wrote:
> On Thu, 19 Aug 2010 10:12:36 pm Dzianis Kahanovich wrote:
>> diff -pruN a/arch/ia64/hp/common/aml_nfw.c b/arch/ia64/hp/common/aml_nfw.c
>> --- a/arch/ia64/hp/common/aml_nfw.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/arch/ia64/hp/common/aml_nfw.c	2010-08-19 15:23:40.124764995 +0300
>> @@ -232,5 +232,10 @@ static void __exit aml_nfw_exit(void)
>>  	aml_nfw_remove_global_handler();
>>  }
>>  
>> +
>> +#ifdef CONFIG_ACPI
>> +MODULE_DEVICE_TABLE(acpi, aml_nfw_ids);
>> +#endif
>> +
>>  module_init(aml_nfw_init);
>>  module_exit(aml_nfw_exit);
> Hi Dzianis,
>
>    Sorry it took me so long to reply.  It looks very much like some of
> these cannot be modules anyway.  aml_nfw can't be (the Kconfig is a bool).
> Strange that it has an exit function!
>
>> diff -pruN a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
>> --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c	2010-08-19 15:20:56.064764994 +0300
>> +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c	2010-08-19 15:23:40.254764992 +0300
>> @@ -554,6 +554,11 @@ static int __init mpc52xx_lpbfifo_init(v
>>  	pr_debug("Registering LocalPlus bus FIFO driver\n");
>>  	return of_register_platform_driver(&mpc52xx_lpbfifo_driver);
>>  }
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, mpc52xx_lpbfifo_match);
>> +#endif
>> +
>>  module_init(mpc52xx_lpbfifo_init);
>>  
>>  static void __exit mpc52xx_lpbfifo_exit(void)
>> diff -pruN a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
>> --- a/arch/powerpc/platforms/83xx/suspend.c	2010-08-19 15:20:56.064764994 +0300
>> +++ b/arch/powerpc/platforms/83xx/suspend.c	2010-08-19 15:23:40.364764995 +0300
>> @@ -437,4 +437,9 @@ static int pmc_init(void)
>>  	return of_register_platform_driver(&pmc_driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, pmc_match);
>> +#endif
>> +
>>  module_init(pmc_init);
>> diff -pruN a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
>> --- a/arch/powerpc/sysdev/axonram.c	2010-08-19 15:20:56.074764995 +0300
>> +++ b/arch/powerpc/sysdev/axonram.c	2010-08-19 15:23:40.514764994 +0300
>> @@ -363,6 +363,11 @@ axon_ram_exit(void)
>>  	unregister_blkdev(azfs_major, AXON_RAM_DEVICE_NAME);
>>  }
>>  
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, axon_ram_device_id);
>> +#endif
>> +
>>  module_init(axon_ram_init);
>>  module_exit(axon_ram_exit);
> These seem valid at a glance, but should go through the PowerPC maintainer.
>   
>> diff -pruN a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
>> --- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c	2010-08-19 15:20:56.234765003 +0300
>> +++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c	2010-08-19 15:23:40.564764991 +0300
>> @@ -512,6 +512,11 @@ MODULE_AUTHOR("Hiroshi Miura <miura@da-c
>>  MODULE_DESCRIPTION("Cpufreq driver for Cyrix MediaGX and NatSemi Geode");
>>  MODULE_LICENSE("GPL");
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, gx_chipset_tbl);
>> +#endif
>> +
>>  module_init(cpufreq_gx_init);
>>  module_exit(cpufreq_gx_exit);
>>  
>> diff -pruN a/drivers/block/swim3.c b/drivers/block/swim3.c
>> --- a/drivers/block/swim3.c	2010-08-19 15:20:56.344764984 +0300
>> +++ b/drivers/block/swim3.c	2010-08-19 15:23:40.954764998 +0300
>> @@ -1203,6 +1203,11 @@ int swim3_init(void)
>>  	return 0;
>>  }
>>  
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, swim3_match);
>> +#endif
>> +
>>  module_init(swim3_init)
>>  
>>  MODULE_LICENSE("GPL");
>> diff -pruN a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
>> --- a/drivers/block/xen-blkfront.c	2010-08-19 15:20:56.344764984 +0300
>> +++ b/drivers/block/xen-blkfront.c	2010-08-19 15:23:41.104764997 +0300
>> @@ -1306,6 +1306,9 @@ static int __init xlblk_init(void)
>>  
>>  	return xenbus_register_frontend(&blkfront);
>>  }
>> +
>> +MODULE_DEVICE_TABLE(xenbus, blkfront_ids);
>> +
>>  module_init(xlblk_init);
> This seems very logical.  Jeremy?

Looks OK.  What will the effect be?  Will it allow better module
auto-loading or something?

>> diff -pruN a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c
>> --- a/drivers/char/hw_random/pasemi-rng.c	2010-08-19 15:20:56.354764978 +0300
>> +++ b/drivers/char/hw_random/pasemi-rng.c	2010-08-19 15:23:41.284764991 +0300
>> @@ -153,6 +153,11 @@ static int __init rng_init(void)
>>  {
>>  	return of_register_platform_driver(&rng_driver);
>>  }
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, rng_match);
>> +#endif
>> +
>>  module_init(rng_init);
> Do we really need all these #ifdef CONFIG_OF wrappers?
>
>>  static void __exit rng_exit(void)
>> diff -pruN a/drivers/char/sonypi.c b/drivers/char/sonypi.c
>> --- a/drivers/char/sonypi.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/drivers/char/sonypi.c	2010-08-19 15:23:41.374764992 +0300
>> @@ -1565,5 +1565,10 @@ static void __exit sonypi_exit(void)
>>  	printk(KERN_INFO "sonypi: removed.\n");
>>  }
>>  
>> +
>> +#ifdef CONFIG_ACPI
>> +MODULE_DEVICE_TABLE(acpi, sonypi_device_ids);
>> +#endif
>> +
>>  module_init(sonypi_init);
>>  module_exit(sonypi_exit);
>> diff -pruN a/drivers/char/sysrq.c b/drivers/char/sysrq.c
>> --- a/drivers/char/sysrq.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/drivers/char/sysrq.c	2010-08-19 15:23:41.444764991 +0300
>> @@ -799,4 +799,9 @@ static int __init sysrq_init(void)
>>  
>>  	return 0;
>>  }
>> +
>> +#ifdef CONFIG_INPUT
>> +MODULE_DEVICE_TABLE(input, sysrq_ids);
>> +#endif
>> +
>>  module_init(sysrq_init);
> Hmm, Dmitry?  Do we want this auto-loaded?
>
>> diff -pruN a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c
>> --- a/drivers/crypto/amcc/crypto4xx_core.c	2010-08-19 15:20:56.384765007 +0300
>> +++ b/drivers/crypto/amcc/crypto4xx_core.c	2010-08-19 15:23:41.594764998 +0300
>> @@ -1300,6 +1300,11 @@ static void __exit crypto4xx_exit(void)
>>  	of_unregister_platform_driver(&crypto4xx_driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, crypto4xx_match);
>> +#endif
>> +
>>  module_init(crypto4xx_init);
>>  module_exit(crypto4xx_exit);
>>  
>> diff -pruN a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c
>> --- a/drivers/dma/mpc512x_dma.c	2010-08-19 15:20:56.384765007 +0300
>> +++ b/drivers/dma/mpc512x_dma.c	2010-08-19 15:23:41.714764994 +0300
>> @@ -784,6 +784,11 @@ static int __init mpc_dma_init(void)
>>  {
>>  	return of_register_platform_driver(&mpc_dma_driver);
>>  }
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, mpc_dma_match);
>> +#endif
>> +
>>  module_init(mpc_dma_init);
>>  
>>  static void __exit mpc_dma_exit(void)
>> diff -pruN a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
>> --- a/drivers/dma/pch_dma.c	2010-08-19 15:24:05.484765021 +0300
>> +++ b/drivers/dma/pch_dma.c	2010-08-19 15:23:41.624764993 +0300
>> @@ -950,6 +950,11 @@ static void __exit pch_dma_exit(void)
>>  	pci_unregister_driver(&pch_dma_driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, pch_dma_id_table);
>> +#endif
>> +
>>  module_init(pch_dma_init);
>>  module_exit(pch_dma_exit);
>>  
>> diff -pruN a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
>> --- a/drivers/edac/ppc4xx_edac.c	2010-08-19 15:20:56.394765000 +0300
>> +++ b/drivers/edac/ppc4xx_edac.c	2010-08-19 15:23:41.864764986 +0300
>> @@ -1437,6 +1437,11 @@ ppc4xx_edac_exit(void)
>>  	of_unregister_platform_driver(&ppc4xx_edac_driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, ppc4xx_edac_match);
>> +#endif
>> +
>>  module_init(ppc4xx_edac_init);
>>  module_exit(ppc4xx_edac_exit);
>>  
>> diff -pruN a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
>> --- a/drivers/gpu/drm/i810/i810_drv.c	2010-08-19 15:20:56.414764981 +0300
>> +++ b/drivers/gpu/drm/i810/i810_drv.c	2010-08-19 15:23:41.924764989 +0300
>> @@ -89,6 +89,11 @@ static void __exit i810_exit(void)
>>  	drm_exit(&driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, pciidlist);
>> +#endif
>> +
>>  module_init(i810_init);
>>  module_exit(i810_exit);
>>  
>> diff -pruN a/drivers/gpu/drm/i830/i830_drv.c b/drivers/gpu/drm/i830/i830_drv.c
>> --- a/drivers/gpu/drm/i830/i830_drv.c	2010-08-19 15:20:56.414764981 +0300
>> +++ b/drivers/gpu/drm/i830/i830_drv.c	2010-08-19 15:23:41.944765010 +0300
>> @@ -100,6 +100,11 @@ static void __exit i830_exit(void)
>>  	drm_exit(&driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, pciidlist);
>> +#endif
>> +
>>  module_init(i830_init);
>>  module_exit(i830_exit);
>>  
>> diff -pruN a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c
>> --- a/drivers/gpu/drm/mga/mga_drv.c	2010-08-19 15:20:56.424764989 +0300
>> +++ b/drivers/gpu/drm/mga/mga_drv.c	2010-08-19 15:23:41.954765003 +0300
>> @@ -100,6 +100,11 @@ static void __exit mga_exit(void)
>>  	drm_exit(&driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, pciidlist);
>> +#endif
>> +
>>  module_init(mga_init);
>>  module_exit(mga_exit);
>>  
>> diff -pruN a/drivers/gpu/drm/r128/r128_drv.c b/drivers/gpu/drm/r128/r128_drv.c
>> --- a/drivers/gpu/drm/r128/r128_drv.c	2010-08-19 15:20:56.454765003 +0300
>> +++ b/drivers/gpu/drm/r128/r128_drv.c	2010-08-19 15:23:41.974764991 +0300
>> @@ -102,6 +102,11 @@ static void __exit r128_exit(void)
>>  	drm_exit(&driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, pciidlist);
>> +#endif
>> +
>>  module_init(r128_init);
>>  module_exit(r128_exit);
>>  
>> diff -pruN a/drivers/gpu/drm/savage/savage_drv.c b/drivers/gpu/drm/savage/savage_drv.c
>> --- a/drivers/gpu/drm/savage/savage_drv.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/drivers/gpu/drm/savage/savage_drv.c	2010-08-19 15:23:41.994764993 +0300
>> @@ -80,6 +80,11 @@ static void __exit savage_exit(void)
>>  	drm_exit(&driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, pciidlist);
>> +#endif
>> +
>>  module_init(savage_init);
>>  module_exit(savage_exit);
>>  
>> diff -pruN a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c
>> --- a/drivers/gpu/drm/sis/sis_drv.c	2010-08-19 15:20:56.474764991 +0300
>> +++ b/drivers/gpu/drm/sis/sis_drv.c	2010-08-19 15:23:42.004764994 +0300
>> @@ -108,6 +108,11 @@ static void __exit sis_exit(void)
>>  	drm_exit(&driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, pciidlist);
>> +#endif
>> +
>>  module_init(sis_init);
>>  module_exit(sis_exit);
>>  
>> diff -pruN a/drivers/gpu/drm/tdfx/tdfx_drv.c b/drivers/gpu/drm/tdfx/tdfx_drv.c
>> --- a/drivers/gpu/drm/tdfx/tdfx_drv.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/drivers/gpu/drm/tdfx/tdfx_drv.c	2010-08-19 15:23:42.024764996 +0300
>> @@ -76,6 +76,11 @@ static void __exit tdfx_exit(void)
>>  	drm_exit(&driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, pciidlist);
>> +#endif
>> +
>>  module_init(tdfx_init);
>>  module_exit(tdfx_exit);
>>  
>> diff -pruN a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c
>> --- a/drivers/gpu/drm/via/via_drv.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/drivers/gpu/drm/via/via_drv.c	2010-08-19 15:23:42.034764997 +0300
>> @@ -88,6 +88,11 @@ static void __exit via_exit(void)
>>  	drm_exit(&driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, pciidlist);
>> +#endif
>> +
>>  module_init(via_init);
>>  module_exit(via_exit);
>>  
>> diff -pruN a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c	2010-08-19 15:20:56.484764992 +0300
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c	2010-08-19 15:23:42.044765004 +0300
>> @@ -781,6 +781,11 @@ static void __exit vmwgfx_exit(void)
>>  	drm_exit(&driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, vmw_pci_id_list);
>> +#endif
>> +
>>  module_init(vmwgfx_init);
>>  module_exit(vmwgfx_exit);
>>  
>> diff -pruN a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
>> --- a/drivers/hid/hid-core.c	2010-08-19 15:20:56.484764992 +0300
>> +++ b/drivers/hid/hid-core.c	2010-08-19 15:23:42.244764996 +0300
>> @@ -1957,6 +1957,11 @@ static void __exit hid_exit(void)
>>  	bus_unregister(&hid_bus_type);
>>  }
>>  
>> +
>> +#ifdef CONFIG_HID
>> +MODULE_DEVICE_TABLE(hid, hid_hiddev_list);
>> +#endif
>> +
>>  module_init(hid_init);
>>  module_exit(hid_exit);
>>  
>> diff -pruN a/drivers/hwmon/ad7414.c b/drivers/hwmon/ad7414.c
>> --- a/drivers/hwmon/ad7414.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/drivers/hwmon/ad7414.c	2010-08-19 15:23:42.334765000 +0300
>> @@ -254,6 +254,11 @@ static int __init ad7414_init(void)
>>  {
>>  	return i2c_add_driver(&ad7414_driver);
>>  }
>> +
>> +#ifdef CONFIG_I2C
>> +MODULE_DEVICE_TABLE(i2c, ad7414_id);
>> +#endif
>> +
>>  module_init(ad7414_init);
>>  
>>  static void __exit ad7414_exit(void)
>> diff -pruN a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c
>> --- a/drivers/hwmon/adt7411.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/drivers/hwmon/adt7411.c	2010-08-19 15:23:42.434764993 +0300
>> @@ -351,6 +351,11 @@ static int __init sensors_adt7411_init(v
>>  {
>>  	return i2c_add_driver(&adt7411_driver);
>>  }
>> +
>> +#ifdef CONFIG_I2C
>> +MODULE_DEVICE_TABLE(i2c, adt7411_id);
>> +#endif
>> +
>>  module_init(sensors_adt7411_init)
>>  
>>  static void __exit sensors_adt7411_exit(void)
>> diff -pruN a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
>> --- a/drivers/i2c/busses/i2c-ibm_iic.c	2010-08-19 15:20:56.504764994 +0300
>> +++ b/drivers/i2c/busses/i2c-ibm_iic.c	2010-08-19 15:23:42.814765003 +0300
>> @@ -824,5 +824,10 @@ static void __exit iic_exit(void)
>>  	of_unregister_platform_driver(&ibm_iic_driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, ibm_iic_match);
>> +#endif
>> +
>>  module_init(iic_init);
>>  module_exit(iic_exit);
>> diff -pruN a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
>> --- a/drivers/i2c/busses/scx200_acb.c	2010-08-19 15:24:05.484765021 +0300
>> +++ b/drivers/i2c/busses/scx200_acb.c	2010-08-19 15:23:42.664764994 +0300
>> @@ -654,5 +654,10 @@ static void __exit scx200_acb_cleanup(vo
>>  	mutex_unlock(&scx200_acb_list_mutex);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PCI
>> +MODULE_DEVICE_TABLE(pci, scx200_pci);
>> +#endif
>> +
>>  module_init(scx200_acb_init);
>>  module_exit(scx200_acb_cleanup);
>> diff -pruN a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
>> --- a/drivers/ide/ide-pnp.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/drivers/ide/ide-pnp.c	2010-08-19 15:23:42.964764986 +0300
>> @@ -105,6 +105,11 @@ static void __exit pnpide_exit(void)
>>  	pnp_unregister_driver(&idepnp_driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_PNP
>> +MODULE_DEVICE_TABLE(pnp, idepnp_devices);
>> +#endif
>> +
>>  module_init(pnpide_init);
>>  module_exit(pnpide_exit);
>>  
>> diff -pruN a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
>> --- a/drivers/input/keyboard/hil_kbd.c	2010-08-19 15:20:56.534764997 +0300
>> +++ b/drivers/input/keyboard/hil_kbd.c	2010-08-19 15:23:43.254765003 +0300
>> @@ -591,5 +591,10 @@ static void __exit hil_dev_exit(void)
>>  	serio_unregister_driver(&hil_serio_drv);
>>  }
>>  
>> +
>> +#ifdef CONFIG_SERIO
>> +MODULE_DEVICE_TABLE(serio, hil_dev_ids);
>> +#endif
>> +
>>  module_init(hil_dev_init);
>>  module_exit(hil_dev_exit);
>> diff -pruN a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
>> --- a/drivers/input/misc/sparcspkr.c	2010-08-19 15:20:56.544765004 +0300
>> +++ b/drivers/input/misc/sparcspkr.c	2010-08-19 15:23:43.394764978 +0300
>> @@ -370,5 +370,10 @@ static void __exit sparcspkr_exit(void)
>>  	of_unregister_platform_driver(&grover_beep_driver);
>>  }
>>  
>> +
>> +#ifdef CONFIG_OF
>> +MODULE_DEVICE_TABLE(of, bbc_beep_match);
>> +#endif
>> +
>>  module_init(sparcspkr_init);
>>  module_exit(sparcspkr_exit);
>> diff -pruN a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
>> --- a/drivers/input/serio/hil_mlc.c	2010-08-02 01:11:14.000000000 +0300
>> +++ b/drivers/input/serio/hil_mlc.c	2010-08-19 15:23:43.494765003 +0300
>> @@ -1010,5 +1010,10 @@ static void __exit hil_mlc_exit(void)
>>  	tasklet_kill(&hil_mlcs_tasklet);
>>  }
>>  
>> +
>> +#ifdef CONFIG_SERIO
>> +MODULE_DEVICE_TABLE(serio, hil_mlc_serio_id);
>> +#endif
>> +
>>  module_init(hil_mlc_init);
>>  module_exit(hil_mlc_exit);
>> diff -pruN a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c
>> --- a/drivers/input/xen-kbdfront.c	2010-08-19 15:20:56.554764997 +0300
>> +++ b/drivers/input/xen-kbdfront.c	2010-08-19 15:23:43.754764993 +0300
>> @@ -354,6 +354,9 @@ static void __exit xenkbd_cleanup(void)
>>  	xenbus_unregister_driver(&xenkbd_driver);
>>  }
>>  
>> +
>> +MODULE_DEVICE_TABLE(xenbus, xenkbd_ids);
>> +
>>  module_init(xenkbd_init);
>>  module_exit(xenkbd_cleanup);
> This one, too, seems to make sense.

Yep.

Both Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

(and any other similar Xen/xenbus-related changes).

    J

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: #2 (Re: More modaliases + patchtool)
  2010-09-11  2:14     ` #2 " Rusty Russell
  2010-09-11  3:36       ` Jeremy Fitzhardinge
@ 2010-09-11 17:51       ` Dmitry Torokhov
  2010-09-13  3:24         ` Rusty Russell
  2010-09-17 10:55       ` pci: Re: #2 (Re: More modaliases + patchtool)) Dzianis Kahanovich
                         ` (15 subsequent siblings)
  17 siblings, 1 reply; 28+ messages in thread
From: Dmitry Torokhov @ 2010-09-11 17:51 UTC (permalink / raw)
  To: Rusty Russell; +Cc: mahatma, linux-kernel, Jeremy Fitzhardinge, Andrew Morton

On Sat, Sep 11, 2010 at 11:44:33AM +0930, Rusty Russell wrote:
> On Thu, 19 Aug 2010 10:12:36 pm Dzianis Kahanovich wrote:
> > diff -pruN a/drivers/char/sysrq.c b/drivers/char/sysrq.c
> > --- a/drivers/char/sysrq.c	2010-08-02 01:11:14.000000000 +0300
> > +++ b/drivers/char/sysrq.c	2010-08-19 15:23:41.444764991 +0300
> > @@ -799,4 +799,9 @@ static int __init sysrq_init(void)
> >  
> >  	return 0;
> >  }
> > +
> > +#ifdef CONFIG_INPUT
> > +MODULE_DEVICE_TABLE(input, sysrq_ids);
> > +#endif
> > +
> >  module_init(sysrq_init);
> 
> Hmm, Dmitry?  Do we want this auto-loaded?
> 

Rusty,

CONFIG_MAGIC_SYSRQ is currently a bool and SysRq support can only be
built-in.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: #2 (Re: More modaliases + patchtool)
  2010-09-11  3:36       ` Jeremy Fitzhardinge
@ 2010-09-13  3:03         ` Rusty Russell
  0 siblings, 0 replies; 28+ messages in thread
From: Rusty Russell @ 2010-09-13  3:03 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: mahatma, linux-kernel, Dmitry Torokhov, Andrew Morton

On Sat, 11 Sep 2010 01:06:19 pm Jeremy Fitzhardinge wrote:
>  On 09/11/2010 12:14 PM, Rusty Russell wrote:
> > On Thu, 19 Aug 2010 10:12:36 pm Dzianis Kahanovich wrote:
> >> diff -pruN a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> >> --- a/drivers/block/xen-blkfront.c	2010-08-19 15:20:56.344764984 +0300
> >> +++ b/drivers/block/xen-blkfront.c	2010-08-19 15:23:41.104764997 +0300
> >> @@ -1306,6 +1306,9 @@ static int __init xlblk_init(void)
> >>  
> >>  	return xenbus_register_frontend(&blkfront);
> >>  }
> >> +
> >> +MODULE_DEVICE_TABLE(xenbus, blkfront_ids);
> >> +
> >>  module_init(xlblk_init);
> > This seems very logical.  Jeremy?
> 
> Looks OK.  What will the effect be?  Will it allow better module
> auto-loading or something?

Normally yes.  Here's how it's supposed to work:
1) The bus provides a "modalias" field for devices, to say what driver module
   to probe for.  You already do this.
2) The driver marks the device table so scripts/mod/file2alias.c can find it.
   This is what this patch does.
3) scripts/mod/file2alias.c creates the wildcard aliases for the module, based
   on the device table.  You'd need to do this.

Instead you have manual MODULE_ALIAS lines for your drivers.  Your bus
matching is so simple and you have so few device types, that this works.
But the Right Way is to use the infrastructure to generate them as above.

Hope that clarifies!
Rusty.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: #2 (Re: More modaliases + patchtool)
  2010-09-11 17:51       ` Dmitry Torokhov
@ 2010-09-13  3:24         ` Rusty Russell
  0 siblings, 0 replies; 28+ messages in thread
From: Rusty Russell @ 2010-09-13  3:24 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: mahatma, linux-kernel, Jeremy Fitzhardinge, Andrew Morton

On Sun, 12 Sep 2010 03:21:19 am Dmitry Torokhov wrote:
> On Sat, Sep 11, 2010 at 11:44:33AM +0930, Rusty Russell wrote:
> > On Thu, 19 Aug 2010 10:12:36 pm Dzianis Kahanovich wrote:
> > > diff -pruN a/drivers/char/sysrq.c b/drivers/char/sysrq.c
> > > --- a/drivers/char/sysrq.c	2010-08-02 01:11:14.000000000 +0300
> > > +++ b/drivers/char/sysrq.c	2010-08-19 15:23:41.444764991 +0300
> > > @@ -799,4 +799,9 @@ static int __init sysrq_init(void)
> > >  
> > >  	return 0;
> > >  }
> > > +
> > > +#ifdef CONFIG_INPUT
> > > +MODULE_DEVICE_TABLE(input, sysrq_ids);
> > > +#endif
> > > +
> > >  module_init(sysrq_init);
> > 
> > Hmm, Dmitry?  Do we want this auto-loaded?
> > 
> 
> Rusty,
> 
> CONFIG_MAGIC_SYSRQ is currently a bool and SysRq support can only be
> built-in.

That seems pretty clear then.

Thanks!
Rusty.
PS. Dmitry, maybe a build with allmodconfig would help eliminate some of
    these?

^ permalink raw reply	[flat|nested] 28+ messages in thread

* pci: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
  2010-09-11  3:36       ` Jeremy Fitzhardinge
  2010-09-11 17:51       ` Dmitry Torokhov
@ 2010-09-17 10:55       ` Dzianis Kahanovich
  2010-09-17 13:11       ` Dzianis Kahanovich
                         ` (14 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 10:55 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 975 bytes --]

Rusty Russell wrote:

> I think the best way to split this patch is by bus type.  Drop the #ifdef's
> if you think it's a good idea, do some compile testing, then forward to the
> specific maintainers for each type.  I'm happy to do that for you if you
> want (though these kind of patches are Morton-worthy IMHO).

About compile testing: I build all possible modules for x86 (32 & 64) on my
builds (distro-like) to reduse various PC configuration. Basic version of this
script used before.

Are I must check bools vs. tristates or just look to C-code?

I prepare PCI patch without checking for bools. All staging modules looks
unstrict (not walking deep) to relating with PCI. All normal modules is strict
PCI. I keep #ifdef in staging only. Also 2 new modules coming from linux-next
branch (1+1 - strict and unstrict), second attachment.

PS Are the better to inline patches vs. attachment?

-- 
WBR, Dzianis Kahanovich AKA Denis Kaganovich, http://mahatma.bspu.unibel.by/

[-- Attachment #2: mods-pci.patch --]
[-- Type: text/plain, Size: 11192 bytes --]

--- linux-2.6.36-rc4-git3/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c	2010-09-17 12:30:29.000000000 +0300
+++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c	2010-09-17 12:38:40.552737804 +0300
@@ -512,6 +512,9 @@ MODULE_AUTHOR("Hiroshi Miura <miura@da-c
 MODULE_DESCRIPTION("Cpufreq driver for Cyrix MediaGX and NatSemi Geode");
 MODULE_LICENSE("GPL");
 
+
+MODULE_DEVICE_TABLE(pci, gx_chipset_tbl);
+
 module_init(cpufreq_gx_init);
 module_exit(cpufreq_gx_exit);
 
--- linux-2.6.36-rc4-git3/drivers/dma/pch_dma.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/dma/pch_dma.c	2010-09-17 12:38:44.102591039 +0300
@@ -949,6 +949,9 @@ static void __exit pch_dma_exit(void)
 	pci_unregister_driver(&pch_dma_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pch_dma_id_table);
+
 module_init(pch_dma_init);
 module_exit(pch_dma_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/i810/i810_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/i810/i810_drv.c	2010-09-17 12:38:45.012486229 +0300
@@ -89,6 +89,9 @@ static void __exit i810_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(i810_init);
 module_exit(i810_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/i830/i830_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/i830/i830_drv.c	2010-09-17 12:38:45.034555412 +0300
@@ -100,6 +100,9 @@ static void __exit i830_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(i830_init);
 module_exit(i830_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/mga/mga_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/mga/mga_drv.c	2010-09-17 12:38:45.050928774 +0300
@@ -100,6 +100,9 @@ static void __exit mga_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(mga_init);
 module_exit(mga_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/r128/r128_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/r128/r128_drv.c	2010-09-17 12:38:45.067342225 +0300
@@ -102,6 +102,9 @@ static void __exit r128_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(r128_init);
 module_exit(r128_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/savage/savage_drv.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/gpu/drm/savage/savage_drv.c	2010-09-17 12:38:45.084696946 +0300
@@ -80,6 +80,9 @@ static void __exit savage_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(savage_init);
 module_exit(savage_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/sis/sis_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/sis/sis_drv.c	2010-09-17 12:38:45.112711105 +0300
@@ -108,6 +108,9 @@ static void __exit sis_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(sis_init);
 module_exit(sis_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/tdfx/tdfx_drv.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/gpu/drm/tdfx/tdfx_drv.c	2010-09-17 12:38:45.196631648 +0300
@@ -76,6 +76,9 @@ static void __exit tdfx_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(tdfx_init);
 module_exit(tdfx_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/via/via_drv.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/gpu/drm/via/via_drv.c	2010-09-17 12:38:45.292629401 +0300
@@ -88,6 +88,9 @@ static void __exit via_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(via_init);
 module_exit(via_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c	2010-09-17 12:38:45.364383102 +0300
@@ -781,6 +781,9 @@ static void __exit vmwgfx_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, vmw_pci_id_list);
+
 module_init(vmwgfx_init);
 module_exit(vmwgfx_exit);
 
--- linux-2.6.36-rc4-git3/drivers/i2c/busses/scx200_acb.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/i2c/busses/scx200_acb.c	2010-09-17 12:38:47.445753894 +0300
@@ -653,5 +653,8 @@ static void __exit scx200_acb_cleanup(vo
 	mutex_unlock(&scx200_acb_list_mutex);
 }
 
+
+MODULE_DEVICE_TABLE(pci, scx200_pci);
+
 module_init(scx200_acb_init);
 module_exit(scx200_acb_cleanup);
--- linux-2.6.36-rc4-git3/drivers/media/dvb/mantis/hopper_cards.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/media/dvb/mantis/hopper_cards.c	2010-09-17 12:38:51.187348039 +0300
@@ -268,6 +268,9 @@ static void __devexit hopper_exit(void)
 	return pci_unregister_driver(&hopper_pci_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, hopper_pci_table);
+
 module_init(hopper_init);
 module_exit(hopper_exit);
 
--- linux-2.6.36-rc4-git3/drivers/media/dvb/mantis/mantis_cards.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/media/dvb/mantis/mantis_cards.c	2010-09-17 12:38:51.201361079 +0300
@@ -298,6 +298,9 @@ static void __devexit mantis_exit(void)
 	return pci_unregister_driver(&mantis_pci_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, mantis_pci_table);
+
 module_init(mantis_init);
 module_exit(mantis_exit);
 
--- linux-2.6.36-rc4-git3/drivers/media/dvb/ttpci/budget-patch.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/media/dvb/ttpci/budget-patch.c	2010-09-17 12:38:51.231761563 +0300
@@ -664,6 +664,9 @@ static struct saa7146_extension budget_e
 	.irq_func       = ttpci_budget_irq10_handler,
 };
 
+
+MODULE_DEVICE_TABLE(pci, pci_tbl);
+
 module_init(budget_patch_init);
 module_exit(budget_patch_exit);
 
--- linux-2.6.36-rc4-git3/drivers/media/video/stradis.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/media/video/stradis.c	2010-09-17 12:38:51.607895138 +0300
@@ -2209,5 +2209,8 @@ static void __exit stradis_exit(void)
 	printk(KERN_INFO "stradis: module cleanup complete\n");
 }
 
+
+MODULE_DEVICE_TABLE(pci, stradis_pci_tbl);
+
 module_init(stradis_init);
 module_exit(stradis_exit);
--- linux-2.6.36-rc4-git3/drivers/parisc/superio.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/parisc/superio.c	2010-09-17 12:38:56.221711538 +0300
@@ -513,5 +513,8 @@ static void __exit superio_exit(void)
 	pci_unregister_driver(&superio_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, superio_tbl);
+
 module_init(superio_modinit);
 module_exit(superio_exit);
--- linux-2.6.36-rc4-git3/drivers/pci/ioapic.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/pci/ioapic.c	2010-09-17 12:38:56.262393634 +0300
@@ -123,5 +123,8 @@ static void __exit ioapic_exit(void)
 	pci_unregister_driver(&ioapic_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, ioapic_devices);
+
 module_init(ioapic_init);
 module_exit(ioapic_exit);
--- linux-2.6.36-rc4-git3/drivers/serial/mfd.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/serial/mfd.c	2010-09-17 12:38:58.265303502 +0300
@@ -1491,6 +1491,9 @@ static void __exit hsu_pci_exit(void)
 	kfree(phsu);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pci_ids);
+
 module_init(hsu_pci_init);
 module_exit(hsu_pci_exit);
 
--- linux-2.6.36-rc4-git3/drivers/spi/dw_spi_pci.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/spi/dw_spi_pci.c	2010-09-17 12:38:58.652691529 +0300
@@ -164,6 +164,9 @@ static void __exit mrst_spi_exit(void)
 	pci_unregister_driver(&dw_spi_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pci_ids);
+
 module_init(mrst_spi_init);
 module_exit(mrst_spi_exit);
 
--- linux-2.6.36-rc4-git3/drivers/uio/uio_sercos3.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/uio/uio_sercos3.c	2010-09-17 12:39:03.099643106 +0300
@@ -236,6 +236,9 @@ static void __exit sercos3_exit_module(v
 	pci_unregister_driver(&sercos3_pci_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, sercos3_pci_ids);
+
 module_init(sercos3_init_module);
 module_exit(sercos3_exit_module);
 
--- linux-2.6.36-rc4-git3/drivers/video/i810/i810_main.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/i810/i810_main.c	2010-09-17 12:39:05.272728173 +0300
@@ -2220,4 +2220,7 @@ module_exit(i810fb_exit);
 
 #endif /* MODULE */
 
+
+MODULE_DEVICE_TABLE(pci, i810fb_pci_tbl);
+
 module_init(i810fb_init);
--- linux-2.6.36-rc4-git3/drivers/video/sstfb.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/sstfb.c	2010-09-17 12:39:05.542940314 +0300
@@ -1511,6 +1511,9 @@ static void __devexit sstfb_exit(void)
 }
 
 
+
+MODULE_DEVICE_TABLE(pci, sstfb_id_tbl);
+
 module_init(sstfb_init);
 module_exit(sstfb_exit);
 
--- linux-2.6.36-rc4-git3/drivers/video/sunxvr2500.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/sunxvr2500.c	2010-09-17 12:39:05.632422590 +0300
@@ -265,6 +265,9 @@ static void __exit s3d_exit(void)
 	pci_unregister_driver(&s3d_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, s3d_pci_table);
+
 module_init(s3d_init);
 module_exit(s3d_exit);
 
--- linux-2.6.36-rc4-git3/drivers/video/sunxvr500.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/sunxvr500.c	2010-09-17 12:39:05.708587535 +0300
@@ -449,6 +449,9 @@ static void __exit e3d_exit(void)
 	pci_unregister_driver(&e3d_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, e3d_pci_table);
+
 module_init(e3d_init);
 module_exit(e3d_exit);
 
--- linux-2.6.36-rc4-git3/drivers/video/vermilion/vermilion.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/vermilion/vermilion.c	2010-09-17 12:39:05.835126408 +0300
@@ -1177,6 +1177,9 @@ void vmlfb_unregister_subsys(struct vml_
 
 EXPORT_SYMBOL_GPL(vmlfb_unregister_subsys);
 
+
+MODULE_DEVICE_TABLE(pci, vml_ids);
+
 module_init(vmlfb_init);
 module_exit(vmlfb_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/staging/sm7xx/smtcfb.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/sm7xx/smtcfb.c	2010-09-17 12:39:02.072627718 +0300
@@ -1135,6 +1135,11 @@ static void __exit smtcfb_exit(void)
 	pci_unregister_driver(&smtcfb_driver);
 }
 
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, smtcfb_pci_table);
+#endif
+
 module_init(smtcfb_init);
 module_exit(smtcfb_exit);
 
--- linux-2.6.36-rc4-git3/drivers/staging/vme/boards/vme_vmivme7805.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/vme/boards/vme_vmivme7805.c	2010-09-17 12:39:02.368818072 +0300
@@ -118,6 +118,11 @@ MODULE_DESCRIPTION("VMIVME-7805 board su
 MODULE_AUTHOR("Arthur Benilov <arthur.benilov@iba-group.com>");
 MODULE_LICENSE("GPL");
 
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, vmic_ids);
+#endif
+
 module_init(vmic_init);
 module_exit(vmic_exit);
 
--- linux-2.6.36-rc4-git3/drivers/staging/vme/bridges/vme_ca91cx42.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c	2010-09-17 12:39:02.390100661 +0300
@@ -1836,5 +1836,10 @@ module_param(geoid, int, 0);
 MODULE_DESCRIPTION("VME driver for the Tundra Universe II VME bridge");
 MODULE_LICENSE("GPL");
 
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, ca91cx42_ids);
+#endif
+
 module_init(ca91cx42_init);
 module_exit(ca91cx42_exit);
--- linux-2.6.36-rc4-git3/drivers/staging/vme/bridges/vme_tsi148.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/vme/bridges/vme_tsi148.c	2010-09-17 12:39:02.406718051 +0300
@@ -2637,5 +2637,10 @@ module_param(geoid, int, 0);
 MODULE_DESCRIPTION("VME driver for the Tundra Tempe VME bridge");
 MODULE_LICENSE("GPL");
 
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, tsi148_ids);
+#endif
+
 module_init(tsi148_init);
 module_exit(tsi148_exit);

[-- Attachment #3: mods-pci_next_2010917.patch --]
[-- Type: text/plain, Size: 830 bytes --]

--- linux-2.6.36-rc4-next-20100917/drivers/usb/otg/langwell_otg.c	2010-09-17 13:11:34.646802996 +0300
+++ b/drivers/usb/otg/langwell_otg.c	2010-09-17 13:17:14.765649883 +0300
@@ -2399,6 +2399,11 @@ static int __init langwell_otg_init(void
 {
 	return pci_register_driver(&otg_pci_driver);
 }
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, pci_ids);
+#endif
+
 module_init(langwell_otg_init);
 
 static void __exit langwell_otg_cleanup(void)
--- linux-2.6.36-rc4-next-20100917/drivers/misc/pch_phub.c	2010-09-17 13:11:33.476802996 +0300
+++ b/drivers/misc/pch_phub.c	2010-09-17 13:17:19.873954434 +0300
@@ -710,6 +710,9 @@ static void __exit pch_phub_pci_exit(voi
 	pci_unregister_driver(&pch_phub_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pch_phub_pcidev_id);
+
 module_init(pch_phub_pci_init);
 module_exit(pch_phub_pci_exit);
 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* pci: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (2 preceding siblings ...)
  2010-09-17 10:55       ` pci: Re: #2 (Re: More modaliases + patchtool)) Dzianis Kahanovich
@ 2010-09-17 13:11       ` Dzianis Kahanovich
  2010-09-17 13:26       ` xenbus: " Dzianis Kahanovich
                         ` (13 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:11 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

Sorry, I'm too disseminated. Same, signed.

Rusty Russell wrote:


> I think the best way to split this patch is by bus type.  Drop the #ifdef's
> if you think it's a good idea, do some compile testing, then forward to the
> specific maintainers for each type.  I'm happy to do that for you if you
> want (though these kind of patches are Morton-worthy IMHO).

About compile testing: I build all possible modules for x86 (32 & 64) on my
builds (distro-like) to reduse various PC configuration. Basic version of this
script used before.

Are I must check bools vs. tristates or just look to C-code?

I prepare PCI patch without checking for bools. All staging modules looks
unstrict (not walking deep) to relating with PCI. All normal modules is strict
PCI. I keep #ifdef in staging only. Also 2 new modules coming from linux-next
branch (1+1 - strict and unstrict), second attachment.

PS Are the better to inline patches vs. attachment?

-- 
WBR, Dzianis Kahanovich AKA Denis Kaganovich, http://mahatma.bspu.unibel.by/


[-- Attachment #2: mods-pci.patch --]
[-- Type: text/plain, Size: 11268 bytes --]

Fix lost PCI modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c	2010-09-17 12:30:29.000000000 +0300
+++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c	2010-09-17 12:38:40.552737804 +0300
@@ -512,6 +512,9 @@ MODULE_AUTHOR("Hiroshi Miura <miura@da-c
 MODULE_DESCRIPTION("Cpufreq driver for Cyrix MediaGX and NatSemi Geode");
 MODULE_LICENSE("GPL");
 
+
+MODULE_DEVICE_TABLE(pci, gx_chipset_tbl);
+
 module_init(cpufreq_gx_init);
 module_exit(cpufreq_gx_exit);
 
--- linux-2.6.36-rc4-git3/drivers/dma/pch_dma.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/dma/pch_dma.c	2010-09-17 12:38:44.102591039 +0300
@@ -949,6 +949,9 @@ static void __exit pch_dma_exit(void)
 	pci_unregister_driver(&pch_dma_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pch_dma_id_table);
+
 module_init(pch_dma_init);
 module_exit(pch_dma_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/i810/i810_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/i810/i810_drv.c	2010-09-17 12:38:45.012486229 +0300
@@ -89,6 +89,9 @@ static void __exit i810_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(i810_init);
 module_exit(i810_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/i830/i830_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/i830/i830_drv.c	2010-09-17 12:38:45.034555412 +0300
@@ -100,6 +100,9 @@ static void __exit i830_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(i830_init);
 module_exit(i830_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/mga/mga_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/mga/mga_drv.c	2010-09-17 12:38:45.050928774 +0300
@@ -100,6 +100,9 @@ static void __exit mga_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(mga_init);
 module_exit(mga_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/r128/r128_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/r128/r128_drv.c	2010-09-17 12:38:45.067342225 +0300
@@ -102,6 +102,9 @@ static void __exit r128_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(r128_init);
 module_exit(r128_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/savage/savage_drv.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/gpu/drm/savage/savage_drv.c	2010-09-17 12:38:45.084696946 +0300
@@ -80,6 +80,9 @@ static void __exit savage_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(savage_init);
 module_exit(savage_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/sis/sis_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/sis/sis_drv.c	2010-09-17 12:38:45.112711105 +0300
@@ -108,6 +108,9 @@ static void __exit sis_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(sis_init);
 module_exit(sis_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/tdfx/tdfx_drv.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/gpu/drm/tdfx/tdfx_drv.c	2010-09-17 12:38:45.196631648 +0300
@@ -76,6 +76,9 @@ static void __exit tdfx_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(tdfx_init);
 module_exit(tdfx_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/via/via_drv.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/gpu/drm/via/via_drv.c	2010-09-17 12:38:45.292629401 +0300
@@ -88,6 +88,9 @@ static void __exit via_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pciidlist);
+
 module_init(via_init);
 module_exit(via_exit);
 
--- linux-2.6.36-rc4-git3/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c	2010-09-17 12:38:45.364383102 +0300
@@ -781,6 +781,9 @@ static void __exit vmwgfx_exit(void)
 	drm_exit(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, vmw_pci_id_list);
+
 module_init(vmwgfx_init);
 module_exit(vmwgfx_exit);
 
--- linux-2.6.36-rc4-git3/drivers/i2c/busses/scx200_acb.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/i2c/busses/scx200_acb.c	2010-09-17 12:38:47.445753894 +0300
@@ -653,5 +653,8 @@ static void __exit scx200_acb_cleanup(vo
 	mutex_unlock(&scx200_acb_list_mutex);
 }
 
+
+MODULE_DEVICE_TABLE(pci, scx200_pci);
+
 module_init(scx200_acb_init);
 module_exit(scx200_acb_cleanup);
--- linux-2.6.36-rc4-git3/drivers/media/dvb/mantis/hopper_cards.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/media/dvb/mantis/hopper_cards.c	2010-09-17 12:38:51.187348039 +0300
@@ -268,6 +268,9 @@ static void __devexit hopper_exit(void)
 	return pci_unregister_driver(&hopper_pci_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, hopper_pci_table);
+
 module_init(hopper_init);
 module_exit(hopper_exit);
 
--- linux-2.6.36-rc4-git3/drivers/media/dvb/mantis/mantis_cards.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/media/dvb/mantis/mantis_cards.c	2010-09-17 12:38:51.201361079 +0300
@@ -298,6 +298,9 @@ static void __devexit mantis_exit(void)
 	return pci_unregister_driver(&mantis_pci_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, mantis_pci_table);
+
 module_init(mantis_init);
 module_exit(mantis_exit);
 
--- linux-2.6.36-rc4-git3/drivers/media/dvb/ttpci/budget-patch.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/media/dvb/ttpci/budget-patch.c	2010-09-17 12:38:51.231761563 +0300
@@ -664,6 +664,9 @@ static struct saa7146_extension budget_e
 	.irq_func       = ttpci_budget_irq10_handler,
 };
 
+
+MODULE_DEVICE_TABLE(pci, pci_tbl);
+
 module_init(budget_patch_init);
 module_exit(budget_patch_exit);
 
--- linux-2.6.36-rc4-git3/drivers/media/video/stradis.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/media/video/stradis.c	2010-09-17 12:38:51.607895138 +0300
@@ -2209,5 +2209,8 @@ static void __exit stradis_exit(void)
 	printk(KERN_INFO "stradis: module cleanup complete\n");
 }
 
+
+MODULE_DEVICE_TABLE(pci, stradis_pci_tbl);
+
 module_init(stradis_init);
 module_exit(stradis_exit);
--- linux-2.6.36-rc4-git3/drivers/parisc/superio.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/parisc/superio.c	2010-09-17 12:38:56.221711538 +0300
@@ -513,5 +513,8 @@ static void __exit superio_exit(void)
 	pci_unregister_driver(&superio_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, superio_tbl);
+
 module_init(superio_modinit);
 module_exit(superio_exit);
--- linux-2.6.36-rc4-git3/drivers/pci/ioapic.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/pci/ioapic.c	2010-09-17 12:38:56.262393634 +0300
@@ -123,5 +123,8 @@ static void __exit ioapic_exit(void)
 	pci_unregister_driver(&ioapic_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, ioapic_devices);
+
 module_init(ioapic_init);
 module_exit(ioapic_exit);
--- linux-2.6.36-rc4-git3/drivers/serial/mfd.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/serial/mfd.c	2010-09-17 12:38:58.265303502 +0300
@@ -1491,6 +1491,9 @@ static void __exit hsu_pci_exit(void)
 	kfree(phsu);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pci_ids);
+
 module_init(hsu_pci_init);
 module_exit(hsu_pci_exit);
 
--- linux-2.6.36-rc4-git3/drivers/spi/dw_spi_pci.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/spi/dw_spi_pci.c	2010-09-17 12:38:58.652691529 +0300
@@ -164,6 +164,9 @@ static void __exit mrst_spi_exit(void)
 	pci_unregister_driver(&dw_spi_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pci_ids);
+
 module_init(mrst_spi_init);
 module_exit(mrst_spi_exit);
 
--- linux-2.6.36-rc4-git3/drivers/uio/uio_sercos3.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/uio/uio_sercos3.c	2010-09-17 12:39:03.099643106 +0300
@@ -236,6 +236,9 @@ static void __exit sercos3_exit_module(v
 	pci_unregister_driver(&sercos3_pci_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, sercos3_pci_ids);
+
 module_init(sercos3_init_module);
 module_exit(sercos3_exit_module);
 
--- linux-2.6.36-rc4-git3/drivers/video/i810/i810_main.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/i810/i810_main.c	2010-09-17 12:39:05.272728173 +0300
@@ -2220,4 +2220,7 @@ module_exit(i810fb_exit);
 
 #endif /* MODULE */
 
+
+MODULE_DEVICE_TABLE(pci, i810fb_pci_tbl);
+
 module_init(i810fb_init);
--- linux-2.6.36-rc4-git3/drivers/video/sstfb.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/sstfb.c	2010-09-17 12:39:05.542940314 +0300
@@ -1511,6 +1511,9 @@ static void __devexit sstfb_exit(void)
 }
 
 
+
+MODULE_DEVICE_TABLE(pci, sstfb_id_tbl);
+
 module_init(sstfb_init);
 module_exit(sstfb_exit);
 
--- linux-2.6.36-rc4-git3/drivers/video/sunxvr2500.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/sunxvr2500.c	2010-09-17 12:39:05.632422590 +0300
@@ -265,6 +265,9 @@ static void __exit s3d_exit(void)
 	pci_unregister_driver(&s3d_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, s3d_pci_table);
+
 module_init(s3d_init);
 module_exit(s3d_exit);
 
--- linux-2.6.36-rc4-git3/drivers/video/sunxvr500.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/sunxvr500.c	2010-09-17 12:39:05.708587535 +0300
@@ -449,6 +449,9 @@ static void __exit e3d_exit(void)
 	pci_unregister_driver(&e3d_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, e3d_pci_table);
+
 module_init(e3d_init);
 module_exit(e3d_exit);
 
--- linux-2.6.36-rc4-git3/drivers/video/vermilion/vermilion.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/vermilion/vermilion.c	2010-09-17 12:39:05.835126408 +0300
@@ -1177,6 +1177,9 @@ void vmlfb_unregister_subsys(struct vml_
 
 EXPORT_SYMBOL_GPL(vmlfb_unregister_subsys);
 
+
+MODULE_DEVICE_TABLE(pci, vml_ids);
+
 module_init(vmlfb_init);
 module_exit(vmlfb_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/staging/sm7xx/smtcfb.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/sm7xx/smtcfb.c	2010-09-17 12:39:02.072627718 +0300
@@ -1135,6 +1135,11 @@ static void __exit smtcfb_exit(void)
 	pci_unregister_driver(&smtcfb_driver);
 }
 
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, smtcfb_pci_table);
+#endif
+
 module_init(smtcfb_init);
 module_exit(smtcfb_exit);
 
--- linux-2.6.36-rc4-git3/drivers/staging/vme/boards/vme_vmivme7805.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/vme/boards/vme_vmivme7805.c	2010-09-17 12:39:02.368818072 +0300
@@ -118,6 +118,11 @@ MODULE_DESCRIPTION("VMIVME-7805 board su
 MODULE_AUTHOR("Arthur Benilov <arthur.benilov@iba-group.com>");
 MODULE_LICENSE("GPL");
 
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, vmic_ids);
+#endif
+
 module_init(vmic_init);
 module_exit(vmic_exit);
 
--- linux-2.6.36-rc4-git3/drivers/staging/vme/bridges/vme_ca91cx42.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c	2010-09-17 12:39:02.390100661 +0300
@@ -1836,5 +1836,10 @@ module_param(geoid, int, 0);
 MODULE_DESCRIPTION("VME driver for the Tundra Universe II VME bridge");
 MODULE_LICENSE("GPL");
 
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, ca91cx42_ids);
+#endif
+
 module_init(ca91cx42_init);
 module_exit(ca91cx42_exit);
--- linux-2.6.36-rc4-git3/drivers/staging/vme/bridges/vme_tsi148.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/vme/bridges/vme_tsi148.c	2010-09-17 12:39:02.406718051 +0300
@@ -2637,5 +2637,10 @@ module_param(geoid, int, 0);
 MODULE_DESCRIPTION("VME driver for the Tundra Tempe VME bridge");
 MODULE_LICENSE("GPL");
 
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, tsi148_ids);
+#endif
+
 module_init(tsi148_init);
 module_exit(tsi148_exit);

[-- Attachment #3: mods-pci_next_2010917.patch --]
[-- Type: text/plain, Size: 913 bytes --]

Fix lost PCI modaliases (next)

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-next-20100917/drivers/usb/otg/langwell_otg.c	2010-09-17 13:11:34.646802996 +0300
+++ b/drivers/usb/otg/langwell_otg.c	2010-09-17 13:17:14.765649883 +0300
@@ -2399,6 +2399,11 @@ static int __init langwell_otg_init(void
 {
 	return pci_register_driver(&otg_pci_driver);
 }
+
+#ifdef CONFIG_PCI
+MODULE_DEVICE_TABLE(pci, pci_ids);
+#endif
+
 module_init(langwell_otg_init);
 
 static void __exit langwell_otg_cleanup(void)
--- linux-2.6.36-rc4-next-20100917/drivers/misc/pch_phub.c	2010-09-17 13:11:33.476802996 +0300
+++ b/drivers/misc/pch_phub.c	2010-09-17 13:17:19.873954434 +0300
@@ -710,6 +710,9 @@ static void __exit pch_phub_pci_exit(voi
 	pci_unregister_driver(&pch_phub_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pci, pch_phub_pcidev_id);
+
 module_init(pch_phub_pci_init);
 module_exit(pch_phub_pci_exit);
 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* xenbus: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (3 preceding siblings ...)
  2010-09-17 13:11       ` Dzianis Kahanovich
@ 2010-09-17 13:26       ` Dzianis Kahanovich
  2010-09-17 18:09         ` Jeremy Fitzhardinge
  2010-09-17 13:27       ` usb: " Dzianis Kahanovich
                         ` (12 subsequent siblings)
  17 siblings, 1 reply; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:26 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 5 bytes --]

...


[-- Attachment #2: mods-xenbus.patch --]
[-- Type: text/plain, Size: 1523 bytes --]

Fix lost XENBUS modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/block/xen-blkfront.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/block/xen-blkfront.c	2010-09-17 12:38:42.342470778 +0300
@@ -1306,6 +1306,9 @@ static int __init xlblk_init(void)
 
 	return xenbus_register_frontend(&blkfront);
 }
+
+MODULE_DEVICE_TABLE(xenbus, blkfront_ids);
+
 module_init(xlblk_init);
 
 
--- linux-2.6.36-rc4-git3/drivers/input/xen-kbdfront.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/input/xen-kbdfront.c	2010-09-17 12:38:49.836217742 +0300
@@ -354,6 +354,9 @@ static void __exit xenkbd_cleanup(void)
 	xenbus_unregister_driver(&xenkbd_driver);
 }
 
+
+MODULE_DEVICE_TABLE(xenbus, xenkbd_ids);
+
 module_init(xenkbd_init);
 module_exit(xenkbd_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/net/xen-netfront.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/net/xen-netfront.c	2010-09-17 12:38:56.182883859 +0300
@@ -1816,6 +1816,9 @@ static int __init netif_init(void)
 
 	return xenbus_register_frontend(&netfront_driver);
 }
+
+MODULE_DEVICE_TABLE(xenbus, netfront_ids);
+
 module_init(netif_init);
 
 
--- linux-2.6.36-rc4-git3/drivers/video/xen-fbfront.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/video/xen-fbfront.c	2010-09-17 12:39:06.532811597 +0300
@@ -699,6 +699,9 @@ static void __exit xenfb_cleanup(void)
 	xenbus_unregister_driver(&xenfb_driver);
 }
 
+
+MODULE_DEVICE_TABLE(xenbus, xenfb_ids);
+
 module_init(xenfb_init);
 module_exit(xenfb_cleanup);
 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* usb: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (4 preceding siblings ...)
  2010-09-17 13:26       ` xenbus: " Dzianis Kahanovich
@ 2010-09-17 13:27       ` Dzianis Kahanovich
  2010-09-17 13:29       ` serio: " Dzianis Kahanovich
                         ` (11 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:27 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 6 bytes --]

...



[-- Attachment #2: mods-usb.patch --]
[-- Type: text/plain, Size: 1196 bytes --]

Fix lost USB modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>


--- linux-2.6.36-rc4-git3/drivers/staging/tm6000/tm6000-cards.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/tm6000/tm6000-cards.c	2010-09-17 12:39:02.282665813 +0300
@@ -979,6 +979,9 @@ static void __exit tm6000_module_exit(vo
 	usb_deregister(&tm6000_usb_driver);
 }
 
+
+MODULE_DEVICE_TABLE(usb, tm6000_id_table);
+
 module_init(tm6000_module_init);
 module_exit(tm6000_module_exit);
 
--- linux-2.6.36-rc4-git3/drivers/staging/lirc/lirc_sasem.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/lirc/lirc_sasem.c	2010-09-17 12:39:02.647259613 +0300
@@ -929,5 +929,8 @@ static void __exit sasem_exit(void)
 }
 
 
+
+MODULE_DEVICE_TABLE(usb, sasem_usb_id_table);
+
 module_init(sasem_init);
 module_exit(sasem_exit);
--- linux-2.6.36-rc4-git3/drivers/usb/atm/xusbatm.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/usb/atm/xusbatm.c	2010-09-17 12:39:03.203891509 +0300
@@ -217,6 +217,9 @@ static int __init xusbatm_init(void)
 
 	return usb_register(&xusbatm_usb_driver);
 }
+
+MODULE_DEVICE_TABLE(usb, xusbatm_usb_ids);
+
 module_init(xusbatm_init);
 
 static void __exit xusbatm_exit(void)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* serio: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (5 preceding siblings ...)
  2010-09-17 13:27       ` usb: " Dzianis Kahanovich
@ 2010-09-17 13:29       ` Dzianis Kahanovich
  2010-09-17 13:29       ` pnp: " Dzianis Kahanovich
                         ` (10 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:29 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 7 bytes --]

...




[-- Attachment #2: mods-serio.patch --]
[-- Type: text/plain, Size: 827 bytes --]

Fix lost SERIO modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/input/keyboard/hil_kbd.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/input/keyboard/hil_kbd.c	2010-09-17 12:38:48.312731282 +0300
@@ -591,5 +591,8 @@ static void __exit hil_dev_exit(void)
 	serio_unregister_driver(&hil_serio_drv);
 }
 
+
+MODULE_DEVICE_TABLE(serio, hil_dev_ids);
+
 module_init(hil_dev_init);
 module_exit(hil_dev_exit);
--- linux-2.6.36-rc4-git3/drivers/input/serio/hil_mlc.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/input/serio/hil_mlc.c	2010-09-17 12:38:49.262714119 +0300
@@ -1010,5 +1010,8 @@ static void __exit hil_mlc_exit(void)
 	tasklet_kill(&hil_mlcs_tasklet);
 }
 
+
+MODULE_DEVICE_TABLE(serio, hil_mlc_serio_id);
+
 module_init(hil_mlc_init);
 module_exit(hil_mlc_exit);

^ permalink raw reply	[flat|nested] 28+ messages in thread

* pnp: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (6 preceding siblings ...)
  2010-09-17 13:29       ` serio: " Dzianis Kahanovich
@ 2010-09-17 13:29       ` Dzianis Kahanovich
  2010-09-17 13:32       ` of: " Dzianis Kahanovich
                         ` (9 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:29 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 8 bytes --]

...





[-- Attachment #2: mods-pnp.patch --]
[-- Type: text/plain, Size: 1299 bytes --]

Fix lost PNP modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/ide/ide-pnp.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/ide/ide-pnp.c	2010-09-17 12:38:47.960703237 +0300
@@ -105,6 +105,9 @@ static void __exit pnpide_exit(void)
 	pnp_unregister_driver(&idepnp_driver);
 }
 
+
+MODULE_DEVICE_TABLE(pnp, idepnp_devices);
+
 module_init(pnpide_init);
 module_exit(pnpide_exit);
 
--- linux-2.6.36-rc4-git3/drivers/watchdog/sc1200wdt.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/watchdog/sc1200wdt.c	2010-09-17 12:39:07.012117913 +0300
@@ -473,6 +473,11 @@ static void __exit sc1200wdt_exit(void)
 	release_region(io, io_len);
 }
 
+
+#ifdef CONFIG_PNP
+MODULE_DEVICE_TABLE(pnp, scl200wdt_pnp_devices);
+#endif
+
 module_init(sc1200wdt_init);
 module_exit(sc1200wdt_exit);
 
--- linux-2.6.36-rc4-git3/drivers/staging/comedi/drivers/c6xdigio.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/comedi/drivers/c6xdigio.c	2010-09-17 12:38:58.863004604 +0300
@@ -527,6 +527,11 @@ static void __exit driver_c6xdigio_clean
 	comedi_driver_unregister(&driver_c6xdigio);
 }
 
+
+#ifdef CONFIG_PNP
+MODULE_DEVICE_TABLE(pnp, c6xdigio_pnp_tbl);
+#endif
+
 module_init(driver_c6xdigio_init_module);
 module_exit(driver_c6xdigio_cleanup_module);
 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* of: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (7 preceding siblings ...)
  2010-09-17 13:29       ` pnp: " Dzianis Kahanovich
@ 2010-09-17 13:32       ` Dzianis Kahanovich
  2010-09-17 13:35       ` i2c: " Dzianis Kahanovich
                         ` (8 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:32 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 73 bytes --]

...
Looks like most of arches select OF, but 2 modules still #ifdef.





[-- Attachment #2: mods-of.patch --]
[-- Type: text/plain, Size: 9130 bytes --]

Fix lost OF modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c	2010-09-17 12:30:29.000000000 +0300
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c	2010-09-17 12:38:39.564252081 +0300
@@ -554,6 +554,9 @@ static int __init mpc52xx_lpbfifo_init(v
 	pr_debug("Registering LocalPlus bus FIFO driver\n");
 	return of_register_platform_driver(&mpc52xx_lpbfifo_driver);
 }
+
+MODULE_DEVICE_TABLE(of, mpc52xx_lpbfifo_match);
+
 module_init(mpc52xx_lpbfifo_init);
 
 static void __exit mpc52xx_lpbfifo_exit(void)
--- linux-2.6.36-rc4-git3/arch/powerpc/platforms/83xx/suspend.c	2010-09-17 12:30:29.000000000 +0300
+++ b/arch/powerpc/platforms/83xx/suspend.c	2010-09-17 12:38:39.772893481 +0300
@@ -437,4 +437,7 @@ static int pmc_init(void)
 	return of_register_platform_driver(&pmc_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, pmc_match);
+
 module_init(pmc_init);
--- linux-2.6.36-rc4-git3/arch/powerpc/sysdev/axonram.c	2010-09-17 12:30:29.000000000 +0300
+++ b/arch/powerpc/sysdev/axonram.c	2010-09-17 12:38:40.134532872 +0300
@@ -363,6 +363,9 @@ axon_ram_exit(void)
 	unregister_blkdev(azfs_major, AXON_RAM_DEVICE_NAME);
 }
 
+
+MODULE_DEVICE_TABLE(of, axon_ram_device_id);
+
 module_init(axon_ram_init);
 module_exit(axon_ram_exit);
 
--- linux-2.6.36-rc4-git3/drivers/block/swim3.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/block/swim3.c	2010-09-17 12:38:42.154345639 +0300
@@ -1203,6 +1203,9 @@ int swim3_init(void)
 	return 0;
 }
 
+
+MODULE_DEVICE_TABLE(of, swim3_match);
+
 module_init(swim3_init)
 
 MODULE_LICENSE("GPL");
--- linux-2.6.36-rc4-git3/drivers/char/hw_random/pasemi-rng.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/char/hw_random/pasemi-rng.c	2010-09-17 12:38:42.754071285 +0300
@@ -153,6 +153,9 @@ static int __init rng_init(void)
 {
 	return of_register_platform_driver(&rng_driver);
 }
+
+MODULE_DEVICE_TABLE(of, rng_match);
+
 module_init(rng_init);
 
 static void __exit rng_exit(void)
--- linux-2.6.36-rc4-git3/drivers/crypto/amcc/crypto4xx_core.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/crypto/amcc/crypto4xx_core.c	2010-09-17 12:38:43.742801898 +0300
@@ -1300,6 +1300,9 @@ static void __exit crypto4xx_exit(void)
 	of_unregister_platform_driver(&crypto4xx_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, crypto4xx_match);
+
 module_init(crypto4xx_init);
 module_exit(crypto4xx_exit);
 
--- linux-2.6.36-rc4-git3/drivers/dma/mpc512x_dma.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/dma/mpc512x_dma.c	2010-09-17 12:38:44.062590960 +0300
@@ -784,6 +784,9 @@ static int __init mpc_dma_init(void)
 {
 	return of_register_platform_driver(&mpc_dma_driver);
 }
+
+MODULE_DEVICE_TABLE(of, mpc_dma_match);
+
 module_init(mpc_dma_init);
 
 static void __exit mpc_dma_exit(void)
--- linux-2.6.36-rc4-git3/drivers/edac/ppc4xx_edac.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/edac/ppc4xx_edac.c	2010-09-17 12:38:44.741831449 +0300
@@ -1437,6 +1437,9 @@ ppc4xx_edac_exit(void)
 	of_unregister_platform_driver(&ppc4xx_edac_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, ppc4xx_edac_match);
+
 module_init(ppc4xx_edac_init);
 module_exit(ppc4xx_edac_exit);
 
--- linux-2.6.36-rc4-git3/drivers/i2c/busses/i2c-ibm_iic.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/i2c/busses/i2c-ibm_iic.c	2010-09-17 12:38:47.562542364 +0300
@@ -824,5 +824,8 @@ static void __exit iic_exit(void)
 	of_unregister_platform_driver(&ibm_iic_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, ibm_iic_match);
+
 module_init(iic_init);
 module_exit(iic_exit);
--- linux-2.6.36-rc4-git3/drivers/input/misc/sparcspkr.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/input/misc/sparcspkr.c	2010-09-17 12:38:48.854974912 +0300
@@ -370,5 +370,8 @@ static void __exit sparcspkr_exit(void)
 	of_unregister_platform_driver(&grover_beep_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, bbc_beep_match);
+
 module_init(sparcspkr_init);
 module_exit(sparcspkr_exit);
--- linux-2.6.36-rc4-git3/drivers/macintosh/rack-meter.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/macintosh/rack-meter.c	2010-09-17 12:38:50.321238921 +0300
@@ -609,6 +609,9 @@ static void __exit rackmeter_exit(void)
 	macio_unregister_driver(&rackmeter_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, rackmeter_match);
+
 module_init(rackmeter_init);
 module_exit(rackmeter_exit);
 
--- linux-2.6.36-rc4-git3/drivers/mtd/nand/fsl_elbc_nand.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/mtd/nand/fsl_elbc_nand.c	2010-09-17 12:38:53.522689282 +0300
@@ -1096,6 +1096,9 @@ static void __exit fsl_elbc_exit(void)
 	of_unregister_platform_driver(&fsl_elbc_ctrl_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, fsl_elbc_match);
+
 module_init(fsl_elbc_init);
 module_exit(fsl_elbc_exit);
 
--- linux-2.6.36-rc4-git3/drivers/mtd/nand/mpc5121_nfc.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/mtd/nand/mpc5121_nfc.c	2010-09-17 12:38:53.772581461 +0300
@@ -903,6 +903,9 @@ static int __init mpc5121_nfc_init(void)
 	return of_register_platform_driver(&mpc5121_nfc_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, mpc5121_nfc_match);
+
 module_init(mpc5121_nfc_init);
 
 static void __exit mpc5121_nfc_cleanup(void)
--- linux-2.6.36-rc4-git3/drivers/net/can/mscan/mpc5xxx_can.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/net/can/mscan/mpc5xxx_can.c	2010-09-17 12:38:54.082643029 +0300
@@ -409,6 +409,9 @@ static int __init mpc5xxx_can_init(void)
 {
 	return of_register_platform_driver(&mpc5xxx_can_driver);
 }
+
+MODULE_DEVICE_TABLE(of, __devinitdatampc52xx_cdm_ids);
+
 module_init(mpc5xxx_can_init);
 
 static void __exit mpc5xxx_can_exit(void)
--- linux-2.6.36-rc4-git3/drivers/rtc/rtc-mpc5121.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/rtc/rtc-mpc5121.c	2010-09-17 12:38:57.285620109 +0300
@@ -378,6 +378,9 @@ static int __init mpc5121_rtc_init(void)
 {
 	return of_register_platform_driver(&mpc5121_rtc_driver);
 }
+
+MODULE_DEVICE_TABLE(of, mpc5121_rtc_match);
+
 module_init(mpc5121_rtc_init);
 
 static void __exit mpc5121_rtc_exit(void)
--- linux-2.6.36-rc4-git3/drivers/serial/cpm_uart/cpm_uart_core.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c	2010-09-17 12:38:57.892664025 +0300
@@ -1415,6 +1415,9 @@ static void __exit cpm_uart_exit(void)
 	uart_unregister_driver(&cpm_reg);
 }
 
+
+MODULE_DEVICE_TABLE(of, cpm_uart_match);
+
 module_init(cpm_uart_init);
 module_exit(cpm_uart_exit);
 
--- linux-2.6.36-rc4-git3/drivers/serial/apbuart.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/serial/apbuart.c	2010-09-17 12:38:58.222634640 +0300
@@ -701,6 +701,9 @@ static void __exit grlib_apbuart_exit(vo
 	of_unregister_platform_driver(&grlib_apbuart_of_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, __initdataapbuart_match);
+
 module_init(grlib_apbuart_init);
 module_exit(grlib_apbuart_exit);
 
--- linux-2.6.36-rc4-git3/drivers/serial/of_serial.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/serial/of_serial.c	2010-09-17 12:38:58.422708279 +0300
@@ -187,6 +187,9 @@ static int __init of_platform_serial_ini
 {
 	return of_register_platform_driver(&of_platform_serial_driver);
 }
+
+MODULE_DEVICE_TABLE(of, __devinitdataof_platform_serial_table);
+
 module_init(of_platform_serial_init);
 
 static void __exit of_platform_serial_exit(void)
--- linux-2.6.36-rc4-git3/drivers/video/platinumfb.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/video/platinumfb.c	2010-09-17 12:39:06.232755519 +0300
@@ -709,6 +709,9 @@ static void __exit platinumfb_exit(void)
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("framebuffer driver for Apple Platinum video");
+
+MODULE_DEVICE_TABLE(of, platinumfb_match);
+
 module_init(platinumfb_init);
 
 #ifdef MODULE
--- linux-2.6.36-rc4-git3/drivers/watchdog/gef_wdt.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/watchdog/gef_wdt.c	2010-09-17 12:39:07.232816804 +0300
@@ -322,6 +322,9 @@ static void __exit gef_wdt_exit(void)
 	of_unregister_platform_driver(&gef_wdt_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, gef_wdt_ids);
+
 module_init(gef_wdt_init);
 module_exit(gef_wdt_exit);
 
--- linux-2.6.36-rc4-git3/sound/sparc/amd7930.c	2010-09-17 12:30:32.000000000 +0300
+++ b/sound/sparc/amd7930.c	2010-09-17 12:39:08.099147434 +0300
@@ -1095,5 +1095,8 @@ static void __exit amd7930_exit(void)
 	of_unregister_platform_driver(&amd7930_sbus_driver);
 }
 
+
+MODULE_DEVICE_TABLE(of, amd7930_match);
+
 module_init(amd7930_init);
 module_exit(amd7930_exit);
--- linux-2.6.36-rc4-git3/drivers/leds/leds-gpio.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/leds/leds-gpio.c	2010-09-17 12:38:50.231069935 +0300
@@ -344,6 +344,11 @@ static void __exit gpio_led_exit(void)
 #endif
 }
 
+
+#ifdef CONFIG_OF
+MODULE_DEVICE_TABLE(of, of_gpio_leds_match);
+#endif
+
 module_init(gpio_led_init);
 module_exit(gpio_led_exit);
 
--- linux-2.6.36-rc4-git3/drivers/mmc/host/mmc_spi.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/mmc/host/mmc_spi.c	2010-09-17 12:38:53.357999577 +0300
@@ -1521,6 +1521,11 @@ static int __init mmc_spi_init(void)
 {
 	return spi_register_driver(&mmc_spi_driver);
 }
+
+#ifdef CONFIG_OF
+MODULE_DEVICE_TABLE(of, mmc_spi_of_match_table);
+#endif
+
 module_init(mmc_spi_init);
 
 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* i2c: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (8 preceding siblings ...)
  2010-09-17 13:32       ` of: " Dzianis Kahanovich
@ 2010-09-17 13:35       ` Dzianis Kahanovich
  2010-09-17 14:06         ` Mark Brown
  2010-09-17 13:36       ` hid: " Dzianis Kahanovich
                         ` (7 subsequent siblings)
  17 siblings, 1 reply; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:35 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

...
+ 1 attach for "next" branch.

I unsure in requrement of i2c modaliases, may be this bus undetectable, but I
not play with special tools with vendors exclude VIA.




[-- Attachment #2: mods-i2c.patch --]
[-- Type: text/plain, Size: 15936 bytes --]

Fix lost I2C modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/staging/msm/hdmi_sii9022.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/msm/hdmi_sii9022.c	2010-09-17 12:39:01.682682707 +0300
@@ -239,6 +239,11 @@ static void __exit hdmi_sii_exit(void)
 	i2c_del_driver(&hdmi_sii_i2c_driver);
 }
 
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, hmdi_sii_id);
+#endif
+
 module_init(hdmi_sii_init);
 module_exit(hdmi_sii_exit);
 MODULE_LICENSE("GPL v2");
--- linux-2.6.36-rc4-git3/drivers/hwmon/ad7414.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/hwmon/ad7414.c	2010-09-17 12:38:46.132572718 +0300
@@ -254,6 +254,9 @@ static int __init ad7414_init(void)
 {
 	return i2c_add_driver(&ad7414_driver);
 }
+
+MODULE_DEVICE_TABLE(i2c, ad7414_id);
+
 module_init(ad7414_init);
 
 static void __exit ad7414_exit(void)
--- linux-2.6.36-rc4-git3/drivers/hwmon/adt7411.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/hwmon/adt7411.c	2010-09-17 12:38:46.242609622 +0300
@@ -351,6 +351,9 @@ static int __init sensors_adt7411_init(v
 {
 	return i2c_add_driver(&adt7411_driver);
 }
+
+MODULE_DEVICE_TABLE(i2c, adt7411_id);
+
 module_init(sensors_adt7411_init)
 
 static void __exit sensors_adt7411_exit(void)
--- linux-2.6.36-rc4-git3/drivers/macintosh/windfarm_lm75_sensor.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/macintosh/windfarm_lm75_sensor.c	2010-09-17 12:38:50.385819714 +0300
@@ -249,6 +249,9 @@ static void __exit wf_lm75_sensor_exit(v
 }
 
 
+
+MODULE_DEVICE_TABLE(i2c, wf_lm75_id);
+
 module_init(wf_lm75_sensor_init);
 module_exit(wf_lm75_sensor_exit);
 
--- linux-2.6.36-rc4-git3/drivers/macintosh/windfarm_max6690_sensor.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/macintosh/windfarm_max6690_sensor.c	2010-09-17 12:38:50.449725150 +0300
@@ -199,6 +199,9 @@ static void __exit wf_max6690_sensor_exi
 	i2c_del_driver(&wf_max6690_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, wf_max6690_id);
+
 module_init(wf_max6690_sensor_init);
 module_exit(wf_max6690_sensor_exit);
 
--- linux-2.6.36-rc4-git3/drivers/macintosh/windfarm_smu_sat.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/macintosh/windfarm_smu_sat.c	2010-09-17 12:38:50.572504781 +0300
@@ -406,6 +406,9 @@ static void __exit sat_sensors_exit(void
 }
 #endif
 
+
+MODULE_DEVICE_TABLE(i2c, wf_sat_id);
+
 module_init(sat_sensors_init);
 /*module_exit(sat_sensors_exit); Uncomment when cleanup is implemented */
 
--- linux-2.6.36-rc4-git3/drivers/macintosh/therm_adt746x.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/macintosh/therm_adt746x.c	2010-09-17 12:38:50.762708501 +0300
@@ -692,5 +692,8 @@ thermostat_exit(void)
 	of_device_unregister(of_dev);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, therm_adt746x_id);
+
 module_init(thermostat_init);
 module_exit(thermostat_exit);
--- linux-2.6.36-rc4-git3/drivers/macintosh/therm_pm72.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/macintosh/therm_pm72.c	2010-09-17 12:38:50.922631361 +0300
@@ -2291,6 +2291,9 @@ static void __exit therm_pm72_exit(void)
 		of_device_unregister(of_dev);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, therm_pm72_id);
+
 module_init(therm_pm72_init);
 module_exit(therm_pm72_exit);
 
--- linux-2.6.36-rc4-git3/drivers/macintosh/therm_windtunnel.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/macintosh/therm_windtunnel.c	2010-09-17 12:38:51.079860513 +0300
@@ -522,6 +522,9 @@ g4fan_exit( void )
 		of_device_unregister( x.of_dev );
 }
 
+
+MODULE_DEVICE_TABLE(i2c, therm_windtunnel_id);
+
 module_init(g4fan_init);
 module_exit(g4fan_exit);
 
--- linux-2.6.36-rc4-git3/drivers/media/video/ir-kbd-i2c.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/media/video/ir-kbd-i2c.c	2010-09-17 12:38:51.782863117 +0300
@@ -507,6 +507,9 @@ static void __exit ir_fini(void)
 	i2c_del_driver(&driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, ir_kbd_id);
+
 module_init(ir_init);
 module_exit(ir_fini);
 
--- linux-2.6.36-rc4-git3/drivers/misc/eeprom/eeprom.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/misc/eeprom/eeprom.c	2010-09-17 12:38:52.622641652 +0300
@@ -246,5 +246,8 @@ MODULE_AUTHOR("Frodo Looijaard <frodol@d
 MODULE_DESCRIPTION("I2C EEPROM driver");
 MODULE_LICENSE("GPL");
 
+
+MODULE_DEVICE_TABLE(i2c, eeprom_id);
+
 module_init(eeprom_init);
 module_exit(eeprom_exit);
--- linux-2.6.36-rc4-git3/drivers/misc/eeprom/max6875.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/misc/eeprom/max6875.c	2010-09-17 12:38:52.812752203 +0300
@@ -223,5 +223,8 @@ MODULE_AUTHOR("Ben Gardner <bgardner@wab
 MODULE_DESCRIPTION("MAX6875 driver");
 MODULE_LICENSE("GPL");
 
+
+MODULE_DEVICE_TABLE(i2c, max6875_id);
+
 module_init(max6875_init);
 module_exit(max6875_exit);
--- linux-2.6.36-rc4-git3/drivers/misc/bh1780gli.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/misc/bh1780gli.c	2010-09-17 12:38:52.947320406 +0300
@@ -265,6 +265,9 @@ static void __exit bh1780_exit(void)
 	i2c_del_driver(&bh1780_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, bh1780_id);
+
 module_init(bh1780_init)
 module_exit(bh1780_exit)
 
--- linux-2.6.36-rc4-git3/drivers/misc/bmp085.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/misc/bmp085.c	2010-09-17 12:38:53.032585847 +0300
@@ -478,5 +478,8 @@ MODULE_AUTHOR("Christoph Mair <christoph
 MODULE_DESCRIPTION("BMP085 driver");
 MODULE_LICENSE("GPL");
 
+
+MODULE_DEVICE_TABLE(i2c, bmp085_id);
+
 module_init(bmp085_init);
 module_exit(bmp085_exit);
--- linux-2.6.36-rc4-git3/drivers/power/bq27x00_battery.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/power/bq27x00_battery.c	2010-09-17 12:38:56.472573087 +0300
@@ -458,6 +458,9 @@ static int __init bq27x00_battery_init(v
 
 	return ret;
 }
+
+MODULE_DEVICE_TABLE(i2c, bq27x00_id);
+
 module_init(bq27x00_battery_init);
 
 static void __exit bq27x00_battery_exit(void)
--- linux-2.6.36-rc4-git3/drivers/power/ds2782_battery.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/power/ds2782_battery.c	2010-09-17 12:38:56.559961282 +0300
@@ -407,6 +407,9 @@ static int __init ds278x_init(void)
 {
 	return i2c_add_driver(&ds278x_battery_driver);
 }
+
+MODULE_DEVICE_TABLE(i2c, ds278x_id);
+
 module_init(ds278x_init);
 
 static void __exit ds278x_exit(void)
--- linux-2.6.36-rc4-git3/drivers/power/z2_battery.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/power/z2_battery.c	2010-09-17 12:38:56.654297616 +0300
@@ -314,6 +314,9 @@ static void __exit z2_batt_exit(void)
 	i2c_del_driver(&z2_batt_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, z2_batt_id);
+
 module_init(z2_batt_init);
 module_exit(z2_batt_exit);
 
--- linux-2.6.36-rc4-git3/drivers/staging/go7007/wis-ov7640.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/go7007/wis-ov7640.c	2010-09-17 12:39:00.212790117 +0300
@@ -101,6 +101,9 @@ static void __exit wis_ov7640_cleanup(vo
 	i2c_del_driver(&wis_ov7640_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, wis_ov7640_id);
+
 module_init(wis_ov7640_init);
 module_exit(wis_ov7640_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/staging/go7007/wis-saa7113.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/go7007/wis-saa7113.c	2010-09-17 12:39:00.392589484 +0300
@@ -329,6 +329,9 @@ static void __exit wis_saa7113_cleanup(v
 	i2c_del_driver(&wis_saa7113_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, wis_saa7113_id);
+
 module_init(wis_saa7113_init);
 module_exit(wis_saa7113_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/staging/go7007/wis-saa7115.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/go7007/wis-saa7115.c	2010-09-17 12:39:00.562601875 +0300
@@ -462,6 +462,9 @@ static void __exit wis_saa7115_cleanup(v
 	i2c_del_driver(&wis_saa7115_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, wis_saa7115_id);
+
 module_init(wis_saa7115_init);
 module_exit(wis_saa7115_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/staging/go7007/wis-sony-tuner.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/go7007/wis-sony-tuner.c	2010-09-17 12:39:00.720208066 +0300
@@ -713,6 +713,9 @@ static void __exit wis_sony_tuner_cleanu
 	i2c_del_driver(&wis_sony_tuner_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, wis_sony_tuner_id);
+
 module_init(wis_sony_tuner_init);
 module_exit(wis_sony_tuner_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/staging/go7007/wis-tw2804.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/go7007/wis-tw2804.c	2010-09-17 12:39:00.912580904 +0300
@@ -352,6 +352,9 @@ static void __exit wis_tw2804_cleanup(vo
 	i2c_del_driver(&wis_tw2804_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, wis_tw2804_id);
+
 module_init(wis_tw2804_init);
 module_exit(wis_tw2804_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/staging/go7007/wis-tw9903.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/go7007/wis-tw9903.c	2010-09-17 12:39:01.062698246 +0300
@@ -334,6 +334,9 @@ static void __exit wis_tw9903_cleanup(vo
 	i2c_del_driver(&wis_tw9903_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, wis_tw9903_id);
+
 module_init(wis_tw9903_init);
 module_exit(wis_tw9903_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/staging/go7007/wis-uda1342.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/go7007/wis-uda1342.c	2010-09-17 12:39:01.162683389 +0300
@@ -107,6 +107,9 @@ static void __exit wis_uda1342_cleanup(v
 	i2c_del_driver(&wis_uda1342_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, wis_uda1342_id);
+
 module_init(wis_uda1342_init);
 module_exit(wis_uda1342_cleanup);
 
--- linux-2.6.36-rc4-git3/drivers/staging/iio/magnetometer/hmc5843.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/iio/magnetometer/hmc5843.c	2010-09-17 12:39:01.482693157 +0300
@@ -620,5 +620,8 @@ MODULE_AUTHOR("Shubhrajyoti Datta <shubh
 MODULE_DESCRIPTION("HMC5843 driver");
 MODULE_LICENSE("GPL");
 
+
+MODULE_DEVICE_TABLE(i2c, hmc5843_id);
+
 module_init(hmc5843_init);
 module_exit(hmc5843_exit);
--- linux-2.6.36-rc4-git3/drivers/staging/lirc/lirc_i2c.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/lirc/lirc_i2c.c	2010-09-17 12:39:02.503848414 +0300
@@ -532,5 +532,8 @@ MODULE_PARM_DESC(minor, "Preferred minor
 module_param(debug, bool, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Enable debugging messages");
 
+
+MODULE_DEVICE_TABLE(i2c, ir_receiver_id);
+
 module_init(lirc_i2c_init);
 module_exit(lirc_i2c_exit);
--- linux-2.6.36-rc4-git3/drivers/staging/lirc/lirc_zilog.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/lirc/lirc_zilog.c	2010-09-17 12:39:02.802738200 +0300
@@ -1364,6 +1364,9 @@ static void __exit zilog_exit(void)
 	zilog_notify("Zilog/Hauppauge IR driver unloaded\n");
 }
 
+
+MODULE_DEVICE_TABLE(i2c, ir_transceiver_id);
+
 module_init(zilog_init);
 module_exit(zilog_exit);
 
--- linux-2.6.36-rc4-git3/drivers/video/backlight/tosa_bl.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/backlight/tosa_bl.c	2010-09-17 12:39:05.082917502 +0300
@@ -190,6 +190,9 @@ static void __exit tosa_bl_exit(void)
 	i2c_del_driver(&tosa_bl_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, tosa_bl_id);
+
 module_init(tosa_bl_init);
 module_exit(tosa_bl_exit);
 
--- linux-2.6.36-rc4-git3/drivers/w1/masters/ds2482.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/w1/masters/ds2482.c	2010-09-17 12:39:06.739051331 +0300
@@ -519,5 +519,8 @@ MODULE_AUTHOR("Ben Gardner <bgardner@wab
 MODULE_DESCRIPTION("DS2482 driver");
 MODULE_LICENSE("GPL");
 
+
+MODULE_DEVICE_TABLE(i2c, ds2482_id);
+
 module_init(sensors_ds2482_init);
 module_exit(sensors_ds2482_exit);
--- linux-2.6.36-rc4-git3/sound/aoa/codecs/onyx.c	2010-08-02 01:11:14.000000000 +0300
+++ b/sound/aoa/codecs/onyx.c	2010-09-17 12:39:07.536173671 +0300
@@ -1145,5 +1145,8 @@ static void __exit onyx_exit(void)
 	i2c_del_driver(&onyx_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, onyx_i2c_id);
+
 module_init(onyx_init);
 module_exit(onyx_exit);
--- linux-2.6.36-rc4-git3/sound/aoa/codecs/tas.c	2010-08-02 01:11:14.000000000 +0300
+++ b/sound/aoa/codecs/tas.c	2010-09-17 12:39:07.598641032 +0300
@@ -1036,5 +1036,8 @@ static void __exit tas_exit(void)
 	i2c_del_driver(&tas_driver);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, tas_i2c_id);
+
 module_init(tas_init);
 module_exit(tas_exit);
--- linux-2.6.36-rc4-git3/drivers/staging/msm/lcdc_st15.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/msm/lcdc_st15.c	2010-09-17 12:39:01.786455211 +0300
@@ -234,4 +234,9 @@ init_exit:
 	return ret;
 }
 
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, hmdi_sii_id);
+#endif
+
 module_init(lcdc_st15_init);
--- linux-2.6.36-rc4-git3/drivers/staging/dream/camera/mt9d112.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/dream/camera/mt9d112.c	2010-09-17 12:38:59.252601864 +0300
@@ -759,4 +759,9 @@ static int __init mt9d112_init(void)
 	return platform_driver_register(&msm_camera_driver);
 }
 
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, mt9d112_i2c_id);
+#endif
+
 module_init(mt9d112_init);
--- linux-2.6.36-rc4-git3/drivers/staging/dream/camera/mt9p012_fox.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/dream/camera/mt9p012_fox.c	2010-09-17 12:38:59.422719634 +0300
@@ -1303,4 +1303,9 @@ static int __init mt9p012_init(void)
 	return platform_driver_register(&msm_camera_driver);
 }
 
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, mt9p012_i2c_id);
+#endif
+
 module_init(mt9p012_init);
--- linux-2.6.36-rc4-git3/drivers/staging/dream/camera/mt9t013.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/dream/camera/mt9t013.c	2010-09-17 12:38:59.522558641 +0300
@@ -1494,4 +1494,9 @@ static int __init mt9t013_init(void)
 	return platform_driver_register(&msm_camera_driver);
 }
 
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, mt9t013_i2c_id);
+#endif
+
 module_init(mt9t013_init);
--- linux-2.6.36-rc4-git3/sound/soc/s3c24xx/neo1973_wm8753.c	2010-08-02 01:11:14.000000000 +0300
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c	2010-09-17 12:39:07.917253497 +0300
@@ -698,6 +698,9 @@ static void __exit neo1973_exit(void)
 	platform_device_unregister(neo1973_snd_device);
 }
 
+
+MODULE_DEVICE_TABLE(i2c, lm4857_i2c_id);
+
 module_init(neo1973_init);
 module_exit(neo1973_exit);
 
--- linux-2.6.36-rc4-git3/drivers/rtc/rtc-ds1672.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/rtc/rtc-ds1672.c	2010-09-17 12:38:56.832687659 +0300
@@ -216,5 +216,10 @@ MODULE_DESCRIPTION("Dallas/Maxim DS1672
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
 
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, ds1672_id);
+#endif
+
 module_init(ds1672_init);
 module_exit(ds1672_exit);
--- linux-2.6.36-rc4-git3/drivers/rtc/rtc-max6900.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/rtc/rtc-max6900.c	2010-09-17 12:38:57.140955566 +0300
@@ -276,5 +276,10 @@ MODULE_AUTHOR("Dale Farnsworth <dale@far
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
 
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, max6900_id);
+#endif
+
 module_init(max6900_init);
 module_exit(max6900_exit);
--- linux-2.6.36-rc4-git3/drivers/staging/dream/camera/s5k3e2fx.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/dream/camera/s5k3e2fx.c	2010-09-17 12:38:59.655947071 +0300
@@ -1303,5 +1303,10 @@ static int __init s5k3e2fx_init(void)
 	return platform_driver_register(&msm_camera_driver);
 }
 
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, s5k3e2fx_i2c_id);
+#endif
+
 module_init(s5k3e2fx_init);
 
--- linux-2.6.36-rc4-git3/drivers/staging/dream/synaptics_i2c_rmi.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/staging/dream/synaptics_i2c_rmi.c	2010-09-17 12:38:59.842848649 +0300
@@ -641,6 +641,11 @@ static void __exit synaptics_ts_exit(voi
 		destroy_workqueue(synaptics_wq);
 }
 
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, synaptics_ts_id);
+#endif
+
 module_init(synaptics_ts_init);
 module_exit(synaptics_ts_exit);
 
--- linux-2.6.36-rc4-git3/sound/soc/codecs/tlv320dac33.c	2010-09-17 12:30:31.000000000 +0300
+++ b/sound/soc/codecs/tlv320dac33.c	2010-09-17 12:39:07.801200070 +0300
@@ -1712,6 +1712,9 @@ static int __init dac33_module_init(void
 	}
 	return 0;
 }
+
+MODULE_DEVICE_TABLE(i2c, tlv320dac33_i2c_id);
+
 module_init(dac33_module_init);
 
 static void __exit dac33_module_exit(void)

[-- Attachment #3: mods-i2c-next.patch --]
[-- Type: text/plain, Size: 518 bytes --]

Fix lost I2C modaliases (next)

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>


--- linux-2.6.36-rc4-next-20100917/drivers/power/bq20z75.c	2010-09-17 13:11:33.826802996 +0300
+++ b/drivers/power/bq20z75.c	2010-09-17 13:17:18.114340310 +0300
@@ -373,6 +373,11 @@ static int __init bq20z75_battery_init(v
 {
 	return i2c_add_driver(&bq20z75_battery_driver);
 }
+
+#ifdef CONFIG_I2C
+MODULE_DEVICE_TABLE(i2c, bq20z75_id);
+#endif
+
 module_init(bq20z75_battery_init);
 
 static void __exit bq20z75_battery_exit(void)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* hid: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (9 preceding siblings ...)
  2010-09-17 13:35       ` i2c: " Dzianis Kahanovich
@ 2010-09-17 13:36       ` Dzianis Kahanovich
  2010-09-17 13:36       ` dio: " Dzianis Kahanovich
                         ` (6 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:36 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 4 bytes --]

...

[-- Attachment #2: mods-hid.patch --]
[-- Type: text/plain, Size: 770 bytes --]

Fix lost HID modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/hid/hid-core.c	2010-09-17 12:30:32.000000000 +0300
+++ b/drivers/hid/hid-core.c	2010-09-17 12:38:45.972722957 +0300
@@ -1960,6 +1960,9 @@ static void __exit hid_exit(void)
 	bus_unregister(&hid_bus_type);
 }
 
+
+MODULE_DEVICE_TABLE(hid, hid_hiddev_list);
+
 module_init(hid_init);
 module_exit(hid_exit);
 
--- linux-2.6.36-rc4-git3/net/bluetooth/hidp/core.c	2010-08-02 01:11:14.000000000 +0300
+++ b/net/bluetooth/hidp/core.c	2010-09-17 12:39:07.372942338 +0300
@@ -1045,6 +1045,9 @@ static void __exit hidp_exit(void)
 	hid_unregister_driver(&hidp_driver);
 }
 
+
+MODULE_DEVICE_TABLE(hid, hidp_table);
+
 module_init(hidp_init);
 module_exit(hidp_exit);
 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* dio: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (10 preceding siblings ...)
  2010-09-17 13:36       ` hid: " Dzianis Kahanovich
@ 2010-09-17 13:36       ` Dzianis Kahanovich
  2010-09-17 13:37       ` ccw: " Dzianis Kahanovich
                         ` (5 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:36 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 5 bytes --]

...


[-- Attachment #2: mods-dio.patch --]
[-- Type: text/plain, Size: 1237 bytes --]

Fix lost DIO modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/serial/8250_hp300.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/serial/8250_hp300.c	2010-09-17 12:38:57.712780474 +0300
@@ -320,6 +320,11 @@ static void __exit hp300_8250_exit(void)
 #endif
 }
 
+
+#ifdef CONFIG_DIO
+MODULE_DEVICE_TABLE(dio, hpdca_dio_tbl);
+#endif
+
 module_init(hp300_8250_init);
 module_exit(hp300_8250_exit);
 MODULE_DESCRIPTION("HP DCA/APCI serial driver");
--- linux-2.6.36-rc4-git3/drivers/video/hpfb.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/video/hpfb.c	2010-09-17 12:39:05.182624032 +0300
@@ -411,6 +411,9 @@ void __exit hpfb_cleanup_module(void)
 	dio_unregister_driver(&hpfb_driver);
 }
 
+
+MODULE_DEVICE_TABLE(dio, hpfb_dio_tbl);
+
 module_init(hpfb_init);
 module_exit(hpfb_cleanup_module);
 
--- linux-2.6.36-rc4-git3/drivers/net/hplance.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/net/hplance.c	2010-09-17 12:38:54.454135462 +0300
@@ -236,6 +236,9 @@ static void __exit hplance_cleanup_modul
         dio_unregister_driver(&hplance_driver);
 }
 
+
+MODULE_DEVICE_TABLE(dio, hplance_dio_tbl);
+
 module_init(hplance_init_module);
 module_exit(hplance_cleanup_module);
 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* ccw: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (11 preceding siblings ...)
  2010-09-17 13:36       ` dio: " Dzianis Kahanovich
@ 2010-09-17 13:37       ` Dzianis Kahanovich
  2010-09-17 13:38       ` acpi: " Dzianis Kahanovich
                         ` (4 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:37 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 6 bytes --]

...



[-- Attachment #2: mods-ccw.patch --]
[-- Type: text/plain, Size: 776 bytes --]

Fix lost CCW modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/s390/char/con3215.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/s390/char/con3215.c	2010-09-17 12:38:57.342909394 +0300
@@ -1163,5 +1163,8 @@ static void __exit tty3215_exit(void)
 	ccw_driver_unregister(&raw3215_ccw_driver);
 }
 
+
+MODULE_DEVICE_TABLE(ccw, raw3215_id);
+
 module_init(tty3215_init);
 module_exit(tty3215_exit);
--- linux-2.6.36-rc4-git3/drivers/s390/char/raw3270.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/s390/char/raw3270.c	2010-09-17 12:38:57.387632242 +0300
@@ -1430,6 +1430,9 @@ raw3270_exit(void)
 
 MODULE_LICENSE("GPL");
 
+
+MODULE_DEVICE_TABLE(ccw, raw3270_id);
+
 module_init(raw3270_init);
 module_exit(raw3270_exit);
 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* acpi: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (12 preceding siblings ...)
  2010-09-17 13:37       ` ccw: " Dzianis Kahanovich
@ 2010-09-17 13:38       ` Dzianis Kahanovich
  2010-09-17 13:38       ` spi " Dzianis Kahanovich
                         ` (3 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:38 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 7 bytes --]

...




[-- Attachment #2: mods-acpi.patch --]
[-- Type: text/plain, Size: 1159 bytes --]

--- linux-2.6.36-rc4-git3/drivers/platform/x86/intel_menlow.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/platform/x86/intel_menlow.c	2010-09-17 12:38:56.376753809 +0300
@@ -536,5 +536,8 @@ static void __exit intel_menlow_module_e
 	intel_menlow_unregister_sensor();
 }
 
+
+MODULE_DEVICE_TABLE(acpi, intel_menlow_memory_ids);
+
 module_init(intel_menlow_module_init);
 module_exit(intel_menlow_module_exit);
--- linux-2.6.36-rc4-git3/drivers/staging/quickstart/quickstart.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/quickstart/quickstart.c	2010-09-17 12:39:02.903030634 +0300
@@ -470,5 +470,8 @@ fail_pfdrv_reg:
 	return ret;
 }
 
+
+MODULE_DEVICE_TABLE(acpi, quickstart_device_ids);
+
 module_init(quickstart_init);
 module_exit(quickstart_exit);
--- linux-2.6.36-rc4-git3/drivers/char/sonypi.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/char/sonypi.c	2010-09-17 12:38:43.182861196 +0300
@@ -1565,5 +1565,10 @@ static void __exit sonypi_exit(void)
 	printk(KERN_INFO "sonypi: removed.\n");
 }
 
+
+#ifdef CONFIG_ACPI
+MODULE_DEVICE_TABLE(acpi, sonypi_device_ids);
+#endif
+
 module_init(sonypi_init);
 module_exit(sonypi_exit);

^ permalink raw reply	[flat|nested] 28+ messages in thread

* spi Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (13 preceding siblings ...)
  2010-09-17 13:38       ` acpi: " Dzianis Kahanovich
@ 2010-09-17 13:38       ` Dzianis Kahanovich
  2010-09-17 13:39       ` RapidIO: " Dzianis Kahanovich
                         ` (2 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:38 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 8 bytes --]

...





[-- Attachment #2: mod-spi.patch --]
[-- Type: text/plain, Size: 492 bytes --]

Fix lost SPI modalias

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/staging/iio/imu/adis16350_core.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/iio/imu/adis16350_core.c	2010-09-17 12:39:01.312564201 +0300
@@ -724,6 +724,9 @@ static __init int adis16350_init(void)
 {
 	return spi_register_driver(&adis16350_driver);
 }
+
+MODULE_DEVICE_TABLE(spi, adis16350_id);
+
 module_init(adis16350_init);
 
 static __exit void adis16350_exit(void)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RapidIO: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (14 preceding siblings ...)
  2010-09-17 13:38       ` spi " Dzianis Kahanovich
@ 2010-09-17 13:39       ` Dzianis Kahanovich
  2010-09-17 13:42       ` platform: " Dzianis Kahanovich
  2010-09-17 15:55       ` acpi (signed): " Dzianis Kahanovich
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:39 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 9 bytes --]

...






[-- Attachment #2: mod-rapidio.patch --]
[-- Type: text/plain, Size: 429 bytes --]

Fix lost RapidIO modalias

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/net/rionet.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/net/rionet.c	2010-09-17 12:38:54.942480418 +0300
@@ -571,5 +571,8 @@ static void __exit rionet_exit(void)
 	rio_unregister_driver(&rionet_driver);
 }
 
+
+MODULE_DEVICE_TABLE(rio, rionet_id_table);
+
 module_init(rionet_init);
 module_exit(rionet_exit);

^ permalink raw reply	[flat|nested] 28+ messages in thread

* platform: Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (15 preceding siblings ...)
  2010-09-17 13:39       ` RapidIO: " Dzianis Kahanovich
@ 2010-09-17 13:42       ` Dzianis Kahanovich
  2010-09-17 13:54         ` Mark Brown
  2010-09-17 15:55       ` acpi (signed): " Dzianis Kahanovich
  17 siblings, 1 reply; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 13:42 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 25 bytes --]

...
Last (14 buses)






[-- Attachment #2: mod-platform.patch --]
[-- Type: text/plain, Size: 447 bytes --]

Fix lost PLATFORM modalias

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/sound/soc/sh/fsi.c	2010-09-17 12:30:32.000000000 +0300
+++ b/sound/soc/sh/fsi.c	2010-09-17 12:39:08.026437283 +0300
@@ -1250,6 +1250,9 @@ static void __exit fsi_mobile_exit(void)
 {
 	platform_driver_unregister(&fsi_driver);
 }
+
+MODULE_DEVICE_TABLE(platform, fsi_id_table);
+
 module_init(fsi_mobile_init);
 module_exit(fsi_mobile_exit);
 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: platform: Re: #2 (Re: More modaliases + patchtool))
  2010-09-17 13:42       ` platform: " Dzianis Kahanovich
@ 2010-09-17 13:54         ` Mark Brown
  0 siblings, 0 replies; 28+ messages in thread
From: Mark Brown @ 2010-09-17 13:54 UTC (permalink / raw)
  To: mahatma
  Cc: Rusty Russell, linux-kernel, Jeremy Fitzhardinge,
	Dmitry Torokhov, Andrew Morton, lrg, kuninori.morimoto.gx

On Fri, Sep 17, 2010 at 04:42:05PM +0300, Dzianis Kahanovich wrote:
> ...
> Last (14 buses)

Please do try to follow the recommendations in SubmittingPatches,
including those regarding the formatting of your mails and CCing
relevant maintainers and lists.

> Fix lost PLATFORM modalias
> 
> Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>
> 
> --- linux-2.6.36-rc4-git3/sound/soc/sh/fsi.c	2010-09-17 12:30:32.000000000 +0300
> +++ b/sound/soc/sh/fsi.c	2010-09-17 12:39:08.026437283 +0300
> @@ -1250,6 +1250,9 @@ static void __exit fsi_mobile_exit(void)
>  {
>  	platform_driver_unregister(&fsi_driver);
>  }
> +
> +MODULE_DEVICE_TABLE(platform, fsi_id_table);
> +

The normal style for this stuff would be to put the MODULE_DEVICE_TABLE()
next to the actual table.  I will apply a version of your patch with the
addition moved.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: i2c: Re: #2 (Re: More modaliases + patchtool))
  2010-09-17 13:35       ` i2c: " Dzianis Kahanovich
@ 2010-09-17 14:06         ` Mark Brown
  2010-09-17 15:47           ` Dzianis Kahanovich
  0 siblings, 1 reply; 28+ messages in thread
From: Mark Brown @ 2010-09-17 14:06 UTC (permalink / raw)
  To: Dzianis Kahanovich
  Cc: Rusty Russell, linux-kernel, Jeremy Fitzhardinge,
	Dmitry Torokhov, Andrew Morton, lrg

On Fri, Sep 17, 2010 at 04:35:33PM +0300, Dzianis Kahanovich wrote:
> ...
> + 1 attach for "next" branch.

Again, please try to follow the process in SubmittingPatches for sending
patches.

> I unsure in requrement of i2c modaliases, may be this bus undetectable, but I
> not play with special tools with vendors exclude VIA.

I2C is not probeable but drivers can be autoloaded since boards must
register devices before they can be probed.

> --- linux-2.6.36-rc4-git3/sound/soc/s3c24xx/neo1973_wm8753.c	2010-08-02 01:11:14.000000000 +0300
> +++ b/sound/soc/s3c24xx/neo1973_wm8753.c	2010-09-17 12:39:07.917253497 +0300
> @@ -698,6 +698,9 @@ static void __exit neo1973_exit(void)
>  	platform_device_unregister(neo1973_snd_device);
>  }
>  
> +
> +MODULE_DEVICE_TABLE(i2c, lm4857_i2c_id);
> +

No, this shouldn't be added - this driver should not be loaded based on
the presence of the LM4857 since it is specific to the OpenMoko Neo1973
system.  This is largely because the LM4857 support is a hideous bodge
which should get fixed at some point (it ought to be in a separate
driver in the CODECs directory rather than part of the OpenMoko machine
driver).

> --- linux-2.6.36-rc4-git3/sound/soc/codecs/tlv320dac33.c	2010-09-17 12:30:31.000000000 +0300
> +++ b/sound/soc/codecs/tlv320dac33.c	2010-09-17 12:39:07.801200070 +0300
> @@ -1712,6 +1712,9 @@ static int __init dac33_module_init(void
>  	}
>  	return 0;
>  }
> +
> +MODULE_DEVICE_TABLE(i2c, tlv320dac33_i2c_id);
> +

This change is OK but should be moved next to the actual table.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: i2c: Re: #2 (Re: More modaliases + patchtool))
  2010-09-17 14:06         ` Mark Brown
@ 2010-09-17 15:47           ` Dzianis Kahanovich
  2010-09-17 15:54             ` Mark Brown
  0 siblings, 1 reply; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 15:47 UTC (permalink / raw)
  To: Mark Brown; +Cc: Rusty Russell, linux-kernel

Mark Brown пишет:

>> + 1 attach for "next" branch.
> 
> Again, please try to follow the process in SubmittingPatches for sending
> patches.

One thing (patch) per message?

Yes, I just speculate in this point on fact there are same patch for "next"
branch and may be intrpreted as one ;). Sorry.

>> --- linux-2.6.36-rc4-git3/sound/soc/codecs/tlv320dac33.c	2010-09-17 12:30:31.000000000 +0300
>> +++ b/sound/soc/codecs/tlv320dac33.c	2010-09-17 12:39:07.801200070 +0300
>> @@ -1712,6 +1712,9 @@ static int __init dac33_module_init(void
>>  	}
>>  	return 0;
>>  }
>> +
>> +MODULE_DEVICE_TABLE(i2c, tlv320dac33_i2c_id);
>> +
> 
> This change is OK but should be moved next to the actual table.

This means - after:
static const struct i2c_device_id tlv320dac33_i2c_id[] = {
...
}

?

IMHO I just copyed style of some of (now not remember) module example in
script. OK.

Thanks, next time I will carry out your recomendations. But may be not in
script (2) - current way most simple and safe.

-- 
WBR, Dzianis Kahanovich AKA Denis Kaganovich, http://mahatma.bspu.unibel.by/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: i2c: Re: #2 (Re: More modaliases + patchtool))
  2010-09-17 15:47           ` Dzianis Kahanovich
@ 2010-09-17 15:54             ` Mark Brown
  0 siblings, 0 replies; 28+ messages in thread
From: Mark Brown @ 2010-09-17 15:54 UTC (permalink / raw)
  To: mahatma; +Cc: Rusty Russell, linux-kernel

On Fri, Sep 17, 2010 at 06:47:41PM +0300, Dzianis Kahanovich wrote:
> Mark Brown пишет:
> 
> >> + 1 attach for "next" branch.

> > Again, please try to follow the process in SubmittingPatches for sending
> > patches.

> One thing (patch) per message?

The bits about CCing the relevant maintainers and the actual format of
the e-mail (subject line, patch in the body of the message and adding
text not for the actual changelog after the ---).

> > This change is OK but should be moved next to the actual table.

> This means - after:
> static const struct i2c_device_id tlv320dac33_i2c_id[] = {

Yes.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* acpi (signed): Re: #2 (Re: More modaliases + patchtool))
  2010-09-11  2:14     ` #2 " Rusty Russell
                         ` (16 preceding siblings ...)
  2010-09-17 13:42       ` platform: " Dzianis Kahanovich
@ 2010-09-17 15:55       ` Dzianis Kahanovich
  17 siblings, 0 replies; 28+ messages in thread
From: Dzianis Kahanovich @ 2010-09-17 15:55 UTC (permalink / raw)
  To: Rusty Russell
  Cc: linux-kernel, Jeremy Fitzhardinge, Dmitry Torokhov, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 36 bytes --]

...
1 repeat - same, but signed.




[-- Attachment #2: mods-acpi.patch --]
[-- Type: text/plain, Size: 1236 bytes --]

Fix lost ACPI modaliases

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>

--- linux-2.6.36-rc4-git3/drivers/platform/x86/intel_menlow.c	2010-09-17 12:30:30.000000000 +0300
+++ b/drivers/platform/x86/intel_menlow.c	2010-09-17 12:38:56.376753809 +0300
@@ -536,5 +536,8 @@ static void __exit intel_menlow_module_e
 	intel_menlow_unregister_sensor();
 }
 
+
+MODULE_DEVICE_TABLE(acpi, intel_menlow_memory_ids);
+
 module_init(intel_menlow_module_init);
 module_exit(intel_menlow_module_exit);
--- linux-2.6.36-rc4-git3/drivers/staging/quickstart/quickstart.c	2010-09-17 12:30:31.000000000 +0300
+++ b/drivers/staging/quickstart/quickstart.c	2010-09-17 12:39:02.903030634 +0300
@@ -470,5 +470,8 @@ fail_pfdrv_reg:
 	return ret;
 }
 
+
+MODULE_DEVICE_TABLE(acpi, quickstart_device_ids);
+
 module_init(quickstart_init);
 module_exit(quickstart_exit);
--- linux-2.6.36-rc4-git3/drivers/char/sonypi.c	2010-08-02 01:11:14.000000000 +0300
+++ b/drivers/char/sonypi.c	2010-09-17 12:38:43.182861196 +0300
@@ -1565,5 +1565,10 @@ static void __exit sonypi_exit(void)
 	printk(KERN_INFO "sonypi: removed.\n");
 }
 
+
+#ifdef CONFIG_ACPI
+MODULE_DEVICE_TABLE(acpi, sonypi_device_ids);
+#endif
+
 module_init(sonypi_init);
 module_exit(sonypi_exit);

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: xenbus: Re: #2 (Re: More modaliases + patchtool))
  2010-09-17 13:26       ` xenbus: " Dzianis Kahanovich
@ 2010-09-17 18:09         ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 28+ messages in thread
From: Jeremy Fitzhardinge @ 2010-09-17 18:09 UTC (permalink / raw)
  To: mahatma
  Cc: Dzianis Kahanovich, Rusty Russell, linux-kernel, Dmitry Torokhov,
	Andrew Morton

 On 09/17/2010 06:26 AM, Dzianis Kahanovich wrote:
> ...
>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

    J

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2010-09-17 18:09 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4C6BE292.3060307@bspu.unibel.by>
2010-08-19  0:50 ` More modaliases + patchtool Rusty Russell
2010-08-19 14:58   ` #3 (Re: More modaliases + patchtool) Dzianis Kahanovich
     [not found]   ` <4C6D26BC.9040805@bspu.unibel.by>
2010-09-11  2:14     ` #2 " Rusty Russell
2010-09-11  3:36       ` Jeremy Fitzhardinge
2010-09-13  3:03         ` Rusty Russell
2010-09-11 17:51       ` Dmitry Torokhov
2010-09-13  3:24         ` Rusty Russell
2010-09-17 10:55       ` pci: Re: #2 (Re: More modaliases + patchtool)) Dzianis Kahanovich
2010-09-17 13:11       ` Dzianis Kahanovich
2010-09-17 13:26       ` xenbus: " Dzianis Kahanovich
2010-09-17 18:09         ` Jeremy Fitzhardinge
2010-09-17 13:27       ` usb: " Dzianis Kahanovich
2010-09-17 13:29       ` serio: " Dzianis Kahanovich
2010-09-17 13:29       ` pnp: " Dzianis Kahanovich
2010-09-17 13:32       ` of: " Dzianis Kahanovich
2010-09-17 13:35       ` i2c: " Dzianis Kahanovich
2010-09-17 14:06         ` Mark Brown
2010-09-17 15:47           ` Dzianis Kahanovich
2010-09-17 15:54             ` Mark Brown
2010-09-17 13:36       ` hid: " Dzianis Kahanovich
2010-09-17 13:36       ` dio: " Dzianis Kahanovich
2010-09-17 13:37       ` ccw: " Dzianis Kahanovich
2010-09-17 13:38       ` acpi: " Dzianis Kahanovich
2010-09-17 13:38       ` spi " Dzianis Kahanovich
2010-09-17 13:39       ` RapidIO: " Dzianis Kahanovich
2010-09-17 13:42       ` platform: " Dzianis Kahanovich
2010-09-17 13:54         ` Mark Brown
2010-09-17 15:55       ` acpi (signed): " Dzianis Kahanovich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.