FIX: [linux] fix & optimize input device checking
Merge pull request #4592 from koying/fixlinhotplug

FIX: [linux] fix & optimize input device checking