]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: opti9xx: Fix conflicting driver object name
authorTakashi Iwai <tiwai@suse.de>
Tue, 27 Aug 2013 10:03:01 +0000 (12:03 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Aug 2013 06:22:16 +0000 (08:22 +0200)
commit75b177b6d9bef96458c941b98dda18940c5b5e77
tree496be913d039044c15d683ab28408bb7e1e6ec94
parentf00f74050d2c585d6b3e4a0178c82b869c5f30fc
ALSA: opti9xx: Fix conflicting driver object name

The recent commit to delay the release of kobject triggered NULL
dereferences of opti9xx drivers.  The cause is that all
snd-opti92x-ad1848, snd-opti92x-cs4231 and snd-opti93x drivers
register the PnP card driver with the very same name, and also
snd-opti92x-ad1848 and -cs4231 drivers register the ISA driver with
the same name, too.  When these drivers are built in, quick
"register-release-and-re-register" actions occur, and this results in
Oops because of the same name is assigned to the kobject.

The fix is simply to assign individual names.  As a bonus, by using
KBUILD_MODNAME, the patch reduces more lines than it adds.

The fix is based on the suggestion by Russell King.

Reported-and-tested-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/isa/opti9xx/opti92x-ad1848.c