Re: [PATCH 2/6] mtd: rawnand: marvell: Use devm_platform_ioremap_res()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 21 Apr 2020 18:48:53 +0200
Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote:

> Switch from the old platform_get_resource()/devm_ioremap_resource()
> couple to the newer devm_platform_ioremap_resource() helper.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

Reviewed-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>

> ---
>  drivers/mtd/nand/raw/marvell_nand.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
> index f2bf88336326..7906bd3fc8cb 100644
> --- a/drivers/mtd/nand/raw/marvell_nand.c
> +++ b/drivers/mtd/nand/raw/marvell_nand.c
> @@ -2854,7 +2854,6 @@ static int marvell_nfc_init(struct marvell_nfc *nfc)
>  static int marvell_nfc_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
> -	struct resource *r;
>  	struct marvell_nfc *nfc;
>  	int ret;
>  	int irq;
> @@ -2869,8 +2868,7 @@ static int marvell_nfc_probe(struct platform_device *pdev)
>  	nfc->controller.ops = &marvell_nand_controller_ops;
>  	INIT_LIST_HEAD(&nfc->chips);
>  
> -	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	nfc->regs = devm_ioremap_resource(dev, r);
> +	nfc->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(nfc->regs))
>  		return PTR_ERR(nfc->regs);
>  


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux