summaryrefslogtreecommitdiff
path: root/drivers/usb/misc
AgeCommit message (Collapse)AuthorFilesLines
2020-09-22usb: appledisplay: use module_usb_driver to simplify the codeLiu Shixin1-13/+1
module_usb_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20200918031012.3980558-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-17USB: adutux: fix debuggingOliver Neukum1-0/+1
Handling for removal of the controller was missing at one place. Add it. Signed-off-by: Oliver Neukum <oneukum@suse.com> Link: https://lore.kernel.org/r/20200917112600.26508-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-16USB: legousbtower: use usb_control_msg_recv()Greg Kroah-Hartman1-41/+19
The usb_control_msg_recv() function can handle data on the stack, as well as properly detecting short reads, so move to use that function instead of the older usb_control_msg() call. This ends up removing a lot of extra lines in the driver. Cc: Juergen Stuber <starblue@users.sourceforge.net> Link: https://lore.kernel.org/r/20200914153756.3412156-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-04usb/misc: usb3503: Use pm_ptr() macroPaul Cercueil1-10/+8
Use the newly introduced pm_ptr() macro, and mark the suspend/resume functions __maybe_unused. These functions can then be moved outside the CONFIG_PM_SUSPEND block, and the compiler can then process them and detect build failures independently of the config. If unused, they will simply be discarded by the compiler. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200903112554.34263-8-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-04usb/misc: usb4604: Use pm_ptr() macroPaul Cercueil1-5/+3
Use the newly introduced pm_ptr() macro, and mark the suspend/resume functions __maybe_unused. These functions can then be moved outside the CONFIG_PM_SUSPEND block, and the compiler can then process them and detect build failures independently of the config. If unused, they will simply be discarded by the compiler. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200903112554.34263-9-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-31Merge 5.9-rc3 into usb-nextGreg Kroah-Hartman2-2/+2
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-28USB: usblcd: Remove the superfluous breakJing Xiangfeng1-1/+0
Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Link: https://lore.kernel.org/r/20200819012316.170388-1-jingxiangfeng@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-18USB: yurex: remove needless check before usb_free_coherent()Xu Wang1-4/+2
usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/r/20200810020802.9082-1-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-18USB: lvtest: return proper error code in probeEvgeny Novikov1-1/+1
lvs_rh_probe() can return some nonnegative value from usb_control_msg() when it is less than "USB_DT_HUB_NONVAR_SIZE + 2" that is considered as a failure. Make lvs_rh_probe() return -EINVAL in this case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov <novikov@ispras.ru> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200805090643.3432-1-novikov@ispras.ru Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-18USB: yurex: Fix bad gfp argumentAlan Stern1-1/+1
The syzbot fuzzer identified a bug in the yurex driver: It passes GFP_KERNEL as a memory-allocation flag to usb_submit_urb() at a time when its state is TASK_INTERRUPTIBLE, not TASK_RUNNING: do not call blocking ops when !TASK_RUNNING; state=1 set at [<00000000370c7c68>] prepare_to_wait+0xb1/0x2a0 kernel/sched/wait.c:247 WARNING: CPU: 1 PID: 340 at kernel/sched/core.c:7253 __might_sleep+0x135/0x190 kernel/sched/core.c:7253 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 340 Comm: syz-executor677 Not tainted 5.8.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xf6/0x16e lib/dump_stack.c:118 panic+0x2aa/0x6e1 kernel/panic.c:231 __warn.cold+0x20/0x50 kernel/panic.c:600 report_bug+0x1bd/0x210 lib/bug.c:198 handle_bug+0x41/0x80 arch/x86/kernel/traps.c:234 exc_invalid_op+0x14/0x40 arch/x86/kernel/traps.c:254 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:536 RIP: 0010:__might_sleep+0x135/0x190 kernel/sched/core.c:7253 Code: 65 48 8b 1c 25 40 ef 01 00 48 8d 7b 10 48 89 fe 48 c1 ee 03 80 3c 06 00 75 2b 48 8b 73 10 48 c7 c7 e0 9e 06 86 e8 ed 12 f6 ff <0f> 0b e9 46 ff ff ff e8 1f b2 4b 00 e9 29 ff ff ff e8 15 b2 4b 00 RSP: 0018:ffff8881cdb77a28 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8881c6458000 RCX: 0000000000000000 RDX: ffff8881c6458000 RSI: ffffffff8129ec93 RDI: ffffed1039b6ef37 RBP: ffffffff86fdade2 R08: 0000000000000001 R09: ffff8881db32f54f R10: 0000000000000000 R11: 0000000030343354 R12: 00000000000001f2 R13: 0000000000000000 R14: 0000000000000068 R15: ffffffff83c1b1aa slab_pre_alloc_hook.constprop.0+0xea/0x200 mm/slab.h:498 slab_alloc_node mm/slub.c:2816 [inline] slab_alloc mm/slub.c:2900 [inline] kmem_cache_alloc_trace+0x46/0x220 mm/slub.c:2917 kmalloc include/linux/slab.h:554 [inline] dummy_urb_enqueue+0x7a/0x880 drivers/usb/gadget/udc/dummy_hcd.c:1251 usb_hcd_submit_urb+0x2b2/0x22d0 drivers/usb/core/hcd.c:1547 usb_submit_urb+0xb4e/0x13e0 drivers/usb/core/urb.c:570 yurex_write+0x3ea/0x820 drivers/usb/misc/yurex.c:495 This patch changes the call to use GFP_ATOMIC instead of GFP_KERNEL. Reported-and-tested-by: syzbot+c2c3302f9c601a4b1be2@syzkaller.appspotmail.com Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200810182954.GB307778@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-07Merge tag 'tty-5.9-rc1' of ↵Linus Torvalds1-5/+6
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the large set of TTY and Serial driver patches for 5.9-rc1. Lots of bugfixes in here, thanks to syzbot fuzzing for serial and vt and console code. Other highlights include: - much needed vt/vc code cleanup from Jiri Slaby - 8250 driver fixes and additions - various serial driver updates and feature enhancements - locking cleanup for serial/console initializations - other minor cleanups All of these have been in linux-next with no reported issues" * tag 'tty-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (90 commits) MAINTAINERS: enlist Greg formally for console stuff vgacon: Fix for missing check in scrollback handling Revert "serial: 8250: Let serial core initialise spin lock" serial: 8250: Let serial core initialise spin lock tty: keyboard, do not speculate on func_table index serial: stm32: Add RS485 RTS GPIO control serial: 8250_dw: Fix common clocks usage race condition serial: 8250_dw: Pass the same rate to the clk round and set rate methods serial: 8250_dw: Simplify the ref clock rate setting procedure serial: 8250: Add 8250 port clock update method tty: serial: imx: add imx earlycon driver tty: serial: imx: enable imx serial console port as module tty/synclink: remove leftover bits of non-PCI card support tty: Use the preferred form for passing the size of a structure type tty: Fix identation issues in struct serial_struct32 tty: Avoid the use of one-element arrays serial: msm_serial: add sparse context annotation serial: pmac_zilog: add sparse context annotation newport_con: vc_color is now in state serial: imx: use hrtimers for rs485 delays ...
2020-07-27USB: iowarrior: fix up report size handling for some devicesGreg Kroah-Hartman1-10/+25
In previous patches that added support for new iowarrior devices, the handling of the report size was not done correct. Fix that up and update the copyright date for the driver Reworked from an original patch written by Christoph Jung. Fixes: bab5417f5f01 ("USB: misc: iowarrior: add support for the 100 device") Fixes: 5f6f8da2d7b5 ("USB: misc: iowarrior: add support for the 28 and 28L devices") Fixes: 461d8deb26a7 ("USB: misc: iowarrior: add support for 2 OEMed devices") Cc: stable <stable@kernel.org> Reported-by: Christoph Jung <jung@codemercs.com> Link: https://lore.kernel.org/r/20200726094939.1268978-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21usb: appledisplay: remove needless check before usb_free_coherent()Xu Wang1-2/+1
usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/r/20200720052456.7610-1-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21USB: Replace HTTP links with HTTPS onesAlexander A. Klimov1-2/+2
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Link: https://lore.kernel.org/r/20200719160910.60018-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21usb: usbtest: reduce stack usage in test_queueBixuan Cui1-1/+9
Fix the warning: [-Werror=-Wframe-larger-than=] drivers/usb/misc/usbtest.c: In function 'test_queue': drivers/usb/misc/usbtest.c:2148:1: warning: the frame size of 1232 bytes is larger than 1024 bytes Reported-by: kbuild test robot <lkp@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com> Link: https://lore.kernel.org/r/ffa85702-86ab-48d7-4da2-2efcc94b05d3@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-20Merge 5.8-rc6 into tty-nextGreg Kroah-Hartman1-0/+1
We need the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-15usb: misc: sisusbvga: Move static const tables out to different include fileLee Jones3-631/+689
sisusb_init.h is included by multiple source files, but the big data tables contained are only referenced by one of them, leaving the tables 'defined but not used' by the remainder. We have a choice to either place them inside the source file, taking up may lines and potentially overwhelming the source file OR tuck them away neatly inside their own headerfile. The latter was chosen. Fixes the following W=1 kernel build warning(s): In file included from drivers/usb/misc/sisusbvga/sisusb.c:54: drivers/usb/misc/sisusbvga/sisusb_init.h:664:34: warning: ‘SiSUSB_VCLKData’ defined but not used [-Wunused-const-variable=] 664 | static const struct SiS_VCLKData SiSUSB_VCLKData[] = { | ^~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:406:35: warning: ‘SiSUSB_CRT1Table’ defined but not used [-Wunused-const-variable=] 406 | static const struct SiS_CRT1Table SiSUSB_CRT1Table[] = { | ^~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:348:30: warning: ‘SiSUSB_RefIndex’ defined but not used [-Wunused-const-variable=] 348 | static const struct SiS_Ext2 SiSUSB_RefIndex[] = { | ^~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:269:29: warning: ‘SiSUSB_EModeIDTable’ defined but not used [-Wunused-const-variable=] 269 | static const struct SiS_Ext SiSUSB_EModeIDTable[] = { | ^~~~~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:238:36: warning: ‘SiSUSB_StandTable’ defined but not used [-Wunused-const-variable=] 238 | static const struct SiS_StandTable SiSUSB_StandTable[] = { | ^~~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:201:37: warning: ‘SiSUSB_ModeResInfo’ defined but not used [-Wunused-const-variable=] 201 | static const struct SiS_ModeResInfo SiSUSB_ModeResInfo[] = { | ^~~~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:196:28: warning: ‘SiSUSB_SModeIDTable’ defined but not used [-Wunused-const-variable=] 196 | static const struct SiS_St SiSUSB_SModeIDTable[] = { | ^~~~~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:183:28: warning: ‘SiS_VGA_DAC’ defined but not used [-Wunused-const-variable=] 183 | static const unsigned char SiS_VGA_DAC[] = { | ^~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:172:28: warning: ‘SiS_EGA_DAC’ defined but not used [-Wunused-const-variable=] 172 | static const unsigned char SiS_EGA_DAC[] = { | ^~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:161:28: warning: ‘SiS_CGA_DAC’ defined but not used [-Wunused-const-variable=] 161 | static const unsigned char SiS_CGA_DAC[] = { | ^~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:150:28: warning: ‘SiS_MDA_DAC’ defined but not used [-Wunused-const-variable=] 150 | static const unsigned char SiS_MDA_DAC[] = { | ^~~~~~~~~~~ Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: Joe Perches <joe@perches.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200715093209.3165641-9-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-15usb: misc: sisusbvga: sisusb_init: Remove genunine unused static const arraysLee Jones1-31/+0
These are not referenced anywhere in the kernel. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/sisusbvga/sisusb_init.h:171:29: warning: ‘ModeIndex_1280x1024’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:170:29: warning: ‘ModeIndex_1280x768’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:169:29: warning: ‘ModeIndex_1280x720’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:168:29: warning: ‘ModeIndex_1152x864’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:167:29: warning: ‘ModeIndex_1024x576’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:166:29: warning: ‘ModeIndex_1024x768’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:165:29: warning: ‘ModeIndex_960x600’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:164:29: warning: ‘ModeIndex_960x540’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:163:29: warning: ‘ModeIndex_856x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:162:29: warning: ‘ModeIndex_848x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:161:29: warning: ‘ModeIndex_800x600’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:160:29: warning: ‘ModeIndex_800x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:159:29: warning: ‘ModeIndex_768x576’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:158:29: warning: ‘ModeIndex_720x576’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:157:29: warning: ‘ModeIndex_720x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:156:29: warning: ‘ModeIndex_640x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:155:29: warning: ‘ModeIndex_640x400’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:154:29: warning: ‘ModeIndex_512x384’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:153:29: warning: ‘ModeIndex_400x300’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:152:29: warning: ‘ModeIndex_320x240’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:151:29: warning: ‘ModeIndex_320x200’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:232:37: warning: ‘SiSUSB_ModeResInfo’ defined but not used [-Wunused-const-variable=] Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: Joe Perches <joe@perches.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200715093209.3165641-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-15USB: sisusbvga: Fix a potential UB casued by left shifting a negative valueChangming Liu1-1/+1
The char buffer buf, receives data directly from user space, so its content might be negative and its elements are left shifted to form an unsigned integer. Since left shifting a negative value is undefined behavior, thus change the char to u8 to elimintate this UB. Signed-off-by: Changming Liu <charley.ashbringer@gmail.com> Link: https://lore.kernel.org/r/20200711043018.928-1-charley.ashbringer@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-10usb: Use fallthrough pseudo-keywordGustavo A. R. Silva3-6/+6
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200707195607.GA4198@embeddedor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09usb: misc: legousbtower: Demote function header which is clearly not kerneldocLee Jones1-1/+1
Fixes the following W=1 kernel build warning(s): drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'dev' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'function' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'size' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'data' not described in 'lego_usb_tower_debug_data' Cc: Juergen Stuber <starblue@users.sourceforge.net> Cc: David Glance <davidgsf@sourceforge.net> Cc: david <david@csse.uwa.edu.au> Cc: legousb-devel@lists.sourceforge.net Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200706133341.476881-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09usb: misc: legousbtower: Demote obvious misuse of kerneldoc to standard ↵Lee Jones1-12/+12
comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'dev' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'function' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'size' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'data' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:290: warning: Function parameter or member 'dev' not described in 'tower_delete' drivers/usb/misc/legousbtower.c:306: warning: Function parameter or member 'inode' not described in 'tower_open' drivers/usb/misc/legousbtower.c:306: warning: Function parameter or member 'file' not described in 'tower_open' drivers/usb/misc/legousbtower.c:405: warning: Function parameter or member 'inode' not described in 'tower_release' drivers/usb/misc/legousbtower.c:405: warning: Function parameter or member 'file' not described in 'tower_release' drivers/usb/misc/legousbtower.c:452: warning: Function parameter or member 'dev' not described in 'tower_check_for_read_packet' drivers/usb/misc/legousbtower.c:468: warning: Function parameter or member 'file' not described in 'tower_poll' drivers/usb/misc/legousbtower.c:468: warning: Function parameter or member 'wait' not described in 'tower_poll' drivers/usb/misc/legousbtower.c:494: warning: Function parameter or member 'file' not described in 'tower_llseek' drivers/usb/misc/legousbtower.c:494: warning: Function parameter or member 'off' not described in 'tower_llseek' drivers/usb/misc/legousbtower.c:494: warning: Function parameter or member 'whence' not described in 'tower_llseek' drivers/usb/misc/legousbtower.c:503: warning: Function parameter or member 'file' not described in 'tower_read' drivers/usb/misc/legousbtower.c:503: warning: Function parameter or member 'buffer' not described in 'tower_read' drivers/usb/misc/legousbtower.c:503: warning: Function parameter or member 'count' not described in 'tower_read' drivers/usb/misc/legousbtower.c:503: warning: Function parameter or member 'ppos' not described in 'tower_read' drivers/usb/misc/legousbtower.c:587: warning: Function parameter or member 'file' not described in 'tower_write' drivers/usb/misc/legousbtower.c:587: warning: Function parameter or member 'buffer' not described in 'tower_write' drivers/usb/misc/legousbtower.c:587: warning: Function parameter or member 'count' not described in 'tower_write' drivers/usb/misc/legousbtower.c:587: warning: Function parameter or member 'ppos' not described in 'tower_write' drivers/usb/misc/legousbtower.c:669: warning: Function parameter or member 'urb' not described in 'tower_interrupt_in_callback' drivers/usb/misc/legousbtower.c:724: warning: Function parameter or member 'urb' not described in 'tower_interrupt_out_callback' drivers/usb/misc/legousbtower.c:752: warning: Function parameter or member 'interface' not described in 'tower_probe' drivers/usb/misc/legousbtower.c:752: warning: Function parameter or member 'id' not described in 'tower_probe' drivers/usb/misc/legousbtower.c:863: warning: Function parameter or member 'interface' not described in 'tower_disconnect' Cc: Juergen Stuber <starblue@users.sourceforge.net> Cc: David Glance <davidgsf@sourceforge.net> Cc: david <david@csse.uwa.edu.au> Cc: legousb-devel@lists.sourceforge.net Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200706133341.476881-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09usb: misc: ldusb: Demote obvious misuse of kerneldoc to standard comment blocksLee Jones1-12/+12
No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/ldusb.c:192: warning: Function parameter or member 'dev' not described in 'ld_usb_abort_transfers' drivers/usb/misc/ldusb.c:206: warning: Function parameter or member 'dev' not described in 'ld_usb_delete' drivers/usb/misc/ldusb.c:220: warning: Function parameter or member 'urb' not described in 'ld_usb_interrupt_in_callback' drivers/usb/misc/ldusb.c:281: warning: Function parameter or member 'urb' not described in 'ld_usb_interrupt_out_callback' drivers/usb/misc/ldusb.c:301: warning: Function parameter or member 'inode' not described in 'ld_usb_open' drivers/usb/misc/ldusb.c:301: warning: Function parameter or member 'file' not described in 'ld_usb_open' drivers/usb/misc/ldusb.c:372: warning: Function parameter or member 'inode' not described in 'ld_usb_release' drivers/usb/misc/ldusb.c:372: warning: Function parameter or member 'file' not described in 'ld_usb_release' drivers/usb/misc/ldusb.c:414: warning: Function parameter or member 'file' not described in 'ld_usb_poll' drivers/usb/misc/ldusb.c:414: warning: Function parameter or member 'wait' not described in 'ld_usb_poll' drivers/usb/misc/ldusb.c:439: warning: Function parameter or member 'file' not described in 'ld_usb_read' drivers/usb/misc/ldusb.c:439: warning: Function parameter or member 'buffer' not described in 'ld_usb_read' drivers/usb/misc/ldusb.c:439: warning: Function parameter or member 'count' not described in 'ld_usb_read' drivers/usb/misc/ldusb.c:439: warning: Function parameter or member 'ppos' not described in 'ld_usb_read' drivers/usb/misc/ldusb.c:526: warning: Function parameter or member 'file' not described in 'ld_usb_write' drivers/usb/misc/ldusb.c:526: warning: Function parameter or member 'buffer' not described in 'ld_usb_write' drivers/usb/misc/ldusb.c:526: warning: Function parameter or member 'count' not described in 'ld_usb_write' drivers/usb/misc/ldusb.c:526: warning: Function parameter or member 'ppos' not described in 'ld_usb_write' drivers/usb/misc/ldusb.c:651: warning: Function parameter or member 'intf' not described in 'ld_usb_probe' drivers/usb/misc/ldusb.c:651: warning: Function parameter or member 'id' not described in 'ld_usb_probe' drivers/usb/misc/ldusb.c:754: warning: Function parameter or member 'intf' not described in 'ld_usb_disconnect' Cc: Johan Hovold <johan@kernel.org> Cc: Michael Hund <mhund@ld-didactic.de> Cc: David Glance <advidgsf@sourceforge.net> Cc: Juergen Stuber <starblue@users.sourceforge.net> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200703174148.2749969-28-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09usb: misc: iowarrior: Demote obvious misuse of kerneldoc to standard comment ↵Lee Jones1-7/+7
blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/iowarrior.c:251: warning: Function parameter or member 'dev' not described in 'iowarrior_delete' drivers/usb/misc/iowarrior.c:279: warning: Function parameter or member 'file' not described in 'iowarrior_read' drivers/usb/misc/iowarrior.c:279: warning: Function parameter or member 'buffer' not described in 'iowarrior_read' drivers/usb/misc/iowarrior.c:279: warning: Function parameter or member 'count' not described in 'iowarrior_read' drivers/usb/misc/iowarrior.c:279: warning: Function parameter or member 'ppos' not described in 'iowarrior_read' drivers/usb/misc/iowarrior.c:483: warning: Function parameter or member 'file' not described in 'iowarrior_ioctl' drivers/usb/misc/iowarrior.c:483: warning: Function parameter or member 'cmd' not described in 'iowarrior_ioctl' drivers/usb/misc/iowarrior.c:483: warning: Function parameter or member 'arg' not described in 'iowarrior_ioctl' drivers/usb/misc/iowarrior.c:599: warning: Function parameter or member 'inode' not described in 'iowarrior_open' drivers/usb/misc/iowarrior.c:599: warning: Function parameter or member 'file' not described in 'iowarrior_open' drivers/usb/misc/iowarrior.c:647: warning: Function parameter or member 'inode' not described in 'iowarrior_release' drivers/usb/misc/iowarrior.c:647: warning: Function parameter or member 'file' not described in 'iowarrior_release' drivers/usb/misc/iowarrior.c:753: warning: Function parameter or member 'interface' not described in 'iowarrior_probe' drivers/usb/misc/iowarrior.c:753: warning: Function parameter or member 'id' not described in 'iowarrior_probe' drivers/usb/misc/iowarrior.c:879: warning: Function parameter or member 'interface' not described in 'iowarrior_disconnect' Cc: Johan Hovold <johan@kernel.org> Cc: Christian Lucht <lucht@codemercs.com> Cc: Stephane Dalton <sdalton@videotron.ca> Cc: Stephane Doyon <s.doyon@videotron.ca> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200703174148.2749969-26-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09usb: misc: iowarrior: Fix odd corruption issue in the file headerLee Jones1-1/+1
Looks although Stephane's name was corrupted somehow. Cc: Johan Hovold <johan@kernel.org> Cc: Christian Lucht <lucht@codemercs.com> Cc: Stephane Dalton <sdalton@videotron.ca> Cc: Stephane Doyon <s.doyon@videotron.ca> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200703174148.2749969-25-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09usb: misc: adutux: Demote obvious misuse of kerneldoc to standard comment blocksLee Jones1-3/+3
No attempt has been made to document any of the functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/adutux.c:117: warning: Function parameter or member 'dev' not described in 'adu_abort_transfers' drivers/usb/misc/adutux.c:653: warning: Function parameter or member 'interface' not described in 'adu_probe' drivers/usb/misc/adutux.c:653: warning: Function parameter or member 'id' not described in 'adu_probe' drivers/usb/misc/adutux.c:762: warning: Function parameter or member 'interface' not described in 'adu_disconnect' Cc: Johan Hovold <johan@kernel.org> Cc: David Glance <davidgsf@sourceforge.net> Cc: Juergen Stuber <stuber@loria.fr> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200703174148.2749969-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-29Merge 5.8-rc3 into usb-nextGreg Kroah-Hartman1-0/+1
We want the USB fixes in here, and this resolves a merge issue found in linux-next. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-24vt: use newly defined CUR_* macrosJiri Slaby1-1/+1
We defined macros for all the magic constants in the previous patch. So let us use the macro in the code now. No functional change intended. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Helge Deller <deller@gmx.de> Cc: linux-usb@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-parisc@vger.kernel.org Acked-by: Helge Deller <deller@gmx.de> Link: https://lore.kernel.org/r/20200615074910.19267-26-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-24vc: switch state to boolJiri Slaby1-1/+2
The code currently uses bitfields to store true-false values. Switch all of that to bools. Apart from the cleanup, it saves 20B of code as many shifts, ANDs, and ORs became simple movzb's. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20200615074910.19267-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-24vt: introduce enum vc_intensity for intensityJiri Slaby1-3/+3
Introduce names (en enum) for 0, 1, and 2 constants. We now have VCI_HALF_BRIGHT, VCI_NORMAL, and VCI_BOLD instead. Apart from the cleanup, 1) the enum allows for better type checking, and 2) this saves some code. No more fiddling with bits is needed in assembly now. (OTOH, the structure is larger.) Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20200615074910.19267-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-24USB: ch9: add "USB_" prefix in front of TEST definesGreg Kroah-Hartman1-4/+4
For some reason, the TEST_ defines in the usb/ch9.h files did not have the USB_ prefix on it, making it a bit confusing when reading the file, as well as not the nicest thing to do in a uapi file. So fix that up and add the USB_ prefix on to them, and fix up all in-kernel usages. This included deleting the duplicate copy in the net2272.h file. Cc: Felipe Balbi <balbi@kernel.org> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Mathias Nyman <mathias.nyman@intel.com> Cc: Pawel Laszczak <pawell@cadence.com> Cc: YueHaibing <yuehaibing@huawei.com> Cc: Nathan Chancellor <natechancellor@gmail.com> Cc: Jason Yan <yanaijie@huawei.com> Cc: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: Stephen Boyd <swboyd@chromium.org> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Jules Irenge <jbi.octave@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Cc: Rob Gill <rrobgill@protonmail.com> Cc: Macpaul Lin <macpaul.lin@mediatek.com> Acked-by: Minas Harutyunyan <hminas@synopsys.com> Acked-by: Bin Liu <b-liu@ti.com> Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Acked-by: Peter Chen <peter.chen@nxp.com> Link: https://lore.kernel.org/r/20200618144206.2655890-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-18usb: usbtest: fix missing kfree(dev->buf) in usbtest_disconnectZqiang1-0/+1
BUG: memory leak unreferenced object 0xffff888055046e00 (size 256): comm "kworker/2:9", pid 2570, jiffies 4294942129 (age 1095.500s) hex dump (first 32 bytes): 00 70 04 55 80 88 ff ff 18 bb 5a 81 ff ff ff ff .p.U......Z..... f5 96 78 81 ff ff ff ff 37 de 8e 81 ff ff ff ff ..x.....7....... backtrace: [<00000000d121dccf>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] [<00000000d121dccf>] slab_post_alloc_hook mm/slab.h:586 [inline] [<00000000d121dccf>] slab_alloc_node mm/slub.c:2786 [inline] [<00000000d121dccf>] slab_alloc mm/slub.c:2794 [inline] [<00000000d121dccf>] kmem_cache_alloc_trace+0x15e/0x2d0 mm/slub.c:2811 [<000000005c3c3381>] kmalloc include/linux/slab.h:555 [inline] [<000000005c3c3381>] usbtest_probe+0x286/0x19d0 drivers/usb/misc/usbtest.c:2790 [<000000001cec6910>] usb_probe_interface+0x2bd/0x870 drivers/usb/core/driver.c:361 [<000000007806c118>] really_probe+0x48d/0x8f0 drivers/base/dd.c:551 [<00000000a3308c3e>] driver_probe_device+0xfc/0x2a0 drivers/base/dd.c:724 [<000000003ef66004>] __device_attach_driver+0x1b6/0x240 drivers/base/dd.c:831 [<00000000eee53e97>] bus_for_each_drv+0x14e/0x1e0 drivers/base/bus.c:431 [<00000000bb0648d0>] __device_attach+0x1f9/0x350 drivers/base/dd.c:897 [<00000000838b324a>] device_initial_probe+0x1a/0x20 drivers/base/dd.c:944 [<0000000030d501c1>] bus_probe_device+0x1e1/0x280 drivers/base/bus.c:491 [<000000005bd7adef>] device_add+0x131d/0x1c40 drivers/base/core.c:2504 [<00000000a0937814>] usb_set_configuration+0xe84/0x1ab0 drivers/usb/core/message.c:2030 [<00000000e3934741>] generic_probe+0x6a/0xe0 drivers/usb/core/generic.c:210 [<0000000098ade0f1>] usb_probe_device+0x90/0xd0 drivers/usb/core/driver.c:266 [<000000007806c118>] really_probe+0x48d/0x8f0 drivers/base/dd.c:551 [<00000000a3308c3e>] driver_probe_device+0xfc/0x2a0 drivers/base/dd.c:724 Acked-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Kyungtae Kim <kt0755@gmail.com> Signed-off-by: Zqiang <qiang.zhang@windriver.com> Link: https://lore.kernel.org/r/20200612035210.20494-1-qiang.zhang@windriver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-18USB: sisusbvga: change char to u8 for sisusb_copy_memoryChangming Liu3-9/+9
sisusb_copy_memory is called in several places. sisusb_copy_memory calls sisusb_write_mem_bulk which is called by sisusb_write and sisusb_send_bulk_msg. change the related parameters from char to u8 accordingly Signed-off-by: Changming Liu <liu.changm@northeastern.edu> Link: https://lore.kernel.org/r/20200530014820.9967-2-liu.changm@northeastern.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-18usb: sisusb_con: Use array_size() helper in memcpy()Gustavo A. R. Silva1-1/+1
Use array_size() helper instead of the open-coded version in memcpy(). These sorts of multiplication factors need to be wrapped in array_size(). This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200615231827.GA21348@embeddedor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-13treewide: replace '---help---' in Kconfig files with 'help'Masahiro Yamada2-4/+4
Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over '---help---'"), the number of '---help---' has been gradually decreasing, but there are still more than 2400 instances. This commit finishes the conversion. While I touched the lines, I also fixed the indentation. There are a variety of indentation styles found. a) 4 spaces + '---help---' b) 7 spaces + '---help---' c) 8 spaces + '---help---' d) 1 space + 1 tab + '---help---' e) 1 tab + '---help---' (correct indentation) f) 1 tab + 1 space + '---help---' g) 1 tab + 2 spaces + '---help---' In order to convert all of them to 1 tab + 'help', I ran the following commend: $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/' Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-27Merge 5.7-rc3 into usb-nextGreg Kroah-Hartman2-17/+17
We need the USB fixes in here too. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-23USB: sisusbvga: Change port variable from signed to unsignedChangming Liu2-17/+17
Change a bunch of arguments of wrapper functions which pass signed integer to an unsigned integer which might cause undefined behaviors when sign integer overflow. Signed-off-by: Changming Liu <liu.changm@northeastern.edu> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/BL0PR06MB45482D71EA822D75A0E60A2EE5D50@BL0PR06MB4548.namprd06.prod.outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-16USB: misc: Use the correct style for SPDX License IdentifierNishad Kamdar4-4/+4
This patch corrects the SPDX License Identifier style in header files related to USB Miscellaneous drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Link: https://lore.kernel.org/r/20200404094638.GA5319@nishad Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-10Merge 5.6-rc5 into usb-nextGreg Kroah-Hartman1-4/+16
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04usb: usb251xb: fix regulator probe and error handlingMarco Felsch1-4/+16
Commit 4d7201cda226 ("usb: usb251xb: add vdd supply support") didn't covered the non-DT use-case and so the regualtor_enable() call during probe will fail on those platforms. Also the commit didn't handled the error case correctly. Move devm_regulator_get() out of usb251xb_get_ofdata() to address the 1st issue. This can be done without worries because devm_regulator_get() handles the non-DT use-case too. Add devm_add_action_or_reset() to address the 2nd bug. Fixes: 4d7201cda226 ("usb: usb251xb: add vdd supply support") Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Cc: stable <stable@vger.kernel.org> Acked-by: Richard Leitner <richard.leitner@skidata.com> Link: https://lore.kernel.org/r/20200226072644.18490-1-m.felsch@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-24Merge 5.6-rc3 into usb-nextGreg Kroah-Hartman1-2/+29
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-17USB: misc: iowarrior: add support for the 100 deviceGreg Kroah-Hartman1-2/+7
Add a new device id for the 100 devie. It has 4 interfaces like the 28 and 28L devices but a larger endpoint so more I/O pins. Cc: Christoph Jung <jung@codemercs.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20200214161148.GA3963518@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-13USB: apple-mfi-fastcharge: fix endianess issue in probeOliver Neukum1-3/+3
The product ID is little endian and needs to be converted. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Oliver Neukum <oneukum@suse.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20200213111336.32392-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-12USB: Add driver to control USB fast charge for iOS devicesBastien Nocera3-0/+248
iOS devices will not draw more than 500mA unless instructed to do so. Setting the charge type power supply property to "fast" tells the device to start drawing more power, using the same procedure that official "MFi" chargers would. Signed-off-by: Bastien Nocera <hadess@hadess.net> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20191016093933.693-7-hadess@hadess.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-12USB: misc: iowarrior: add support for the 28 and 28L devicesGreg Kroah-Hartman1-2/+13
Add new device ids for the 28 and 28L devices. These have 4 interfaces instead of 2, but the driver binds the same, so the driver changes are minimal. Cc: Christoph Jung <jung@codemercs.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200212040422.2991-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-12USB: misc: iowarrior: add support for 2 OEMed devicesGreg Kroah-Hartman1-2/+13
Add support for two OEM devices that are identical to existing IO-Warrior devices, except for the USB device id. Cc: Christoph Jung <jung@codemercs.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200212040422.2991-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-30usb: usb3503: Convert to use GPIO descriptorsLinus Walleij1-59/+35
This converts the USB3503 to pick GPIO descriptors from the device tree instead of iteratively picking out GPIO number references and then referencing these from the global GPIO numberspace. The USB3503 is only used from device tree among the in-tree platforms. If board files would still desire to use it they can provide machine descriptor tables. Make sure to preserve semantics such as the reset delay introduced by Stefan. Cc: Chunfeng Yun <chunfeng.yun@mediatek.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Stefan Agner <stefan@agner.ch> Cc: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> [mszyprow: invert the logic behind reset GPIO line] Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20191211145226.25074-1-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10USB: adutux: fix interface sanity checkJohan Hovold1-1/+1
Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 03270634e242 ("USB: Add ADU support for Ontrak ADU devices") Cc: stable <stable@vger.kernel.org> # 2.6.19 Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20191210112601.3561-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10USB: idmouse: fix interface sanity checksJohan Hovold1-1/+1
Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20191210112601.3561-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-21usb: misc: Fix Kconfig indentationKrzysztof Kozlowski1-9/+9
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20191121132901.29186-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>