Re: How to support partitions in driver?

From: Russell King
Date: Thu Aug 18 2005 - 02:08:06 EST


On Thu, Aug 18, 2005 at 12:22:55PM +0530, Mukund JB`. wrote:
> I have few basic queries regarding my partition implementation in my Sd
> driver.
> Sorry for asking such petty things here. But, somehow it's not working &
> I am made to ask it here.

Why don't you use the MMC/SD layer already merged into the kernel
instead of rewriting your own. Grab a copy of Andrew Morton's
kernel, and look at the code in drivers/mmc and include/linux/mmc.

There are three host drivers there already. I'm sure you can work
out how to interface the existing framework to your device.

And suddenly you can take advantage of the already existing mmc
block device support, which does support partitions, and does
manage to get hot swapping block devices more or less correct.
(and if it doesn't, it'll be one less driver to fix later.)

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
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/