diff options
Diffstat (limited to 'include/linux/firewire.h')
| -rw-r--r-- | include/linux/firewire.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index cdc9b719e9c7..7edcf1031718 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -135,6 +135,20 @@ struct fw_card { | |||
| 135 | __be32 maint_utility_register; | 135 | __be32 maint_utility_register; |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | static inline struct fw_card *fw_card_get(struct fw_card *card) | ||
| 139 | { | ||
| 140 | kref_get(&card->kref); | ||
| 141 | |||
| 142 | return card; | ||
| 143 | } | ||
| 144 | |||
| 145 | void fw_card_release(struct kref *kref); | ||
| 146 | |||
| 147 | static inline void fw_card_put(struct fw_card *card) | ||
| 148 | { | ||
| 149 | kref_put(&card->kref, fw_card_release); | ||
| 150 | } | ||
| 151 | |||
| 138 | struct fw_attribute_group { | 152 | struct fw_attribute_group { |
| 139 | struct attribute_group *groups[2]; | 153 | struct attribute_group *groups[2]; |
| 140 | struct attribute_group group; | 154 | struct attribute_group group; |
| @@ -325,6 +339,7 @@ int fw_core_add_address_handler(struct fw_address_handler *handler, | |||
| 325 | void fw_core_remove_address_handler(struct fw_address_handler *handler); | 339 | void fw_core_remove_address_handler(struct fw_address_handler *handler); |
| 326 | void fw_send_response(struct fw_card *card, | 340 | void fw_send_response(struct fw_card *card, |
| 327 | struct fw_request *request, int rcode); | 341 | struct fw_request *request, int rcode); |
| 342 | int fw_get_request_speed(struct fw_request *request); | ||
| 328 | void fw_send_request(struct fw_card *card, struct fw_transaction *t, | 343 | void fw_send_request(struct fw_card *card, struct fw_transaction *t, |
| 329 | int tcode, int destination_id, int generation, int speed, | 344 | int tcode, int destination_id, int generation, int speed, |
| 330 | unsigned long long offset, void *payload, size_t length, | 345 | unsigned long long offset, void *payload, size_t length, |
| @@ -334,6 +349,7 @@ int fw_cancel_transaction(struct fw_card *card, | |||
| 334 | int fw_run_transaction(struct fw_card *card, int tcode, int destination_id, | 349 | int fw_run_transaction(struct fw_card *card, int tcode, int destination_id, |
| 335 | int generation, int speed, unsigned long long offset, | 350 | int generation, int speed, unsigned long long offset, |
| 336 | void *payload, size_t length); | 351 | void *payload, size_t length); |
| 352 | const char *fw_rcode_string(int rcode); | ||
| 337 | 353 | ||
| 338 | static inline int fw_stream_packet_destination_id(int tag, int channel, int sy) | 354 | static inline int fw_stream_packet_destination_id(int tag, int channel, int sy) |
| 339 | { | 355 | { |
| @@ -391,6 +407,7 @@ struct fw_iso_buffer { | |||
| 391 | enum dma_data_direction direction; | 407 | enum dma_data_direction direction; |
| 392 | struct page **pages; | 408 | struct page **pages; |
| 393 | int page_count; | 409 | int page_count; |
| 410 | int page_count_mapped; | ||
| 394 | }; | 411 | }; |
| 395 | 412 | ||
| 396 | int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, | 413 | int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, |
