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
2a49c2e8
Commit
2a49c2e8
authored
Jan 06, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: removed MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT from driver that do not need it.
parent
7a4e572b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
24 deletions
+6
-24
drivers/usb/misc/auerswald.c
drivers/usb/misc/auerswald.c
+0
-7
drivers/usb/misc/brlvger.c
drivers/usb/misc/brlvger.c
+5
-13
drivers/usb/misc/rio500.c
drivers/usb/misc/rio500.c
+1
-4
No files found.
drivers/usb/misc/auerswald.c
View file @
2a49c2e8
...
...
@@ -1946,9 +1946,6 @@ static int auerswald_probe (struct usb_interface *intf,
if
(
intf
->
altsetting
->
desc
.
bInterfaceNumber
!=
0
)
return
-
ENODEV
;
/* prevent module unloading while sleeping */
MOD_INC_USE_COUNT
;
/* allocate memory for our device and intialize it */
cp
=
kmalloc
(
sizeof
(
auerswald_t
),
GFP_KERNEL
);
if
(
cp
==
NULL
)
{
...
...
@@ -2066,7 +2063,6 @@ static int auerswald_probe (struct usb_interface *intf,
/* Error exit: clean up the memory */
pfail:
auerswald_delete
(
cp
);
MOD_DEC_USE_COUNT
;
return
-
EIO
;
}
...
...
@@ -2138,9 +2134,6 @@ static void auerswald_disconnect (struct usb_interface *intf)
if
(
scp
)
scp
->
disconnect
(
scp
);
}
}
/* The device releases this module */
MOD_DEC_USE_COUNT
;
}
/* Descriptor for the devices which are served by this driver.
...
...
drivers/usb/misc/brlvger.c
View file @
2a49c2e8
...
...
@@ -467,8 +467,6 @@ brlvger_open(struct inode *inode, struct file *file)
n
=
devnum
-
BRLVGER_MINOR
;
MOD_INC_USE_COUNT
;
do
{
down
(
&
disconnect_sem
);
priv
=
display_table
[
n
];
...
...
@@ -478,7 +476,6 @@ brlvger_open(struct inode *inode, struct file *file)
if
(
file
->
f_flags
&
O_NONBLOCK
)
{
dbg3
(
"Failing non-blocking open: "
"device %d not connected"
,
n
);
MOD_DEC_USE_COUNT
;
return
-
EAGAIN
;
}
/* Blocking open. One global wait queue will
...
...
@@ -490,7 +487,6 @@ brlvger_open(struct inode *inode, struct file *file)
!=
NULL
);
if
(
ret
)
{
dbg2
(
"Interrupted wait for device %d"
,
n
);
MOD_DEC_USE_COUNT
;
return
ret
;
}
}
...
...
@@ -504,7 +500,7 @@ brlvger_open(struct inode *inode, struct file *file)
/* Only one process can open each device, no sharing. */
ret
=
-
EBUSY
;
if
(
priv
->
opened
)
goto
error
;
goto
out
;
dbg
(
"Opening display %d"
,
priv
->
subminor
);
...
...
@@ -512,7 +508,7 @@ brlvger_open(struct inode *inode, struct file *file)
priv
->
intr_urb
=
usb_alloc_urb
(
0
,
GFP_KERNEL
);
if
(
!
priv
->
intr_urb
)
{
err
(
"Unable to allocate URB"
);
goto
error
;
goto
out
;
}
usb_fill_int_urb
(
priv
->
intr_urb
,
priv
->
dev
,
usb_rcvintpipe
(
priv
->
dev
,
...
...
@@ -521,19 +517,19 @@ brlvger_open(struct inode *inode, struct file *file)
intr_callback
,
priv
,
priv
->
in_interrupt
->
bInterval
);
if
((
ret
=
usb_submit_urb
(
priv
->
intr_urb
,
GFP_KERNEL
))
<
0
){
err
(
"Error %d while submitting URB"
,
ret
);
goto
error
;
goto
out
;
}
/* Set voltage */
if
(
brlvger_set_display_voltage
(
priv
,
raw_voltage
)
<
0
)
{
err
(
"Unable to set voltage"
);
goto
error
;
goto
out
;
}
/* Turn display on */
if
((
ret
=
brlvger_set_display_on_off
(
priv
,
1
))
<
0
)
{
err
(
"Error %d while turning display on"
,
ret
);
goto
error
;
goto
out
;
}
/* Mark as opened, so disconnect cannot free priv. */
...
...
@@ -544,8 +540,6 @@ brlvger_open(struct inode *inode, struct file *file)
ret
=
0
;
goto
out
;
error:
MOD_DEC_USE_COUNT
;
out:
up
(
&
priv
->
open_sem
);
return
ret
;
...
...
@@ -577,8 +571,6 @@ brlvger_release(struct inode *inode, struct file *file)
up
(
&
priv
->
open_sem
);
}
MOD_DEC_USE_COUNT
;
return
0
;
}
...
...
drivers/usb/misc/rio500.c
View file @
2a49c2e8
...
...
@@ -94,8 +94,6 @@ static int open_rio(struct inode *inode, struct file *file)
init_waitqueue_head
(
&
rio
->
wait_q
);
MOD_INC_USE_COUNT
;
unlock_kernel
();
info
(
"Rio opened."
);
...
...
@@ -109,8 +107,6 @@ static int close_rio(struct inode *inode, struct file *file)
rio
->
isopen
=
0
;
MOD_DEC_USE_COUNT
;
info
(
"Rio closed."
);
return
0
;
}
...
...
@@ -443,6 +439,7 @@ read_rio(struct file *file, char *buffer, size_t count, loff_t * ppos)
static
struct
file_operations
usb_rio_fops
=
{
.
owner
=
THIS_MODULE
,
.
read
=
read_rio
,
.
write
=
write_rio
,
.
ioctl
=
ioctl_rio
,
...
...
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