]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
bridge: use kobj_to_dev instead of to_dev
authorGeliang Tang <geliangtang@163.com>
Wed, 23 Dec 2015 12:42:21 +0000 (20:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Dec 2015 03:26:48 +0000 (22:26 -0500)
kobj_to_dev has been defined in linux/device.h, so I replace to_dev
with it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_sysfs_br.c

index 8365bd53c42179dec15314fa99bf2346f729899f..6b8091407ca3126b333c76c5104f5a8ca6803e49 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "br_private.h"
 
-#define to_dev(obj)    container_of(obj, struct device, kobj)
 #define to_bridge(cd)  ((struct net_bridge *)netdev_priv(to_net_dev(cd)))
 
 /*
@@ -814,7 +813,7 @@ static ssize_t brforward_read(struct file *filp, struct kobject *kobj,
                              struct bin_attribute *bin_attr,
                              char *buf, loff_t off, size_t count)
 {
-       struct device *dev = to_dev(kobj);
+       struct device *dev = kobj_to_dev(kobj);
        struct net_bridge *br = to_bridge(dev);
        int n;