Search Linux Wireless

[PATCH 2/2] compat-wireless: remove device_type in usbnet.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes compile warning
drivers/net/usb/usbnet.c:1279: warning: ‘wlan_type’ defined but not used
drivers/net/usb/usbnet.c:1283: warning: ‘wwan_type’ defined but not used

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 patches/14-device-type.patch |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/patches/14-device-type.patch b/patches/14-device-type.patch
index fdd7b23..5c4f4d7 100644
--- a/patches/14-device-type.patch
+++ b/patches/14-device-type.patch
@@ -34,3 +34,23 @@ compile warning.
  
  int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
  {
+--- a/drivers/net/usb/usbnet.c
++++ b/drivers/net/usb/usbnet.c
+@@ -1276,13 +1276,17 @@ static const struct net_device_ops usbne
+ 
+ // precondition: never called in_interrupt
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+ static struct device_type wlan_type = {
+ 	.name	= "wlan",
+ };
++#endif
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+ static struct device_type wwan_type = {
+ 	.name	= "wwan",
+ };
++#endif
+ 
+ int
+ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux