• Ming Lei's avatar
    firmware: introduce device_cache/uncache_fw_images · 37276a51
    Ming Lei authored
    This patch introduces the three helpers below:
    
    	void device_cache_fw_images(void)
    	void device_uncache_fw_images(void)
    	void device_uncache_fw_images_delay(unsigned long)
    
    so we can use device_cache_fw_images() to cache firmware for
    all devices which need firmware to work, and the device driver
    can get the firmware easily from kernel memory when system isn't
    ready for completing requests of loading firmware.
    
    After system is ready for completing firmware loading, driver core
    will call device_uncache_fw_images() or its delay version to free
    the cached firmware.
    
    The above helpers will be used to cache device firmware during
    system suspend/resume cycle in the following patches.
    Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    37276a51
firmware_class.c 28.9 KB