Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b256f9df authored by Martin Michlmayr's avatar Martin Michlmayr Committed by Russell King
Browse files

[MMC] au1xmmc: Fix compilation error by using platform_driver



drivers/mmc/au1xmmc.c currently doesn't compile; it needs to be
converted to use platform_driver.  I cannot test this change because
of lack of hardware but I followed the drivers this one is based on,
and the code is certainly not worse than before.

drivers/mmc/au1xmmc.c: At top level:
drivers/mmc/au1xmmc.c:1002: error: ‘platform_bus_type’ undeclared here (not in a function)
make[2]: *** [drivers/mmc/au1xmmc.o] Error 1

Signed-off-by: default avatarMartin Michlmayr <tbm@cyrius.com>
Acked-by: default avatarJordan Crouse <jordan.crouse@amd.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent c499ec24
Loading
Loading
Loading
Loading
+11 −10
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@
#include <linux/config.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/mm.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/dma-mapping.h>
@@ -887,7 +887,7 @@ struct mmc_host_ops au1xmmc_ops = {
	.set_ios	= au1xmmc_set_ios,
	.set_ios	= au1xmmc_set_ios,
};
};


static int au1xmmc_probe(struct device *dev)
static int __devinit au1xmmc_probe(struct platform_device *pdev)
{
{


	int i, ret = 0;
	int i, ret = 0;
@@ -904,7 +904,7 @@ static int au1xmmc_probe(struct device *dev)
	disable_irq(AU1100_SD_IRQ);
	disable_irq(AU1100_SD_IRQ);


	for(i = 0; i < AU1XMMC_CONTROLLER_COUNT; i++) {
	for(i = 0; i < AU1XMMC_CONTROLLER_COUNT; i++) {
		struct mmc_host *mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), dev);
		struct mmc_host *mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), &pdev->dev);
		struct au1xmmc_host *host = 0;
		struct au1xmmc_host *host = 0;


		if (!mmc) {
		if (!mmc) {
@@ -967,7 +967,7 @@ static int au1xmmc_probe(struct device *dev)
	return 0;
	return 0;
}
}


static int au1xmmc_remove(struct device *dev)
static int __devexit au1xmmc_remove(struct platform_device *pdev)
{
{


	int i;
	int i;
@@ -997,23 +997,24 @@ static int au1xmmc_remove(struct device *dev)
	return 0;
	return 0;
}
}


static struct device_driver au1xmmc_driver = {
static struct platform_driver au1xmmc_driver = {
	.name          = DRIVER_NAME,
	.bus           = &platform_bus_type,
	.probe         = au1xmmc_probe,
	.probe         = au1xmmc_probe,
	.remove        = au1xmmc_remove,
	.remove        = au1xmmc_remove,
	.suspend       = NULL,
	.suspend       = NULL,
	.resume        = NULL
	.resume        = NULL,
	.driver        = {
		.name  = DRIVER_NAME,
	},
};
};


static int __init au1xmmc_init(void)
static int __init au1xmmc_init(void)
{
{
	return driver_register(&au1xmmc_driver);
	return platform_driver_register(&au1xmmc_driver);
}
}


static void __exit au1xmmc_exit(void)
static void __exit au1xmmc_exit(void)
{
{
	driver_unregister(&au1xmmc_driver);
	platform_driver_unregister(&au1xmmc_driver);
}
}


module_init(au1xmmc_init);
module_init(au1xmmc_init);