summaryrefslogtreecommitdiff
path: root/drivers/staging/bcm/nvm.c
AgeCommit message (Collapse)Author
2012-09-14Staging: bcm: Fix udelay related compilation errorTushar Behera
commit 6788d7dab6a5 ("Staging: bcm: Use udelay instead of msleep for delays in nvm.c") replaces msleep with udelay values. udelay values of more than 1000 should be replaced by mdelay instead. This fixes following build error. ERROR: "__bad_udelay" [drivers/staging/bcm/bcm_wimax.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 Cc: Kevin McKinney <klmckinney1@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17staging: bcm: Fix typo in drivers/bcmMasanari Iida
Correct spelling typo in drivers/bcm Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20Staging: bcm: Change order in if conditions to make more readable in nvm.cKevin McKinney
This patch changes the order of several if conditions to make the code more readable. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20Staging: bcm: Change conditions that check for NULL in nvm.cKevin McKinney
This patch changes all conditions that check for NULL from "if (variable == NULL)" or "if (NULL == variable)" to "if (variable)" to make code more readable. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20Staging: bcm: Replace UINT with "unsigned int" in nvm.cKevin McKinney
This patch replaces all uppercase UINT with "unsigned int". Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20Staging: bcm: Replace INT with int in nvm.cKevin McKinney
This patch replaces all uppercase INT with lowercase int. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12Staging: bcm: Return -ENOMEM instead of -1 when memory not acquired in nmv.cKevin McKinney
This patch changes the return statement on two conditions where memory could not be acquired. It returns -ENOMEM instead of -1. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12Staging: bcm: Use udelay instead of msleep for delays in nvm.cKevin McKinney
This patch uses udelay instead of msleep for delays because msleep can sleep up to 20ms for any value less than 20. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12Staging: bcm: Fix ERROR: return is not a function, parentheses are not required.Kevin McKinney
This patch fixes the following error reported by checkpatch.pl in nvm.c: "ERROR: return is not a function, parentheses are not required". Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12Staging: bcm: Correctly format all comments in nvm.cKevin McKinney
This patch correctly formats all comments as reported by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12Staging: bcm: Properly format braces in nvm.cKevin McKinney
This patch cuddles braces as reported by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12Staging: bcm: Fix all whitespace issues in nvm.cKevin McKinney
This patch resolves all whitespace issues as reported by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-05Staging: bcm: Remove typedef for _MINI_ADAPTER and call directly.Kevin McKinney
This patch removes typedef for _MINI_ADAPTER, changes the name of the struct from _MINI_ADAPTER to bcm_mini_adapter. In addition, any calls to the following typedefs "MINI_ADAPTER, *PMINI_ADAPTER" are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-11-27Staging: bcm: Fix information leak in ioctl: ↵Kevin McKinney
IOCTL_BCM_REGISTER_READ_PRIVATE, IOCTL_BCM_EEPROM_REGISTER_READ This patch fixes an information leak in ioctl IOCTL_BCM_REGISTER_READ_PRIVATE and IOCTL_BCM_EEPROM_REGISTER_READ when determining the number of bytes to copy to user space. Function, usb_control_msg, returns the correct number of bytes from the hardware. Instead of using this value, we were using a value derived from user space. In this case, this value could be more than the hardware allocated. Therefore, this patch copies the proper number of bytes from the hardware, and uses this value as the maximum number of bytes for user space. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23drivers/staging/bcm/nvm.c: add missing kfreeJulia Lawall
Buff is only used as a temporary buffer within the function, so it should be freed before leaving the function in an error case. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @exists@ local idexpression x; statement S,S1; expression E; identifier fl; expression *ptr != NULL; @@ x = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...kfree(x)...+> } when any when != true x == NULL x->fl ...> ( if (x == NULL) S1 | if (...) { ... when != x when forall ( return \(0\|<+...x...+>\|ptr\); | * return ...; ) } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2010-11-01beceem: change startup messagesStephen Hemminger
Change the regsister/unregister routines to generate better messages, and control arrival of new frames when USB device is unplugged. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: make local functions staticStephen Hemminger
Use namespace tool from kernel scripts to identify dead code and functions that should be static. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: remove dead codeStephen Hemminger
Remove commented out with '#if 0' Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01beceem: remove OS wrapper libraryStephen Hemminger
Use native kernel functions for kmalloc/kfree directly Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-30beceem: remove ifdef'sStephen Hemminger
There were a lot of ifdef's for driver options which have no configuration options. Choose the current value and remove the ifdef. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-05staging/bcm: add sparse annotationsArnd Bergmann
This marks up the code where sparse complains in most cases. Most of the changes are in the ioctl handling code, which gets __user annotations, finding one unchecked user access. The rest is mostly about marking functions static when they are only used in one file. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-09staging: Beeceem USB Wimax driverStephen Hemminger
The Sprint 4G network uses a Wimax dongle with Beecem chipset. The driver is typical of out of tree drivers, but maybe useful for people, and the hardware is readily available. Here is a staging ready version (i.e warts and all) 0. Started with Rel_5.2.7.3P1_USB from Sprint4GDeveloperPack-1.1 1. Consolidated files in staging 2. Remove Dos cr/lf 3. Remove unnecessary ioctl from usbbcm_fops Applied patches that were in the developer pack, surprising there were ones for 2.6.35 already. This is compile tested only, see TODO for what still needs to be done. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>