From: Greg KH <greg@kroah.com>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: Greg KH <gregkh@suse.de>, Scott Wood <scottwood@freescale.com>,
Timur Tabi <timur@freescale.com>, Arnd Bergmann <arnd@arndb.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Stuart Yoder <stuart.yoder@freescale.com>,
devicetree-discuss@vger.kernel.org
Subject: Re: How do I choose an arbitrary minor number for my tty device?
Date: Mon, 29 Nov 2010 13:44:39 -0800 [thread overview]
Message-ID: <20101129214439.GA9830@kroah.com> (raw)
In-Reply-To: <1290638647.14502.10.camel@concordia>
On Thu, Nov 25, 2010 at 09:44:07AM +1100, Michael Ellerman wrote:
> On Wed, 2010-11-24 at 10:23 -0800, Greg KH wrote:
> > On Wed, Nov 24, 2010 at 12:08:18PM -0600, Scott Wood wrote:
> > > On Wed, 24 Nov 2010 21:23:47 +1100
> > > Michael Ellerman <michael@ellerman.id.au> wrote:
> > >
> > > > On Thu, 2010-11-18 at 12:13 -0600, Scott Wood wrote:
> > > > > Unfortunately, it's not an exact match, and the fact that reg doesn't
> > > > > translate to a physical address means that AFAICT you'll currently get
> > > > > something like "byte-channel.nnn", where "nnn" is an arbitrary
> > > > > kernel-assigned number.
> > > >
> > > > Can you not use device_rename() ?
> > >
> > > Ah, didn't know about that. Still, might be nice to add support for
> > > "handle" nodes at the infrastructure level rather than in each driver.
> >
> > No, please never use that function, bad things will happen.
>
> Why? The network & wireless code uses it, so presumably it can work?
Yes it can, but networking is the only code that should use this.
> If
> not please consider:
>
> commit f470f680dfaad8731f079a033a50440082e20930
> Author: Michael Ellerman <michael@ellerman.id.au>
> Date: Thu Nov 25 09:41:28 2010 +1100
>
> driver core: Document that device_rename() is not to be used
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 6ed6454..f1fac19 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -1513,6 +1513,8 @@ EXPORT_SYMBOL_GPL(device_destroy);
> * exclusion between two different calls of device_rename
> * on the same device to ensure that new_name is valid and
> * won't conflict with other devices.
> + *
> + * "Never use this function, bad things will happen" - gregkh
Nice, I like it :)
I'll go queue this up.
greg k-h
next prev parent reply other threads:[~2010-11-29 21:47 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 21:37 How do I choose an arbitrary minor number for my tty device? Timur Tabi
2010-11-17 21:51 ` Greg KH
2010-11-17 22:10 ` Timur Tabi
2010-11-17 22:19 ` Greg KH
2010-11-17 22:42 ` Timur Tabi
2010-11-18 2:24 ` Greg KH
2010-11-18 15:31 ` Timur Tabi
2010-11-18 15:39 ` Greg KH
2010-11-18 16:03 ` Timur Tabi
2010-11-18 16:33 ` Greg KH
2010-11-18 16:36 ` Timur Tabi
2010-11-18 16:51 ` Greg KH
2010-11-18 16:56 ` Timur Tabi
2010-11-18 17:18 ` Greg KH
2010-11-18 17:38 ` Timur Tabi
2010-11-18 17:58 ` Greg KH
2010-11-18 19:35 ` Timur Tabi
2010-11-18 20:02 ` Greg KH
2010-11-18 20:06 ` Timur Tabi
2010-11-18 20:10 ` Greg KH
2010-11-18 20:43 ` Timur Tabi
2010-11-18 20:56 ` Alan Cox
2010-11-22 16:32 ` Timur Tabi
2010-11-22 20:12 ` Timur Tabi
2010-11-23 13:56 ` Alan Cox
2010-11-23 17:14 ` Timur Tabi
2010-11-23 23:03 ` Alan Cox
2010-11-18 20:58 ` Alan Cox
2010-11-18 17:21 ` Scott Wood
2010-11-18 17:42 ` Timur Tabi
2010-11-18 17:58 ` Greg KH
2010-11-18 18:13 ` Scott Wood
2010-11-24 10:23 ` Michael Ellerman
2010-11-24 18:08 ` Scott Wood
2010-11-24 18:23 ` Greg KH
2010-11-24 22:44 ` Michael Ellerman
2010-11-29 21:44 ` Greg KH [this message]
2010-11-29 21:51 ` Timur Tabi
2010-11-29 22:30 ` Greg KH
2010-11-29 22:36 ` Timur Tabi
2010-11-30 3:29 ` Greg KH
2010-11-30 4:15 ` Tabi Timur-B04825
2010-11-30 19:33 ` Timur Tabi
2010-12-01 1:00 ` Greg KH
2010-12-01 9:54 ` Kay Sievers
2010-12-02 16:12 ` Timur Tabi
2010-11-24 22:46 ` Michael Ellerman
2010-11-25 4:10 ` Grant Likely
2010-11-24 18:13 ` Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101129214439.GA9830@kroah.com \
--to=greg@kroah.com \
--cc=arnd@arndb.de \
--cc=devicetree-discuss@vger.kernel.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ellerman.id.au \
--cc=scottwood@freescale.com \
--cc=stuart.yoder@freescale.com \
--cc=timur@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox