[root@MrMakearm=W]#insmod ledc.ko
Led Major = 251
Led Minor = 00
MakeLed create ok led init ok
[root@MrMakearm=W]#rmmod ledc
[root@MrMakearm=W]#insmod ledc.ko
Led Major = 251
Led Minor = 00
------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x64/0x8c()
sysfs: cannot create duplicate filename '/devices/virtual/MakeLed'
Modules linked in: ledc(+) [last unloaded: ledc]
[<c0035628>] (unwind_backtrace+0x0/0xec) from [<c0042ccc>] (warn_slowpath_common+0x44/0x5c)
[<c0042ccc>] (warn_slowpath_common+0x44/0x5c) from [<c0042d1c>] (warn_slowpath_fmt+0x24/0x30)
[<c0042d1c>] (warn_slowpath_fmt+0x24/0x30) from [<c00dcb48>] (sysfs_add_one+0x64/0x8c)
[<c00dcb48>] (sysfs_add_one+0x64/0x8c) from [<c00dd41c>] (create_dir+0x48/0x98)
[<c00dd41c>] (create_dir+0x48/0x98) from [<c00dd4a0>] (sysfs_create_dir+0x34/0x4c)
[<c00dd4a0>] (sysfs_create_dir+0x34/0x4c) from [<c018ba38>] (kobject_add_internal+0xb8/0x18c)
[<c018ba38>] (kobject_add_internal+0xb8/0x18c) from [<c018bc80>] (kobject_add+0x4c/0x5c)
[<c018bc80>] (kobject_add+0x4c/0x5c) from [<c01cc2ac>] (get_device_parent+0xe0/0x134)
[<c01cc2ac>] (get_device_parent+0xe0/0x134) from [<c01cd038>] (device_add+0x78/0x450)
[<c01cd038>] (device_add+0x78/0x450) from [<c01cd49c>] (device_create_vargs+0x74/0xa8)
[<c01cd49c>] (device_create_vargs+0x74/0xa8) from [<c01cd4e8>] (device_create+0x18/0x20)
[<c01cd4e8>] (device_create+0x18/0x20) from [<bf009134>] (led_init+0x134/0x18c [ledc])
[<bf009134>] (led_init+0x134/0x18c [ledc]) from [<c0030384>] (do_one_initcall+0x5c/0x1b4)
[<c0030384>] (do_one_initcall+0x5c/0x1b4) from [<c0066120>] (sys_init_module+0xbc/0x1e8)
[<c0066120>] (sys_init_module+0xbc/0x1e8) from [<c0030e60>] (ret_fast_syscall+0x0/0x2c)
---[ end trace a512b0c9e9a0d7a9 ]---
kobject_add_internal failed for MakeLed with -EEXIST, don't try to register things with the same name in the same directory.
[<c0035628>] (unwind_backtrace+0x0/0xec) from [<c018bac4>] (kobject_add_internal+0x144/0x18c)
[<c018bac4>] (kobject_add_internal+0x144/0x18c) from [<c018bc80>] (kobject_add+0x4c/0x5c)
[<c018bc80>] (kobject_add+0x4c/0x5c) from [<c01cc2ac>] (get_device_parent+0xe0/0x134)
[<c01cc2ac>] (get_device_parent+0xe0/0x134) from [<c01cd038>] (device_add+0x78/0x450)
[<c01cd038>] (device_add+0x78/0x450) from [<c01cd49c>] (device_create_vargs+0x74/0xa8)
[<c01cd49c>] (device_create_vargs+0x74/0xa8) from [<c01cd4e8>] (device_create+0x18/0x20)
[<c01cd4e8>] (device_create+0x18/0x20) from [<bf009134>] (led_init+0x134/0x18c [ledc])
[<bf009134>] (led_init+0x134/0x18c [ledc]) from [<c0030384>] (do_one_initcall+0x5c/0x1b4)
[<c0030384>] (do_one_initcall+0x5c/0x1b4) from [<c0066120>] (sys_init_module+0xbc/0x1e8)
[<c0066120>] (sys_init_module+0xbc/0x1e8) from [<c0030e60>] (ret_fast_syscall+0x0/0x2c)
MakeLed create ok led init ok
[root@MrMakearm=W]# |