]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: part: Create the master device node when partitioned
authorDan Ehrenberg <dehrenberg@chromium.org>
Thu, 2 Apr 2015 22:15:10 +0000 (15:15 -0700)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 6 Apr 2015 00:44:01 +0000 (17:44 -0700)
commitf67adff2ea77a5ed3221be82c1da473ca281f81e
tree5bcda420d5f0071fc8d8c8c02dc68166256323e7
parent0e1642979286ecb5e2681b4326f8ebc25a8bb109
mtd: part: Create the master device node when partitioned

For many use cases, it helps to have a device node for the entire
MTD device as well as device nodes for the individual partitions.
For example, this allows querying the entire device's properties.
A common idiom is to create an additional partition which spans
over the whole device.

This patch makes a config option, CONFIG_MTD_PARTITIONED_MASTER,
which makes the master partition present even when the device is
partitioned. This isn't turned on by default since it presents
a backwards-incompatible device numbering.

The patch also makes the parent of a partition device be the master,
if the config flag is set, now that the master is a full device.

Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/Kconfig
drivers/mtd/mtdcore.c
drivers/mtd/mtdpart.c