diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-12-14 15:47:04 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-03-24 15:56:40 -0400 |
commit | 53dca51175cc2f66d21aeb1e70146cca65c53dad (patch) | |
tree | da729da20cc4ca1cb994fa6659be7f23259f7097 /drivers/firewire/fw-transaction.h | |
parent | 2dbd7d7e2327b0c2cc4e2de903e1cfa19980a504 (diff) |
firewire: remove line breaks before function names
type
function_name(parameters);
is nice to look at but was not used consistently.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-transaction.h')
-rw-r--r-- | drivers/firewire/fw-transaction.h | 109 |
1 files changed, 36 insertions, 73 deletions
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index 1d78e9cc5940..7112e62942ff 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
@@ -88,8 +88,7 @@ | |||
88 | #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) | 88 | #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) |
89 | #define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) | 89 | #define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) |
90 | 90 | ||
91 | static inline void | 91 | static inline void fw_memcpy_from_be32(void *_dst, void *_src, size_t size) |
92 | fw_memcpy_from_be32(void *_dst, void *_src, size_t size) | ||
93 | { | 92 | { |
94 | u32 *dst = _dst; | 93 | u32 *dst = _dst; |
95 | __be32 *src = _src; | 94 | __be32 *src = _src; |
@@ -99,8 +98,7 @@ fw_memcpy_from_be32(void *_dst, void *_src, size_t size) | |||
99 | dst[i] = be32_to_cpu(src[i]); | 98 | dst[i] = be32_to_cpu(src[i]); |
100 | } | 99 | } |
101 | 100 | ||
102 | static inline void | 101 | static inline void fw_memcpy_to_be32(void *_dst, void *_src, size_t size) |
103 | fw_memcpy_to_be32(void *_dst, void *_src, size_t size) | ||
104 | { | 102 | { |
105 | fw_memcpy_from_be32(_dst, _src, size); | 103 | fw_memcpy_from_be32(_dst, _src, size); |
106 | } | 104 | } |
@@ -125,8 +123,7 @@ typedef void (*fw_packet_callback_t)(struct fw_packet *packet, | |||
125 | struct fw_card *card, int status); | 123 | struct fw_card *card, int status); |
126 | 124 | ||
127 | typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode, | 125 | typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode, |
128 | void *data, | 126 | void *data, size_t length, |
129 | size_t length, | ||
130 | void *callback_data); | 127 | void *callback_data); |
131 | 128 | ||
132 | /* | 129 | /* |
@@ -201,7 +198,6 @@ struct fw_address_handler { | |||
201 | struct list_head link; | 198 | struct list_head link; |
202 | }; | 199 | }; |
203 | 200 | ||
204 | |||
205 | struct fw_address_region { | 201 | struct fw_address_region { |
206 | u64 start; | 202 | u64 start; |
207 | u64 end; | 203 | u64 end; |
@@ -315,10 +311,8 @@ struct fw_iso_packet { | |||
315 | struct fw_iso_context; | 311 | struct fw_iso_context; |
316 | 312 | ||
317 | typedef void (*fw_iso_callback_t)(struct fw_iso_context *context, | 313 | typedef void (*fw_iso_callback_t)(struct fw_iso_context *context, |
318 | u32 cycle, | 314 | u32 cycle, size_t header_length, |
319 | size_t header_length, | 315 | void *header, void *data); |
320 | void *header, | ||
321 | void *data); | ||
322 | 316 | ||
323 | /* | 317 | /* |
324 | * An iso buffer is just a set of pages mapped for DMA in the | 318 | * An iso buffer is just a set of pages mapped for DMA in the |
@@ -344,36 +338,22 @@ struct fw_iso_context { | |||
344 | void *callback_data; | 338 | void *callback_data; |
345 | }; | 339 | }; |
346 | 340 | ||
347 | int | 341 | int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, |
348 | fw_iso_buffer_init(struct fw_iso_buffer *buffer, | 342 | int page_count, enum dma_data_direction direction); |
349 | struct fw_card *card, | 343 | int fw_iso_buffer_map(struct fw_iso_buffer *buffer, struct vm_area_struct *vma); |
350 | int page_count, | 344 | void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, struct fw_card *card); |
351 | enum dma_data_direction direction); | 345 | |
352 | int | 346 | struct fw_iso_context *fw_iso_context_create(struct fw_card *card, |
353 | fw_iso_buffer_map(struct fw_iso_buffer *buffer, struct vm_area_struct *vma); | 347 | int type, int channel, int speed, size_t header_size, |
354 | void | 348 | fw_iso_callback_t callback, void *callback_data); |
355 | fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, struct fw_card *card); | 349 | int fw_iso_context_queue(struct fw_iso_context *ctx, |
356 | 350 | struct fw_iso_packet *packet, | |
357 | struct fw_iso_context * | 351 | struct fw_iso_buffer *buffer, |
358 | fw_iso_context_create(struct fw_card *card, int type, | 352 | unsigned long payload); |
359 | int channel, int speed, size_t header_size, | 353 | int fw_iso_context_start(struct fw_iso_context *ctx, |
360 | fw_iso_callback_t callback, void *callback_data); | 354 | int cycle, int sync, int tags); |
361 | 355 | int fw_iso_context_stop(struct fw_iso_context *ctx); | |
362 | void | 356 | void fw_iso_context_destroy(struct fw_iso_context *ctx); |
363 | fw_iso_context_destroy(struct fw_iso_context *ctx); | ||
364 | |||
365 | int | ||
366 | fw_iso_context_queue(struct fw_iso_context *ctx, | ||
367 | struct fw_iso_packet *packet, | ||
368 | struct fw_iso_buffer *buffer, | ||
369 | unsigned long payload); | ||
370 | |||
371 | int | ||
372 | fw_iso_context_start(struct fw_iso_context *ctx, | ||
373 | int cycle, int sync, int tags); | ||
374 | |||
375 | int | ||
376 | fw_iso_context_stop(struct fw_iso_context *ctx); | ||
377 | 357 | ||
378 | struct fw_card_driver { | 358 | struct fw_card_driver { |
379 | /* | 359 | /* |
@@ -429,24 +409,18 @@ struct fw_card_driver { | |||
429 | int (*stop_iso)(struct fw_iso_context *ctx); | 409 | int (*stop_iso)(struct fw_iso_context *ctx); |
430 | }; | 410 | }; |
431 | 411 | ||
432 | int | 412 | int fw_core_initiate_bus_reset(struct fw_card *card, int short_reset); |
433 | fw_core_initiate_bus_reset(struct fw_card *card, int short_reset); | ||
434 | 413 | ||
435 | void | 414 | void fw_send_request(struct fw_card *card, struct fw_transaction *t, |
436 | fw_send_request(struct fw_card *card, struct fw_transaction *t, | ||
437 | int tcode, int destination_id, int generation, int speed, | 415 | int tcode, int destination_id, int generation, int speed, |
438 | unsigned long long offset, void *data, size_t length, | 416 | unsigned long long offset, void *data, size_t length, |
439 | fw_transaction_callback_t callback, void *callback_data); | 417 | fw_transaction_callback_t callback, void *callback_data); |
440 | |||
441 | int fw_run_transaction(struct fw_card *card, int tcode, int destination_id, | ||
442 | int generation, int speed, unsigned long long offset, | ||
443 | void *data, size_t length); | ||
444 | |||
445 | int fw_cancel_transaction(struct fw_card *card, | 418 | int fw_cancel_transaction(struct fw_card *card, |
446 | struct fw_transaction *transaction); | 419 | struct fw_transaction *transaction); |
447 | |||
448 | void fw_flush_transactions(struct fw_card *card); | 420 | void fw_flush_transactions(struct fw_card *card); |
449 | 421 | int fw_run_transaction(struct fw_card *card, int tcode, int destination_id, | |
422 | int generation, int speed, unsigned long long offset, | ||
423 | void *data, size_t length); | ||
450 | void fw_send_phy_config(struct fw_card *card, | 424 | void fw_send_phy_config(struct fw_card *card, |
451 | int node_id, int generation, int gap_count); | 425 | int node_id, int generation, int gap_count); |
452 | 426 | ||
@@ -454,29 +428,18 @@ void fw_send_phy_config(struct fw_card *card, | |||
454 | * Called by the topology code to inform the device code of node | 428 | * Called by the topology code to inform the device code of node |
455 | * activity; found, lost, or updated nodes. | 429 | * activity; found, lost, or updated nodes. |
456 | */ | 430 | */ |
457 | void | 431 | void fw_node_event(struct fw_card *card, struct fw_node *node, int event); |
458 | fw_node_event(struct fw_card *card, struct fw_node *node, int event); | ||
459 | 432 | ||
460 | /* API used by card level drivers */ | 433 | /* API used by card level drivers */ |
461 | 434 | ||
462 | void | 435 | void fw_card_initialize(struct fw_card *card, |
463 | fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver, | 436 | const struct fw_card_driver *driver, struct device *device); |
464 | struct device *device); | 437 | int fw_card_add(struct fw_card *card, |
465 | int | 438 | u32 max_receive, u32 link_speed, u64 guid); |
466 | fw_card_add(struct fw_card *card, | 439 | void fw_core_remove_card(struct fw_card *card); |
467 | u32 max_receive, u32 link_speed, u64 guid); | 440 | void fw_core_handle_bus_reset(struct fw_card *card, int node_id, |
468 | 441 | int generation, int self_id_count, u32 *self_ids); | |
469 | void | 442 | void fw_core_handle_request(struct fw_card *card, struct fw_packet *request); |
470 | fw_core_remove_card(struct fw_card *card); | 443 | void fw_core_handle_response(struct fw_card *card, struct fw_packet *packet); |
471 | |||
472 | void | ||
473 | fw_core_handle_bus_reset(struct fw_card *card, | ||
474 | int node_id, int generation, | ||
475 | int self_id_count, u32 *self_ids); | ||
476 | void | ||
477 | fw_core_handle_request(struct fw_card *card, struct fw_packet *request); | ||
478 | |||
479 | void | ||
480 | fw_core_handle_response(struct fw_card *card, struct fw_packet *packet); | ||
481 | 444 | ||
482 | #endif /* __fw_transaction_h */ | 445 | #endif /* __fw_transaction_h */ |