drivers: char: Optimize random