ia64/xen-unstable

changeset 19489:443b3bb740e2

x86 hpet: fix irq_vector[] update of c/s 19419

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Apr 01 11:53:15 2009 +0100 (2009-04-01)
parents 79f734040a83
children 2bbd2c26462d
files xen/arch/x86/hpet.c
line diff
     1.1 --- a/xen/arch/x86/hpet.c	Wed Apr 01 11:47:59 2009 +0100
     1.2 +++ b/xen/arch/x86/hpet.c	Wed Apr 01 11:53:15 2009 +0100
     1.3 @@ -343,20 +343,16 @@ static int hpet_setup_msi_irq(unsigned i
     1.4  
     1.5  static int hpet_assign_irq(struct hpet_event_channel *ch)
     1.6  {
     1.7 -    unsigned int vector;
     1.8 +    int vector;
     1.9  
    1.10 -    vector = assign_irq_vector(AUTO_ASSIGN_IRQ);
    1.11 -    if ( !vector )
    1.12 -        return -EINVAL;
    1.13 +    if ( (vector = assign_irq_vector(AUTO_ASSIGN_IRQ)) < 0 )
    1.14 +        return vector;
    1.15  
    1.16 -    irq_vector[vector] = vector;
    1.17 -    vector_irq[vector] = vector;
    1.18      vector_channel[vector] = ch - &hpet_events[0];
    1.19  
    1.20      if ( hpet_setup_msi_irq(vector) )
    1.21      {
    1.22 -        irq_vector[vector] = 0;
    1.23 -        vector_irq[vector] = FREE_TO_ASSIGN_IRQ;
    1.24 +        free_irq_vector(vector);
    1.25          vector_channel[vector] = -1;
    1.26          return -EINVAL;
    1.27      }