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
760c712e
Commit
760c712e
authored
Feb 21, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB visor: cleanup the close() logic
parent
f43da603
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
drivers/usb/serial/visor.c
drivers/usb/serial/visor.c
+15
-20
No files found.
drivers/usb/serial/visor.c
View file @
760c712e
...
...
@@ -374,14 +374,14 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
if
(
!
serial
)
return
;
if
(
serial
->
dev
)
{
/* only send a shutdown message if the
* device is still here */
/* shutdown our urbs */
usb_unlink_urb
(
port
->
read_urb
);
if
(
port
->
interrupt_in_urb
)
usb_unlink_urb
(
port
->
interrupt_in_urb
);
/* Try to send shutdown message, if the device is gone, this will just fail. */
transfer_buffer
=
kmalloc
(
0x12
,
GFP_KERNEL
);
if
(
!
transfer_buffer
)
{
dev_err
(
&
port
->
dev
,
"%s - kmalloc(%d) failed.
\n
"
,
__FUNCTION__
,
0x12
);
}
else
{
/* send a shutdown message to the device */
if
(
transfer_buffer
)
{
usb_control_msg
(
serial
->
dev
,
usb_rcvctrlpipe
(
serial
->
dev
,
0
),
VISOR_CLOSE_NOTIFICATION
,
0xc2
,
...
...
@@ -389,12 +389,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
transfer_buffer
,
0x12
,
300
);
kfree
(
transfer_buffer
);
}
/* shutdown our bulk read */
usb_unlink_urb
(
port
->
read_urb
);
if
(
port
->
interrupt_in_urb
)
usb_unlink_urb
(
port
->
interrupt_in_urb
);
}
/* Uncomment the following line if you want to see some statistics in your syslog */
/* dev_info (&port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
}
...
...
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