[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130411115201.2471a94f@griffin>
Date: Thu, 11 Apr 2013 11:52:01 +0200
From: Jiri Benc <jbenc@...hat.com>
To: Ben Hutchings <bhutchings@...arflare.com>
Cc: David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
<richardcochran@...il.com>
Subject: Re: [PATCH net-next] ptp: dynamic allocation of PHC char devices
On Wed, 10 Apr 2013 19:12:39 +0100, Ben Hutchings wrote:
> On Wed, 2013-04-10 at 13:49 -0400, David Miller wrote:
> > Can't multiple (unrelated) devices carve out minor space in the same
> > major? Isn't that why it's designed this way?
>
> Only at a level above the core char device functions, e.g.
> misc_register() for singleton devices. Unless I'm very much mistaken,
> when you allocate a char device range and specify major=0 you get a
> dynamically allocated and previously unused major, regardless of how
> many minors you asked for.
You're correct. And thinking about it, I indeed see no reason not to
allocate the full range. We save some memory that way, as each minor
range allocation is tracked by register_chrdev_region, and the code is
going to be simpler.
I'll respin the patch.
Thanks,
Jiri
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists