Revert "Fix the compile issues when no device is defined."