dummy: declare dummy devices as enumerated devices
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>
Tue, 12 Sep 2017 01:32:45 +0000 (09:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Sep 2017 18:28:36 +0000 (11:28 -0700)
Dummy device name is enumerated by the kernel, let user space be aware
of the naming scheme used by dummy devices:
(visible in /sys/class/net/<iface>/name_assign_type).

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dummy.c

index d0a1f9ce3168ba9c7011752a6249546abfcc02df..e31ab3b94c6f385389095d9740d95826e2690db7 100644 (file)
@@ -388,7 +388,7 @@ static int __init dummy_init_one(void)
        int err;
 
        dev_dummy = alloc_netdev(sizeof(struct dummy_priv),
-                                "dummy%d", NET_NAME_UNKNOWN, dummy_setup);
+                                "dummy%d", NET_NAME_ENUM, dummy_setup);
        if (!dev_dummy)
                return -ENOMEM;