Commit a7430963 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

driver core: fix up the input_class logic due to the class changes.

parent 0d120f58
......@@ -88,19 +88,8 @@ static struct input_handler evbug_handler = {
.id_table = evbug_ids,
};
static struct device_interface evbug_intf = {
.name = "debug",
.devclass = &input_devclass,
};
int __init evbug_init(void)
{
int retval;
retval = interface_register(&evbug_intf);
if(retval < 0)
return retval;
input_register_handler(&evbug_handler);
return 0;
}
......@@ -108,7 +97,6 @@ int __init evbug_init(void)
void __exit evbug_exit(void)
{
input_unregister_handler(&evbug_handler);
interface_unregister(&evbug_intf);
}
module_init(evbug_init);
......
......@@ -435,19 +435,8 @@ static struct input_handler evdev_handler = {
.id_table = evdev_ids,
};
static struct device_interface evdev_intf = {
.name = "event",
.devclass = &input_devclass,
};
static int __init evdev_init(void)
{
int retval;
retval = interface_register(&evdev_intf);
if(retval < 0)
return retval;
input_register_handler(&evdev_handler);
return 0;
}
......@@ -455,7 +444,6 @@ static int __init evdev_init(void)
static void __exit evdev_exit(void)
{
input_unregister_handler(&evdev_handler);
interface_unregister(&evdev_intf);
}
module_init(evdev_init);
......
......@@ -38,7 +38,7 @@ EXPORT_SYMBOL(input_close_device);
EXPORT_SYMBOL(input_accept_process);
EXPORT_SYMBOL(input_flush_device);
EXPORT_SYMBOL(input_event);
EXPORT_SYMBOL(input_devclass);
EXPORT_SYMBOL(input_class);
#define INPUT_MAJOR 13
#define INPUT_DEVICES 256
......@@ -667,7 +667,7 @@ static int input_handlers_read(char *buf, char **start, off_t pos, int count, in
#endif
struct device_class input_devclass = {
struct class input_class = {
.name = "input",
};
......@@ -675,7 +675,7 @@ static int __init input_init(void)
{
struct proc_dir_entry *entry;
devclass_register(&input_devclass);
class_register(&input_class);
#ifdef CONFIG_PROC_FS
proc_bus_input_dir = proc_mkdir("input", proc_bus);
......@@ -705,7 +705,7 @@ static void __exit input_exit(void)
devfs_remove("input");
if (unregister_chrdev(INPUT_MAJOR, "input"))
printk(KERN_ERR "input: can't unregister char major %d", INPUT_MAJOR);
devclass_unregister(&input_devclass);
class_unregister(&input_class);
}
subsys_initcall(input_init);
......
......@@ -493,19 +493,8 @@ static struct input_handler joydev_handler = {
.id_table = joydev_ids,
};
static struct device_interface joydev_intf = {
.name = "joystick",
.devclass = &input_devclass,
};
static int __init joydev_init(void)
{
int retval;
retval = interface_register(&joydev_intf);
if(retval < 0)
return retval;
input_register_handler(&joydev_handler);
return 0;
}
......@@ -513,7 +502,6 @@ static int __init joydev_init(void)
static void __exit joydev_exit(void)
{
input_unregister_handler(&joydev_handler);
interface_unregister(&joydev_intf);
}
module_init(joydev_init);
......
......@@ -492,18 +492,8 @@ static struct miscdevice psaux_mouse = {
};
#endif
static struct device_interface mousedev_intf = {
.name = "mouse",
.devclass = &input_devclass,
};
static int __init mousedev_init(void)
{
int retval;
if((retval = interface_register(&mousedev_intf)) < 0)
return retval;
input_register_handler(&mousedev_handler);
memset(&mousedev_mix, 0, sizeof(struct mousedev));
......@@ -532,7 +522,6 @@ static void __exit mousedev_exit(void)
#endif
devfs_remove("input/mice");
input_unregister_handler(&mousedev_handler);
interface_unregister(&mousedev_intf);
}
module_init(mousedev_init);
......
......@@ -378,19 +378,8 @@ static struct input_handler tsdev_handler = {
.id_table = tsdev_ids,
};
static struct device_interface tsdev_intf = {
.name = "touchscreen",
.devclass = &input_devclass,
};
static int __init tsdev_init(void)
{
int retval;
retval = interface_register(&tsdev_intf);
if(retval < 0)
return retval;
input_register_handler(&tsdev_handler);
printk(KERN_INFO "ts: Compaq touchscreen protocol output\n");
return 0;
......@@ -399,7 +388,6 @@ static int __init tsdev_init(void)
static void __exit tsdev_exit(void)
{
input_unregister_handler(&tsdev_handler);
interface_unregister(&tsdev_intf);
}
module_init(tsdev_init);
......
......@@ -1664,9 +1664,6 @@ static struct usb_driver hid_driver = {
.probe = hid_probe,
.disconnect = hid_disconnect,
.id_table = hid_usb_ids,
.driver = {
.devclass = &input_devclass,
},
};
static int __init hid_init(void)
......
......@@ -908,7 +908,7 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in
#define input_regs(a,b) do { (a)->regs = (b); } while (0)
#define input_sync(a) do { input_event(a, EV_SYN, SYN_REPORT, 0); (a)->regs = NULL; } while (0)
extern struct device_class input_devclass;
extern struct class input_class;
#endif
#endif
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