diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2005-03-19 17:40:47 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-05-23 07:00:18 -0400 |
commit | cc71229ff345a32d1b3de370a257dac62986b187 (patch) | |
tree | cd0be3d4dd273c31a04b9ccfd63f296fe4969a04 /drivers/mtd | |
parent | 50da7f60960a2e39aa8784983c580a3ddfd9bd8d (diff) |
[MTD] block2mtd: Fix incompatible pointer type
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/block2mtd.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index e5da82a0dd6f..4a7a805e7564 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: block2mtd.c,v 1.25 2005/03/07 20:29:05 joern Exp $ | 2 | * $Id: block2mtd.c,v 1.28 2005/03/19 22:40:44 gleixner Exp $ |
3 | * | 3 | * |
4 | * block2mtd.c - create an mtd from a block device | 4 | * block2mtd.c - create an mtd from a block device |
5 | * | 5 | * |
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
20 | #include <linux/buffer_head.h> | 20 | #include <linux/buffer_head.h> |
21 | 21 | ||
22 | #define VERSION "$Revision: 1.24 $" | 22 | #define VERSION "$Revision: 1.28 $" |
23 | 23 | ||
24 | 24 | ||
25 | #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) | 25 | #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) |
@@ -88,7 +88,6 @@ void cache_readahead(struct address_space *mapping, int index) | |||
88 | static struct page* page_readahead(struct address_space *mapping, int index) | 88 | static struct page* page_readahead(struct address_space *mapping, int index) |
89 | { | 89 | { |
90 | filler_t *filler = (filler_t*)mapping->a_ops->readpage; | 90 | filler_t *filler = (filler_t*)mapping->a_ops->readpage; |
91 | //do_page_cache_readahead(mapping, index, XXX, 64); | ||
92 | cache_readahead(mapping, index); | 91 | cache_readahead(mapping, index); |
93 | return read_cache_page(mapping, index, filler, NULL); | 92 | return read_cache_page(mapping, index, filler, NULL); |
94 | } | 93 | } |
@@ -369,16 +368,16 @@ static int ustrtoul(const char *cp, char **endp, unsigned int base) | |||
369 | } | 368 | } |
370 | 369 | ||
371 | 370 | ||
372 | static int parse_num32(u32 *num32, const char *token) | 371 | static int parse_num(size_t *num, const char *token) |
373 | { | 372 | { |
374 | char *endp; | 373 | char *endp; |
375 | unsigned long n; | 374 | size_t n; |
376 | 375 | ||
377 | n = ustrtoul(token, &endp, 0); | 376 | n = (size_t) ustrtoul(token, &endp, 0); |
378 | if (*endp) | 377 | if (*endp) |
379 | return -EINVAL; | 378 | return -EINVAL; |
380 | 379 | ||
381 | *num32 = n; | 380 | *num = n; |
382 | return 0; | 381 | return 0; |
383 | } | 382 | } |
384 | 383 | ||
@@ -421,7 +420,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp) | |||
421 | char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */ | 420 | char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */ |
422 | char *token[2]; | 421 | char *token[2]; |
423 | char *name; | 422 | char *name; |
424 | u32 erase_size = PAGE_SIZE; | 423 | size_t erase_size = PAGE_SIZE; |
425 | int i, ret; | 424 | int i, ret; |
426 | 425 | ||
427 | if (strnlen(val, sizeof(buf)) >= sizeof(buf)) | 426 | if (strnlen(val, sizeof(buf)) >= sizeof(buf)) |
@@ -448,7 +447,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp) | |||
448 | return 0; | 447 | return 0; |
449 | 448 | ||
450 | if (token[1]) { | 449 | if (token[1]) { |
451 | ret = parse_num32(&erase_size, token[1]); | 450 | ret = parse_num(&erase_size, token[1]); |
452 | if (ret) | 451 | if (ret) |
453 | parse_err("illegal erase size"); | 452 | parse_err("illegal erase size"); |
454 | } | 453 | } |