summaryrefslogtreecommitdiff
path: root/drivers/staging/emxx_udc
AgeCommit message (Collapse)Author
2017-05-15staging: emxx_udc: Update "reserved" registers nameAlexis Lothoré
Ensure that "Reserved" members of registers mapping structure do not mix upper/lower case Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: emxx_udc: Break long linesAlexis Lothoré
Make sure to break long lines to 80 Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: emxx_udc: Update function parameters nameAlexis Lothoré
Ensure that function parameters use snake_case (some mixed upper/lower case) Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: emxx_udc: Update local variable namesAlexis Lothoré
Ensure that any any local variable use snake_case (many mixed upper/lower case) Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: emxx_udc: Update function namesAlexis Lothoré
Ensure that function names does not mix upper/lower case Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: emxx_udc: Balance "else" parenthesisAlexis Lothoré
Add missing parenthesis for else statement Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: emxx_udc: Update EPn variables nameAlexis Lothoré
Update EPn* variables names to EPN* to prevent CamelCase usage Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: emxx_udc: Add comment for spinlock_t definition.Varsha Rao
Members of nbu2ss_udc structure can change device state, maintain completion state and control driver. Also provide access to read and write to register. Hence, exclusive access to nbu2ss_udc is required. The lock variable of type spinlock_t guarantees the exclusive access and protects it. In this patch, comment is added for spinlock_t definition, to fix the following checkpatch issue: CHECK: spinlock_t definition without comment Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: emxx_udc: Fix CamelCase variable nameAfonso Bordado
Changes from CamelCase to a kernel format Signed-off-by: Afonso Bordado <afonsobordado@az8.co> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: emxx_udc: Remove unecessary temporary variableAfonso Bordado
This improves code readability. Signed-off-by: Afonso Bordado <afonsobordado@az8.co> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: emxx_udc: Rename CamelCase variableAfonso Bordado
The new name complies with the kernel styling guidelines and is more descriptive. Signed-off-by: Afonso Bordado <afonsobordado@az8.co> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: emxx_udc: Fix CamelCase function nameAfonso Bordado
Change EP0_out_PIO to use the kernel convention. Signed-off-by: Afonso Bordado <afonsobordado@az8.co> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: emxx_udc: remove incorrect __init annotationsArnd Bergmann
The probe function is not marked __init, but some other functions are. This leads to a warning on older compilers (e.g. gcc-4.3), and can cause executing freed memory when built with those compilers: WARNING: drivers/staging/emxx_udc/emxx_udc.o(.text+0x2d78): Section mismatch in reference from the function nbu2ss_drv_probe() to the function .init.text:nbu2ss_drv_contest_init() This removes the annotations. Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23staging: emxx_udc: emxx_udc.c Align parenthesisWalt Feasel
Make suggested checkpatch modification for CHECK: Alignment should match open parenthesis Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23staging: emxx_udc: emxx_udc.c Spaces preferred around operatorsWalt Feasel
Make suggested checkpatch modification for CHECK: spaces preferred around that '|' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23staging: emxx_udc: emxx_udc.c {} Single statement blocksWalt Feasel
Make suggested checkpatch modification for WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23staging: emxx_udc: emxx_udc.c Logical continuationWalt Feasel
Make suggested checkpatch modification for CHECK: Logical continuations should be on the previous line Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23staging: emxx_udc: emxx_udc.c Blank lines after {Walt Feasel
Make suggested checkpatch modification for CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07Staging:emxx_udc:emxx_udc: Compression of lines for immediate returnNadim Almas
This patch compresses two lines into a single line if immediate return statement is found. Remove variable data as it is no longer needed. It is done using script Coccinelle. And coccinelle uses the following semantic patch for this compression function @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Nadim Almas <nadim.902@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16Staging: emxx_udc: constify usb_ep_ops structureBhumika Goyal
Declare the structure usb_ep_ops as constant as it is only stored in the ops field of a usb_ep structure which is a field of a nbu2ss_ep structure. The ops field is of type const struct usb_ep_ops *, so usb_ep_ops structures having this property can be decalared as const. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct usb_ep_ops i@p = {...}; @ok1@ identifier r1.i; position p; struct nbu2ss_ep s; @@ s.ep.ops=&i@p @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct usb_ep_ops i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct usb_ep_ops i; File size before: text data bss dec hex filename 16007 376 3720 20103 4e87 drivers/staging/emxx_udc/emxx_udc.o File size after: text data bss dec hex filename 16095 280 3720 20095 4e7f drivers/staging/emxx_udc/emxx_udc.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16Staging: emxx_udc: Remove useless type conversionBhumika Goyal
Some type conversions like casting a pointer to a pointer of same type, casting to the original type using addressof(&) operator etc. are not needed. Therefore, remove them. Done using coccinelle: @@ type t; t *p; t a; @@ ( - (t)(a) + a | - (t *)(p) + p | - (t *)(&a) + &a ) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: emxx_udc: add braces to if-else blockGargi Sharma
add braces to if/else clause to fix the checkpatch issue braces {} should be used on all arms of if/else block. Does not affect flow because only single statement inside if/else block. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: emxx_udc: Fix unsigned int to bare use of unsignedAnchal Jain
This is a patch to fixes up a WARNING: Prefer 'unsigned int' to bare use of 'unsigned' found by the checkpatch.pl tool Signed-off-by: Anchal Jain <anchalj109@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: emxx_udc: Remove unnecessary blank lineRehas Sachdeva
This patch fixes the checkpatch.pl warning: Blank lines aren't necessary before a close brace '}' Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01staging: emxx_udc: Fix checkpatch warningAnson Jacob
Fix checkpatch.pl warning Block comments use * on subsequent lines Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-07-26staging: emxx_udc: allow modular buildArnd Bergmann
A change to the usb gadget core allowed certain API functions to be part of a loadable module, which breaks having emxx_udc built-in: drivers/staging/built-in.o: In function `nbu2ss_drv_probe': (.text+0x2428): undefined reference to `usb_ep_set_maxpacket_limit' The original patch already fixed tons of other cases that have the added dependency but apparently missed this one that now appears in an ARM allmodconfig build. This patch makes the symbol "tristate", which lets the Kconfig dependency tracking handle it correctly. To make the module actually usable, I also revert 0af61e66ee16 ("drivers/staging: make emxx_udc.c explicitly non-modular"), which Paul Gortmaker added after noticing that the Kconfig symbol was 'bool'. Compared to the original version however, I leave out the '__exit' annotation on the remove callback, as Paul pointed out that this was incorrect. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core") Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09Staging: emxx_udc: emxx_udc: fixed coding style issueShyam Saini
fixed checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Shyam Saini <mayhs11saini@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28Staging: emxx_udc: emxx_udc: Add space around operator.Sandhya Bankar
Add space around operator.This patch is found by checkpatch.pl script. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28Staging: emxx_udc: Add space around '-'Dilek Uzulmez
Add space around operator '-'. Problem found using checkpatch.pl CHECK: spaces preferred around that '-' (ctx:VxV) Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: emxx_udc: Return NULL instead of 0.Sandhya Bankar
Return NULL instead of 0 from nbu2ss_ep_alloc_request(),if req pointer is NULL. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: emxx_udc: Remove header fileAmitoj Kaur Chawla
Remove duplicate include file. Found using includecheck. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: emxx_udc: Remove parentheses around the right hand side of assignmentJanani Ravichandran
Remove parentheses around the right hand side of assignments as they are not needed. Semantic patch used: @@ expression a, b, c; @@ ( a = (b == c) | a = - ( b - ) ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: emxx_udc: Alligned to match '('Anjali Menon
Allignment matched to the open parenthesis to avoid the check detected by the checkpatch.pl. CHECK: Alignment should match open parenthesis Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21staging: emxx_udc: use list_first_entry_or_null()Geliang Tang
Simplify the code with list_first_entry_or_null(). Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21staging/emxx_udc: fix 64-bit warningsArnd Bergmann
ARCH_SHMOBILE is coming to arm64, which creates new warnings in allmodconfig: drivers/staging/emxx_udc/emxx_udc.c: In function '_nbu2ss_out_dma': drivers/staging/emxx_udc/emxx_udc.c:843:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] _nbu2ss_writel(&preg->EP_DCR[num].EP_TADR, (u32)pBuffer); This is clearly a mistake from confusing a dma_addr_t with a pointer, so the fix is to use the correct types in two places. The third warning of this kind is a check for an unaligned pointer, which should be done by casting the pointer to uintptr_t, not int. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: emxx_udc: Add space around operator.Navya Sri Nizamkari
Add a space around '>>' operator. Problem found using checkpatch. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Reviewed-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: emxx_udc: Remove boolean comparisonsLuis de Bethencourt
Boolean tests do not need explicit comparison to true or false. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12drivers/staging: make emxx_udc.c explicitly non-modularPaul Gortmaker
The Kconfig currently controlling compilation of this code is: drivers/staging/emxx_udc/Kconfig:config USB_EMXX drivers/staging/emxx_udc/Kconfig: bool "EMXX USB Function Device Controller" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. The .remove function was declared __exit, so it wouldn't have been available for a sysfs bind/unbind anyway, so lets be explicit here and use ".suppress_bind_attrs = true" to prevent root from doing something silly. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Vincenzo Scotti <vinc94@gmail.com> Cc: Haneen Mohammed <hamohammed.sa@gmail.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Roberta Dobrescu <roberta.dobrescu@gmail.com> Cc: Tapasweni Pathak <tapaswenipathak@gmail.com> Cc: Peter Chen <peter.chen@freescale.com> Cc: Robert Baldyga <r.baldyga@samsung.com> Cc: Chris Rorvick <chris@rorvick.com> Cc: "Gujulan Elango, Hari Prasath (H.)" <hgujulan@visteon.com> Cc: devel@driverdev.osuosl.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30staging:emxx_udc: Fixed comparison style warningsCristina Moraru
Fixed 'Comparisons should place the constant on the right side of the test' Warnings Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Remove unused parameter from function parameter list ↵Ravi Teja Darbha
parameter list struct nbu2ss_ep *ep parameter in functions _nbu2ss_ep0_in_transfer() and _nbu2ss_ep0_out_transfer() is not used anywhere inside. Hence, removed. Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Remove cleanup1 labelRavi Teja Darbha
The cleanup1 label does nothing but return. Better way is to return immediately instead of using goto. Hence, removed. Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Fix NULL comparison styleRavi Teja Darbha
Fixed NULL comparison style as suggested by checkpatch.pl Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Avoid using multiple blank linesRavi Teja Darbha
Fixed multiple blank lines warning by checkpatch.pl Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Remove FSF mailing addressRavi Teja Darbha
FSF mailing address is no longer required to be specified. Hence removed. Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-04staging: emxx_udc: add ep capabilities supportRobert Baldyga
Convert endpoint configuration to new capabilities model. Fixed typo in "epc-nulk" to "epc-bulk". Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-07-31staging: emxx_udc: add missing usb_ep_set_maxpacket_limit()Robert Baldyga
Since maxpacket_limit was introduced all UDC drivers should use usb_ep_set_maxpacket_limit() function instead of setting maxpacket value manually. ep.maxpacket_limit contains actual maximum maxpacket value supported by hardware which is needed by epautoconf. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-06-15staging: emxx_udc: remove commented codeHari Prasath Gujulan Elango
This patch removes commented code warned by checkpatch.pl Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08staging: emxx_udc: remove commented codeMadhusudhanan Ravindran
removed the commented INFO lines. Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08Staging: fixed multiple spelling errors.Carlos E. Garcia
Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-30staging: emxx_udc: Remove dead codeGujulan Elango, Hari Prasath (H.)
This patch removes few lines of commented code. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>