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
0925f212
Commit
0925f212
authored
Aug 28, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: empeg driver: fixed __FUNCTION__ usages.
parent
e8b4e61a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
27 deletions
+28
-27
drivers/usb/serial/empeg.c
drivers/usb/serial/empeg.c
+28
-27
No files found.
drivers/usb/serial/empeg.c
View file @
0925f212
...
@@ -152,7 +152,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
...
@@ -152,7 +152,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
return
-
ENODEV
;
return
-
ENODEV
;
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
/* Force default termio settings */
/* Force default termio settings */
empeg_set_termios
(
port
,
NULL
)
;
empeg_set_termios
(
port
,
NULL
)
;
...
@@ -174,7 +174,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
...
@@ -174,7 +174,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
result
=
usb_submit_urb
(
port
->
read_urb
,
GFP_KERNEL
);
result
=
usb_submit_urb
(
port
->
read_urb
,
GFP_KERNEL
);
if
(
result
)
if
(
result
)
err
(
__FUNCTION__
" - failed submitting read urb, error %d"
,
result
);
err
(
"%s - failed submitting read urb, error %d"
,
__FUNCTION__
,
result
);
return
result
;
return
result
;
}
}
...
@@ -187,7 +187,7 @@ static void empeg_close (struct usb_serial_port *port, struct file * filp)
...
@@ -187,7 +187,7 @@ static void empeg_close (struct usb_serial_port *port, struct file * filp)
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
return
;
return
;
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
serial
=
get_usb_serial
(
port
,
__FUNCTION__
);
serial
=
get_usb_serial
(
port
,
__FUNCTION__
);
if
(
!
serial
)
if
(
!
serial
)
...
@@ -213,7 +213,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
...
@@ -213,7 +213,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
int
bytes_sent
=
0
;
int
bytes_sent
=
0
;
int
transfer_size
;
int
transfer_size
;
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
usb_serial_debug_data
(
__FILE__
,
__FUNCTION__
,
count
,
buf
);
usb_serial_debug_data
(
__FILE__
,
__FUNCTION__
,
count
,
buf
);
...
@@ -234,14 +234,14 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
...
@@ -234,14 +234,14 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
spin_unlock_irqrestore
(
&
write_urb_pool_lock
,
flags
);
spin_unlock_irqrestore
(
&
write_urb_pool_lock
,
flags
);
if
(
urb
==
NULL
)
{
if
(
urb
==
NULL
)
{
dbg
(
__FUNCTION__
" - no more free urbs"
);
dbg
(
"%s - no more free urbs"
,
__FUNCTION__
);
goto
exit
;
goto
exit
;
}
}
if
(
urb
->
transfer_buffer
==
NULL
)
{
if
(
urb
->
transfer_buffer
==
NULL
)
{
urb
->
transfer_buffer
=
kmalloc
(
URB_TRANSFER_BUFFER_SIZE
,
GFP_ATOMIC
);
urb
->
transfer_buffer
=
kmalloc
(
URB_TRANSFER_BUFFER_SIZE
,
GFP_ATOMIC
);
if
(
urb
->
transfer_buffer
==
NULL
)
{
if
(
urb
->
transfer_buffer
==
NULL
)
{
err
(
__FUNCTION__
" no more kernel memory..."
);
err
(
"%s no more kernel memory..."
,
__FUNCTION__
);
goto
exit
;
goto
exit
;
}
}
}
}
...
@@ -271,7 +271,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
...
@@ -271,7 +271,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
/* send it down the pipe */
/* send it down the pipe */
status
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
);
status
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
);
if
(
status
)
{
if
(
status
)
{
err
(
__FUNCTION__
" - usb_submit_urb(write bulk) failed with status = %d"
,
status
);
err
(
"%s - usb_submit_urb(write bulk) failed with status = %d"
,
__FUNCTION__
,
status
);
bytes_sent
=
status
;
bytes_sent
=
status
;
break
;
break
;
}
}
...
@@ -295,7 +295,7 @@ static int empeg_write_room (struct usb_serial_port *port)
...
@@ -295,7 +295,7 @@ static int empeg_write_room (struct usb_serial_port *port)
int
i
;
int
i
;
int
room
=
0
;
int
room
=
0
;
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
spin_lock_irqsave
(
&
write_urb_pool_lock
,
flags
);
spin_lock_irqsave
(
&
write_urb_pool_lock
,
flags
);
...
@@ -308,7 +308,7 @@ static int empeg_write_room (struct usb_serial_port *port)
...
@@ -308,7 +308,7 @@ static int empeg_write_room (struct usb_serial_port *port)
spin_unlock_irqrestore
(
&
write_urb_pool_lock
,
flags
);
spin_unlock_irqrestore
(
&
write_urb_pool_lock
,
flags
);
dbg
(
__FUNCTION__
" - returns %d"
,
room
);
dbg
(
"%s - returns %d"
,
__FUNCTION__
,
room
);
return
(
room
);
return
(
room
);
...
@@ -321,7 +321,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
...
@@ -321,7 +321,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
int
i
;
int
i
;
int
chars
=
0
;
int
chars
=
0
;
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
spin_lock_irqsave
(
&
write_urb_pool_lock
,
flags
);
spin_lock_irqsave
(
&
write_urb_pool_lock
,
flags
);
...
@@ -334,7 +334,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
...
@@ -334,7 +334,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
spin_unlock_irqrestore
(
&
write_urb_pool_lock
,
flags
);
spin_unlock_irqrestore
(
&
write_urb_pool_lock
,
flags
);
dbg
(
__FUNCTION__
" - returns %d"
,
chars
);
dbg
(
"%s - returns %d"
,
__FUNCTION__
,
chars
);
return
(
chars
);
return
(
chars
);
...
@@ -348,10 +348,10 @@ static void empeg_write_bulk_callback (struct urb *urb)
...
@@ -348,10 +348,10 @@ static void empeg_write_bulk_callback (struct urb *urb)
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
return
;
return
;
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
if
(
urb
->
status
)
{
if
(
urb
->
status
)
{
dbg
(
__FUNCTION__
" - nonzero write bulk status received: %d"
,
urb
->
status
);
dbg
(
"%s - nonzero write bulk status received: %d"
,
__FUNCTION__
,
urb
->
status
);
return
;
return
;
}
}
...
@@ -375,15 +375,15 @@ static void empeg_read_bulk_callback (struct urb *urb)
...
@@ -375,15 +375,15 @@ static void empeg_read_bulk_callback (struct urb *urb)
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
if
(
port_paranoia_check
(
port
,
__FUNCTION__
))
return
;
return
;
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
if
(
!
serial
)
{
if
(
!
serial
)
{
dbg
(
__FUNCTION__
" - bad serial pointer, exiting"
);
dbg
(
"%s - bad serial pointer, exiting"
,
__FUNCTION__
);
return
;
return
;
}
}
if
(
urb
->
status
)
{
if
(
urb
->
status
)
{
dbg
(
__FUNCTION__
" - nonzero read bulk status received: %d"
,
urb
->
status
);
dbg
(
"%s - nonzero read bulk status received: %d"
,
__FUNCTION__
,
urb
->
status
);
return
;
return
;
}
}
...
@@ -423,7 +423,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
...
@@ -423,7 +423,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
result
=
usb_submit_urb
(
port
->
read_urb
,
GFP_ATOMIC
);
result
=
usb_submit_urb
(
port
->
read_urb
,
GFP_ATOMIC
);
if
(
result
)
if
(
result
)
err
(
__FUNCTION__
" - failed resubmitting read urb, error %d"
,
result
);
err
(
"%s - failed resubmitting read urb, error %d"
,
__FUNCTION__
,
result
);
return
;
return
;
...
@@ -432,7 +432,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
...
@@ -432,7 +432,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
static
void
empeg_throttle
(
struct
usb_serial_port
*
port
)
static
void
empeg_throttle
(
struct
usb_serial_port
*
port
)
{
{
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
usb_unlink_urb
(
port
->
read_urb
);
usb_unlink_urb
(
port
->
read_urb
);
}
}
...
@@ -441,14 +441,14 @@ static void empeg_unthrottle (struct usb_serial_port *port)
...
@@ -441,14 +441,14 @@ static void empeg_unthrottle (struct usb_serial_port *port)
{
{
int
result
;
int
result
;
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
port
->
read_urb
->
dev
=
port
->
serial
->
dev
;
port
->
read_urb
->
dev
=
port
->
serial
->
dev
;
result
=
usb_submit_urb
(
port
->
read_urb
,
GFP_ATOMIC
);
result
=
usb_submit_urb
(
port
->
read_urb
,
GFP_ATOMIC
);
if
(
result
)
if
(
result
)
err
(
__FUNCTION__
" - failed submitting read urb, error %d"
,
result
);
err
(
"%s - failed submitting read urb, error %d"
,
__FUNCTION__
,
result
);
return
;
return
;
}
}
...
@@ -457,9 +457,9 @@ static void empeg_unthrottle (struct usb_serial_port *port)
...
@@ -457,9 +457,9 @@ static void empeg_unthrottle (struct usb_serial_port *port)
static
int
empeg_startup
(
struct
usb_serial
*
serial
)
static
int
empeg_startup
(
struct
usb_serial
*
serial
)
{
{
dbg
(
__FUNCTION__
);
dbg
(
"%s"
,
__FUNCTION__
);
dbg
(
__FUNCTION__
" - Set config to 1"
);
dbg
(
"%s - Set config to 1"
,
__FUNCTION__
);
usb_set_configuration
(
serial
->
dev
,
1
);
usb_set_configuration
(
serial
->
dev
,
1
);
/* continue on with initialization */
/* continue on with initialization */
...
@@ -470,13 +470,13 @@ static int empeg_startup (struct usb_serial *serial)
...
@@ -470,13 +470,13 @@ static int empeg_startup (struct usb_serial *serial)
static
void
empeg_shutdown
(
struct
usb_serial
*
serial
)
static
void
empeg_shutdown
(
struct
usb_serial
*
serial
)
{
{
dbg
(
__FUNCTION__
);
dbg
(
"%s"
,
__FUNCTION__
);
}
}
static
int
empeg_ioctl
(
struct
usb_serial_port
*
port
,
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
static
int
empeg_ioctl
(
struct
usb_serial_port
*
port
,
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
dbg
(
__FUNCTION__
" - port %d, cmd 0x%.4x"
,
port
->
number
,
cmd
);
dbg
(
"%s - port %d, cmd 0x%.4x"
,
__FUNCTION__
,
port
->
number
,
cmd
);
return
-
ENOIOCTLCMD
;
return
-
ENOIOCTLCMD
;
}
}
...
@@ -485,10 +485,10 @@ static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsign
...
@@ -485,10 +485,10 @@ static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsign
static
void
empeg_set_termios
(
struct
usb_serial_port
*
port
,
struct
termios
*
old_termios
)
static
void
empeg_set_termios
(
struct
usb_serial_port
*
port
,
struct
termios
*
old_termios
)
{
{
dbg
(
__FUNCTION__
" - port %d"
,
port
->
number
);
dbg
(
"%s - port %d"
,
__FUNCTION__
,
port
->
number
);
if
((
!
port
->
tty
)
||
(
!
port
->
tty
->
termios
))
{
if
((
!
port
->
tty
)
||
(
!
port
->
tty
->
termios
))
{
dbg
(
__FUNCTION__
" - no tty structures"
);
dbg
(
"%s - no tty structures"
,
__FUNCTION__
);
return
;
return
;
}
}
...
@@ -565,7 +565,8 @@ static int __init empeg_init (void)
...
@@ -565,7 +565,8 @@ static int __init empeg_init (void)
urb
->
transfer_buffer
=
NULL
;
urb
->
transfer_buffer
=
NULL
;
urb
->
transfer_buffer
=
kmalloc
(
URB_TRANSFER_BUFFER_SIZE
,
GFP_KERNEL
);
urb
->
transfer_buffer
=
kmalloc
(
URB_TRANSFER_BUFFER_SIZE
,
GFP_KERNEL
);
if
(
!
urb
->
transfer_buffer
)
{
if
(
!
urb
->
transfer_buffer
)
{
err
(
__FUNCTION__
" - out of memory for urb buffers."
);
err
(
"%s - out of memory for urb buffers."
,
__FUNCTION__
);
continue
;
continue
;
}
}
}
}
...
...
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