Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp850474pxr; Mon, 11 Apr 2022 08:42:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzotJB1DJmpcx/wpQmg+tdoJ8TgAMRjkxRHAd0T8bzWzUR6go5qvpekwvzVoN5vTui7gRqo X-Received: by 2002:a65:6543:0:b0:39d:5e6e:24c3 with SMTP id a3-20020a656543000000b0039d5e6e24c3mr4419713pgw.560.1649691749895; Mon, 11 Apr 2022 08:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649691749; cv=none; d=google.com; s=arc-20160816; b=OqE3D9IB2fpnmjwsK+8huaZlxx9vlZZAVe+tU76woLXbOs6e91lq/zWZhRFe1WDJoO FErmDmrP4fKJej8naUEWIDlUaN9/pDU755r8pZSr7yDAGe8XL3npWHnZeETJQRw/4Oh4 aOs7uqAvoek+XgoRgqo74YJadNfW4bL0CXeuFBjX3OHoLAYMwwcNZ85Kzv/f4cPcY6jr 2JLaOoqQOpG3lK2d9Z6+klJhU0z9uuGJQh9xLcqPmXvwyZxnFUelFV9ajrpMbgyreDaB 0ZmEqOJeRbL+5/Og3i325WMYTXmSf38DE+qNcdnhYQZjoZ2VQDkIE1G5JOmqg7ZYwxB5 GrRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=RibiWDQmGl3VgYbV4RE/t8wUOCqwnq2JZi55HOMnNdY=; b=IHgSTqVDM0OeUBRAHxTBqpr0TzB3roXa+n9hhCTbxyVoPNFtCDtEQrWbLgQujKmcX2 z0yht1mVJIE8d4Q6YGVQeLCEF0CwXQUsjkeU0NaebMNcgY2bHIFbut2P0SfjmbFBqfkZ dKrLvUstDQ0aGC0CmH7QOtF+mN+rOhmAAm0wJPzNVsnm0VvAPwlkm3iDgTc7N1Bj5bfL 3pzMuRQLBvKhNPWZqX0dBlYCNrGjk7n0B6nY2P4bbYH7NLsI1SOyCjUJr0zmWNiUi80J dWtwuJVqA/IyeRNXk3twisPuIp5ihtqXBp7/VDH8pF59YNN8YNJcAjbD5sprKNHYCSfR 3dBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a170903230600b0015605a7d777si9351102plh.294.2022.04.11.08.42.12; Mon, 11 Apr 2022 08:42:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346736AbiDKNyN (ORCPT + 99 others); Mon, 11 Apr 2022 09:54:13 -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: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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