[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOuDEK07M3Zj6uYZ0CeygSn-5tXHoueL5JQc2xZV5jywJR5GAA@mail.gmail.com>
Date: Mon, 13 Jan 2025 17:19:00 +0800
From: Guan-Yu Lin <guanyulin@...gle.com>
To: Alan Stern <stern@...land.harvard.edu>
Cc: gregkh@...uxfoundation.org, Thinh.Nguyen@...opsys.com,
mathias.nyman@...el.com, perex@...ex.cz, tiwai@...e.com,
sumit.garg@...aro.org, kekrby@...il.com, oneukum@...e.com,
ricardo@...liere.net, lijiayi@...inos.cn, quic_jjohnson@...cinc.com,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-sound@...r.kernel.org
Subject: Re: [PATCH v7 3/5] usb: add apis for offload usage tracking
On Thu, Jan 9, 2025 at 11:04 PM Alan Stern <stern@...land.harvard.edu> wrote:
>
> On Thu, Jan 09, 2025 at 03:55:07AM +0000, Guan-Yu Lin wrote:
> > + /*
> > + * offload_usage could only be modified when the device is active, since
> > + * it will alter the suspend flow of the device.
> > + */
> > + ret = pm_runtime_get_sync(&udev->dev);
>
> Note that this function will increment the runtime PM reference count
> even if it returns an error. You probably want to call
> pm_runtime_resume_and_get() instead. Likewise in usb_offload_put().
>
Thanks for the heads up! Let me address this in the next patch.
Regards,
Guan-Yu
Powered by blists - more mailing lists