diff options
author | Tom Gundersen <teg@jklm.no> | 2014-07-14 10:37:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-15 19:12:48 -0400 |
commit | c835a677331495cf137a7f8a023463afd9f032f8 (patch) | |
tree | ca1b7c3aa3c2404f7912388e70f7e0cb9cf37043 /net/bluetooth | |
parent | 238fa3623a5709d29673ed78ff8e714d040fbb89 (diff) |
net: set name_assign_type in alloc_netdev()
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
all users to pass NET_NAME_UNKNOWN.
Coccinelle patch:
@@
expression sizeof_priv, name, setup, txqs, rxqs, count;
@@
(
-alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
+alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
|
-alloc_netdev_mq(sizeof_priv, name, setup, count)
+alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
|
-alloc_netdev(sizeof_priv, name, setup)
+alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
)
v9: move comments here from the wrong commit
Signed-off-by: Tom Gundersen <teg@jklm.no>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/6lowpan.c | 2 | ||||
-rw-r--r-- | net/bluetooth/bnep/core.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 5a7f81df603c..206b65ccd5b8 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c | |||
@@ -712,7 +712,7 @@ static int setup_netdev(struct l2cap_chan *chan, struct lowpan_dev **dev) | |||
712 | unsigned long flags; | 712 | unsigned long flags; |
713 | 713 | ||
714 | netdev = alloc_netdev(sizeof(struct lowpan_dev), IFACE_NAME_TEMPLATE, | 714 | netdev = alloc_netdev(sizeof(struct lowpan_dev), IFACE_NAME_TEMPLATE, |
715 | netdev_setup); | 715 | NET_NAME_UNKNOWN, netdev_setup); |
716 | if (!netdev) | 716 | if (!netdev) |
717 | return -ENOMEM; | 717 | return -ENOMEM; |
718 | 718 | ||
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index a841d3e776c5..85bcc21e84d2 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c | |||
@@ -538,8 +538,9 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) | |||
538 | 538 | ||
539 | /* session struct allocated as private part of net_device */ | 539 | /* session struct allocated as private part of net_device */ |
540 | dev = alloc_netdev(sizeof(struct bnep_session), | 540 | dev = alloc_netdev(sizeof(struct bnep_session), |
541 | (*req->device) ? req->device : "bnep%d", | 541 | (*req->device) ? req->device : "bnep%d", |
542 | bnep_net_setup); | 542 | NET_NAME_UNKNOWN, |
543 | bnep_net_setup); | ||
543 | if (!dev) | 544 | if (!dev) |
544 | return -ENOMEM; | 545 | return -ENOMEM; |
545 | 546 | ||