From b096c03e4f00d90d247034e696e32e80a7bd9f10 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Tue, 12 Jan 2010 23:46:27 +0100 Subject: [PATCH] compat-wireless: remove device_type in usbnet.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- patches/14-device-type.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/patches/14-device-type.patch b/patches/14-device-type.patch index fdd7b2339a06..5c4f4d7c4cca 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) -- 2.30.2