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

Commit 9bfbd5cb authored by Jesse Barnes's avatar Jesse Barnes Committed by Dave Airlie
Browse files

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: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent e0f0754f
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -228,12 +228,9 @@ int drm_irq_install(struct drm_device *dev)
	if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
		sh_flags = IRQF_SHARED;

	ret = request_irq(dev->pdev->irq, dev->driver->irq_handler,
	ret = request_irq(drm_dev_to_irq(dev), dev->driver->irq_handler,
			  sh_flags, dev->devname, 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;
+0 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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 = drm_dev_to_irq(dev);
		break;
	case MGA_PARAM_CARD_TYPE:
		value = dev_priv->chipset;
+1 −1
Original line number Diff line number Diff line
@@ -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 = drm_dev_to_irq(dev);
		break;
	default:
		return -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -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 = drm_dev_to_irq(dev);
		break;
	case RADEON_PARAM_GART_BASE:
		value = dev_priv->gart_vm_start;
Loading