summaryrefslogtreecommitdiff
path: root/src/superio
diff options
context:
space:
mode:
Diffstat (limited to 'src/superio')
-rw-r--r--src/superio/nuvoton/npcd378/superio.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/superio/nuvoton/npcd378/superio.c b/src/superio/nuvoton/npcd378/superio.c
index f1db50934a..73c814fd28 100644
--- a/src/superio/nuvoton/npcd378/superio.c
+++ b/src/superio/nuvoton/npcd378/superio.c
@@ -150,7 +150,6 @@ static void npcd378_ssdt_pwr(const struct device *dev)
{
const char *name = acpi_device_path(dev);
const char *scope = acpi_device_scope(dev);
- char *tmp_name;
/* Scope */
acpigen_write_scope(name);
@@ -337,9 +336,7 @@ static void npcd378_ssdt_pwr(const struct device *dev)
/* Method (SIOW, 1, NotSerialized) */
acpigen_write_method("SIOW", 1);
acpigen_emit_byte(RETURN_OP);
- tmp_name = strconcat(name, ".SIOW");
- acpigen_emit_namestring(tmp_name);
- free(tmp_name);
+ acpigen_emit_namestring(acpi_device_path_join(dev, "SIOW"));
acpigen_emit_byte(ARG0_OP);
acpigen_pop_len();
@@ -348,9 +345,7 @@ static void npcd378_ssdt_pwr(const struct device *dev)
/* Method (SIOS, 1, NotSerialized) */
acpigen_write_method("SIOS", 1);
acpigen_emit_byte(RETURN_OP);
- tmp_name = strconcat(name, ".SIOS");
- acpigen_emit_namestring(tmp_name);
- free(tmp_name);
+ acpigen_emit_namestring(acpi_device_path_join(dev, "SIOS"));
acpigen_emit_byte(ARG0_OP);
acpigen_pop_len(); /* Pop Method */
@@ -361,9 +356,7 @@ static void npcd378_ssdt_pwr(const struct device *dev)
/* Method (SIOH, 0, NotSerialized) */
acpigen_write_method("_L08", 0);
acpigen_emit_byte(AND_OP);
- tmp_name = strconcat(scope, ".PMFG");
- acpigen_emit_namestring(tmp_name);
- free(tmp_name);
+ acpigen_emit_namestring(acpi_device_path_join(dev, "RMFG"));
acpigen_write_integer(0xE8);
acpigen_emit_byte(LOCAL0_OP);
@@ -373,17 +366,13 @@ static void npcd378_ssdt_pwr(const struct device *dev)
acpigen_emit_byte(ZERO_OP);
acpigen_emit_byte(NOTIFY_OP);
- tmp_name = strconcat(scope, ".L060");
- acpigen_emit_namestring(tmp_name);
- free(tmp_name);
+ acpigen_emit_namestring(acpi_device_path_join(dev, "L060"));
acpigen_write_integer(2);
acpigen_pop_len(); /* Pop If */
acpigen_emit_byte(AND_OP);
- tmp_name = strconcat(scope, ".PMFG");
- acpigen_emit_namestring(tmp_name);
- free(tmp_name);
+ acpigen_emit_namestring(acpi_device_path_join(dev, "PMFG"));
acpigen_write_integer(0x10);
acpigen_emit_byte(LOCAL0_OP);
@@ -393,9 +382,7 @@ static void npcd378_ssdt_pwr(const struct device *dev)
acpigen_emit_byte(ZERO_OP);
acpigen_emit_byte(NOTIFY_OP);
- tmp_name = strconcat(scope, ".L050");
- acpigen_emit_namestring(tmp_name);
- free(tmp_name);
+ acpigen_emit_namestring(acpi_device_path_join(dev, "L050"));
acpigen_write_integer(2);
acpigen_pop_len(); /* Pop If */