|
@@ -797,22 +797,17 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
|
|
struct resource *rc;
|
|
struct resource *rc;
|
|
int res;
|
|
int res;
|
|
|
|
|
|
- rc = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
|
|
- if (rc == NULL) {
|
|
|
|
- dev_err(&pdev->dev, "No memory resource found for device\n");
|
|
|
|
- return -EBUSY;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* Allocate memory for the device structure (and zero it) */
|
|
/* Allocate memory for the device structure (and zero it) */
|
|
host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
|
|
host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
|
|
if (!host)
|
|
if (!host)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- host->io_base_dma = rc->start;
|
|
|
|
|
|
|
|
|
|
+ rc = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
host->io_base = devm_ioremap_resource(&pdev->dev, rc);
|
|
host->io_base = devm_ioremap_resource(&pdev->dev, rc);
|
|
if (IS_ERR(host->io_base))
|
|
if (IS_ERR(host->io_base))
|
|
return PTR_ERR(host->io_base);
|
|
return PTR_ERR(host->io_base);
|
|
|
|
|
|
|
|
+ host->io_base_dma = rc->start;
|
|
if (pdev->dev.of_node)
|
|
if (pdev->dev.of_node)
|
|
host->ncfg = lpc32xx_parse_dt(&pdev->dev);
|
|
host->ncfg = lpc32xx_parse_dt(&pdev->dev);
|
|
if (!host->ncfg) {
|
|
if (!host->ncfg) {
|