pktgen: use proc_create_data()
authorAlexey Dobriyan <adobriyan@gmail.com>
Sat, 29 Aug 2009 06:34:43 +0000 (23:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Aug 2009 06:41:43 +0000 (23:41 -0700)
It looks like after rename device proc entry is unusable,
because of no ->read_proc or ->proc_fops.

And create_proc_entry() is deprecated.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c

index 42e4cce08a92bad985abb6e93b0907dc740e1a19..2001cb1cf5cc37e9eedaaf67c3f7231463166bd6 100644 (file)
@@ -1882,8 +1882,10 @@ static void pktgen_change_name(struct net_device *dev)
 
                        remove_proc_entry(pkt_dev->entry->name, pg_proc_dir);
 
-                       pkt_dev->entry = create_proc_entry(dev->name, 0600,
-                                                          pg_proc_dir);
+                       pkt_dev->entry = proc_create_data(dev->name, 0600,
+                                                         pg_proc_dir,
+                                                         &pktgen_if_fops,
+                                                         pkt_dev);
                        if (!pkt_dev->entry)
                                printk(KERN_ERR "pktgen: can't move proc "
                                       " entry for '%s'\n", dev->name);