summaryrefslogtreecommitdiff
path: root/drivers/staging/bcm/nvm.c
AgeCommit message (Collapse)Author
2014-04-07Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12Scott Wood
2013-10-28staging: bcm: Replace FALSE with falseLisa Nguyen
Replace user-defined type FALSE with C defined false keyword. Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-28staging: bcm: Replace BOOLEAN with boolLisa Nguyen
Remove user-defined BOOLEAN data type with C bool data type. Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17Staging: bcm: nvm: fixed space prohibitionAldo Iljazi
Fixed space prohibition before semicolon, particularly: nvm.c:106: WARNING: space prohibited before semicolon nvm.c:1098: WARNING: space prohibited before semicolon nvm.c:1279: WARNING: space prohibited before semicolon nvm.c:2834: WARNING: space prohibited before semicolon nvm.c:3361: WARNING: space prohibited before semicolon nvm.c:4453: WARNING: space prohibited before semicolon Signed-off-by: Aldo Iljazi <neonsync1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23staging: bcm: Fix typo in commentsMasanari Iida
Correct spelling typo in staging/bcm Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11staging: bcm: don't cast kzalloc() return valueMihnea Dobrescu-Balaur
Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-12Staging: bcm: add a missing break statementDan Carpenter
My static checker complains that there is a missing break statement here. From the context, it does look like a break statement was intended. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07Staging: bcm: Remove typedef for eNVM_TYPE and call directly.Kevin McKinney
This patch removes typedef for eNVM_TYPE, and changes the name of the enum to bcm_nvm_type. In addition, any calls to enum "NVM_TYPE" are changed to call directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07Staging: bcm: Remove typedef for _FLASH_CS_INFO and call directly.Kevin McKinney
This patch removes typedef for _FLASH_CS_INFO, and changes the name of the struct to bcm_flash_cs_info. In addition, any calls to typedefs FLASH_CS_INFO, or *PFLASH_CS_INFO are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07Staging: bcm: Remove typedef for _FLASH_2X_CS_INFO and call directly.Kevin McKinney
This patch removes typedef for _FLASH_2X_CS_INFO, and changes the name of the struct to bcm_flash2x_cs_info. In addition, any calls to typedefs FLASH2X_CS_INFO, or *PFLASH2X_CS_INFO are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07Staging: bcm: Remove typedef for _FLASH2X_VENDORSPECIFIC_INFO and call directly.Kevin McKinney
This patch removes typedef for _FLASH2X_VENDORSPECIFIC_INFO, and changes the name of the struct to bcm_flash2x_vendor_info. In addition, any calls to typedefs FLASH2X_VENDORSPECIFIC_INFO, or *PFLASH2X_VENDORSPECIFIC_INFO are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07Staging: bcm: Remove typedef for _DSD_HEADER and call directly.Kevin McKinney
This patch removes typedef for _DSD_HEADER, and changes the name of the struct to bcm_dsd_header. In addition, any calls to typedefs DSD_HEADER, or *PDSD_HEADER are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07Staging: bcm: Remove typedef for _ISO_HEADER and call directly.Kevin McKinney
This patch removes typedef for _ISO_HEADER, and changes the name of the struct to bcm_iso_header. In addition, any calls to typedefs ISO_HEADER, or *PISO_HEADER are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-27Staging: bcm: Remove typedef for _FLASH2X_SECTION_VAL and reference directly.Kevin McKinney
This patch removes typedef for _FLASH2X_SECTION_VAL, and changes the name of the enum to bcm_flash2x_section_val. In addition, any calls to typedefs FLASH2X_SECTION_VAL are changed to reference the enum directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-27Staging: bcm: Remove typedef for _FLASH2X_READWRITE and call directly.Kevin McKinney
This patch removes typedef for _FLASH2X_READWRITE, and changes the name of the struct to bcm_flash2x_readwrite. In addition, any calls to typedefs FLASH2X_READWRITE, or *PFLASH2X_READWRITE are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-27Staging: bcm: Remove typedef for _FLASH2X_COPY_SECTION and call directly.Kevin McKinney
This patch removes typedef for _FLASH2X_COPY_SECTION, and changes the name of the struct to bcm_flash2x_copy_section. In addition, any calls to typedefs FLASH2X_COPY_SECTION, or *PFLASH2X_COPY_SECTION are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-27Staging: bcm: Remove typedef for _FLASH2X_BITMAP and call directly.Kevin McKinney
This patch removes typedef for _FLASH2X_BITMAP, and changes the name of the struct to bcm_flash2x_bitmap. In addition, any calls to typedefs FLASH2X_BITMAP, or *PFLASH2X_BITMAP are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>