diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-05-07 20:33:32 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-05-10 12:24:13 -0400 |
commit | c781c06d119d04601727f2fbc30151e6760d536d (patch) | |
tree | 1faf19acc6bc2a2a3b3bdae8368e395e75cd7518 /drivers/firewire/fw-cdev.c | |
parent | e175569c4639872b5cf242c9d4a71cc40c5f3c29 (diff) |
firewire: Clean up comment style.
Drop filenames from file preamble, drop editor annotations and
use standard indent style for block comments.
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed typo)
Diffstat (limited to 'drivers/firewire/fw-cdev.c')
-rw-r--r-- | drivers/firewire/fw-cdev.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index 88b8fd917f54..c876ac3c50e0 100644 --- a/drivers/firewire/fw-cdev.c +++ b/drivers/firewire/fw-cdev.c | |||
@@ -1,8 +1,7 @@ | |||
1 | /* -*- c-basic-offset: 8 -*- | 1 | /* |
2 | * Char device for device raw access | ||
2 | * | 3 | * |
3 | * fw-device-cdev.c - Char device for device raw access | 4 | * Copyright (C) 2005-2007 Kristian Hoegsberg <krh@bitplanet.net> |
4 | * | ||
5 | * Copyright (C) 2005-2006 Kristian Hoegsberg <krh@bitplanet.net> | ||
6 | * | 5 | * |
7 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -36,9 +35,6 @@ | |||
36 | #include "fw-topology.h" | 35 | #include "fw-topology.h" |
37 | #include "fw-device.h" | 36 | #include "fw-device.h" |
38 | 37 | ||
39 | /* dequeue_event() just kfree()'s the event, so the event has to be | ||
40 | * the first field in the struct. */ | ||
41 | |||
42 | struct client; | 38 | struct client; |
43 | struct client_resource { | 39 | struct client_resource { |
44 | struct list_head link; | 40 | struct list_head link; |
@@ -46,6 +42,11 @@ struct client_resource { | |||
46 | u32 handle; | 42 | u32 handle; |
47 | }; | 43 | }; |
48 | 44 | ||
45 | /* | ||
46 | * dequeue_event() just kfree()'s the event, so the event has to be | ||
47 | * the first field in the struct. | ||
48 | */ | ||
49 | |||
49 | struct event { | 50 | struct event { |
50 | struct { void *data; size_t size; } v[2]; | 51 | struct { void *data; size_t size; } v[2]; |
51 | struct list_head link; | 52 | struct list_head link; |
@@ -691,13 +692,15 @@ static int ioctl_queue_iso(struct client *client, void *buffer) | |||
691 | if (ctx == NULL || request->handle != 0) | 692 | if (ctx == NULL || request->handle != 0) |
692 | return -EINVAL; | 693 | return -EINVAL; |
693 | 694 | ||
694 | /* If the user passes a non-NULL data pointer, has mmap()'ed | 695 | /* |
696 | * If the user passes a non-NULL data pointer, has mmap()'ed | ||
695 | * the iso buffer, and the pointer points inside the buffer, | 697 | * the iso buffer, and the pointer points inside the buffer, |
696 | * we setup the payload pointers accordingly. Otherwise we | 698 | * we setup the payload pointers accordingly. Otherwise we |
697 | * set them both to 0, which will still let packets with | 699 | * set them both to 0, which will still let packets with |
698 | * payload_length == 0 through. In other words, if no packets | 700 | * payload_length == 0 through. In other words, if no packets |
699 | * use the indirect payload, the iso buffer need not be mapped | 701 | * use the indirect payload, the iso buffer need not be mapped |
700 | * and the request->data pointer is ignored.*/ | 702 | * and the request->data pointer is ignored. |
703 | */ | ||
701 | 704 | ||
702 | payload = (unsigned long)request->data - client->vm_start; | 705 | payload = (unsigned long)request->data - client->vm_start; |
703 | buffer_end = client->buffer.page_count << PAGE_SHIFT; | 706 | buffer_end = client->buffer.page_count << PAGE_SHIFT; |
@@ -720,8 +723,10 @@ static int ioctl_queue_iso(struct client *client, void *buffer) | |||
720 | if (ctx->type == FW_ISO_CONTEXT_TRANSMIT) { | 723 | if (ctx->type == FW_ISO_CONTEXT_TRANSMIT) { |
721 | header_length = u.packet.header_length; | 724 | header_length = u.packet.header_length; |
722 | } else { | 725 | } else { |
723 | /* We require that header_length is a multiple of | 726 | /* |
724 | * the fixed header size, ctx->header_size */ | 727 | * We require that header_length is a multiple of |
728 | * the fixed header size, ctx->header_size. | ||
729 | */ | ||
725 | if (ctx->header_size == 0) { | 730 | if (ctx->header_size == 0) { |
726 | if (u.packet.header_length > 0) | 731 | if (u.packet.header_length > 0) |
727 | return -EINVAL; | 732 | return -EINVAL; |
@@ -908,8 +913,10 @@ static int fw_device_op_release(struct inode *inode, struct file *file) | |||
908 | list_for_each_entry_safe(r, next_r, &client->resource_list, link) | 913 | list_for_each_entry_safe(r, next_r, &client->resource_list, link) |
909 | r->release(client, r); | 914 | r->release(client, r); |
910 | 915 | ||
911 | /* FIXME: We should wait for the async tasklets to stop | 916 | /* |
912 | * running before freeing the memory. */ | 917 | * FIXME: We should wait for the async tasklets to stop |
918 | * running before freeing the memory. | ||
919 | */ | ||
913 | 920 | ||
914 | list_for_each_entry_safe(e, next_e, &client->event_list, link) | 921 | list_for_each_entry_safe(e, next_e, &client->event_list, link) |
915 | kfree(e); | 922 | kfree(e); |