summaryrefslogtreecommitdiff
path: root/drivers/staging/gdm724x
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2013-08-25 11:49:37 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-25 09:58:36 -0700
commit57f1d4d39e8a284188912417a1de5ecf6469a002 (patch)
tree7ffa7db6fd1a6b6497765a8bf759b7302d25d5a7 /drivers/staging/gdm724x
parente7c8a7e350e22bf60d94d5e9361cee29058684c1 (diff)
staging: gdm724x: Remove tests of KERNELVERSION
Kernel code need not test for KERNELVERSION. Besides being unnecessary for an in-kernel driver, these lines will cause a build failure for any source tree with a stale include/linux/version.h. This patch is only compile tested. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm724x')
-rw-r--r--drivers/staging/gdm724x/netlink_k.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/staging/gdm724x/netlink_k.c b/drivers/staging/gdm724x/netlink_k.c
index 90004a7a16c2..9e8be6a48261 100644
--- a/drivers/staging/gdm724x/netlink_k.c
+++ b/drivers/staging/gdm724x/netlink_k.c
@@ -91,24 +91,15 @@ struct sock *netlink_init(int unit,
void (*cb)(struct net_device *dev, u16 type, void *msg, int len))
{
struct sock *sock;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
struct netlink_kernel_cfg cfg = {
.input = netlink_rcv,
};
-#endif
#if !defined(DEFINE_MUTEX)
init_MUTEX(&netlink_mutex);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
- sock = netlink_kernel_create(&init_net, unit, 0, netlink_rcv, NULL,
- THIS_MODULE);
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0)
- sock = netlink_kernel_create(&init_net, unit, THIS_MODULE, &cfg);
-#else
sock = netlink_kernel_create(&init_net, unit, &cfg);
-#endif
if (sock)
rcv_cb = cb;
@@ -142,11 +133,7 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
nlh = nlmsg_put(skb, 0, seq, type, len, 0);
memcpy(NLMSG_DATA(nlh), msg, len);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0)
- NETLINK_CB(skb).pid = 0;
-#else
NETLINK_CB(skb).portid = 0;
-#endif
NETLINK_CB(skb).dst_group = 0;
ret = netlink_broadcast(sock, skb, 0, group+1, GFP_ATOMIC);