aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/omninet.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-03 19:08:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:55 -0400
commit441b62c1edb986827154768d89bbac0ba779984f (patch)
tree13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb/serial/omninet.c
parent14722ef4acedc643f0b78b7165ceff2d300dae4d (diff)
USB: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/omninet.c')
-rw-r--r--drivers/usb/serial/omninet.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 050511ff2b17..1b041c59aab2 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -150,7 +150,7 @@ static int omninet_attach (struct usb_serial *serial)
150 150
151 od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL ); 151 od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
152 if( !od ) { 152 if( !od ) {
153 err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct omninet_data)); 153 err("%s- kmalloc(%Zd) failed.", __func__, sizeof(struct omninet_data));
154 return -ENOMEM; 154 return -ENOMEM;
155 } 155 }
156 usb_set_serial_port_data(port, od); 156 usb_set_serial_port_data(port, od);
@@ -163,7 +163,7 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
163 struct usb_serial_port *wport; 163 struct usb_serial_port *wport;
164 int result = 0; 164 int result = 0;
165 165
166 dbg("%s - port %d", __FUNCTION__, port->number); 166 dbg("%s - port %d", __func__, port->number);
167 167
168 wport = serial->port[1]; 168 wport = serial->port[1];
169 wport->tty = port->tty; 169 wport->tty = port->tty;
@@ -175,7 +175,7 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
175 omninet_read_bulk_callback, port); 175 omninet_read_bulk_callback, port);
176 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 176 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
177 if (result) { 177 if (result) {
178 err("%s - failed submitting read urb, error %d", __FUNCTION__, result); 178 err("%s - failed submitting read urb, error %d", __func__, result);
179 } 179 }
180 180
181 return result; 181 return result;
@@ -183,7 +183,7 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
183 183
184static void omninet_close (struct usb_serial_port *port, struct file * filp) 184static void omninet_close (struct usb_serial_port *port, struct file * filp)
185{ 185{
186 dbg("%s - port %d", __FUNCTION__, port->number); 186 dbg("%s - port %d", __func__, port->number);
187 usb_kill_urb(port->read_urb); 187 usb_kill_urb(port->read_urb);
188} 188}
189 189
@@ -201,11 +201,11 @@ static void omninet_read_bulk_callback (struct urb *urb)
201 int i; 201 int i;
202 int result; 202 int result;
203 203
204 dbg("%s - port %d", __FUNCTION__, port->number); 204 dbg("%s - port %d", __func__, port->number);
205 205
206 if (status) { 206 if (status) {
207 dbg("%s - nonzero read bulk status received: %d", 207 dbg("%s - nonzero read bulk status received: %d",
208 __FUNCTION__, status); 208 __func__, status);
209 return; 209 return;
210 } 210 }
211 211
@@ -233,7 +233,7 @@ static void omninet_read_bulk_callback (struct urb *urb)
233 omninet_read_bulk_callback, port); 233 omninet_read_bulk_callback, port);
234 result = usb_submit_urb(urb, GFP_ATOMIC); 234 result = usb_submit_urb(urb, GFP_ATOMIC);
235 if (result) 235 if (result)
236 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 236 err("%s - failed resubmitting read urb, error %d", __func__, result);
237 237
238 return; 238 return;
239} 239}
@@ -248,17 +248,17 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
248 248
249 int result; 249 int result;
250 250
251 dbg("%s - port %d", __FUNCTION__, port->number); 251 dbg("%s - port %d", __func__, port->number);
252 252
253 if (count == 0) { 253 if (count == 0) {
254 dbg("%s - write request of 0 bytes", __FUNCTION__); 254 dbg("%s - write request of 0 bytes", __func__);
255 return (0); 255 return (0);
256 } 256 }
257 257
258 spin_lock_bh(&wport->lock); 258 spin_lock_bh(&wport->lock);
259 if (wport->write_urb_busy) { 259 if (wport->write_urb_busy) {
260 spin_unlock_bh(&wport->lock); 260 spin_unlock_bh(&wport->lock);
261 dbg("%s - already writing", __FUNCTION__); 261 dbg("%s - already writing", __func__);
262 return 0; 262 return 0;
263 } 263 }
264 wport->write_urb_busy = 1; 264 wport->write_urb_busy = 1;
@@ -268,7 +268,7 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
268 268
269 memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count); 269 memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count);
270 270
271 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, wport->write_urb->transfer_buffer); 271 usb_serial_debug_data(debug, &port->dev, __func__, count, wport->write_urb->transfer_buffer);
272 272
273 header->oh_seq = od->od_outseq++; 273 header->oh_seq = od->od_outseq++;
274 header->oh_len = count; 274 header->oh_len = count;
@@ -282,7 +282,7 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
282 result = usb_submit_urb(wport->write_urb, GFP_ATOMIC); 282 result = usb_submit_urb(wport->write_urb, GFP_ATOMIC);
283 if (result) { 283 if (result) {
284 wport->write_urb_busy = 0; 284 wport->write_urb_busy = 0;
285 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 285 err("%s - failed submitting write urb, error %d", __func__, result);
286 } else 286 } else
287 result = count; 287 result = count;
288 288
@@ -300,7 +300,7 @@ static int omninet_write_room (struct usb_serial_port *port)
300 if (wport->write_urb_busy) 300 if (wport->write_urb_busy)
301 room = wport->bulk_out_size - OMNINET_HEADERLEN; 301 room = wport->bulk_out_size - OMNINET_HEADERLEN;
302 302
303 dbg("%s - returns %d", __FUNCTION__, room); 303 dbg("%s - returns %d", __func__, room);
304 304
305 return (room); 305 return (room);
306} 306}
@@ -311,12 +311,12 @@ static void omninet_write_bulk_callback (struct urb *urb)
311 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 311 struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
312 int status = urb->status; 312 int status = urb->status;
313 313
314 dbg("%s - port %0x\n", __FUNCTION__, port->number); 314 dbg("%s - port %0x\n", __func__, port->number);
315 315
316 port->write_urb_busy = 0; 316 port->write_urb_busy = 0;
317 if (status) { 317 if (status) {
318 dbg("%s - nonzero write bulk status received: %d", 318 dbg("%s - nonzero write bulk status received: %d",
319 __FUNCTION__, status); 319 __func__, status);
320 return; 320 return;
321 } 321 }
322 322
@@ -328,7 +328,7 @@ static void omninet_shutdown (struct usb_serial *serial)
328{ 328{
329 struct usb_serial_port *wport = serial->port[1]; 329 struct usb_serial_port *wport = serial->port[1];
330 struct usb_serial_port *port = serial->port[0]; 330 struct usb_serial_port *port = serial->port[0];
331 dbg ("%s", __FUNCTION__); 331 dbg ("%s", __func__);
332 332
333 usb_kill_urb(wport->write_urb); 333 usb_kill_urb(wport->write_urb);
334 kfree(usb_get_serial_port_data(port)); 334 kfree(usb_get_serial_port_data(port));