Commit Graph

20 Commits

Author SHA1 Message Date
Ebru Akagunduz
77d966f4b0 staging: emxx_udc: Use min_t instead of min
Use min_t instead of min function in emxx_udc.c

Fix checkpatch.pl warnings:
WARNING: min() should probably be min_t(u32, iBufSize, ep->ep.maxpacket)
WARNING: min() should probably be min_t(u32, data_size, ep->ep.maxpacket)
WARNING: min() should probably be min_t(u16, udc->ctrl.wLength, sizeof(status_data))

Changes in v2:
 - Fixed min function call as min_t

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 13:51:03 -07:00
Ebru Akagunduz
fb71d24bdc staging: emxx_udc: Fix replace printk(KERN_DEBUG ..) with dev_dbg
This patch fixes "Prefer [subsystem eg: netdev]_dbg([subsystem]dev,
... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG"
checkpatch.pl warning in emxx_udc.c

Changes in v2:
 - Fixed dev_debug function call as dev_dbg

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 13:51:03 -07:00
Gulsah Kose
924c6ee1b2 staging: emxx_udc: Fixed else is not usefull warning.
This patch fixes "else is not generally useful after a break or return"
checkpatch.pl warning in emxx_udc.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:06:43 -04:00
Roberta Dobrescu
666e9084c0 staging: emxx_udc: Do not assign bool to 0/1
This fixes the following coccinelle warning:
WARNING: Assignment of bool to 0/1

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:27:58 -07:00
Roberta Dobrescu
5cbca95706 staging: emxx_udc: Do not use comparisons on bool tests
This fixes the following coccinelle warning:
WARNING: Comparison of bool to 0/1

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:27:58 -07:00
Roberta Dobrescu
1ff99b312f staging: emxx_udc: Replace __constant_cpu_to_le16 with cpu_to_le16
This fixes the following checkpatch.pl warning:
WARNING: __constant_cpu_to_le16 should be cpu_to_le16
Additionally, it removes the space between function name and (.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:48:06 -07:00
Vincenzo Scotti
5b1ebbffc0 staging: emxx_udc: fix compile warnings: discarding const qualifier
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:10:40 -07:00
Masanari Iida
f02935c575 staging: exxx_udc: Convert pr_warning to pr_warn
This patch Convert pr_warning to pr_warn.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:08:10 -07:00
Vincenzo Scotti
1fe473b3a2 staging: emxx_udc: fix style warnings: const strings should be const char
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:55:55 -07:00
Vincenzo Scotti
9af928157c staging: emxx_udc: fix style warnings: return in void functions
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:55:55 -07:00
Vincenzo Scotti
7f39ae05ad staging: emxx_udc: fix style warnings: blank line after declarations
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:55:55 -07:00
Paul Bolle
5e5d744364 staging: emxx_udc: remove check for CONFIG_MACH_EMGR
There's a check for CONFIG_MACH_EMGR. But the Kconfig symbol MACH_EMGR
doesn't exist. Remove that check and the single #define it hides. Note
that this macro isn't used by this driver anyway.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08 13:48:01 -07:00
Andrew Plummer
ce1e3eb723 Staging: emxx_udc: emxx_udc: remove spaces before semicolons
Remove spaces before semicolons to remove checkpatch warnings.

Signed-off-by: Andrew Plummer <plummer574@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 14:07:38 -07:00
KANG Yuxuan
a2c14e9712 staging: emxx_udc: Fix coding style errors
Only fixing errors reported by checkpatch.pl, based on the following
rules:
1. '*' should be adjacent to the data name or function name.
2. Don't use C99-style "// ..." comments.

Signed-off-by: KANG Yuxuan <stonekyx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 21:55:29 -07:00
Sachin Kamat
6de2a1a7b9 staging: emxx_udc: Fix build error
‘strict_strtol’ is deprecated. Use kstrtol instead. Fixes the following
build error:
drivers/staging/emxx_udc/emxx_udc.c:3288:3: error: implicit declaration of function ‘strict_strtol’

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:49:15 -07:00
Sachin Kamat
464cad2c50 staging: emxx_udc: Use module_platform_driver
module_platform_driver removes some boiler plate and makes
code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:59:02 -04:00
Sachin Kamat
a790ebc1f0 staging: emxx_udc: Fix build error
devm_request_and_ioremap has been removed since commit c9d53c0f2d
("devres: remove devm_request_and_ioremap()") Use devm_ioremap_resource
instead. While at it, also remove redundant error message as it is now
handled by devm_ioremap_resource. Without this patch we get the following
build error:
drivers/staging/emxx_udc/emxx_udc.c:3370:2: error: implicit declaration of function ‘devm_request_and_ioremap’ [-Werror=implicit-function-declaration]

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:59:02 -04:00
Magnus Damm
8a62956efd staging: emxx_udc: Add TODO file
Add a TODO file for emxx_udc to show what is left to do.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 14:42:48 -07:00
Magnus Damm
96b29cacc7 staging: emxx_udc: I/O memory and IRQ resource support
Adjust the emxx_udc driver to make use of the standard
driver model to pass I/O memory and IRQ as resources
instead of hard coding those things in the driver.

Needs more work - the VBUS signal is yet not handled.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 14:42:48 -07:00
Magnus Damm
33aa8d45a4 staging: emxx_udc: Add Emma Mobile USB Gadget driver
Add the emxx_udc driver to staging based on an old linux-2.6.35.7
android tree. The driver has been brushed up slightly to complile
but it is still in great need of cleanup.

At this point DT bindings are clearly lacking and I doubt that the
driver even can run with multiple instances (global variables, hurray!).

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 14:42:17 -07:00