Skip to content

Commit e016212

Browse files
caihuoqing1990Li Yang
authored andcommitted
soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <[email protected]> Signed-off-by: Li Yang <[email protected]>
1 parent 6880fa6 commit e016212

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/soc/fsl/guts.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ static int fsl_guts_probe(struct platform_device *pdev)
140140
{
141141
struct device_node *np = pdev->dev.of_node;
142142
struct device *dev = &pdev->dev;
143-
struct resource *res;
144143
const struct fsl_soc_die_attr *soc_die;
145144
const char *machine;
146145
u32 svr;
@@ -152,8 +151,7 @@ static int fsl_guts_probe(struct platform_device *pdev)
152151

153152
guts->little_endian = of_property_read_bool(np, "little-endian");
154153

155-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
156-
guts->regs = devm_ioremap_resource(dev, res);
154+
guts->regs = devm_platform_ioremap_resource(pdev, 0);
157155
if (IS_ERR(guts->regs))
158156
return PTR_ERR(guts->regs);
159157

0 commit comments

Comments
 (0)