Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166653
b: refs/heads/master
c: 44d0e19
h: refs/heads/master
i:
  166651: 3f7ea5d
v: v3
  • Loading branch information
Ben Dooks authored and Linus Torvalds committed Oct 1, 2009
1 parent b51804c commit 21ef67b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 48 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da52a7ca7a689712e689e2cc5936cd9fa34df443
refs/heads/master: 44d0e19968b3b2703aa4ee1f9a5b684425b40448
71 changes: 24 additions & 47 deletions trunk/drivers/mmc/host/s3cmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,11 +1244,14 @@ static inline void s3cmci_cpufreq_deregister(struct s3cmci_host *host)
}
#endif

static int __devinit s3cmci_probe(struct platform_device *pdev, int is2440)
static int __devinit s3cmci_probe(struct platform_device *pdev)
{
struct s3cmci_host *host;
struct mmc_host *mmc;
int ret;
int is2440;

is2440 = platform_get_device_id(pdev)->driver_data;

mmc = mmc_alloc_host(sizeof(struct s3cmci_host), &pdev->dev);
if (!mmc) {
Expand Down Expand Up @@ -1473,20 +1476,22 @@ static int __devexit s3cmci_remove(struct platform_device *pdev)
return 0;
}

static int __devinit s3cmci_2410_probe(struct platform_device *dev)
{
return s3cmci_probe(dev, 0);
}
static struct platform_device_id s3cmci_driver_ids[] = {
{
.name = "s3c2410-sdi",
.driver_data = 0,
}, {
.name = "s3c2412-sdi",
.driver_data = 1,
}, {
.name = "s3c2440-sdi",
.driver_data = 1,
},
{ }
};

static int __devinit s3cmci_2412_probe(struct platform_device *dev)
{
return s3cmci_probe(dev, 1);
}
MODULE_DEVICE_TABLE(platform, s3cmci_driver_ids);

static int __devinit s3cmci_2440_probe(struct platform_device *dev)
{
return s3cmci_probe(dev, 1);
}

#ifdef CONFIG_PM

Expand All @@ -1510,50 +1515,25 @@ static int s3cmci_resume(struct platform_device *dev)
#endif /* CONFIG_PM */


static struct platform_driver s3cmci_2410_driver = {
.driver.name = "s3c2410-sdi",
.driver.owner = THIS_MODULE,
.probe = s3cmci_2410_probe,
.remove = __devexit_p(s3cmci_remove),
.shutdown = s3cmci_shutdown,
.suspend = s3cmci_suspend,
.resume = s3cmci_resume,
};

static struct platform_driver s3cmci_2412_driver = {
.driver.name = "s3c2412-sdi",
.driver.owner = THIS_MODULE,
.probe = s3cmci_2412_probe,
.remove = __devexit_p(s3cmci_remove),
.shutdown = s3cmci_shutdown,
.suspend = s3cmci_suspend,
.resume = s3cmci_resume,
};

static struct platform_driver s3cmci_2440_driver = {
.driver.name = "s3c2440-sdi",
static struct platform_driver s3cmci_driver = {
.driver.name = "s3c-sdi",
.driver.owner = THIS_MODULE,
.probe = s3cmci_2440_probe,
.id_table = s3cmci_driver_ids,
.probe = s3cmci_probe,
.remove = __devexit_p(s3cmci_remove),
.shutdown = s3cmci_shutdown,
.suspend = s3cmci_suspend,
.resume = s3cmci_resume,
};


static int __init s3cmci_init(void)
{
platform_driver_register(&s3cmci_2410_driver);
platform_driver_register(&s3cmci_2412_driver);
platform_driver_register(&s3cmci_2440_driver);
return 0;
return platform_driver_register(&s3cmci_driver);
}

static void __exit s3cmci_exit(void)
{
platform_driver_unregister(&s3cmci_2410_driver);
platform_driver_unregister(&s3cmci_2412_driver);
platform_driver_unregister(&s3cmci_2440_driver);
platform_driver_unregister(&s3cmci_driver);
}

module_init(s3cmci_init);
Expand All @@ -1562,6 +1542,3 @@ module_exit(s3cmci_exit);
MODULE_DESCRIPTION("Samsung S3C MMC/SD Card Interface driver");
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Thomas Kleffel <tk@maintech.de>, Ben Dooks <ben-linux@fluff.org>");
MODULE_ALIAS("platform:s3c2410-sdi");
MODULE_ALIAS("platform:s3c2412-sdi");
MODULE_ALIAS("platform:s3c2440-sdi");

0 comments on commit 21ef67b

Please sign in to comment.