update the device list when necessary.