media: pvrusb2: Use wait_event_freezable() for freezable kthread
authorKevin Hao <haokexin@gmail.com>
Thu, 21 Dec 2023 02:22:28 +0000 (10:22 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 16 Feb 2024 10:46:31 +0000 (11:46 +0100)
commit730ffa9c5c76703b4c7f9c7126287957dc50f1e0
tree0edebd2c3ef1b8543be3fab1cba54fcb9d9dd6b8
parent7c17c55248327d70b065378eaf2e8be0f22593ce
media: pvrusb2: Use wait_event_freezable() for freezable kthread

A freezable kernel thread can enter frozen state during freezing by
either calling try_to_freeze() or using wait_event_freezable() and its
variants. So for the following snippet of code in a kernel thread loop:
  try_to_freeze();
  wait_event_interruptible();

We can change it to a simple wait_event_freezable() and then eliminate
a function call.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/usb/pvrusb2/pvrusb2-dvb.c