Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipmi: bt-bmc: use devm_platform_ioremap_resource() to simplify code

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Message-Id: <20191016092131.23096-1-yuehaibing@huawei.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>

authored by

YueHaibing and committed by
Corey Minyard
2a21d858 8ee7b485

+1 -3
+1 -3
drivers/char/ipmi/bt-bmc.c
··· 444 444 445 445 bt_bmc->map = syscon_node_to_regmap(pdev->dev.parent->of_node); 446 446 if (IS_ERR(bt_bmc->map)) { 447 - struct resource *res; 448 447 void __iomem *base; 449 448 450 449 /* 451 450 * Assume it's not the MFD-based devicetree description, in 452 451 * which case generate a regmap ourselves 453 452 */ 454 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 455 - base = devm_ioremap_resource(&pdev->dev, res); 453 + base = devm_platform_ioremap_resource(pdev, 0); 456 454 if (IS_ERR(base)) 457 455 return PTR_ERR(base); 458 456