Linux Input/HID development
 help / color / mirror / Atom feed
* disconnect in ati_remote2
@ 2008-07-02 21:31 Oliver Neukum
       [not found] ` <200807022331.44288.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Neukum @ 2008-07-02 21:31 UTC (permalink / raw)
  To: Ville Syrjala
  Cc: linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

Hi,

this doesn't look quite right. Somebody might use sysfs or usbfs to
disconnect only one interface. In that case you should give up the other
interface, not depending on the first interface being disconnected.

	Regards
		Oliver

static void ati_remote2_disconnect(struct usb_interface *interface)
{
	struct ati_remote2 *ar2;
	struct usb_host_interface *alt = interface->cur_altsetting;

	if (alt->desc.bInterfaceNumber)
		return;

	ar2 = usb_get_intfdata(interface);
	usb_set_intfdata(interface, NULL);

	input_unregister_device(ar2->idev);

	ati_remote2_urb_cleanup(ar2);

	usb_driver_release_interface(&ati_remote2_driver, ar2->intf[1]);

	kfree(ar2);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: disconnect in ati_remote2
       [not found] ` <200807022331.44288.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
@ 2008-07-03 22:49   ` Ville Syrjälä
  0 siblings, 0 replies; 2+ messages in thread
From: Ville Syrjälä @ 2008-07-03 22:49 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

On Wed, Jul 02, 2008 at 11:31:43PM +0200, Oliver Neukum wrote:
> Hi,
> 
> this doesn't look quite right. Somebody might use sysfs or usbfs to
> disconnect only one interface. In that case you should give up the other
> interface, not depending on the first interface being disconnected.

I never considered the possibility of disconnecting just one interface.
I'll put it on my TODO list for the future.

-- 
Ville Syrjälä
syrjala-ORSVBvAovxo@public.gmane.org
http://www.sci.fi/~syrjala/
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-03 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 21:31 disconnect in ati_remote2 Oliver Neukum
     [not found] ` <200807022331.44288.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2008-07-03 22:49   ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox