banip: update 0.9.5-2
[feed/packages.git] / kernel / mtd-rw / patches / 0001-mtd-disabled.patch
1 --- a/mtd-rw.c
2 +++ b/mtd-rw.c
3 @@ -54,7 +54,11 @@ MODULE_PARM_DESC(i_want_a_brick, "Make a
4
5 static int set_writeable(unsigned n, bool w)
6 {
7 +#ifndef CONFIG_MTD
8 + struct mtd_info *mtd = -ENOSYS;
9 +#else
10 struct mtd_info *mtd = get_mtd_device(NULL, n);
11 +#endif
12 int err;
13
14 if (IS_ERR(mtd)) {
15 @@ -76,7 +80,9 @@ static int set_writeable(unsigned n, boo
16 err = 0;
17 }
18
19 +#ifdef CONFIG_MTD
20 put_mtd_device(mtd);
21 +#endif
22 return err;
23 }
24