From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AD01C433EF for ; Mon, 11 Apr 2022 13:52:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344677AbiDKNyM (ORCPT ); Mon, 11 Apr 2022 09:54:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237887AbiDKNyL (ORCPT ); Mon, 11 Apr 2022 09:54:11 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CA10822A; Mon, 11 Apr 2022 06:51:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id D00F4809F; Mon, 11 Apr 2022 13:49:24 +0000 (UTC) Date: Mon, 11 Apr 2022 16:51:54 +0300 From: Tony Lindgren To: Andy Shevchenko Cc: Greg Kroah-Hartman , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Jiri Slaby , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] serial: core: Start managing serial controllers to enable runtime PM Message-ID: References: <20220411120218.17422-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org * Andy Shevchenko [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