* [PATCH] power: supply: pda_power: add missed usb_unregister_notifier
@ 2019-11-15 6:25 Chuhong Yuan
2019-12-19 0:17 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Chuhong Yuan @ 2019-11-15 6:25 UTC (permalink / raw)
Cc: Sebastian Reichel, linux-pm, linux-kernel, Chuhong Yuan
The driver forgets to unregister the notifier in remove.
Add the call to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
drivers/power/supply/pda_power.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/power/supply/pda_power.c b/drivers/power/supply/pda_power.c
index 3ae5707d39fa..03a37fd6be27 100644
--- a/drivers/power/supply/pda_power.c
+++ b/drivers/power/supply/pda_power.c
@@ -429,6 +429,10 @@ static int pda_power_probe(struct platform_device *pdev)
static int pda_power_remove(struct platform_device *pdev)
{
+#if IS_ENABLED(CONFIG_USB_PHY)
+ if (!IS_ERR_OR_NULL(transceiver) && pdata->use_otg_notifier)
+ usb_unregister_notifier(transceiver, &otg_nb);
+#endif
if (pdata->is_usb_online && usb_irq)
free_irq(usb_irq->start, pda_psy_usb);
if (pdata->is_ac_online && ac_irq)
--
2.24.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] power: supply: pda_power: add missed usb_unregister_notifier
2019-11-15 6:25 [PATCH] power: supply: pda_power: add missed usb_unregister_notifier Chuhong Yuan
@ 2019-12-19 0:17 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2019-12-19 0:17 UTC (permalink / raw)
To: Chuhong Yuan; +Cc: linux-pm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]
Hi,
On Fri, Nov 15, 2019 at 02:25:15PM +0800, Chuhong Yuan wrote:
> The driver forgets to unregister the notifier in remove.
> Add the call to fix it.
>
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
Thanks, queued to power-supply's for-next branch.
-- Sebastian
> drivers/power/supply/pda_power.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/power/supply/pda_power.c b/drivers/power/supply/pda_power.c
> index 3ae5707d39fa..03a37fd6be27 100644
> --- a/drivers/power/supply/pda_power.c
> +++ b/drivers/power/supply/pda_power.c
> @@ -429,6 +429,10 @@ static int pda_power_probe(struct platform_device *pdev)
>
> static int pda_power_remove(struct platform_device *pdev)
> {
> +#if IS_ENABLED(CONFIG_USB_PHY)
> + if (!IS_ERR_OR_NULL(transceiver) && pdata->use_otg_notifier)
> + usb_unregister_notifier(transceiver, &otg_nb);
> +#endif
> if (pdata->is_usb_online && usb_irq)
> free_irq(usb_irq->start, pda_psy_usb);
> if (pdata->is_ac_online && ac_irq)
> --
> 2.24.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-19 0:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 6:25 [PATCH] power: supply: pda_power: add missed usb_unregister_notifier Chuhong Yuan
2019-12-19 0:17 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).