From patchwork Mon Jul 13 13:18:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 235394 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2834465ilg; Mon, 13 Jul 2020 06:20:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9YDrQX8JmGi1s4e9iJvlrc1AMOWmjboo0mmzuih+I/DZ+dcIkJz7GdNlE9eOpMvAigydB X-Received: by 2002:a17:906:408c:: with SMTP id u12mr66653703ejj.162.1594646425367; Mon, 13 Jul 2020 06:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594646425; cv=none; d=google.com; s=arc-20160816; b=LNlcp1KzmUN7ZNRvtnIATlBckNvz1JtmQtSxDONbMPklnUKYwHsVUegaOz0zseKsLB escYnMYqNfXQgonIPAyN396xgOk/4YHBrWknQxDc5/aP9d7L7UPLpGyGd7EteXYaV1TI aUgVV5FANFx6fAyhoshLnVSuru9haQSgxM82khFyVNQfgYipyML4mndkiBJekvUG5xw+ jWTkzrXI3rJIk/F3wqk0tPk+2FQTY+vuAyxiDH4qvdu30Zpk/AW21yo9++qJJUwLkYXU KYagBM+5mRU/d26HPwaoRKPz/6GcMye/hTVOku5o/wTtUUrgie8ItUh7D4DxTPcsaAuC pyWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=IsCx21R9uOak9QcS7V2jheu5SR94fsyWHn32kBIsdH8=; b=F923axIctY6dpcQDdrDhzXWVkkX4Z0+n9i2Ox+L+jc52xysFxJI8P54YzTToQIpcJM 1tc2OQpcYoe97v3gPNHTE07tjGw/sl7AZYjSaKXxA0dgv7qGA7GF73LiPu3+GPr7nWd4 trbPuGqX1eYtJgVJ7YOASpm9PM0EuXEZKOv1W767JU80KB+tFnthzOA2KGmePN++9Sac wIBlpffDVVywLM+lOoQLivhf/A87X5n3wbRarfzlo0CqRWkx/3zivMBkwxb0nWgPnjIy 30bVMXLN6C9mFa+ebpy/4XwfdEu/kUsQFlKjvGO32OhgElpc0Sz29pIspQxXvlYCPxcw DPiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kG09VKpe; spf=pass (google.com: domain of linux-watchdog-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr21si13075473ejc.489.2020.07.13.06.20.25 for ; Mon, 13 Jul 2020 06:20:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-watchdog-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kG09VKpe; spf=pass (google.com: domain of linux-watchdog-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729814AbgGMNUZ (ORCPT ); Mon, 13 Jul 2020 09:20:25 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:54502 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729751AbgGMNUY (ORCPT ); Mon, 13 Jul 2020 09:20:24 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 06DDIXOF090700; Mon, 13 Jul 2020 08:18:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1594646313; bh=IsCx21R9uOak9QcS7V2jheu5SR94fsyWHn32kBIsdH8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kG09VKpebNsw7WybqlaWAHpeMirfS/GUqi2jbftB9uIIaYJ9PqxqJcJIs+NIwezE9 U90FAyKAh8j4rGyGCXhJjVVutG/ocKEF+pQ4E2UYZqLeH5wsDpPF/PONyPXZZf711n 5as93xlL3tp+ZmR7PyRL/ZTYBUfLxREbZRgmDlhc= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 06DDIXl9092260 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 13 Jul 2020 08:18:33 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 13 Jul 2020 08:18:33 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 13 Jul 2020 08:18:33 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 06DDIOXs015417; Mon, 13 Jul 2020 08:18:32 -0500 From: Tero Kristo To: , , CC: , Subject: [PATCHv3 4/4] watchdog: rti-wdt: balance pm runtime enable calls Date: Mon, 13 Jul 2020 16:18:18 +0300 Message-ID: <20200713131818.825-5-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200713131818.825-1-t-kristo@ti.com> References: <20200713131818.825-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org PM runtime should be disabled in the fail path of probe and when the driver is removed. Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support") Signed-off-by: Tero Kristo Reviewed-by: Guenter Roeck --- drivers/watchdog/rti_wdt.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c index 45dfc546e371..5cc1a1d654b6 100644 --- a/drivers/watchdog/rti_wdt.c +++ b/drivers/watchdog/rti_wdt.c @@ -302,6 +302,7 @@ static int rti_wdt_probe(struct platform_device *pdev) err_iomap: pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); return ret; } @@ -312,6 +313,7 @@ static int rti_wdt_remove(struct platform_device *pdev) watchdog_unregister_device(&wdt->wdd); pm_runtime_put(&pdev->dev); + pm_runtime_disable(&pdev->dev); return 0; }