Thread (35 messages) 35 messages, 6 authors, 2017-04-11

Re: [PATCH 3/4] power: supply: axp288_fuel_gauge: Unregister duplicate ACPI battery supply

From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2017-03-31 09:05:36
Also in: linux-acpi

On Fri, Mar 31, 2017 at 11:01 AM, Hans de Goede [off-list ref] wrote:

[cut]
quoted
quoted
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -26,6 +26,7 @@
 #include <linux/mfd/axp20x.h>
 #include <linux/platform_device.h>
 #include <linux/power_supply.h>
+#include <linux/power/acpi.h>
 #include <linux/iio/consumer.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
@@ -754,6 +755,8 @@ static int axp288_fuel_gauge_probe(struct
platform_device *pdev)
                return ret;
        }

+       acpi_battery_unregister();
+

What if the ACPI battery driver is loaded after this has been called
already?

The module exports that symbol so it must be loaded already.
But then it may be unloaded manually and loaded again, may it not?

Thanks,
Rafael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help