aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rts5208 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-01-25staging: rts5208: use msecs_to_jiffies for timeoutsNicholas Mc Guire1-6/+6
This is only an API consolidation and should make things more readable Converting milliseconds to jiffies by val * HZ / 1000 is technically not wrong but msecs_to_jiffies(val) is the cleaner solution and handles corner cases correctly. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: rts5208/ms.c: Code style fix (space before comma)Robert Kmiec1-6/+6
This commit fixes the following errors reported by checkpatch.pl -f: ./rts5208/ms.c:1294: ERROR: space prohibited before that ',' (ctx:WxW) ./rts5208/ms.c:1345: ERROR: space prohibited before that ',' (ctx:WxW) ./rts5208/ms.c:1622: ERROR: space prohibited before that ',' (ctx:WxW) ./rts5208/ms.c:1991: ERROR: space prohibited before that ',' (ctx:WxW) This patch also adds missing spaces before and after '+' sign in two places. This file has some other style issues and they will be fixed with latter patches. Signed-off-by: Robert Kmiec <robert.r.kmiec@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rts5208: Remove useless cast on void pointerTapasweni Pathak1-2/+2
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging, rts5208, LLVMLinux: Change extern inline to static inlineBehan Webster1-1/+1
With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the opposite thing from older versions of gcc (emits code for an externally linkable version of the inline function). "static inline" does the intended behavior in both gcc and clang. Signed-off-by: Behan Webster <behanw@converseincode.com> Suggested-by: Arnd Bergmann <arnd@arndb.de> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29Staging: rts5208: helper function to enable interrupts during resetFabio Falzoi1-47/+48
Define the helper function rtsx_enable_pcie_intr to shorten the rtsx_reset_chip code and get rid of the LONG_LINE checkpatch warnings. Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Reviewed-by: Dan Carpenter <dan.carpente@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29Staging: rts5208: helper function to manage aspm during resetFabio Falzoi1-31/+39
Define the helper function rtsx_reset_aspm to shorten the rtsx_reset_chip code and get rid of the LONG_LINE checkpatch warnings. Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Reviewed-by: Dan Carpenter <dan.carpente@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28Staging: rts5028: rtsx_transport.c: fixed a brace coding style issue.Surya Seetharaman1-4/+2
Removed unwanted braces using checkpatch.pl tool. Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28Staging: rts5208: Removed unnecessary parenthesesTina Johnson1-1/+1
Unnecessary parentheses around the right hand side of an assignment is removed using the following semantic patch: @@ identifier x,f; constant C; @@ ( -x = (f / C ); +x = f / C ; | -x = (f % C ); +x = f % C ; ) Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23staging: rts5208: fix case of bitwise operator on zero in ms.cJiayi Ye1-2/+2
If a variable has value 0, then there is no point in combining it with other things with |, as for any x, 0 | x is just x. The following semantic patch finds this problem. @@ expression x,e,e1; statement S; @@ if (x == 0) { <... when != x = e1 when != while(...) S when != for(...;...;...) S ( * x |= e | * x | e ) ...> } Signed-off-by: Jiayi Ye <yejiayily@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rts5208: use ternary operators to reduce indentation levelGiedrius Statkevičius1-67/+23
Convert code in format of if (a) if(b) { [...] } to one line with a simple ternary operation to avoid unnecesary increase of indentation level. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rts5208: divide lines to make them less than 80 characters longGiedrius Statkevičius1-9/+22
Make a couple of lines shorter than the max limit by diving them and also make sure to align them properly where possible. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rts5208: align divided lines to opening paranthesisGiedrius Statkevičius1-42/+45
Make all divided lines aligned to the opening paranthesis. Basically makes all lines aligned to the opening paranthesis to make the code more readable and it also gets rid of a lot of checkpatch.pl "checks". Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rts5208: get rid of Camel Case, remove unneeded lines and paranthesesGiedrius Statkevičius1-31/+21
Convert labels from Camel Case to lower case, remove unnecessary parantheses around operands of dereference operators and remove unneeded empty lines before }. Gets rid of a checkpatch.pl "check" that code should avoid Camel Case, also the code had a bunch of &(a) where a is some variable so it gets rid of them too. Finally, in a few places there were a empty line before } so remove them. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rts5208: combine ifs where possibleGiedrius Statkevičius1-56/+44
Join together chained if's where possible to lower the indentation level. In a lot of places of this code the indentation level is already very high. As a result, this patch increases the code flow and readability. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rts5208: Delete braces are not necessaryMelike Yurtoglu1-2/+1
Fix checkpatch.pl warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: rts5208: remove unnecessary elseRoxana Blaj1-3/+2
This fixes the checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: rts5208: remove unnecessary elseRoxana Blaj1-2/+2
This fixes the checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: rts5208: Remove unneeded void returnMelike Yurtoglu1-4/+0
Fixes "void function return statements are not generally useful"checkpatch.pl warning Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: rts5208: Fix missing blank line warning.Melike Yurtoglu1-0/+3
Fixes "Missing a blank line after declarations" checkpatch.pl warning in rtsx_scsi.c Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: rts5208: Remove unnecessary else in rtsx_card.hEsra Altintas1-2/+1
The following patch fixes the checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: Esra Altintas <es.altintas@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: rts5208: Remove unncessary return in function returning voidTapasweni Pathak1-2/+0
This patch fixes checkpatch.pl warning in rtsx.c file. WARNING: void function return statements are not generally useful Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: rts5208: Add new line after declarationTapasweni Pathak1-0/+1
This patch fixes checkpatch.pl warning in file ms.c WARNING : Missing a blank line after declarations Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28Staging: rts5208: Fix missing blank line warningMahati Chamarthy1-0/+10
This fixes the following checkpatch.pl warnings: WARNING: Missing a blank line after declarations Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23staging: rts5208: add new line after declarationsRoxana Blaj1-0/+1
This fixes the warning: WARNING: Missing a blank line after declarations Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23Staging: rts5208: Fix checkpatch warning: Missing blank lineTina Johnson1-0/+6
The following checkpatch warning was fixed : WARNING: Missing a blank line after declarations Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23staging: rts5208: remove unnecessary return statementRoxana Blaj1-2/+0
This fixes the warning: WARNING: void function return statements are not generally useful Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23staging: rts5208: remove unnecessary elseRoxana Blaj1-2/+2
This fixes the warning: WARNING: else is not generally useful after a break or return Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30staging: rts5208: Remove casting the return value which is a void pointerJingoo Han1-4/+4
Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16Staging: rts5208: Remove CONFIG_RTS5208_DEBUG optionFabio Falzoi2-11/+1
CONFIG_RTS5208_DEBUG is no more needed, we rely on dynamic debug config options instead. Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16Staging: rts5208: Use dev_dbg and print_hex_dump_bytes to dump memoryFabio Falzoi5-19/+13
Use dev_dbg with %*ph format specifier and print_hex_dump_bytes to dump memory instead of relying on custom macro. Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-06Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds1-2/+2
Pull SCSI updates from James Bottomley: "This patch set consists of the usual driver updates (ufs, storvsc, pm8001 hpsa). It also has removal of the user space target driver code (everyone is using LIO now), a partial PCI MSI-X update, more multi-queue updates, conversion to 64 bit LUNs (so we could theoretically cope with any LUN returned by a device) and placeholder support for the ZBC device type (Shingle drives), plus an assortment of minor updates and bug fixes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (143 commits) scsi: do not issue SCSI RSOC command to Promise Vtrak E610f vmw_pvscsi: Use pci_enable_msix_exact() instead of pci_enable_msix() pm8001: Fix invalid return when request_irq() failed lpfc: Remove superfluous call to pci_disable_msix() isci: Use pci_enable_msix_exact() instead of pci_enable_msix() bfa: Use pci_enable_msix_exact() instead of pci_enable_msix() bfa: Cleanup bfad_setup_intr() function bfa: Do not call pci_enable_msix() after it failed once fnic: Use pci_enable_msix_exact() instead of pci_enable_msix() scsi: use short driver name for per-driver cmd slab caches scsi_debug: support scsi-mq, queues and locks Drivers: add blist flags scsi: ufs: fix endianness sparse warnings scsi: ufs: make undeclared functions static bnx2i: Update driver version to 2.7.10.1 pm8001: fix a memory leak in nvmd_resp pm8001: fix update_flash pm8001: fix a memory leak in flash_update pm8001: Cleaning up uninitialized variables pm8001: Fix to remove null pointer checks that could never happen ...
2014-07-30Staging: rts5208: Replace custom macro with dev_dbgFabio Falzoi15-375/+392
Use dev_dbg macro to control tracing verbosity through dynamic debug facility. Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30Staging: rts5208: Remove useless debug printsFabio Falzoi2-28/+0
Remove all debug printks used just to mark when we enter a function. Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17scsi: use 64-bit LUNsHannes Reinecke1-2/+2
The SCSI standard defines 64-bit values for LUNs, and large arrays employing large or hierarchical LUN numbers become more and more common. So update the linux SCSI stack to use 64-bit LUN numbers. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@infradead.org> Reviewed-by: Ewan Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-05-24staging: rts5208: Use pci_device_id rather than DEFINE_PCI_DEVICE_TABLEBenoit Taine1-1/+1
This patch enhances kernel style usage for the rts5208 driver. We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15staging: rts5208: fix static checker warningsMicky Ching1-1/+1
The patch fa590c222fba: "staging: rts5208: add support for rts5208 and rts5288" from Nov 12, 2013, leads to the following static checker warning: drivers/staging/rts5208/rtsx_chip.c:107 rtsx_enable_bus_int() warn: add curly braces? This warning is produced because incorrect code indent. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18staging: rts5208: Fix line over 80 characters.Gulsah Kose1-23/+46
Fix checkpatch.pl issues with line over 80 characters in rtsx_card.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-13staging: rts5208: Remove unnecessary parentheses.Gulsah Kose1-1/+1
Return is not a method and doesn't need parentheses. Removed unnecaasary parentheses. Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13staging: rts5208: Fix line over 80 characters.Gulsah Kose1-2/+4
Fix checkpatch.pl issues with line over 80 characters in rtsx.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-08staging: rts5208: Fixed line over 80 characters.Keerthimai Janarthanan1-2/+2
Fixes the following checkpatch warning: WARNING: line over 80 characters. Signed-off-by: Keerthimai Janarthanan <keerthimaipb@gmail.com> Reviewed-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07staging/rts5208/rtsx_scsi.c: Remove unnecessary parenthesesGeorgiana Rodica Chelu1-4/+4
Remove unnecessary parentheses from staging/rts5208/rtsx_scsi.c Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27Staging : rts5208: Fix code indent issueHimangi Saraogi1-1/+1
This patch removes the checkpatch warning : suspect code indent for conditional statements, by converting spaces to tabs. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17staging: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03staging: rts5208: fix error return code in rtsx_probe()Wei Yongjun1-1/+3
Fix to return -ENOMEM instead of 0 when the memory alloc fail in probe error handling path. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25staging: rts5208: add support for rts5208 and rts5288Micky Ching26-0/+23567
There are still many rts5208/5288 card readers being used, but no drivers are supported them in kernel now. This driver can make a great convenience for people who use them. Many other rts-series card reader are supported by mfd driver, but due to much difference with others, rts5208/5288 can not add into mfd driver pretty now, so we provide a separated driver here to support the device. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>