Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759239Ab2EXUtW (ORCPT ); Thu, 24 May 2012 16:49:22 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:45121 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751513Ab2EXUtT (ORCPT ); Thu, 24 May 2012 16:49:19 -0400 MIME-Version: 1.0 In-Reply-To: <20120524203647.GA16024@core.coreip.homeip.net> References: <20120524083216.GD10562@core.coreip.homeip.net> <20120524180154.GA15036@core.coreip.homeip.net> <20120524195851.GA15306@core.coreip.homeip.net> <20120524203647.GA16024@core.coreip.homeip.net> From: Linus Torvalds Date: Thu, 24 May 2012 13:48:57 -0700 X-Google-Sender-Auth: ofds9IzlrT9UdIXtzhfvVOJN1eU Message-ID: Subject: Re: [git pull] Input updates for 3.5-rc0 To: Dmitry Torokhov Cc: Greg Kroah-Hartman , Andrew Morton , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1423 Lines: 39 On Thu, May 24, 2012 at 1:36 PM, Dmitry Torokhov 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/