Skip to content

Commit ba79161

Browse files
andy-shevstorulf
authored andcommitted
mmc: atmel-mci: Get rid of platform data leftovers
The commit d2c6d51 ("mmc: atmel-mci: move atmel MCI header file") made sure that there is no in-kernel user of the platform data. But at the same time it hadn't removed the code around that data structure. Finish the job here and remove a dead code. Fixes: d2c6d51 ("mmc: atmel-mci: move atmel MCI header file") Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent b1b661c commit ba79161

File tree

1 file changed

+6
-37
lines changed

1 file changed

+6
-37
lines changed

drivers/mmc/host/atmel-mci.c

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,9 @@ struct mci_slot_pdata {
226226

227227
/**
228228
* struct mci_platform_data - board-specific MMC/SDcard configuration
229-
* @dma_slave: DMA slave interface to use in data transfers.
230-
* @dma_filter: Filtering function to filter the DMA channel
231229
* @slot: Per-slot configuration data.
232230
*/
233231
struct mci_platform_data {
234-
void *dma_slave;
235-
dma_filter_fn dma_filter;
236232
struct mci_slot_pdata slot[ATMCI_MAX_NR_SLOTS];
237233
};
238234

@@ -626,7 +622,6 @@ static void atmci_init_debugfs(struct atmel_mci_slot *slot)
626622
&host->completed_events);
627623
}
628624

629-
#if defined(CONFIG_OF)
630625
static const struct of_device_id atmci_dt_ids[] = {
631626
{ .compatible = "atmel,hsmci" },
632627
{ /* sentinel */ }
@@ -700,13 +695,6 @@ atmci_of_init(struct platform_device *pdev)
700695

701696
return pdata;
702697
}
703-
#else /* CONFIG_OF */
704-
static inline struct mci_platform_data*
705-
atmci_of_init(struct platform_device *dev)
706-
{
707-
return ERR_PTR(-EINVAL);
708-
}
709-
#endif
710698

711699
static inline unsigned int atmci_get_version(struct atmel_mci *host)
712700
{
@@ -2388,23 +2376,6 @@ static void atmci_cleanup_slot(struct atmel_mci_slot *slot,
23882376
static int atmci_configure_dma(struct atmel_mci *host)
23892377
{
23902378
host->dma.chan = dma_request_chan(&host->pdev->dev, "rxtx");
2391-
2392-
if (PTR_ERR(host->dma.chan) == -ENODEV) {
2393-
struct mci_platform_data *pdata = host->pdev->dev.platform_data;
2394-
dma_cap_mask_t mask;
2395-
2396-
if (!pdata || !pdata->dma_filter)
2397-
return -ENODEV;
2398-
2399-
dma_cap_zero(mask);
2400-
dma_cap_set(DMA_SLAVE, mask);
2401-
2402-
host->dma.chan = dma_request_channel(mask, pdata->dma_filter,
2403-
pdata->dma_slave);
2404-
if (!host->dma.chan)
2405-
host->dma.chan = ERR_PTR(-ENODEV);
2406-
}
2407-
24082379
if (IS_ERR(host->dma.chan))
24092380
return PTR_ERR(host->dma.chan);
24102381

@@ -2492,13 +2463,11 @@ static int atmci_probe(struct platform_device *pdev)
24922463
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
24932464
if (!regs)
24942465
return -ENXIO;
2495-
pdata = pdev->dev.platform_data;
2496-
if (!pdata) {
2497-
pdata = atmci_of_init(pdev);
2498-
if (IS_ERR(pdata)) {
2499-
dev_err(&pdev->dev, "platform data not available\n");
2500-
return PTR_ERR(pdata);
2501-
}
2466+
2467+
pdata = atmci_of_init(pdev);
2468+
if (IS_ERR(pdata)) {
2469+
dev_err(&pdev->dev, "platform data not available\n");
2470+
return PTR_ERR(pdata);
25022471
}
25032472

25042473
irq = platform_get_irq(pdev, 0);
@@ -2701,7 +2670,7 @@ static struct platform_driver atmci_driver = {
27012670
.driver = {
27022671
.name = "atmel_mci",
27032672
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
2704-
.of_match_table = of_match_ptr(atmci_dt_ids),
2673+
.of_match_table = atmci_dt_ids,
27052674
.pm = &atmci_dev_pm_ops,
27062675
},
27072676
};

0 commit comments

Comments
 (0)