009-mtd_uaccess.patch 1.0 KB

1234567891011121314151617181920212223242526272829
  1. --- a/drivers/mtd/mtdchar.c
  2. +++ b/drivers/mtd/mtdchar.c
  3. @@ -558,13 +558,13 @@ static void mtd_notify_add(struct mtd_in
  4. sprintf(name, "%d", mtd->index);
  5. devfs_rw_handle[mtd->index] = devfs_register(devfs_dir_handle, name,
  6. DEVFS_FL_DEFAULT, MTD_CHAR_MAJOR, mtd->index*2,
  7. - S_IFCHR | S_IRUGO | S_IWUGO,
  8. + S_IFCHR | S_IRUSR | S_IWUSR,
  9. &mtd_fops, NULL);
  10. sprintf(name, "%dro", mtd->index);
  11. devfs_ro_handle[mtd->index] = devfs_register(devfs_dir_handle, name,
  12. DEVFS_FL_DEFAULT, MTD_CHAR_MAJOR, mtd->index*2+1,
  13. - S_IFCHR | S_IRUGO,
  14. + S_IFCHR | S_IRUSR,
  15. &mtd_fops, NULL);
  16. }
  17. --- a/drivers/mtd/mtdblock.c
  18. +++ b/drivers/mtd/mtdblock.c
  19. @@ -601,7 +601,7 @@ static void mtd_notify_add(struct mtd_in
  20. sprintf(name, "%d", mtd->index);
  21. devfs_rw_handle[mtd->index] = devfs_register(devfs_dir_handle, name,
  22. DEVFS_FL_DEFAULT, MTD_BLOCK_MAJOR, mtd->index,
  23. - S_IFBLK | S_IRUGO | S_IWUGO,
  24. + S_IFBLK | S_IRUSR | S_IWUSR,
  25. &mtd_fops, NULL);
  26. }