From: Ben Dooks Date: Tue, 4 Mar 2008 23:09:06 +0000 (-0800) Subject: sysdev: detect multiple driver registrations X-Git-Tag: v2.6.26-rc1~1126^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da009f39f85a3ee9deeb10f0f05ddd4efdd67020;p=pandora-kernel.git sysdev: detect multiple driver registrations I've just found how easy it is to accidentally register a sysdev_driver for two different classes. When this happens, bad things happen as the sysdev_driver structure keeps has the list entry for the driver registration. The following patch makes a WARN_ON() if this happens, although I think BUG_ON or returning -EAGAIN could also be valid responses to this. Signed-off-by: Ben Dooks Cc: Kay Sievers Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed