Skip to contentSkip to conversation

misc: rp1: Switch to irq_domain_create_linear()

PATCH In review Jiri Slaby (SUSE) 2 participants 2 messages Jul 8 – Jul 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: rp1: Switch to irq_domain_create_linear()

irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter.

Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW).

Cc Thomas Gleixner <[email protected]>
Cc Andrea della Porta <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/misc/rp1/rp1_pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/rp1/rp1_pci.c +2 -2
index 81685e3f3296..4a0620e85ad5 100644
@@ -238,8 +238,8 @@ static int rp1_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	}
 
 	pci_set_drvdata(pdev, rp1);
-	rp1->domain = irq_domain_add_linear(rp1_node, RP1_INT_END,
-					    &rp1_domain_ops, rp1);
+	rp1->domain = irq_domain_create_linear(of_fwnode_handle(rp1_node), RP1_INT_END,
+					       &rp1_domain_ops, rp1);
 	if (!rp1->domain) {
 		dev_err(&pdev->dev, "Error creating IRQ domain\n");
 		err = -ENOMEM;
Signature · 1 line
2.55.0
maintainer Tested-by on v1 1/1
#1 lore raw

Hi Jiri,

Quoted 38 lines · Jiri Slaby (SUSE)

irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter.

Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW).

Cc Thomas Gleixner <[email protected]>
Cc Andrea della Porta <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/misc/rp1/rp1_pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/rp1/rp1_pci.c +2 -2
index 81685e3f3296..4a0620e85ad5 100644
@@ -238,8 +238,8 @@ static int rp1_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	}
 
 	pci_set_drvdata(pdev, rp1);
-	rp1->domain = irq_domain_add_linear(rp1_node, RP1_INT_END,
-					    &rp1_domain_ops, rp1);
+	rp1->domain = irq_domain_create_linear(of_fwnode_handle(rp1_node), RP1_INT_END,
+					       &rp1_domain_ops, rp1);
 	if (!rp1->domain) {
 		dev_err(&pdev->dev, "Error creating IRQ domain\n");
 		err = -ENOMEM;
Signature · 1 line
2.55.0

Thanks!