diff options
author | Dave Airlie <airlied@gmail.com> | 2010-12-14 12:16:38 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-02-06 22:09:36 -0500 |
commit | 8410ea3b95d105a5be5db501656f44bbb91197c1 (patch) | |
tree | 6cd27f207e50c13ba2f4a78d6323bc23f751e380 /drivers/gpu/drm/drm_irq.c | |
parent | ff72145badb834e8051719ea66e024784d000cb4 (diff) |
drm: rework PCI/platform driver interface.
This abstracts the pci/platform interface out a step further,
we can go further but this is far enough for now to allow USB
to be plugged in.
The drivers now just call the init code directly for their
device type.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 3dadfa2a8528..cb49685bde01 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -74,23 +74,13 @@ int drm_irq_by_busid(struct drm_device *dev, void *data, | |||
74 | { | 74 | { |
75 | struct drm_irq_busid *p = data; | 75 | struct drm_irq_busid *p = data; |
76 | 76 | ||
77 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) | 77 | if (!dev->driver->bus->irq_by_busid) |
78 | return -EINVAL; | 78 | return -EINVAL; |
79 | 79 | ||
80 | if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) | 80 | if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) |
81 | return -EINVAL; | 81 | return -EINVAL; |
82 | 82 | ||
83 | if ((p->busnum >> 8) != drm_get_pci_domain(dev) || | 83 | return dev->driver->bus->irq_by_busid(dev, p); |
84 | (p->busnum & 0xff) != dev->pdev->bus->number || | ||
85 | p->devnum != PCI_SLOT(dev->pdev->devfn) || p->funcnum != PCI_FUNC(dev->pdev->devfn)) | ||
86 | return -EINVAL; | ||
87 | |||
88 | p->irq = dev->pdev->irq; | ||
89 | |||
90 | DRM_DEBUG("%d:%d:%d => IRQ %d\n", p->busnum, p->devnum, p->funcnum, | ||
91 | p->irq); | ||
92 | |||
93 | return 0; | ||
94 | } | 84 | } |
95 | 85 | ||
96 | /* | 86 | /* |