X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmmc%2Fcore%2Fbus.c;h=fd95b18e988b3c33496c309f41dcc38356a82c47;hb=2a467d5f7d6bdc90c365db167a10022dd8351894;hp=b0c22cad9423f2878c8742f48801f422967c32df;hpb=ecaedfa385a6df297e17d6e9f296cc63f12c053f;p=linux-2.6-omap-h63xx.git diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index b0c22cad942..fd95b18e988 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -17,7 +17,6 @@ #include #include -#include "sysfs.h" #include "core.h" #include "sdio_cis.h" #include "bus.h" @@ -43,7 +42,7 @@ static ssize_t mmc_type_show(struct device *dev, } static struct device_attribute mmc_dev_attrs[] = { - MMC_ATTR_RO(type), + __ATTR(type, S_IRUGO, mmc_type_show, NULL), __ATTR_NULL, }; @@ -189,7 +188,7 @@ static void mmc_release_card(struct device *dev) /* * Allocate and initialise a new MMC card structure. */ -struct mmc_card *mmc_alloc_card(struct mmc_host *host) +struct mmc_card *mmc_alloc_card(struct mmc_host *host, struct device_type *type) { struct mmc_card *card; @@ -204,6 +203,7 @@ struct mmc_card *mmc_alloc_card(struct mmc_host *host) card->dev.parent = mmc_classdev(host); card->dev.bus = &mmc_bus_type; card->dev.release = mmc_release_card; + card->dev.type = type; return card; } @@ -248,24 +248,10 @@ int mmc_add_card(struct mmc_card *card) type, card->rca); } - card->dev.uevent_suppress = 1; - ret = device_add(&card->dev); if (ret) return ret; - if (card->host->bus_ops->sysfs_add) { - ret = card->host->bus_ops->sysfs_add(card->host, card); - if (ret) { - device_del(&card->dev); - return ret; - } - } - - card->dev.uevent_suppress = 0; - - kobject_uevent(&card->dev.kobj, KOBJ_ADD); - mmc_card_set_present(card); return 0; @@ -285,9 +271,6 @@ void mmc_remove_card(struct mmc_card *card) printk(KERN_INFO "%s: card %04x removed\n", mmc_hostname(card->host), card->rca); } - - if (card->host->bus_ops->sysfs_remove) - card->host->bus_ops->sysfs_remove(card->host, card); device_del(&card->dev); }