drm: Use the ERESTARTSYS error code
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 16 Nov 2014 22:14:17 +0000 (23:14 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 16 Nov 2014 22:38:55 +0000 (23:38 +0100)
commit797013cfbc62bad83a82eef6ad5504d6797bd4f5
tree8e9316feff3a931bc4609777ed3c0733817c1b4f
parent33c8403b0802c5174745de585f04d15cdb89861a
drm: Use the ERESTARTSYS error code

* Linux kernel functions can return -ERESTARTSYS in some cases, a
  negative value indicating an error (typically -512)

* Howewer, ERESTARTSYS was previously as ERESTART, itself defined
  as -1 in *BSD kernels

* The -ERESTARTSYS return value thus was positive on the DragonFly
  kernel, potentially breaking various drm error checks.

* Fix this issue by defining ERESTARTSYS separately

Thanks-to: Imre Vadasz for discovering the original problem
sys/dev/drm/i915/i915_gem.c
sys/dev/drm/include/drm/drm_os_linux.h
sys/dev/drm/include/linux/completion.h
sys/dev/drm/include/linux/errno.h [new file with mode: 0644]
sys/dev/drm/radeon/radeon_gem.c
sys/dev/drm/ttm/ttm_bo.c
sys/dev/drm/ttm/ttm_bo_vm.c
sys/dev/drm/ttm/ttm_lock.c