Commit graph

59 commits

Author SHA1 Message Date
Joe Perches fd8c5cb5ac staging: ft1000: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Miscellanea:

o Reflow alignment

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:57 -07:00
Joe Perches b5d8204d00 staging: ft1000: Logging message neatening
Use a more common logging style.

o Convert DEBUG macros to pr_debug
o Add pr_fmt
o Remove embedded function names from pr_debug
o Convert printks to pr_<level>
o Coalesce formats and align arguments
o Add missing terminating newlines

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:36:35 -08:00
Joe Perches ecdd21c7b9 staging: ft1000: Whitespace neatening
Use normal kernel style, indentation and alignment.

git diff -w shows no difference

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:35:32 -08:00
Nicolas Thery 6b5886f8b2 staging: ft1000: remove procfs entries
This patch started as a fix to some checkpatch complaints in ft1000
procfs code but Greg suggested to remove the procfs entries altogether:

http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2014-July/055594.html

Signed-off-by: Nicolas Thery <nthery@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:45:46 -07:00
Andrey Utkin eedd8d7ee8 staging: ft1000-usb: check for errors in card_send_command
kmalloc() result check was lacking. Fixing that required also
changing card_send_command() return type from void to int, and
checking its return code everywhere.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=78561
Reported-by: Maksymilian Arciemowicz <max@cert.cx>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 12:18:21 -07:00
Artem Fetishev 62ca89a1d0 drivers: staging: ft1000: Fix lines over 80 characters
..plus some function arg indentation which I haven't noticed at first.

Signed-off-by: Artem Fetishev <wwctrsrx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:51:40 -07:00
Artem Fetishev 5df466cd66 drivers: staging: ft1000: Use pr_info instead of printk
Improve coding style by fixing this checkstyle warning:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: Artem Fetishev <wwctrsrx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:51:40 -07:00
Kelley Nielsen 46d981557b staging: ft1000: STATUS defines completely removed
The ft1000 driver ignores the normal Linux error codes, using its
own macros, STATUS, STATUS_SUCCESS, and STATUS_FAILURE, instead.
Unsigned variables (u16 and u32) are sometimes used to hold them.
This patch converts all occurences of these macros to 0, 0 and -1,
respectively. It also changes the last remaining status variables
(mostly called status and ret) to ints, and removes the declarations
of the macros. This patch does not correct the whitespace issues
in the lines where the changes were made.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 07:47:22 -08:00
Kelley Nielsen 8cf9ff570b staging: ft1000: status variables changed to int in ft1000_download.c
Linux uses a return type of int for status codes. The file
ft1000_download.c uses a mixture of u16 and u32. This patch changes all
variables called status or Status to ints, whether they are returned
from the function or not. It also changes the return type of all
functions returning one of the variables to correspond. Also, the
declaration of scram_dnldr has been changed in ft1000_usb.h.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29 08:36:17 -07:00
Ondrej Zary dedbc93318 staging: ft1000: rename struct ft1000_device to ft1000_usb
After unifying struct ft1000_info, struct ft1000_device is now wrong name.
Rename it to ft1000_usb to match its semantics.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Reviewed-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:33:45 -08:00
Ondrej Zary 3aa2303a20 staging: ft1000: unify struct ft1000_info between USB and PCMCIA drivers
Unify struct ft1000_info between ft1000-usb and ft1000-pcmcia and move it to
common ft1000.h.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Tested-by: Marek Belisko <marek.belisko@open-nandra.com>
Review-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:33:45 -08:00
Marek Belisko b0add95059 staging: ft1000: Replace timeout values with USB_CTRL_G(S)ET_TIMEOUT.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:28:58 -07:00
Marek Belisko b70ac75eef staging: ft1000-usb: Fix various checkpach warnings in ft1000_usb.h
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:06:18 -07:00
Marek Belisko 35975ea664 staging: ft1000-usb: Replace all C99 comments with regular in ft1000_usb.h.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:06:18 -07:00
Marek Belisko f7e5780def staging: ft1000-usb: Fix lines over 80 chars.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:06:18 -07:00
Marek Belisko 03b3ac18cf staging: ft1000-usb: Remove name comments from ft1000_usb.h.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:06:18 -07:00
Marek Belisko 586288c957 staging: ft1000-usb: Remove spaces from struct dpram_blk.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:06:18 -07:00
Marek Belisko e2bdf27d39 staging: ft1000-usb: Remove leading spaces from struct ft1000_info.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:06:18 -07:00
Marek Belisko 494e734a40 staging: ft1000-usb: Remove commented lines from ft1000_device.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:06:17 -07:00
Ondrej Zary 7648c996ea staging: ft1000: Merge common definitions from USB and PCMCIA drivers
Merge common definitions from ft1000-usb and ft1000-pcmcia drivers to
a common ft1000.h file.
This revealed two odd things in ft1000-usb which might be bugs so add
comments about them to ft1000_usb.h.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 10:33:46 -07:00
Marek Belisko abc15bdd87 staging: ft1000: Removed unused variable InterruptsEnabled.
Removed beacuse was only assigned and never used.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:01:26 -07:00
Marek Belisko 2989b19ff8 staging: ft1000: Remove unused variable CurrentInterruptEnableMask.
Removed because was only assigned and never used.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:01:26 -07:00
Marek Belisko 3d20634100 staging: ft1000: Remove unused variable DSPResetNum.
Removed because was only assigned and never used.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:01:26 -07:00
Marek Belisko 8016a34d95 staging: ft1000: Remove unused variable ASICResetNum.
Removed because was only assigned and not used on other places.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:01:25 -07:00
Marek Belisko 8cfff928a7 staging: ft1000: Remove unused variables in ft1000_info.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:01:25 -07:00
Marek Belisko bb40876e43 staging: ft1000: Remove unused declaration in ft1000_usb.h.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 12:01:25 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Marek Belisko f135da0359 staging: ft1000: Change return value for init_ft1000_netdev function.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:51:17 -07:00
Marek Belisko a209efadf0 staging: ft1000: Replace camelcase CardSendCommand function name.
Replace CardSendCommand by card_send_command.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:51:14 -07:00
Marek Belisko 4a526fca84 staging: ft1000: Fix return values type.
Change return values type from u16 to int because all functions
use ft1000_control function which return int.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:49 -08:00
Marek Belisko dab56ffe9a staging: ft1000: Fix camelcase function names.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16 12:18:25 -08:00
Marek Belisko 5fd866fb64 staging: ft1000: Fix proc initialization handling.
Cleaning proc entries when error occures was not handled correctly.
So fix and also add proper cleaning.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09 16:35:13 -08:00
Marek Belisko 4d791234f4 staging: ft1000: Fix camelcase functions and variables.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09 16:34:32 -08:00
Marek Belisko 67e9f9e26b staging: ft1000: Remove unused variable.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09 16:34:32 -08:00
Marek Belisko 9119dee1ce staging: ft1000: Convert char device to debugfs.
Character device was used only for debugging purposes.
Convert it to debugfs functionality. For every plugged device
create new directory with one file.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09 16:34:31 -08:00
Marek Belisko e09f138e06 staging: ft1000: Get rid of UINT typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:07 -08:00
Marek Belisko c613f6f50f staging: ft1000: Get rid of PCHAR typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:07 -08:00
Marek Belisko 81584137d8 staging: ft1000: Get rid of BOOLEAN typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:06 -08:00
Marek Belisko 84b7801d13 staging: ft1000: Get rid of ULONG typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:06 -08:00
Marek Belisko d44d76f93d staging: ft1000: Get rid of PULONG typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:06 -08:00
Marek Belisko fc549a05e7 staging: ft1000: Get rid of USHORT typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:05 -08:00
Marek Belisko d1674983e0 staging: ft1000: GEt rid of PUSHORT typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:05 -08:00
Marek Belisko c8f775c88b staging: ft1000: Get rid of UCHAR typedef.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:05 -08:00
Marek Belisko e2cb7da167 staging: ft1000: Get rid of PUCHAR typedef.
PUCHAR typedef was replaces by u8 *.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:04 -08:00
Marek Belisko 019bd3f825 staging: ft1000: Remove dead code.
Remove functions which was used nowhere. Also remove dead
variables used by this functions.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:02 -08:00
Marek Belisko 1a88a06871 staging: ft1000: Remove FT1000_INFO typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:08:51 -07:00
Marek Belisko 29437ab09f staging: ft1000: Get rid of using typedef.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:08:10 -07:00
Marek Belisko aaf0885c30 staging: ft1000: Use specific error return code for reg_ft1000_netdev().
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:42:45 -07:00
Marek Belisko e09aee2a52 staging: ft1000: Remove DRVMGS typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:39:26 -07:00
Marek Belisko b13e39b2f7 staging: ft1000: Remove PSEUDO_HDR typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:30:39 -07:00