mmc: core: propagate removable attribute to driver core
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 25 Jul 2023 14:17:25 +0000 (16:17 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 9 Aug 2023 11:21:48 +0000 (13:21 +0200)
commit9e4f4fe5ec1a7d6df5eceae0da33c24b753e34d0
tree5ca85b85ba0dca0e461126e369e215f7aa2bb520
parentc62da8a8a9872039ff3751d65a7f7b101a81cdcd
mmc: core: propagate removable attribute to driver core

Userspace can use this to distinguish hotpluggable mmc devices such as
sdcards from non-hotpluggable ones such as eMMC.
One example is the lsblk tool from util-linux.

Note that dev_set_removable() is not related to GENHD_FL_REMOVABLE which
is not applicable as per the comment in drivers/mmc/core/block.c

Link: https://github.com/util-linux/util-linux/issues/2379
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20230725-mmc-removable-v1-1-b2e0c4f18e6d@weissschuh.net
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/bus.c