linux/drivers
Johan Hovold b668422872 mfd: viperboard: Fix platform-device id collision
Allow more than one viperboard to be connected by registering with
PLATFORM_DEVID_AUTO instead of PLATFORM_DEVID_NONE.

The subdevices are currently registered with PLATFORM_DEVID_NONE, which
will cause a name collision on the platform bus when a second viperboard
is plugged in:

viperboard 1-2.4:1.0: version 0.00 found at bus 001 address 004
------------[ cut here ]------------
WARNING: CPU: 0 PID: 181 at /home/johan/work/omicron/src/linux/fs/sysfs/dir.c:31 sysfs_warn_dup+0x74/0x84()
sysfs: cannot create duplicate filename '/bus/platform/devices/viperboard-gpio'
Modules linked in: i2c_viperboard viperboard netconsole [last unloaded: viperboard]
CPU: 0 PID: 181 Comm: bash Tainted: G        W      3.17.0-rc6 #1
[<c0016bf4>] (unwind_backtrace) from [<c0013860>] (show_stack+0x20/0x24)
[<c0013860>] (show_stack) from [<c04305f8>] (dump_stack+0x24/0x28)
[<c04305f8>] (dump_stack) from [<c0040fb4>] (warn_slowpath_common+0x80/0x98)
[<c0040fb4>] (warn_slowpath_common) from [<c004100c>] (warn_slowpath_fmt+0x40/0x48)
[<c004100c>] (warn_slowpath_fmt) from [<c016f1bc>] (sysfs_warn_dup+0x74/0x84)
[<c016f1bc>] (sysfs_warn_dup) from [<c016f548>] (sysfs_do_create_link_sd.isra.2+0xcc/0xd0)
[<c016f548>] (sysfs_do_create_link_sd.isra.2) from [<c016f588>] (sysfs_create_link+0x3c/0x48)
[<c016f588>] (sysfs_create_link) from [<c02867ec>] (bus_add_device+0x12c/0x1e0)
[<c02867ec>] (bus_add_device) from [<c0284820>] (device_add+0x410/0x584)
[<c0284820>] (device_add) from [<c0289440>] (platform_device_add+0xd8/0x26c)
[<c0289440>] (platform_device_add) from [<c02a5ae4>] (mfd_add_device+0x240/0x344)
[<c02a5ae4>] (mfd_add_device) from [<c02a5ce0>] (mfd_add_devices+0xb8/0x110)
[<c02a5ce0>] (mfd_add_devices) from [<bf00d1c8>] (vprbrd_probe+0x160/0x1b0 [viperboard])
[<bf00d1c8>] (vprbrd_probe [viperboard]) from [<c030c000>] (usb_probe_interface+0x1bc/0x2a8)
[<c030c000>] (usb_probe_interface) from [<c028768c>] (driver_probe_device+0x14c/0x3ac)
[<c028768c>] (driver_probe_device) from [<c02879e4>] (__driver_attach+0xa4/0xa8)
[<c02879e4>] (__driver_attach) from [<c0285698>] (bus_for_each_dev+0x70/0xa4)
[<c0285698>] (bus_for_each_dev) from [<c0287030>] (driver_attach+0x2c/0x30)
[<c0287030>] (driver_attach) from [<c030a288>] (usb_store_new_id+0x170/0x1ac)
[<c030a288>] (usb_store_new_id) from [<c030a2f8>] (new_id_store+0x34/0x3c)
[<c030a2f8>] (new_id_store) from [<c02853ec>] (drv_attr_store+0x30/0x3c)
[<c02853ec>] (drv_attr_store) from [<c016eaa8>] (sysfs_kf_write+0x5c/0x60)
[<c016eaa8>] (sysfs_kf_write) from [<c016dc68>] (kernfs_fop_write+0xd4/0x194)
[<c016dc68>] (kernfs_fop_write) from [<c010fe40>] (vfs_write+0xb4/0x1c0)
[<c010fe40>] (vfs_write) from [<c01104a8>] (SyS_write+0x4c/0xa0)
[<c01104a8>] (SyS_write) from [<c000f900>] (ret_fast_syscall+0x0/0x48)
---[ end trace 98e8603c22d65817 ]---
viperboard 1-2.4:1.0: Failed to add mfd devices to core.
viperboard: probe of 1-2.4:1.0 failed with error -17

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-10 15:22:00 +00:00
..
accessibility
acpi Linux 3.17 2014-10-11 11:34:07 -07:00
amba PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h 2014-09-30 01:16:44 +02:00
ata Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
atm atm: simplify lanai.c by using module_pci_driver 2014-10-17 11:55:32 -04:00
auxdisplay
base IOMMU Updates for Linux v3.18 2014-10-15 07:23:49 +02:00
bcma This is the bulk of GPIO changes for the v3.18 development 2014-10-09 14:58:15 -04:00
block Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
bluetooth Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-10-13 11:28:42 +02:00
bus ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
cdrom
char One cc: stable commit, the rest are a series of minor cleanups which have 2014-10-18 10:25:09 -07:00
clk The clk tree changes for 3.18 are dominated by clock drivers. Mostly 2014-10-15 07:05:03 +02:00
clocksource Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
connector
cpufreq The clk tree changes for 3.18 are dominated by clock drivers. Mostly 2014-10-15 07:05:03 +02:00
cpuidle Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
crypto crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c 2014-10-14 10:51:23 +02:00
dca
devfreq
dio
dma Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
dma-buf dma-buf: don't open-code atomic_long_read() 2014-10-09 02:39:07 -04:00
edac edac updates for v3.18-rc1 2014-10-10 22:07:55 -04:00
eisa
extcon
firewire
firmware drivers/firmware/memmap.c: don't create memmap sysfs of same firmware_map_entry 2014-10-09 22:26:00 -04:00
fmc
gpio This is the bulk of GPIO changes for the v3.18 development 2014-10-09 14:58:15 -04:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-10-14 09:39:08 +02:00
hid This is the bulk of GPIO changes for the v3.18 development 2014-10-09 14:58:15 -04:00
hsi
hv
hwmon hwmon: (ab8500) Call kernel_power_off instead of pm_power_off 2014-10-03 08:19:02 -07:00
hwspinlock
i2c Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2014-10-19 12:50:44 -07:00
ide Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
idle
iio
infiniband Main set of InfiniBand/RDMA updates for 3.18 merge window: 2014-10-19 12:29:23 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-10-19 12:40:24 -07:00
iommu IOMMU Updates for Linux v3.18 2014-10-15 07:23:49 +02:00
ipack
irqchip Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
isdn isdn/gigaset: fix usb_gigaset write_cmd result race 2014-10-14 15:05:35 -04:00
leds New driver for menf21bmc. 2014-10-10 16:40:14 -04:00
lguest
macintosh
mailbox
mcb
md . fix DM's long-standing excessive use of memory by leveraging the new 2014-10-18 12:25:30 -07:00
media Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
memory
memstick memstick: r592: fix build warnings for !PM_SLEEP 2014-10-14 02:18:22 +02:00
message SCSI for-linus on 20141007 2014-10-07 21:29:18 -04:00
mfd mfd: viperboard: Fix platform-device id collision 2014-11-10 15:22:00 +00:00
misc Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
mmc Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
mtd Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
net Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
nfc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2014-10-07 14:48:29 -04:00
ntb ntb: Adding split BAR support for Haswell platforms 2014-10-17 07:08:51 -04:00
nubus
of Devicetree changes for v3.18 2014-10-11 06:47:50 -04:00
oprofile
parisc Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-13 16:23:15 +02:00
parport
pci xen: features and fixes for 3.18-rc0 2014-10-11 20:29:01 -04:00
pcmcia
phy
pinctrl This is the bulk of GPIO changes for the v3.18 development 2014-10-09 14:58:15 -04:00
platform thinkpad_acpi: replace strnicmp with strncasecmp 2014-10-14 02:18:25 +02:00
pnp PNP: replace strnicmp with strncasecmp 2014-10-14 02:18:25 +02:00
power power supply and reset changes for the v3.18 series 2014-10-15 06:56:23 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator power supply and reset changes for the v3.18 series 2014-10-15 06:56:23 +02:00
remoteproc
reset
rpmsg
rtc rtc-cmos: fix wakeup from S5 without CONFIG_PM_SLEEP 2014-10-14 02:18:19 +02:00
s390 Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
sbus
scsi Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
sfi
sh
sn
soc ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
spi Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
spmi
ssb This is the bulk of GPIO changes for the v3.18 development 2014-10-09 14:58:15 -04:00
staging Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-10-14 09:39:08 +02:00
target Merge branch 'for-3.18/core' of git://git.kernel.dk/linux-block 2014-10-18 11:53:51 -07:00
tc
thermal thermal: replace strnicmp with strncasecmp 2014-10-14 02:18:25 +02:00
thunderbolt
tty Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
uio
usb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-10-13 11:28:42 +02:00
uwb
vfio IOMMU Updates for Linux v3.18 2014-10-15 07:23:49 +02:00
vhost
video Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
virt
virtio One cc: stable commit, the rest are a series of minor cleanups which have 2014-10-18 10:25:09 -07:00
vlynq
vme
w1
watchdog New driver for menf21bmc. 2014-10-10 16:40:14 -04:00
xen xen: features and fixes for 3.18-rc0 2014-10-11 20:29:01 -04:00
zorro
Kconfig
Makefile