diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/hvc_console.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index cc2cd46bedc6..a0a88aa23f5b 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -316,7 +316,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp) | |||
316 | { | 316 | { |
317 | struct hvc_struct *hp; | 317 | struct hvc_struct *hp; |
318 | unsigned long flags; | 318 | unsigned long flags; |
319 | int irq = NO_IRQ; | 319 | int irq = 0; |
320 | int rc = 0; | 320 | int rc = 0; |
321 | struct kobject *kobjp; | 321 | struct kobject *kobjp; |
322 | 322 | ||
@@ -338,14 +338,14 @@ static int hvc_open(struct tty_struct *tty, struct file * filp) | |||
338 | hp->tty = tty; | 338 | hp->tty = tty; |
339 | /* Save for request_irq outside of spin_lock. */ | 339 | /* Save for request_irq outside of spin_lock. */ |
340 | irq = hp->irq; | 340 | irq = hp->irq; |
341 | if (irq != NO_IRQ) | 341 | if (irq) |
342 | hp->irq_requested = 1; | 342 | hp->irq_requested = 1; |
343 | 343 | ||
344 | kobjp = &hp->kobj; | 344 | kobjp = &hp->kobj; |
345 | 345 | ||
346 | spin_unlock_irqrestore(&hp->lock, flags); | 346 | spin_unlock_irqrestore(&hp->lock, flags); |
347 | /* check error, fallback to non-irq */ | 347 | /* check error, fallback to non-irq */ |
348 | if (irq != NO_IRQ) | 348 | if (irq) |
349 | rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED, "hvc_console", hp); | 349 | rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED, "hvc_console", hp); |
350 | 350 | ||
351 | /* | 351 | /* |
@@ -373,7 +373,7 @@ static void hvc_close(struct tty_struct *tty, struct file * filp) | |||
373 | { | 373 | { |
374 | struct hvc_struct *hp; | 374 | struct hvc_struct *hp; |
375 | struct kobject *kobjp; | 375 | struct kobject *kobjp; |
376 | int irq = NO_IRQ; | 376 | int irq = 0; |
377 | unsigned long flags; | 377 | unsigned long flags; |
378 | 378 | ||
379 | if (tty_hung_up_p(filp)) | 379 | if (tty_hung_up_p(filp)) |
@@ -407,7 +407,7 @@ static void hvc_close(struct tty_struct *tty, struct file * filp) | |||
407 | */ | 407 | */ |
408 | tty_wait_until_sent(tty, HVC_CLOSE_WAIT); | 408 | tty_wait_until_sent(tty, HVC_CLOSE_WAIT); |
409 | 409 | ||
410 | if (irq != NO_IRQ) | 410 | if (irq) |
411 | free_irq(irq, hp); | 411 | free_irq(irq, hp); |
412 | 412 | ||
413 | } else { | 413 | } else { |
@@ -424,7 +424,7 @@ static void hvc_hangup(struct tty_struct *tty) | |||
424 | { | 424 | { |
425 | struct hvc_struct *hp = tty->driver_data; | 425 | struct hvc_struct *hp = tty->driver_data; |
426 | unsigned long flags; | 426 | unsigned long flags; |
427 | int irq = NO_IRQ; | 427 | int irq = 0; |
428 | int temp_open_count; | 428 | int temp_open_count; |
429 | struct kobject *kobjp; | 429 | struct kobject *kobjp; |
430 | 430 | ||
@@ -453,7 +453,7 @@ static void hvc_hangup(struct tty_struct *tty) | |||
453 | irq = hp->irq; | 453 | irq = hp->irq; |
454 | hp->irq_requested = 0; | 454 | hp->irq_requested = 0; |
455 | spin_unlock_irqrestore(&hp->lock, flags); | 455 | spin_unlock_irqrestore(&hp->lock, flags); |
456 | if (irq != NO_IRQ) | 456 | if (irq) |
457 | free_irq(irq, hp); | 457 | free_irq(irq, hp); |
458 | while(temp_open_count) { | 458 | while(temp_open_count) { |
459 | --temp_open_count; | 459 | --temp_open_count; |
@@ -583,7 +583,7 @@ static int hvc_poll(struct hvc_struct *hp) | |||
583 | /* If we aren't interrupt driven and aren't throttled, we always | 583 | /* If we aren't interrupt driven and aren't throttled, we always |
584 | * request a reschedule | 584 | * request a reschedule |
585 | */ | 585 | */ |
586 | if (hp->irq == NO_IRQ) | 586 | if (hp->irq == 0) |
587 | poll_mask |= HVC_POLL_READ; | 587 | poll_mask |= HVC_POLL_READ; |
588 | 588 | ||
589 | /* Read data if any */ | 589 | /* Read data if any */ |