Commit aeb7ed14 authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller

bridge: use kobj_to_dev instead of to_dev

kobj_to_dev has been defined in linux/device.h, so I replace to_dev
with it.
Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8099c9ed
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "br_private.h" #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))) #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, ...@@ -814,7 +813,7 @@ static ssize_t brforward_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr, struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count) 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); struct net_bridge *br = to_bridge(dev);
int n; int n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment