diff options
author | David Woodhouse <dwmw2@infradead.org> | 2008-05-23 13:38:49 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-10 09:29:25 -0400 |
commit | b7a39bd0afc4021e8ad2b1189e884551e147427f (patch) | |
tree | 41d36cfe80aee9cb7013b86b6122b85b775c0843 /drivers/base | |
parent | fd4f80de4612cc5255c108a8c13df88f89c46654 (diff) |
firmware: make fw->data const
In preparation for supporting firmware files linked into the static
kernel, make fw->data const to ensure that users aren't modifying it (so
that we can pass a pointer to the original in-kernel copy, rather than
having to copy it).
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/firmware_class.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 9fd4a8534146..264b3a2cd860 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
@@ -257,7 +257,7 @@ firmware_data_write(struct kobject *kobj, struct bin_attribute *bin_attr, | |||
257 | if (retval) | 257 | if (retval) |
258 | goto out; | 258 | goto out; |
259 | 259 | ||
260 | memcpy(fw->data + offset, buffer, count); | 260 | memcpy((u8 *)fw->data + offset, buffer, count); |
261 | 261 | ||
262 | fw->size = max_t(size_t, offset + count, fw->size); | 262 | fw->size = max_t(size_t, offset + count, fw->size); |
263 | retval = count; | 263 | retval = count; |