diff options
author | Tilman Schmidt <tilman@imap.cc> | 2006-04-11 09:55:07 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 17:18:49 +0400 |
commit | b1d47464c947f08125dc4ac4a2321ced9e2fed29 (patch) | |
tree | 6a977f4335c5a2ab734779fb52565c81eb61bb1b /drivers/isdn/gigaset/bas-gigaset.c | |
parent | 784d5858aac58c06608def862d73ae9a32f5ee23 (diff) | |
download | linux-b1d47464c947f08125dc4ac4a2321ced9e2fed29.tar.xz |
[PATCH] isdn4linux: Siemens Gigaset drivers: sysfs usage
With Hansjoerg Lipp <hjlipp@web.de>
Correct the way the Gigaset drivers create their sysfs entries.
Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/gigaset/bas-gigaset.c')
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 580831d9dba1..1cf48cfad1de 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c @@ -2217,7 +2217,7 @@ static int gigaset_probe(struct usb_interface *interface, usb_get_dev(udev); ucs->udev = udev; ucs->interface = interface; - cs->dev = &udev->dev; + cs->dev = &interface->dev; /* allocate URBs: * - one for the interrupt pipe @@ -2289,14 +2289,13 @@ static int gigaset_probe(struct usb_interface *interface, /* tell common part that the device is ready */ if (startmode == SM_LOCKED) atomic_set(&cs->mstate, MS_LOCKED); - if (!gigaset_start(cs)) - goto error; /* save address of controller structure */ usb_set_intfdata(interface, cs); - /* set up device sysfs */ - gigaset_init_dev_sysfs(interface); + if (!gigaset_start(cs)) + goto error; + return 0; error: @@ -2313,23 +2312,24 @@ static void gigaset_disconnect(struct usb_interface *interface) struct cardstate *cs; struct bas_cardstate *ucs; - /* clear device sysfs */ - gigaset_free_dev_sysfs(interface); - cs = usb_get_intfdata(interface); - usb_set_intfdata(interface, NULL); IFNULLRET(cs); ucs = cs->hw.bas; IFNULLRET(ucs); - dev_info(cs->dev, "disconnecting GigaSet base"); + dev_info(cs->dev, "disconnecting Gigaset base\n"); gigaset_stop(cs); freeurbs(cs); + usb_set_intfdata(interface, NULL); kfree(ucs->rcvbuf); ucs->rcvbuf = NULL; ucs->rcvbuf_size = 0; atomic_set(&ucs->basstate, 0); + usb_put_dev(ucs->udev); + ucs->interface = NULL; + ucs->udev = NULL; + cs->dev = NULL; gigaset_unassign(cs); } |