aboutsummaryrefslogtreecommitdiff
path: root/drivers/memory/atmel-ebi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/memory/atmel-ebi.c')
-rw-r--r--drivers/memory/atmel-ebi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index ec6100bc94c5..e8bb5f37f5cb 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -12,7 +12,10 @@
#include <linux/mfd/syscon/atmel-matrix.h>
#include <linux/mfd/syscon/atmel-smc.h>
#include <linux/init.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/regmap.h>
#include <soc/at91/atmel-sfr.h>
@@ -515,16 +518,11 @@ static int atmel_ebi_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *child, *np = dev->of_node, *smc_np;
- const struct of_device_id *match;
struct atmel_ebi *ebi;
int ret, reg_cells;
struct clk *clk;
u32 val;
- match = of_match_device(atmel_ebi_id_table, dev);
- if (!match || !match->data)
- return -EINVAL;
-
ebi = devm_kzalloc(dev, sizeof(*ebi), GFP_KERNEL);
if (!ebi)
return -ENOMEM;
@@ -532,7 +530,9 @@ static int atmel_ebi_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ebi);
INIT_LIST_HEAD(&ebi->devs);
- ebi->caps = match->data;
+ ebi->caps = device_get_match_data(dev);
+ if (!ebi->caps)
+ return -EINVAL;
ebi->dev = dev;
clk = devm_clk_get(dev, NULL);