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
Kirill Smelkov
linux
Commits
e027fe1c
Commit
e027fe1c
authored
Apr 03, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB HID driver
removed CONFIG_USB_HIDDEV #ifdefs in the driver.
parent
a8e08249
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
15 deletions
+10
-15
drivers/usb/hid-core.c
drivers/usb/hid-core.c
+0
-11
drivers/usb/hid.h
drivers/usb/hid.h
+10
-4
No files found.
drivers/usb/hid-core.c
View file @
e027fe1c
...
...
@@ -46,9 +46,7 @@
#include <linux/usb.h>
#include "hid.h"
#ifdef CONFIG_USB_HIDDEV
#include <linux/hiddev.h>
#endif
/*
* Version Information
...
...
@@ -1441,10 +1439,8 @@ static void* hid_probe(struct usb_device *dev, unsigned int ifnum,
if
(
!
hidinput_connect
(
hid
))
hid
->
claimed
|=
HID_CLAIMED_INPUT
;
#ifdef CONFIG_USB_HIDDEV
if
(
!
hiddev_connect
(
hid
))
hid
->
claimed
|=
HID_CLAIMED_HIDDEV
;
#endif
if
(
!
hid
->
claimed
)
{
hid_free_device
(
hid
);
...
...
@@ -1483,13 +1479,10 @@ static void hid_disconnect(struct usb_device *dev, void *ptr)
usb_unlink_urb
(
hid
->
urbout
);
usb_unlink_urb
(
hid
->
urbctrl
);
if
(
hid
->
claimed
&
HID_CLAIMED_INPUT
)
hidinput_disconnect
(
hid
);
#ifdef CONFIG_USB_HIDDEV
if
(
hid
->
claimed
&
HID_CLAIMED_HIDDEV
)
hiddev_disconnect
(
hid
);
#endif
usb_free_urb
(
hid
->
urbin
);
usb_free_urb
(
hid
->
urbctrl
);
...
...
@@ -1516,9 +1509,7 @@ static struct usb_driver hid_driver = {
static
int
__init
hid_init
(
void
)
{
#ifdef CONFIG_USB_HIDDEV
hiddev_init
();
#endif
usb_register
(
&
hid_driver
);
info
(
DRIVER_VERSION
":"
DRIVER_DESC
);
...
...
@@ -1527,9 +1518,7 @@ static int __init hid_init(void)
static
void
__exit
hid_exit
(
void
)
{
#ifdef CONFIG_USB_HIDDEV
hiddev_exit
();
#endif
usb_deregister
(
&
hid_driver
);
}
...
...
drivers/usb/hid.h
View file @
e027fe1c
...
...
@@ -389,10 +389,6 @@ struct hid_descriptor {
struct
hid_class_descriptor
desc
[
1
];
}
__attribute__
((
packed
));
void
hidinput_hid_event
(
struct
hid_device
*
,
struct
hid_field
*
,
struct
hid_usage
*
,
__s32
);
int
hidinput_connect
(
struct
hid_device
*
);
void
hidinput_disconnect
(
struct
hid_device
*
);
#ifdef DEBUG
#include "hid-debug.h"
#else
...
...
@@ -403,9 +399,19 @@ void hidinput_disconnect(struct hid_device *);
#endif
#ifdef CONFIG_USB_HIDINPUT
/* Applications from HID Usage Tables 4/8/99 Version 1.1 */
/* We ignore a few input applications that are not widely used */
#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || ( a == 0x00010080) || ( a == 0x000c0001))
extern
void
hidinput_hid_event
(
struct
hid_device
*
,
struct
hid_field
*
,
struct
hid_usage
*
,
__s32
);
extern
int
hidinput_connect
(
struct
hid_device
*
);
extern
void
hidinput_disconnect
(
struct
hid_device
*
);
#else
#define IS_INPUT_APPLICATION(a) (0)
static
inline
void
hidinput_hid_event
(
struct
hid_device
*
hid
,
struct
hid_field
*
field
,
struct
hid_usage
*
usage
,
__s32
value
)
{
}
static
inline
int
hidinput_connect
(
struct
hid_device
*
hid
)
{
return
-
ENODEV
;
}
static
inline
void
hidinput_disconnect
(
struct
hid_device
*
hid
)
{
}
#endif
int
hid_open
(
struct
hid_device
*
);
void
hid_close
(
struct
hid_device
*
);
...
...
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