diff options
author | Russell King <rmk@flint.arm.linux.org.uk> | 2005-01-15 10:44:40 +0000 |
---|---|---|
committer | Russell King <rmk@flint.arm.linux.org.uk> | 2005-01-15 10:44:40 +0000 |
commit | 8e7e4852ec4387132ecd679bfaa7ea0f9f2dc85d (patch) | |
tree | 9f05e9f6fb1ea13bf1980a24ca76dcd7151247ac /drivers | |
parent | 62343f7629a612d82f0314777b17dff7807976dc (diff) | |
download | history-8e7e4852ec4387132ecd679bfaa7ea0f9f2dc85d.tar.gz |
[MMC] Add comment about GENHD_FL_REMOVABLE to mmc_block
We don't set GENHD_FL_REMOVABLE because this flag indicates that
the media may be removed while the block device persists. Since
MMC destroys the block device when the card (media + on-board
controller) is removed, the block device will never exist without
media present. Therefore, setting GENHD_FL_REMOVABLE would be
misleading.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/mmc_block.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index 49a1f1a40d9d2b..ea2927ee4085ba 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c @@ -332,6 +332,18 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) md->disk->queue = md->queue.queue; md->disk->driverfs_dev = &card->dev; + /* + * As discussed on lkml, GENHD_FL_REMOVABLE should: + * + * - be set for removable media with permanent block devices + * - be unset for removable block devices with permanent media + * + * Since MMC block devices clearly fall under the second + * case, we do not set GENHD_FL_REMOVABLE. Userspace + * should use the block device creation/destruction hotplug + * messages to tell when the card is present. + */ + sprintf(md->disk->disk_name, "mmcblk%d", devidx); sprintf(md->disk->devfs_name, "mmc/blk%d", devidx); |