Message ID | 20190703011734.82614-1-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Rafael Wysocki |
Headers | show |
Series | [v1] ACPI / PMIC: intel: Drop double removal of address space handler | expand |
Hi, On 03-07-19 03:17, Andy Shevchenko wrote: > There is no need to remove address space handler twice, > because removal is idempotent. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Good catch: Reviewed-by: Hans de Goede <hdegoede@redhat.com> Regards, Hans > --- > drivers/acpi/pmic/intel_pmic.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/acpi/pmic/intel_pmic.c b/drivers/acpi/pmic/intel_pmic.c > index 1b722fd57d5e..452041398b34 100644 > --- a/drivers/acpi/pmic/intel_pmic.c > +++ b/drivers/acpi/pmic/intel_pmic.c > @@ -284,8 +284,6 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, > intel_pmic_thermal_handler, > NULL, opregion); > if (ACPI_FAILURE(status)) { > - acpi_remove_address_space_handler(handle, PMIC_POWER_OPREGION_ID, > - intel_pmic_power_handler); > ret = -ENODEV; > goto out_remove_power_handler; > } >
On Wednesday, July 3, 2019 3:17:34 AM CEST Andy Shevchenko wrote: > There is no need to remove address space handler twice, > because removal is idempotent. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/acpi/pmic/intel_pmic.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/acpi/pmic/intel_pmic.c b/drivers/acpi/pmic/intel_pmic.c > index 1b722fd57d5e..452041398b34 100644 > --- a/drivers/acpi/pmic/intel_pmic.c > +++ b/drivers/acpi/pmic/intel_pmic.c > @@ -284,8 +284,6 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, > intel_pmic_thermal_handler, > NULL, opregion); > if (ACPI_FAILURE(status)) { > - acpi_remove_address_space_handler(handle, PMIC_POWER_OPREGION_ID, > - intel_pmic_power_handler); > ret = -ENODEV; > goto out_remove_power_handler; > } > Applied, thanks!
diff --git a/drivers/acpi/pmic/intel_pmic.c b/drivers/acpi/pmic/intel_pmic.c index 1b722fd57d5e..452041398b34 100644 --- a/drivers/acpi/pmic/intel_pmic.c +++ b/drivers/acpi/pmic/intel_pmic.c @@ -284,8 +284,6 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, intel_pmic_thermal_handler, NULL, opregion); if (ACPI_FAILURE(status)) { - acpi_remove_address_space_handler(handle, PMIC_POWER_OPREGION_ID, - intel_pmic_power_handler); ret = -ENODEV; goto out_remove_power_handler; }
There is no need to remove address space handler twice, because removal is idempotent. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/acpi/pmic/intel_pmic.c | 2 -- 1 file changed, 2 deletions(-)