LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* device_destroy
@ 2007-02-08 15:51 James Simmons
2007-02-09 0:39 ` device_destroy Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: James Simmons @ 2007-02-08 15:51 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List
While porting over a few class_devices I discovered a problem with
device_destroy. It uses a dev_t which several classes don't use.
Should all classes require a dev_t or should we just pass in the device
itself?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: device_destroy
2007-02-08 15:51 device_destroy James Simmons
@ 2007-02-09 0:39 ` Greg KH
2007-02-09 14:51 ` device_destroy James Simmons
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2007-02-09 0:39 UTC (permalink / raw)
To: James Simmons; +Cc: Linux Kernel Mailing List
On Thu, Feb 08, 2007 at 03:51:08PM +0000, James Simmons wrote:
>
> While porting over a few class_devices I discovered a problem with
> device_destroy. It uses a dev_t which several classes don't use.
> Should all classes require a dev_t or should we just pass in the device
> itself?
As you don't have a dev_t, then you have a handle to the 'struct device'
itself, right? Then just call device_unregister(), that's all that
device_destroy() does after it finds the device in the list of devices
associated with the class.
Does this help?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: device_destroy
2007-02-09 0:39 ` device_destroy Greg KH
@ 2007-02-09 14:51 ` James Simmons
0 siblings, 0 replies; 3+ messages in thread
From: James Simmons @ 2007-02-09 14:51 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List
> > While porting over a few class_devices I discovered a problem with
> > device_destroy. It uses a dev_t which several classes don't use.
> > Should all classes require a dev_t or should we just pass in the device
> > itself?
>
> As you don't have a dev_t, then you have a handle to the 'struct device'
> itself, right? Then just call device_unregister(), that's all that
> device_destroy() does after it finds the device in the list of devices
> associated with the class.
>
> Does this help?
Okay. I needed to know if calling device_unregister directly was valid.
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-09 14:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-08 15:51 device_destroy James Simmons
2007-02-09 0:39 ` device_destroy Greg KH
2007-02-09 14:51 ` device_destroy James Simmons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).