NoSpamDan/android_kernel_samsung_msm8660-common — pull request #1 by NoSpamDan (2014-05-13 05:05:55+00:00)
Title: Avoid to create duplicate filename for misc devices.

There has two bugs.
1. For example, the 'psaux' device will use '1' as minor number to
register misc device, but misc deriver doesn't set the '1' as used.
It's the root casue for duplicate filename.
2. From warning message, minor number '1' is the one of duplicate
fileanme, it meanes the number of dynamic minor is not enough.

The symptom of creating duplicate filename:
------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:508 sysfs_add_one+0x7c/0x9c()
sysfs: cannot create duplicate filename '/dev/char/10:1'
[] (unwind_backtrace+0x0/0x11c) from
[] (warn_slowpath_common+0x48/0x60)
[] (warn_slowpath_fmt+0x2c/0x3c)
[] (sysfs_add_one+0x7c/0x9c)
[] (sysfs_do_create_link+0x10c/0x1f8)
[] (device_add+0x1ac/0x5e4)
[] (device_create_vargs+0x8c/0xd0)
[] (device_create+0x1c/0x24)
[] (misc_register+0xb4/0x118)
[] (init_log+0x10/0x4c)
[] (do_one_initcall+0x90/0x160)
[] (kernel_init+0xec/0x1a8)
[] (kernel_thread_exit+0x0/0x8)
---[ end trace da227214a82491b9 ]---

BUG 8889112

Change-Id: I186a945a56fc831f59e19509365a0ae8a481bb2d
Signed-off-by: singhome_lee