错误: ‘SPIN_LOCK_UNLOCKED’未声明(不在函数内)
编译LDD3中的scull出现错误,错误: ‘SPIN_LOCK_UNLOCKED’未声明(不在函数内)处理办法: 将static spinlock_t scull_u_lock = SPIN_LOCK_UNLOCKED; 改为static DEFINE_SPINLOCK(scull_u_lock);再次编译通过。原因: SPIN_LOCK_UNLOCKE