Skip to content

Commit

Permalink
drm: remove drm_dev_to_irq from drivers
Browse files Browse the repository at this point in the history
Only used in some legacy pci drivers, and dereferencing the PCI irq is
actually shorter ...

Since this removes all users for drm_dev_to_irq from the tree except
in drm_irq.c, move the inline helper in there. It'll disappear soon,
too.

v2: Polish commit message (Thierry)

Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Vetter committed Apr 22, 2014
1 parent e090c53 commit ebfa432
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ static void drm_irq_vgaarb_nokms(void *cookie, bool state)
}
}

static inline int drm_dev_to_irq(struct drm_device *dev)
{
return dev->driver->bus->get_irq(dev);
}

/**
* Install IRQ handler.
*
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/mga/mga_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ static int mga_getparam(struct drm_device *dev, void *data, struct drm_file *fil

switch (param->param) {
case MGA_PARAM_IRQ_NR:
value = drm_dev_to_irq(dev);
value = dev->pdev->irq;
break;
case MGA_PARAM_CARD_TYPE:
value = dev_priv->chipset;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/r128/r128_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ static int r128_getparam(struct drm_device *dev, void *data, struct drm_file *fi

switch (param->param) {
case R128_PARAM_IRQ_NR:
value = drm_dev_to_irq(dev);
value = dev->pdev->irq;
break;
default:
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/radeon_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -3054,7 +3054,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600)
value = 0;
else
value = drm_dev_to_irq(dev);
value = dev->pdev->irq;
break;
case RADEON_PARAM_GART_BASE:
value = dev_priv->gart_vm_start;
Expand Down
5 changes: 0 additions & 5 deletions include/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -1185,11 +1185,6 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
return ((dev->driver->driver_features & feature) ? 1 : 0);
}

static inline int drm_dev_to_irq(struct drm_device *dev)
{
return dev->driver->bus->get_irq(dev);
}

static inline void drm_device_set_unplugged(struct drm_device *dev)
{
smp_wmb();
Expand Down

0 comments on commit ebfa432

Please sign in to comment.