From patchwork Fri Oct 4 09:41:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 13822003 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 31FB915687D for ; Fri, 4 Oct 2024 09:41:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728034914; cv=none; b=EZozWnVB8tq8mWYSueBR7Yj2PLgYRjvPQgkfJ6rTgBK/yx2f3M6H/W/+A0IYSuhMsFGyYD91VyCoilMb3/fkSpMQT9vWLQXKWGQcR5N6uUZuApVK8Rw6ysHwzGOzZqZGn2cxkw2GoupqBuQXX4akGu0grcU/HAI/mgA5adRj3lY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728034914; c=relaxed/simple; bh=F/KtxLelD2a2yvZbdLpUiROMDzTXww3flya3Kt/tXfA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=P6dY6alKjyXr7Cz63toih+9hot7TGpxPMjqJc0l0fIhHHa+Niv17VKH/6Imh1gQvTKaHMrhzg8obVjX5259ZqP9uTku/BfUjyqRAURbR5QYZOjIgpu/XPcnnK5ME2ItiWl7lcsgdWD2C7p7FSqLFb/EDX6Gf+/rZN+RohrdzTgA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dMMj0ZXB; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dMMj0ZXB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728034913; x=1759570913; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F/KtxLelD2a2yvZbdLpUiROMDzTXww3flya3Kt/tXfA=; b=dMMj0ZXBuqatvmip9he/9XeB6cb2eI3Jr3eEktuobjahbc/SusG62VnP BALbFZdJ7n2414fXI1nMljuCsIr3DgTq6pK01gjXs0MM9OAuPtCsQyRJh kmVlJaipR4hhyaXauiTqzNC++LwrTw5bHg/jDUj0WUvkwqrz9eCi44hM+ nKL3l1GuffTfxEvZPCf24H/BTrdeA1XSsgGKbCJ6fGK+BKfD5KG/sY23f O4NAZMahBXieq+HhCdVTu1V86Xt5y8yMNMO71ItlVSR1YEh6aJWAMXf74 Z4cBGFMz2lDz9mAX2CTPaQPu79aC1JDs/htMBmjOLIvNurrldRFZDWWye A==; X-CSE-ConnectionGUID: c8iDkCz8RhuTgqiA7FbRdw== X-CSE-MsgGUID: k4VqW/G9Q5u/wmh5Wd1q4Q== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="27136213" X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="27136213" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:52 -0700 X-CSE-ConnectionGUID: HS5sbEAASSWj0KGH6m56JA== X-CSE-MsgGUID: m/NTlGjbST26ue+95RNxUA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="105492101" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:50 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 16CB4120CED; Fri, 4 Oct 2024 12:41:45 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1sweoj-000TgG-0F; Fri, 04 Oct 2024 12:41:45 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: Andreas Noever , Michael Jamet , Mika Westerberg , Yehezkel Bernat Cc: linux-usb@vger.kernel.org Subject: [PATCH 43/51] thunderbolt: Switch to __pm_runtime_put_autosuspend() Date: Fri, 4 Oct 2024 12:41:45 +0300 Message-Id: <20241004094145.114082-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241004094101.113349-1-sakari.ailus@linux.intel.com> References: <20241004094101.113349-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus Acked-by: Mika Westerberg --- drivers/thunderbolt/debugfs.c | 22 +++++++++++----------- drivers/thunderbolt/domain.c | 4 ++-- drivers/thunderbolt/icm.c | 14 +++++++------- drivers/thunderbolt/nhi.c | 2 +- drivers/thunderbolt/retimer.c | 4 ++-- drivers/thunderbolt/switch.c | 6 +++--- drivers/thunderbolt/tb.c | 18 +++++++++--------- drivers/thunderbolt/usb4_port.c | 4 ++-- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/drivers/thunderbolt/debugfs.c b/drivers/thunderbolt/debugfs.c index 350310bd0fee..c9dbd7e8c3b6 100644 --- a/drivers/thunderbolt/debugfs.c +++ b/drivers/thunderbolt/debugfs.c @@ -209,7 +209,7 @@ static ssize_t regs_write(struct tb_switch *sw, struct tb_port *port, out: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); free_page((unsigned long)buf); return ret < 0 ? ret : count; @@ -341,7 +341,7 @@ static ssize_t port_sb_regs_write(struct file *file, const char __user *user_buf mutex_unlock(&tb->lock); out: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); free_page((unsigned long)buf); return ret < 0 ? ret : count; @@ -374,7 +374,7 @@ static ssize_t retimer_sb_regs_write(struct file *file, mutex_unlock(&tb->lock); out: pm_runtime_mark_last_busy(&rt->dev); - pm_runtime_put_autosuspend(&rt->dev); + __pm_runtime_put_autosuspend(&rt->dev); free_page((unsigned long)buf); return ret < 0 ? ret : count; @@ -1113,7 +1113,7 @@ static int margining_run_write(void *data, u64 val) mutex_unlock(&tb->lock); out_rpm_put: pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); return ret; } @@ -1647,7 +1647,7 @@ static ssize_t counters_write(struct file *file, const char __user *user_buf, out: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); free_page((unsigned long)buf); return ret < 0 ? ret : count; @@ -1842,7 +1842,7 @@ static int port_regs_show(struct seq_file *s, void *not_used) mutex_unlock(&tb->lock); out_rpm_put: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); return ret; } @@ -1946,7 +1946,7 @@ static int switch_regs_show(struct seq_file *s, void *not_used) mutex_unlock(&tb->lock); out_rpm_put: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); return ret; } @@ -2007,7 +2007,7 @@ static int path_show(struct seq_file *s, void *not_used) mutex_unlock(&tb->lock); out_rpm_put: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); return ret; } @@ -2061,7 +2061,7 @@ static int counters_show(struct seq_file *s, void *not_used) out: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); return ret; } @@ -2115,7 +2115,7 @@ static int port_sb_regs_show(struct seq_file *s, void *not_used) mutex_unlock(&tb->lock); out_rpm_put: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); return ret; } @@ -2228,7 +2228,7 @@ static int retimer_sb_regs_show(struct seq_file *s, void *not_used) mutex_unlock(&tb->lock); out_rpm_put: pm_runtime_mark_last_busy(&rt->dev); - pm_runtime_put_autosuspend(&rt->dev); + __pm_runtime_put_autosuspend(&rt->dev); return ret; } diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c index 144d0232a70c..a9106881f822 100644 --- a/drivers/thunderbolt/domain.c +++ b/drivers/thunderbolt/domain.c @@ -151,7 +151,7 @@ static ssize_t boot_acl_show(struct device *dev, struct device_attribute *attr, out: pm_runtime_mark_last_busy(&tb->dev); - pm_runtime_put_autosuspend(&tb->dev); + __pm_runtime_put_autosuspend(&tb->dev); kfree(uuids); return ret; @@ -223,7 +223,7 @@ static ssize_t boot_acl_store(struct device *dev, struct device_attribute *attr, err_rpm_put: pm_runtime_mark_last_busy(&tb->dev); - pm_runtime_put_autosuspend(&tb->dev); + __pm_runtime_put_autosuspend(&tb->dev); err_free_acl: kfree(acl); err_free_str: diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c index 7859bccc592d..3ed8703316ba 100644 --- a/drivers/thunderbolt/icm.c +++ b/drivers/thunderbolt/icm.c @@ -367,7 +367,7 @@ static void icm_veto_end(struct tb *tb) icm->veto = false; /* Allow the domain suspend now */ pm_runtime_mark_last_busy(&tb->dev); - pm_runtime_put_autosuspend(&tb->dev); + __pm_runtime_put_autosuspend(&tb->dev); } } @@ -697,7 +697,7 @@ static void add_xdomain(struct tb_switch *sw, u64 route, out: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); } static void update_xdomain(struct tb_xdomain *xd, u64 route, u8 link) @@ -859,7 +859,7 @@ icm_fr_device_connected(struct tb *tb, const struct icm_pkg_header *hdr) } pm_runtime_mark_last_busy(&parent_sw->dev); - pm_runtime_put_autosuspend(&parent_sw->dev); + __pm_runtime_put_autosuspend(&parent_sw->dev); tb_switch_put(parent_sw); } @@ -893,7 +893,7 @@ icm_fr_device_disconnected(struct tb *tb, const struct icm_pkg_header *hdr) remove_switch(sw); pm_runtime_mark_last_busy(sw->dev.parent); - pm_runtime_put_autosuspend(sw->dev.parent); + __pm_runtime_put_autosuspend(sw->dev.parent); tb_switch_put(sw); } @@ -1285,7 +1285,7 @@ __icm_tr_device_connected(struct tb *tb, const struct icm_pkg_header *hdr, } pm_runtime_mark_last_busy(&parent_sw->dev); - pm_runtime_put_autosuspend(&parent_sw->dev); + __pm_runtime_put_autosuspend(&parent_sw->dev); tb_switch_put(parent_sw); } @@ -1316,7 +1316,7 @@ icm_tr_device_disconnected(struct tb *tb, const struct icm_pkg_header *hdr) remove_switch(sw); pm_runtime_mark_last_busy(sw->dev.parent); - pm_runtime_put_autosuspend(sw->dev.parent); + __pm_runtime_put_autosuspend(sw->dev.parent); tb_switch_put(sw); } @@ -2045,7 +2045,7 @@ static void remove_unplugged_switch(struct tb_switch *sw) tb_switch_remove(sw); pm_runtime_mark_last_busy(parent); - pm_runtime_put_autosuspend(parent); + __pm_runtime_put_autosuspend(parent); put_device(parent); } diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 7af2642b97cb..d46fab8a7a33 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -1408,7 +1408,7 @@ static int nhi_probe(struct pci_dev *pdev, const struct pci_device_id *id) pm_runtime_allow(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, TB_AUTOSUSPEND_DELAY); pm_runtime_use_autosuspend(&pdev->dev); - pm_runtime_put_autosuspend(&pdev->dev); + __pm_runtime_put_autosuspend(&pdev->dev); return 0; } diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c index 721319329afa..3818f0bb2512 100644 --- a/drivers/thunderbolt/retimer.c +++ b/drivers/thunderbolt/retimer.c @@ -54,7 +54,7 @@ static int nvm_read(void *priv, unsigned int offset, void *val, size_t bytes) out: pm_runtime_mark_last_busy(&rt->dev); - pm_runtime_put_autosuspend(&rt->dev); + __pm_runtime_put_autosuspend(&rt->dev); return ret; } @@ -304,7 +304,7 @@ static ssize_t nvm_authenticate_store(struct device *dev, mutex_unlock(&rt->tb->lock); exit_rpm: pm_runtime_mark_last_busy(&rt->dev); - pm_runtime_put_autosuspend(&rt->dev); + __pm_runtime_put_autosuspend(&rt->dev); if (ret) return ret; diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 6a2116cbb06f..126e8ddd26f4 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -319,7 +319,7 @@ static int nvm_read(void *priv, unsigned int offset, void *val, size_t bytes) out: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); return ret; } @@ -1847,7 +1847,7 @@ static ssize_t authorized_store(struct device *dev, pm_runtime_get_sync(&sw->dev); ret = tb_switch_set_authorized(sw, val); pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); return ret ? ret : count; } @@ -2079,7 +2079,7 @@ static ssize_t nvm_authenticate_sysfs(struct device *dev, const char *buf, mutex_unlock(&sw->tb->lock); exit_rpm: pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); return ret; } diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c index 10e719dd837c..7a1d80ce3666 100644 --- a/drivers/thunderbolt/tb.c +++ b/drivers/thunderbolt/tb.c @@ -1217,7 +1217,7 @@ static void tb_scan_switch(struct tb_switch *sw) tb_scan_port(port); pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); } /* @@ -1349,7 +1349,7 @@ static void tb_scan_port(struct tb_port *port) out_rpm_put: if (port->usb4) { pm_runtime_mark_last_busy(&port->usb4->dev); - pm_runtime_put_autosuspend(&port->usb4->dev); + __pm_runtime_put_autosuspend(&port->usb4->dev); } } @@ -1674,9 +1674,9 @@ static void tb_deactivate_and_free_tunnel(struct tb_tunnel *tunnel) tb_configure_sym(tb, src_port, dst_port, true); /* Now we can allow the domain to runtime suspend again */ pm_runtime_mark_last_busy(&dst_port->sw->dev); - pm_runtime_put_autosuspend(&dst_port->sw->dev); + __pm_runtime_put_autosuspend(&dst_port->sw->dev); pm_runtime_mark_last_busy(&src_port->sw->dev); - pm_runtime_put_autosuspend(&src_port->sw->dev); + __pm_runtime_put_autosuspend(&src_port->sw->dev); fallthrough; case TB_TUNNEL_USB3: @@ -1932,9 +1932,9 @@ static bool tb_tunnel_one_dp(struct tb *tb, struct tb_port *in, tb_switch_dealloc_dp_resource(in->sw, in); err_rpm_put: pm_runtime_mark_last_busy(&out->sw->dev); - pm_runtime_put_autosuspend(&out->sw->dev); + __pm_runtime_put_autosuspend(&out->sw->dev); pm_runtime_mark_last_busy(&in->sw->dev); - pm_runtime_put_autosuspend(&in->sw->dev); + __pm_runtime_put_autosuspend(&in->sw->dev); return false; } @@ -2364,7 +2364,7 @@ static void tb_handle_hotplug(struct work_struct *work) } pm_runtime_mark_last_busy(&sw->dev); - pm_runtime_put_autosuspend(&sw->dev); + __pm_runtime_put_autosuspend(&sw->dev); put_sw: tb_switch_put(sw); @@ -2372,7 +2372,7 @@ static void tb_handle_hotplug(struct work_struct *work) mutex_unlock(&tb->lock); pm_runtime_mark_last_busy(&tb->dev); - pm_runtime_put_autosuspend(&tb->dev); + __pm_runtime_put_autosuspend(&tb->dev); kfree(ev); } @@ -2673,7 +2673,7 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work) mutex_unlock(&tb->lock); pm_runtime_mark_last_busy(&tb->dev); - pm_runtime_put_autosuspend(&tb->dev); + __pm_runtime_put_autosuspend(&tb->dev); kfree(ev); } diff --git a/drivers/thunderbolt/usb4_port.c b/drivers/thunderbolt/usb4_port.c index 5150879888ca..9b71ec355cd5 100644 --- a/drivers/thunderbolt/usb4_port.c +++ b/drivers/thunderbolt/usb4_port.c @@ -158,7 +158,7 @@ static ssize_t offline_store(struct device *dev, mutex_unlock(&tb->lock); out_rpm: pm_runtime_mark_last_busy(&usb4->dev); - pm_runtime_put_autosuspend(&usb4->dev); + __pm_runtime_put_autosuspend(&usb4->dev); return ret ? ret : count; } @@ -200,7 +200,7 @@ static ssize_t rescan_store(struct device *dev, mutex_unlock(&tb->lock); out_rpm: pm_runtime_mark_last_busy(&usb4->dev); - pm_runtime_put_autosuspend(&usb4->dev); + __pm_runtime_put_autosuspend(&usb4->dev); return ret ? ret : count; } From patchwork Fri Oct 4 09:41:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 13822002 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 24E0214A095 for ; Fri, 4 Oct 2024 09:41:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728034913; cv=none; b=b3K4fZ60Hb+n4VteYlxPGVfe3L0yzBAerLmCt9hNy6cGeHmXtA8VFPdHo6i1ZLNOuCiiZ7IS/In2sSlg27H16KvwILB8kCdJmztovHFJIzC8ykObcu11a2WA3I/b3Im56SqIpiQ4QoBySXM1OD/hT4UtcNYWnOnOb8W5SKsH2yM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728034913; c=relaxed/simple; bh=zd76udQAsGVAs4t8tIKK/3pSzQdO5poc95QNHMpyW9c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LVNtXE2bBZaZYatdeC4XNrl5Q9dj0EB5rrU9yNNm1FYxYyhZstd4cNtES76IQzaDqsJHCdefcYyWxcKGlSz810xSe43XdRzUW7L0BkHCjQhLjg5d1dqQLEvmwcJT6DuD/yuQ+ARiSMQP6/sSbw8YUpEUrjc0BwUTCQoGh57nGzM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JBxKzaAa; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JBxKzaAa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728034912; x=1759570912; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zd76udQAsGVAs4t8tIKK/3pSzQdO5poc95QNHMpyW9c=; b=JBxKzaAaH2k9lSG7fKq0sgJRzx3T3C0zLbeQSQwJdSX/3sUfzU9/teEY fn4L6Y/VUsFFtcZHshYwYVzOtYFUVZ7Cvl3OXSzUQetkPikcwcdr8hy4k sUmAj/QXePvS3FQq5V/MCci3WW2ZIVC/D7g4q6J5JOj4uqf4nA6S6nNIM 4PKHZjlpKbnFkGFotDC5qtXSbW1CU1X3mtSBmYTX/Qo4U/ZJlYZQJFjmy wm8+PdTHR6A+sxiXubAKxtmCg0XgpYvxDPKJ8mHIMUZUrYd1nFwiTtD1p s/hApRpJpDfot+pYRAHDDwbXVcRu2A4ClhQ/y67SlbrnrLNFMFMHQRM9K A==; X-CSE-ConnectionGUID: M3SZWwsPR/SwFlGsF9gqSQ== X-CSE-MsgGUID: V6HmapzZQ768YRHLPHXEog== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="27136205" X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="27136205" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:51 -0700 X-CSE-ConnectionGUID: eVfAL0UaTSCZwMhvPQvy4A== X-CSE-MsgGUID: zAEIMeY/RT+m9qVlfi1sgQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="105492089" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:50 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 435ED120E06; Fri, 4 Oct 2024 12:41:45 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1sweoj-000Tgo-0q; Fri, 04 Oct 2024 12:41:45 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Subject: [PATCH 45/51] usb: Switch to __pm_runtime_put_autosuspend() Date: Fri, 4 Oct 2024 12:41:45 +0300 Message-Id: <20241004094145.114116-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241004094101.113349-1-sakari.ailus@linux.intel.com> References: <20241004094101.113349-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus --- drivers/usb/cdns3/cdns3-gadget.c | 2 +- drivers/usb/cdns3/cdnsp-gadget.c | 2 +- drivers/usb/chipidea/core.c | 2 +- drivers/usb/chipidea/otg_fsm.c | 2 +- drivers/usb/dwc3/core.c | 2 +- drivers/usb/dwc3/dwc3-am62.c | 2 +- drivers/usb/dwc3/dwc3-imx8mp.c | 2 +- drivers/usb/gadget/udc/cdns2/cdns2-gadget.c | 2 +- drivers/usb/host/xhci-mtk.c | 2 +- drivers/usb/misc/apple-mfi-fastcharge.c | 2 +- drivers/usb/mtu3/mtu3_plat.c | 2 +- drivers/usb/musb/musb_core.c | 10 +++++----- drivers/usb/musb/musb_debugfs.c | 10 +++++----- drivers/usb/musb/musb_dsps.c | 2 +- drivers/usb/musb/musb_gadget.c | 8 ++++---- drivers/usb/musb/omap2430.c | 2 +- 16 files changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c index fd1beb10bba7..660bbf6d9f17 100644 --- a/drivers/usb/cdns3/cdns3-gadget.c +++ b/drivers/usb/cdns3/cdns3-gadget.c @@ -3250,7 +3250,7 @@ static void cdns3_gadget_exit(struct cdns *cdns) pm_runtime_mark_last_busy(cdns->dev); - pm_runtime_put_autosuspend(cdns->dev); + __pm_runtime_put_autosuspend(cdns->dev); usb_del_gadget(&priv_dev->gadget); devm_free_irq(cdns->dev, cdns->dev_irq, priv_dev); diff --git a/drivers/usb/cdns3/cdnsp-gadget.c b/drivers/usb/cdns3/cdnsp-gadget.c index 4a3f0f958256..47975436eec0 100644 --- a/drivers/usb/cdns3/cdnsp-gadget.c +++ b/drivers/usb/cdns3/cdnsp-gadget.c @@ -1948,7 +1948,7 @@ static void cdnsp_gadget_exit(struct cdns *cdns) devm_free_irq(pdev->dev, cdns->dev_irq, pdev); pm_runtime_mark_last_busy(cdns->dev); - pm_runtime_put_autosuspend(cdns->dev); + __pm_runtime_put_autosuspend(cdns->dev); usb_del_gadget_udc(&pdev->gadget); cdnsp_gadget_free_endpoints(pdev); cdnsp_mem_cleanup(pdev); diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 835bf2428dc6..285cbb430e01 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -1371,7 +1371,7 @@ static int ci_controller_resume(struct device *dev) if (ci->wakeup_int) { ci->wakeup_int = false; pm_runtime_mark_last_busy(ci->dev); - pm_runtime_put_autosuspend(ci->dev); + __pm_runtime_put_autosuspend(ci->dev); enable_irq(ci->irq); if (ci_otg_is_fsm_mode(ci)) ci_otg_fsm_wakeup_by_srp(ci); diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index c17516c29b63..21d0eb6eed57 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -631,7 +631,7 @@ int ci_otg_fsm_work(struct ci_hdrc *ci) } } else if (ci->fsm.otg->state == OTG_STATE_A_HOST) { pm_runtime_mark_last_busy(ci->dev); - pm_runtime_put_autosuspend(ci->dev); + __pm_runtime_put_autosuspend(ci->dev); return 0; } } diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 9eb085f359ce..ec460e70082f 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -265,7 +265,7 @@ static void __dwc3_set_mode(struct work_struct *work) out: pm_runtime_mark_last_busy(dwc->dev); - pm_runtime_put_autosuspend(dwc->dev); + __pm_runtime_put_autosuspend(dwc->dev); mutex_unlock(&dwc->mutex); } diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index fad151e78fd6..dcc14c406f7f 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -282,7 +282,7 @@ static int dwc3_ti_probe(struct platform_device *pdev) pm_runtime_set_autosuspend_delay(dev, DWC3_AM62_AUTOSUSPEND_DELAY); pm_runtime_use_autosuspend(dev); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); return 0; err_pm_disable: diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c index 64c0cd1995aa..c3b354f074c1 100644 --- a/drivers/usb/dwc3/dwc3-imx8mp.c +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -306,7 +306,7 @@ static int dwc3_imx8mp_resume(struct dwc3_imx8mp *dwc3_imx, pm_message_t msg) dwc3_imx->wakeup_pending = false; if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_DEVICE) { pm_runtime_mark_last_busy(dwc->dev); - pm_runtime_put_autosuspend(dwc->dev); + __pm_runtime_put_autosuspend(dwc->dev); } else { /* * Add wait for xhci switch from suspend diff --git a/drivers/usb/gadget/udc/cdns2/cdns2-gadget.c b/drivers/usb/gadget/udc/cdns2/cdns2-gadget.c index 62fce42ef2da..aabe325069c6 100644 --- a/drivers/usb/gadget/udc/cdns2/cdns2-gadget.c +++ b/drivers/usb/gadget/udc/cdns2/cdns2-gadget.c @@ -2415,7 +2415,7 @@ int cdns2_gadget_resume(struct cdns2_device *pdev, bool hibernated) void cdns2_gadget_remove(struct cdns2_device *pdev) { pm_runtime_mark_last_busy(pdev->dev); - pm_runtime_put_autosuspend(pdev->dev); + __pm_runtime_put_autosuspend(pdev->dev); usb_del_gadget(&pdev->gadget); cdns2_free_all_eps(pdev); diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index 3252e3d2d79c..c9d408860fce 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -671,7 +671,7 @@ static int xhci_mtk_probe(struct platform_device *pdev) device_enable_async_suspend(dev); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); pm_runtime_forbid(dev); return 0; diff --git a/drivers/usb/misc/apple-mfi-fastcharge.c b/drivers/usb/misc/apple-mfi-fastcharge.c index ac8695195c13..37be7548dc75 100644 --- a/drivers/usb/misc/apple-mfi-fastcharge.c +++ b/drivers/usb/misc/apple-mfi-fastcharge.c @@ -134,7 +134,7 @@ static int apple_mfi_fc_set_property(struct power_supply *psy, } pm_runtime_mark_last_busy(&mfi->udev->dev); - pm_runtime_put_autosuspend(&mfi->udev->dev); + __pm_runtime_put_autosuspend(&mfi->udev->dev); return ret; } diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c index 6858ed9fc3b2..51ab1d360bf7 100644 --- a/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c @@ -432,7 +432,7 @@ static int mtu3_probe(struct platform_device *pdev) device_enable_async_suspend(dev); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); pm_runtime_forbid(dev); return 0; diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index b24adb5b399f..f92b3a119f75 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2031,7 +2031,7 @@ static void musb_pm_runtime_check_session(struct musb *musb) break; trace_musb_state(musb, devctl, "Allow PM on possible host mode disconnect"); pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); musb->session = false; return; default: @@ -2063,7 +2063,7 @@ static void musb_pm_runtime_check_session(struct musb *musb) } else { trace_musb_state(musb, devctl, "Allow PM with no session"); pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); } musb->session = s; @@ -2090,7 +2090,7 @@ static void musb_irq_work(struct work_struct *data) } pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); } static void musb_recover_from_babble(struct musb *musb) @@ -2564,7 +2564,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) musb->is_initialized = 1; pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); return 0; @@ -2887,7 +2887,7 @@ static int musb_resume(struct device *dev) spin_unlock_irqrestore(&musb->lock, flags); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); return 0; } diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c index 2d623284edf6..bdb7a9dbe946 100644 --- a/drivers/usb/musb/musb_debugfs.c +++ b/drivers/usb/musb/musb_debugfs.c @@ -107,7 +107,7 @@ static int musb_regdump_show(struct seq_file *s, void *unused) } pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); return 0; } DEFINE_SHOW_ATTRIBUTE(musb_regdump); @@ -120,7 +120,7 @@ static int musb_test_mode_show(struct seq_file *s, void *unused) pm_runtime_get_sync(musb->controller); test = musb_readb(musb->mregs, MUSB_TESTMODE); pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); if (test == (MUSB_TEST_FORCE_HOST | MUSB_TEST_FORCE_FS)) seq_printf(s, "force host full-speed\n"); @@ -217,7 +217,7 @@ static ssize_t musb_test_mode_write(struct file *file, ret: pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); return count; } @@ -244,7 +244,7 @@ static int musb_softconnect_show(struct seq_file *s, void *unused) connect = reg & MUSB_DEVCTL_SESSION ? 1 : 0; pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); break; default: connect = -1; @@ -305,7 +305,7 @@ static ssize_t musb_softconnect_write(struct file *file, } pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); return count; } diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 9c7a8bbc0542..3d864c316043 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -296,7 +296,7 @@ static void otg_timer(struct timer_list *t) dev_err(dev, "%s resume work: %i\n", __func__, err); spin_unlock_irqrestore(&musb->lock, flags); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); } static void dsps_musb_clear_ep_rxintr(struct musb *musb, int epnum) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index bdf13911a1e5..9aa7e7398d32 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1251,7 +1251,7 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, unlock: spin_unlock_irqrestore(&musb->lock, lockflags); pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); return status; } @@ -1635,7 +1635,7 @@ static void musb_gadget_work(struct work_struct *work) musb_pullup(musb, musb->softconnect); spin_unlock_irqrestore(&musb->lock, flags); pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); } static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on) @@ -1855,7 +1855,7 @@ static int musb_gadget_start(struct usb_gadget *g, musb_platform_set_vbus(musb, 1); pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); return 0; @@ -1908,7 +1908,7 @@ static int musb_gadget_stop(struct usb_gadget *g) /* Force check of devctl register for PM runtime */ pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); return 0; } diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index b4a4c1df4e0d..25ef19b05af6 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -152,7 +152,7 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue) dev_dbg(musb->controller, "ID float\n"); } pm_runtime_mark_last_busy(musb->controller); - pm_runtime_put_autosuspend(musb->controller); + __pm_runtime_put_autosuspend(musb->controller); atomic_notifier_call_chain(&musb->xceiv->notifier, musb->xceiv->last_event, NULL); }