]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/percpu_counter.h
percpu counter: clean up percpu_counter_sum_and_set()
[linux-2.6-omap-h63xx.git] / include / linux / percpu_counter.h
index 21e054595bcb0e0ea39c2ff8851f4c685d447def..9007ccdfc1127cfe73db03e31dd82a843f8f4fa8 100644 (file)
@@ -30,7 +30,8 @@ struct percpu_counter {
 #define FBC_BATCH      (NR_CPUS*4)
 #endif
 
-void percpu_counter_init(struct percpu_counter *fbc, s64 amount);
+int percpu_counter_init(struct percpu_counter *fbc, s64 amount);
+int percpu_counter_init_irq(struct percpu_counter *fbc, s64 amount);
 void percpu_counter_destroy(struct percpu_counter *fbc);
 void percpu_counter_set(struct percpu_counter *fbc, s64 amount);
 void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch);
@@ -78,11 +79,14 @@ struct percpu_counter {
        s64 count;
 };
 
-static inline void percpu_counter_init(struct percpu_counter *fbc, s64 amount)
+static inline int percpu_counter_init(struct percpu_counter *fbc, s64 amount)
 {
        fbc->count = amount;
+       return 0;
 }
 
+#define percpu_counter_init_irq percpu_counter_init
+
 static inline void percpu_counter_destroy(struct percpu_counter *fbc)
 {
 }