aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMark <reodge@gmail.com>2010-05-13 05:44:39 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-14 16:48:02 -0400
commit21fe2eea6381845956322e63e441f351774de7f9 (patch)
tree9d66a67b81c7c85b217cf0694f5be29644445bc0 /drivers/staging
parent93822ad193f1b1d92422dc3d539456acbe1a85ef (diff)
Staging: comedi: Fix long line lengths in comedi_fops.c
This patch fixes lots of long line lengths in comedi_fops.c found by checkpatch.pl Signed-off-by: Mark Rankilor <reodge@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/comedi_fops.c44
1 files changed, 29 insertions, 15 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index e7095d766f4..aced00e5cd1 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -952,8 +952,9 @@ static int do_insn_ioctl(struct comedi_device *dev,
952 if (insn.n > MAX_SAMPLES) 952 if (insn.n > MAX_SAMPLES)
953 insn.n = MAX_SAMPLES; 953 insn.n = MAX_SAMPLES;
954 if (insn.insn & INSN_MASK_WRITE) { 954 if (insn.insn & INSN_MASK_WRITE) {
955 if (copy_from_user 955 if (copy_from_user(data,
956 (data, insn.data, insn.n * sizeof(unsigned int))) { 956 insn.data,
957 insn.n * sizeof(unsigned int))) {
957 ret = -EFAULT; 958 ret = -EFAULT;
958 goto error; 959 goto error;
959 } 960 }
@@ -962,7 +963,9 @@ static int do_insn_ioctl(struct comedi_device *dev,
962 if (ret < 0) 963 if (ret < 0)
963 goto error; 964 goto error;
964 if (insn.insn & INSN_MASK_READ) { 965 if (insn.insn & INSN_MASK_READ) {
965 if (copy_to_user(insn.data, data, insn.n * sizeof(unsigned int))) { 966 if (copy_to_user(insn.data,
967 data,
968 insn.n * sizeof(unsigned int))) {
966 ret = -EFAULT; 969 ret = -EFAULT;
967 goto error; 970 goto error;
968 } 971 }
@@ -1070,7 +1073,9 @@ static int do_cmd_ioctl(struct comedi_device *dev,
1070 } 1073 }
1071 1074
1072 /* make sure each element in channel/gain list is valid */ 1075 /* make sure each element in channel/gain list is valid */
1073 ret = comedi_check_chanlist(s, async->cmd.chanlist_len, async->cmd.chanlist); 1076 ret = comedi_check_chanlist(s,
1077 async->cmd.chanlist_len,
1078 async->cmd.chanlist);
1074 if (ret < 0) { 1079 if (ret < 0) {
1075 DPRINTK("bad chanlist\n"); 1080 DPRINTK("bad chanlist\n");
1076 goto cleanup; 1081 goto cleanup;
@@ -2119,8 +2124,8 @@ int comedi_alloc_board_minor(struct device *hardware_device)
2119 kfree(info->device); 2124 kfree(info->device);
2120 kfree(info); 2125 kfree(info);
2121 printk(KERN_ERR 2126 printk(KERN_ERR
2122 2127 "comedi: error: "
2123 "comedi: error: ran out of minor numbers for board device files.\n"); 2128 "ran out of minor numbers for board device files.\n");
2124 return -EBUSY; 2129 return -EBUSY;
2125 } 2130 }
2126 info->device->minor = i; 2131 info->device->minor = i;
@@ -2133,7 +2138,8 @@ int comedi_alloc_board_minor(struct device *hardware_device)
2133 retval = device_create_file(csdev, &dev_attr_max_read_buffer_kb); 2138 retval = device_create_file(csdev, &dev_attr_max_read_buffer_kb);
2134 if (retval) { 2139 if (retval) {
2135 printk(KERN_ERR 2140 printk(KERN_ERR
2136 "comedi: failed to create sysfs attribute file \"%s\".\n", 2141 "comedi: "
2142 "failed to create sysfs attribute file \"%s\".\n",
2137 dev_attr_max_read_buffer_kb.attr.name); 2143 dev_attr_max_read_buffer_kb.attr.name);
2138 comedi_free_board_minor(i); 2144 comedi_free_board_minor(i);
2139 return retval; 2145 return retval;
@@ -2141,7 +2147,8 @@ int comedi_alloc_board_minor(struct device *hardware_device)
2141 retval = device_create_file(csdev, &dev_attr_read_buffer_kb); 2147 retval = device_create_file(csdev, &dev_attr_read_buffer_kb);
2142 if (retval) { 2148 if (retval) {
2143 printk(KERN_ERR 2149 printk(KERN_ERR
2144 "comedi: failed to create sysfs attribute file \"%s\".\n", 2150 "comedi: "
2151 "failed to create sysfs attribute file \"%s\".\n",
2145 dev_attr_read_buffer_kb.attr.name); 2152 dev_attr_read_buffer_kb.attr.name);
2146 comedi_free_board_minor(i); 2153 comedi_free_board_minor(i);
2147 return retval; 2154 return retval;
@@ -2149,7 +2156,8 @@ int comedi_alloc_board_minor(struct device *hardware_device)
2149 retval = device_create_file(csdev, &dev_attr_max_write_buffer_kb); 2156 retval = device_create_file(csdev, &dev_attr_max_write_buffer_kb);
2150 if (retval) { 2157 if (retval) {
2151 printk(KERN_ERR 2158 printk(KERN_ERR
2152 "comedi: failed to create sysfs attribute file \"%s\".\n", 2159 "comedi: "
2160 "failed to create sysfs attribute file \"%s\".\n",
2153 dev_attr_max_write_buffer_kb.attr.name); 2161 dev_attr_max_write_buffer_kb.attr.name);
2154 comedi_free_board_minor(i); 2162 comedi_free_board_minor(i);
2155 return retval; 2163 return retval;
@@ -2157,7 +2165,8 @@ int comedi_alloc_board_minor(struct device *hardware_device)
2157 retval = device_create_file(csdev, &dev_attr_write_buffer_kb); 2165 retval = device_create_file(csdev, &dev_attr_write_buffer_kb);
2158 if (retval) { 2166 if (retval) {
2159 printk(KERN_ERR 2167 printk(KERN_ERR
2160 "comedi: failed to create sysfs attribute file \"%s\".\n", 2168 "comedi: "
2169 "failed to create sysfs attribute file \"%s\".\n",
2161 dev_attr_write_buffer_kb.attr.name); 2170 dev_attr_write_buffer_kb.attr.name);
2162 comedi_free_board_minor(i); 2171 comedi_free_board_minor(i);
2163 return retval; 2172 return retval;
@@ -2216,7 +2225,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev,
2216 if (i == COMEDI_NUM_MINORS) { 2225 if (i == COMEDI_NUM_MINORS) {
2217 kfree(info); 2226 kfree(info);
2218 printk(KERN_ERR 2227 printk(KERN_ERR
2219 "comedi: error: ran out of minor numbers for board device files.\n"); 2228 "comedi: error: "
2229 "ran out of minor numbers for board device files.\n");
2220 return -EBUSY; 2230 return -EBUSY;
2221 } 2231 }
2222 s->minor = i; 2232 s->minor = i;
@@ -2230,7 +2240,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev,
2230 retval = device_create_file(csdev, &dev_attr_max_read_buffer_kb); 2240 retval = device_create_file(csdev, &dev_attr_max_read_buffer_kb);
2231 if (retval) { 2241 if (retval) {
2232 printk(KERN_ERR 2242 printk(KERN_ERR
2233 "comedi: failed to create sysfs attribute file \"%s\".\n", 2243 "comedi: "
2244 "failed to create sysfs attribute file \"%s\".\n",
2234 dev_attr_max_read_buffer_kb.attr.name); 2245 dev_attr_max_read_buffer_kb.attr.name);
2235 comedi_free_subdevice_minor(s); 2246 comedi_free_subdevice_minor(s);
2236 return retval; 2247 return retval;
@@ -2238,7 +2249,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev,
2238 retval = device_create_file(csdev, &dev_attr_read_buffer_kb); 2249 retval = device_create_file(csdev, &dev_attr_read_buffer_kb);
2239 if (retval) { 2250 if (retval) {
2240 printk(KERN_ERR 2251 printk(KERN_ERR
2241 "comedi: failed to create sysfs attribute file \"%s\".\n", 2252 "comedi: "
2253 "failed to create sysfs attribute file \"%s\".\n",
2242 dev_attr_read_buffer_kb.attr.name); 2254 dev_attr_read_buffer_kb.attr.name);
2243 comedi_free_subdevice_minor(s); 2255 comedi_free_subdevice_minor(s);
2244 return retval; 2256 return retval;
@@ -2246,7 +2258,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev,
2246 retval = device_create_file(csdev, &dev_attr_max_write_buffer_kb); 2258 retval = device_create_file(csdev, &dev_attr_max_write_buffer_kb);
2247 if (retval) { 2259 if (retval) {
2248 printk(KERN_ERR 2260 printk(KERN_ERR
2249 "comedi: failed to create sysfs attribute file \"%s\".\n", 2261 "comedi: "
2262 "failed to create sysfs attribute file \"%s\".\n",
2250 dev_attr_max_write_buffer_kb.attr.name); 2263 dev_attr_max_write_buffer_kb.attr.name);
2251 comedi_free_subdevice_minor(s); 2264 comedi_free_subdevice_minor(s);
2252 return retval; 2265 return retval;
@@ -2254,7 +2267,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev,
2254 retval = device_create_file(csdev, &dev_attr_write_buffer_kb); 2267 retval = device_create_file(csdev, &dev_attr_write_buffer_kb);
2255 if (retval) { 2268 if (retval) {
2256 printk(KERN_ERR 2269 printk(KERN_ERR
2257 "comedi: failed to create sysfs attribute file \"%s\".\n", 2270 "comedi: "
2271 "failed to create sysfs attribute file \"%s\".\n",
2258 dev_attr_write_buffer_kb.attr.name); 2272 dev_attr_write_buffer_kb.attr.name);
2259 comedi_free_subdevice_minor(s); 2273 comedi_free_subdevice_minor(s);
2260 return retval; 2274 return retval;