2022-04-11 15:42:30

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH] serial: core: Start managing serial controllers to enable runtime PM

* Andy Shevchenko <[email protected]> [220411 13:26]:
> On Mon, Apr 11, 2022 at 03:02:18PM +0300, Tony Lindgren wrote:
> > +struct serial_controller {
> > + struct uart_driver *drv; /* For port specific uart_state */
>
> > + struct mutex lock; /* For changing enabled_count */
> > + int enabled_count; /* Enable count for runtime PM */
>
> Wondering if we may use kref instead which will check for saturation as well.

Thanks for the quick review, using kref is a good idea.

Regards,

Tony