]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mmc/core/bus.h
Merge branch 'x86-stage-3-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / drivers / mmc / core / bus.h
index 4f35431116a86a03dfb97fbb8ca73a3babee726d..18178766ab461122797734a805041e028a4041cf 100644 (file)
 #ifndef _MMC_CORE_BUS_H
 #define _MMC_CORE_BUS_H
 
-struct mmc_card *mmc_alloc_card(struct mmc_host *host);
+#define MMC_DEV_ATTR(name, fmt, args...)                                       \
+static ssize_t mmc_##name##_show (struct device *dev, struct device_attribute *attr, char *buf)        \
+{                                                                              \
+       struct mmc_card *card = container_of(dev, struct mmc_card, dev);        \
+       return sprintf(buf, fmt, args);                                         \
+}                                                                              \
+static DEVICE_ATTR(name, S_IRUGO, mmc_##name##_show, NULL)
+
+struct mmc_card *mmc_alloc_card(struct mmc_host *host,
+       struct device_type *type);
 int mmc_add_card(struct mmc_card *card);
 void mmc_remove_card(struct mmc_card *card);