diff options
Diffstat (limited to 'drivers/edac/ti_edac.c')
| -rw-r--r-- | drivers/edac/ti_edac.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/edac/ti_edac.c b/drivers/edac/ti_edac.c index 8be3e89a510e..39cc2ef9cac4 100644 --- a/drivers/edac/ti_edac.c +++ b/drivers/edac/ti_edac.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ + * Copyright (C) 2017 Texas Instruments Incorporated - https://www.ti.com/ * * Texas Instruments DDR3 ECC error correction and detection driver * @@ -197,6 +197,7 @@ static const struct of_device_id ti_edac_of_match[] = { { .compatible = "ti,emif-dra7xx", .data = (void *)EMIF_TYPE_DRA7 }, {}, }; +MODULE_DEVICE_TABLE(of, ti_edac_of_match); static int _emif_get_id(struct device_node *node) { @@ -244,11 +245,8 @@ static int ti_edac_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); reg = devm_ioremap_resource(dev, res); - if (IS_ERR(reg)) { - edac_printk(KERN_ERR, EDAC_MOD_NAME, - "EMIF controller regs not defined\n"); + if (IS_ERR(reg)) return PTR_ERR(reg); - } layers[0].type = EDAC_MC_LAYER_ALL_MEM; layers[0].size = 1; @@ -278,9 +276,8 @@ static int ti_edac_probe(struct platform_device *pdev) /* add EMIF ECC error handler */ error_irq = platform_get_irq(pdev, 0); - if (!error_irq) { - edac_printk(KERN_ERR, EDAC_MOD_NAME, - "EMIF irq number not defined.\n"); + if (error_irq < 0) { + ret = error_irq; goto err; } @@ -315,14 +312,12 @@ err: return ret; } -static int ti_edac_remove(struct platform_device *pdev) +static void ti_edac_remove(struct platform_device *pdev) { struct mem_ctl_info *mci = platform_get_drvdata(pdev); edac_mc_del_mc(&pdev->dev); edac_mc_free(mci); - - return 0; } static struct platform_driver ti_edac_driver = { |
