lkml.org 
[lkml]   [2021]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/7] tty: serial: samsung_tty: Support runtime PM
On Mon, Oct 11, 2021 at 02:32:29PM +0900, Hector Martin wrote:
> On 06/10/2021 16.43, Krzysztof Kozlowski wrote:
> > On 05/10/2021 17:59, Hector Martin wrote:

> >> if (port) {
> >> + pm_runtime_get_sync(&dev->dev);
> >
> > 1. You need to check return status.
> > 2. Why do you need to resume the device here?
>
> As Rafael mentioned, this is basically disabling PM so the device is
> enabled when not bound (which seems to be expected behavior). Not sure
> what I'd do if the resume fails... this is the remove path after all,
> it's not like we're doing anything else with the device at this point.

You still need to disable the clocks before returning from remove().
Consider what happens when the driver is rebound otherwise.

Johan

\
 
 \ /
  Last update: 2021-10-11 10:28    [W:0.071 / U:0.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site