[LinuxBIOS] [PATCH] flashrom: Merge common code into a function