Skip to content

Commit

Permalink
soc: fsl: guts: Make use of the helper function devm_platform_ioremap…
Browse files Browse the repository at this point in the history
…_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]>
  • Loading branch information
caihuoqing1990 authored and Li Yang committed Oct 22, 2021
1 parent 6880fa6 commit e016212
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/soc/fsl/guts.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ static int fsl_guts_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
struct resource *res;
const struct fsl_soc_die_attr *soc_die;
const char *machine;
u32 svr;
Expand All @@ -152,8 +151,7 @@ static int fsl_guts_probe(struct platform_device *pdev)

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

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
guts->regs = devm_ioremap_resource(dev, res);
guts->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(guts->regs))
return PTR_ERR(guts->regs);

Expand Down

0 comments on commit e016212

Please sign in to comment.