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
da73843f
Commit
da73843f
authored
Dec 25, 2002
by
Greg Kroah-Hartman
Committed by
Vojtech Pavlik
Dec 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: convert pl2303 driver to use dev_err() and dev_info() macros
parent
77d062a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.c
+10
-10
No files found.
drivers/usb/serial/pl2303.c
View file @
da73843f
...
...
@@ -204,7 +204,7 @@ static int pl2303_write (struct usb_serial_port *port, int from_user, const uns
port
->
write_urb
->
dev
=
port
->
serial
->
dev
;
result
=
usb_submit_urb
(
port
->
write_urb
,
GFP_ATOMIC
);
if
(
result
)
err
(
"%s - failed submitting write urb, error %d
"
,
__FUNCTION__
,
result
);
dev_err
(
port
->
dev
,
"%s - failed submitting write urb, error %d
\n
"
,
__FUNCTION__
,
result
);
else
result
=
count
;
...
...
@@ -247,7 +247,7 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
buf
=
kmalloc
(
7
,
GFP_KERNEL
);
if
(
!
buf
)
{
err
(
"%s - out of memory.
"
,
__FUNCTION__
);
dev_err
(
port
->
dev
,
"%s - out of memory.
\n
"
,
__FUNCTION__
);
return
;
}
memset
(
buf
,
0x00
,
0x07
);
...
...
@@ -295,7 +295,7 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
case
B230400
:
baud
=
230400
;
break
;
case
B460800
:
baud
=
460800
;
break
;
default:
err
(
"pl2303 driver does not support the baudrate requested (fix it)
"
);
dev_err
(
port
->
dev
,
"pl2303 driver does not support the baudrate requested (fix it)
\n
"
);
break
;
}
dbg
(
"%s - baud = %d"
,
__FUNCTION__
,
baud
);
...
...
@@ -413,7 +413,7 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
port
->
read_urb
->
dev
=
serial
->
dev
;
result
=
usb_submit_urb
(
port
->
read_urb
,
GFP_KERNEL
);
if
(
result
)
{
err
(
"%s - failed submitting read urb, error %d
"
,
__FUNCTION__
,
result
);
dev_err
(
port
->
dev
,
"%s - failed submitting read urb, error %d
\n
"
,
__FUNCTION__
,
result
);
pl2303_close
(
port
,
NULL
);
return
-
EPROTO
;
}
...
...
@@ -422,7 +422,7 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
port
->
interrupt_in_urb
->
dev
=
serial
->
dev
;
result
=
usb_submit_urb
(
port
->
interrupt_in_urb
,
GFP_KERNEL
);
if
(
result
)
{
err
(
"%s - failed submitting interrupt urb, error %d
"
,
__FUNCTION__
,
result
);
dev_err
(
port
->
dev
,
"%s - failed submitting interrupt urb, error %d
\n
"
,
__FUNCTION__
,
result
);
pl2303_close
(
port
,
NULL
);
return
-
EPROTO
;
}
...
...
@@ -621,7 +621,7 @@ static void pl2303_read_int_callback (struct urb *urb, struct pt_regs *regs)
exit:
status
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
);
if
(
status
)
err
(
"%s - usb_submit_urb failed with result %d
"
,
dev_err
(
urb
->
dev
->
dev
,
"%s - usb_submit_urb failed with result %d
\n
"
,
__FUNCTION__
,
status
);
}
...
...
@@ -658,7 +658,7 @@ static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
urb
->
dev
=
serial
->
dev
;
result
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
);
if
(
result
)
err
(
"%s - failed resubmitting read urb, error %d
"
,
__FUNCTION__
,
result
);
dev_err
(
urb
->
dev
->
dev
,
"%s - failed resubmitting read urb, error %d
\n
"
,
__FUNCTION__
,
result
);
return
;
}
dbg
(
"%s - unable to handle the error, exiting."
,
__FUNCTION__
);
...
...
@@ -683,7 +683,7 @@ static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
urb
->
dev
=
serial
->
dev
;
result
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
);
if
(
result
)
err
(
"%s - failed resubmitting read urb, error %d
"
,
__FUNCTION__
,
result
);
dev_err
(
urb
->
dev
->
dev
,
"%s - failed resubmitting read urb, error %d
\n
"
,
__FUNCTION__
,
result
);
}
return
;
...
...
@@ -712,7 +712,7 @@ static void pl2303_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
port
->
write_urb
->
dev
=
port
->
serial
->
dev
;
result
=
usb_submit_urb
(
port
->
write_urb
,
GFP_ATOMIC
);
if
(
result
)
err
(
"%s - failed resubmitting write urb, error %d
"
,
__FUNCTION__
,
result
);
dev_err
(
urb
->
dev
->
dev
,
"%s - failed resubmitting write urb, error %d
\n
"
,
__FUNCTION__
,
result
);
return
;
}
...
...
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