mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
mips: rb532: use devm_platform_ioremap_resource in gpio probe
Replace the platform_get_resource()/devm_ioremap_resource() pair with the devm_platform_ioremap_resource() helper and drop the now-unused struct resource pointer and NULL check. Assisted-by: opencode:deepseek-v4-flash-free Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
93f51579e7
commit
ca588531ca
|
|
@ -192,13 +192,8 @@ EXPORT_SYMBOL(rb532_gpio_set_func);
|
|||
static int rb532_gpio_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res)
|
||||
return -EINVAL;
|
||||
|
||||
rb532_gpio_chip->regbase = devm_ioremap_resource(dev, res);
|
||||
rb532_gpio_chip->regbase = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(rb532_gpio_chip->regbase))
|
||||
return PTR_ERR(rb532_gpio_chip->regbase);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user