Commit f9c75bca authored by Yangtao Li's avatar Yangtao Li Committed by Marc Zyngier
Browse files

irqchhip: Convert to using %pOFn instead of device_node.name



In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent ed01edc0
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -72,7 +72,7 @@ static int __init ocelot_irq_init(struct device_node *node,
	domain = irq_domain_add_linear(node, OCELOT_NR_IRQ,
	domain = irq_domain_add_linear(node, OCELOT_NR_IRQ,
				       &irq_generic_chip_ops, NULL);
				       &irq_generic_chip_ops, NULL);
	if (!domain) {
	if (!domain) {
		pr_err("%s: unable to add irq domain\n", node->name);
		pr_err("%pOFn: unable to add irq domain\n", node);
		return -ENOMEM;
		return -ENOMEM;
	}
	}


@@ -80,14 +80,14 @@ static int __init ocelot_irq_init(struct device_node *node,
					     "icpu", handle_level_irq,
					     "icpu", handle_level_irq,
					     0, 0, 0);
					     0, 0, 0);
	if (ret) {
	if (ret) {
		pr_err("%s: unable to alloc irq domain gc\n", node->name);
		pr_err("%pOFn: unable to alloc irq domain gc\n", node);
		goto err_domain_remove;
		goto err_domain_remove;
	}
	}


	gc = irq_get_domain_generic_chip(domain, 0);
	gc = irq_get_domain_generic_chip(domain, 0);
	gc->reg_base = of_iomap(node, 0);
	gc->reg_base = of_iomap(node, 0);
	if (!gc->reg_base) {
	if (!gc->reg_base) {
		pr_err("%s: unable to map resource\n", node->name);
		pr_err("%pOFn: unable to map resource\n", node);
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto err_gc_free;
		goto err_gc_free;
	}
	}
+3 −3
Original line number Original line Diff line number Diff line
@@ -678,8 +678,8 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data,
	domain = irq_domain_add_linear(node, drv_data->bank_nr * IRQS_PER_BANK,
	domain = irq_domain_add_linear(node, drv_data->bank_nr * IRQS_PER_BANK,
				       &irq_exti_domain_ops, NULL);
				       &irq_exti_domain_ops, NULL);
	if (!domain) {
	if (!domain) {
		pr_err("%s: Could not register interrupt domain.\n",
		pr_err("%pOFn: Could not register interrupt domain.\n",
		       node->name);
		       node);
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto out_unmap;
		goto out_unmap;
	}
	}
@@ -768,7 +768,7 @@ __init stm32_exti_hierarchy_init(const struct stm32_exti_drv_data *drv_data,
					  host_data);
					  host_data);


	if (!domain) {
	if (!domain) {
		pr_err("%s: Could not register exti domain.\n", node->name);
		pr_err("%pOFn: Could not register exti domain.\n", node);
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto out_unmap;
		goto out_unmap;
	}
	}
+5 −5
Original line number Original line Diff line number Diff line
@@ -184,11 +184,11 @@ static int __init tangox_irq_init(void __iomem *base, struct resource *baseres,


	irq = irq_of_parse_and_map(node, 0);
	irq = irq_of_parse_and_map(node, 0);
	if (!irq)
	if (!irq)
		panic("%s: failed to get IRQ", node->name);
		panic("%pOFn: failed to get IRQ", node);


	err = of_address_to_resource(node, 0, &res);
	err = of_address_to_resource(node, 0, &res);
	if (err)
	if (err)
		panic("%s: failed to get address", node->name);
		panic("%pOFn: failed to get address", node);


	chip = kzalloc(sizeof(*chip), GFP_KERNEL);
	chip = kzalloc(sizeof(*chip), GFP_KERNEL);
	chip->ctl = res.start - baseres->start;
	chip->ctl = res.start - baseres->start;
@@ -196,12 +196,12 @@ static int __init tangox_irq_init(void __iomem *base, struct resource *baseres,


	dom = irq_domain_add_linear(node, 64, &irq_generic_chip_ops, chip);
	dom = irq_domain_add_linear(node, 64, &irq_generic_chip_ops, chip);
	if (!dom)
	if (!dom)
		panic("%s: failed to create irqdomain", node->name);
		panic("%pOFn: failed to create irqdomain", node);


	err = irq_alloc_domain_generic_chips(dom, 32, 2, node->name,
	err = irq_alloc_domain_generic_chips(dom, 32, 2, node->name,
					     handle_level_irq, 0, 0, 0);
					     handle_level_irq, 0, 0, 0);
	if (err)
	if (err)
		panic("%s: failed to allocate irqchip", node->name);
		panic("%pOFn: failed to allocate irqchip", node);


	tangox_irq_domain_init(dom);
	tangox_irq_domain_init(dom);


@@ -219,7 +219,7 @@ static int __init tangox_of_irq_init(struct device_node *node,


	base = of_iomap(node, 0);
	base = of_iomap(node, 0);
	if (!base)
	if (!base)
		panic("%s: of_iomap failed", node->name);
		panic("%pOFn: of_iomap failed", node);


	of_address_to_resource(node, 0, &res);
	of_address_to_resource(node, 0, &res);