Fix loading of compat_firmware_class due to class name conflict
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Fri, 15 Jan 2010 00:09:27 +0000 (16:09 -0800)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Fri, 15 Jan 2010 00:09:36 +0000 (16:09 -0800)
commit8619c684837478a6e3abb987b0cc0b06bbd7bba4
tree3ed7fc88fbc5ef7f4e1f570d1c64e24a21205f66
parent837e69ccc9736b2964decf1d2452fdcf9c226400
Fix loading of compat_firmware_class due to class name conflict

This fixes this warning:

[  869.248771] ------------[ cut here ]------------
[  869.248779] WARNING: at fs/sysfs/dir.c:463 sysfs_add_one+0x51/0x60()
[  869.248784] sysfs: duplicate filename 'firmware' can not be created
[  869.248788] Modules linked in: compat_firmware_class(+) aes_generic binfmt_misc ppdev i915 drm snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_hwdep snd_seq_dummy snd_seq_oss snd_seq_midi rfcomm snd_rawmidi sco arc4 snd_seq_midi_event bridge stp snd_seq bnep mac80211 snd_timer pcmcia l2cap ath snd_seq_device btusb iptable_filter yenta_socket bluetooth cfg80211 psmouse snd thinkpad_acpi rfkill_backport ip_tables rsrc_nonstatic video serio_raw compat soundcore output x_tables nvram pcmcia_core led_class joydev lp parport usbhid ohci1394 ieee1394 e1000e intel_agp [last unloaded: ath5k]
[  869.248885] Pid: 6096, comm: modprobe Not tainted 2.6.27.41 #1
[  869.248890]
[  869.248892] Call Trace:
[  869.248902]  [<ffffffff8024cf18>] warn_slowpath+0x98/0xd0
[  869.248912]  [<ffffffff803cf518>] ? idr_get_empty_slot+0x108/0x2c0
[  869.248920]  [<ffffffff803cf780>] ? ida_get_new_above+0xb0/0x220
[  869.248927]  [<ffffffff80340559>] ? sysfs_ilookup_test+0x9/0x20
[  869.248934]  [<ffffffff802f8df4>] ? find_inode+0x54/0xa0
[  869.248940]  [<ffffffff80340550>] ? sysfs_ilookup_test+0x0/0x20
[  869.248948]  [<ffffffff802f8479>] ? __iget+0x9/0x70
[  869.248954]  [<ffffffff80340865>] ? sysfs_find_dirent+0x35/0x50
[  869.248961]  [<ffffffff80341811>] sysfs_add_one+0x51/0x60
[  869.248967]  [<ffffffff80341888>] create_dir+0x68/0xb0
[  869.248975]  [<ffffffff80341909>] sysfs_create_dir+0x39/0x50
[  869.248982]  [<ffffffff803d05ba>] ? kobject_get+0x1a/0x30
[  869.248989]  [<ffffffff803d0716>] kobject_add_internal+0xb6/0x200
[  869.248998]  [<ffffffff803d088f>] kset_register+0x2f/0x60
[  869.249009]  [<ffffffff8046869f>] __class_register+0xcf/0x1b0
[  869.249020]  [<ffffffffa000b000>] ? firmware_class_init+0x0/0x7e [compat_firmware_class]
[  869.249029]  [<ffffffffa000b021>] firmware_class_init+0x21/0x7e [compat_firmware_class]
[  869.249038]  [<ffffffff8020a041>] do_one_initcall+0x41/0x170
[  869.249047]  [<ffffffff80269411>] ? __blocking_notifier_call_chain+0x21/0x80
[  869.249059]  [<ffffffff8027974f>] sys_init_module+0xaf/0x1e0
[  869.249068]  [<ffffffff802116fa>] system_call_fastpath+0x16/0x1b
[  869.249072]
[  869.249075] ---[ end trace c1a363c5ede5a470 ]---
[  869.249082] kobject_add_internal failed for firmware with -EEXIST, don't try to register things with the same name in the same directory.
[  869.249092] Pid: 6096, comm: modprobe Tainted: G        W 2.6.27.41 #1
[  869.249096]
[  869.249097] Call Trace:
[  869.249104]  [<ffffffff803d07bd>] kobject_add_internal+0x15d/0x200
[  869.249112]  [<ffffffff803d088f>] kset_register+0x2f/0x60
[  869.249120]  [<ffffffff8046869f>] __class_register+0xcf/0x1b0
[  869.249130]  [<ffffffffa000b000>] ? firmware_class_init+0x0/0x7e [compat_firmware_class]
[  869.249139]  [<ffffffffa000b021>] firmware_class_init+0x21/0x7e [compat_firmware_class]
[  869.249146]  [<ffffffff8020a041>] do_one_initcall+0x41/0x170
[  869.249153]  [<ffffffff80269411>] ? __blocking_notifier_call_chain+0x21/0x80
[  869.249163]  [<ffffffff8027974f>] sys_init_module+0xaf/0x1e0
[  869.249170]  [<ffffffff802116fa>] system_call_fastpath+0x16/0x1b
[  869.249174]
[  869.249178] firmware_class_init: class_register failed

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
compat/compat_firmware_class.c