[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1206071026160.1311-100000@iolanthe.rowland.org>
Date: Thu, 7 Jun 2012 10:28:05 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Stefani Seibold <stefani@...bold.net>
cc: Greg KH <gregkh@...uxfoundation.org>,
<linux-kernel@...r.kernel.org>, <oneukum@...e.de>,
<alan@...rguk.ukuu.org.uk>, <linux-usb@...r.kernel.org>
Subject: Re: [PATCH 04/11] remove usb_interface pointer
On Thu, 7 Jun 2012, Stefani Seibold wrote:
> I tried to implement your idea to kick away the usb_device pointer, but
> i think it is impossible. The skel_delete() function needs the
> usb_device pointer for calling usb_put, which is called from
> skel_disconnect() or skel_release().
Does skel_delete() really need to call usb_put_dev()? I suspect that
the driver doesn't need to take a reference to either the device or the
interface.
> A call of interface_to_usbdev(dev->intf) results in a udev pointer, but
> this pointer is only valid if it was called trough kref_put() from
> skel_disconnect().
>
> For an already opened devices, the call will come from skel_release()
> and in this case the interface pointer could be already owned by an
> other driver and no more longer handle by the skeleton driver.
>
> So i think we need both.
If skel_delete is changed then we don't need the usb_device pointer.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists