firmware_class: make request_firmware_nowait more useful
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 29 Oct 2009 11:36:02 +0000 (12:36 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 19:24:52 +0000 (11:24 -0800)
commit9ebfbd45f9d4ee9cd72529cf99e5f300eb398e67
tree6ad661c4b38d0fad8a88c4a0d28997e9303632f2
parent03d673e6af6490371aaf64dfe1f84c658c48b71d
firmware_class: make request_firmware_nowait more useful

Unfortunately, one cannot hold on to the struct firmware
that request_firmware_nowait() hands off, which is needed
in some cases. Allow this by requiring the callback to
free it (via release_firmware).

Additionally, give it a gfp_t parameter -- all the current
users call it from a GFP_KERNEL context so the GFP_ATOMIC
isn't necessary. This also marks an API break which is
useful in a sense, although that is obviously not the
primary purpose of this change.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Pavel Roskin <proski@gnu.org>
Cc: Abhay Salunke <abhay_salunke@dell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/firmware_class.c
drivers/firmware/dell_rbu.c
drivers/serial/ucc_uart.c
drivers/staging/comedi/drivers/usbdux.c
drivers/staging/comedi/drivers/usbduxfast.c
drivers/usb/atm/ueagle-atm.c
include/linux/firmware.h