Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168245754
D56877.id177411.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D56877.id177411.diff
View Options
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c
--- a/sys/dev/acpica/acpi_spmc.c
+++ b/sys/dev/acpica/acpi_spmc.c
@@ -724,13 +724,12 @@
}
static void
-acpi_spmc_run_dsm(device_t dev, const struct dsm_desc *dsm, int function_index)
+acpi_spmc_run(device_t dev, const struct dsm_desc *const dsm,
+ const int function_index)
{
- struct acpi_spmc_softc *sc;
- ACPI_STATUS status;
- ACPI_BUFFER result;
-
- sc = device_get_softc(dev);
+ const struct acpi_spmc_softc *const sc = device_get_softc(dev);
+ ACPI_STATUS status;
+ ACPI_BUFFER result;
status = acpi_EvaluateDSMTyped(sc->handle, (const uint8_t *)&dsm->uuid,
dsm->revision, function_index, NULL, &result, ACPI_TYPE_ANY);
@@ -754,13 +753,13 @@
struct acpi_spmc_softc *sc = device_get_softc(dev);
if (has_dsm(sc, DSM_INTEL))
- acpi_spmc_run_dsm(dev, &dsm_intel,
+ acpi_spmc_run(dev, &dsm_intel,
DSM_INTEL_MS_DISPLAY_OFF_NOTIF);
if (has_dsm(sc, DSM_MS))
- acpi_spmc_run_dsm(dev, &dsm_ms,
+ acpi_spmc_run(dev, &dsm_ms,
DSM_INTEL_MS_DISPLAY_OFF_NOTIF);
if (has_dsm(sc, DSM_AMD))
- acpi_spmc_run_dsm(dev, &dsm_amd, DSM_AMD_DISPLAY_OFF_NOTIF);
+ acpi_spmc_run(dev, &dsm_amd, DSM_AMD_DISPLAY_OFF_NOTIF);
}
static void
@@ -769,13 +768,13 @@
struct acpi_spmc_softc *sc = device_get_softc(dev);
if (has_dsm(sc, DSM_INTEL))
- acpi_spmc_run_dsm(dev, &dsm_intel,
+ acpi_spmc_run(dev, &dsm_intel,
DSM_INTEL_MS_DISPLAY_ON_NOTIF);
if (has_dsm(sc, DSM_MS))
- acpi_spmc_run_dsm(dev, &dsm_ms,
+ acpi_spmc_run(dev, &dsm_ms,
DSM_INTEL_MS_DISPLAY_ON_NOTIF);
if (has_dsm(sc, DSM_AMD))
- acpi_spmc_run_dsm(dev, &dsm_amd, DSM_AMD_DISPLAY_ON_NOTIF);
+ acpi_spmc_run(dev, &dsm_amd, DSM_AMD_DISPLAY_ON_NOTIF);
}
static void
@@ -786,13 +785,13 @@
acpi_spmc_check_constraints(sc);
if (has_dsm(sc, DSM_AMD))
- acpi_spmc_run_dsm(dev, &dsm_amd, DSM_AMD_LPI_ENTRY_NOTIF);
+ acpi_spmc_run(dev, &dsm_amd, DSM_AMD_LPI_ENTRY_NOTIF);
if (has_dsm(sc, DSM_MS)) {
- acpi_spmc_run_dsm(dev, &dsm_ms, DSM_MS_SLEEP_ENTRY_NOTIF);
- acpi_spmc_run_dsm(dev, &dsm_ms, DSM_INTEL_MS_LPI_ENTRY_NOTIF);
+ acpi_spmc_run(dev, &dsm_ms, DSM_MS_SLEEP_ENTRY_NOTIF);
+ acpi_spmc_run(dev, &dsm_ms, DSM_INTEL_MS_LPI_ENTRY_NOTIF);
}
if (has_dsm(sc, DSM_INTEL))
- acpi_spmc_run_dsm(dev, &dsm_intel,
+ acpi_spmc_run(dev, &dsm_intel,
DSM_INTEL_MS_LPI_ENTRY_NOTIF);
}
@@ -802,15 +801,15 @@
struct acpi_spmc_softc *sc = device_get_softc(dev);
if (has_dsm(sc, DSM_INTEL))
- acpi_spmc_run_dsm(dev, &dsm_intel, DSM_INTEL_MS_LPI_EXIT_NOTIF);
+ acpi_spmc_run(dev, &dsm_intel, DSM_INTEL_MS_LPI_EXIT_NOTIF);
if (has_dsm(sc, DSM_AMD))
- acpi_spmc_run_dsm(dev, &dsm_amd, DSM_AMD_LPI_EXIT_NOTIF);
+ acpi_spmc_run(dev, &dsm_amd, DSM_AMD_LPI_EXIT_NOTIF);
if (has_dsm(sc, DSM_MS)) {
- acpi_spmc_run_dsm(dev, &dsm_ms, DSM_INTEL_MS_LPI_EXIT_NOTIF);
+ acpi_spmc_run(dev, &dsm_ms, DSM_INTEL_MS_LPI_EXIT_NOTIF);
if (supports_function(sc, DSM_MS, DSM_MS_TURN_ON_DISPLAY))
- acpi_spmc_run_dsm(dev, &dsm_ms,
+ acpi_spmc_run(dev, &dsm_ms,
DSM_MS_TURN_ON_DISPLAY);
- acpi_spmc_run_dsm(dev, &dsm_ms, DSM_MS_SLEEP_EXIT_NOTIF);
+ acpi_spmc_run(dev, &dsm_ms, DSM_MS_SLEEP_EXIT_NOTIF);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 28, 3:51 AM (8 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37433793
Default Alt Text
D56877.id177411.diff (3 KB)
Attached To
Mode
D56877: acpi_spmc(4): acpi_spmc_run_dsm(): Rename, rename parameters, constify
Attached
Detach File
Event Timeline
Log In to Comment