staging: comedi: check s->async for poll(), read() and write()
[pandora-kernel.git] / drivers / xen / events.c
index 0eb8a57..fec1204 100644 (file)
@@ -85,8 +85,7 @@ enum xen_irq_type {
  *    IPI - IPI vector
  *    EVTCHN -
  */
-struct irq_info
-{
+struct irq_info {
        struct list_head list;
        enum xen_irq_type type; /* type */
        unsigned irq;
@@ -282,9 +281,9 @@ static inline unsigned long active_evtchns(unsigned int cpu,
                                           struct shared_info *sh,
                                           unsigned int idx)
 {
-       return (sh->evtchn_pending[idx] &
+       return sh->evtchn_pending[idx] &
                per_cpu(cpu_evtchn_mask, cpu)[idx] &
-               ~sh->evtchn_mask[idx]);
+               ~sh->evtchn_mask[idx];
 }
 
 static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
@@ -601,7 +600,7 @@ static void disable_pirq(struct irq_data *data)
        disable_dynirq(data);
 }
 
-static int find_irq_by_gsi(unsigned gsi)
+int xen_irq_from_gsi(unsigned gsi)
 {
        struct irq_info *info;
 
@@ -615,6 +614,7 @@ static int find_irq_by_gsi(unsigned gsi)
 
        return -1;
 }
+EXPORT_SYMBOL_GPL(xen_irq_from_gsi);
 
 /*
  * Do not make any assumptions regarding the relationship between the
@@ -634,7 +634,7 @@ int xen_bind_pirq_gsi_to_irq(unsigned gsi,
 
        mutex_lock(&irq_mapping_update_lock);
 
-       irq = find_irq_by_gsi(gsi);
+       irq = xen_irq_from_gsi(gsi);
        if (irq != -1) {
                printk(KERN_INFO "xen_map_pirq_gsi: returning irq %d for gsi %u\n",
                       irq, gsi);
@@ -1180,7 +1180,7 @@ static void __xen_evtchn_do_upcall(void)
        int cpu = get_cpu();
        struct shared_info *s = HYPERVISOR_shared_info;
        struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
-       unsigned count;
+       unsigned count;
 
        do {
                unsigned long pending_words;