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 /drivers/s390 | |
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 'drivers/s390')
-rw-r--r-- | drivers/s390/net/claw.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/ctcm_main.c | 6 | ||||
-rw-r--r-- | drivers/s390/net/netiucv.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 6 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 3 |
5 files changed, 12 insertions, 7 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index d837c3c5330f..fbc6701bef30 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -2915,7 +2915,7 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
2915 | "failed with error code %d\n", ret); | 2915 | "failed with error code %d\n", ret); |
2916 | goto out; | 2916 | goto out; |
2917 | } | 2917 | } |
2918 | dev = alloc_netdev(0,"claw%d",claw_init_netdevice); | 2918 | dev = alloc_netdev(0, "claw%d", NET_NAME_UNKNOWN, claw_init_netdevice); |
2919 | if (!dev) { | 2919 | if (!dev) { |
2920 | dev_warn(&cgdev->dev, | 2920 | dev_warn(&cgdev->dev, |
2921 | "Activating the CLAW device failed\n"); | 2921 | "Activating the CLAW device failed\n"); |
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c index 03b6ad035577..e056dd4fe44d 100644 --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c | |||
@@ -1137,9 +1137,11 @@ static struct net_device *ctcm_init_netdevice(struct ctcm_priv *priv) | |||
1137 | return NULL; | 1137 | return NULL; |
1138 | 1138 | ||
1139 | if (IS_MPC(priv)) | 1139 | if (IS_MPC(priv)) |
1140 | dev = alloc_netdev(0, MPC_DEVICE_GENE, ctcm_dev_setup); | 1140 | dev = alloc_netdev(0, MPC_DEVICE_GENE, NET_NAME_UNKNOWN, |
1141 | ctcm_dev_setup); | ||
1141 | else | 1142 | else |
1142 | dev = alloc_netdev(0, CTC_DEVICE_GENE, ctcm_dev_setup); | 1143 | dev = alloc_netdev(0, CTC_DEVICE_GENE, NET_NAME_UNKNOWN, |
1144 | ctcm_dev_setup); | ||
1143 | 1145 | ||
1144 | if (!dev) { | 1146 | if (!dev) { |
1145 | CTCM_DBF_TEXT_(ERROR, CTC_DBF_CRIT, | 1147 | CTCM_DBF_TEXT_(ERROR, CTC_DBF_CRIT, |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index ce16d1bdb20a..0a87809c8af7 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -2015,7 +2015,7 @@ static struct net_device *netiucv_init_netdevice(char *username, char *userdata) | |||
2015 | struct net_device *dev; | 2015 | struct net_device *dev; |
2016 | 2016 | ||
2017 | dev = alloc_netdev(sizeof(struct netiucv_priv), "iucv%d", | 2017 | dev = alloc_netdev(sizeof(struct netiucv_priv), "iucv%d", |
2018 | netiucv_setup_netdevice); | 2018 | NET_NAME_UNKNOWN, netiucv_setup_netdevice); |
2019 | if (!dev) | 2019 | if (!dev) |
2020 | return NULL; | 2020 | return NULL; |
2021 | rtnl_lock(); | 2021 | rtnl_lock(); |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 5ef5b4f45758..c2679bfe7f66 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -952,10 +952,12 @@ static int qeth_l2_setup_netdev(struct qeth_card *card) | |||
952 | { | 952 | { |
953 | switch (card->info.type) { | 953 | switch (card->info.type) { |
954 | case QETH_CARD_TYPE_IQD: | 954 | case QETH_CARD_TYPE_IQD: |
955 | card->dev = alloc_netdev(0, "hsi%d", ether_setup); | 955 | card->dev = alloc_netdev(0, "hsi%d", NET_NAME_UNKNOWN, |
956 | ether_setup); | ||
956 | break; | 957 | break; |
957 | case QETH_CARD_TYPE_OSN: | 958 | case QETH_CARD_TYPE_OSN: |
958 | card->dev = alloc_netdev(0, "osn%d", ether_setup); | 959 | card->dev = alloc_netdev(0, "osn%d", NET_NAME_UNKNOWN, |
960 | ether_setup); | ||
959 | card->dev->flags |= IFF_NOARP; | 961 | card->dev->flags |= IFF_NOARP; |
960 | break; | 962 | break; |
961 | default: | 963 | default: |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 14e0b5810e8c..f8427a2c4840 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -3287,7 +3287,8 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) | |||
3287 | } | 3287 | } |
3288 | } | 3288 | } |
3289 | } else if (card->info.type == QETH_CARD_TYPE_IQD) { | 3289 | } else if (card->info.type == QETH_CARD_TYPE_IQD) { |
3290 | card->dev = alloc_netdev(0, "hsi%d", ether_setup); | 3290 | card->dev = alloc_netdev(0, "hsi%d", NET_NAME_UNKNOWN, |
3291 | ether_setup); | ||
3291 | if (!card->dev) | 3292 | if (!card->dev) |
3292 | return -ENODEV; | 3293 | return -ENODEV; |
3293 | card->dev->flags |= IFF_NOARP; | 3294 | card->dev->flags |= IFF_NOARP; |