mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-10-30 07:38:52 +01:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
27
arch/microblaze/include/asm/atomic.h
Normal file
27
arch/microblaze/include/asm/atomic.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef _ASM_MICROBLAZE_ATOMIC_H
|
||||
#define _ASM_MICROBLAZE_ATOMIC_H
|
||||
|
||||
#include <asm/cmpxchg.h>
|
||||
#include <asm-generic/atomic.h>
|
||||
#include <asm-generic/atomic64.h>
|
||||
|
||||
/*
|
||||
* Atomically test *v and decrement if it is greater than 0.
|
||||
* The function returns the old value of *v minus 1.
|
||||
*/
|
||||
static inline int atomic_dec_if_positive(atomic_t *v)
|
||||
{
|
||||
unsigned long flags;
|
||||
int res;
|
||||
|
||||
local_irq_save(flags);
|
||||
res = v->counter - 1;
|
||||
if (res >= 0)
|
||||
v->counter = res;
|
||||
local_irq_restore(flags);
|
||||
|
||||
return res;
|
||||
}
|
||||
#define atomic_dec_if_positive atomic_dec_if_positive
|
||||
|
||||
#endif /* _ASM_MICROBLAZE_ATOMIC_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue