| @@ -323,27 +323,31 @@ static void drm_irq_vgaarb_nokms(void *c | | | @@ -323,27 +323,31 @@ static void drm_irq_vgaarb_nokms(void *c |
323 | /** | | 323 | /** |
324 | * Install IRQ handler. | | 324 | * Install IRQ handler. |
325 | * | | 325 | * |
326 | * \param dev DRM device. | | 326 | * \param dev DRM device. |
327 | * | | 327 | * |
328 | * Initializes the IRQ related data. Installs the handler, calling the driver | | 328 | * Initializes the IRQ related data. Installs the handler, calling the driver |
329 | * \c irq_preinstall() and \c irq_postinstall() functions | | 329 | * \c irq_preinstall() and \c irq_postinstall() functions |
330 | * before and after the installation. | | 330 | * before and after the installation. |
331 | */ | | 331 | */ |
332 | int drm_irq_install(struct drm_device *dev) | | 332 | int drm_irq_install(struct drm_device *dev) |
333 | { | | 333 | { |
334 | int ret; | | 334 | int ret; |
335 | unsigned long sh_flags = 0; | | 335 | unsigned long sh_flags = 0; |
| | | 336 | #ifdef __NetBSD__ |
| | | 337 | const char *irqname; |
| | | 338 | #else |
336 | char *irqname; | | 339 | char *irqname; |
| | | 340 | #endif |
337 | | | 341 | |
338 | if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) | | 342 | if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) |
339 | return -EINVAL; | | 343 | return -EINVAL; |
340 | | | 344 | |
341 | if (drm_dev_to_irq(dev) == 0) | | 345 | if (drm_dev_to_irq(dev) == 0) |
342 | return -EINVAL; | | 346 | return -EINVAL; |
343 | | | 347 | |
344 | mutex_lock(&dev->struct_mutex); | | 348 | mutex_lock(&dev->struct_mutex); |
345 | | | 349 | |
346 | /* Driver must have been initialized */ | | 350 | /* Driver must have been initialized */ |
347 | if (!dev->dev_private) { | | 351 | if (!dev->dev_private) { |
348 | mutex_unlock(&dev->struct_mutex); | | 352 | mutex_unlock(&dev->struct_mutex); |
349 | return -EINVAL; | | 353 | return -EINVAL; |