Skip to content

Commit 434b835

Browse files
Ye Xingchenmiquelraynal
authored andcommitted
mtd: rawnand: orion: use devm_platform_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/202302101723563685569@zte.com.cn
1 parent fe15c26 commit 434b835

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/mtd/nand/raw/orion_nand.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ static int __init orion_nand_probe(struct platform_device *pdev)
102102
struct mtd_info *mtd;
103103
struct nand_chip *nc;
104104
struct orion_nand_data *board;
105-
struct resource *res;
106105
void __iomem *io_base;
107106
int ret = 0;
108107
u32 val = 0;
@@ -119,8 +118,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)
119118
info->controller.ops = &orion_nand_ops;
120119
nc->controller = &info->controller;
121120

122-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
123-
io_base = devm_ioremap_resource(&pdev->dev, res);
121+
io_base = devm_platform_ioremap_resource(pdev, 0);
124122

125123
if (IS_ERR(io_base))
126124
return PTR_ERR(io_base);

0 commit comments

Comments
 (0)