common/gpio: switch to lru_cache for 3.8 compatiblity

old-commit-hash: 5831f9e5a0d74a03a1b6ebc7b87f6d76d0fc38ae
This commit is contained in:
Adeeb Shihadeh
2023-07-23 11:54:51 -07:00
parent 0a6b589f23
commit fe6b4d26f3
+2 -2
View File
@@ -1,4 +1,4 @@
from functools import cache
from functools import lru_cache
from typing import Optional, List
def gpio_init(pin: int, output: bool) -> None:
@@ -25,7 +25,7 @@ def gpio_read(pin: int) -> Optional[bool]:
return val
@cache
@lru_cache(maxsize=None)
def get_irq_action(irq: int) -> List[str]:
try:
with open(f"/sys/kernel/irq/{irq}/actions") as f: