diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-09-15 18:00:33 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-10-17 17:10:53 -0400 |
commit | 9bfbd5cb72c9edb8504a4a7a0aa89cdb2fcb4845 (patch) | |
tree | b59f08475d3366e60e3c93538ad398905c4a74ec /drivers/gpu/drm/via | |
parent | e0f0754ff6128570dcf38032f5bfb1f195e5bbee (diff) |
drm: kill drm_device->irq
Like the last patch but adds a macro to get at the irq value instead of
dereferencing pdev directly. Should make things easier for the BSD guys and
if we ever support non-PCI devices.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/via')
-rw-r--r-- | drivers/gpu/drm/via/via_irq.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/via/via_mm.c | 3 |
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c index 1b966fbdb49f..665d319b927b 100644 --- a/drivers/gpu/drm/via/via_irq.c +++ b/drivers/gpu/drm/via/via_irq.c | |||
@@ -354,9 +354,6 @@ int via_wait_irq(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
354 | drm_via_irq_t *cur_irq = dev_priv->via_irqs; | 354 | drm_via_irq_t *cur_irq = dev_priv->via_irqs; |
355 | int force_sequence; | 355 | int force_sequence; |
356 | 356 | ||
357 | if (!dev->irq) | ||
358 | return -EINVAL; | ||
359 | |||
360 | if (irqwait->request.irq >= dev_priv->num_irqs) { | 357 | if (irqwait->request.irq >= dev_priv->num_irqs) { |
361 | DRM_ERROR("Trying to wait on unknown irq %d\n", | 358 | DRM_ERROR("Trying to wait on unknown irq %d\n", |
362 | irqwait->request.irq); | 359 | irqwait->request.irq); |
diff --git a/drivers/gpu/drm/via/via_mm.c b/drivers/gpu/drm/via/via_mm.c index e64094916e4f..f694cb5ededc 100644 --- a/drivers/gpu/drm/via/via_mm.c +++ b/drivers/gpu/drm/via/via_mm.c | |||
@@ -93,8 +93,7 @@ int via_final_context(struct drm_device *dev, int context) | |||
93 | /* Last context, perform cleanup */ | 93 | /* Last context, perform cleanup */ |
94 | if (dev->ctx_count == 1 && dev->dev_private) { | 94 | if (dev->ctx_count == 1 && dev->dev_private) { |
95 | DRM_DEBUG("Last Context\n"); | 95 | DRM_DEBUG("Last Context\n"); |
96 | if (dev->irq) | 96 | drm_irq_uninstall(dev); |
97 | drm_irq_uninstall(dev); | ||
98 | via_cleanup_futex(dev_priv); | 97 | via_cleanup_futex(dev_priv); |
99 | via_do_cleanup_map(dev); | 98 | via_do_cleanup_map(dev); |
100 | } | 99 | } |