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
b6c62212
Commit
b6c62212
authored
May 30, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Plain Diff
Merge kroah.com:/home/greg/linux/BK/bleed-2.5
into kroah.com:/home/greg/linux/BK/gregkh-2.5
parents
4df914aa
0d5343f9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
drivers/usb/misc/rio500.c
drivers/usb/misc/rio500.c
+10
-6
No files found.
drivers/usb/misc/rio500.c
View file @
b6c62212
...
...
@@ -23,6 +23,9 @@
*
* Based upon mouse.c (Brad Keryan) and printer.c (Michael Gee).
*
* Changelog:
* 30/05/2003 replaced lock/unlock kernel with up/down
* Daniele Bellucci bellucda@tiscali.it
* */
#include <linux/module.h>
...
...
@@ -75,17 +78,17 @@ static int open_rio(struct inode *inode, struct file *file)
{
struct
rio_usb_data
*
rio
=
&
rio_instance
;
lock_kernel
(
);
down
(
&
(
rio
->
lock
)
);
if
(
rio
->
isopen
||
!
rio
->
present
)
{
u
nlock_kernel
(
);
u
p
(
&
(
rio
->
lock
)
);
return
-
EBUSY
;
}
rio
->
isopen
=
1
;
init_waitqueue_head
(
&
rio
->
wait_q
);
u
nlock_kernel
(
);
u
p
(
&
(
rio
->
lock
)
);
info
(
"Rio opened."
);
...
...
@@ -460,7 +463,6 @@ static int probe_rio(struct usb_interface *intf,
return
-
ENOMEM
;
}
rio
->
present
=
1
;
rio
->
rio_dev
=
dev
;
if
(
!
(
rio
->
obuf
=
(
char
*
)
kmalloc
(
OBUF_SIZE
,
GFP_KERNEL
)))
{
...
...
@@ -481,6 +483,8 @@ static int probe_rio(struct usb_interface *intf,
init_MUTEX
(
&
(
rio
->
lock
));
usb_set_intfdata
(
intf
,
rio
);
rio
->
present
=
1
;
return
0
;
}
...
...
@@ -525,7 +529,7 @@ static struct usb_driver rio_driver = {
.
id_table
=
rio_table
,
};
in
t
usb_rio_init
(
void
)
static
int
__ini
t
usb_rio_init
(
void
)
{
if
(
usb_register
(
&
rio_driver
)
<
0
)
return
-
1
;
...
...
@@ -536,7 +540,7 @@ int usb_rio_init(void)
}
void
usb_rio_cleanup
(
void
)
static
void
__exit
usb_rio_cleanup
(
void
)
{
struct
rio_usb_data
*
rio
=
&
rio_instance
;
...
...
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