Re: MMC block major dev

From: Pierre Ossman
Date: Tue Aug 31 2004 - 19:44:21 EST


Russell King wrote:

On Tue, Aug 31, 2004 at 09:13:52PM +0200, Pierre Ossman wrote:


It seems that the MMC block layer hasn't been assigned a major number. The code registers the block dev with a uninitialized variable. It then proceeds to create a mmc dir under devfs. Since I'm not using devfs this then poses a problem.



First, "uninitialised variables" is a misdescription here. Variables
declared outside the scope of functions are _always_ initialised even
though there is no apparant assignment.

They're placed in the BSS, or "zero initialised" section. They have
a well defined value. Zero.

Registering with the block layer with a major number of zero means
"find me a free major number and assign that to me." This is nothing
new. If devfs can't cope with that, devfs is buggy. Use udev instead.



Ok. Please excuse my ignorance =)
My point was that I do not use a dynamic system for /dev so it would be nice to have a static major number. Since MMC now is a part of Linus' kernel maybe it's time for a permanent allocation?

Rgds
Pierre

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/