Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39834
b: refs/heads/master
c: 9ab99c8
h: refs/heads/master
v: v3
  • Loading branch information
matthieu castet authored and Greg Kroah-Hartman committed Oct 17, 2006
1 parent 849be6c commit 5d2c668
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: deb8ee43a23d48116cb23eb8dd1de2348efb1e80
refs/heads/master: 9ab99c8c513313c1c5931bdbd27dcc4bc7a3b7cd
32 changes: 11 additions & 21 deletions trunk/drivers/usb/atm/ueagle-atm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1648,16 +1648,12 @@ static struct attribute *attrs[] = {
&dev_attr_stat_usunc.attr,
&dev_attr_stat_dsunc.attr,
&dev_attr_stat_firmid.attr,
NULL,
};
static struct attribute_group attr_grp = {
.attrs = attrs,
};

static int create_fs_entries(struct usb_interface *intf)
{
return sysfs_create_group(&intf->dev.kobj, &attr_grp);
}

static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
const struct usb_device_id *id)
{
Expand Down Expand Up @@ -1717,31 +1713,25 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
}
}

ret = sysfs_create_group(&intf->dev.kobj, &attr_grp);
if (ret < 0)
goto error;

ret = uea_boot(sc);
if (ret < 0) {
kfree(sc);
return ret;
}
if (ret < 0)
goto error;

ret = create_fs_entries(intf);
if (ret) {
uea_stop(sc);
kfree(sc);
return ret;
}
return 0;
}

static void destroy_fs_entries(struct usb_interface *intf)
{
sysfs_remove_group(&intf->dev.kobj, &attr_grp);
error:
kfree(sc);
return ret;
}

static void uea_unbind(struct usbatm_data *usbatm, struct usb_interface *intf)
{
struct uea_softc *sc = usbatm->driver_data;

destroy_fs_entries(intf);
sysfs_remove_group(&intf->dev.kobj, &attr_grp);
uea_stop(sc);
kfree(sc);
}
Expand Down

0 comments on commit 5d2c668

Please sign in to comment.