Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[pandora-kernel.git] / drivers / mmc / core / bus.h
index 4f35431..1817876 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);