aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2010-07-29 03:31:56 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-07-29 17:09:18 -0400
commitae2a97661482c1d0f1aa41b837da95054d0e9a1b (patch)
treed80b34cc5895c18af5e092ff7c56c1cefb0e1983 /drivers/firewire
parent69e61d0c07fa28a05f699723a88d49e0014019b6 (diff)
firewire: core: small clarifications in core-cdev
Make a note on the seemingly unused linux/sched.h. Rename an irritatingly named variable. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/core-cdev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
index 1a14dbf097f0..cf989e1635e1 100644
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -34,7 +34,7 @@
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/mutex.h> 35#include <linux/mutex.h>
36#include <linux/poll.h> 36#include <linux/poll.h>
37#include <linux/sched.h> 37#include <linux/sched.h> /* required for linux/wait.h */
38#include <linux/spinlock.h> 38#include <linux/spinlock.h>
39#include <linux/string.h> 39#include <linux/string.h>
40#include <linux/time.h> 40#include <linux/time.h>
@@ -993,7 +993,7 @@ static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg)
993 struct fw_cdev_queue_iso *a = &arg->queue_iso; 993 struct fw_cdev_queue_iso *a = &arg->queue_iso;
994 struct fw_cdev_iso_packet __user *p, *end, *next; 994 struct fw_cdev_iso_packet __user *p, *end, *next;
995 struct fw_iso_context *ctx = client->iso_context; 995 struct fw_iso_context *ctx = client->iso_context;
996 unsigned long payload, buffer_end, header_length; 996 unsigned long payload, buffer_end, transmit_header_bytes;
997 u32 control; 997 u32 control;
998 int count; 998 int count;
999 struct { 999 struct {
@@ -1042,7 +1042,7 @@ static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg)
1042 if (ctx->type == FW_ISO_CONTEXT_TRANSMIT) { 1042 if (ctx->type == FW_ISO_CONTEXT_TRANSMIT) {
1043 if (u.packet.header_length % 4 != 0) 1043 if (u.packet.header_length % 4 != 0)
1044 return -EINVAL; 1044 return -EINVAL;
1045 header_length = u.packet.header_length; 1045 transmit_header_bytes = u.packet.header_length;
1046 } else { 1046 } else {
1047 /* 1047 /*
1048 * We require that header_length is a multiple of 1048 * We require that header_length is a multiple of
@@ -1051,15 +1051,15 @@ static int ioctl_queue_iso(struct client *client, union ioctl_arg *arg)
1051 if (u.packet.header_length == 0 || 1051 if (u.packet.header_length == 0 ||
1052 u.packet.header_length % ctx->header_size != 0) 1052 u.packet.header_length % ctx->header_size != 0)
1053 return -EINVAL; 1053 return -EINVAL;
1054 header_length = 0; 1054 transmit_header_bytes = 0;
1055 } 1055 }
1056 1056
1057 next = (struct fw_cdev_iso_packet __user *) 1057 next = (struct fw_cdev_iso_packet __user *)
1058 &p->header[header_length / 4]; 1058 &p->header[transmit_header_bytes / 4];
1059 if (next > end) 1059 if (next > end)
1060 return -EINVAL; 1060 return -EINVAL;
1061 if (__copy_from_user 1061 if (__copy_from_user
1062 (u.packet.header, p->header, header_length)) 1062 (u.packet.header, p->header, transmit_header_bytes))
1063 return -EFAULT; 1063 return -EFAULT;
1064 if (u.packet.skip && ctx->type == FW_ISO_CONTEXT_TRANSMIT && 1064 if (u.packet.skip && ctx->type == FW_ISO_CONTEXT_TRANSMIT &&
1065 u.packet.header_length + u.packet.payload_length > 0) 1065 u.packet.header_length + u.packet.payload_length > 0)