- 28 8月, 2013 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
Convert all USB gadget sysfs attributes to use the _RO or _RW variants, to make them easier to audit and ensure that the permissions are correct. Note, two are left using the DEVICE_ATTR() macro, as there is no DEVICE_ATTR_WO() in Linus's tree, that will happen after 3.12-rc1 is out, a follow-on patch will be sent then. Reviewed-by: NFelipe Balbi <balbi@ti.com> Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> -- drivers/usb/gadget/composite.c | 8 +++----- drivers/usb/gadget/dummy_hcd.c | 8 ++++---- drivers/usb/gadget/f_mass_storage.c | 14 ++++++-------- drivers/usb/gadget/net2272.c | 4 ++-- drivers/usb/gadget/net2280.c | 18 +++++++++--------- drivers/usb/gadget/storage_common.c | 25 ++++++++++++------------- drivers/usb/gadget/udc-core.c | 14 +++++++------- 7 files changed, 43 insertions(+), 48 deletions(-)
-
- 20 8月, 2013 1 次提交
-
-
由 Philippe De Swert 提交于
The documentation for the USB gadget fs is actually in Documentation/usb/gadget_configfs.txt. Signed-off-by: NPhilippe De Swert <philippe.deswert@jollamobile.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 8月, 2013 6 次提交
-
-
由 Laurent Pinchart 提交于
The conversion to videobuf2 failed to check the return value of vb2_qbuf(). Fix it. Cc: stable@vger.kernel.org Reported-by: NMichael Grzeschik <mgr@pengutronix.de> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-By: NMichael Grzeschik <mgr@pengutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Jingoo Han 提交于
control_selector_init() is used only in this file. audio_bind_config() is used only in audio.c file to which f_uac1.c is included. Thus, these functions are staticized to fix the following warnings. drivers/usb/gadget/f_uac1.c:698:12: warning: symbol 'control_selector_init' was not declared. Should it be static? drivers/usb/gadget/f_uac1.c:722:12: warning: symbol 'audio_bind_config' was not declared. Should it be static? Acked-by: NJassi Brar <jaswinder.singh@linaro.org> Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Jingoo Han 提交于
Added __user annotation to fix the following sparse warning. drivers/usb/gadget/u_uac1.c:194:52: warning: incorrect type in argument 2 (different address spaces) drivers/usb/gadget/u_uac1.c:194:52: expected void const [noderef] <asn:1>*buf drivers/usb/gadget/u_uac1.c:194:52: got void *buf Acked-by: NJassi Brar <jaswinder.singh@linaro.org> Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Jingoo Han 提交于
rndis_init() and rndis_exit() are used only in this file. Fix the following sparse warnings: drivers/usb/gadget/rndis.c:1145:5: warning: symbol 'rndis_init' was not declared. Should it be static? drivers/usb/gadget/rndis.c:1179:6: warning: symbol 'rndis_exit' was not declared. Should it be static? Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Jingoo Han 提交于
The local variables such as 'filename', 'vendor_name', and 'product_name' are pointers; thus, use NULL instead of 0 to fix the following sparse warnings drivers/usb/gadget/f_mass_storage.c:3046:27: warning: Using plain integer as NULL pointer drivers/usb/gadget/f_mass_storage.c:3050:28: warning: Using plain integer as NULL pointer drivers/usb/gadget/f_mass_storage.c:3051:29: warning: Using plain integer as NULL pointer Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Alexey Khoroshilov 提交于
As far as prep_dma() is called with spinlock held, we have to pass GFP_ATOMIC regardless of gfp argument. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 02 8月, 2013 4 次提交
-
-
由 Boris BREZILLON 提交于
The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to 48Mhz. This configuration was formely done in mach-at91/clock.c, but this implementation will be removed when moving to common clk framework. This patch adds support for usb clock retrieval and configuration, and is backward compatible with the current at91 clk implementation (if usb clk is not found, it does not configure/enable it). Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Boris BREZILLON 提交于
This patch adds missing clk_put on fclk and iclk in case the probe function fails after these clocks have been retrieved. Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Jingoo Han 提交于
fusb300_rdcxf() used only in this file. Fix the following sparse warning: drivers/usb/gadget/fusb300_udc.c:560:6: warning: symbol 'fusb300_rdcxf' was not declared. Should it be static? Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Jingoo Han 提交于
'req' is a pointer; thus, use NULL instead of 0 to fix the following sparse warning: drivers/usb/gadget/goku_udc.c:775:13: warning: Using plain integer as NULL pointer Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 30 7月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 29 7月, 2013 8 次提交
-
-
由 Rong Wang 提交于
The name of udc state attribute file under sysfs is registered as "state", while usb_gadget_set_state take it as "status" when it's going to update. This patch fixes the typo. Signed-off-by: NRong Wang <Rong.Wang@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Cc: <stable@kernel.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
The compatibility layer which the USBF_PHONET_INCLUDED was a part of is no longer present - the USBF_PHONET_INCLUDED is not #defined by anyone anymore, so the ifndef is always true. Removing it. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Introduced by commit 59835a (usb: gadget: multi: use function framework for ACM.) Make rndis_do_config() consistent with cdc_do_config() in the way it handles returning the PTR_ERR(f_acm_*). Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Boris BREZILLON 提交于
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Roger Quadros 提交于
Convert PHY Drivers from menuconfig to menu so that the PHY drivers can be explicitely selected by the controller drivers. USB_PHY is no longer a user visible option. It is upto to the PHY drivers to select it if needed. This patch does so for the existing PHY drivers that use the USB_PHY library. Doing so moves the USB_PHY and PHY driver selection problem from the end user to the PHY and controller driver developer. e.g. Earlier, a controller driver (e.g. EHCI_OMAP) that needs to select a PHY driver (e.g. NOP_PHY) couldn't do so because the PHY driver depended on USB_PHY. Making the controller driver depend on USB_PHY has a negative effect i.e. it becomes invisible to the user till USB_PHY is enabled. Most end users will not familiar with this. With this patch, the end user just needs to select the controller driver needed for his/her platform without worrying about which PHY driver to select. Also update USB_EHCI_MSM, USB_LPC32XX and USB_OMAP to not depend on USB_PHY any more. They can safely select the necessary PHY drivers. [ balbi@ti.com : refreshed on top of my next branch. Changed bool followed by default n into def_bool n ] CC: Pavankumar Kondeti <pkondeti@codeaurora.org> Acked-by: NRoland Stigge <stigge@antcom.de> Signed-off-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
usb_gadget_set_state() will call sysfs_notify() which might sleep. Some users might want to call usb_gadget_set_state() from the very IRQ handler which actually changes the gadget state. Instead of having every UDC driver add their own workqueue for such a simple notification, we're adding it generically to our struct usb_gadget, so the details are hidden from all UDC drivers. Acked-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Tomasz Figa 提交于
This patch adds OF match table to the driver to allow instantiating it using device tree. Signed-off-by: NTomasz Figa <t.figa@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
That driver hasn't been really maintained for a long time. It doesn't compile in any way, it includes non-existent headers, has no users, and is just plain broken. The person who used to work with that driver has publicly stated that he has no plans to touch that driver again and is ok with removal[1]. Due to these factors, imx_udc is now removed from the tree, if someone really believe it needs to be kept, please fix the bugs in that driver. [1] http://marc.info/?l=linux-usb&m=136197620417636&w=2Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 26 7月, 2013 3 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
Fix memory leaks introduced in commits: 40d133d7 usb: gadget: f_ncm: convert to new function interface with backward compatibility fee562a6 usb: gadget: f_ecm: convert to new function interface with backward compatibility fcbdf12e usb: gadget: f_phonet: convert to new function interface with backward compatibility b29002a1 usb: gadget: f_eem: convert to new function interface with backward compatibility 8cedba7c usb: gadget: f_subset: convert to new function interface with backward compatibility f466c635 usb: gadget: f_rndis: convert to new function interface with backward compatibility Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andrzej Pietrasiewicz 提交于
Fix memory leaks introduced in commits: 40d133d7 usb: gadget: f_ncm: convert to new function interface with backward compatibility fee562a6 usb: gadget: f_ecm: convert to new function interface with backward compatibility fcbdf12e usb: gadget: f_phonet: convert to new function interface with backward compatibility b29002a1 usb: gadget: f_eem: convert to new function interface with backward compatibility 8cedba7c usb: gadget: f_subset: convert to new function interface with backward compatibility f466c635 usb: gadget: f_rndis: convert to new function interface with backward compatibility Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Fix bugs introduced in 9c62ce83 usb: gadget: ether: convert to new interface of f_ecm 94b5573e usb: gadget: ether: convert to new interface of f_eem 8af5232d usb: gadget: ether: convert to new interface of f_subset 9bd4a10e usb: gadget: ether: convert to new interface of f_rndis Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 24 7月, 2013 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
This endif is for CONFIG_USB_GADGET_DEBUG_FILES, not CONFIG_USB_DEBUG, so document it properly. Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 7月, 2013 9 次提交
-
-
由 Alan Stern 提交于
When CONFIG_HAS_DMA isn't enabled, the UDC core gets build errors: drivers/built-in.o: In function `dma_set_coherent_mask': include/linux/dma-mapping.h:93: undefined reference to `dma_supported' include/linux/dma-mapping.h:93: undefined reference to `dma_supported' drivers/built-in.o: In function `usb_gadget_unmap_request': drivers/usb/gadget/udc-core.c:91: undefined reference to `dma_unmap_sg' drivers/usb/gadget/udc-core.c:96: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `usb_gadget_map_request': drivers/usb/gadget/udc-core.c:62: undefined reference to `dma_map_sg' drivers/usb/gadget/udc-core.c:71: undefined reference to `dma_map_single' drivers/usb/gadget/udc-core.c:74: undefined reference to `dma_mapping_error' Prevent this by protecting the DMA API routines with preprocessor tests. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> CC: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Geert Uytterhoeven 提交于
If NO_DMA=y: drivers/built-in.o: In function `mv_u3d_done': drivers/usb/gadget/mv_u3d_core.c:206: undefined reference to `dma_pool_free' drivers/usb/gadget/mv_u3d_core.c:209: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `mv_u3d_build_trb_one': drivers/usb/gadget/mv_u3d_core.c:311: undefined reference to `dma_pool_alloc' drivers/built-in.o: In function `mv_u3d_req_to_trb': drivers/usb/gadget/mv_u3d_core.c:480: undefined reference to `dma_map_single' drivers/built-in.o: In function `mv_u3d_remove': drivers/usb/gadget/mv_u3d_core.c:1770: undefined reference to `dma_pool_destroy' drivers/usb/gadget/mv_u3d_core.c:1773: undefined reference to `dma_free_coherent' drivers/built-in.o: In function `mv_u3d_probe': drivers/usb/gadget/mv_u3d_core.c:1880: undefined reference to `dma_alloc_coherent' drivers/usb/gadget/mv_u3d_core.c:1890: undefined reference to `dma_pool_create' drivers/usb/gadget/mv_u3d_core.c:1984: undefined reference to `dma_pool_destroy' drivers/usb/gadget/mv_u3d_core.c:1986: undefined reference to `dma_free_coherent' Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Geert Uytterhoeven 提交于
If NO_DMA=y: drivers/built-in.o: In function `fotg210_start_dma': drivers/usb/gadget/fotg210-udc.c:354: undefined reference to `dma_map_single' drivers/usb/gadget/fotg210-udc.c:357: undefined reference to `dma_mapping_error' drivers/usb/gadget/fotg210-udc.c:362: undefined reference to `dma_sync_single_for_cpu' drivers/usb/gadget/fotg210-udc.c:376: undefined reference to `dma_unmap_single' Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Geert Uytterhoeven 提交于
If NO_DMA=y: drivers/built-in.o: In function `done': drivers/usb/gadget/mv_udc_core.c:239: undefined reference to `dma_pool_free' drivers/built-in.o: In function `build_dtd': drivers/usb/gadget/mv_udc_core.c:371: undefined reference to `dma_pool_alloc' drivers/built-in.o: In function `udc_prime_status': drivers/usb/gadget/mv_udc_core.c:1465: undefined reference to `dma_map_single' drivers/built-in.o: In function `mv_udc_remove': drivers/usb/gadget/mv_udc_core.c:2087: undefined reference to `dma_pool_destroy' drivers/usb/gadget/mv_udc_core.c:2090: undefined reference to `dma_free_coherent' drivers/built-in.o: In function `mv_udc_probe': drivers/usb/gadget/mv_udc_core.c:2190: undefined reference to `dma_alloc_coherent' drivers/usb/gadget/mv_udc_core.c:2201: undefined reference to `dma_pool_create' drivers/usb/gadget/mv_udc_core.c:2315: undefined reference to `dma_pool_destroy' drivers/usb/gadget/mv_udc_core.c:2317: undefined reference to `dma_free_coherent' Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
USB_CONFIGFS_RNDIS depends on USB_U_RNDIS. Select it. Acked-by: NMichal Nazarewicz <mina86@mina86.com> Reported-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Wei Yongjun 提交于
free_irq() expects the same device identity that was passed to corresponding request_irq(), otherwise the IRQ is not freed. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Boris BREZILLON 提交于
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Yuan-Hsin Chen 提交于
Remove __init and __exit from probe() and remove() and would also fix the section mismatch issue. Signed-off-by: NYuan-Hsin Chen <yhchen@faraday-tech.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Arnd Bergmann 提交于
This avoids a build error in at91sam9261_9g10_defconfig: drivers/usb/gadget/at91_udc.c: In function 'at91udc_probe': drivers/usb/gadget/at91_udc.c:1685:34: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized] board->vbus_active_low = (flags & OF_GPIO_ACTIVE_LOW) ? 1 : 0; ^ drivers/usb/gadget/at91_udc.c:1678:21: note: 'flags' was declared here enum of_gpio_flags flags; ^ Making the call to at91udc_of_init conditinal also reduces the object code size without sacrificing build coverage. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Cc: Felipe Balbi <balbi@ti.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 08 7月, 2013 1 次提交
-
-
由 Joern Engel 提交于
The return value wasn't checked by any of the callers. Assuming this is correct behaviour, we can simplify some code by not bothering to generate it. nab: Add srpt_queue_data_in() + srpt_queue_tm_rsp() nops around srpt_queue_response() void return Signed-off-by: NJoern Engel <joern@logfs.org> Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
-
- 21 6月, 2013 1 次提交
-
-
由 Hans Verkuil 提交于
This driver did not yet support struct v4l2_device, so add it. This make it possible to replace the deprecated parent field with the v4l2_dev field, allowing the eventual removal of the parent field. Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 19 6月, 2013 3 次提交
-
-
由 Wei Yongjun 提交于
Add the missing unlock before return from function geth_alloc() in the error handling case. Introduced by commit 02832e56. (usb: gadget: f_subset: add configfs support) Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Wei Yongjun 提交于
Add the missing unlock before return from function ncm_alloc() in the error handling case. Introduced by commit e7306603. (usb: gadget: f_ncm: add configfs support) Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Wei Yongjun 提交于
Add the missing unlock before return from function ecm_alloc() in the error handling case. Introduced by commit da92801c. (usb: gadget: f_ecm: add configfs support) Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 18 6月, 2013 1 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
USB_CONFGFS_ZZZZ should appear under a tristate option in order to allow selecting more than one function without building the legacy gadgets. Now there are two problems: 1) they can't be selected at all, because they depend on USB_CONFIGFS, and the patch which adds USB_CONFIGFS has not been merged. 2) they don't select USB_LIBCOMPOSITE (which they need but which is selected by USB_CONFIGFS) Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-