summaryrefslogtreecommitdiffstats
path: root/drivers/mci/bcm2835-sdhost.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mci/bcm2835-sdhost.c')
-rw-r--r--drivers/mci/bcm2835-sdhost.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/mci/bcm2835-sdhost.c b/drivers/mci/bcm2835-sdhost.c
index 1d3a6c0969..2b1336a7d3 100644
--- a/drivers/mci/bcm2835-sdhost.c
+++ b/drivers/mci/bcm2835-sdhost.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0-only
/*
* This code is ported from U-Boot by Lucas Stach <l.stach@pengutronix.de> and
* has the following contributors listed in the original license header:
@@ -135,7 +135,7 @@ static inline struct bcm2835_host *to_bcm2835_host(struct mci_host *mci)
return container_of(mci, struct bcm2835_host, mci);
}
-static int bcm2835_sdhost_init(struct mci_host *mci, struct device_d *dev)
+static int bcm2835_sdhost_init(struct mci_host *mci, struct device *dev)
{
struct bcm2835_host *host = to_bcm2835_host(mci);
u32 temp;
@@ -579,14 +579,7 @@ static void bcm2835_set_ios(struct mci_host *mci, struct mci_ios *ios)
writel(hcfg, host->regs + SDHCFG);
}
-static int bcm2835_sdhost_detect(struct device_d *dev)
-{
- struct bcm2835_host *host = dev->priv;
-
- return mci_detect_card(&host->mci);
-}
-
-static int bcm2835_sdhost_probe(struct device_d *dev)
+static int bcm2835_sdhost_probe(struct device *dev)
{
struct bcm2835_host *host;
struct resource *iores;
@@ -617,9 +610,6 @@ static int bcm2835_sdhost_probe(struct device_d *dev)
mci->set_ios = bcm2835_set_ios;
mci->send_cmd = bcm2835_send_cmd;
- dev->priv = host;
- dev->detect = bcm2835_sdhost_detect,
-
mci_of_parse(mci);
return mci_register(mci);
@@ -629,8 +619,9 @@ static __maybe_unused struct of_device_id bcm2835_sdhost_compatible[] = {
{ .compatible = "brcm,bcm2835-sdhost" },
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, bcm2835_sdhost_compatible);
-static struct driver_d bcm2835_sdhost_driver = {
+static struct driver bcm2835_sdhost_driver = {
.name = "bcm2835-sdhost",
.probe = bcm2835_sdhost_probe,
.of_compatible = DRV_OF_COMPAT(bcm2835_sdhost_compatible),