2 Jul 2012 14:15
[PATCH v4 1/2] mmc: card: Move MMC specific attributes to mmc sub-directory
Maya Erez <merez <at> codeaurora.org>
2012-07-02 12:15:36 GMT
2012-07-02 12:15:36 GMT
Separate MMC specific attributes from general block device
attributes and move them from the /sys/block/≤BLOCK_DEV> directory
to /sys/block/≤BLOCK_DEV>/mmc directory
Signed-off-by: Maya Erez <merez <at> codeaurora.org>
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c965f2b..c23034d 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
<at> <at> -114,6 +114,9 <at> <at> struct mmc_blk_data {
struct device_attribute force_ro;
struct device_attribute power_ro_lock;
int area_type;
+
+ struct kobject kobj;
+ struct kobj_type kobj_type;
};
static DEFINE_MUTEX(open_lock);
<at> <at> -185,6 +188,51 <at> <at> static void mmc_blk_put(struct mmc_blk_data *md)
mutex_unlock(&open_lock);
}
+static ssize_t mmc_blk_attr_show(struct kobject *kobj, struct attribute *attr,
+ char *buf)
+{
+ struct device_attribute *dev_attr;
+ struct mmc_blk_data *md;
+ ssize_t ret;
(Continue reading)
RSS Feed