Re: [PATCH 1/2] char_dev: allow setting up and pinning parent devices

From
Al Viro <viro@ZenIV.linux.org.uk>
Date
2012-10-21 07:39:34
Also in
lkml
Reply to
Dmitry Torokhov, 2012-10-21
On Sun, Oct 21, 2012 at 12:24:30AM -0700, Dmitry Torokhov wrote:
In certain cases (for example when a cdev structure is embedded into
another object whose lifetime is controlled by a separate device object)
it is beneficial to tie lifetime of another struct device to the lifetime
of character device so that related object is not freed until after
char_dev object is freed. To achieve this allow setting a "parent" device
for character devices and pin them when doing cdev_add() and unpin when
last reference to cdev structure is being released.
Why struct device and not simply struct kobject?
Thread (8 messages) 8 messages, 3 authors, last reply 2012-10-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help