Skip to content

Commit 0500abf

Browse files
AdrianBunkLinus Torvalds
authored andcommitted
[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>
1 parent 48b1926 commit 0500abf

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

drivers/mtd/chips/sharp.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
#undef AUTOUNLOCK /* automatically unlocks blocks before erasing */
6666

67-
struct mtd_info *sharp_probe(struct map_info *);
67+
static struct mtd_info *sharp_probe(struct map_info *);
6868

6969
static int sharp_probe_map(struct map_info *map,struct mtd_info *mtd);
7070

@@ -96,7 +96,6 @@ struct sharp_info{
9696
struct flchip chips[1];
9797
};
9898

99-
struct mtd_info *sharp_probe(struct map_info *map);
10099
static void sharp_destroy(struct mtd_info *mtd);
101100

102101
static struct mtd_chip_driver sharp_chipdrv = {
@@ -107,7 +106,7 @@ static struct mtd_chip_driver sharp_chipdrv = {
107106
};
108107

109108

110-
struct mtd_info *sharp_probe(struct map_info *map)
109+
static struct mtd_info *sharp_probe(struct map_info *map)
111110
{
112111
struct mtd_info *mtd = NULL;
113112
struct sharp_info *sharp = NULL;
@@ -581,7 +580,7 @@ static void sharp_destroy(struct mtd_info *mtd)
581580

582581
}
583582

584-
int __init sharp_probe_init(void)
583+
static int __init sharp_probe_init(void)
585584
{
586585
printk("MTD Sharp chip driver <ds@lineo.com>\n");
587586

drivers/mtd/inftlcore.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@
4747
*/
4848
#define MAX_LOOPS 10000
4949

50-
extern void INFTL_dumptables(struct INFTLrecord *inftl);
51-
extern void INFTL_dumpVUchains(struct INFTLrecord *inftl);
52-
5350
static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
5451
{
5552
struct INFTLrecord *inftl;
@@ -885,8 +882,6 @@ static struct mtd_blktrans_ops inftl_tr = {
885882
.owner = THIS_MODULE,
886883
};
887884

888-
extern char inftlmountrev[];
889-
890885
static int __init init_inftl(void)
891886
{
892887
printk(KERN_INFO "INFTL: inftlcore.c $Revision: 1.19 $, "

include/linux/mtd/inftl.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ struct INFTLrecord {
5252
int INFTL_mount(struct INFTLrecord *s);
5353
int INFTL_formatblock(struct INFTLrecord *s, int block);
5454

55+
extern char inftlmountrev[];
56+
57+
void INFTL_dumptables(struct INFTLrecord *s);
58+
void INFTL_dumpVUchains(struct INFTLrecord *s);
59+
5560
#endif /* __KERNEL__ */
5661

5762
#endif /* __MTD_INFTL_H__ */

0 commit comments

Comments
 (0)