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
0d5343f9
Commit
0d5343f9
authored
May 29, 2003
by
Daniele Bellucci
Committed by
Greg Kroah-Hartman
May 29, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: replaced BKL in rio500.c
parent
0bfd72a7
Changes
1
Hide 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 @
0d5343f9
...
@@ -23,6 +23,9 @@
...
@@ -23,6 +23,9 @@
*
*
* Based upon mouse.c (Brad Keryan) and printer.c (Michael Gee).
* 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>
#include <linux/module.h>
...
@@ -75,17 +78,17 @@ static int open_rio(struct inode *inode, struct file *file)
...
@@ -75,17 +78,17 @@ static int open_rio(struct inode *inode, struct file *file)
{
{
struct
rio_usb_data
*
rio
=
&
rio_instance
;
struct
rio_usb_data
*
rio
=
&
rio_instance
;
lock_kernel
(
);
down
(
&
(
rio
->
lock
)
);
if
(
rio
->
isopen
||
!
rio
->
present
)
{
if
(
rio
->
isopen
||
!
rio
->
present
)
{
u
nlock_kernel
(
);
u
p
(
&
(
rio
->
lock
)
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
rio
->
isopen
=
1
;
rio
->
isopen
=
1
;
init_waitqueue_head
(
&
rio
->
wait_q
);
init_waitqueue_head
(
&
rio
->
wait_q
);
u
nlock_kernel
(
);
u
p
(
&
(
rio
->
lock
)
);
info
(
"Rio opened."
);
info
(
"Rio opened."
);
...
@@ -460,7 +463,6 @@ static int probe_rio(struct usb_interface *intf,
...
@@ -460,7 +463,6 @@ static int probe_rio(struct usb_interface *intf,
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
rio
->
present
=
1
;
rio
->
rio_dev
=
dev
;
rio
->
rio_dev
=
dev
;
if
(
!
(
rio
->
obuf
=
(
char
*
)
kmalloc
(
OBUF_SIZE
,
GFP_KERNEL
)))
{
if
(
!
(
rio
->
obuf
=
(
char
*
)
kmalloc
(
OBUF_SIZE
,
GFP_KERNEL
)))
{
...
@@ -481,6 +483,8 @@ static int probe_rio(struct usb_interface *intf,
...
@@ -481,6 +483,8 @@ static int probe_rio(struct usb_interface *intf,
init_MUTEX
(
&
(
rio
->
lock
));
init_MUTEX
(
&
(
rio
->
lock
));
usb_set_intfdata
(
intf
,
rio
);
usb_set_intfdata
(
intf
,
rio
);
rio
->
present
=
1
;
return
0
;
return
0
;
}
}
...
@@ -525,7 +529,7 @@ static struct usb_driver rio_driver = {
...
@@ -525,7 +529,7 @@ static struct usb_driver rio_driver = {
.
id_table
=
rio_table
,
.
id_table
=
rio_table
,
};
};
in
t
usb_rio_init
(
void
)
static
int
__ini
t
usb_rio_init
(
void
)
{
{
if
(
usb_register
(
&
rio_driver
)
<
0
)
if
(
usb_register
(
&
rio_driver
)
<
0
)
return
-
1
;
return
-
1
;
...
@@ -536,7 +540,7 @@ int usb_rio_init(void)
...
@@ -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
;
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