diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-02 13:59:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-02 13:59:27 -0400 |
commit | 919fae1686881ed3922ea9de5b0c0a4feff3069e (patch) | |
tree | f96528958189ef42959f8e3caf129cf7f873025b | |
parent | e77295dc9e6b52281ae85af4068f13752524e9f4 (diff) | |
parent | b67c5f87c13f398ec3f4d6b455cb0bbeda8d7ac0 (diff) |
Merge git://git.infradead.org/users/dwmw2/random-2.6
* git://git.infradead.org/users/dwmw2/random-2.6:
[MTD] mtdchar.c: Fix regression in MEMGETREGIONINFO ioctl()
dabusb_fpga_download(): fix a memory leak
Remove '#include <stddef.h>' from mm/page_isolation.c
Fix modules_install on RO nfs-exported trees.
-rw-r--r-- | drivers/media/video/dabusb.c | 1 | ||||
-rw-r--r-- | drivers/mtd/mtdchar.c | 16 | ||||
-rw-r--r-- | firmware/Makefile | 16 | ||||
-rw-r--r-- | mm/page_isolation.c | 1 |
4 files changed, 25 insertions, 9 deletions
diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c index 48f4b92a8f8b..79faedf58521 100644 --- a/drivers/media/video/dabusb.c +++ b/drivers/media/video/dabusb.c | |||
@@ -403,6 +403,7 @@ static int dabusb_fpga_download (pdabusb_t s, const char *fname) | |||
403 | ret = request_firmware(&fw, "dabusb/bitstream.bin", &s->usbdev->dev); | 403 | ret = request_firmware(&fw, "dabusb/bitstream.bin", &s->usbdev->dev); |
404 | if (ret) { | 404 | if (ret) { |
405 | err("Failed to load \"dabusb/bitstream.bin\": %d\n", ret); | 405 | err("Failed to load \"dabusb/bitstream.bin\": %d\n", ret); |
406 | kfree(b); | ||
406 | return ret; | 407 | return ret; |
407 | } | 408 | } |
408 | 409 | ||
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index d2f331876e4c..e00d424e6575 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -410,16 +410,20 @@ static int mtd_ioctl(struct inode *inode, struct file *file, | |||
410 | 410 | ||
411 | case MEMGETREGIONINFO: | 411 | case MEMGETREGIONINFO: |
412 | { | 412 | { |
413 | struct region_info_user ur; | 413 | uint32_t ur_idx; |
414 | struct mtd_erase_region_info *kr; | ||
415 | struct region_info_user *ur = (struct region_info_user *) argp; | ||
414 | 416 | ||
415 | if (copy_from_user(&ur, argp, sizeof(struct region_info_user))) | 417 | if (get_user(ur_idx, &(ur->regionindex))) |
416 | return -EFAULT; | 418 | return -EFAULT; |
417 | 419 | ||
418 | if (ur.regionindex >= mtd->numeraseregions) | 420 | kr = &(mtd->eraseregions[ur_idx]); |
419 | return -EINVAL; | 421 | |
420 | if (copy_to_user(argp, &(mtd->eraseregions[ur.regionindex]), | 422 | if (put_user(kr->offset, &(ur->offset)) |
421 | sizeof(struct mtd_erase_region_info))) | 423 | || put_user(kr->erasesize, &(ur->erasesize)) |
424 | || put_user(kr->numblocks, &(ur->numblocks))) | ||
422 | return -EFAULT; | 425 | return -EFAULT; |
426 | |||
423 | break; | 427 | break; |
424 | } | 428 | } |
425 | 429 | ||
diff --git a/firmware/Makefile b/firmware/Makefile index 9fe86041f86e..da75a6fbc6ba 100644 --- a/firmware/Makefile +++ b/firmware/Makefile | |||
@@ -146,15 +146,27 @@ $(patsubst %,$(obj)/%.gen.o, $(fw-external-y)): $(obj)/%.gen.o: $(fwdir)/% | |||
146 | $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) | 146 | $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) |
147 | $(call cmd,ihex) | 147 | $(call cmd,ihex) |
148 | 148 | ||
149 | # Don't depend on ihex2fw if we're installing and it already exists. | ||
150 | # Putting it after | in the dependencies doesn't seem sufficient when | ||
151 | # we're installing after a cross-compile, because ihex2fw has dependencies | ||
152 | # on stuff like /usr/lib/gcc/ppc64-redhat-linux/4.3.0/include/stddef.h and | ||
153 | # thus wants to be rebuilt. Which it can't be, if the prebuilt kernel tree | ||
154 | # is exported read-only for someone to run 'make install'. | ||
155 | ifeq ($(INSTALL):$(wildcard $(obj)/ihex2fw),install:$(obj)/ihex2fw) | ||
156 | ihex2fw_dep := | ||
157 | else | ||
158 | ihex2fw_dep := $(obj)/ihex2fw | ||
159 | endif | ||
160 | |||
149 | # .HEX is also Intel HEX, but where the offset and length in each record | 161 | # .HEX is also Intel HEX, but where the offset and length in each record |
150 | # is actually meaningful, because the firmware has to be loaded in a certain | 162 | # is actually meaningful, because the firmware has to be loaded in a certain |
151 | # order rather than as a single binary blob. Thus, we convert them into our | 163 | # order rather than as a single binary blob. Thus, we convert them into our |
152 | # more compact binary representation of ihex records (<linux/ihex.h>) | 164 | # more compact binary representation of ihex records (<linux/ihex.h>) |
153 | $(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) | 165 | $(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) |
154 | $(call cmd,ihex2fw) | 166 | $(call cmd,ihex2fw) |
155 | 167 | ||
156 | # .H16 is our own modified form of Intel HEX, with 16-bit length for records. | 168 | # .H16 is our own modified form of Intel HEX, with 16-bit length for records. |
157 | $(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) | 169 | $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) |
158 | $(call cmd,h16tofw) | 170 | $(call cmd,h16tofw) |
159 | 171 | ||
160 | $(firmware-dirs): | 172 | $(firmware-dirs): |
diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 3444b58033c8..c69f84fe038d 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * linux/mm/page_isolation.c | 2 | * linux/mm/page_isolation.c |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <stddef.h> | ||
6 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
7 | #include <linux/page-isolation.h> | 6 | #include <linux/page-isolation.h> |
8 | #include <linux/pageblock-flags.h> | 7 | #include <linux/pageblock-flags.h> |