diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-03-03 19:08:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:55 -0400 |
commit | 441b62c1edb986827154768d89bbac0ba779984f (patch) | |
tree | 13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb/serial/generic.c | |
parent | 14722ef4acedc643f0b78b7165ceff2d300dae4d (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/generic.c')
-rw-r--r-- | drivers/usb/serial/generic.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 5b0952054dec..2078667db4aa 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -118,7 +118,7 @@ int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp) | |||
118 | int result = 0; | 118 | int result = 0; |
119 | unsigned long flags; | 119 | unsigned long flags; |
120 | 120 | ||
121 | dbg("%s - port %d", __FUNCTION__, port->number); | 121 | dbg("%s - port %d", __func__, port->number); |
122 | 122 | ||
123 | /* force low_latency on so that our tty_push actually forces the data through, | 123 | /* force low_latency on so that our tty_push actually forces the data through, |
124 | otherwise it is scheduled, and with high data rates (like with OHCI) data | 124 | otherwise it is scheduled, and with high data rates (like with OHCI) data |
@@ -145,7 +145,7 @@ int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp) | |||
145 | port); | 145 | port); |
146 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); | 146 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); |
147 | if (result) | 147 | if (result) |
148 | dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); | 148 | dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result); |
149 | } | 149 | } |
150 | 150 | ||
151 | return result; | 151 | return result; |
@@ -156,7 +156,7 @@ static void generic_cleanup (struct usb_serial_port *port) | |||
156 | { | 156 | { |
157 | struct usb_serial *serial = port->serial; | 157 | struct usb_serial *serial = port->serial; |
158 | 158 | ||
159 | dbg("%s - port %d", __FUNCTION__, port->number); | 159 | dbg("%s - port %d", __func__, port->number); |
160 | 160 | ||
161 | if (serial->dev) { | 161 | if (serial->dev) { |
162 | /* shutdown any bulk reads that might be going on */ | 162 | /* shutdown any bulk reads that might be going on */ |
@@ -194,7 +194,7 @@ int usb_serial_generic_resume(struct usb_serial *serial) | |||
194 | 194 | ||
195 | void usb_serial_generic_close (struct usb_serial_port *port, struct file * filp) | 195 | void usb_serial_generic_close (struct usb_serial_port *port, struct file * filp) |
196 | { | 196 | { |
197 | dbg("%s - port %d", __FUNCTION__, port->number); | 197 | dbg("%s - port %d", __func__, port->number); |
198 | generic_cleanup (port); | 198 | generic_cleanup (port); |
199 | } | 199 | } |
200 | 200 | ||
@@ -204,10 +204,10 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char * | |||
204 | int result; | 204 | int result; |
205 | unsigned char *data; | 205 | unsigned char *data; |
206 | 206 | ||
207 | dbg("%s - port %d", __FUNCTION__, port->number); | 207 | dbg("%s - port %d", __func__, port->number); |
208 | 208 | ||
209 | if (count == 0) { | 209 | if (count == 0) { |
210 | dbg("%s - write request of 0 bytes", __FUNCTION__); | 210 | dbg("%s - write request of 0 bytes", __func__); |
211 | return (0); | 211 | return (0); |
212 | } | 212 | } |
213 | 213 | ||
@@ -217,7 +217,7 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char * | |||
217 | spin_lock_irqsave(&port->lock, flags); | 217 | spin_lock_irqsave(&port->lock, flags); |
218 | if (port->write_urb_busy) { | 218 | if (port->write_urb_busy) { |
219 | spin_unlock_irqrestore(&port->lock, flags); | 219 | spin_unlock_irqrestore(&port->lock, flags); |
220 | dbg("%s - already writing", __FUNCTION__); | 220 | dbg("%s - already writing", __func__); |
221 | return 0; | 221 | return 0; |
222 | } | 222 | } |
223 | port->write_urb_busy = 1; | 223 | port->write_urb_busy = 1; |
@@ -227,7 +227,7 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char * | |||
227 | 227 | ||
228 | memcpy (port->write_urb->transfer_buffer, buf, count); | 228 | memcpy (port->write_urb->transfer_buffer, buf, count); |
229 | data = port->write_urb->transfer_buffer; | 229 | data = port->write_urb->transfer_buffer; |
230 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, data); | 230 | usb_serial_debug_data(debug, &port->dev, __func__, count, data); |
231 | 231 | ||
232 | /* set up our urb */ | 232 | /* set up our urb */ |
233 | usb_fill_bulk_urb (port->write_urb, serial->dev, | 233 | usb_fill_bulk_urb (port->write_urb, serial->dev, |
@@ -242,7 +242,7 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char * | |||
242 | port->write_urb_busy = 1; | 242 | port->write_urb_busy = 1; |
243 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 243 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
244 | if (result) { | 244 | if (result) { |
245 | dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); | 245 | dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result); |
246 | /* don't have to grab the lock here, as we will retry if != 0 */ | 246 | /* don't have to grab the lock here, as we will retry if != 0 */ |
247 | port->write_urb_busy = 0; | 247 | port->write_urb_busy = 0; |
248 | } else | 248 | } else |
@@ -260,14 +260,14 @@ int usb_serial_generic_write_room (struct usb_serial_port *port) | |||
260 | struct usb_serial *serial = port->serial; | 260 | struct usb_serial *serial = port->serial; |
261 | int room = 0; | 261 | int room = 0; |
262 | 262 | ||
263 | dbg("%s - port %d", __FUNCTION__, port->number); | 263 | dbg("%s - port %d", __func__, port->number); |
264 | 264 | ||
265 | if (serial->num_bulk_out) { | 265 | if (serial->num_bulk_out) { |
266 | if (!(port->write_urb_busy)) | 266 | if (!(port->write_urb_busy)) |
267 | room = port->bulk_out_size; | 267 | room = port->bulk_out_size; |
268 | } | 268 | } |
269 | 269 | ||
270 | dbg("%s - returns %d", __FUNCTION__, room); | 270 | dbg("%s - returns %d", __func__, room); |
271 | return (room); | 271 | return (room); |
272 | } | 272 | } |
273 | 273 | ||
@@ -276,14 +276,14 @@ int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port) | |||
276 | struct usb_serial *serial = port->serial; | 276 | struct usb_serial *serial = port->serial; |
277 | int chars = 0; | 277 | int chars = 0; |
278 | 278 | ||
279 | dbg("%s - port %d", __FUNCTION__, port->number); | 279 | dbg("%s - port %d", __func__, port->number); |
280 | 280 | ||
281 | if (serial->num_bulk_out) { | 281 | if (serial->num_bulk_out) { |
282 | if (port->write_urb_busy) | 282 | if (port->write_urb_busy) |
283 | chars = port->write_urb->transfer_buffer_length; | 283 | chars = port->write_urb->transfer_buffer_length; |
284 | } | 284 | } |
285 | 285 | ||
286 | dbg("%s - returns %d", __FUNCTION__, chars); | 286 | dbg("%s - returns %d", __func__, chars); |
287 | return (chars); | 287 | return (chars); |
288 | } | 288 | } |
289 | 289 | ||
@@ -305,7 +305,7 @@ static void resubmit_read_urb(struct usb_serial_port *port, gfp_t mem_flags) | |||
305 | usb_serial_generic_read_bulk_callback), port); | 305 | usb_serial_generic_read_bulk_callback), port); |
306 | result = usb_submit_urb(urb, mem_flags); | 306 | result = usb_submit_urb(urb, mem_flags); |
307 | if (result) | 307 | if (result) |
308 | dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); | 308 | dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result); |
309 | } | 309 | } |
310 | 310 | ||
311 | /* Push data to tty layer and resubmit the bulk read URB */ | 311 | /* Push data to tty layer and resubmit the bulk read URB */ |
@@ -334,15 +334,15 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb) | |||
334 | int status = urb->status; | 334 | int status = urb->status; |
335 | unsigned long flags; | 335 | unsigned long flags; |
336 | 336 | ||
337 | dbg("%s - port %d", __FUNCTION__, port->number); | 337 | dbg("%s - port %d", __func__, port->number); |
338 | 338 | ||
339 | if (unlikely(status != 0)) { | 339 | if (unlikely(status != 0)) { |
340 | dbg("%s - nonzero read bulk status received: %d", | 340 | dbg("%s - nonzero read bulk status received: %d", |
341 | __FUNCTION__, status); | 341 | __func__, status); |
342 | return; | 342 | return; |
343 | } | 343 | } |
344 | 344 | ||
345 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); | 345 | usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data); |
346 | 346 | ||
347 | /* Throttle the device if requested by tty */ | 347 | /* Throttle the device if requested by tty */ |
348 | spin_lock_irqsave(&port->lock, flags); | 348 | spin_lock_irqsave(&port->lock, flags); |
@@ -360,12 +360,12 @@ void usb_serial_generic_write_bulk_callback (struct urb *urb) | |||
360 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; | 360 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; |
361 | int status = urb->status; | 361 | int status = urb->status; |
362 | 362 | ||
363 | dbg("%s - port %d", __FUNCTION__, port->number); | 363 | dbg("%s - port %d", __func__, port->number); |
364 | 364 | ||
365 | port->write_urb_busy = 0; | 365 | port->write_urb_busy = 0; |
366 | if (status) { | 366 | if (status) { |
367 | dbg("%s - nonzero write bulk status received: %d", | 367 | dbg("%s - nonzero write bulk status received: %d", |
368 | __FUNCTION__, status); | 368 | __func__, status); |
369 | return; | 369 | return; |
370 | } | 370 | } |
371 | 371 | ||
@@ -377,7 +377,7 @@ void usb_serial_generic_throttle (struct usb_serial_port *port) | |||
377 | { | 377 | { |
378 | unsigned long flags; | 378 | unsigned long flags; |
379 | 379 | ||
380 | dbg("%s - port %d", __FUNCTION__, port->number); | 380 | dbg("%s - port %d", __func__, port->number); |
381 | 381 | ||
382 | /* Set the throttle request flag. It will be picked up | 382 | /* Set the throttle request flag. It will be picked up |
383 | * by usb_serial_generic_read_bulk_callback(). */ | 383 | * by usb_serial_generic_read_bulk_callback(). */ |
@@ -391,7 +391,7 @@ void usb_serial_generic_unthrottle (struct usb_serial_port *port) | |||
391 | int was_throttled; | 391 | int was_throttled; |
392 | unsigned long flags; | 392 | unsigned long flags; |
393 | 393 | ||
394 | dbg("%s - port %d", __FUNCTION__, port->number); | 394 | dbg("%s - port %d", __func__, port->number); |
395 | 395 | ||
396 | /* Clear the throttle flags */ | 396 | /* Clear the throttle flags */ |
397 | spin_lock_irqsave(&port->lock, flags); | 397 | spin_lock_irqsave(&port->lock, flags); |
@@ -409,7 +409,7 @@ void usb_serial_generic_shutdown (struct usb_serial *serial) | |||
409 | { | 409 | { |
410 | int i; | 410 | int i; |
411 | 411 | ||
412 | dbg("%s", __FUNCTION__); | 412 | dbg("%s", __func__); |
413 | 413 | ||
414 | /* stop reads and writes on all ports */ | 414 | /* stop reads and writes on all ports */ |
415 | for (i=0; i < serial->num_ports; ++i) { | 415 | for (i=0; i < serial->num_ports; ++i) { |