Skip to content

Commit 9ccaf10

Browse files
digetxbrgl
authored andcommitted
gpio: tegra: Use NOIRQ phase for suspend/resume
All GPIO interrupts are disabled during of the NOIRQ suspend/resume phase, thus there is no need to manually disable the interrupts. This patch doesn't fix any problem, this is just a minor clean-up. Signed-off-by: Dmitry Osipenko <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Tested-by: Thierry Reding <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent f56d979 commit 9ccaf10

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/gpio/gpio-tegra.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,8 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc)
416416
static int tegra_gpio_resume(struct device *dev)
417417
{
418418
struct tegra_gpio_info *tgi = dev_get_drvdata(dev);
419-
unsigned long flags;
420419
unsigned int b, p;
421420

422-
local_irq_save(flags);
423-
424421
for (b = 0; b < tgi->bank_count; b++) {
425422
struct tegra_gpio_bank *bank = &tgi->bank_info[b];
426423

@@ -448,17 +445,14 @@ static int tegra_gpio_resume(struct device *dev)
448445
}
449446
}
450447

451-
local_irq_restore(flags);
452448
return 0;
453449
}
454450

455451
static int tegra_gpio_suspend(struct device *dev)
456452
{
457453
struct tegra_gpio_info *tgi = dev_get_drvdata(dev);
458-
unsigned long flags;
459454
unsigned int b, p;
460455

461-
local_irq_save(flags);
462456
for (b = 0; b < tgi->bank_count; b++) {
463457
struct tegra_gpio_bank *bank = &tgi->bank_info[b];
464458

@@ -488,7 +482,7 @@ static int tegra_gpio_suspend(struct device *dev)
488482
GPIO_INT_ENB(tgi, gpio));
489483
}
490484
}
491-
local_irq_restore(flags);
485+
492486
return 0;
493487
}
494488

@@ -562,7 +556,7 @@ static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
562556
#endif
563557

564558
static const struct dev_pm_ops tegra_gpio_pm_ops = {
565-
SET_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume)
559+
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume)
566560
};
567561

568562
static int tegra_gpio_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)