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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D38FFC3DA4A for ; Mon, 19 Aug 2024 14:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8r8vZX0TLkXlphek2g43KwTQkJU+hOeULw/Z2z2ApCU=; b=tSKgR42e7GnL+bV5fYLZmqxDIq /cIxb7alu9gml1KYgxmZzwOKtL0hJqfjy/sG7PFVCM6TpSCwrscY1u4+iXqmWA025ociIP73rofmI 9g34EtrmGMaw5TYG11Ow9uBuJOGyA75aFKHmZbsJZfD5TDrTDf4sJUS3jzK9ywd2bsw/pnsrlL/Vh oe2teYaQPojj6HTMRH6kqoReA45wRdGbzPZmZNiMoYxwbVthUhpD9oWNQv7dLcUdiedNwb0x+0orj kf6kD0FK2AbXn7fS00Y1sPw9dcEztn7h1uhYu9FrZcIFKwSvfW1VNhffBGbGKmh/IoIl4bUeqqB7L hvFFOecQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg3fU-00000001om6-45Ev; Mon, 19 Aug 2024 14:47:37 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg3eH-00000001oP7-0NZw for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 14:46:22 +0000 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-70968db52d0so4698996a34.3 for ; Mon, 19 Aug 2024 07:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724078780; x=1724683580; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8r8vZX0TLkXlphek2g43KwTQkJU+hOeULw/Z2z2ApCU=; b=gCh5tkkgTiUN2YDtASEdwdebbO+BLo3uUXy7FDq2ZBtCY2Hjkn0OJ0ua5vN09GTfez AGbuFzBj1k9l2laJYVhKoq/Gu6e570jfi4mqDsGh60wlCGiivt5M5tAN2hmANsBtkxsz YTj776ffsVHglYcV5MYsf7XyU4gwXuHivJW5IZhYGc3gtJ6eCNQGWaL9Awp2bgiLA29q 80SvL1scu/iGWPtyqu16J0aLnqby1svGg0IyQ2jq+pb+Fmf88BsLejq0DzPh2AV8T3PU xnY3QIIH0Cs0tqiIrZsEPyfZKwQb0nad+LmN8U59GhY1H8HIf9CZNB16SpOk+H3UaRWk yA6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724078780; x=1724683580; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8r8vZX0TLkXlphek2g43KwTQkJU+hOeULw/Z2z2ApCU=; b=RlspQZLAn7Fi4f4/PwrTn2maUvll40il+IMY9C40TZDFM2RGNS8pUTEyvw8gmFC/Ly 8E65D07NYX9hqBj8HJ3PB7fb+7UaIW/ZIFfZTpJ1kCqw6P4d5BS1P10OuavKSkUlrYGA +KqBoFR+4inzoE+k+/IqE4LnsFBewwvdKWLPTMIMRxLd9hP+Zp6TDdXHD8rRZWrk4zeV Qlxt7fHnwpf9WaKWNtQGX5P6gi2B/UFE/hc6G5j75Wz5h7GnhGJ/pzp1fmIpl1EiBz6r I9ESuvzJb/QPoB07EXTBxdohc0OfV7HgZw+8X6VRaMrvGpoO070CXyAO6Fzm3tZAA8ke 5D5A== X-Forwarded-Encrypted: i=1; AJvYcCWiyCqyHDTrWMbfxSvroHz5Tsct1Rgd9jGqv8PtdcoiAHP+uHDFKpIYZdS4Vlw/nHmQBt8a1FTdOQqtYCEJu1f7yD18KV+4hKSndX7xJwHlrJIVrx8= X-Gm-Message-State: AOJu0Ywp8yw+vn2skmKdr+74X3QqTyXNczVYwXzOmKvvCc6WaDLYu0Zh /tsHtMBcnfJmk+N7pjqTG6bZf+2ouc5IPUhf5KwnegIp9fGsdVmKKQBfEA== X-Google-Smtp-Source: AGHT+IF0xWTeCT0SqOoVl5Lakk1Cl8bdYSIhAbwVApvfvBKG7cJPB+SE5lP+ESdrLNLfqdnSQKJlJQ== X-Received: by 2002:a05:6870:d185:b0:25e:1edb:5bcf with SMTP id 586e51a60fabf-2701c34553emr12552175fac.6.1724078779582; Mon, 19 Aug 2024 07:46:19 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:f80c:1483:bced:7f88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7c6b6356c76sm7616998a12.62.2024.08.19.07.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 07:46:19 -0700 (PDT) Date: Mon, 19 Aug 2024 07:46:16 -0700 From: Dmitry Torokhov To: Krzysztof Kozlowski Cc: Arnd Bergmann , Mark Brown , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, patches@opensource.cirrus.com Subject: Re: [PATCH 01/14] Input: samsung-keypad - switch to using devm_clk_get_prepared() Message-ID: References: <20240819045813.2154642-1-dmitry.torokhov@gmail.com> <20240819045813.2154642-2-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240819_074621_177781_036A74EE X-CRM114-Status: GOOD ( 19.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 19, 2024 at 02:51:09PM +0200, Krzysztof Kozlowski wrote: > On Sun, Aug 18, 2024 at 09:57:58PM -0700, Dmitry Torokhov wrote: > > Switch to using devm_clk_get_prepared() instead of combining > > devm_clk_get() with clk_prepare(), which simplifies the code and > > ensures that the clock is unprepared at the right time relative to > > releasing other managed resources. > > ... > > > device_init_wakeup(&pdev->dev, pdata->wakeup); > > @@ -439,20 +433,12 @@ static int samsung_keypad_probe(struct platform_device *pdev) > > > > err_disable_runtime_pm: > > pm_runtime_disable(&pdev->dev); > > -err_unprepare_clk: > > - clk_unprepare(keypad->clk); > > return error; > > } > > > > static void samsung_keypad_remove(struct platform_device *pdev) > > { > > - struct samsung_keypad *keypad = platform_get_drvdata(pdev); > > - > > pm_runtime_disable(&pdev->dev); > > - > > - input_unregister_device(keypad->input_dev); > > This looks unrelated. It actually is related: with clk moved to devm we no longer need to unregister input device by hand to keep the right ordering and we can rely on devm to clean the input device as well (it already is being allocated with devm_input_allocate_device()). Thanks. -- Dmitry