/* Add sysfs entries to ethernet device added to a bridge. Creates a brport subdirectory with bridge attributes. Puts symlink in bridge's brport subdirectory  */
int br_sysfs_addif(struct net_bridge_port *p)
/* Add sysfs entries to ethernet device added to a bridge. Creates a brport subdirectory with bridge attributes. Puts symlink in bridge's brport subdirectory  */
int br_sysfs_addif(struct net_bridge_port *p)
{
	struct net_bridge *br = p->br;
	struct brport_attribute **a;
	int err;
	err = sysfs_create_link(&p->kobj, &br->dev->dev.kobj,
				SYSFS_BRIDGE_PORT_LINK);
	if (err)
		goto out2;
	for (a = brport_attrs; *a; ++a) {
		err = sysfs_create_file(&p->kobj, &((*a)->attr));
		if (err)
			goto out2;
	}
	err = sysfs_create_link(br->ifobj, &p->kobj, p->dev->name);
out2:
	return err;
}