提交 ebfa4324 编写于 作者: D Daniel Vetter

drm: remove drm_dev_to_irq from drivers

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: NThierry Reding <treding@nvidia.com>
Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 e090c53b
......@@ -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.
*
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册