]> err.no Git - linux-2.6/commitdiff
rt2x00: Fix compile warning
authorIvo van Doorn <IvDoorn@gmail.com>
Sat, 2 Aug 2008 08:31:09 +0000 (01:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Aug 2008 08:31:09 +0000 (01:31 -0700)
rt2x00usb_vendor_request_large_buff is write-only, so it is
safe to make the argument a const.

Fixes compile warning:
drivers/net/wireless/rt2x00/rt73usb.c: In function 'rt73usb_load_firmware':
drivers/net/wireless/rt2x00/rt73usb.c:916: warning: passing argument 5 of 'rt2x00usb_vendor_request_large_buff' discards qualifiers from pointer target typ

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireless/rt2x00/rt2x00usb.c
drivers/net/wireless/rt2x00/rt2x00usb.h

index 933e6cc9359db871aafc87a0eec318c5326cbd6f..8d76bb2e031289b027ec810a9bbbc6b75754dfbd 100644 (file)
@@ -124,7 +124,7 @@ EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_buff);
 
 int rt2x00usb_vendor_request_large_buff(struct rt2x00_dev *rt2x00dev,
                                        const u8 request, const u8 requesttype,
-                                       const u16 offset, void *buffer,
+                                       const u16 offset, const void *buffer,
                                        const u16 buffer_length,
                                        const int timeout)
 {
@@ -134,7 +134,7 @@ int rt2x00usb_vendor_request_large_buff(struct rt2x00_dev *rt2x00dev,
 
        mutex_lock(&rt2x00dev->usb_cache_mutex);
 
-       tb  = buffer;
+       tb  = (char *)buffer;
        off = offset;
        len = buffer_length;
        while (len && !status) {
index ee3875f894aa9ba1d37a430e7a2e0da870a4dc11..3b4a67417f956625c55da3b88568ed08f140e3e5 100644 (file)
@@ -185,7 +185,7 @@ int rt2x00usb_vendor_req_buff_lock(struct rt2x00_dev *rt2x00dev,
  */
 int rt2x00usb_vendor_request_large_buff(struct rt2x00_dev *rt2x00dev,
                                        const u8 request, const u8 requesttype,
-                                       const u16 offset, void *buffer,
+                                       const u16 offset, const void *buffer,
                                        const u16 buffer_length,
                                        const int timeout);