[Forgot to send this out yesterday, the other patches sit on top of it. For
BSD compat we'll probably need a macro to get the IRQ, since they have a
different OS field that contains it.]
We can get this from the PCI device field on Linux (and another structure on
BSD), no need to duplicate it.
Signed-off-by: Jesse Barnes <[EMAIL PROTECTED]>
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 61ed515..d6d6be4 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -132,7 +132,6 @@ static int drm_irq_install(struct drm_device * dev)
/* Expose the device irq number to drivers that want to export it for
* whatever reason.
*/
- dev->irq = dev->pdev->irq;
if (ret < 0) {
mutex_lock(&dev->struct_mutex);
dev->irq_enabled = 0;
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index c2f584f..1a7eedb 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -107,7 +107,6 @@ static int drm_fill_in_dev(struct drm_device * dev, struct
pci_dev *pdev,
#ifdef __alpha__
dev->hose = pdev->sysdata;
#endif
- dev->irq = pdev->irq;
if (drm_ht_create(&dev->map_hash, 12)) {
return -ENOMEM;
diff --git a/drivers/gpu/drm/mga/mga_state.c b/drivers/gpu/drm/mga/mga_state.c
index d3f8aad..1e9b903 100644
--- a/drivers/gpu/drm/mga/mga_state.c
+++ b/drivers/gpu/drm/mga/mga_state.c
@@ -1022,7 +1022,7 @@ static int mga_getparam(struct drm_device *dev, void
*data, struct drm_file *fil
switch (param->param) {
case MGA_PARAM_IRQ_NR:
- value = dev->irq;
+ value = dev->pdev->irq;
break;
case MGA_PARAM_CARD_TYPE:
value = dev_priv->chipset;
diff --git a/drivers/gpu/drm/r128/r128_state.c
b/drivers/gpu/drm/r128/r128_state.c
index 51a9afc..3afc754 100644
--- a/drivers/gpu/drm/r128/r128_state.c
+++ b/drivers/gpu/drm/r128/r128_state.c
@@ -1629,7 +1629,7 @@ static int r128_getparam(struct drm_device *dev, void
*data, struct drm_file *fi
switch (param->param) {
case R128_PARAM_IRQ_NR:
- value = dev->irq;
+ value = dev->pdev->irq;
break;
default:
return -EINVAL;
diff --git a/drivers/gpu/drm/radeon/radeon_state.c
b/drivers/gpu/drm/radeon/radeon_state.c
index 11c146b..aa20b78 100644
--- a/drivers/gpu/drm/radeon/radeon_state.c
+++ b/drivers/gpu/drm/radeon/radeon_state.c
@@ -2997,7 +2997,7 @@ static int radeon_cp_getparam(struct drm_device *dev,
void *data, struct drm_fil
value = GET_SCRATCH(2);
break;
case RADEON_PARAM_IRQ_NR:
- value = dev->irq;
+ value = dev->pdev->irq;
break;
case RADEON_PARAM_GART_BASE:
value = dev_priv->gart_vm_start;
diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c
index c6bb978..3d926f8 100644
--- a/drivers/gpu/drm/via/via_irq.c
+++ b/drivers/gpu/drm/via/via_irq.c
@@ -339,7 +339,7 @@ int via_wait_irq(struct drm_device *dev, void *data, struct
drm_file *file_priv)
drm_via_irq_t *cur_irq = dev_priv->via_irqs;
int force_sequence;
- if (!dev->irq)
+ if (!dev->pdev->irq)
return -EINVAL;
if (irqwait->request.irq >= dev_priv->num_irqs) {
diff --git a/drivers/gpu/drm/via/via_mm.c b/drivers/gpu/drm/via/via_mm.c
index e640949..45e1861 100644
--- a/drivers/gpu/drm/via/via_mm.c
+++ b/drivers/gpu/drm/via/via_mm.c
@@ -93,7 +93,7 @@ int via_final_context(struct drm_device *dev, int context)
/* Last context, perform cleanup */
if (dev->ctx_count == 1 && dev->dev_private) {
DRM_DEBUG("Last Context\n");
- if (dev->irq)
+ if (dev->pdev->irq)
drm_irq_uninstall(dev);
via_cleanup_futex(dev_priv);
via_do_cleanup_map(dev);
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 1c1b13e..50d8b77 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -714,7 +714,6 @@ struct drm_device {
/** \name Context support */
/[EMAIL PROTECTED] */
- int irq; /**< Interrupt used by board */
int irq_enabled; /**< True if irq handler is enabled */
__volatile__ long context_flag; /**< Context swapping flag */
__volatile__ long interrupt_flag; /**< Interruption handler flag */
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel