The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Tushar Behera <tushar.behera@linaro.org>,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	jslaby@suse.cz
Subject: Re: [PATCH] tty: Fallback to use dynamic major number
Date: Thu, 16 Jan 2014 18:15:20 +0000	[thread overview]
Message-ID: <20140116181520.GL17314@sirena.org.uk> (raw)
In-Reply-To: <20140116172240.GB9587@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

On Thu, Jan 16, 2014 at 09:22:40AM -0800, Greg KH wrote:
> On Thu, Jan 16, 2014 at 05:08:14PM +0000, Mark Brown wrote:

> > No, the issue is happening because the drivers are registering things
> > at module load time and not at device instantiation time.

> That's a driver bug that could easily be fixed, instead of hacking up
> the tty core :)

Looking at the code it really, really looked intentional - in any case
that seems worthwhile, Tushar this looks like a way forwards?

> > While the drivers won't actually be run together things like the
> > multiplatform defconfig and distro configs will build them in since
> > people tend to like to get serial early on.

> Build them into the kernel and not as modules?

Yes.  It's the common case for embedded stuff to just build everything
in so people tend to do it.

> > The other solutions I can think of are moving tty_register_driver() to
> > device probe time, allowing tty_register_driver() to accept duplicate
> > majors and the complaining when the devices actually get instantiated
> > or changing major numbers where there is a duplicate which is guaranteed
> > to break at least some userspaces with static devices (which was the
> > original patch you complained about).  The first two solutions look a
> > bit fun though perhaps they fall out more easily than I suspect.

> How about fixing the drivers as I mentioned above, to not register with
> the uart or tty core until they know that their hardware is actually
> present in the system?  That would keep any tty core "hacks" from being
> needed.

Certainly makes sense to me.  I have to confess that looking at the code
it looked totally intentional and I remember dragons from the last time
I had to peer into that stuff.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-01-16 18:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16  5:03 [PATCH] tty: Fallback to use dynamic major number Tushar Behera
2014-01-16 16:18 ` Greg KH
2014-01-16 17:08   ` Mark Brown
2014-01-16 17:22     ` Greg KH
2014-01-16 18:15       ` Mark Brown [this message]
2014-01-17  9:24         ` Tushar Behera

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=20140116181520.GL17314@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tushar.behera@linaro.org \
    /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