File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
drivers/mtd/spi-nor/controllers Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,6 @@ static int hisi_spi_nor_register_all(struct hifmc_host *host)
421
421
static int hisi_spi_nor_probe (struct platform_device * pdev )
422
422
{
423
423
struct device * dev = & pdev -> dev ;
424
- struct resource * res ;
425
424
struct hifmc_host * host ;
426
425
int ret ;
427
426
@@ -432,13 +431,11 @@ static int hisi_spi_nor_probe(struct platform_device *pdev)
432
431
platform_set_drvdata (pdev , host );
433
432
host -> dev = dev ;
434
433
435
- res = platform_get_resource_byname (pdev , IORESOURCE_MEM , "control" );
436
- host -> regbase = devm_ioremap_resource (dev , res );
434
+ host -> regbase = devm_platform_ioremap_resource_byname (pdev , "control" );
437
435
if (IS_ERR (host -> regbase ))
438
436
return PTR_ERR (host -> regbase );
439
437
440
- res = platform_get_resource_byname (pdev , IORESOURCE_MEM , "memory" );
441
- host -> iobase = devm_ioremap_resource (dev , res );
438
+ host -> iobase = devm_platform_ioremap_resource_byname (pdev , "memory" );
442
439
if (IS_ERR (host -> iobase ))
443
440
return PTR_ERR (host -> iobase );
444
441
You can’t perform that action at this time.
0 commit comments