mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-10-14 00:53:24 +08:00
init_MUTEX被废除(解决rror: implicit declaration of function ‘init_MUTEX’)--http://blog.csdn.net/gatieme/article/details/71598127
This commit is contained in:
@@ -56,7 +56,7 @@ static inline void sema_init(struct semaphore *sem, int val)
|
||||
|
||||
```cpp
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) && !defined(init_MUTEX)
|
||||
sema_init(&sem);
|
||||
sema_init(&sem, 1);
|
||||
#else
|
||||
init_MUTEX(&sem);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user