We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2fd542 commit daacef8Copy full SHA for daacef8
drivers/soc/loongson/loongson2_guts.c
@@ -94,7 +94,6 @@ static int loongson2_guts_probe(struct platform_device *pdev)
94
{
95
struct device_node *root, *np = pdev->dev.of_node;
96
struct device *dev = &pdev->dev;
97
- struct resource *res;
98
const struct loongson2_soc_die_attr *soc_die;
99
const char *machine;
100
u32 svr;
@@ -106,8 +105,7 @@ static int loongson2_guts_probe(struct platform_device *pdev)
106
105
107
guts->little_endian = of_property_read_bool(np, "little-endian");
108
109
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
110
- guts->regs = ioremap(res->start, res->end - res->start + 1);
+ guts->regs = devm_platform_ioremap_resource(pdev, 0);
111
if (IS_ERR(guts->regs))
112
return PTR_ERR(guts->regs);
113
0 commit comments