compat: fix device_lock functions on non rt kernel