mtd: rawnand: marvell: Use devm_platform_ioremap_res()
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@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://lore.kernel.org/linux-mtd/20200424164501.26719-3-miquel.raynal@bootlin.com
This commit is contained in:
parent
c27075772d
commit
5dcc99763c
|
@ -2855,7 +2855,6 @@ static int marvell_nfc_init(struct marvell_nfc *nfc)
|
||||||
static int marvell_nfc_probe(struct platform_device *pdev)
|
static int marvell_nfc_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct resource *r;
|
|
||||||
struct marvell_nfc *nfc;
|
struct marvell_nfc *nfc;
|
||||||
int ret;
|
int ret;
|
||||||
int irq;
|
int irq;
|
||||||
|
@ -2870,8 +2869,7 @@ static int marvell_nfc_probe(struct platform_device *pdev)
|
||||||
nfc->controller.ops = &marvell_nand_controller_ops;
|
nfc->controller.ops = &marvell_nand_controller_ops;
|
||||||
INIT_LIST_HEAD(&nfc->chips);
|
INIT_LIST_HEAD(&nfc->chips);
|
||||||
|
|
||||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
nfc->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||||
nfc->regs = devm_ioremap_resource(dev, r);
|
|
||||||
if (IS_ERR(nfc->regs))
|
if (IS_ERR(nfc->regs))
|
||||||
return PTR_ERR(nfc->regs);
|
return PTR_ERR(nfc->regs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue