Commit fd9ac236 authored by Cai Huoqing's avatar Cai Huoqing Committed by Marc Zyngier
Browse files

irqchip/stm32: Make use of the helper function devm_platform_ioremap_resource()



Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210908105715.1780-1-caihuoqing@baidu.com
parent 2687bf8d
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -850,7 +850,6 @@ static int stm32_exti_probe(struct platform_device *pdev)
	struct irq_domain *parent_domain, *domain;
	struct irq_domain *parent_domain, *domain;
	struct stm32_exti_host_data *host_data;
	struct stm32_exti_host_data *host_data;
	const struct stm32_exti_drv_data *drv_data;
	const struct stm32_exti_drv_data *drv_data;
	struct resource *res;


	host_data = devm_kzalloc(dev, sizeof(*host_data), GFP_KERNEL);
	host_data = devm_kzalloc(dev, sizeof(*host_data), GFP_KERNEL);
	if (!host_data)
	if (!host_data)
@@ -888,8 +887,7 @@ static int stm32_exti_probe(struct platform_device *pdev)
	if (!host_data->chips_data)
	if (!host_data->chips_data)
		return -ENOMEM;
		return -ENOMEM;


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