Module Name: src
Committed By: riastradh
Date: Wed Aug 6 13:51:12 UTC 2014
Modified Files:
src/sys/external/bsd/drm2/include/linux: firmware.h
Log Message:
Omit needless firmware handle from Linux struct firmware.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/include/linux/firmware.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/include/linux/firmware.h
diff -u src/sys/external/bsd/drm2/include/linux/firmware.h:1.5 src/sys/external/bsd/drm2/include/linux/firmware.h:1.6
--- src/sys/external/bsd/drm2/include/linux/firmware.h:1.5 Thu Jul 17 20:56:14 2014
+++ src/sys/external/bsd/drm2/include/linux/firmware.h Wed Aug 6 13:51:12 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: firmware.h,v 1.5 2014/07/17 20:56:14 riastradh Exp $ */
+/* $NetBSD: firmware.h,v 1.6 2014/08/06 13:51:12 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -42,7 +42,6 @@
struct device;
struct firmware {
- firmware_handle_t fw_h;
void *data;
size_t size;
};
@@ -53,6 +52,7 @@ request_firmware(const struct firmware *
{
const char *drvname;
struct firmware *fw;
+ firmware_handle_t handle;
int ret;
fw = kmem_alloc(sizeof(*fw), KM_SLEEP);
@@ -68,14 +68,15 @@ request_firmware(const struct firmware *
image_name += (strlen(drvname) + 1);
/* XXX errno NetBSD->Linux */
- ret = -firmware_open(drvname, image_name, &fw->fw_h);
+ ret = -firmware_open(drvname, image_name, &handle);
if (ret)
goto fail0;
- fw->size = firmware_get_size(fw->fw_h);
+ fw->size = firmware_get_size(handle);
fw->data = firmware_malloc(fw->size);
/* XXX errno NetBSD->Linux */
- ret = -firmware_read(fw->fw_h, 0, fw->data, fw->size);
+ ret = -firmware_read(handle, 0, fw->data, fw->size);
+ (void)firmware_close(handle);
if (ret)
goto fail1;