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.

mfd: Use dev_fwnode() instead of of_fwnode_handle()

irq_domain_create_simple() takes fwnode as the first argument. It can be
extracted from the struct device using dev_fwnode() helper instead of
using of_node with of_fwnode_handle().

So use the dev_fwnode() helper.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20250611104348.192092-13-jirislaby@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Jiri Slaby (SUSE) and committed by
Lee Jones
ec9cdb91 fc07e412

+22 -28
+1 -2
drivers/mfd/ab8500-core.c
··· 580 580 num_irqs = AB8500_NR_IRQS; 581 581 582 582 /* If ->irq_base is zero this will give a linear mapping */ 583 - ab8500->domain = irq_domain_create_simple(of_fwnode_handle(ab8500->dev->of_node), 584 - num_irqs, 0, 583 + ab8500->domain = irq_domain_create_simple(dev_fwnode(ab8500->dev), num_irqs, 0, 585 584 &ab8500_irq_ops, ab8500); 586 585 587 586 if (!ab8500->domain) {
+2 -2
drivers/mfd/fsl-imx25-tsadc.c
··· 71 71 if (irq < 0) 72 72 return irq; 73 73 74 - tsadc->domain = irq_domain_create_simple(of_fwnode_handle(dev->of_node), 2, 0, 75 - &mx25_tsadc_domain_ops, tsadc); 74 + tsadc->domain = irq_domain_create_simple(dev_fwnode(dev), 2, 0, &mx25_tsadc_domain_ops, 75 + tsadc); 76 76 if (!tsadc->domain) { 77 77 dev_err(dev, "Failed to add irq domain\n"); 78 78 return -ENOMEM;
+1 -1
drivers/mfd/lp8788-irq.c
··· 161 161 return -ENOMEM; 162 162 163 163 irqd->lp = lp; 164 - irqd->domain = irq_domain_create_linear(of_fwnode_handle(lp->dev->of_node), LP8788_INT_MAX, 164 + irqd->domain = irq_domain_create_linear(dev_fwnode(lp->dev), LP8788_INT_MAX, 165 165 &lp8788_domain_ops, irqd); 166 166 if (!irqd->domain) { 167 167 dev_err(lp->dev, "failed to add irq domain err\n");
+1 -2
drivers/mfd/mt6358-irq.c
··· 272 272 irqd->pmic_ints[i].en_reg_shift * j, 0); 273 273 } 274 274 275 - chip->irq_domain = irq_domain_create_linear(of_fwnode_handle(chip->dev->of_node), 276 - irqd->num_pmic_irqs, 275 + chip->irq_domain = irq_domain_create_linear(dev_fwnode(chip->dev), irqd->num_pmic_irqs, 277 276 &mt6358_irq_domain_ops, chip); 278 277 if (!chip->irq_domain) { 279 278 dev_err(chip->dev, "Could not create IRQ domain\n");
+2 -2
drivers/mfd/mt6397-irq.c
··· 216 216 regmap_write(chip->regmap, chip->int_con[2], 0x0); 217 217 218 218 chip->pm_nb.notifier_call = mt6397_irq_pm_notifier; 219 - chip->irq_domain = irq_domain_create_linear(of_fwnode_handle(chip->dev->of_node), 220 - MT6397_IRQ_NR, &mt6397_irq_domain_ops, chip); 219 + chip->irq_domain = irq_domain_create_linear(dev_fwnode(chip->dev), MT6397_IRQ_NR, 220 + &mt6397_irq_domain_ops, chip); 221 221 if (!chip->irq_domain) { 222 222 dev_err(chip->dev, "could not create irq domain\n"); 223 223 return -ENOMEM;
+2 -2
drivers/mfd/qcom-pm8xxx.c
··· 559 559 chip->pm_irq_data = data; 560 560 spin_lock_init(&chip->pm_irq_lock); 561 561 562 - chip->irqdomain = irq_domain_create_linear(of_fwnode_handle(pdev->dev.of_node), 563 - data->num_irqs, &pm8xxx_irq_domain_ops, chip); 562 + chip->irqdomain = irq_domain_create_linear(dev_fwnode(&pdev->dev), data->num_irqs, 563 + &pm8xxx_irq_domain_ops, chip); 564 564 if (!chip->irqdomain) 565 565 return -ENODEV; 566 566
+2 -3
drivers/mfd/stmfx.c
··· 269 269 u32 irqoutpin = 0, irqtrigger; 270 270 int ret; 271 271 272 - stmfx->irq_domain = irq_domain_create_simple(of_fwnode_handle(stmfx->dev->of_node), 273 - STMFX_REG_IRQ_SRC_MAX, 0, 274 - &stmfx_irq_ops, stmfx); 272 + stmfx->irq_domain = irq_domain_create_simple(dev_fwnode(stmfx->dev), STMFX_REG_IRQ_SRC_MAX, 273 + 0, &stmfx_irq_ops, stmfx); 275 274 if (!stmfx->irq_domain) { 276 275 dev_err(stmfx->dev, "Failed to create IRQ domain\n"); 277 276 return -EINVAL;
+2 -2
drivers/mfd/tps65217.c
··· 158 158 tps65217_set_bits(tps, TPS65217_REG_INT, TPS65217_INT_MASK, 159 159 TPS65217_INT_MASK, TPS65217_PROTECT_NONE); 160 160 161 - tps->irq_domain = irq_domain_create_linear(of_fwnode_handle(tps->dev->of_node), 162 - TPS65217_NUM_IRQ, &tps65217_irq_domain_ops, tps); 161 + tps->irq_domain = irq_domain_create_linear(dev_fwnode(tps->dev), TPS65217_NUM_IRQ, 162 + &tps65217_irq_domain_ops, tps); 163 163 if (!tps->irq_domain) { 164 164 dev_err(tps->dev, "Could not create IRQ domain\n"); 165 165 return -ENOMEM;
+3 -3
drivers/mfd/tps6586x.c
··· 363 363 new_irq_base = 0; 364 364 } 365 365 366 - tps6586x->irq_domain = irq_domain_create_simple(of_fwnode_handle(tps6586x->dev->of_node), 367 - irq_num, new_irq_base, &tps6586x_domain_ops, 368 - tps6586x); 366 + tps6586x->irq_domain = irq_domain_create_simple(dev_fwnode(tps6586x->dev), irq_num, 367 + new_irq_base, &tps6586x_domain_ops, 368 + tps6586x); 369 369 if (!tps6586x->irq_domain) { 370 370 dev_err(tps6586x->dev, "Failed to create IRQ domain\n"); 371 371 return -ENOMEM;
+2 -3
drivers/mfd/twl6030-irq.c
··· 336 336 atomic_set(&twl6030_irq->wakeirqs, 0); 337 337 twl6030_irq->irq_mapping_tbl = of_id->data; 338 338 339 - twl6030_irq->irq_domain = 340 - irq_domain_create_linear(of_fwnode_handle(dev->of_node), nr_irqs, 341 - &twl6030_irq_domain_ops, twl6030_irq); 339 + twl6030_irq->irq_domain = irq_domain_create_linear(dev_fwnode(dev), nr_irqs, 340 + &twl6030_irq_domain_ops, twl6030_irq); 342 341 if (!twl6030_irq->irq_domain) { 343 342 dev_err(dev, "Can't add irq_domain\n"); 344 343 return -ENOMEM;
+4 -6
drivers/mfd/wm831x-irq.c
··· 587 587 } 588 588 589 589 if (irq_base) 590 - domain = irq_domain_create_legacy(of_fwnode_handle(wm831x->dev->of_node), 591 - ARRAY_SIZE(wm831x_irqs), irq_base, 0, 592 - &wm831x_irq_domain_ops, wm831x); 590 + domain = irq_domain_create_legacy(dev_fwnode(wm831x->dev), ARRAY_SIZE(wm831x_irqs), 591 + irq_base, 0, &wm831x_irq_domain_ops, wm831x); 593 592 else 594 - domain = irq_domain_create_linear(of_fwnode_handle(wm831x->dev->of_node), 595 - ARRAY_SIZE(wm831x_irqs), &wm831x_irq_domain_ops, 596 - wm831x); 593 + domain = irq_domain_create_linear(dev_fwnode(wm831x->dev), ARRAY_SIZE(wm831x_irqs), 594 + &wm831x_irq_domain_ops, wm831x); 597 595 598 596 if (!domain) { 599 597 dev_warn(wm831x->dev, "Failed to allocate IRQ domain\n");