Граф коммитов

32 Коммитов

Автор SHA1 Сообщение Дата
Jan Kara f4ee2ccb6f ced1401: Convert driver to use get_user_pages_fast()
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-05 17:52:58 -07:00
Sachin Kamat 631ae9054d Staging: ced1401: Staticize local symbols
Symbols referenced only in this file are made static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:31:39 -07:00
Sachin Kamat 6e3fe5dcd7 Staging: ced1401: Use NULL instead of 0 for pointers
Use NULL instead of 0 for pointer variables.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:31:39 -07:00
Elena Ufimtseva 2b52d1e348 Staging: ced1401: Patch removes unused typedefs.
Patch removes unused typedefs BOOLEAN, *LPCSTR, *LPCSTR, UCHAR, *LPBYTE.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:34:22 -07:00
Elena Ufimtseva 8c79caa82a Staging: ced1401: Patch removes typedef unsigned int DWORD.
Patch removes usage of typedef unsigned int DWORD.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:34:22 -07:00
Elena Ufimtseva 4e0825fd81 Staging: ced1401: Patch removes typedef unsigned short WORD.
Patch removes the use of typedef unsigned short WORD.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:33:16 -07:00
Elena Ufimtseva c33033dbe0 Staging: ced1401: Patch fixes missing parentheses in macro definitions.
Patch fixes missing parentheses in macro definitions.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15 23:52:56 -04:00
Elena Ufimtseva 95d8ee5403 Staging: ced1401: Fixes trailing whitespace checkpath warning.
Fixes trailing whitespace checkpath warning.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15 13:16:22 -04:00
Elena Ufimtseva e035b590a6 Staging: ced1401: Fixes 'open brace should be on the previous line'.
Fixes checkpatch warnings 'open brace should be on the previous line'.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15 13:16:22 -04:00
Elena Ufimtseva d9f8374ba0 Staging: ced1401: Fixes white spaces and indentations.
Fixes white spaces and indentations warnings from checkpatch.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15 13:16:21 -04:00
Elena Ufimtseva d1cc1b861e Staging: ced1401: Fixes C pointer format warnings
Fixes checkpatch warnings about C pointer format.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15 13:16:21 -04:00
Elena Ufimtseva e4837704c5 Staging: ced1401: Fixes C99 // comments.
Patch fixes checkpatch warnings about C99 // comments.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15 13:16:21 -04:00
Elena Ufimtseva 8a938c927c staging: ced1401: Fixes checkpatch warnings about pointer format
Fixes checkpatch warnings about pointer format.

Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 05:49:32 -07:00
Joe Perches 78110bb8dc staging: Remove unnecessary OOM messages
alloc failures already get standardized OOM
messages and a dump_stack.

For the affected mallocs around these OOM messages:

Converted kzallocs with multiplies to kcalloc.
Converted kmallocs with multiplies to kmalloc_array.
Converted a kmalloc/strlen/strncpy to kstrdup.
Moved a spin_lock below a removed OOM message and
removed a now unnecessary spin_unlock.
Neatened alignment and whitespace.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-11 10:10:33 -08:00
Alexey Khoroshilov 955e7da82d staging: ced1401: fix GFP_KERNEL in spinlock context
Allowi() calls usb_submit_urb(pdx->pUrbCharIn, bInCallback ? GFP_ATOMIC : GFP_KERNEL)
under spin_lock_irqsave(&pdx->charInLock, flags). That means it should use GFP_ATOMIC anyway.
As soon as it is the only usage of bInCallback argument, the patch removes it at all.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11 16:44:10 -08:00
Masanari Iida b1a21ee9de staging: ced1401: Fix typo in staging/ced1401
Correct spelling typo in comments within staging/ced1401

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26 16:21:58 -08:00
Fengguang Wu e6c5abf254 staging: ced1401: remove useless value cast on kmalloc()
Casting value returned by k[cmz]alloc to (struct page * *) is useless.

Generated by: scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci

Reported-by: Fengguang Wu <fengguang.wu@intel.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 11:06:59 -07:00
Wei Yongjun c665814d75 staging: ced1401: usb1401: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 09:13:40 -07:00
Devendra Naga 5c092f41fd staging: ced1401: fix a frame size warning
gcc/sparse complain about the following:

drivers/staging/ced1401/ced_ioc.c:931:1: warning: the frame size of 4144 bytes is larger than 2048 bytes [-Wframe-larger-than=]

Fix it by dynamically allocating it.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-23 20:35:54 -07:00
Wei Yongjun a5e0f69c98 Staging: ced1401: fix missing unlock on error in FreeCircBlock()
Add the missing unlock on the error handle path in function
FreeCircBlock().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:28:43 -07:00
Devendra Naga 7d82c65f04 staging: ced1401: remove kernel version ifdef 's
We dont need these kernel versioning checks anyways.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:28:13 -07:00
Devendra Naga 0965be3964 staging: ced1401: fix some style warnings
this fixes:

comments to in kernel comment style
the opening brace of if statement must be beside the if not below
to it

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:28:13 -07:00
Devendra Naga ff549e4772 staging: ced1401: remove an obvious commit about the minor number
in disconnect we assign the device minor number from the interface
pointer to the localvarible minor, and then print it at the end,

this code seems self explanatory so remove the comment of assigning
the minor number to a local variable.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:28:12 -07:00
Devendra Naga bae95b0907 staging:ced1401: remove read write callbacks from fops
As the driver says that read and writes should not be performed
and instead the user to kernel transactions are performed through
ioctl interface, remove these functions as they are not required

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-21 08:56:41 -07:00
Devendra Naga 2341111f6d staging:ced1401: use module_usb_driver macro
the module init and exit functions that are
doing usb_register and usb_deregister respectively can be
replaced with module_usb_driver code

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-21 08:56:41 -07:00
Dan Carpenter 428ed14f36 Staging: ced1401: fix a couple off by one checks
nArea is used as an offset into the ->rTransDef[] array which has
MAX_TRANSAREAS elements.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-21 08:56:41 -07:00
Greg Kroah-Hartman 74f5671442 Staging: ced1401: fix copy_from/to_user warning messages
Properly check the return value of copy_from/to_user() and handle any
errors that might happen.

This removes a bunch of compiler warnings.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 21:25:28 -07:00
Greg Kroah-Hartman cd915200af Staging ced1401: cleanup coding style issues.
A basic Lindent run on the .c files, clean up the .h file by hand.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 21:14:20 -07:00
Greg Kroah-Hartman 2d96650139 Staging: ced1401: add driver to the build
This adds the ced1401 driver to the build system.

Yes, there are a lot of warning messages, but it does compile, so it
should be good to get going.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 20:30:02 -07:00
Greg Kroah-Hartman c7fbfc825f Staging: ced1401: add TODO file
This adds a first cut of a TODO file to get this driver out of the
staging directory.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 19:46:05 -07:00
Greg Kroah-Hartman 6ede1edea3 Staging: ced1401: usb1401: fix build errors.
This fixes up the usb1401.c file to remove the usage of err() (which is
gone), and the two-argument kmap_atomic() call, and the compat_ioctl
pointer warning.

The code now builds properly, there are lots of warnings still, but it's
a start.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 19:45:53 -07:00
Alois Schlögl 2eae6bdc12 Staging: add ced1401 USB driver
This was imported from the
http://pub.ist.ac.at/~schloegl/src/ced1401/.git git repo at the request
of Alois.  The driver originally came from Cambridge Electronic Design
Ltd and was authored by Greg P Smith and others, but Alois did the
maintance work to get it into a semi-building state and pushed to get it
into the main kernel tree here.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 19:45:28 -07:00