From: Antonio Ospite Date: Fri, 7 Dec 2012 10:51:16 +0000 (+0100) Subject: am7xxx: cache device info in am7xxx_get_device_info() X-Git-Tag: v0.1.3~6^2~1 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/55ed26c219ebf43143f7d2554aed884535866f91?ds=inline;hp=55ed26c219ebf43143f7d2554aed884535866f91 am7xxx: cache device info in am7xxx_get_device_info() Request the actual device info from the device only when there is not a cached version of it already. This serves two purposes: 1. Cover the case when some firmwares provide useful device info only under some conditions and spit out bogus data instead when these conditions are not met. 2. Speed up am7xxx_get_device_info() as the USB communication is performed only once. AFAWN the device info does not change throughout the life of an am7xxx_device. ---