Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ab910003
Commit
ab910003
authored
Aug 26, 2002
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define a struct device_interface for all the input interfaces and register
them with the input device class when started up.
parent
6d85befd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
0 deletions
+40
-0
drivers/input/evbug.c
drivers/input/evbug.c
+8
-0
drivers/input/evdev.c
drivers/input/evdev.c
+8
-0
drivers/input/joydev.c
drivers/input/joydev.c
+8
-0
drivers/input/mousedev.c
drivers/input/mousedev.c
+8
-0
drivers/input/tsdev.c
drivers/input/tsdev.c
+8
-0
No files found.
drivers/input/evbug.c
View file @
ab910003
...
...
@@ -32,6 +32,7 @@
#include <linux/module.h>
#include <linux/input.h>
#include <linux/init.h>
#include <linux/device.h>
MODULE_AUTHOR
(
"Vojtech Pavlik <vojtech@ucw.cz>"
);
MODULE_DESCRIPTION
(
"Input driver event debug module"
);
...
...
@@ -87,8 +88,14 @@ 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
)
{
interface_register
(
&
evbug_intf
);
input_register_handler
(
&
evbug_handler
);
return
0
;
}
...
...
@@ -96,6 +103,7 @@ int __init evbug_init(void)
void
__exit
evbug_exit
(
void
)
{
input_unregister_handler
(
&
evbug_handler
);
interface_register
(
&
evbug_intf
);
}
module_init
(
evbug_init
);
...
...
drivers/input/evdev.c
View file @
ab910003
...
...
@@ -36,6 +36,7 @@
#include <linux/init.h>
#include <linux/input.h>
#include <linux/smp_lock.h>
#include <linux/device.h>
struct
evdev
{
int
exist
;
...
...
@@ -484,8 +485,14 @@ 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
)
{
interface_register
(
&
evdev_intf
);
input_register_handler
(
&
evdev_handler
);
return
0
;
}
...
...
@@ -493,6 +500,7 @@ static int __init evdev_init(void)
static
void
__exit
evdev_exit
(
void
)
{
input_unregister_handler
(
&
evdev_handler
);
interface_register
(
&
evdev_intf
);
}
module_init
(
evdev_init
);
...
...
drivers/input/joydev.c
View file @
ab910003
...
...
@@ -42,6 +42,7 @@
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/device.h>
MODULE_AUTHOR
(
"Vojtech Pavlik <vojtech@ucw.cz>"
);
MODULE_DESCRIPTION
(
"Joystick device interfaces"
);
...
...
@@ -534,8 +535,14 @@ 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
)
{
interface_register
(
&
joydev_intf
);
input_register_handler
(
&
joydev_handler
);
return
0
;
}
...
...
@@ -543,6 +550,7 @@ 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
);
...
...
drivers/input/mousedev.c
View file @
ab910003
...
...
@@ -39,6 +39,7 @@
#include <linux/smp_lock.h>
#include <linux/random.h>
#include <linux/major.h>
#include <linux/device.h>
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
#include <linux/miscdevice.h>
#endif
...
...
@@ -516,8 +517,14 @@ static struct miscdevice psaux_mouse = {
};
#endif
static
struct
device_interface
mousedev_intf
=
{
.
name
=
"mouse"
,
.
devclass
=
&
input_devclass
,
};
static
int
__init
mousedev_init
(
void
)
{
interface_register
(
&
mousedev_intf
);
input_register_handler
(
&
mousedev_handler
);
memset
(
&
mousedev_mix
,
0
,
sizeof
(
struct
mousedev
));
...
...
@@ -542,6 +549,7 @@ static void __exit mousedev_exit(void)
#endif
input_unregister_minor
(
mousedev_mix
.
devfs
);
input_unregister_handler
(
&
mousedev_handler
);
interface_unregister
(
&
mousedev_intf
);
}
module_init
(
mousedev_init
);
...
...
drivers/input/tsdev.c
View file @
ab910003
...
...
@@ -40,6 +40,7 @@
#include <linux/smp_lock.h>
#include <linux/random.h>
#include <linux/time.h>
#include <linux/device.h>
#ifndef CONFIG_INPUT_TSDEV_SCREEN_X
#define CONFIG_INPUT_TSDEV_SCREEN_X 240
...
...
@@ -420,8 +421,14 @@ 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
)
{
interface_register
(
&
tsdev_intf
);
input_register_handler
(
&
tsdev_handler
);
printk
(
KERN_INFO
"ts: Compaq touchscreen protocol output
\n
"
);
return
0
;
...
...
@@ -430,6 +437,7 @@ 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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment