summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2012-10-24Drivers: hv: Cleanup error handling in vmbus_open()K. Y. Srinivasan1-11/+13
Fix a memory leak in the error handling path in the function vmbus_open(). Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Reported-by: Jason Wang <jasowang@redhat.com> Cc: Stable <stable@vger.kernel.org> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-23extcon : register for cable interest by cable nameJenny TC1-10/+34
There are some scnearios where a driver/framework needs to register interest for a particular cable without specifying the extcon device name. One such scenario is charger notifications. The platform will have charger cabel which will be bound to any extcon device. It's not mandatory for the charger driver to know which extcon device it should use. This patch enables the support for registering interest for a cable just by cable name wihtout specifying the extcon device name Signed-off-by: Jenny TC <jenny.tc@intel.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Tested-by: Chanwoo Choi <cw00.choi@samsung.com> -- Kernel-doc comment added by MyungJoo Ham
2012-10-23extcon: trivial: kfree missed from remove pathanish kumar1-0/+1
Extcon core doesn't free the memory when we do unregister. Kfree is added in the remove path as it was missing. Signed-off-by: anish kumar <anish198519851985@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2012-10-23extcon: driver model release call not neededanish kumar1-40/+35
There was a case where free and list_del can be called twice on the same pointer.So fixed it by re-arranging the code and removing a function which was not needed. Signed-off-by: anish kumar <anish198519851985@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2012-10-23extcon: MAX77693: Add platform data for MUIC device to initialize registersChanwoo Choi1-0/+27
This patch add platform data for MUIC device to initialize register on probe() call because it should unmask interrupt mask register and initialize some register related to MUIC device. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-10-23extcon: max77693: Use max77693_update_reg for rmw operationsAxel Lin1-12/+6
This simplifies the code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2012-10-23extcon: Fix kerneldoc for extcon_set_cable_state and extcon_set_cable_state_Axel Lin1-2/+2
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2012-10-23extcon: adc-jack: Add missing MODULE_LICENSEAxel Lin1-0/+5
This driver can be built as a module, add MODULE_LICENSE for it. For completeness, also adds MODULE_AUTHOR and MODULE_DESCRIPTION. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2012-10-23extcon: adc-jack: Fix checking return value of request_any_context_irqAxel Lin1-3/+2
On failure, request_any_context_irq() returns a negative value. On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED. Also ensure adc_jack_probe() return 0 on success. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2012-10-23extcon: Fix return value in extcon_register_interest()Sachin Kamat1-1/+1
Propagate the value returned from extcon_find_cable_index() instead of -ENODEV. For readability, -EINVAL is returned in place of the variable. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2012-10-23extcon: unregister compat link on cleanupPeter Huewe1-0/+4
Since extcon registers this compat link at device registration (extcon_dev_register), we should probably remove them at deregistration/cleanup. Cc: stable@vger.kernel.org Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2012-10-23extcon: Unregister compat class at module unload to fix oopsPeter Huewe1-0/+3
If you compile extcon with CONFIG_ANDROID and then load and unload the module you get a simple oops as the driver does not unregister its compat class and thus cannot register it again. Full trace: root@(none):~# modprobe extcon_class root@(none):~# rmmod extcon_class root@(none):~# modprobe extcon_class ------------[ cut here ]------------ WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0xde/0x100() sysfs: cannot create duplicate filename '/class/switch' Modules linked in: extcon_class(+) [last unloaded: extcon_class] Call Trace: 9f451a00: [<602a58bc>] printk+0x0/0xa8 9f451a18: [<60039b43>] warn_slowpath_common+0x93/0xd0 9f451a28: [<6012c6de>] sysfs_add_one+0xde/0x100 9f451a50: [<601d3d90>] strcat+0x0/0x40 9f451a68: [<60039cdc>] warn_slowpath_fmt+0x9c/0xa0 9f451a90: [<6002fe32>] unblock_signals+0x0/0x84 9f451ab0: [<60039c40>] warn_slowpath_fmt+0x0/0xa0 9f451ac0: [<6002fe32>] unblock_signals+0x0/0x84 9f451ae8: [<6012bd97>] sysfs_pathname.isra.10+0x57/0x70 9f451b00: [<601d3d90>] strcat+0x0/0x40 9f451b18: [<6012bd97>] sysfs_pathname.isra.10+0x57/0x70 9f451b48: [<6012c6de>] sysfs_add_one+0xde/0x100 9f451b78: [<6012c96f>] create_dir+0x8f/0x100 9f451bc0: [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class] 9f451bd8: [<6012cda6>] sysfs_create_dir+0xa6/0x1c0 9f451be8: [<601d89f1>] kvasprintf+0x81/0xa0 9f451bf8: [<601cf0f0>] kobject_get+0x0/0x50 9f451c18: [<601cf396>] kobject_add_internal+0x96/0x280 9f451c60: [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class] 9f451c78: [<601cfb93>] kobject_add+0xd3/0x140 9f451cc0: [<601cfac0>] kobject_add+0x0/0x140 9f451cd0: [<6002fe32>] unblock_signals+0x0/0x84 9f451cf8: [<6002fffc>] set_signals+0x29/0x3f 9f451d28: [<600c1de1>] kmem_cache_alloc+0xe1/0x100 9f451d78: [<601cffa0>] kobject_create_and_add+0x50/0xa0 9f451da8: [<601fbe76>] class_compat_register+0x56/0x80 9f451dc8: [<a085d118>] create_extcon_class+0x88/0xd0 [extcon_class] 9f451de8: [<a0861010>] extcon_class_init+0x10/0x12 [extcon_class] 9f451df8: [<600189a8>] do_one_initcall+0x48/0x1f0 9f451e20: [<60061920>] blocking_notifier_call_chain+0x0/0x20 9f451e30: [<60061920>] blocking_notifier_call_chain+0x0/0x20 9f451e58: [<6007e3c3>] sys_init_module+0xa3/0x280 9f451e88: [<6001e2ad>] handle_syscall+0x8d/0x90 9f451ea8: [<60033370>] userspace+0x405/0x531 9f451ee8: [<6001e380>] copy_chunk_to_user+0x0/0x40 9f451ef8: [<6001e5cd>] do_op_one_page+0x14d/0x220 9f451fd8: [<6001a355>] fork_handler+0x95/0xa0 ---[ end trace dd512cc03fe1c367 ]--- ------------[ cut here ]------------ WARNING: at lib/kobject.c:196 kobject_add_internal+0x26e/0x280() kobject_add_internal failed for switch with -EEXIST, don't try to register things with the same name in the same directory. Modules linked in: extcon_class(+) [last unloaded: extcon_class] Call Trace: 9f451ad0: [<602a58bc>] printk+0x0/0xa8 9f451ae8: [<60039b43>] warn_slowpath_common+0x93/0xd0 9f451af8: [<601cf56e>] kobject_add_internal+0x26e/0x280 9f451b18: [<601cf140>] kobject_put+0x0/0x70 9f451b20: [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class] 9f451b38: [<60039cdc>] warn_slowpath_fmt+0x9c/0xa0 9f451b88: [<60039c40>] warn_slowpath_fmt+0x0/0xa0 9f451bc0: [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class] 9f451bd8: [<6012cda6>] sysfs_create_dir+0xa6/0x1c0 9f451be8: [<601d89f1>] kvasprintf+0x81/0xa0 9f451bf8: [<601cf0f0>] kobject_get+0x0/0x50 9f451c18: [<601cf56e>] kobject_add_internal+0x26e/0x280 9f451c60: [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class] 9f451c78: [<601cfb93>] kobject_add+0xd3/0x140 9f451cc0: [<601cfac0>] kobject_add+0x0/0x140 9f451cd0: [<6002fe32>] unblock_signals+0x0/0x84 9f451cf8: [<6002fffc>] set_signals+0x29/0x3f 9f451d28: [<600c1de1>] kmem_cache_alloc+0xe1/0x100 9f451d78: [<601cffa0>] kobject_create_and_add+0x50/0xa0 9f451da8: [<601fbe76>] class_compat_register+0x56/0x80 9f451dc8: [<a085d118>] create_extcon_class+0x88/0xd0 [extcon_class] 9f451de8: [<a0861010>] extcon_class_init+0x10/0x12 [extcon_class] 9f451df8: [<600189a8>] do_one_initcall+0x48/0x1f0 9f451e20: [<60061920>] blocking_notifier_call_chain+0x0/0x20 9f451e30: [<60061920>] blocking_notifier_call_chain+0x0/0x20 9f451e58: [<6007e3c3>] sys_init_module+0xa3/0x280 9f451e88: [<6001e2ad>] handle_syscall+0x8d/0x90 9f451ea8: [<60033370>] userspace+0x405/0x531 9f451ee8: [<6001e380>] copy_chunk_to_user+0x0/0x40 9f451ef8: [<6001e5cd>] do_op_one_page+0x14d/0x220 9f451fd8: [<6001a355>] fork_handler+0x95/0xa0 ---[ end trace dd512cc03fe1c368 ]--- kobject_create_and_add: kobject_add error: -17 ------------[ cut here ]------------ WARNING: at drivers/extcon/extcon_class.c:545 create_extcon_class+0xbc/0xd0 [extcon_class]() cannot allocate Modules linked in: extcon_class(+) [last unloaded: extcon_class] Call Trace: 9f451c80: [<602a58bc>] printk+0x0/0xa8 9f451c98: [<60039b43>] warn_slowpath_common+0x93/0xd0 9f451ca0: [<6002fe32>] unblock_signals+0x0/0x84 9f451ca8: [<a085d14c>] create_extcon_class+0xbc/0xd0 [extcon_class] 9f451cd0: [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class] 9f451ce8: [<60039cdc>] warn_slowpath_fmt+0x9c/0xa0 9f451d20: [<6002fe32>] unblock_signals+0x0/0x84 9f451d28: [<60039c40>] warn_slowpath_fmt+0x0/0xa0 9f451d48: [<6002fffc>] set_signals+0x29/0x3f 9f451d58: [<601cf172>] kobject_put+0x32/0x70 9f451d78: [<600c22c3>] kfree+0xb3/0x100 9f451da8: [<601fbe9a>] class_compat_register+0x7a/0x80 9f451dc8: [<a085d14c>] create_extcon_class+0xbc/0xd0 [extcon_class] 9f451de8: [<a0861010>] extcon_class_init+0x10/0x12 [extcon_class] 9f451df8: [<600189a8>] do_one_initcall+0x48/0x1f0 9f451e20: [<60061920>] blocking_notifier_call_chain+0x0/0x20 9f451e30: [<60061920>] blocking_notifier_call_chain+0x0/0x20 9f451e58: [<6007e3c3>] sys_init_module+0xa3/0x280 9f451e88: [<6001e2ad>] handle_syscall+0x8d/0x90 9f451ea8: [<60033370>] userspace+0x405/0x531 9f451ee8: [<6001e380>] copy_chunk_to_user+0x0/0x40 9f451ef8: [<6001e5cd>] do_op_one_page+0x14d/0x220 9f451fd8: [<6001a355>] fork_handler+0x95/0xa0 ---[ end trace dd512cc03fe1c369 ]--- FATAL: Error inserting extcon_class (/lib/modules/3.6.0-rc6-00178-g811315f/kernel/drivers/extcon/extcon_class.ko): Cannot allocate memory This patch fixes this. Cc: stable@vger.kernel.org Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2012-10-22extcon: optimising the check_mutually_exclusive functionanish kumar1-10/+6
Rather than re-inventing the wheel we can use the hamming function to calculate the number of bits set to check for violation of exclusivity. Signed-off-by: anish kumar <anish198519851985@gmail.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2012-10-22extcon: standard cable names definition and declaration changedanish kumar1-3/+1
With this change now individual drivers can use standard cable names as below: static const char *arizona_cable[] = { extcon_cable_name[EXTCON_USB], extcon_cable_name[EXTCON_USB_HOST], "CUSTOM_CABLE" NULL, } Signed-off-by: anish kumar <anish198519851985@gmail.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2012-10-22extcon-max8997: remove usage of ret in max8997_muic_handle_charger_type_detachDevendra Naga1-4/+2
actually we can do returns with error or success with out ret in this function, so remove the ret variable, and reduce a very little (4byte) space on stack of this function Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2012-10-22extcon: Remove duplicate inclusion of extcon.h header fileSachin Kamat1-1/+0
extcon.h header file was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2012-10-19Merge tag 'fixes-for-linus' of ↵Linus Torvalds6-6/+10
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM soc fixes from Olof Johansson: "A set of fixes and some minor cleanups for -rc2: - A series from Arnd that fixes warnings in drivers and other code included by ARM defconfigs. Most have been acked by corresponding maintainers (and seem quite hard to argue not picking up anyway in the few exception cases). - A few misc patches from the list for integrator/vt8500/i.MX - A batch of fixes to OMAP platforms, fixing: - boot problems on beaglebone, - regression fixes for local timers - clockdomain locking fixes - a few boot/sparse warnings - For Tegra: - Clock rate calculation overflow fix - Revert a change that removed timer clocks and a fix for symbol name clashes - For Renesas: - IO accessor / annotation cleanups to remove warnings - For Kirkwood/Dove/mvebu: - Fixes for device trees for Dove (some minor cleanups, some fixes) - Fixes for the mvebu gpio driver - Fix build problem for Feroceon due to missing ifdefs - Fix lsxl DTS files" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits) ARM: kirkwood: fix buttons on lsxl boards ARM: kirkwood: fix LEDs names for lsxl boards ARM: Kirkwood: fix disabling CACHE_FEROCEON_L2 gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type ARM: dove: Add crypto engine to DT ARM: dove: Remove watchdog from DT ARM: dove: Restructure SoC device tree descriptor ARM: dove: Fix clock names of sata and gbe ARM: dove: Fix tauros2 device tree init ARM: dove: Add pcie clock support ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable ARM: s3c: mark s3c2440_clk_add as __init_refok spi/s3c64xx: use correct dma_transfer_direction type ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck ARM: OMAP: resolve sparse warning concerning debug_card_init() ARM: OMAP4: Fix twd_local_timer_register regression ARM: tegra: add tegra_timer clock ARM: tegra: rename tegra system timer ...
2012-10-19Merge branch 'testing/driver-warnings' of ↵Olof Johansson5-6/+7
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into fixes A collection of warning fixes on non-ARM code from Arnd Bergmann: * 'testing/driver-warnings' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: s3c: mark s3c2440_clk_add as __init_refok spi/s3c64xx: use correct dma_transfer_direction type pcmcia: sharpsl: don't discard sharpsl_pcmcia_ops USB: EHCI: mark ehci_orion_conf_mbus_windows __devinit mm/slob: use min_t() to compare ARCH_SLAB_MINALIGN SCSI: ARM: make fas216_dumpinfo function conditional SCSI: ARM: ncr5380/oak uses no interrupts
2012-10-19Merge branch 'akpm' (Fixes from Andrew)Linus Torvalds2-4/+4
Merge misc fixes from Andrew Morton: "Seven fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (7 patches) lib/dma-debug.c: fix __hash_bucket_find() mm: compaction: correct the nr_strict va isolated check for CMA firmware/memmap: avoid type conflicts with the generic memmap_init() pidns: remove recursion from free_pid_ns() drivers/video/backlight/lm3639_bl.c: return proper error in lm3639_bled_mode_store() error paths kernel/sys.c: fix stack memory content leak via UNAME26 linux/coredump.h needs asm/siginfo.h
2012-10-19firmware/memmap: avoid type conflicts with the generic memmap_init()Fengguang Wu1-2/+2
Fix this build error: drivers/firmware/memmap.c:240:19: error: conflicting types for 'memmap_init' arch/ia64/include/asm/pgtable.h:565:17: note: previous declaration of 'memmap_init' was here Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Bernhard Walle <bwalle@suse.de> Cc: Glauber Costa <glommer@parallels.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-19drivers/video/backlight/lm3639_bl.c: return proper error in ↵Axel Lin1-2/+2
lm3639_bled_mode_store() error paths Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-19xen: Fix annoying compile-time warningLinus Torvalds1-1/+1
Commit cb6b6df111e4 ("xen/pv-on-hvm kexec: add quirk for Xen 3.4 and shutdown watches.") added the xen_strict_xenbus_quirk() function with an old K&R-style declaration without proper typing, causing gcc to rightly complain: drivers/xen/xenbus/xenbus_xs.c:628:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes] because we really don't live in caves using stone-age tools any more, and the kernel has always used properly typed ANSI C function declarations. So if a function doesn't take arguments, we tell the compiler so explicitly by adding the proper "void" in the prototype. I'm sure there are tons of other examples of this kind of stuff in the tree, but this is the one that hits my workstation config, so.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-19Merge tag 'hwmon-for-linus' of ↵Linus Torvalds2-3/+6
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Drop some leftover dependencies on CONFIG_EXPERIMENTAL, and add support for Intel Atom CE4110/4150/4170." * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (coretemp) Add support for Atom CE4110/4150/4170 Documentation/hwmon: remove CONFIG_EXPERIMENTAL hwmon: (pmbus) remove CONFIG_EXPERIMENTAL
2012-10-19Merge tag 'tty-3.7-rc1' of ↵Linus Torvalds6-12/+31
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull TTY fixes from Greg Kroah-Hartman: "Here are some tty and serial driver fixes for your 3.7-rc1 tree. Again, the UABI header file fixes, and a number of build and runtime serial driver bugfixes that solve problems people have been reporting (the staging driver is a tty driver, hence the fixes coming in through this tree.) All of these have been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'tty-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: staging: dgrp: check return value of alloc_tty_driver staging: dgrp: check for NULL pointer in (un)register_proc_table serial/8250_hp300: Missing 8250 register interface conversion bits UAPI: (Scripted) Disintegrate include/linux/hsi tty: serial: sccnxp: Fix bug with unterminated platform_id list staging: serial: dgrp: Add missing #include <linux/uaccess.h> serial: sccnxp: Allows the driver to be compiled as a module tty: Fix bogus "callbacks suppressed" messages net, TTY: initialize tty->driver_data before usage
2012-10-19Merge tag 'usb-3.7-rc1' of ↵Linus Torvalds34-552/+606
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg Kroah-Hartman: "Here are the USB patches against your 3.7-rc1 tree. There are the usual UABI header file movements, and we finally are now able to remove the dbg() macro that is over 15 years old (that had to wait for after some other trees got merged into yours during the big 3.7-rc1 merge window.) Other than that, nothing major, just a number of bugfixes and new device ids. It turns out that almost all of the usb-serial drivers had bugs in how they were handling their internal data, leaking memory, hence all of those fixups. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'usb-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (42 commits) USB: option: add more ZTE devices USB: option: blacklist net interface on ZTE devices usb: host: xhci: New system added for Compliance Mode Patch on SN65LVPE502CP USB: io_ti: fix sysfs-attribute creation USB: iuu_phoenix: fix sysfs-attribute creation USB: spcp8x5: fix port-data memory leak USB: ssu100: fix port-data memory leak USB: ti_usb_3410_5052: fix port-data memory leak USB: oti6858: fix port-data memory leak USB: iuu_phoenix: fix port-data memory leak USB: kl5kusb105: fix port-data memory leak USB: io_ti: fix port-data memory leak USB: keyspan_pda: fix port-data memory leak USB: f81232: fix port-data memory leak USB: io_edgeport: fix port-data memory leak USB: kobil_sct: fix port-data memory leak USB: cypress_m8: fix port-data memory leak usb: acm: fix the computation of the number of data bits usb: Missing dma_mask in ehci-vt8500.c when probed from device-tree usb: Missing dma_mask in uhci-platform.c when probed from device-tree ...
2012-10-19USB: ehci-fsl: Return valid error in ehci_fsl_setup_phyBen Collins1-1/+1
ehci_fsl_setup_phy is supposed to return an int, but had a void return value in the case of controller_ver being invalid. Introduced by commit 3735ba8db8e6 ("powerpc/usb: fix bug of CPU hang when missing USB PHY clock"), which missed one return. Signed-off-by: Ben Collins <ben.c@servergy.com> Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-18Merge branch 'v4l_for_linus' of ↵Linus Torvalds1-8/+10
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Media fixes for: - one Kconfig fix patch; - one patch fixing DocBook breakage due to the drivers/media UAPI changes; - the remaining UAPI media changes (DVB API). I'm aware that is is a little late for the UAPI renames for the DVB API, but IMHO, it is better to merge it for 3.7, due to two reasons: 1) There is a major rename at 3.7 (not only uapi changes, but also the entire media drivers were reorganized on 3.7, in order to simplify the Kconfig logic, and easy drivers selection, especially for hybrid devices). By confining all those renames there at 3.7 it will cause all the harm at for media developers on just one shot. Stable backports upstream and at distros will likely welcome it as well, as they won't need to check what changed on 3.7 and what was postponed for on 3.8. 2) The V4L2 DocBook Makefile creates a cross-reference between the media API headers and the specs. This helps us _a_lot_ to be sure that all API improvements are properly documented. Every time a header changes from one place to another, DocBook/media/Makefile needs to be patched. Currently, the DocBook breakage patch depends on the DVB UAPI." * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] Kconfig: Fix dependencies for driver autoselect options DocBook/media/Makefile: Fix build due to uapi breakage UAPI: (Scripted) Disintegrate include/linux/dvb
2012-10-18Merge tag 'dt-fixes-for-3.7' of git://sources.calxeda.com/kernel/linuxLinus Torvalds3-16/+18
Pull DeviceTree fixes from Rob Herring: "A handful of fixes: - a fix for dtc from upstream - sparse fixes in DeviceTree code - stub of_get_child_by_name for !OF builds" * tag 'dt-fixes-for-3.7' of git://sources.calxeda.com/kernel/linux: dtc: fix for_each_*() to skip first object if deleted of/platform: sparse fix of/irq: sparse fixes of/address: sparse fixes of: add stub of_get_child_by_name for non-OF builds
2012-10-18USB: option: add more ZTE devicesBjørn Mork1-0/+16
Cc: <stable@vger.kernel.org> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-18USB: option: blacklist net interface on ZTE devicesBjørn Mork1-20/+48
Based on information from the ZTE Windows drivers. Cc: <stable@vger.kernel.org> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-18Merge tag 'fixes-for-v3.7-rc2' of ↵Greg Kroah-Hartman6-7/+17
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus usb: fixes for v3.7-rc2 Here's the first set of fixes for v3.7-rc cycle. DesignWare Core USB3 Driver (dwc3) got two fixes. The first one fixes a long standing bug which would keep endpoint with BUSY flag set forever if we cancel a transfer which has already been started by the controller. The second fix will just switch PHYs back off when DWC3 driver is removed. MUSB fixed a bug which would cause a Kernel Oops at least on AM3517 when removing a device. For some reason that particular device can fall into a situation where you have both Disconnect and Endpoint IRQs happen simultaneously (have both bits set in IRQ_STATUS register) and, because Disconnect Interrupt is handled before Endpoint Interrupts, we would try to transfer data over a disconnected device, thus generating a kernel oops. Renensas' USB DRD driver got two fixes which are a) fixing an off-by-one bug on the pipe iterator implementation and b) fixing Interrupt Status Clear procedure in order to properly clear a single Interrupt event without clearing (and masking) other events we didn't handle yet.
2012-10-18usb: host: xhci: New system added for Compliance Mode Patch on SN65LVPE502CPAlexis R. Cortes1-1/+2
This minor change adds a new system to which the "Fix Compliance Mode on SN65LVPE502CP Hardware" patch has to be applied also. System added: Vendor: Hewlett-Packard. System Model: Z1 Signed-off-by: Alexis R. Cortes <alexis.cortes@ti.com> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-18USB: io_ti: fix sysfs-attribute creationJohan Hovold1-7/+7
Make sure port data is initialised before creating sysfs attributes to avoid a race. A recent patch ("USB: io_ti: fix port-data memory leak") got the sysfs-attribute creation and port-data initialisation ordering wrong. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-18USB: iuu_phoenix: fix sysfs-attribute creationJohan Hovold1-2/+12
Make sure sysfs attributes are created at port probe. A recent patch ("USB: iuu_phoenix: fix port-data memory leak") removed the sysfs-attribute creation by mistake. Reported-by: Yuanhan Liu <yuanhan.liu@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17staging: dgrp: check return value of alloc_tty_driverBill Pemberton1-0/+9
alloc_tty_driver was always assumed to succeed. Add code to check the return value and return -ENOMEM if alloc_tty_driver fails. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17staging: dgrp: check for NULL pointer in (un)register_proc_tableBill Pemberton1-0/+6
register_proc_table and unregister_proc_table didn't deal with the possibility that the *table pointer could be NULL. Check for this and return if table is NULL. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17of/platform: sparse fixKim Phillips1-1/+1
drivers/of/platform.c:110:59: warning: incorrect type in argument 2 (different base types) drivers/of/platform.c:110:59: expected restricted __be32 const [usertype] *addr drivers/of/platform.c:110:59: got unsigned int const [usertype] *[assigned] reg Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-10-17of/irq: sparse fixesKim Phillips1-3/+5
drivers/of/irq.c:195:57: warning: restricted __be32 degrades to integer drivers/of/irq.c:196:51: warning: restricted __be32 degrades to integer drivers/of/irq.c:199:57: warning: restricted __be32 degrades to integer drivers/of/irq.c:201:58: warning: restricted __be32 degrades to integer drivers/of/irq.c:470:37: warning: incorrect type in assignment (different modifiers) drivers/of/irq.c:470:37: expected int ( *[usertype] irq_init_cb )( ... ) drivers/of/irq.c:470:37: got void const *const data drivers/of/irq.c:96:5: error: symbol 'of_irq_map_raw' redeclared with different type (originally declared at include/linux/of_irq.h:61) - incompatible argument 2 (different base types) drivers/of/of_pci_irq.c:91:40: warning: incorrect type in argument 2 (different base types) drivers/of/of_pci_irq.c:91:40: expected unsigned int const [usertype] *intspec drivers/of/of_pci_irq.c:91:40: got restricted __be32 *<noident> drivers/of/of_pci_irq.c:91:53: warning: incorrect type in argument 4 (different base types) drivers/of/of_pci_irq.c:91:53: expected unsigned int const [usertype] *addr drivers/of/of_pci_irq.c:91:53: got restricted __be32 *<noident> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-10-17of/address: sparse fixesKim Phillips1-12/+12
drivers/of/address.c:66:29: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:66:29: expected restricted __be32 const [usertype] *cell drivers/of/address.c:66:29: got unsigned int [usertype] *addr drivers/of/address.c:87:32: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:87:32: expected restricted __be32 const [usertype] *cell drivers/of/address.c:87:32: got unsigned int [usertype] *addr drivers/of/address.c:91:30: warning: incorrect type in assignment (different base types) drivers/of/address.c:91:30: expected unsigned int [unsigned] [usertype] <noident> drivers/of/address.c:91:30: got restricted __be32 [usertype] <noident> drivers/of/address.c:92:22: warning: incorrect type in assignment (different base types) drivers/of/address.c:92:22: expected unsigned int [unsigned] [usertype] <noident> drivers/of/address.c:92:22: got restricted __be32 [usertype] <noident> drivers/of/address.c:147:35: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:147:35: expected restricted __be32 const [usertype] *addr drivers/of/address.c:147:35: got unsigned int [usertype] *addr drivers/of/address.c:157:34: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:157:34: expected restricted __be32 const [usertype] *cell drivers/of/address.c:157:34: got unsigned int [usertype] * drivers/of/address.c:256:29: warning: restricted __be32 degrades to integer drivers/of/address.c:256:36: warning: restricted __be32 degrades to integer drivers/of/address.c:262:34: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:262:34: expected restricted __be32 const [usertype] *cell drivers/of/address.c:262:34: got unsigned int [usertype] * drivers/of/address.c:372:41: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:372:41: expected restricted __be32 const [usertype] *cell drivers/of/address.c:372:41: got unsigned int [usertype] *addr drivers/of/address.c:395:53: warning: incorrect type in argument 2 (different base types) drivers/of/address.c:395:53: expected restricted __be32 const [usertype] *addr drivers/of/address.c:395:53: got unsigned int [usertype] *addr drivers/of/address.c:443:50: warning: incorrect type in argument 2 (different base types) drivers/of/address.c:443:50: expected restricted __be32 const [usertype] *addr drivers/of/address.c:443:50: got unsigned int *<noident> drivers/of/address.c:455:49: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:455:49: expected restricted __be32 const [usertype] *cell drivers/of/address.c:455:49: got unsigned int *<noident> drivers/of/address.c:480:60: warning: incorrect type in argument 2 (different base types) drivers/of/address.c:480:60: expected restricted __be32 const [usertype] *addr drivers/of/address.c:480:60: got unsigned int *<noident> drivers/of/address.c:412:5: warning: symbol '__of_translate_address' was not declared. Should it be static? drivers/of/address.c:520:14: error: symbol 'of_get_address' redeclared with different type (originally declared at include/linux/of_address.h:22) - different base types Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-10-17USB: spcp8x5: fix port-data memory leakJohan Hovold1-28/+18
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: ssu100: fix port-data memory leakJohan Hovold1-14/+20
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: ti_usb_3410_5052: fix port-data memory leakJohan Hovold1-45/+43
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: oti6858: fix port-data memory leakJohan Hovold1-40/+28
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: iuu_phoenix: fix port-data memory leakJohan Hovold1-40/+22
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: kl5kusb105: fix port-data memory leakJohan Hovold1-44/+24
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the write waitqueue was initialised but never used. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: io_ti: fix port-data memory leakJohan Hovold1-46/+45
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: keyspan_pda: fix port-data memory leakJohan Hovold1-13/+17
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the write waitqueue was initialised but never used. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: f81232: fix port-data memory leakJohan Hovold1-26/+17
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: io_edgeport: fix port-data memory leakJohan Hovold2-25/+37
Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17USB: kobil_sct: fix port-data memory leakJohan Hovold1-10/+13
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Compile-only tested. Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>