summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010/ks7010_sdio.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: ks7010: ks7010_sdio.c: Fixing multiple assignmentsNick Rosbrook2016-10-251-2/+4
| | | | | | | | | | Running checkpatch on ks7010_sdio.c shows two locations where multiple assignment statements are used. This patch modifies the assignments into single assignments. Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Corrected a spelling mistakeNick Rosbrook2016-10-251-1/+1
| | | | | | | | | This patch corrects the spelling of 'initialize' in ks7010_sdio.c. The issue was found by checkpatch. Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Add spaces around '*'Nick Rosbrook2016-10-251-1/+1
| | | | | | | Added spaces around a '*' in ks7010_sdio.c. Issue found by checkpatch. Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix space related style issues in ks7010_sdio.cAkshay Mariyanna2016-10-161-3/+3
| | | | | | | | | This fixes the following checkpatch warnings: WARNING: Unnecessary space before function pointer arguments WARNING: unnecessary whitespace before a quoted newline Signed-off-by: Akshay Mariyanna <akmlkcc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix indent style in ks7010_sdio.cAkshay Mariyanna2016-10-161-6/+6
| | | | | | | | This patch fixes the following checkpatch error: ERROR: code indent should use tabs where possible Signed-off-by: Akshay Mariyanna <akmlkcc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove unnecessary castPontus Fuchs2016-10-161-3/+2
| | | | | | | sdio functions takes unsigned int as address. No need to cast. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: ks7010: add blank line after declarationMuraru Mihaela2016-10-161-0/+4
| | | | | | | | | This patch fixes a coding style WARNING: Missing a blank line after declaration, found by checkpatch.pl. By adding a blank line after declaration of a variable. Signed-off-by: Muraru Mihaela <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: declare private functions staticSergio Paracuellos2016-09-281-3/+3
| | | | | | | | | Private functions in ks7010_sdio.c can be declared static. Fixes sparse warnings 'was not declared. Should it be static?'. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Fix warnings on printk() usageSabitha George2016-09-271-7/+10
| | | | | | | | | | This patch fixes the following warnings on ks7010_sdio.c 1. printk() should include KERN_ facility level 2. Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Sabitha George <sabitha.george@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove unnecessary variable used to store return valuesayli karnik2016-09-221-3/+2
| | | | | | | | | | | | | | | | | | | | This patch removes an unnecessary variable used to store return values in order to reduce memory usage. Done using coccinelle: @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret return - ret + C ; Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: ks7010: Use sizeof structure *pointer over sizeof structure in ↵Sandhya Bankar2016-09-201-1/+1
| | | | | | | | | kzalloc() This issue was found by checkpatch. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: ks7010: Drop memory allocation cast.Sandhya Bankar2016-09-181-2/+1
| | | | | | | | | | | | | | | | Drop cast on the result of kzalloc. The semantic patch that makes this change is as follows: @@ type T; @@ - (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)) Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove extra round braces around expressions/variablessayli karnik2016-09-181-2/+2
| | | | | | | This patch removes excess round braces around expressions/variables. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove the space after a type castsayli karnik2016-09-181-3/+3
| | | | | | | | The patch removes an unnecessary space after a cast, as detected by checkpatch.pl. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove unnecessary blank lines and commented codesayli karnik2016-09-181-5/+0
| | | | | | | | The patch removes unnecessary blank lines as detected by checkpatch.pl. Also, it removes a commented line of unrequired code. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove space after '(' and before ')'sayli karnik2016-09-181-6/+6
| | | | | | | | | The patch fixes the following errors detected by checkpatch.pl: ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited after that open parenthesis '(' Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove braces following single statement blockssayli karnik2016-09-181-20/+18
| | | | | | | | The patch removes braces {} for single statement blocks, as suggested by checkpatch.pl. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Use #include <linux/atomic.h> instead of <asm/atomic.h>sayli karnik2016-09-181-1/+1
| | | | | | | | This patch replaces <asm/atomic.h> with <linux/atomic.h>, as suggested by checkpatch.pl. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove whitespace before newlineRehas Sachdeva2016-09-161-3/+3
| | | | | | | | This patch fixes the checkpatch.pl warning: WARNING: unnecessary whitespace before a quoted newline. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove the explicit NULL comparisonsayli karnik2016-09-131-7/+7
| | | | | | | | The patch removes the explicit null comparisons entirely for the ks7010 driver. This was detected by checkpatch.pl Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix warning on return for void functionsHariharan R2016-09-121-11/+0
| | | | | | | | This patch fixes the checkpatch warning in ks7010_sdio.c 'void function return statements are not generally useful' Signed-off-by: Hariharan R <hariharanrangasamy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix memory leakSudip Mukherjee2016-09-121-1/+1
| | | | | | | | If the firmware request failed we were just returning but we missed freeing the memory and releasing the MMC Host. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: return on failureSudip Mukherjee2016-09-121-4/+2
| | | | | | | | | | | | | | | | On failure we were jumping to error_out0 where we were trying sdio_release_host() but at this point of execution we still have not done sdio_claim_host() and as a result host->claimed can still be 0. And if host->claimed is 0 then WARN_ON(!host->claimed) will give a warning. Moreover, if it is still not claimed then mmc_host->claim_cnt will be 0 and mmc_release_host() will do "if (--host->claim_cnt)" and thus the condition will become true. Lets just return the value on allocation failure instead of trying to release the host before claiming it. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: do not dereference priv if priv is nullColin Ian King2016-08-151-2/+2
| | | | | | | | | priv is being dereferenced before a check for it being null is made, so there is a possibililty a null pointer deference can occur. Instead, only dereference priv if it is non-null. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Delete a variable in write_to_device()Markus Elfring2016-08-151-2/+1
| | | | | | | | | The local variable "rc" was assigned a zero at one place. But it was not read within this function. Thus delete it. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Delete unnecessary assignments for buffer variablesMarkus Elfring2016-08-151-4/+1
| | | | | | | | | | A few variables were assigned a null pointer despite of the detail that they were immediately reassigned by the following statement. Thus remove such unnecessary assignments. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Delete unnecessary checks before the function call "kfree"Markus Elfring2016-08-151-9/+4
| | | | | | | | | | | The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: report interface as wlan not ethWolfram Sang2016-06-181-1/+1
| | | | | | | Until we switch to cfg80211 (if ever), we must do this manually. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: bail out when registering netdevice failsWolfram Sang2016-06-181-7/+5
| | | | | | | | There is no need to continue then. Also, this enables us to remove an ugly static variable. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: sdio: remove forward declarationsWolfram Sang2016-06-181-54/+46
| | | | | | | | Move read/write functions to the top and driver struct to the end, so we can remove all forward declarations. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: unify naming to ks7010Wolfram Sang2016-06-181-14/+14
| | | | | | | | No 79xx anymore, this is confusing. Add a comment saying that old versions were probably named 7910/79xx. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: export sdio idsWolfram Sang2016-06-181-2/+3
| | | | | | | | So the module will be loaded automatically on card insertion. Rename the array while here. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: collect all includes and sort themWolfram Sang2016-06-181-4/+3
| | | | | | | | Includes probably need a driver-wide clean up, but for now let's at least group all includes from the sdio file together. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: function declaration should be in a header fileWolfram Sang2016-06-181-3/+0
| | | | | Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: remove cfg file handlingWolfram Sang2016-06-181-17/+32
| | | | | | | | | | | | | | | | | I verified that all but two settings from the config file can be set up also via 'iwconfig' or 'iwpriv'. The two missing are ROM_FILE and PhyInformationTimer. ROM_FILE can be easily dropped. There is only one known firmware floating on the net, so, the name is fix and we can make this constant. Frankly, I don't know when PhyInformationTimer needs to be set to non-zero. But if we need it somewhen, there is already (currently commented out) code to add this as another private method, so we could use that. Summa summarum: We can remove the config file handling and the example config file. The only useful action, initialization of the configuration struct, is now moved to the sdio main file. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: cleanup file headersWolfram Sang2016-06-071-5/+3
| | | | | | | | Remove svn-ids and fix typos in the licence declaration. Add my copyright to the sdio code which I worked on mainly. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: drop counting sd errorsWolfram Sang2016-06-071-14/+6
| | | | | | | | | They were counted but never really used anywhere. Also change the printk to a debug print, since it mostly shows on the expected -ENOMEDIUM on card removal. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: simplify module_init/exitWolfram Sang2016-06-071-24/+1
| | | | | | | | The printouts are not needed, the driver core has enough debug output for this if wanted. So, use a helper to save boilerplate code. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix module annotationsWolfram Sang2016-06-071-6/+4
| | | | | | | | List all authors, beautify description, match license to what is stated in file headers, add firmware information. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: remove supported card table with one elementWolfram Sang2016-06-071-29/+2
| | | | | | | | | There is only this card supported, no need to iterate over the table. The resulting firmware filename wasn't used anyway, but came from the config file or hardcoded default. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: indent ks7010_sdio.cWolfram Sang2016-06-071-347/+460
| | | | | | | | Unlike the previous patches which are plain indent outcomes, this has some manual fixups to be not overly strict with the 80 char limit. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: remove unecessary typedefWolfram Sang2016-06-071-22/+22
| | | | | | | | Let's simply specify the struct to keep in sync with kernel coding style. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix printk format warningsWolfram Sang2016-06-071-1/+1
| | | | | | | Use proper type for size_t. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: delete seperate debug headerWolfram Sang2016-06-071-1/+0
| | | | | | | Move the one debug macro to the generic wlan header. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: use kernel helper to print bufferWolfram Sang2016-06-071-4/+5
| | | | | | | No need for an open coded one. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: avoid workqueue racesWolfram Sang2016-06-071-26/+2
| | | | | | | | | | | | | | My Spectec SDW823 card oopsed when it was already inserted during boot. When debugging this, I noticed that the card init was done in a seperate workqueue which was only activated once in probe. After removing the workqueue and calling the card init directly from probe, the OOPS went away. It turned out this is the same OOPS which happened when removing the card, so this seems possible now. Note: There is still a not-understood card-removed event during boot, but at least it doesn't crash anymore and the card will be re-probed right away. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: remove custom firmware loaderWolfram Sang2016-06-071-56/+0
| | | | | | | FW_LOADER works fine, no need for a open coded fallback. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: add driver from Nanonote extra-repositoryWolfram Sang2016-06-071-0/+1263
See the TODO for details where this driver came from. Only a few minor changes were made to make the driver suitable for staging: * updated Kconfig help text and dependencies * added TODO * removed two __DATE__ and __TIME__ printouts to allow reproducible builds * added to staging main Kconfig + Makefile Tested on a Renesas Salvator-X board with a Spectec SDW-823 card. I could connect to a WPA-protected network. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud