remarkable-linux/scripts
Jean Delvare ac55182899 modpost: i2c aliases need no trailing wildcard
Not all device types need a wildcard at the end of their module
aliases. In particular, for i2c module aliases, the trailing wildcard
is not only unneeded, it could also cause the wrong driver to be
loaded.

As I2C devices have no IDs, i2c module aliases are simple, arbitrary
device names. For example:

$ /sbin/modinfo lm90
filename:       /lib/modules/2.6.25-git18/kernel/drivers/hwmon/lm90.ko
author:         Jean Delvare <khali@linux-fr.org>
description:    LM90/ADM1032 driver
license:        GPL
vermagic:       2.6.25-git18 mod_unload
depends:        hwmon
alias:          i2c:lm90*
alias:          i2c:adm1032*
alias:          i2c:lm99*
alias:          i2c:lm86*
alias:          i2c:max6657*
alias:          i2c:adt7461*
alias:          i2c:max6680*
$

This would cause trouble if one I2C chip name matches the beginning of
another I2C chip name and both chips are supported by different
drivers. For example, an i2c device named lm9042 would cause the lm90
driver to be loaded, while it doesn't support that device. This case
has yet to be seen in practice, but still, I'd like to fix it now. The
cleanest fix is to remove the trailing wildcard from i2c module aliases.

Here's a patch doing this.

Not all device type aliases need a trailing wildcard, in particular
the i2c aliases don't. Don't add a wildcard by default in do_table(),
instead let each device type handler add it if needed.

I have tested types acpi, dmi, eisa, i2c, ide, ieee1394, input, pci,
pcmcia, platform, pnp, scsi, serio, ssb and usb. Other types (ccw, of,
vio, parisc, sdio and virtio) are untested.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-04 09:24:47 +02:00
..
basic kernel-doc: new P directive for DOC: sections 2008-01-28 23:14:35 +01:00
genksyms kbuild: fixup genksyms usage/getopt 2008-01-28 23:14:36 +01:00
kconfig kconfig: made check-lxdialog more portable 2008-05-01 19:29:47 +02:00
ksymoops Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mod modpost: i2c aliases need no trailing wildcard 2008-05-04 09:24:47 +02:00
package Kbuild: Fix deb-pkg target to work with kernel versions ending with -<text-without-digit> 2008-02-09 10:51:47 +01:00
rt-tester [PATCH] rtmutex: Modify rtmutex-tester to test the setscheduler propagation 2006-06-27 17:32:47 -07:00
.gitignore Add binoffset to gitignore 2008-02-09 10:43:58 +01:00
bin2c.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
binoffset.c update the email address of Randy Dunlap 2006-01-03 13:37:51 +01:00
bloat-o-meter fix bloat-o-meter for ppc64 2007-12-17 19:28:17 -08:00
checkincludes.pl Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
checkkconfigsymbols.sh kbuild: script to check for undefined Kconfig symbols 2007-10-12 21:13:50 +02:00
checkpatch.pl update checkpatch.pl to version 0.18 2008-04-29 08:06:05 -07:00
checkstack.pl Claim maintainership for block2mtd and update email addresses 2008-02-06 10:41:09 -08:00
checksyscalls.sh i386/x86_64: move headers to include/asm-x86 2007-10-11 11:20:03 +02:00
checkversion.pl kbuild: introduce utsrelease.h 2006-07-03 23:30:54 +02:00
cleanfile scripts: Make cleanfile/cleanpatch warn about long lines 2007-07-16 21:15:50 +02:00
cleanpatch scripts: Make cleanfile/cleanpatch warn about long lines 2007-07-16 21:15:50 +02:00
conmakehash.c [PATCH] kbuild: signed char fixes for scripts 2005-07-27 22:27:08 +02:00
decodecode kbuild: minor scripts/decodecode update 2008-01-28 23:14:40 +01:00
export_report.pl kbuild: fix perl usage in export_report.pl 2007-10-12 21:13:50 +02:00
extract-ikconfig [PATCH] extract-ikconfig: don't use --long-options 2006-03-24 07:33:21 -08:00
gcc-version.sh kbuild: fix buglet in gcc-version.sh 2008-01-28 23:14:36 +01:00
gcc-x86_64-has-stack-protector.sh [PATCH] Add the -fstack-protector option to the CFLAGS 2006-09-26 10:52:39 +02:00
gen_initramfs_list.sh kbuild: fix unportability in gen_initramfs_list.sh 2008-04-28 22:50:51 +02:00
hdrcheck.sh Use dependencies for 'make headers_install'. 2006-09-24 22:15:14 +01:00
kallsyms.c kallsyms: nuke all ChangeLog, this should be logged by git 2008-04-30 08:29:31 -07:00
Kbuild.include kbuild: fix make V=1 2008-02-11 17:43:54 +01:00
kernel-doc kernel-doc: detect trailing kernel-doc line trash 2008-04-28 08:58:48 -07:00
Lindent scripts/Lindent: support gnu indent v2.2.10 2008-04-29 08:06:04 -07:00
Makefile [PATCH] allow /proc/config.gz to be built as a module 2006-10-01 00:39:20 -07:00
Makefile.build kbuild: fix some minor typoes 2008-04-25 20:18:48 +02:00
Makefile.clean kbuild: fix some minor typoes 2008-04-25 20:18:48 +02:00
Makefile.headersinst kbuild: use POSIX BRE in headers install target 2007-07-17 14:24:55 +02:00
Makefile.host kbuild: fix some minor typoes 2008-04-25 20:18:48 +02:00
Makefile.lib kbuild: implement modules.order 2008-01-28 23:14:35 +01:00
Makefile.modinst kbuild: fix installing external modules 2008-01-28 23:14:36 +01:00
Makefile.modpost kbuild: scripts/Makefile.modpost typo fix 2008-04-26 21:08:25 +02:00
makelst kbuild: introduce ccflags-y, asflags-y and ldflags-y 2007-10-15 22:25:06 +02:00
mkcompile_h kbuild: override build timestamp & version 2007-05-02 20:58:09 +02:00
mkmakefile kbuild: scripts/mkmakefile: dynamic determination of output directory 2008-01-28 23:14:38 +01:00
mksysmap spelling: s/retreive/retrieve/ 2006-01-10 00:10:13 +01:00
mkuboot.sh kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE 2007-05-02 20:58:10 +02:00
mkversion Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
namespace.pl x86: fixup the x86 namespace change in scripts/namespace.pl 2007-10-11 17:56:02 +02:00
patch-kernel kbuild: eradicate bashisms in scripts/patch-kernel 2008-01-28 23:14:37 +01:00
pnmtologo.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
profile2linkerlist.pl [PATCH] x86_64: Basic reorder infrastructure 2006-03-25 09:10:56 -08:00
setlocalversion kbuild: add svn revision information to setlocalversion 2008-02-03 08:59:50 +01:00
show_delta kbuild: fix mode of checkstack.pl and other files. 2006-04-11 13:37:07 +02:00
unifdef.c kbuild: replace use of strlcpy with a dedicated implmentation in unifdef 2006-09-25 09:00:00 +02:00
ver_linux kbuild: scripts/ver_linux : correct printing of binutils version 2007-10-12 21:15:31 +02:00