]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/8021q/vlanproc.c
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[linux-2.6-omap-h63xx.git] / net / 8021q / vlanproc.c
index daad0064e2c2457fdd7103fe909cdce2458f9056..0feefa4e1a4b784b60daea32cde2e7a6aa83d0bc 100644 (file)
  *****************************************************************************/
 
 #include <linux/module.h>
-#include <linux/stddef.h>      /* offsetof(), etc. */
-#include <linux/errno.h>       /* return codes */
+#include <linux/errno.h>
 #include <linux/kernel.h>
-#include <linux/slab.h>                /* kmalloc(), kfree() */
-#include <linux/mm.h>
-#include <linux/string.h>      /* inline mem*, str* functions */
-#include <linux/init.h>                /* __initfunc et al. */
-#include <asm/byteorder.h>     /* htons(), etc. */
-#include <asm/uaccess.h>       /* copy_to_user */
-#include <asm/io.h>
+#include <linux/string.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/fs.h>
@@ -176,12 +169,11 @@ int vlan_proc_add_dev(struct net_device *vlandev)
        struct vlan_dev_info *dev_info = vlan_dev_info(vlandev);
        struct vlan_net *vn = net_generic(dev_net(vlandev), vlan_net_id);
 
-       dev_info->dent = proc_create(vlandev->name, S_IFREG|S_IRUSR|S_IWUSR,
-                                    vn->proc_vlan_dir, &vlandev_fops);
+       dev_info->dent =
+               proc_create_data(vlandev->name, S_IFREG|S_IRUSR|S_IWUSR,
+                                vn->proc_vlan_dir, &vlandev_fops, vlandev);
        if (!dev_info->dent)
                return -ENOBUFS;
-
-       dev_info->dent->data = vlandev;
        return 0;
 }
 
@@ -291,7 +283,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
        static const char fmt[] = "%30s %12lu\n";
        int i;
 
-       if (!(vlandev->priv_flags & IFF_802_1Q_VLAN))
+       if (!is_vlan_dev(vlandev))
                return 0;
 
        seq_printf(seq,