Skip to content

Commit

Permalink
Merge branches 'acpica-fix', 'acpi-ec-fix' and 'acpi-properties-fix'
Browse files Browse the repository at this point in the history
* 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()
  • Loading branch information
Rafael J. Wysocki committed Aug 24, 2017
3 parents 9b40eeb + 98529b9 + b5212f5 commit d5d6c1d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
17 changes: 7 additions & 10 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ int __init acpi_ec_dsdt_probe(void)
* functioning ECDT EC first in order to handle the events.
* 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;

Expand Down Expand Up @@ -2003,20 +2003,17 @@ static inline void acpi_ec_query_exit(void)
int __init acpi_ec_init(void)
{
int result;
int ecdt_fail, dsdt_fail;

/* register workqueue for _Qxx evaluations */
result = acpi_ec_query_init();
if (result)
goto err_exit;
/* Now register the driver for the EC */
result = acpi_bus_register_driver(&acpi_ec_driver);
if (result)
goto err_exit;
return result;

err_exit:
if (result)
acpi_ec_query_exit();
return result;
/* Drivers must be started after acpi_ec_query_init() */
ecdt_fail = acpi_ec_ecdt_start();
dsdt_fail = acpi_bus_register_driver(&acpi_ec_driver);
return ecdt_fail && dsdt_fail ? -ENODEV : 0;
}

/* EC driver currently not unloadable */
Expand Down
1 change: 0 additions & 1 deletion drivers/acpi/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ typedef int (*acpi_ec_query_func) (void *data);
int acpi_ec_init(void);
int acpi_ec_ecdt_probe(void);
int acpi_ec_dsdt_probe(void);
int acpi_ec_ecdt_start(void);
void acpi_ec_block_transactions(void);
void acpi_ec_unblock_transactions(void);
int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/property.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ static struct fwnode_handle *acpi_graph_get_child_prop_value(
fwnode_for_each_child_node(fwnode, child) {
u32 nr;

if (!fwnode_property_read_u32(fwnode, prop_name, &nr))
if (fwnode_property_read_u32(child, prop_name, &nr))
continue;

if (val == nr)
Expand Down
1 change: 0 additions & 1 deletion drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,6 @@ int __init acpi_scan_init(void)

acpi_gpe_apply_masked_gpes();
acpi_update_all_gpes();
acpi_ec_ecdt_start();

acpi_scan_initialized = true;

Expand Down

0 comments on commit d5d6c1d

Please sign in to comment.