Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

irqdomain: Drop of_node_to_fwnode()

All uses of of_node_to_fwnode() in non-irqdomain code were changed to
"officially" defined of_fwnode_handle(). Therefore, the former can be
dropped along with the last uses in the irqdomain code.

Due to merge logistics the inline cannot be dropped immediately. Move it to
a deprecated section, which will be removed during the merge window.

[ tglx: Handle merge logistics ]

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250319092951.37667-12-jirislaby@kernel.org


authored by

Jiri Slaby (SUSE) and committed by
Thomas Gleixner
e847a847 b7129180

+14 -13
+12 -11
include/linux/irqdomain.h
··· 358 358 irq_hw_number_t hwirq, int node, 359 359 const struct irq_affinity_desc *affinity); 360 360 361 - static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node) 362 - { 363 - return node ? &node->fwnode : NULL; 364 - } 365 - 366 361 extern const struct fwnode_operations irqchip_fwnode_ops; 367 362 368 363 static inline bool is_fwnode_irqchip(const struct fwnode_handle *fwnode) ··· 382 387 static inline struct irq_domain *irq_find_matching_host(struct device_node *node, 383 388 enum irq_domain_bus_token bus_token) 384 389 { 385 - return irq_find_matching_fwnode(of_node_to_fwnode(node), bus_token); 390 + return irq_find_matching_fwnode(of_fwnode_handle(node), bus_token); 386 391 } 387 392 388 393 static inline struct irq_domain *irq_find_host(struct device_node *node) ··· 402 407 const struct irq_domain_ops *ops, 403 408 void *host_data) 404 409 { 405 - return irq_domain_create_simple(of_node_to_fwnode(of_node), size, first_irq, ops, host_data); 410 + return irq_domain_create_simple(of_fwnode_handle(of_node), size, first_irq, ops, host_data); 406 411 } 407 412 408 413 /** ··· 418 423 void *host_data) 419 424 { 420 425 struct irq_domain_info info = { 421 - .fwnode = of_node_to_fwnode(of_node), 426 + .fwnode = of_fwnode_handle(of_node), 422 427 .size = size, 423 428 .hwirq_max = size, 424 429 .ops = ops, ··· 437 442 void *host_data) 438 443 { 439 444 struct irq_domain_info info = { 440 - .fwnode = of_node_to_fwnode(of_node), 445 + .fwnode = of_fwnode_handle(of_node), 441 446 .hwirq_max = max_irq, 442 447 .direct_max = max_irq, 443 448 .ops = ops, ··· 457 462 void *host_data) 458 463 { 459 464 struct irq_domain_info info = { 460 - .fwnode = of_node_to_fwnode(of_node), 465 + .fwnode = of_fwnode_handle(of_node), 461 466 .hwirq_max = ~0U, 462 467 .ops = ops, 463 468 .host_data = host_data, ··· 606 611 void *host_data) 607 612 { 608 613 return irq_domain_create_hierarchy(parent, flags, size, 609 - of_node_to_fwnode(node), 614 + of_fwnode_handle(node), 610 615 ops, host_data); 611 616 } 612 617 ··· 749 754 WARN_ON_ONCE(1); 750 755 } 751 756 #endif 757 + 758 + /* Deprecated functions. Will be removed in the merge window */ 759 + static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node) 760 + { 761 + return node ? &node->fwnode : NULL; 762 + } 752 763 753 764 #else /* CONFIG_IRQ_DOMAIN */ 754 765 static inline void irq_dispose_mapping(unsigned int virq) { }
+2 -2
kernel/irq/irqdomain.c
··· 502 502 const struct irq_domain_ops *ops, 503 503 void *host_data) 504 504 { 505 - return irq_domain_create_legacy(of_node_to_fwnode(of_node), size, 505 + return irq_domain_create_legacy(of_fwnode_handle(of_node), size, 506 506 first_irq, first_hwirq, ops, host_data); 507 507 } 508 508 EXPORT_SYMBOL_GPL(irq_domain_add_legacy); ··· 885 885 { 886 886 int i; 887 887 888 - fwspec->fwnode = of_node_to_fwnode(np); 888 + fwspec->fwnode = of_fwnode_handle(np); 889 889 fwspec->param_count = count; 890 890 891 891 for (i = 0; i < count; i++)