Commit aa605fa4 authored by Prashant P. Shah's avatar Prashant P. Shah Committed by Greg Kroah-Hartman

Staging: wl_cs.c: fixed space style issues in wl_cs.c

This is a patch to the wl_cs.c file that fixes the space
style issues found by the checkpatch.pl tool.
Signed-off-by: default avatarPrashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3ec64b05
...@@ -137,12 +137,12 @@ static int wl_adapter_attach(struct pcmcia_device *link) ...@@ -137,12 +137,12 @@ static int wl_adapter_attach(struct pcmcia_device *link)
struct wl_private *lp; struct wl_private *lp;
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_attach" ); DBG_FUNC("wl_adapter_attach");
DBG_ENTER( DbgInfo ); DBG_ENTER(DbgInfo);
dev = wl_device_alloc(); dev = wl_device_alloc();
if(dev == NULL) { if (dev == NULL) {
DBG_ERROR( DbgInfo, "wl_device_alloc returned NULL\n"); DBG_ERROR(DbgInfo, "wl_device_alloc returned NULL\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -160,7 +160,7 @@ static int wl_adapter_attach(struct pcmcia_device *link) ...@@ -160,7 +160,7 @@ static int wl_adapter_attach(struct pcmcia_device *link)
wl_adapter_insert(link); wl_adapter_insert(link);
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
return 0; return 0;
} // wl_adapter_attach } // wl_adapter_attach
/*============================================================================*/ /*============================================================================*/
...@@ -194,9 +194,9 @@ static void wl_adapter_detach(struct pcmcia_device *link) ...@@ -194,9 +194,9 @@ static void wl_adapter_detach(struct pcmcia_device *link)
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_detach" ); DBG_FUNC("wl_adapter_detach");
DBG_ENTER( DbgInfo ); DBG_ENTER(DbgInfo);
DBG_PARAM( DbgInfo, "link", "0x%p", link ); DBG_PARAM(DbgInfo, "link", "0x%p", link);
wl_adapter_release(link); wl_adapter_release(link);
...@@ -207,7 +207,7 @@ static void wl_adapter_detach(struct pcmcia_device *link) ...@@ -207,7 +207,7 @@ static void wl_adapter_detach(struct pcmcia_device *link)
wl_device_dealloc(dev); wl_device_dealloc(dev);
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
} // wl_adapter_detach } // wl_adapter_detach
/*============================================================================*/ /*============================================================================*/
...@@ -232,18 +232,18 @@ static void wl_adapter_detach(struct pcmcia_device *link) ...@@ -232,18 +232,18 @@ static void wl_adapter_detach(struct pcmcia_device *link)
* N/A * N/A
* *
******************************************************************************/ ******************************************************************************/
void wl_adapter_release( struct pcmcia_device *link ) void wl_adapter_release(struct pcmcia_device *link)
{ {
DBG_FUNC( "wl_adapter_release" ); DBG_FUNC("wl_adapter_release");
DBG_ENTER( DbgInfo ); DBG_ENTER(DbgInfo);
DBG_PARAM( DbgInfo, "link", "0x%p", link); DBG_PARAM(DbgInfo, "link", "0x%p", link);
/* Stop hardware */ /* Stop hardware */
wl_remove(link->priv); wl_remove(link->priv);
pcmcia_disable_device(link); pcmcia_disable_device(link);
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
} // wl_adapter_release } // wl_adapter_release
/*============================================================================*/ /*============================================================================*/
...@@ -266,7 +266,7 @@ static int wl_adapter_resume(struct pcmcia_device *link) ...@@ -266,7 +266,7 @@ static int wl_adapter_resume(struct pcmcia_device *link)
wl_resume(dev); wl_resume(dev);
netif_device_attach( dev ); netif_device_attach(dev);
return 0; return 0;
} // wl_adapter_resume } // wl_adapter_resume
...@@ -291,16 +291,16 @@ static int wl_adapter_resume(struct pcmcia_device *link) ...@@ -291,16 +291,16 @@ static int wl_adapter_resume(struct pcmcia_device *link)
* N/A * N/A
* *
******************************************************************************/ ******************************************************************************/
void wl_adapter_insert( struct pcmcia_device *link ) void wl_adapter_insert(struct pcmcia_device *link)
{ {
struct net_device *dev; struct net_device *dev;
int i; int i;
int ret; int ret;
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_insert" ); DBG_FUNC("wl_adapter_insert");
DBG_ENTER( DbgInfo ); DBG_ENTER(DbgInfo);
DBG_PARAM( DbgInfo, "link", "0x%p", link ); DBG_PARAM(DbgInfo, "link", "0x%p", link);
dev = link->priv; dev = link->priv;
...@@ -332,15 +332,15 @@ void wl_adapter_insert( struct pcmcia_device *link ) ...@@ -332,15 +332,15 @@ void wl_adapter_insert( struct pcmcia_device *link )
printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ", printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ",
dev->name, dev->base_addr, dev->irq); dev->name, dev->base_addr, dev->irq);
for( i = 0; i < ETH_ALEN; i++ ) { for (i = 0; i < ETH_ALEN; i++) {
printk("%02X%c", dev->dev_addr[i], ((i < (ETH_ALEN-1)) ? ':' : '\n')); printk("%02X%c", dev->dev_addr[i], ((i < (ETH_ALEN-1)) ? ':' : '\n'));
} }
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
return; return;
failed: failed:
wl_adapter_release( link ); wl_adapter_release(link);
DBG_LEAVE(DbgInfo); DBG_LEAVE(DbgInfo);
return; return;
...@@ -367,7 +367,7 @@ void wl_adapter_insert( struct pcmcia_device *link ) ...@@ -367,7 +367,7 @@ void wl_adapter_insert( struct pcmcia_device *link )
* errno value otherwise * errno value otherwise
* *
******************************************************************************/ ******************************************************************************/
int wl_adapter_open( struct net_device *dev ) int wl_adapter_open(struct net_device *dev)
{ {
struct wl_private *lp = wl_priv(dev); struct wl_private *lp = wl_priv(dev);
struct pcmcia_device *link = lp->link; struct pcmcia_device *link = lp->link;
...@@ -376,27 +376,27 @@ int wl_adapter_open( struct net_device *dev ) ...@@ -376,27 +376,27 @@ int wl_adapter_open( struct net_device *dev )
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_open" ); DBG_FUNC("wl_adapter_open");
DBG_ENTER( DbgInfo ); DBG_ENTER(DbgInfo);
DBG_PRINT( "%s\n", VERSION_INFO ); DBG_PRINT("%s\n", VERSION_INFO);
DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev ); DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
if(!pcmcia_dev_present(link)) if (!pcmcia_dev_present(link))
{ {
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
return -ENODEV; return -ENODEV;
} }
link->open++; link->open++;
hcf_status = wl_open( dev ); hcf_status = wl_open(dev);
if( hcf_status != HCF_SUCCESS ) { if (hcf_status != HCF_SUCCESS) {
link->open--; link->open--;
result = -ENODEV; result = -ENODEV;
} }
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
return result; return result;
} // wl_adapter_open } // wl_adapter_open
/*============================================================================*/ /*============================================================================*/
...@@ -421,28 +421,28 @@ int wl_adapter_open( struct net_device *dev ) ...@@ -421,28 +421,28 @@ int wl_adapter_open( struct net_device *dev )
* errno value otherwise * errno value otherwise
* *
******************************************************************************/ ******************************************************************************/
int wl_adapter_close( struct net_device *dev ) int wl_adapter_close(struct net_device *dev)
{ {
struct wl_private *lp = wl_priv(dev); struct wl_private *lp = wl_priv(dev);
struct pcmcia_device *link = lp->link; struct pcmcia_device *link = lp->link;
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_close" ); DBG_FUNC("wl_adapter_close");
DBG_ENTER( DbgInfo ); DBG_ENTER(DbgInfo);
DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev ); DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
if( link == NULL ) { if (link == NULL) {
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
return -ENODEV; return -ENODEV;
} }
DBG_TRACE( DbgInfo, "%s: Shutting down adapter.\n", dev->name ); DBG_TRACE(DbgInfo, "%s: Shutting down adapter.\n", dev->name);
wl_close( dev ); wl_close(dev);
link->open--; link->open--;
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
return 0; return 0;
} // wl_adapter_close } // wl_adapter_close
/*============================================================================*/ /*============================================================================*/
...@@ -493,19 +493,19 @@ static struct pcmcia_driver wlags49_driver = { ...@@ -493,19 +493,19 @@ static struct pcmcia_driver wlags49_driver = {
* -1 on error * -1 on error
* *
******************************************************************************/ ******************************************************************************/
int wl_adapter_init_module( void ) int wl_adapter_init_module(void)
{ {
int ret; int ret;
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_init_module" ); DBG_FUNC("wl_adapter_init_module");
DBG_ENTER( DbgInfo ); DBG_ENTER(DbgInfo);
DBG_TRACE( DbgInfo, "wl_adapter_init_module() -- PCMCIA\n" ); DBG_TRACE(DbgInfo, "wl_adapter_init_module() -- PCMCIA\n");
ret = pcmcia_register_driver(&wlags49_driver); ret = pcmcia_register_driver(&wlags49_driver);
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
return ret; return ret;
} // wl_adapter_init_module } // wl_adapter_init_module
/*============================================================================*/ /*============================================================================*/
...@@ -528,16 +528,16 @@ int wl_adapter_init_module( void ) ...@@ -528,16 +528,16 @@ int wl_adapter_init_module( void )
* N/A * N/A
* *
******************************************************************************/ ******************************************************************************/
void wl_adapter_cleanup_module( void ) void wl_adapter_cleanup_module(void)
{ {
DBG_FUNC( "wl_adapter_cleanup_module" ); DBG_FUNC("wl_adapter_cleanup_module");
DBG_ENTER( DbgInfo ); DBG_ENTER(DbgInfo);
DBG_TRACE( DbgInfo, "wl_adapter_cleanup_module() -- PCMCIA\n" ); DBG_TRACE(DbgInfo, "wl_adapter_cleanup_module() -- PCMCIA\n");
pcmcia_unregister_driver(&wlags49_driver); pcmcia_unregister_driver(&wlags49_driver);
DBG_LEAVE( DbgInfo ); DBG_LEAVE(DbgInfo);
return; return;
} // wl_adapter_cleanup_module } // wl_adapter_cleanup_module
/*============================================================================*/ /*============================================================================*/
...@@ -562,16 +562,16 @@ void wl_adapter_cleanup_module( void ) ...@@ -562,16 +562,16 @@ void wl_adapter_cleanup_module( void )
* 0 otherwise * 0 otherwise
* *
******************************************************************************/ ******************************************************************************/
int wl_adapter_is_open( struct net_device *dev ) int wl_adapter_is_open(struct net_device *dev)
{ {
struct wl_private *lp = wl_priv(dev); struct wl_private *lp = wl_priv(dev);
struct pcmcia_device *link = lp->link; struct pcmcia_device *link = lp->link;
if(!pcmcia_dev_present(link)) { if (!pcmcia_dev_present(link)) {
return 0; return 0;
} }
return( link->open ); return(link->open);
} // wl_adapter_is_open } // wl_adapter_is_open
/*============================================================================*/ /*============================================================================*/
...@@ -596,7 +596,7 @@ int wl_adapter_is_open( struct net_device *dev ) ...@@ -596,7 +596,7 @@ int wl_adapter_is_open( struct net_device *dev )
* a pointer to a string describing the error(s) * a pointer to a string describing the error(s)
* *
******************************************************************************/ ******************************************************************************/
const char* DbgEvent( int mask ) const char* DbgEvent(int mask)
{ {
static char DbgBuffer[256]; static char DbgBuffer[256];
char *pBuf; char *pBuf;
...@@ -607,81 +607,81 @@ const char* DbgEvent( int mask ) ...@@ -607,81 +607,81 @@ const char* DbgEvent( int mask )
*pBuf = '\0'; *pBuf = '\0';
if( mask & CS_EVENT_WRITE_PROTECT ) if (mask & CS_EVENT_WRITE_PROTECT)
strcat( pBuf, "WRITE_PROTECT " ); strcat(pBuf, "WRITE_PROTECT ");
if(mask & CS_EVENT_CARD_LOCK) if (mask & CS_EVENT_CARD_LOCK)
strcat( pBuf, "CARD_LOCK " ); strcat(pBuf, "CARD_LOCK ");
if(mask & CS_EVENT_CARD_INSERTION) if (mask & CS_EVENT_CARD_INSERTION)
strcat( pBuf, "CARD_INSERTION " ); strcat(pBuf, "CARD_INSERTION ");
if(mask & CS_EVENT_CARD_REMOVAL) if (mask & CS_EVENT_CARD_REMOVAL)
strcat( pBuf, "CARD_REMOVAL " ); strcat(pBuf, "CARD_REMOVAL ");
if(mask & CS_EVENT_BATTERY_DEAD) if (mask & CS_EVENT_BATTERY_DEAD)
strcat( pBuf, "BATTERY_DEAD " ); strcat(pBuf, "BATTERY_DEAD ");
if(mask & CS_EVENT_BATTERY_LOW) if (mask & CS_EVENT_BATTERY_LOW)
strcat( pBuf, "BATTERY_LOW " ); strcat(pBuf, "BATTERY_LOW ");
if(mask & CS_EVENT_READY_CHANGE) if (mask & CS_EVENT_READY_CHANGE)
strcat( pBuf, "READY_CHANGE " ); strcat(pBuf, "READY_CHANGE ");
if(mask & CS_EVENT_CARD_DETECT) if (mask & CS_EVENT_CARD_DETECT)
strcat( pBuf, "CARD_DETECT " ); strcat(pBuf, "CARD_DETECT ");
if(mask & CS_EVENT_RESET_REQUEST) if (mask & CS_EVENT_RESET_REQUEST)
strcat( pBuf, "RESET_REQUEST " ); strcat(pBuf, "RESET_REQUEST ");
if(mask & CS_EVENT_RESET_PHYSICAL) if (mask & CS_EVENT_RESET_PHYSICAL)
strcat( pBuf, "RESET_PHYSICAL " ); strcat(pBuf, "RESET_PHYSICAL ");
if(mask & CS_EVENT_CARD_RESET) if (mask & CS_EVENT_CARD_RESET)
strcat( pBuf, "CARD_RESET " ); strcat(pBuf, "CARD_RESET ");
if(mask & CS_EVENT_REGISTRATION_COMPLETE) if (mask & CS_EVENT_REGISTRATION_COMPLETE)
strcat( pBuf, "REGISTRATION_COMPLETE " ); strcat(pBuf, "REGISTRATION_COMPLETE ");
// if(mask & CS_EVENT_RESET_COMPLETE) // if(mask & CS_EVENT_RESET_COMPLETE)
// strcat( pBuf, "RESET_COMPLETE " ); // strcat( pBuf, "RESET_COMPLETE " );
if(mask & CS_EVENT_PM_SUSPEND) if (mask & CS_EVENT_PM_SUSPEND)
strcat( pBuf, "PM_SUSPEND " ); strcat(pBuf, "PM_SUSPEND ");
if(mask & CS_EVENT_PM_RESUME) if (mask & CS_EVENT_PM_RESUME)
strcat( pBuf, "PM_RESUME " ); strcat(pBuf, "PM_RESUME ");
if(mask & CS_EVENT_INSERTION_REQUEST) if (mask & CS_EVENT_INSERTION_REQUEST)
strcat( pBuf, "INSERTION_REQUEST " ); strcat(pBuf, "INSERTION_REQUEST ");
if(mask & CS_EVENT_EJECTION_REQUEST) if (mask & CS_EVENT_EJECTION_REQUEST)
strcat( pBuf, "EJECTION_REQUEST " ); strcat(pBuf, "EJECTION_REQUEST ");
if(mask & CS_EVENT_MTD_REQUEST) if (mask & CS_EVENT_MTD_REQUEST)
strcat( pBuf, "MTD_REQUEST " ); strcat(pBuf, "MTD_REQUEST ");
if(mask & CS_EVENT_ERASE_COMPLETE) if (mask & CS_EVENT_ERASE_COMPLETE)
strcat( pBuf, "ERASE_COMPLETE " ); strcat(pBuf, "ERASE_COMPLETE ");
if(mask & CS_EVENT_REQUEST_ATTENTION) if (mask & CS_EVENT_REQUEST_ATTENTION)
strcat( pBuf, "REQUEST_ATTENTION " ); strcat(pBuf, "REQUEST_ATTENTION ");
if(mask & CS_EVENT_CB_DETECT) if (mask & CS_EVENT_CB_DETECT)
strcat( pBuf, "CB_DETECT " ); strcat(pBuf, "CB_DETECT ");
if(mask & CS_EVENT_3VCARD) if (mask & CS_EVENT_3VCARD)
strcat( pBuf, "3VCARD " ); strcat(pBuf, "3VCARD ");
if(mask & CS_EVENT_XVCARD) if (mask & CS_EVENT_XVCARD)
strcat( pBuf, "XVCARD " ); strcat(pBuf, "XVCARD ");
if( *pBuf ) { if (*pBuf) {
pBuf[strlen(pBuf) - 1] = '\0'; pBuf[strlen(pBuf) - 1] = '\0';
} else { } else {
if( mask != 0x0 ) { if (mask != 0x0) {
sprintf( pBuf, "<<0x%08x>>", mask ); sprintf(pBuf, "<<0x%08x>>", mask);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment