浏览代码

Staging: w35und: Remove unused fields from struct wb_usb

This patch removes two unused fields from struct wb_usb:

  - DetectCount which is always zero

  - IsUsb20 which is a write-only struct member

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pekka Enberg 14 年之前
父节点
当前提交
9be98819d3
共有 3 个文件被更改,包括 2 次插入9 次删除
  1. 0 1
      drivers/staging/winbond/wb35reg_s.h
  2. 2 6
      drivers/staging/winbond/wbusb.c
  3. 0 2
      drivers/staging/winbond/wbusb_s.h

+ 0 - 1
drivers/staging/winbond/wb35reg_s.h

@@ -234,7 +234,6 @@ u32 hal_get_bss_pk_cnt(struct hw_data *hw_data);
 
 /* return 100ms count */
 #define hal_get_time_count(_P)		(_P->time_count / 10)
-#define hal_detect_error(_P)		(_P->WbUsb.DetectCount)
 
 #define hal_ibss_disconnect(_A)		(hal_stop_sync_bss(_A))
 

+ 2 - 6
drivers/staging/winbond/wbusb.c

@@ -337,10 +337,8 @@ static void hal_stop(struct hw_data *pHwData)
 static unsigned char hal_idle(struct hw_data *pHwData)
 {
 	struct wb35_reg *reg = &pHwData->reg;
-	struct wb_usb *pWbUsb = &pHwData->WbUsb;
 
-	if (!pHwData->SurpriseRemove
-	    && (pWbUsb->DetectCount || reg->EP0vm_state != VM_STOP))
+	if (!pHwData->SurpriseRemove && reg->EP0vm_state != VM_STOP)
 		return false;
 
 	return true;
@@ -786,10 +784,8 @@ static int wb35_probe(struct usb_interface *intf,
 	interface = intf->cur_altsetting;
 	endpoint = &interface->endpoint[0].desc;
 
-	if (endpoint[2].wMaxPacketSize == 512) {
+	if (endpoint[2].wMaxPacketSize == 512)
 		printk("[w35und] Working on USB 2.0\n");
-		pWbUsb->IsUsb20 = 1;
-	}
 
 	err = wb35_hw_init(dev);
 	if (err)

+ 0 - 2
drivers/staging/winbond/wbusb_s.h

@@ -11,8 +11,6 @@
 #include <linux/types.h>
 
 struct wb_usb {
-	u32	IsUsb20;
 	struct	usb_device *udev;
-	u32	DetectCount;
 };
 #endif