From d6ae1d261f467dcabfce1f90bb43d386aac21713 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Tue, 26 Jul 2005 05:56:25 -0700 Subject: [PATCH] [PATCH] ARM: OMAP: mmc MODULE_ALIAS, warnings As with OHCI, the module name and device name differ, so to coldplug a MODULE_ALIAS is needed. Plus cope with a recent API change, removing compile warnings (and oops if you use the sysfs attributes). Use DRIVER_NAME more, including as a MODULE_ALIAS so that coldplug can work by scanning /sys/devices/platform and just modprobing. Cope with some driver model changes that promote shared attribute methods. Signed-off-by: David Brownell Signed-off-by: Tony Lindgren --- drivers/mmc/omap.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c index a6b843369a6..f5339a467d1 100644 --- a/drivers/mmc/omap.c +++ b/drivers/mmc/omap.c @@ -102,7 +102,8 @@ mmc_omap_cover_is_open(struct mmc_omap_host *host) } static ssize_t -mmc_omap_show_cover_switch(struct device *dev, char *buf) +mmc_omap_show_cover_switch(struct device *dev, + struct device_attribute *attr, char *buf) { struct mmc_omap_host *host = dev_get_drvdata(dev); @@ -112,13 +113,16 @@ mmc_omap_show_cover_switch(struct device *dev, char *buf) static DEVICE_ATTR(cover_switch, S_IRUGO, mmc_omap_show_cover_switch, NULL); static ssize_t -mmc_omap_show_enable_poll(struct device *dev, char *buf) +mmc_omap_show_enable_poll(struct device *dev, + struct device_attribute *attr, char *buf) { return snprintf(buf, PAGE_SIZE, "%d\n", mmc_omap_enable_poll); } static ssize_t -mmc_omap_store_enable_poll(struct device *dev, const char *buf, size_t size) +mmc_omap_store_enable_poll(struct device *dev, + struct device_attribute *attr, const char *buf, + size_t size) { int enable_poll; @@ -1262,7 +1266,7 @@ static int mmc_omap_resume(struct device *dev, u32 level) #endif static struct device_driver mmc_omap_driver = { - .name = "mmci-omap", + .name = DRIVER_NAME, .bus = &platform_bus_type, .probe = mmc_omap_probe, .remove = __exit_p(mmc_omap_remove), @@ -1285,4 +1289,5 @@ module_exit(mmc_omap_exit); MODULE_DESCRIPTION("OMAP Multimedia Card driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS(DRIVER_NAME); MODULE_AUTHOR("Juha Yrjölä"); -- 2.41.1