linux-stable/drivers
Florian Faber 68a436aec3 drivers/w1/w1_int.c: multiple masters used same init_name
When using multiple masters, w1_int.c would use the .init_name from w1.c
for all entities, which will fail when creating a corresponding sysfs
entry.  This patch uses the unique name previously generated.

  WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x48/0x64()
  sysfs: cannot create duplicate filename '/devices/w1 bus master'
  Modules linked in:
  Call trace:
   [<9001a604>] warn_slowpath_common+0x34/0x44
   [<9001a64c>] warn_slowpath_fmt+0x14/0x18
   [<90078020>] sysfs_add_one+0x48/0x64
   [<900784ec>] create_dir+0x40/0x68
   [<9007857a>] sysfs_create_dir+0x66/0x78
   [<900c1a8a>] kobject_add_internal+0x6e/0x104
   [<900c1bc0>] kobject_add_varg+0x20/0x2c
   [<900c1c1c>] kobject_add+0x30/0x3c
   [<900dbd66>] device_add+0x6a/0x378
   [<900dbb4a>] device_initialize+0x12/0x48
   [<900dc080>] device_register+0xc/0x10
   [<900f99be>] w1_add_master_device+0x162/0x274
   [<90008e7a>] w1_gpio_probe+0x66/0xb4
   [<9000030c>] kernel_init+0x0/0xe8
   [<900dde54>] platform_drv_probe+0xc/0xe
   [<9000030c>] kernel_init+0x0/0xe8
   [<900dd4f8>] driver_probe_device+0x6c/0xdc
   [<900dd5fc>] __driver_attach+0x34/0x48
   [<900dcce8>] bus_for_each_dev+0x2c/0x48
   [<900dd5c8>] __driver_attach+0x0/0x48
   [<900dd38c>] driver_attach+0x10/0x14
   [<900dd16a>] bus_add_driver+0x6a/0x18c
   [<900dd768>] driver_register+0x60/0xb8
   [<90011594>] __initcall_w1_therm_init6+0x0/0x4
   [<90008e00>] w1_gpio_init+0x0/0x14
   [<9000030c>] kernel_init+0x0/0xe8
   [<900ddf48>] platform_driver_register+0x30/0x38
   [<90011594>] __initcall_w1_therm_init6+0x0/0x4
   [<90008e00>] w1_gpio_init+0x0/0x14
   [<9000030c>] kernel_init+0x0/0xe8
   [<900ddf5e>] platform_driver_probe+0xe/0x3c
   [<90008e0c>] w1_gpio_init+0xc/0x14
   [<90011594>] __initcall_w1_therm_init6+0x0/0x4
   [<90008e00>] w1_gpio_init+0x0/0x14
   [<900126d4>] do_one_initcall+0x34/0x130
   [<90000372>] kernel_init+0x66/0xe8
   [<90011594>] __initcall_w1_therm_init6+0x0/0x4
   [<9001ca3e>] do_exit+0x0/0x3a6
   [<9000030c>] kernel_init+0x0/0xe8
   [<9001ca3e>] do_exit+0x0/0x3a6

  ---[ end trace 5a9233884fead918 ]---
  kobject_add_internal failed for w1 bus master with -EEXIST, don't try to register things with the same name in the same directory.

Signed-off-by: Florian Faber <faber@faberman.de>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-02 16:07:03 -07:00
..
accessibility
acpi Merge branch 'pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux 2011-11-01 10:52:29 -07:00
amba
ata Merge branch 'depends/rmk/gpio' into next/devel 2011-10-31 23:46:42 +01:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2011-10-25 13:25:22 +02:00
auxdisplay
base Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2011-10-25 15:18:39 +02:00
bcma
block Merge branch 'for-linus' of git://ceph.newdream.net/git/ceph-client 2011-10-28 16:42:18 -07:00
bluetooth Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2011-10-25 15:18:39 +02:00
cdrom
char Merge branch 'next/driver' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:16:43 -07:00
clk
clocksource Merge branch 'next/timer' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:18:05 -07:00
connector
cpufreq Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-26 17:15:03 +02:00
cpuidle
crypto
dca
devfreq
dio
dma
edac
eisa
firewire
firmware Merge branch 'pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux 2011-11-01 10:52:29 -07:00
gpio Merge branch 'next/devel' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:31:25 -07:00
gpu Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2011-10-28 05:54:23 -07:00
hid Merge branch 'next' into for-linus 2011-10-26 21:46:20 -07:00
hv
hwmon drivers/hwmon/hwmon.c: convert idr to ida and use ida_simple_get() 2011-10-31 17:30:51 -07:00
hwspinlock
i2c Merge branch 'for-linus/i2c-3.2' of git://git.fluff.org/bjdooks/linux 2011-11-01 15:07:19 -07:00
ide Merge branch 'depends/rmk/gpio' into next/devel 2011-10-31 23:46:42 +01:00
idle
ieee802154
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2011-11-01 10:51:38 -07:00
input Merge branch 'depends/rmk/gpio' into next/devel 2011-10-31 23:46:42 +01:00
iommu Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu 2011-10-30 15:46:19 -07:00
isdn treewide: use __printf not __attribute__((format(printf,...))) 2011-10-31 17:30:54 -07:00
leds drivers/leds/leds-lp5521.c: check if reset is successful 2011-10-31 17:30:55 -07:00
lguest lguest: move process freezing before pending signals check 2011-10-27 10:56:18 +10:30
macintosh
mca
md Merge branch 'for-linus' of git://neil.brown.name/md 2011-10-31 15:21:29 -07:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2011-10-31 15:42:54 -07:00
memstick
message
mfd Merge branch 'depends/rmk/gpio' into next/devel 2011-10-31 23:46:42 +01:00
misc Merge branch 'next/fixes' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 19:55:06 -07:00
mmc Merge branch 'next/devel' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:31:25 -07:00
mtd Merge branch 'depends/rmk/gpio' into next/devel 2011-10-31 23:46:42 +01:00
net drivers/net/rionet.c: fix ethernet address macros for LE platforms 2011-11-02 16:07:01 -07:00
nfc
nubus
of Merge branch 'next/dt' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 21:02:35 -07:00
oprofile
parisc
parport
pci Merge branch 'next-rebase' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2011-10-28 14:20:44 -07:00
pcmcia Merge branch 'next/fixes' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 19:55:06 -07:00
pinctrl pinctrl/sirf: fix sirfsoc_get_group_pins prototype 2011-10-25 10:43:57 +02:00
platform Merge branch 'akpm' (Andrew's incoming) 2011-10-31 17:46:07 -07:00
pnp
power drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal 2011-11-02 16:07:03 -07:00
pps pps gpio client: add missing dependency 2011-11-02 16:07:02 -07:00
ps3
ptp
rapidio RapidIO: fix potential null deref in rio_setup_device() 2011-11-02 16:07:01 -07:00
regulator Merge branch 'for-linus' of git://opensource.wolfsonmicro.com/regulator 2011-11-01 15:06:20 -07:00
rtc drivers/rtc/rtc-mc13xxx.c: move probe and remove callbacks to .init.text and .exit.text 2011-11-02 16:06:58 -07:00
s390 [S390] qdio: prevent dsci access without adapter interrupts 2011-10-30 15:16:47 +01:00
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2011-10-28 16:44:18 -07:00
sfi
sh
sn
spi Merge branch 'depends/rmk/gpio' into next/devel 2011-10-31 23:46:42 +01:00
ssb
staging Merge branch 'akpm' (Andrew's incoming) 2011-10-31 17:46:07 -07:00
target Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-10-25 12:11:02 +02:00
tc
telephony
thermal
tty Merge branch 'next/dt' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 21:02:35 -07:00
uio
usb Merge branch 'next/devel' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:31:25 -07:00
uwb
vhost
video Merge branch 'next/fixes' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 19:55:06 -07:00
virt
virtio Add ethtool -g support to virtio_net 2011-10-24 02:07:21 -04:00
vlynq
w1 drivers/w1/w1_int.c: multiple masters used same init_name 2011-11-02 16:07:03 -07:00
watchdog Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-26 17:03:38 +02:00
xen Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-26 16:44:09 +02:00
zorro zorro: Fix four checkpatch warnings 2011-10-24 21:00:34 +02:00
Kconfig Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging 2011-10-26 15:39:02 +02:00
Makefile Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging 2011-10-26 15:39:02 +02:00