projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fuse: fix reading past EOF
[powerpc.git]
/
fs
/
char_dev.c
diff --git
a/fs/char_dev.c
b/fs/char_dev.c
index
e6194e2
..
c3bfa76
100644
(file)
--- a/
fs/char_dev.c
+++ b/
fs/char_dev.c
@@
-6,6
+6,7
@@
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/fs.h>
+#include <linux/kdev_t.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/string.h>
@@
-108,13
+109,6
@@
__register_chrdev_region(unsigned int major, unsigned int baseminor,
/* temporary */
if (major == 0) {
for (i = ARRAY_SIZE(chrdevs)-1; i > 0; i--) {
/* temporary */
if (major == 0) {
for (i = ARRAY_SIZE(chrdevs)-1; i > 0; i--) {
- /*
- * Disallow the LANANA-assigned LOCAL/EXPERIMENTAL
- * majors
- */
- if ((60 <= i && i <= 63) || (120 <= i && i <= 127) ||
- (240 <= i && i <= 254))
- continue;
if (chrdevs[i] == NULL)
break;
}
if (chrdevs[i] == NULL)
break;
}
@@
-327,14
+321,13
@@
void unregister_chrdev_region(dev_t from, unsigned count)
}
}
}
}
-
int
unregister_chrdev(unsigned int major, const char *name)
+
void
unregister_chrdev(unsigned int major, const char *name)
{
struct char_device_struct *cd;
cd = __unregister_chrdev_region(major, 0, 256);
if (cd && cd->cdev)
cdev_del(cd->cdev);
kfree(cd);
{
struct char_device_struct *cd;
cd = __unregister_chrdev_region(major, 0, 256);
if (cd && cd->cdev)
cdev_del(cd->cdev);
kfree(cd);
- return 0;
}
static DEFINE_SPINLOCK(cdev_lock);
}
static DEFINE_SPINLOCK(cdev_lock);
@@
-552,6
+545,7
@@
static struct kobject *base_probe(dev_t dev, int *part, void *data)
void __init chrdev_init(void)
{
cdev_map = kobj_map_init(base_probe, &chrdevs_lock);
void __init chrdev_init(void)
{
cdev_map = kobj_map_init(base_probe, &chrdevs_lock);
+ bdi_init(&directly_mappable_cdev_bdi);
}
}