compat-wireless: fix patch stile.
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 27 Aug 2010 18:40:48 +0000 (11:40 -0700)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Sat, 28 Aug 2010 20:27:59 +0000 (13:27 -0700)
This should not change any functionality but the patches are looking
better with theses changes.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/01-netdev.patch
patches/16-bluetooth.patch

index e168105ec6f012057778387c62325d5e4f193f6e..17b4b112cf9a34e13d91d096345a4d27b000b55c 100644 (file)
@@ -305,14 +305,12 @@ without creating a headache on maintenance of the pathes.
  }
  #endif
  
--static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,
--                               struct net_device *dev)
 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
-+static netdev_tx_t bnep_net_xmit(struct sk_buff *skb, struct net_device *dev)
+ static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,
+                                struct net_device *dev)
 +#else
 +static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev)
 +#endif
-+
  {
        struct bnep_session *s = netdev_priv(dev);
        struct sock *sk = s->sock->sk;
index 29d990a951e457cec69d630defb0fbc4aec25ed0..85e9b25eba812810685d4ba7926fcc234b433c68 100644 (file)
@@ -63,7 +63,7 @@ here still, but for now we keep this here.
 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32))
                sock_recv_ts_and_drops(msg, sk, skb);
 +#else
-+        sock_recv_timestamp(msg, sk, skb);
++              sock_recv_timestamp(msg, sk, skb);
 +#endif
  
        skb_free_datagram(sk, skb);
@@ -75,7 +75,7 @@ here still, but for now we keep this here.
 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
                amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
 +#else
-+    amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
++              amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
 +#endif
                if (amount < 0)
                        amount = 0;
@@ -201,27 +201,21 @@ here still, but for now we keep this here.
  
  static void hidp_idle_timeout(unsigned long arg)
  {
-@@ -596,10 +607,16 @@ static int hidp_session(void *arg)
-               session->input = NULL;
+@@ -597,8 +608,14 @@ static int hidp_session(void *arg)
        }
  
--      if (session->hid) {
--              hid_destroy_device(session->hid);
--              session->hid = NULL;
--      }
-+  if (session->hid) {
+       if (session->hid) {
 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
-+    hid_destroy_device(session->hid);
-+    session->hid = NULL;
+               hid_destroy_device(session->hid);
+               session->hid = NULL;
 +#else
-+    if (session->hid->claimed & HID_CLAIMED_INPUT)
-+      hidinput_disconnect(session->hid);
-+    hid_free_device(session->hid);
++              if (session->hid->claimed & HID_CLAIMED_INPUT)
++                      hidinput_disconnect(session->hid);
++              hid_free_device(session->hid);
 +#endif
-+  }
+       }
  
        /* Wakeup user-space polling for socket errors */
-       session->intr_sock->sk->sk_err = EUNATCH;
 @@ -711,6 +728,70 @@ static void hidp_close(struct hid_device
  {
  }