]> err.no Git - linux-2.6/blobdiff - include/linux/res_counter.h
drm/radeon: merge IGP chip setup and fixup RS400 vs RS480 support
[linux-2.6] / include / linux / res_counter.h
index 629d0ea2d073c33a792b3b98254e4fde4394f7cf..6d9e1fca098c468b49287791e181f6e4f51e7d54 100644 (file)
@@ -143,4 +143,12 @@ static inline void res_counter_reset_max(struct res_counter *cnt)
        spin_unlock_irqrestore(&cnt->lock, flags);
 }
 
+static inline void res_counter_reset_failcnt(struct res_counter *cnt)
+{
+       unsigned long flags;
+
+       spin_lock_irqsave(&cnt->lock, flags);
+       cnt->failcnt = 0;
+       spin_unlock_irqrestore(&cnt->lock, flags);
+}
 #endif