Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] drivers/mtd/: small cleanups

- chips/sharp.c: make two needlessly global functions static

- move some declarations to a header file where they belong to

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Adrian Bunk and committed by
Linus Torvalds
0500abf5 48b19268

+8 -9
+3 -4
drivers/mtd/chips/sharp.c
··· 64 64 65 65 #undef AUTOUNLOCK /* automatically unlocks blocks before erasing */ 66 66 67 - struct mtd_info *sharp_probe(struct map_info *); 67 + static struct mtd_info *sharp_probe(struct map_info *); 68 68 69 69 static int sharp_probe_map(struct map_info *map,struct mtd_info *mtd); 70 70 ··· 96 96 struct flchip chips[1]; 97 97 }; 98 98 99 - struct mtd_info *sharp_probe(struct map_info *map); 100 99 static void sharp_destroy(struct mtd_info *mtd); 101 100 102 101 static struct mtd_chip_driver sharp_chipdrv = { ··· 106 107 }; 107 108 108 109 109 - struct mtd_info *sharp_probe(struct map_info *map) 110 + static struct mtd_info *sharp_probe(struct map_info *map) 110 111 { 111 112 struct mtd_info *mtd = NULL; 112 113 struct sharp_info *sharp = NULL; ··· 580 581 581 582 } 582 583 583 - int __init sharp_probe_init(void) 584 + static int __init sharp_probe_init(void) 584 585 { 585 586 printk("MTD Sharp chip driver <ds@lineo.com>\n"); 586 587
-5
drivers/mtd/inftlcore.c
··· 47 47 */ 48 48 #define MAX_LOOPS 10000 49 49 50 - extern void INFTL_dumptables(struct INFTLrecord *inftl); 51 - extern void INFTL_dumpVUchains(struct INFTLrecord *inftl); 52 - 53 50 static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) 54 51 { 55 52 struct INFTLrecord *inftl; ··· 881 884 .remove_dev = inftl_remove_dev, 882 885 .owner = THIS_MODULE, 883 886 }; 884 - 885 - extern char inftlmountrev[]; 886 887 887 888 static int __init init_inftl(void) 888 889 {
+5
include/linux/mtd/inftl.h
··· 52 52 int INFTL_mount(struct INFTLrecord *s); 53 53 int INFTL_formatblock(struct INFTLrecord *s, int block); 54 54 55 + extern char inftlmountrev[]; 56 + 57 + void INFTL_dumptables(struct INFTLrecord *s); 58 + void INFTL_dumpVUchains(struct INFTLrecord *s); 59 + 55 60 #endif /* __KERNEL__ */ 56 61 57 62 #endif /* __MTD_INFTL_H__ */