Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2492350rbb; Wed, 28 Feb 2024 03:43:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWhi/E9+JG1+37ZQm5zjfoRvScgrvvpeaQiJu17sqAWH25MLG9bgprQK1Zj5oSWNOJ3zWRLO8Zhqdsp6Ku/AU8aDb5RMy2KqCt362plVA== X-Google-Smtp-Source: AGHT+IGa05YAsOu0+ONzV0IHzp8jM3UA0xtgYXapD/KbLzDd/ipHbz1RYE1wftFPj+RkwOFtBru8 X-Received: by 2002:a17:906:4f0a:b0:a44:1be1:66f0 with SMTP id t10-20020a1709064f0a00b00a441be166f0mr173341eju.57.1709120638902; Wed, 28 Feb 2024 03:43:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709120638; cv=pass; d=google.com; s=arc-20160816; b=U/+1odzlD1+2M0oKJ4whp5mX+Gn3llOle8N2zQXc6PNdCuOsrYLaCcw/JwWDWBfH5P kfq65rJjntsPyXR3A2y2YJ8sZbAkgiTbRVhGYuShgCFASXIyfLnVmpNmvJ0j3UmMRhgO /VG+5BwTvMTJxmDhGG+icJ1F5hzVVzcXyrU8FiTVYU9pJAyOvIc7RHvpYfjrWBTfKYbo CkAvnAPo6NBPS4EpVkqO/0/6iD0uQxQn2dLTpVwMr4oMJhf6Pg09JZmhvnSATmqwC1lq FbkV4xxgoB4mSFc4SzBt6P5/yqBjyZJ6FIQXwBqvNDZ/HoDZc/x5kk3L46AYWFFavzTE LU0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=UVzgKFNV1exaQlx/j0qa2NvTSBRsCqWJEp+Uxg45yLc=; fh=FEGj322JUxHP58NgFBs9atrc2KpQCnFuCu2ueZtAhdY=; b=fUJrciDrY67x6hCnQQVRVev8FR43blrRf2kMJ+ZNn4v3+Ua4OJR823httH+jbO4WqU i0eo5lQULrRQdq1c6qSTn9i8O1uxvkywkySqEcGKo/vpSAhK990KxA0SjKBpThDSgA83 cYHiICycEhnDPKz5iPD8cbAHHCsDpXdf3lcL8fIW2LEvd3pgXkRzIiOYiongTCoh4i06 rdmUeuLV0F+VsiQqUwh6IXg+n2Z10RjcRf2jxfdIqT12B54CbmMTvHXLyVIZGf4yn79+ RHRMIR0giqJKkl+AK/6OOlaIUfm76JHkPZeqMYHZFVdPGpcuj98iwoEYPuPHn1r06ujY jhkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=DEbDrTeU; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-84895-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84895-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w4-20020a170906384400b00a43dd53ccc9si944312ejc.478.2024.02.28.03.43.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 03:43:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84895-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=DEbDrTeU; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-84895-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84895-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 549DB1F23670 for ; Wed, 28 Feb 2024 11:32:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7806F159565; Wed, 28 Feb 2024 11:28:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="DEbDrTeU" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C771B14A4D6; Wed, 28 Feb 2024 11:28:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709119708; cv=none; b=Tlrzl8IRKXWNvNLxmx98pcwgLwNgsctbHq441JSz/7mm49WNog7fSfc8U4pj09DJqTRCtSh6849NoipyvqhrbVCSREpqDxbXOe5MUxms5Gtr78Xv+azCzYi2AWU0wUIl0wFsusWyu61Mir90Kth35bXZ0pkTMsPFlmMdDusvR2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709119708; c=relaxed/simple; bh=QDeGx8kwTh+bFt6eCqKGKD/p/BMyvNhx782+ALmCRTc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RqKFNd6waJ6p7gFvpeQHzEEv0zXn5h3HogE1ShgDeoD2XK9nXeaJKoPke/i6Bp1eLdbZO/j5QqR7A6Y50ugxkf8OKzargNbU1lzLkGcUfYpk2qJoBQNh9++MYFX3xROyo737h4H7hl9kocH3ktFjCcMDkKIdi0oBHRywGco6ESU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=DEbDrTeU; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 62A361BF205; Wed, 28 Feb 2024 11:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709119704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UVzgKFNV1exaQlx/j0qa2NvTSBRsCqWJEp+Uxg45yLc=; b=DEbDrTeUS9hpivzB2+bbkgjpy4iFDaNFXkHbvH8DL+IfJ8JqPqEyNLhzaP2SqGRps792vk em75tNECn3Y4VbEEUUzPn62ah99Scl88Hu921iT6yk96rVWSq3gJ6xIUOfHpJJkOiyW9nn bakUCQxPTofiVZl5pI/IzGeg7opuM8DwaJXnbc78fA+zqtFuf//sAp9OJBBFxeOGOsKWo7 2pwiePihE5pW6cHWxAJ0EYUBOdKbCFOaSW8q4QoRnhP0mtRxyhmVBqpCyxwifsZjnw9H1r MXncWd+Bx64KJY8qdHP0Dtjd/FQrsXDSGugUFHS+Uq+YXBOs4fw6pkoLxnPa1Q== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 28 Feb 2024 12:28:16 +0100 Subject: [PATCH v2 18/30] gpio: nomadik: use devres version of clk_get*() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240228-mbly-gpio-v2-18-3ba757474006@bootlin.com> References: <20240228-mbly-gpio-v2-0-3ba757474006@bootlin.com> In-Reply-To: <20240228-mbly-gpio-v2-0-3ba757474006@bootlin.com> To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Thomas Bogendoerfer Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, Gregory CLEMENT , Vladimir Kondratiev , Thomas Petazzoni , Tawfik Bayouk , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.13.0 X-GND-Sasl: theo.lebrun@bootlin.com Replace call to clk_get() by call to devm_clk_get(). Allow automatic cleanup of the clock in case of probe error. Signed-off-by: Théo Lebrun --- drivers/gpio/gpio-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c index 93015fa3d010..fb821a9b6c5f 100644 --- a/drivers/gpio/gpio-nomadik.c +++ b/drivers/gpio/gpio-nomadik.c @@ -531,7 +531,7 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct device_node *np, } nmk_chip->addr = base; - clk = clk_get(gpio_dev, NULL); + clk = devm_clk_get(gpio_dev, NULL); if (IS_ERR(clk)) { platform_device_put(gpio_pdev); return (void *)clk; -- 2.44.0