From e9eafcb589213395232084a2378e2e90f67feb29 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sat, 12 Jan 2019 20:32:44 +0100 Subject: drm: move drm_can_sleep() to drm_util.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move drm_can_sleep() out of drmP.h to allow users to get rid of the drmP.h include. There was no header file that was a good match for this helper function. So add this to drm_util with the relevant includes. Add include of drm_util.h to all users. v2: - Update comments to use kernel-doc style (Daniel) - Add FIXME to drm_can_sleep and add note that this function should not be used in new code (Daniel) v3: - Fix kernel-doc syntax (Daniel) - Plug drm_util.h into drm-internels.rst (Daniel) Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: Gerd Hoffmann Cc: Rob Clark Cc: Tomi Valkeinen Cc: Eric Anholt Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190112193251.20450-2-sam@ravnborg.org --- include/drm/drmP.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/drm/drmP.h') diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 9e47c8dc6b87..bc4cb3732407 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -94,14 +94,6 @@ struct dma_buf_attachment; struct pci_dev; struct pci_controller; -/* returns true if currently okay to sleep */ -static inline bool drm_can_sleep(void) -{ - if (in_atomic() || in_dbg_master() || irqs_disabled()) - return false; - return true; -} - #if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE) #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x) #else -- cgit v1.2.3