From: Kalle Valo Subject: Re: [PATCH 2/2] wlcore: Add support runtime PM Date: Wed, 16 May 2018 12:27:46 +0300 Message-ID: <87a7t0lzl9.fsf@kamboji.qca.qualcomm.com> References: <20180515161315.1997-1-tony@atomide.com> <20180515161315.1997-3-tony@atomide.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Michael Nazzareno Trimarchi's message of "Tue, 15 May 2018 18:17:39 +0200") Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Michael Nazzareno Trimarchi Cc: Tony Lindgren , Eyal Reizer , Kishon Vijay Abraham I , Guy Mishol , Luca Coelho , Maital Hahn , Maxim Altshul , Shahar Patury , linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux OMAP Mailing List List-Id: linux-omap@vger.kernel.org Michael Nazzareno Trimarchi writes: >> @@ -315,15 +319,17 @@ static ssize_t dynamic_fw_traces_write(struct file *file, >> if (unlikely(wl->state != WLCORE_STATE_ON)) >> goto out; >> >> - ret = wl1271_ps_elp_wakeup(wl); >> - if (ret < 0) >> + ret = pm_runtime_get_sync(wl->dev); >> + if (ret < 0) { >> + pm_runtime_put_noidle(wl->dev); >> goto out; >> + } >> > > Can you just change ps_elp_wakeup with > ret = pm_runtime_get_sync(wl->dev); > if (ret < 0) { > pm_runtime_put_noidle(wl->dev); > goto out; > } > >> ret = wl18xx_acx_dynamic_fw_traces(wl); >> if (ret < 0) >> count = ret; >> >> - wl1271_ps_elp_sleep(wl); >> + pm_runtime_put(wl->dev); > > and elp_sleep with this one > >> out: >> mutex_unlock(&wl->mutex); >> return count; >> @@ -374,9 +380,11 @@ static ssize_t radar_debug_mode_write(struct file *file, >> if (unlikely(wl->state != WLCORE_STATE_ON)) >> goto out; >> >> - ret = wl1271_ps_elp_wakeup(wl); >> - if (ret < 0) >> + ret = pm_runtime_get_sync(wl->dev); >> + if (ret < 0) { >> + pm_runtime_put_noidle(wl->dev); >> goto out; >> + } >> >> wl12xx_for_each_wlvif_ap(wl, wlvif) { >> wlcore_cmd_generic_cfg(wl, wlvif, >> @@ -384,7 +392,7 @@ static ssize_t radar_debug_mode_write(struct file *file, >> wl->radar_debug_mode, 0); >> } >> >> - wl1271_ps_elp_sleep(wl); >> + pm_runtime_put(wl->dev); > > Michael PLEASE edit your quotes, your behaviour makes use of patchwork really annoying: https://patchwork.kernel.org/patch/10401591/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#do_not_top_post_and_edit_your_quotes -- Kalle Valo