diff options
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index ecd5984ef689..954badb08120 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1696,5 +1696,13 @@ extern void drm_platform_exit(struct drm_driver *driver, struct platform_device | |||
1696 | extern int drm_get_platform_dev(struct platform_device *pdev, | 1696 | extern int drm_get_platform_dev(struct platform_device *pdev, |
1697 | struct drm_driver *driver); | 1697 | struct drm_driver *driver); |
1698 | 1698 | ||
1699 | /* returns true if currently okay to sleep */ | ||
1700 | static __inline__ bool drm_can_sleep(void) | ||
1701 | { | ||
1702 | if (in_atomic() || in_dbg_master() || irqs_disabled()) | ||
1703 | return false; | ||
1704 | return true; | ||
1705 | } | ||
1706 | |||
1699 | #endif /* __KERNEL__ */ | 1707 | #endif /* __KERNEL__ */ |
1700 | #endif | 1708 | #endif |