Re: [git pull] Input updates for 3.5-rc0

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2012-05-24 20:49:22
Also in
lkml
Reply to
Dmitry Torokhov, 2012-05-24
On Thu, May 24, 2012 at 1:36 PM, Dmitry Torokhov
[off-list ref] wrote:
Hmm, I guess we are better now with cleaning and turning devices into
zombies waiting to be reaped.
No, that wasn't the silly part of your statement.

The silly part is that

  dev_set_name(&dev->dev, "input-%s", dev_name(dev->dev.parent));

works perfectly fine if the parent goes away, for a damn simple
reason: it generates the string *once*, and doesn't care one *whit*
about the parent pointer ever again afterwards.

For exactly the same that your current

  dev_set_name(&dev->dev, "input%d", atomic_inc_return(&input_no) - 1);

doesn't care *at*all* about that "input_no" variable afterwards -
dev_set_name() will have turned it into a string, and "input_no" can
change as much as it wants, and that won't change the name of the
device.

See? So no "refcounting parents" or "zombie devices" or any crap like
that. The name is just a string.

Anyway, I can't be bothered to argue. If you think "input1" is such a
great name, and then that results in nobody actually ever *using* it
because everybody agrees it useless and will use something else,
whatever.

                Linus
Thread (20 messages) 20 messages, 4 authors, last reply 2012-05-25
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