Commit f635f093 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[PATCH] cleanup input_register_minor

Always pass the input/ prefix to input_register_minor instead of using
the first argument to devfs_register
parent 3563104e
......@@ -397,7 +397,7 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct
sprintf(evdev->name, "event%d", minor);
evdev_table[minor] = evdev;
evdev->devfs = input_register_minor("event%d", minor, EVDEV_MINOR_BASE);
evdev->devfs = input_register_minor("input/event%d", minor, EVDEV_MINOR_BASE);
return &evdev->handle;
}
......
......@@ -546,8 +546,11 @@ devfs_handle_t input_register_minor(char *name, int minor, int minor_base)
{
char devfs_name[16];
sprintf(devfs_name, name, minor);
return devfs_register(input_devfs_handle, devfs_name, DEVFS_FL_DEFAULT, INPUT_MAJOR, minor + minor_base,
S_IFCHR | S_IRUGO | S_IWUSR, &input_fops, NULL);
return devfs_register(NULL, devfs_name, 0,
INPUT_MAJOR, minor + minor_base,
S_IFCHR|S_IRUGO|S_IWUSR,
&input_fops, NULL);
}
void input_unregister_minor(devfs_handle_t handle)
......
......@@ -425,7 +425,7 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
input_open_device(&mousedev->handle);
mousedev_table[minor] = mousedev;
mousedev->devfs = input_register_minor("mouse%d", minor, MOUSEDEV_MINOR_BASE);
mousedev->devfs = input_register_minor("input/mouse%d", minor, MOUSEDEV_MINOR_BASE);
return &mousedev->handle;
}
......@@ -507,7 +507,7 @@ static int __init mousedev_init(void)
mousedev_table[MOUSEDEV_MIX] = &mousedev_mix;
mousedev_mix.exist = 1;
mousedev_mix.minor = MOUSEDEV_MIX;
mousedev_mix.devfs = input_register_minor("mice", MOUSEDEV_MIX, MOUSEDEV_MINOR_BASE);
mousedev_mix.devfs = input_register_minor("input/mice", MOUSEDEV_MIX, MOUSEDEV_MINOR_BASE);
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
if (!(mousedev_mix.misc = !misc_register(&psaux_mouse)))
......
......@@ -326,7 +326,7 @@ static struct input_handle *tsdev_connect(struct input_handler *handler,
tsdev_table[minor] = tsdev;
tsdev->devfs =
input_register_minor("ts%d", minor, TSDEV_MINOR_BASE);
input_register_minor("input/ts%d", minor, TSDEV_MINOR_BASE);
return &tsdev->handle;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment