[PATCH 29/50] drm/irq: simplify irq checks in drm_wait_vblank

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Checking for both an irq number _and_ whether it's enabled is
redundant. Also this will breakd drivers which do their own irq
management and just set dev->irq_enabled once the irq stuff is all set
up.

Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
---
 drivers/gpu/drm/drm_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index c0c6bdedefef..85d88cadc543 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -1186,7 +1186,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
 	unsigned int flags, seq, crtc, high_crtc;
 
 	if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
-		if ((!drm_dev_to_irq(dev)) || (!dev->irq_enabled))
+		if (!dev->irq_enabled)
 			return -EINVAL;
 
 	if (vblwait->request.type & _DRM_VBLANK_SIGNAL)
-- 
1.8.4.3

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux