Skip to content

Commit eeda0b7

Browse files
committed
Merge tag 'at91-fixes-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes
AT91 fixes for 6.4 It contains: - fix imbalanced reference counter for ethernet devices; without it system hangs after consecutive suspend/resume cycles; - fix debounce delay property for shutdown controller; the initial DT property is not what the driver expects. * tag 'at91-fixes-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama7g5ek: fix debounce delay property for shdwc ARM: at91: pm: fix imbalanced reference counter for ethernet devices Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 44b5814 + 6b0db16 commit eeda0b7

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

arch/arm/boot/dts/at91-sama7g5ek.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@
792792
};
793793

794794
&shdwc {
795-
atmel,shdwc-debouncer = <976>;
795+
debounce-delay-us = <976>;
796796
status = "okay";
797797

798798
input@0 {

arch/arm/mach-at91/pm.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -334,16 +334,14 @@ static bool at91_pm_eth_quirk_is_valid(struct at91_pm_quirk_eth *eth)
334334
pdev = of_find_device_by_node(eth->np);
335335
if (!pdev)
336336
return false;
337+
/* put_device(eth->dev) is called at the end of suspend. */
337338
eth->dev = &pdev->dev;
338339
}
339340

340341
/* No quirks if device isn't a wakeup source. */
341-
if (!device_may_wakeup(eth->dev)) {
342-
put_device(eth->dev);
342+
if (!device_may_wakeup(eth->dev))
343343
return false;
344-
}
345344

346-
/* put_device(eth->dev) is called at the end of suspend. */
347345
return true;
348346
}
349347

@@ -439,14 +437,14 @@ static int at91_pm_config_quirks(bool suspend)
439437
pr_err("AT91: PM: failed to enable %s clocks\n",
440438
j == AT91_PM_G_ETH ? "geth" : "eth");
441439
}
442-
} else {
443-
/*
444-
* Release the reference to eth->dev taken in
445-
* at91_pm_eth_quirk_is_valid().
446-
*/
447-
put_device(eth->dev);
448-
eth->dev = NULL;
449440
}
441+
442+
/*
443+
* Release the reference to eth->dev taken in
444+
* at91_pm_eth_quirk_is_valid().
445+
*/
446+
put_device(eth->dev);
447+
eth->dev = NULL;
450448
}
451449

452450
return ret;

0 commit comments

Comments
 (0)