aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sysfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/sysfs.h')
-rw-r--r--drivers/mmc/core/sysfs.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/mmc/core/sysfs.h b/drivers/mmc/core/sysfs.h
index 80e29b3582..2a326a5b83 100644
--- a/drivers/mmc/core/sysfs.h
+++ b/drivers/mmc/core/sysfs.h
@@ -11,9 +11,17 @@
11#ifndef _MMC_CORE_SYSFS_H 11#ifndef _MMC_CORE_SYSFS_H
12#define _MMC_CORE_SYSFS_H 12#define _MMC_CORE_SYSFS_H
13 13
14void mmc_init_card(struct mmc_card *card, struct mmc_host *host); 14#define MMC_ATTR_FN(name, fmt, args...) \
15int mmc_register_card(struct mmc_card *card); 15static ssize_t mmc_##name##_show (struct device *dev, struct device_attribute *attr, char *buf) \
16void mmc_remove_card(struct mmc_card *card); 16{ \
17 struct mmc_card *card = container_of(dev, struct mmc_card, dev);\
18 return sprintf(buf, fmt, args); \
19}
20
21#define MMC_ATTR_RO(name) __ATTR(name, S_IRUGO, mmc_##name##_show, NULL)
22
23int mmc_add_attrs(struct mmc_card *card, struct device_attribute *attrs);
24void mmc_remove_attrs(struct mmc_card *card, struct device_attribute *attrs);
17 25
18struct mmc_host *mmc_alloc_host_sysfs(int extra, struct device *dev); 26struct mmc_host *mmc_alloc_host_sysfs(int extra, struct device *dev);
19int mmc_add_host_sysfs(struct mmc_host *host); 27int mmc_add_host_sysfs(struct mmc_host *host);