use devm_platform_ioremap_resource() for irqchip drivers
Subsystems (4)
PATCH v2 1/1 use devm_platform_ioremap_resource() for irqchip drivers
From: Daode Huang <[email protected]>
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together
Signed-off-by Daode Huang <[email protected]>
---
changes in v2
- address the commnents from Marc
--- drivers/irqchip/irq-mvebu-icu.c | 4 +--- drivers/irqchip/irq-mvebu-pic.c | 4 +--- drivers/irqchip/irq-stm32-exti.c | 4 +--- drivers/irqchip/irq-ti-sci-inta.c | 4 +--- drivers/irqchip/irq-ts4800.c | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-)
drivers/irqchip/irq-mvebu-icu.c +1 -3
@@ -347,7 +347,6 @@ builtin_platform_driver(mvebu_icu_subset_driver);static int mvebu_icu_probe (struct platform_device *pdev) {struct mvebu_icu *icu; -struct resource *res;int i; icu = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_icu),
@@ -357,8 +356,7 @@ static int mvebu_icu_probe(struct platform_device *pdev) icu->dev = &pdev->dev; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - icu->base =devm_ioremap_resource (&pdev->dev, res); + icu->base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (icu->base)) {dev_err (&pdev->dev,"Failed to map icu base address.\n" );return PTR_ERR (icu->base);
drivers/irqchip/irq-mvebu-pic.c +1 -3
@@ -124,14 +124,12 @@ static int mvebu_pic_probe(struct platform_device *pdev)struct device_node *node = pdev->dev.of_node;struct mvebu_pic *pic;struct irq_chip *irq_chip; -struct resource *res; pic =devm_kzalloc (&pdev->dev,sizeof (struct mvebu_pic ),GFP_KERNEL );if (!pic)return -ENOMEM ; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - pic->base =devm_ioremap_resource (&pdev->dev, res); + pic->base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (pic->base))return PTR_ERR (pic->base);
drivers/irqchip/irq-stm32-exti.c +1 -3
@@ -811,7 +811,6 @@ static int stm32_exti_probe(struct platform_device *pdev)struct irq_domain *parent_domain, *domain;struct stm32_exti_host_data *host_data;const struct stm32_exti_drv_data *drv_data; -struct resource *res; host_data =devm_kzalloc (dev,sizeof (*host_data),GFP_KERNEL );if (!host_data)
@@ -849,8 +848,7 @@ static int stm32_exti_probe(struct platform_device *pdev)if (!host_data->chips_data)return -ENOMEM ; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - host_data->base =devm_ioremap_resource (dev, res); + host_data->base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (host_data->base)) {dev_err (dev,"Unable to map registers\n" );return PTR_ERR (host_data->base);
drivers/irqchip/irq-ti-sci-inta.c +1 -3
@@ -519,7 +519,6 @@ static int ti_sci_inta_irq_domain_probe(struct platform_device *pdev)struct device_node *parent_node, *node;struct ti_sci_inta_irq_domain *inta;struct device *dev = &pdev->dev; -struct resource *res;int ret; node =dev_of_node (dev);
@@ -567,8 +566,7 @@ static int ti_sci_inta_irq_domain_probe(struct platform_device *pdev)return PTR_ERR (inta->global_event); } - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - inta->base =devm_ioremap_resource (dev, res); + inta->base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (inta->base))return -ENODEV ;
drivers/irqchip/irq-ts4800.c +1 -3
@@ -94,15 +94,13 @@ static int ts4800_ic_probe(struct platform_device *pdev)struct device_node *node = pdev->dev.of_node;struct ts4800_irq_data *data;struct irq_chip *irq_chip; -struct resource *res;int parent_irq; data =devm_kzalloc (&pdev->dev,sizeof (*data),GFP_KERNEL );if (!data)return -ENOMEM ; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - data->base =devm_ioremap_resource (&pdev->dev, res); + data->base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (data->base))return PTR_ERR (data->base);
Signature · 1 line
2.8.1