From: Greg KH <greg@kroah.com>
To: Patrick Mochel <mochel@osdl.org>, linux-kernel@vger.kernel.org
Cc: hannal@us.ibm.com, andmike@us.ibm.com
Subject: [RFC] Device class rework [2/5]
Date: Tue, 22 Apr 2003 13:57:49 -0700 [thread overview]
Message-ID: <20030422205749.GC4701@kroah.com> (raw)
In-Reply-To: <20030422205719.GB4701@kroah.com>
On Tue, Apr 22, 2003 at 01:55:45PM -0700, Greg KH wrote:
> - Fixes for the input core to build properly. I've not converted the
> input core to the new class model yet, but will after this.
diff -Nru a/drivers/input/evbug.c b/drivers/input/evbug.c
--- a/drivers/input/evbug.c Tue Apr 22 13:07:49 2003
+++ b/drivers/input/evbug.c Tue Apr 22 13:07:49 2003
@@ -88,19 +88,8 @@
.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 @@
void __exit evbug_exit(void)
{
input_unregister_handler(&evbug_handler);
- interface_unregister(&evbug_intf);
}
module_init(evbug_init);
diff -Nru a/drivers/input/evdev.c b/drivers/input/evdev.c
--- a/drivers/input/evdev.c Tue Apr 22 13:07:53 2003
+++ b/drivers/input/evdev.c Tue Apr 22 13:07:53 2003
@@ -435,19 +435,8 @@
.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 void __exit evdev_exit(void)
{
input_unregister_handler(&evdev_handler);
- interface_unregister(&evdev_intf);
}
module_init(evdev_init);
diff -Nru a/drivers/input/input.c b/drivers/input/input.c
--- a/drivers/input/input.c Tue Apr 22 13:07:58 2003
+++ b/drivers/input/input.c Tue Apr 22 13:07:58 2003
@@ -38,7 +38,7 @@
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
@@ -675,7 +675,7 @@
#endif
-struct device_class input_devclass = {
+struct class input_class = {
.name = "input",
};
@@ -683,7 +683,7 @@
{
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);
@@ -714,7 +714,7 @@
devfs_unregister(input_devfs_handle);
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);
diff -Nru a/drivers/input/mousedev.c b/drivers/input/mousedev.c
--- a/drivers/input/mousedev.c Tue Apr 22 13:08:02 2003
+++ b/drivers/input/mousedev.c Tue Apr 22 13:08:02 2003
@@ -487,18 +487,8 @@
};
#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));
@@ -527,7 +517,6 @@
#endif
input_unregister_minor(mousedev_mix.devfs);
input_unregister_handler(&mousedev_handler);
- interface_unregister(&mousedev_intf);
}
module_init(mousedev_init);
diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
--- a/drivers/usb/input/hid-core.c Tue Apr 22 13:07:59 2003
+++ b/drivers/usb/input/hid-core.c Tue Apr 22 13:07:59 2003
@@ -1664,9 +1664,6 @@
.probe = hid_probe,
.disconnect = hid_disconnect,
.id_table = hid_usb_ids,
- .driver = {
- .devclass = &input_devclass,
- },
};
static int __init hid_init(void)
diff -Nru a/include/linux/input.h b/include/linux/input.h
--- a/include/linux/input.h Tue Apr 22 13:07:53 2003
+++ b/include/linux/input.h Tue Apr 22 13:07:53 2003
@@ -909,7 +909,7 @@
#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
next prev parent reply other threads:[~2003-04-22 20:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-22 20:55 [RFC] Device class rework [0/5] Greg KH
2003-04-22 20:57 ` [RFC] Device class rework [1/5] Greg KH
2003-04-22 20:57 ` Greg KH [this message]
2003-04-22 20:58 ` [RFC] Device class rework [3/5] Greg KH
2003-04-22 20:59 ` [RFC] Device class rework [4/5] Greg KH
2003-04-22 20:59 ` [RFC] Device class rework [5/5] Greg KH
2003-04-23 0:59 ` [RFC] Device class rework [0/5] Hanna Linder
2003-04-23 1:54 ` Greg KH
2003-04-23 16:18 ` Hanna Linder
2003-04-23 16:23 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030422205749.GC4701@kroah.com \
--to=greg@kroah.com \
--cc=andmike@us.ibm.com \
--cc=hannal@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox