mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] usb: typec: tcpci: Fix wakeup source leaks on device unbind
Date: Mon, 7 Apr 2025 16:56:55 +0300	[thread overview]
Message-ID: <Z_PZp4pL8MVS_QMv@kuha.fi.intel.com> (raw)
In-Reply-To: <20250406204051.63446-1-krzysztof.kozlowski@linaro.org>

On Sun, Apr 06, 2025 at 10:40:50PM +0200, Krzysztof Kozlowski wrote:
> Device can be unbound, so driver must also release memory for the wakeup
> source.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

I this should be marked as a fix. In any case, FWIW:

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tcpm/tcpci_maxim_core.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim_core.c b/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> index fd1b80593367..29a4aa89d1a1 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> @@ -536,7 +536,10 @@ static int max_tcpci_probe(struct i2c_client *client)
>  		return dev_err_probe(&client->dev, ret,
>  				     "IRQ initialization failed\n");
>  
> -	device_init_wakeup(chip->dev, true);
> +	ret = devm_device_init_wakeup(chip->dev);
> +	if (ret)
> +		return dev_err_probe(chip->dev, ret, "Failed to init wakeup\n");
> +
>  	return 0;
>  }
>  
> -- 
> 2.45.2

-- 
heikki

      parent reply	other threads:[~2025-04-07 13:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-06 20:40 Krzysztof Kozlowski
2025-04-06 20:40 ` [PATCH 2/2] usb: typec: tipd: " Krzysztof Kozlowski
2025-04-07 13:58   ` Heikki Krogerus
2025-04-07 13:56 ` Heikki Krogerus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_PZp4pL8MVS_QMv@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®