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
414ca09c
Commit
414ca09c
authored
Nov 30, 2002
by
Oliver Neukum
Committed by
Greg Kroah-Hartman
Nov 30, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB core: cleanup BKL
parent
439683c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
drivers/usb/core/devio.c
drivers/usb/core/devio.c
+8
-8
No files found.
drivers/usb/core/devio.c
View file @
414ca09c
...
@@ -1090,12 +1090,10 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
...
@@ -1090,12 +1090,10 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
else
switch
(
ctrl
.
ioctl_code
)
{
else
switch
(
ctrl
.
ioctl_code
)
{
/* disconnect kernel driver from interface, leaving it unbound. */
/* disconnect kernel driver from interface, leaving it unbound. */
/* maybe unbound - you get no guarantee it stays unbound */
case
USBDEVFS_DISCONNECT
:
case
USBDEVFS_DISCONNECT
:
/* this function is voodoo. */
/* this function is misdesigned - retained for compatibility */
/* which function ... usb_device_remove()?
lock_kernel
();
* FIXME either the module lock (BKL) should be involved
* here too, or the 'default' case below is broken
*/
driver
=
ifp
->
driver
;
driver
=
ifp
->
driver
;
if
(
driver
)
{
if
(
driver
)
{
dbg
(
"disconnect '%s' from dev %d interface %d"
,
dbg
(
"disconnect '%s' from dev %d interface %d"
,
...
@@ -1103,11 +1101,14 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
...
@@ -1103,11 +1101,14 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
usb_device_remove
(
&
ifp
->
dev
);
usb_device_remove
(
&
ifp
->
dev
);
}
else
}
else
retval
=
-
ENODATA
;
retval
=
-
ENODATA
;
unlock_kernel
();
break
;
break
;
/* let kernel drivers try to (re)bind to the interface */
/* let kernel drivers try to (re)bind to the interface */
case
USBDEVFS_CONNECT
:
case
USBDEVFS_CONNECT
:
lock_kernel
();
retval
=
usb_device_probe
(
&
ifp
->
dev
);
retval
=
usb_device_probe
(
&
ifp
->
dev
);
unlock_kernel
();
break
;
break
;
/* talk directly to the interface's driver */
/* talk directly to the interface's driver */
...
@@ -1129,11 +1130,10 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
...
@@ -1129,11 +1130,10 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
}
}
unlock_kernel
();
unlock_kernel
();
retval
=
driver
->
ioctl
(
ifp
,
ctrl
.
ioctl_code
,
buf
);
retval
=
driver
->
ioctl
(
ifp
,
ctrl
.
ioctl_code
,
buf
);
if
(
retval
==
-
ENOIOCTLCMD
)
retval
=
-
ENOTTY
;
module_put
(
driver
->
owner
);
module_put
(
driver
->
owner
);
}
}
if
(
retval
==
-
ENOIOCTLCMD
)
retval
=
-
ENOTTY
;
}
}
/* cleanup and return */
/* cleanup and return */
...
...
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