|
@@ -249,13 +249,12 @@ static const struct brport_attribute *brport_attrs[] = {
|
|
|
};
|
|
|
|
|
|
#define to_brport_attr(_at) container_of(_at, struct brport_attribute, attr)
|
|
|
-#define to_brport(obj) container_of(obj, struct net_bridge_port, kobj)
|
|
|
|
|
|
static ssize_t brport_show(struct kobject *kobj,
|
|
|
struct attribute *attr, char *buf)
|
|
|
{
|
|
|
struct brport_attribute *brport_attr = to_brport_attr(attr);
|
|
|
- struct net_bridge_port *p = to_brport(kobj);
|
|
|
+ struct net_bridge_port *p = kobj_to_brport(kobj);
|
|
|
|
|
|
if (!brport_attr->show)
|
|
|
return -EINVAL;
|
|
@@ -268,7 +267,7 @@ static ssize_t brport_store(struct kobject *kobj,
|
|
|
const char *buf, size_t count)
|
|
|
{
|
|
|
struct brport_attribute *brport_attr = to_brport_attr(attr);
|
|
|
- struct net_bridge_port *p = to_brport(kobj);
|
|
|
+ struct net_bridge_port *p = kobj_to_brport(kobj);
|
|
|
ssize_t ret = -EINVAL;
|
|
|
char *endp;
|
|
|
unsigned long val;
|