Staging: Drop memory allocation cast
[safe/jmp/linux-2.6] / drivers / staging / vt6656 / main_usb.c
index ebd7a1e..e4dc27d 100644 (file)
@@ -331,8 +331,8 @@ device_set_options(PSDevice pDevice) {
 }
 
 
-static VOID device_init_diversity_timer(PSDevice pDevice) {
-
+static void device_init_diversity_timer(PSDevice pDevice)
+{
     init_timer(&pDevice->TimerSQ3Tmax1);
     pDevice->TimerSQ3Tmax1.data = (ULONG)pDevice;
     pDevice->TimerSQ3Tmax1.function = (TimerFunction)TimerSQ3CallBack;
@@ -791,7 +791,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
     spin_lock_init(&pDevice->lock);
 
     pDevice->tx_80211 = device_dma0_tx_80211;
-    pDevice->sMgmtObj.pAdapter = (PVOID)pDevice;
+    pDevice->sMgmtObj.pAdapter = (void *)pDevice;
 
     netdev->netdev_ops         = &device_netdev_ops;
 
@@ -843,7 +843,8 @@ err_nomem:
 }
 
 
-static VOID device_free_tx_bufs(PSDevice pDevice) {
+static void device_free_tx_bufs(PSDevice pDevice)
+{
     PUSB_SEND_CONTEXT pTxContext;
     int ii;
 
@@ -862,7 +863,8 @@ static VOID device_free_tx_bufs(PSDevice pDevice) {
 }
 
 
-static VOID device_free_rx_bufs(PSDevice pDevice) {
+static void device_free_rx_bufs(PSDevice pDevice)
+{
     PRCB pRCB;
     int ii;
 
@@ -894,8 +896,8 @@ static void usb_device_reset(PSDevice pDevice)
        return ;
 }
 
-static VOID device_free_int_bufs(PSDevice pDevice) {
-
+static void device_free_int_bufs(PSDevice pDevice)
+{
     if (pDevice->intBuf.pDataBuf != NULL)
         kfree(pDevice->intBuf.pDataBuf);
     return;
@@ -917,7 +919,7 @@ static BOOL device_alloc_bufs(PSDevice pDevice) {
             goto free_tx;
         }
         pDevice->apTD[ii] = pTxContext;
-        pTxContext->pDevice = (PVOID) pDevice;
+       pTxContext->pDevice = (void *) pDevice;
         //allocate URBs
         pTxContext->pUrb = usb_alloc_urb(0, GFP_ATOMIC);
         if (pTxContext->pUrb == NULL) {
@@ -946,7 +948,7 @@ static BOOL device_alloc_bufs(PSDevice pDevice) {
     for (ii = 0; ii < pDevice->cbRD; ii++) {
 
         pDevice->apRCB[ii] = pRCB;
-        pRCB->pDevice = (PVOID) pDevice;
+       pRCB->pDevice = (void *) pDevice;
         //allocate URBs
         pRCB->pUrb = usb_alloc_urb(0, GFP_ATOMIC);
 
@@ -1156,12 +1158,12 @@ static int  device_open(struct net_device *dev) {
     }
 
     if (pDevice->sMgmtObj.eConfigMode == WMAC_CONFIG_AP) {
-        bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RUN_AP, NULL);
+               bScheduleCommand((void *) pDevice, WLAN_CMD_RUN_AP, NULL);
        }
        else {
        //mike:mark@2008-11-10
-            bScheduleCommand((HANDLE)pDevice, WLAN_CMD_BSSID_SCAN, NULL);
-        //bScheduleCommand((HANDLE)pDevice, WLAN_CMD_SSID, NULL);
+         bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL);
+         /* bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); */
     }
 
 
@@ -1218,7 +1220,7 @@ static int  device_close(struct net_device *dev) {
 
 //2007-1121-02<Add>by EinsnLiu
     if (pDevice->bLinkPass) {
-       bScheduleCommand((HANDLE)pDevice, WLAN_CMD_DISASSOCIATE, NULL);
+       bScheduleCommand((void *) pDevice, WLAN_CMD_DISASSOCIATE, NULL);
         mdelay(30);
     }
 //End Add
@@ -1509,7 +1511,7 @@ static UCHAR *Config_FileOperation(PSDevice pDevice) {
          goto error1;
        }
 
-    buffer = (UCHAR *)kmalloc(1024, GFP_KERNEL);
+    buffer = kmalloc(1024, GFP_KERNEL);
     if(buffer==NULL) {
       printk("alllocate mem for file fail?\n");
       result = -1;
@@ -2099,16 +2101,16 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
        if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
            netif_stop_queue(pDevice->dev);
            spin_lock_irq(&pDevice->lock);
-           bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RUN_AP, NULL);
+       bScheduleCommand((void *) pDevice, WLAN_CMD_RUN_AP, NULL);
            spin_unlock_irq(&pDevice->lock);
        }
        else {
            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Commit the settings\n");
            spin_lock_irq(&pDevice->lock);
 //2007-1121-01<Modify>by EinsnLiu
-           if (pDevice->bLinkPass&&
+           if (pDevice->bLinkPass &&
                  memcmp(pMgmt->abyCurrSSID,pMgmt->abyDesireSSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN)) {
-                 bScheduleCommand((HANDLE)pDevice, WLAN_CMD_DISASSOCIATE, NULL);
+               bScheduleCommand((void *) pDevice, WLAN_CMD_DISASSOCIATE, NULL);
             } else {
            pDevice->bLinkPass = FALSE;
           pMgmt->eCurrState = WMAC_STATE_IDLE;
@@ -2119,10 +2121,14 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
            netif_stop_queue(pDevice->dev);
 #ifdef  WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
            pMgmt->eScanType = WMAC_SCAN_ACTIVE;
-           if(pDevice->bWPASuppWextEnabled !=TRUE)
+          if (!pDevice->bWPASuppWextEnabled)
 #endif
-           bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
-           bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL);
+               bScheduleCommand((void *) pDevice,
+                                WLAN_CMD_BSSID_SCAN,
+                                pMgmt->abyDesireSSID);
+               bScheduleCommand((void *) pDevice,
+                                WLAN_CMD_SSID,
+                                NULL);
            spin_unlock_irq(&pDevice->lock);
       }
       pDevice->bCommit = FALSE;