Commit d5d6c1dd authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branches 'acpica-fix', 'acpi-ec-fix' and 'acpi-properties-fix'

* acpica-fix:
  ACPICA: Fix acpi_evaluate_object_typed()

* acpi-ec-fix:
  ACPI: EC: Fix regression related to wrong ECDT initialization order

* acpi-properties-fix:
  ACPI: device property: Fix node lookup in acpi_graph_get_child_prop_value()
...@@ -1741,7 +1741,7 @@ int __init acpi_ec_dsdt_probe(void) ...@@ -1741,7 +1741,7 @@ int __init acpi_ec_dsdt_probe(void)
* functioning ECDT EC first in order to handle the events. * functioning ECDT EC first in order to handle the events.
* https://bugzilla.kernel.org/show_bug.cgi?id=115021 * https://bugzilla.kernel.org/show_bug.cgi?id=115021
*/ */
int __init acpi_ec_ecdt_start(void) static int __init acpi_ec_ecdt_start(void)
{ {
acpi_handle handle; acpi_handle handle;
...@@ -2003,20 +2003,17 @@ static inline void acpi_ec_query_exit(void) ...@@ -2003,20 +2003,17 @@ static inline void acpi_ec_query_exit(void)
int __init acpi_ec_init(void) int __init acpi_ec_init(void)
{ {
int result; int result;
int ecdt_fail, dsdt_fail;
/* register workqueue for _Qxx evaluations */ /* register workqueue for _Qxx evaluations */
result = acpi_ec_query_init(); result = acpi_ec_query_init();
if (result) if (result)
goto err_exit; return result;
/* Now register the driver for the EC */
result = acpi_bus_register_driver(&acpi_ec_driver);
if (result)
goto err_exit;
err_exit: /* Drivers must be started after acpi_ec_query_init() */
if (result) ecdt_fail = acpi_ec_ecdt_start();
acpi_ec_query_exit(); dsdt_fail = acpi_bus_register_driver(&acpi_ec_driver);
return result; return ecdt_fail && dsdt_fail ? -ENODEV : 0;
} }
/* EC driver currently not unloadable */ /* EC driver currently not unloadable */
......
...@@ -185,7 +185,6 @@ typedef int (*acpi_ec_query_func) (void *data); ...@@ -185,7 +185,6 @@ typedef int (*acpi_ec_query_func) (void *data);
int acpi_ec_init(void); int acpi_ec_init(void);
int acpi_ec_ecdt_probe(void); int acpi_ec_ecdt_probe(void);
int acpi_ec_dsdt_probe(void); int acpi_ec_dsdt_probe(void);
int acpi_ec_ecdt_start(void);
void acpi_ec_block_transactions(void); void acpi_ec_block_transactions(void);
void acpi_ec_unblock_transactions(void); void acpi_ec_unblock_transactions(void);
int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit, int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
......
...@@ -1047,7 +1047,7 @@ static struct fwnode_handle *acpi_graph_get_child_prop_value( ...@@ -1047,7 +1047,7 @@ static struct fwnode_handle *acpi_graph_get_child_prop_value(
fwnode_for_each_child_node(fwnode, child) { fwnode_for_each_child_node(fwnode, child) {
u32 nr; u32 nr;
if (!fwnode_property_read_u32(fwnode, prop_name, &nr)) if (fwnode_property_read_u32(child, prop_name, &nr))
continue; continue;
if (val == nr) if (val == nr)
......
...@@ -2084,7 +2084,6 @@ int __init acpi_scan_init(void) ...@@ -2084,7 +2084,6 @@ int __init acpi_scan_init(void)
acpi_gpe_apply_masked_gpes(); acpi_gpe_apply_masked_gpes();
acpi_update_all_gpes(); acpi_update_all_gpes();
acpi_ec_ecdt_start();
acpi_scan_initialized = true; acpi_scan_initialized = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment