diff options
author | Tom Gundersen <teg@jklm.no> | 2014-07-14 16:37:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-15 16:12:48 -0700 |
commit | c835a677331495cf137a7f8a023463afd9f032f8 (patch) | |
tree | ca1b7c3aa3c2404f7912388e70f7e0cb9cf37043 /drivers/net/hamradio | |
parent | 238fa3623a5709d29673ed78ff8e714d040fbb89 (diff) | |
download | linux-c835a677331495cf137a7f8a023463afd9f032f8.tar.bz2 |
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 'drivers/net/hamradio')
-rw-r--r-- | drivers/net/hamradio/6pack.c | 3 | ||||
-rw-r--r-- | drivers/net/hamradio/baycom_epp.c | 2 | ||||
-rw-r--r-- | drivers/net/hamradio/bpqether.c | 4 | ||||
-rw-r--r-- | drivers/net/hamradio/dmascc.c | 4 | ||||
-rw-r--r-- | drivers/net/hamradio/hdlcdrv.c | 2 | ||||
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 3 | ||||
-rw-r--r-- | drivers/net/hamradio/scc.c | 2 | ||||
-rw-r--r-- | drivers/net/hamradio/yam.c | 2 |
8 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 66e2b19ef709..c3c4051a089d 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c @@ -596,7 +596,8 @@ static int sixpack_open(struct tty_struct *tty) if (tty->ops->write == NULL) return -EOPNOTSUPP; - dev = alloc_netdev(sizeof(struct sixpack), "sp%d", sp_setup); + dev = alloc_netdev(sizeof(struct sixpack), "sp%d", NET_NAME_UNKNOWN, + sp_setup); if (!dev) { err = -ENOMEM; goto out; diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index 484f77ec2ce1..a98c153f371e 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c @@ -1206,7 +1206,7 @@ static int __init init_baycomepp(void) struct net_device *dev; dev = alloc_netdev(sizeof(struct baycom_state), "bce%d", - baycom_epp_dev_setup); + NET_NAME_UNKNOWN, baycom_epp_dev_setup); if (!dev) { printk(KERN_WARNING "bce%d : out of memory\n", i); diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index d50b23cf9ea9..c2894e43840e 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c @@ -501,8 +501,8 @@ static int bpq_new_device(struct net_device *edev) struct net_device *ndev; struct bpqdev *bpq; - ndev = alloc_netdev(sizeof(struct bpqdev), "bpq%d", - bpq_setup); + ndev = alloc_netdev(sizeof(struct bpqdev), "bpq%d", NET_NAME_UNKNOWN, + bpq_setup); if (!ndev) return -ENOMEM; diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index 6636022a1027..0fad408f24aa 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c @@ -466,7 +466,7 @@ static int __init setup_adapter(int card_base, int type, int n) if (!info) goto out; - info->dev[0] = alloc_netdev(0, "", dev_setup); + info->dev[0] = alloc_netdev(0, "", NET_NAME_UNKNOWN, dev_setup); if (!info->dev[0]) { printk(KERN_ERR "dmascc: " "could not allocate memory for %s at %#3x\n", @@ -474,7 +474,7 @@ static int __init setup_adapter(int card_base, int type, int n) goto out1; } - info->dev[1] = alloc_netdev(0, "", dev_setup); + info->dev[1] = alloc_netdev(0, "", NET_NAME_UNKNOWN, dev_setup); if (!info->dev[1]) { printk(KERN_ERR "dmascc: " "could not allocate memory for %s at %#3x\n", diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index 5d78c1d08abd..c67a27245072 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c @@ -699,7 +699,7 @@ struct net_device *hdlcdrv_register(const struct hdlcdrv_ops *ops, if (privsize < sizeof(struct hdlcdrv_state)) privsize = sizeof(struct hdlcdrv_state); - dev = alloc_netdev(privsize, ifname, hdlcdrv_setup); + dev = alloc_netdev(privsize, ifname, NET_NAME_UNKNOWN, hdlcdrv_setup); if (!dev) return ERR_PTR(-ENOMEM); diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 8a6c720a4cc9..f990bb1c3e02 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -734,7 +734,8 @@ static int mkiss_open(struct tty_struct *tty) if (tty->ops->write == NULL) return -EOPNOTSUPP; - dev = alloc_netdev(sizeof(struct mkiss), "ax%d", ax_setup); + dev = alloc_netdev(sizeof(struct mkiss), "ax%d", NET_NAME_UNKNOWN, + ax_setup); if (!dev) { err = -ENOMEM; goto out; diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index 4bc6ee8e7987..57be9e0e98a6 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c @@ -1515,7 +1515,7 @@ static int scc_net_alloc(const char *name, struct scc_channel *scc) int err; struct net_device *dev; - dev = alloc_netdev(0, name, scc_net_setup); + dev = alloc_netdev(0, name, NET_NAME_UNKNOWN, scc_net_setup); if (!dev) return -ENOMEM; diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index 81901659cc9e..717433cfb81d 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c @@ -1147,7 +1147,7 @@ static int __init yam_init_driver(void) sprintf(name, "yam%d", i); dev = alloc_netdev(sizeof(struct yam_port), name, - yam_setup); + NET_NAME_UNKNOWN, yam_setup); if (!dev) { pr_err("yam: cannot allocate net device\n"); err = -ENOMEM; |