Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208432
b: refs/heads/master
c: 515033f
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and Linus Torvalds committed Aug 11, 2010
1 parent 71bca38 commit dcce318
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 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: 27151dc9e363c0033d7375863c0d284f8c4b636a
refs/heads/master: 515033f97c0b5a1bce13fa93e09704d95b44f376
14 changes: 13 additions & 1 deletion trunk/drivers/mmc/host/sdhci-pltfm.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <linux/delay.h>
#include <linux/highmem.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>

#include <linux/mmc/host.h>
Expand All @@ -32,6 +33,7 @@
#include <linux/sdhci-pltfm.h>

#include "sdhci.h"
#include "sdhci-pltfm.h"

/*****************************************************************************\
* *
Expand All @@ -51,10 +53,14 @@ static struct sdhci_ops sdhci_pltfm_ops = {
static int __devinit sdhci_pltfm_probe(struct platform_device *pdev)
{
struct sdhci_pltfm_data *pdata = pdev->dev.platform_data;
const struct platform_device_id *platid = platform_get_device_id(pdev);
struct sdhci_host *host;
struct resource *iomem;
int ret;

if (!pdata && platid && platid->driver_data)
pdata = (void *)platid->driver_data;

iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!iomem) {
ret = -ENOMEM;
Expand Down Expand Up @@ -150,13 +156,20 @@ static int __devexit sdhci_pltfm_remove(struct platform_device *pdev)
return 0;
}

static const struct platform_device_id sdhci_pltfm_ids[] = {
{ "sdhci", },
{ },
};
MODULE_DEVICE_TABLE(platform, sdhci_pltfm_ids);

static struct platform_driver sdhci_pltfm_driver = {
.driver = {
.name = "sdhci",
.owner = THIS_MODULE,
},
.probe = sdhci_pltfm_probe,
.remove = __devexit_p(sdhci_pltfm_remove),
.id_table = sdhci_pltfm_ids,
};

/*****************************************************************************\
Expand All @@ -181,4 +194,3 @@ module_exit(sdhci_drv_exit);
MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver");
MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:sdhci");
14 changes: 14 additions & 0 deletions trunk/drivers/mmc/host/sdhci-pltfm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright 2010 MontaVista Software, LLC.
*
* Author: Anton Vorontsov <avorontsov@ru.mvista.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _DRIVERS_MMC_SDHCI_PLTFM_H
#define _DRIVERS_MMC_SDHCI_PLTFM_H

#endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */

0 comments on commit dcce318

Please sign in to comment.