There are two other functions calling linux_add_to_sleepqueue(), but the logic is slightly different. Factorizing them would make the code any cleaner.
This is part of the update of DRM drivers to Linux 6.7. This is a follow-up to D48755.
Sponsored by: The FreeBSD Foundation