Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebfa4324 authored by Daniel Vetter's avatar Daniel Vetter
Browse files

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: default avatarThierry Reding <treding@nvidia.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent e090c53b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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.
 *
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+0 −5
Original line number Diff line number Diff line
@@ -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();