summaryrefslogtreecommitdiff
path: root/src/arch/amd64/acpi.c
diff options
context:
space:
mode:
authortrimill <trimill@trimillxyz.org>2024-01-31 22:30:35 -0500
committertrimill <trimill@trimillxyz.org>2024-02-01 17:01:20 -0500
commitb5b904cfc9bf22ce9f6c3cfcf110e4559ef0994a (patch)
tree2b352192a63e75fa921ac82ef370adb7da49434d /src/arch/amd64/acpi.c
parentdisplay mem formatted (diff)
downloadcorn-b5b904cfc9bf22ce9f6c3cfcf110e4559ef0994a.tar.gz
corn-b5b904cfc9bf22ce9f6c3cfcf110e4559ef0994a.tar.bz2
corn-b5b904cfc9bf22ce9f6c3cfcf110e4559ef0994a.zip
follow the corn style guide
Diffstat (limited to 'src/arch/amd64/acpi.c')
-rw-r--r--src/arch/amd64/acpi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/arch/amd64/acpi.c b/src/arch/amd64/acpi.c
index 70c2f38..d476ac8 100644
--- a/src/arch/amd64/acpi.c
+++ b/src/arch/amd64/acpi.c
@@ -162,13 +162,13 @@ static bool checksum(uint8_t *data, size_t len) {
static int read_s5_addr(struct acpi_state *state) {
uintptr_t ptr = state->fadt.dsdt;
- char *s5_addr = (void*) (ptr + 36);
+ char *s5_addr = (void *) (ptr + 36);
- int dsdt_len = *((int*) (ptr+1)) - 36;
+ int dsdt_len = *((int *) (ptr+1)) - 36;
while (0 < dsdt_len--) {
- if ( memcmp(s5_addr, "_S5_", 4) == 0)
- break;
- s5_addr++;
+ if (memcmp(s5_addr, "_S5_", 4) == 0)
+ break;
+ s5_addr++;
}
if (dsdt_len > 0) {
@@ -178,12 +178,12 @@ static int read_s5_addr(struct acpi_state *state) {
s5_addr += ((*s5_addr &0xC0)>>6) +2; // calculate PkgLength size
if (*s5_addr == 0x0A)
- s5_addr++; // skip byteprefix
+ s5_addr++; // skip byteprefix
state->SLP_TYPa = *(s5_addr)<<10;
s5_addr++;
if (*s5_addr == 0x0A)
- s5_addr++; // skip byteprefix
+ s5_addr++; // skip byteprefix
state->SLP_TYPb = *(s5_addr)<<10;
state->SLP_EN = 1<<13;