modpost: don't add a trailing wildcard for OF module aliases
authorJavier Martinez Canillas <javier@osg.samsung.com>
Thu, 14 Jan 2016 23:17:02 +0000 (15:17 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Jan 2016 00:00:49 +0000 (16:00 -0800)
commit2f632369ab795ebadc1a12a609e5bd4f80f31924
tree67f376dae30f9c51f4bbd4520d9200734d433eba
parentc510eff6bebaa244e577b8f499e86606b5e5d4c7
modpost: don't add a trailing wildcard for OF module aliases

Commit ac551828993e ("modpost: i2c aliases need no trailing wildcard")
removed the wildcard at the end of the I2C module aliases because I2C
devices have no IDs so the aliases are just arbitrary device names.

This is also true for OF modaliases since a compatible string is used to
define a specific IP hardware block.  So the modalias should match a
specific compatible string and not attempt to match a compatible string
whose name matches the beginning of another one.

For example, the following driver module:

  $ modinfo cros_ec_keyb | grep alias
  alias:          platform:cros-ec-keyb
  alias:          of:N*T*Cgoogle,cros-ec-keyb*

will be tried to be loaded for an alias of:N*T*Cgoogle,cros-ec-keyb-v2
but there could be a different driver that supports the device for that
compatible string so it's better to remove the trailing wildcard for OF.

Also, remove the word "always" from the add_wildcard() function comment
since that was carried from the time where a wildcard was always added
at the end of the module alias for all the devices.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Suggested-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/mod/file2alias.c
This page took 0.025495 seconds and 5 git commands to generate.