From: "jiale yao" <19888972804@163.com>
To: "Arnd Bergmann" <arnd@arndb.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re:[PATCH] misc: bh1770glc: queue proximity work on freezable workqueue
Date: Sat, 17 Oct 2026 15:24:20 +0800 (CST) [thread overview]
Message-ID: <40afdae2.17e3.1a148bf50a6.Coremail.19888972804@163.com> (raw)
In-Reply-To: <20261016101034.2586548-1-yaojiale02@163.com>
At 2026-10-16 18:10:33, "Jiale Yao" <yaojiale02@163.com> wrote:
>The proximity fallback work reads sensor registers after a delay. System
>suspend powers the sensor down without cancelling that work, while
>schedule_delayed_work() leaves it runnable on the non-freezable system
>workqueue.
>
>Queue the fallback work on system_freezable_wq so it cannot access the
>powered-down sensor or its suspended I2C adapter.
>
Fixes: 190420ab34ab ("drivers/misc: driver for bh1770glc / sfh7770 ALS and proximity sensor")
>Signed-off-by: Jiale Yao <yaojiale02@163.com>
>---
> drivers/misc/bh1770glc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c
>index 98fc5970b2bb..3411947d9283 100644
>--- a/drivers/misc/bh1770glc.c
>+++ b/drivers/misc/bh1770glc.c
>@@ -620,8 +620,8 @@ static irqreturn_t bh1770_irq(int irq, void *data)
> * next expected interrupt time.
> */
> cancel_delayed_work_sync(&chip->prox_work);
>- schedule_delayed_work(&chip->prox_work,
>- msecs_to_jiffies(rate + 50));
>+ queue_delayed_work(system_freezable_wq, &chip->prox_work,
>+ msecs_to_jiffies(rate + 50));
> }
> return IRQ_HANDLED;
> }
>--
>2.34.1
prev parent reply other threads:[~2026-10-17 7:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 10:10 [PATCH] " Jiale Yao
2026-10-17 7:24 ` jiale yao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40afdae2.17e3.1a148bf50a6.Coremail.19888972804@163.com \
--to=19888972804@163.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®