Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2850472lqp; Mon, 25 Mar 2024 10:59:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVxJp7Y/rqL7SUsz6MpKAbaXgScZTM+cTpaHJDgIxkFJUqNdj6+Za0RjwGwI4yOMBqL/zlXMWgJ3kDEmCLfBsa47Yw+r9nFWMAD+uuNkg== X-Google-Smtp-Source: AGHT+IHXmcYxsoJBJxeNma/+BIb2+PlEDeCYLSfEpylUbx3CxT1HS89fJxLNz5EoQ3Vmtm6qaoNN X-Received: by 2002:a5d:66ce:0:b0:33e:ca3a:1bba with SMTP id k14-20020a5d66ce000000b0033eca3a1bbamr6974550wrw.20.1711389599577; Mon, 25 Mar 2024 10:59:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711389599; cv=pass; d=google.com; s=arc-20160816; b=JHAmfsWMSz27hz0MSzztj/hYD380X4EeL9SRuI5NyZf8WkHCHXwd2ppRnwtHJu59uT 6irIMgRCPX0PNuaZKIoqkAubIzffm6lZuJha3Nw0L/J4dK9Q9SBhJ5VpvpTylHnKWwBX jlIpJf/wTaC9ADoIEh36VD1340d27H4pJ/y5nPHqQ6J23jKW4QBfcT7aqPzxeRz+qgO2 OZxkPr2DeLplbERIHYOfik1/11jY3fdhNkk7kJqKWqdiOaJZfFo81sD+x9GR7WSwo5T4 sPsV8RgoryGrSFuFJ7FfPRRNnLbHB6O1RUYgO4hsEzmq1ypa7po7DffRdJRSzllUCICh TYJA== 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=gmmAPG74UJeqm2S0Ejs7tJBPAqiavJScIHMwwTu3sdHn5rlpj+1WDKp4UexY1XQiUZ v6DeD+TeEl/ZrnIFKGAesVnjWqn9BykvfKpQd4Zqm/ZlNH7cnnfez7Cbackiqgzzko/l YfYhK09Dnrk/sQ4hHkQT1DI0G7jp2kN1otQXlKppeKYPzhduqvKydLbzT2oqGI85Mcxh XkS4Jl3QPotyO1rXm0VUVs2bv6T/ZW/G/CnJpJjK2THEkLaDzkJzdZHwnfFmI9bwJD/5 az0ayRzVus9Lt9gMQj0R8W3lO5LAA3Jf/XPajCFk2w5BNR/mXEhU9vWcy3Rx8wEv0H5N +6dA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MQo2NyPd; 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-117574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bm5-20020a170906c04500b00a46b9caeaa7si2735037ejb.219.2024.03.25.10.59.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 10:59:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MQo2NyPd; 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-117574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117574-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 441341F383F0 for ; Mon, 25 Mar 2024 17:59:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8C0B12A144; Mon, 25 Mar 2024 17:20:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="MQo2NyPd" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 BFE5B84D12; Mon, 25 Mar 2024 17:20:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387255; cv=none; b=YkcNCcdIoZE3h2IGu4chOLpwbQABtCR6mdEcAs4glvShuVYUAMEyaGGy3hDWnJ2JOd8q2wg+19Mcu+K3IU+N+y68RoWrcrp7V1xUgyqzuI22K0T9LjXJNxeN51hBye2qaMRV8TwuKzjn802HEwk8Hlwglu2Y/jX+amwzKSDxnfM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387255; c=relaxed/simple; bh=NcOCcA1t31ypyx8cNN32oWTH1pjrXQ2t7Fb75KNyUbs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Kp+6hg+RR3qE0DvDrgavZcLFjJ0Iyq1T7WGKfp9PpW+sQKjNq492jRe+oohNBlYq5TthH2YB5XeEgmRyZJSy/UcbA4QOjrhac5TyfFYjF8Ni0jGmCYvgI4qTiBn6K+Fil/C5b6v8xpOcTWG3lz5Kdq4U+1Ry/NbQO/lNqeRt1qM= 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=MQo2NyPd; arc=none smtp.client-ip=198.47.19.141 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 fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42PHKnTb040386; Mon, 25 Mar 2024 12:20:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1711387249; bh=nQlvgEyRLvm0RPmSVnsggj8wOBAJLIUCQWiiAO/T3vc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MQo2NyPdRuxbTualBlmurAg9GL6nHtVSIjDUWNbc6j2m+KdryM8XbadbmwzHA5i04 zL93V152nLjmeJoSQmPshSexCLE1OtSnGpSViZwLVLDdrKup/54vYJMJtPGoVciNgW Cyf6k1zaD+184btu1eF3jlEp9Qhi9/Ov9wycACPk= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42PHKnBp105011 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 25 Mar 2024 12:20:49 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 25 Mar 2024 12:20:49 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE115.ent.ti.com (157.170.170.26) 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; Mon, 25 Mar 2024 12:20:49 -0500 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42PHKkYd075282; Mon, 25 Mar 2024 12:20:48 -0500 From: Andrew Davis To: Jassi Brar , Hari Nagalla , Nick Saulnier , Bjorn Andersson , Mathieu Poirier CC: , , Andrew Davis Subject: [PATCH 07/13] mailbox: omap: Use devm_pm_runtime_enable() helper Date: Mon, 25 Mar 2024 12:20:39 -0500 Message-ID: <20240325172045.113047-8-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240325172045.113047-1-afd@ti.com> References: <20240325172045.113047-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