Commit d6ae1d26 authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

[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: default avatarDavid Brownell <dbrownell@users.sourceforge.ne>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent e574e010
......@@ -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 Yrjl");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment