History

mfd: max77620: Do not allocate IRQs upfront

regmap_add_irq_chip() will try to allocate all of the IRQ descriptors upfront if passed a non-zero irq_base parameter. However, the intention is to allocate IRQ descriptors on an as-needed basis if possible. Pass 0 instead of -1 to fix that use-case.

Thierry Reding committed 7 years ago

Commit 7f0e60c1 parent f5b4c8b2 files · +2 −4Browse files

Unified · Split

2 files
  1. drivers/mfd/max77620.c +2 −3
  2. include/linux/mfd/max77620.h +0 −1
drivers/mfd/max77620.c+2−3
@@ -507,7 +507,6 @@ static int max77620_probe(struct i2c_client *client, · 506 unmodified lines
507507
508508 i2c_set_clientdata(client, chip);
509509 chip->dev = &client->dev;
510− chip->irq_base = -1;
511510 chip->chip_irq = client->irq;
512511 chip->chip_id = (enum max77620_chip_id)id->driver_data;
513512
@@ -545,8 +544,8 @@ static int max77620_probe(struct i2c_client *client, · 31 unmodified lines
545544
546545 max77620_top_irq_chip.irq_drv_data = chip;
547546 ret = devm_regmap_add_irq_chip(chip->dev, chip->rmap, client->irq,
548− IRQF_ONESHOT | IRQF_SHARED,
549− chip->irq_base, &max77620_top_irq_chip,
547+ IRQF_ONESHOT | IRQF_SHARED, 0,
548+ &max77620_top_irq_chip,
550549 &chip->top_irq_data);
551550 if (ret < 0) {
552551 dev_err(chip->dev, "Failed to add regmap irq: %d\n", ret);
include/linux/mfd/max77620.h+0−1
@@ -329,7 +329,6 @@ struct max77620_chip { · 328 unmodified lines
329329 struct regmap *rmap;
330330
331331 int chip_irq;
332− int irq_base;
333332
334333 /* chip id */
335334 enum max77620_chip_id chip_id;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t