]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm: zynqmp_dp: Use scope-based mutex helpers
authorSean Anderson <sean.anderson@linux.dev>
Fri, 7 Feb 2025 16:25:28 +0000 (11:25 -0500)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 12 Feb 2025 07:44:29 +0000 (09:44 +0200)
commit2f2cd4a0595d894ba53d95e2a230032f8615dcdd
tree3cb6865350afb65abe6be82d3090fe97a740480a
parentf887685ee0eb4ef716391355568181230338f6eb
drm: zynqmp_dp: Use scope-based mutex helpers

Convert most mutex_(un)lock calls to use (scoped_)guard instead. This
generally reduces line count and prevents bugs like forgetting to unlock
the mutex. I've left traditional calls in a few places where scoped
helpers would be more verbose. This mostly happens where
debugfs_file_put needs to be called regardless. I looked into defining a
CLASS for debugfs_file, but it seems like more effort than it's worth
since debugfs_file_get can fail.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250207162528.1651426-3-sean.anderson@linux.dev
drivers/gpu/drm/xlnx/zynqmp_dp.c