Skip to content

Commit 55b7530

Browse files
MrVandtor
authored andcommitted
Input: bbnsm_pwrkey - add remove hook
Without remove hook to clear wake irq, there will be kernel dump when doing module test. "bbnsm_pwrkey 44440000.bbnsm:pwrkey: wake irq already initialized" Add remove hook to clear wake irq and set wakeup to false. Signed-off-by: Peng Fan <[email protected]> Fixes: 40e40fd ("Input: bbnsm_pwrkey - add bbnsm power key support") Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 1bba296 commit 55b7530

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/input/misc/nxp-bbnsm-pwrkey.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ static int bbnsm_pwrkey_probe(struct platform_device *pdev)
187187
return 0;
188188
}
189189

190+
static void bbnsm_pwrkey_remove(struct platform_device *pdev)
191+
{
192+
dev_pm_clear_wake_irq(&pdev->dev);
193+
device_init_wakeup(&pdev->dev, false);
194+
}
195+
190196
static int __maybe_unused bbnsm_pwrkey_suspend(struct device *dev)
191197
{
192198
struct platform_device *pdev = to_platform_device(dev);
@@ -223,6 +229,8 @@ static struct platform_driver bbnsm_pwrkey_driver = {
223229
.of_match_table = bbnsm_pwrkey_ids,
224230
},
225231
.probe = bbnsm_pwrkey_probe,
232+
.remove = bbnsm_pwrkey_remove,
233+
226234
};
227235
module_platform_driver(bbnsm_pwrkey_driver);
228236

0 commit comments

Comments
 (0)