From b1d47464c947f08125dc4ac4a2321ced9e2fed29 Mon Sep 17 00:00:00 2001 From: Tilman Schmidt Date: Mon, 10 Apr 2006 22:55:07 -0700 Subject: [PATCH] isdn4linux: Siemens Gigaset drivers: sysfs usage With Hansjoerg Lipp Correct the way the Gigaset drivers create their sysfs entries. Signed-off-by: Hansjoerg Lipp Signed-off-by: Tilman Schmidt Cc: Karsten Keil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/isdn/gigaset/bas-gigaset.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/isdn/gigaset/bas-gigaset.c') diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 580831d..1cf48cf 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); } -- cgit v1.1