On a characterization problem for finite linear spaces