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
d07cc72d
Commit
d07cc72d
authored
Apr 25, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: fix up fake usb_interface structure in hiddev
This fixes a oops in the current kernel tree.
parent
3dcad070
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
drivers/usb/input/hiddev.c
drivers/usb/input/hiddev.c
+5
-6
No files found.
drivers/usb/input/hiddev.c
View file @
d07cc72d
...
...
@@ -53,7 +53,6 @@ struct hiddev {
wait_queue_head_t
wait
;
struct
hid_device
*
hid
;
struct
hiddev_list
*
list
;
struct
usb_interface
intf
;
};
struct
hiddev_list
{
...
...
@@ -234,7 +233,7 @@ static int hiddev_fasync(int fd, struct file *file, int on)
static
struct
usb_class_driver
hiddev_class
;
static
void
hiddev_cleanup
(
struct
hiddev
*
hiddev
)
{
usb_deregister_dev
(
&
hiddev
->
intf
,
&
hiddev_class
);
usb_deregister_dev
(
hiddev
->
hid
->
intf
,
&
hiddev_class
);
hiddev_table
[
hiddev
->
minor
]
=
NULL
;
kfree
(
hiddev
);
}
...
...
@@ -775,7 +774,7 @@ int hiddev_connect(struct hid_device *hid)
return
-
1
;
memset
(
hiddev
,
0
,
sizeof
(
struct
hiddev
));
retval
=
usb_register_dev
(
&
hiddev
->
intf
,
&
hiddev_class
);
retval
=
usb_register_dev
(
hid
->
intf
,
&
hiddev_class
);
if
(
retval
)
{
err
(
"Not able to get a minor for this device."
);
kfree
(
hiddev
);
...
...
@@ -784,13 +783,13 @@ int hiddev_connect(struct hid_device *hid)
init_waitqueue_head
(
&
hiddev
->
wait
);
hiddev
->
minor
=
hid
dev
->
intf
.
minor
;
hiddev_table
[
hid
dev
->
intf
.
minor
-
HIDDEV_MINOR_BASE
]
=
hiddev
;
hiddev
->
minor
=
hid
->
intf
->
minor
;
hiddev_table
[
hid
->
intf
->
minor
-
HIDDEV_MINOR_BASE
]
=
hiddev
;
hiddev
->
hid
=
hid
;
hiddev
->
exist
=
1
;
hid
->
minor
=
hid
dev
->
intf
.
minor
;
hid
->
minor
=
hid
->
intf
->
minor
;
hid
->
hiddev
=
hiddev
;
return
0
;
...
...
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