Lines Matching refs:fw

160 	struct firmware *fw;  member
225 kfree(fw_priv->fw->data); in firmware_loading_store()
226 fw_priv->fw->data = NULL; in firmware_loading_store()
227 fw_priv->fw->size = 0; in firmware_loading_store()
244 struct firmware *fw = fw_priv->fw; in firmware_data_read() local
246 if (offset > fw->size) in firmware_data_read()
248 if (offset + count > fw->size) in firmware_data_read()
249 count = fw->size - offset; in firmware_data_read()
251 memcpy(buffer, fw->data + offset, count); in firmware_data_read()
275 if (fw_priv->fw->data) { in fw_realloc_buffer()
276 memcpy(new_data, fw_priv->fw->data, fw_priv->fw->size); in fw_realloc_buffer()
277 vfree(fw_priv->fw->data); in fw_realloc_buffer()
279 fw_priv->fw->data = new_data; in fw_realloc_buffer()
297 struct firmware *fw = fw_priv->fw; in firmware_data_write() local
307 memcpy(fw->data + offset, buffer, count); in firmware_data_write()
309 fw->size = max_t(size_t, offset + count, fw->size); in firmware_data_write()
366 fw_priv->fw = kmalloc(sizeof (struct firmware), GFP_KERNEL); in fw_setup_class_device()
367 if (!fw_priv->fw) { in fw_setup_class_device()
373 memset(fw_priv->fw, 0, sizeof (*fw_priv->fw)); in fw_setup_class_device()
438 if (fw_priv->fw->size && !fw_priv->abort) { in request_firmware()
439 *firmware = fw_priv->fw; in request_firmware()
442 vfree(fw_priv->fw->data); in request_firmware()
443 kfree(fw_priv->fw); in request_firmware()
451 release_firmware(const struct firmware *fw) in release_firmware() argument
453 if (fw) { in release_firmware()
454 vfree(fw->data); in release_firmware()
455 kfree(fw); in release_firmware()
483 void (*cont)(const struct firmware *fw, void *context);
490 const struct firmware *fw; in request_firmware_work_func() local
493 request_firmware(&fw, fw_work->name, fw_work->device); in request_firmware_work_func()
494 fw_work->cont(fw, fw_work->context); in request_firmware_work_func()
495 release_firmware(fw); in request_firmware_work_func()
518 void (*cont)(const struct firmware *fw, void *context)) in request_firmware_nowait() argument