From 78edbe617503ced4960b88c7b089c45b8d3dd7b1 Mon Sep 17 00:00:00 2001
From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Sat, 27 Jan 2007 19:22:15 +0000
Subject: forward port missing parts of the mtd permission change in
 whiterussian (and add it to linux 2.6 as well)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6224 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 .../generic-2.4/patches/009-mtd_uaccess.patch      | 22 ++++++++++++++++++++++
 .../generic-2.6/patches/008-mtd_uaccess.patch      | 15 +++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 target/linux/generic-2.6/patches/008-mtd_uaccess.patch

(limited to 'target')

diff --git a/target/linux/generic-2.4/patches/009-mtd_uaccess.patch b/target/linux/generic-2.4/patches/009-mtd_uaccess.patch
index dec375b32..2ddfca9bd 100644
--- a/target/linux/generic-2.4/patches/009-mtd_uaccess.patch
+++ b/target/linux/generic-2.4/patches/009-mtd_uaccess.patch
@@ -9,3 +9,25 @@
  			&mtd_fops, NULL);
  }
  
+--- linux-2.4.30/drivers/mtd/mtdblock.c.orig	2006-03-26 06:38:36 -05:00
++++ linux-2.4.30/drivers/mtd/mtdblock.c	2006-03-26 06:38:54 -05:00
+@@ -601,7 +601,7 @@
+         sprintf(name, "%d", mtd->index);
+         devfs_rw_handle[mtd->index] = devfs_register(devfs_dir_handle, name,
+                         DEVFS_FL_DEFAULT, MTD_BLOCK_MAJOR, mtd->index,
+-                        S_IFBLK | S_IRUGO | S_IWUGO,
++                        S_IFBLK | S_IRUSR | S_IWUSR,
+                         &mtd_fops, NULL);
+ }
+ 
+--- linux-2.4.30/drivers/mtd/mtdchar.c.orig	2006-03-26 06:42:23 -05:00
++++ linux-2.4.30/drivers/mtd/mtdchar.c	2006-03-26 06:42:41 -05:00
+@@ -558,7 +558,7 @@
+ 	sprintf(name, "%d", mtd->index);
+ 	devfs_rw_handle[mtd->index] = devfs_register(devfs_dir_handle, name,
+ 			DEVFS_FL_DEFAULT, MTD_CHAR_MAJOR, mtd->index*2,
+-			S_IFCHR | S_IRUGO | S_IWUGO,
++			S_IFCHR | S_IRUSR | S_IWUSR,
+ 			&mtd_fops, NULL);
+ 
+ 	sprintf(name, "%dro", mtd->index);
diff --git a/target/linux/generic-2.6/patches/008-mtd_uaccess.patch b/target/linux/generic-2.6/patches/008-mtd_uaccess.patch
new file mode 100644
index 000000000..0736703ed
--- /dev/null
+++ b/target/linux/generic-2.6/patches/008-mtd_uaccess.patch
@@ -0,0 +1,15 @@
+--- linux-2.6.19.2/drivers/mtd/mtdchar.c.old	2007-01-27 20:17:35.000000000 +0100
++++ linux-2.6.19.2/drivers/mtd/mtdchar.c	2007-01-27 20:18:12.000000000 +0100
+@@ -33,10 +33,10 @@
+ 
+ #ifdef CONFIG_DEVFS_FS
+ 	devfs_mk_cdev(MKDEV(MTD_CHAR_MAJOR, mtd->index*2),
+-			S_IFCHR | S_IRUGO | S_IWUGO, "mtd/%d", mtd->index);
++			S_IFCHR | S_IRUSR | S_IWUSR, "mtd/%d", mtd->index);
+ 
+ 	devfs_mk_cdev(MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1),
+-			S_IFCHR | S_IRUGO, "mtd/%dro", mtd->index);
++			S_IFCHR | S_IRUSR, "mtd/%dro", mtd->index);
+ #else
+ 	class_device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2),
+ 			    NULL, "mtd%d", mtd->index);
-- 
cgit v1.2.3