Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp190290lqj; Wed, 10 Apr 2024 07:50:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX7VIQrRy9uFKOMQ64lqDw81U/5CaC4zBoUWktbJhcbrnnN9bY/kBwhr8cddP9HWa2pg3sUaat1Q9+XsbKyBRCwsHGm9ySPtNtBfAAi9Q== X-Google-Smtp-Source: AGHT+IFR4Ynx+cnRVxCHNcovX14NK9klsj80Gc/TQ+36bpgHFVx5/77x2Zw/if5sl77Q1mifLY4d X-Received: by 2002:a05:6358:16d1:b0:183:dda6:4470 with SMTP id r17-20020a05635816d100b00183dda64470mr3431593rwl.12.1712760652778; Wed, 10 Apr 2024 07:50:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712760652; cv=pass; d=google.com; s=arc-20160816; b=lHVS4fGFgZm6t5s0tzuSgVCR5ql0Nfes+AmAemWeiEhtBo8PZpPc0iB/yI0dwpF7hT sueRbXA7gje+6e/+Hz7QCIFawgEz7hIjDcrJqg5e7IWl/ROTuhIRYh2L9mZZyBW0VGsJ Arp7MFNQW+54UMJCp4XrYPXSlBamHBRltZzOL1kmI2hpi5RerJoy+hGbf4LWBwvtCxlF aDUG+M1pZepoDyeyb43wfsf1Q9024bF2U9uhmIbAP6Ms4bIUsujfv0ZMeQMJZSX/DnEt EDtio2A0BUax3qlKlOPbOWjXzwFTN8JOe24x/2GIsk+riUgXAxrynHzhAjbBFXv8R13Z lAbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=nQlvgEyRLvm0RPmSVnsggj8wOBAJLIUCQWiiAO/T3vc=; fh=li+nOTWR+R+c2QHViCtM9aHEBgqgbpW81MUCABMZkAY=; b=vj4yMGbxgEO+orsA/lqPjVmMwz8FDQ19AbpYAVqp7qoSjEqMzLm4t3aVhGRZj6CyGI 2xGMVUdAFDcbdC1cWN2JmU29aD89iJV3U9QGbC+745LM6L2/NQWPHWmzPYgz78GJNiIK 330xSGLPTrAtVl4xQsDMPPcGXd0kQYfrNQwIkvjhWlhuC5vNAXvUn+79r3ZXwyE68J1y KbGnch3aYMhfZdhKw89VwYRvt3ub8lxwqFMh6+M9uu0SEDbrz4NbwZdh5ebvKGx2jXKm uRYgZqL5WAQAY0UMq+b0x3npXZe/8Tcnn2W5nLC+jmeVBQTVeIfDPAMu12L+J/KI3IMs 3zdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="ZRCbb9E/"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-138700-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138700-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id o4-20020a634e44000000b005cecd95b6besi10702522pgl.685.2024.04.10.07.50.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 07:50:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138700-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="ZRCbb9E/"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-138700-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138700-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BA8DAB2CB64 for ; Wed, 10 Apr 2024 14:02:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D66716F0D4; Wed, 10 Apr 2024 13:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="ZRCbb9E/" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 6FA3D15B568; Wed, 10 Apr 2024 13:59:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712757594; cv=none; b=UzSKxXoTDlzKGiBnwjjhbSpkWRqCc2afzjS40X6M1C84LoWfohqK4OnJRSH2SmlUaPz4ndAQ0Ji05ReGfF1yYX8snEhpxPjBUSa87txEw7ypkvBZ+YICNsyCWlN+KdzsgdP7+/v+q7hteytT3+7PQECa/fuIprwvPVMAFbO/C5Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712757594; c=relaxed/simple; bh=NcOCcA1t31ypyx8cNN32oWTH1pjrXQ2t7Fb75KNyUbs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jFYOBtUki9e+DMw1GHGBOTbXI4xCBrzIZhAfoc8U8zSD79MpB5qPgCverFQ2EBhTI0oRf4PReYfEAp+rrNrkskbJgrWVpaVo1KRbMSWPW6OwTSzkf3bSdHnXgKHsiCFFPWHUFFFIZHGzT9OEx8qvXarwrBt/2mXZUOtRDpntzpM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=ZRCbb9E/; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 43ADxkbv056749; Wed, 10 Apr 2024 08:59:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1712757586; bh=nQlvgEyRLvm0RPmSVnsggj8wOBAJLIUCQWiiAO/T3vc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ZRCbb9E/lIB4TqCLieiinTX04PlE6Y2bh1j7uapwppVO8YXv3W8SZCPDr3a37YK22 uIuNGR434jo+1piBs9oAlOdPiHtroHvWXv+sZ0Y4ri4q7WMNFNK/TGqU2Wna0NUI/C Vj/pD201RoUUMCkzyJHf/rs7plG5loHYz0OXfpO0= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 43ADxkuO011501 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Apr 2024 08:59:46 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 10 Apr 2024 08:59:46 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 10 Apr 2024 08:59:46 -0500 Received: from fllvsmtp8.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 43ADxhar067183; Wed, 10 Apr 2024 08:59:45 -0500 From: Andrew Davis To: Jassi Brar , Hari Nagalla , Nick Saulnier , Bjorn Andersson , Mathieu Poirier CC: , , Andrew Davis Subject: [PATCH v2 07/13] mailbox: omap: Use devm_pm_runtime_enable() helper Date: Wed, 10 Apr 2024 08:59:36 -0500 Message-ID: <20240410135942.61667-8-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410135942.61667-1-afd@ti.com> References: <20240410135942.61667-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Use device life-cycle managed runtime enable function to simplify probe and exit paths. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index ea467931faf46..4f956c7b4072c 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b/drivers/mailbox/omap-mailbox.c @@ -726,11 +726,11 @@ static int omap_mbox_probe(struct platform_device *pdev) return ret; platform_set_drvdata(pdev, mdev); - pm_runtime_enable(mdev->dev); + devm_pm_runtime_enable(mdev->dev); ret = pm_runtime_resume_and_get(mdev->dev); if (ret < 0) - goto unregister; + return ret; /* * just print the raw revision register, the format is not @@ -741,26 +741,14 @@ static int omap_mbox_probe(struct platform_device *pdev) ret = pm_runtime_put_sync(mdev->dev); if (ret < 0 && ret != -ENOSYS) - goto unregister; + return ret; devm_kfree(&pdev->dev, finfoblk); return 0; - -unregister: - pm_runtime_disable(mdev->dev); - return ret; -} - -static void omap_mbox_remove(struct platform_device *pdev) -{ - struct omap_mbox_device *mdev = platform_get_drvdata(pdev); - - pm_runtime_disable(mdev->dev); } static struct platform_driver omap_mbox_driver = { .probe = omap_mbox_probe, - .remove_new = omap_mbox_remove, .driver = { .name = "omap-mailbox", .pm = &omap_mbox_pm_ops, -- 2.39.2