Skip to content

Commit 417206a

Browse files
committed
mfd: max8997: Remove unused function max8997_irq_exit()
Utilise devm_*() managed resource helpers for freeing IRQs instead. Reported-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Lee Jones <[email protected]>
1 parent 616821e commit 417206a

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

drivers/mfd/max8997-irq.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ int max8997_irq_init(struct max8997_dev *max8997)
335335
}
336336
max8997->irq_domain = domain;
337337

338-
ret = request_threaded_irq(max8997->irq, NULL, max8997_irq_thread,
338+
ret = devm_request_threaded_irq(max8997->dev, max8997->irq, NULL,
339+
max8997_irq_thread,
339340
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
340341
"max8997-irq", max8997);
341342

@@ -348,7 +349,8 @@ int max8997_irq_init(struct max8997_dev *max8997)
348349
if (!max8997->ono)
349350
return 0;
350351

351-
ret = request_threaded_irq(max8997->ono, NULL, max8997_irq_thread,
352+
ret = devm_request_threaded_irq(max8997->dev, max8997->ono, NULL,
353+
max8997_irq_thread,
352354
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
353355
IRQF_ONESHOT, "max8997-ono", max8997);
354356

@@ -358,12 +360,3 @@ int max8997_irq_init(struct max8997_dev *max8997)
358360

359361
return 0;
360362
}
361-
362-
void max8997_irq_exit(struct max8997_dev *max8997)
363-
{
364-
if (max8997->ono)
365-
free_irq(max8997->ono, max8997);
366-
367-
if (max8997->irq)
368-
free_irq(max8997->irq, max8997);
369-
}

include/linux/mfd/max8997-private.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ enum max8997_types {
397397
};
398398

399399
extern int max8997_irq_init(struct max8997_dev *max8997);
400-
extern void max8997_irq_exit(struct max8997_dev *max8997);
401400
extern int max8997_irq_resume(struct max8997_dev *max8997);
402401

403402
extern int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest);

0 commit comments

Comments
 (0)