Skip to content

Commit 611da07

Browse files
committed
Merge tag 'acpi-6.6-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fix from Rafael Wysocki: "Unbreak the ACPI NFIT driver after a recent change that inadvertently altered its behavior (Xiang Chen)" * tag 'acpi-6.6-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: NFIT: Install Notify() handler before getting NFIT table
2 parents 4f82870 + 9b311b7 commit 611da07

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

drivers/acpi/nfit/core.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,6 +3339,16 @@ static int acpi_nfit_add(struct acpi_device *adev)
33393339
acpi_size sz;
33403340
int rc = 0;
33413341

3342+
rc = acpi_dev_install_notify_handler(adev, ACPI_DEVICE_NOTIFY,
3343+
acpi_nfit_notify);
3344+
if (rc)
3345+
return rc;
3346+
3347+
rc = devm_add_action_or_reset(dev, acpi_nfit_remove_notify_handler,
3348+
adev);
3349+
if (rc)
3350+
return rc;
3351+
33423352
status = acpi_get_table(ACPI_SIG_NFIT, 0, &tbl);
33433353
if (ACPI_FAILURE(status)) {
33443354
/* The NVDIMM root device allows OS to trigger enumeration of
@@ -3386,17 +3396,7 @@ static int acpi_nfit_add(struct acpi_device *adev)
33863396
if (rc)
33873397
return rc;
33883398

3389-
rc = devm_add_action_or_reset(dev, acpi_nfit_shutdown, acpi_desc);
3390-
if (rc)
3391-
return rc;
3392-
3393-
rc = acpi_dev_install_notify_handler(adev, ACPI_DEVICE_NOTIFY,
3394-
acpi_nfit_notify);
3395-
if (rc)
3396-
return rc;
3397-
3398-
return devm_add_action_or_reset(dev, acpi_nfit_remove_notify_handler,
3399-
adev);
3399+
return devm_add_action_or_reset(dev, acpi_nfit_shutdown, acpi_desc);
34003400
}
34013401

34023402
static void acpi_nfit_update_notify(struct device *dev, acpi_handle handle)

0 commit comments

Comments
 (0)