The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] misc: rp1: Switch to irq_domain_create_linear()
@ 2026-07-08  9:57 Jiri Slaby (SUSE)
  2026-07-16 16:43 ` Andrea della Porta
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby (SUSE) @ 2026-07-08  9:57 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Jiri Slaby (SUSE), Thomas Gleixner,
	Andrea della Porta, Arnd Bergmann

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).

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Andrea della Porta <andrea.porta@suse.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/misc/rp1/rp1_pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/rp1/rp1_pci.c b/drivers/misc/rp1/rp1_pci.c
index 81685e3f3296..4a0620e85ad5 100644
--- a/drivers/misc/rp1/rp1_pci.c
+++ b/drivers/misc/rp1/rp1_pci.c
@@ -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;
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] misc: rp1: Switch to irq_domain_create_linear()
  2026-07-08  9:57 [PATCH] misc: rp1: Switch to irq_domain_create_linear() Jiri Slaby (SUSE)
@ 2026-07-16 16:43 ` Andrea della Porta
  0 siblings, 0 replies; 2+ messages in thread
From: Andrea della Porta @ 2026-07-16 16:43 UTC (permalink / raw)
  To: Jiri Slaby (SUSE)
  Cc: gregkh, linux-kernel, Thomas Gleixner, Andrea della Porta,
	Arnd Bergmann

Hi Jiri,

On 11:57 Wed 08 Jul     , Jiri Slaby (SUSE) wrote:
> 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).
> 
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> Cc: Thomas Gleixner <tglx@kernel.org>
> Cc: Andrea della Porta <andrea.porta@suse.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/misc/rp1/rp1_pci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/rp1/rp1_pci.c b/drivers/misc/rp1/rp1_pci.c
> index 81685e3f3296..4a0620e85ad5 100644
> --- a/drivers/misc/rp1/rp1_pci.c
> +++ b/drivers/misc/rp1/rp1_pci.c
> @@ -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;
> -- 
> 2.55.0
>

Tested-by: Andrea della Porta <andrea.porta@suse.com>

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-16 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08  9:57 [PATCH] misc: rp1: Switch to irq_domain_create_linear() Jiri Slaby (SUSE)
2026-07-16 16:43 ` Andrea della Porta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox