|
@@ -1434,7 +1434,6 @@ static int mtk_nfc_probe(struct platform_device *pdev)
|
|
struct device_node *np = dev->of_node;
|
|
struct device_node *np = dev->of_node;
|
|
struct mtk_nfc *nfc;
|
|
struct mtk_nfc *nfc;
|
|
struct resource *res;
|
|
struct resource *res;
|
|
- const struct of_device_id *of_nfc_id = NULL;
|
|
|
|
int ret, irq;
|
|
int ret, irq;
|
|
|
|
|
|
nfc = devm_kzalloc(dev, sizeof(*nfc), GFP_KERNEL);
|
|
nfc = devm_kzalloc(dev, sizeof(*nfc), GFP_KERNEL);
|
|
@@ -1452,6 +1451,7 @@ static int mtk_nfc_probe(struct platform_device *pdev)
|
|
else if (!nfc->ecc)
|
|
else if (!nfc->ecc)
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
+ nfc->caps = of_device_get_match_data(dev);
|
|
nfc->dev = dev;
|
|
nfc->dev = dev;
|
|
|
|
|
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
@@ -1498,14 +1498,6 @@ static int mtk_nfc_probe(struct platform_device *pdev)
|
|
goto clk_disable;
|
|
goto clk_disable;
|
|
}
|
|
}
|
|
|
|
|
|
- of_nfc_id = of_match_device(mtk_nfc_id_table, &pdev->dev);
|
|
|
|
- if (!of_nfc_id) {
|
|
|
|
- ret = -ENODEV;
|
|
|
|
- goto clk_disable;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- nfc->caps = of_nfc_id->data;
|
|
|
|
-
|
|
|
|
platform_set_drvdata(pdev, nfc);
|
|
platform_set_drvdata(pdev, nfc);
|
|
|
|
|
|
ret = mtk_nfc_nand_chips_init(dev, nfc);
|
|
ret = mtk_nfc_nand_chips_init(dev, nfc);
|