From: Gordon Farquharson Date: Wed, 26 Mar 2008 03:57:49 +0000 (+0100) Subject: [ARM] 4875/1: Add MODULE_ALIAS to ixp4xx-beeper module X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1035d60d92325bddcc4248df5a27dcd5698f5931;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [ARM] 4875/1: Add MODULE_ALIAS to ixp4xx-beeper module The following patch allows ixp4xx-beeper to be loaded by udev automatically when compiled as a module with kernel versions 2.4.24 and greater. This patch is required because commit 43cc71eed1250755986da4c0f9898f9a635cb3bf adds "platform:" to the modalias string. LKG7102D7:~# udevinfo -a -p /sys/devices/platform/ixp4xx-beeper.4 looking at device '/devices/platform/ixp4xx-beeper.4': KERNEL=="ixp4xx-beeper.4" SUBSYSTEM=="platform" DRIVER=="" ATTR{modalias}=="platform:ixp4xx-beeper" udev therefore tries to modprobe platform:ixp4xx-beeper instead of ixp4xx-beeper. LKG7102D7:~# udevtest /sys/devices/platform/ixp4xx-beeper.4 ... import_uevent_var: import into environment: 'PHYSDEVBUS=platform' import_uevent_var: import into environment: 'MODALIAS=platform:ixp4xx-beeper' main: looking at device '/devices/platform/ixp4xx-beeper.4' from subsystem 'platform' wait_for_sysfs: file '/sys/devices/platform/ixp4xx-beeper.4/bus' appeared after 0 loops main: run: 'socket:/org/kernel/udev/monitor' main: run: '/sbin/modprobe --use-blacklist platform:ixp4xx-beeper' With this patch, depmod adds an alias line (see below) to modules.alias which allows modprobe to load the right module. modules.alias: alias platform:ixp4xx-beeper ixp4xx-beeper Signed-off-by: Gordon Farquharson Signed-off-by: Alessandro Zummo Signed-off-by: Russell King --- diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c index d2ade7443b7d..798d84c44d03 100644 --- a/drivers/input/misc/ixp4xx-beeper.c +++ b/drivers/input/misc/ixp4xx-beeper.c @@ -25,6 +25,7 @@ MODULE_AUTHOR("Alessandro Zummo "); MODULE_DESCRIPTION("ixp4xx beeper driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:ixp4xx-beeper"); static DEFINE_SPINLOCK(beep_lock);