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
439683c2
Commit
439683c2
authored
Nov 30, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: get previous module patch to even build properly...
parent
60bd3b5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
drivers/usb/core/devio.c
drivers/usb/core/devio.c
+1
-1
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+6
-7
No files found.
drivers/usb/core/devio.c
View file @
439683c2
...
@@ -1129,7 +1129,7 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
...
@@ -1129,7 +1129,7 @@ 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
);
put_module
(
driver
->
owner
);
module_put
(
driver
->
owner
);
}
}
if
(
retval
==
-
ENOIOCTLCMD
)
if
(
retval
==
-
ENOIOCTLCMD
)
...
...
drivers/usb/core/usb.c
View file @
439683c2
...
@@ -77,15 +77,16 @@ int usb_device_probe(struct device *dev)
...
@@ -77,15 +77,16 @@ int usb_device_probe(struct device *dev)
struct
usb_driver
*
driver
=
to_usb_driver
(
dev
->
driver
);
struct
usb_driver
*
driver
=
to_usb_driver
(
dev
->
driver
);
const
struct
usb_device_id
*
id
;
const
struct
usb_device_id
*
id
;
int
error
=
-
ENODEV
;
int
error
=
-
ENODEV
;
int
m
;
dbg
(
"%s"
,
__FUNCTION__
);
dbg
(
"%s"
,
__FUNCTION__
);
if
(
!
driver
->
probe
)
if
(
!
driver
->
probe
)
return
error
;
return
error
;
if
(
!
try_module_get
(
driver
->
owner
))
if
(
!
try_module_get
(
driver
->
owner
))
{
err
(
"Can't get a module reference for %s"
,
driver
->
name
);
return
error
;
return
error
;
}
id
=
usb_match_id
(
intf
,
driver
->
id_table
);
id
=
usb_match_id
(
intf
,
driver
->
id_table
);
if
(
id
)
{
if
(
id
)
{
...
@@ -97,7 +98,7 @@ int usb_device_probe(struct device *dev)
...
@@ -97,7 +98,7 @@ int usb_device_probe(struct device *dev)
if
(
!
error
)
if
(
!
error
)
intf
->
driver
=
driver
;
intf
->
driver
=
driver
;
put_module
(
driver
->
owner
);
module_put
(
driver
->
owner
);
return
error
;
return
error
;
}
}
...
@@ -106,7 +107,6 @@ int usb_device_remove(struct device *dev)
...
@@ -106,7 +107,6 @@ int usb_device_remove(struct device *dev)
{
{
struct
usb_interface
*
intf
;
struct
usb_interface
*
intf
;
struct
usb_driver
*
driver
;
struct
usb_driver
*
driver
;
int
m
;
intf
=
list_entry
(
dev
,
struct
usb_interface
,
dev
);
intf
=
list_entry
(
dev
,
struct
usb_interface
,
dev
);
driver
=
to_usb_driver
(
dev
->
driver
);
driver
=
to_usb_driver
(
dev
->
driver
);
...
@@ -117,8 +117,7 @@ int usb_device_remove(struct device *dev)
...
@@ -117,8 +117,7 @@ int usb_device_remove(struct device *dev)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
m
=
try_module_get
(
driver
->
owner
);
if
(
!
try_module_get
(
driver
->
owner
))
{
if
(
m
==
0
)
{
// FIXME this happens even when we just rmmod
// FIXME this happens even when we just rmmod
// drivers that aren't in active use...
// drivers that aren't in active use...
err
(
"Dieing driver still bound to device.
\n
"
);
err
(
"Dieing driver still bound to device.
\n
"
);
...
@@ -138,7 +137,7 @@ int usb_device_remove(struct device *dev)
...
@@ -138,7 +137,7 @@ int usb_device_remove(struct device *dev)
usb_driver_release_interface
(
driver
,
intf
);
usb_driver_release_interface
(
driver
,
intf
);
up
(
&
driver
->
serialize
);
up
(
&
driver
->
serialize
);
module_put
(
driver
->
owner
)
module_put
(
driver
->
owner
)
;
return
0
;
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