From: David Brownell Date: Tue, 26 Jul 2005 12:56:25 +0000 (-0700) Subject: [PATCH] ARM: OMAP: mmc MODULE_ALIAS, warnings X-Git-Tag: v2.6.13-omap1~53 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d6ae1d261f467dcabfce1f90bb43d386aac21713;p=linux-2.6-omap-h63xx.git [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 --- 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ä");