net: l2tp_eth: fix kernel panic on rmmod l2tp_eth
[pandora-kernel.git] / net / nfc / netlink.c
index f1829f6..581d419 100644 (file)
@@ -33,7 +33,7 @@ static struct genl_multicast_group nfc_genl_event_mcgrp = {
        .name = NFC_GENL_MCAST_EVENT_NAME,
 };
 
-struct genl_family nfc_genl_family = {
+static struct genl_family nfc_genl_family = {
        .id = GENL_ID_GENERATE,
        .hdrsize = 0,
        .name = NFC_GENL_NAME,
@@ -128,7 +128,7 @@ static int nfc_genl_dump_targets(struct sk_buff *skb,
                cb->args[1] = (long) dev;
        }
 
-       spin_lock_bh(&dev->targets_lock);
+       device_lock(&dev->dev);
 
        cb->seq = dev->targets_generation;
 
@@ -141,7 +141,7 @@ static int nfc_genl_dump_targets(struct sk_buff *skb,
                i++;
        }
 
-       spin_unlock_bh(&dev->targets_lock);
+       device_unlock(&dev->dev);
 
        cb->args[0] = i;