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

Configure Feed

Select the types of activity you want to include in your feed.

mfd: hi655x-pmic: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230706113939.1178-7-frank.li@vivo.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Yangtao Li and committed by
Lee Jones
2459f4df 4c0104bf

+1 -3
+1 -2
drivers/mfd/hi655x-pmic.c
··· 100 100 return -ENOMEM; 101 101 pmic->dev = dev; 102 102 103 - pmic->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 104 - base = devm_ioremap_resource(dev, pmic->res); 103 + base = devm_platform_ioremap_resource(pdev, 0); 105 104 if (IS_ERR(base)) 106 105 return PTR_ERR(base); 107 106
-1
include/linux/mfd/hi655x-pmic.h
··· 52 52 #define OTMP_D1R_INT_MASK BIT(OTMP_D1R_INT) 53 53 54 54 struct hi655x_pmic { 55 - struct resource *res; 56 55 struct device *dev; 57 56 struct regmap *regmap; 58 57 struct gpio_desc *gpio;