summaryrefslogtreecommitdiff
path: root/drivers/staging/dgrp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/dgrp')
-rw-r--r--drivers/staging/dgrp/dgrp_dpa_ops.c2
-rw-r--r--drivers/staging/dgrp/dgrp_net_ops.c5
-rw-r--r--drivers/staging/dgrp/dgrp_sysfs.c3
-rw-r--r--drivers/staging/dgrp/dgrp_tty.c15
4 files changed, 6 insertions, 19 deletions
diff --git a/drivers/staging/dgrp/dgrp_dpa_ops.c b/drivers/staging/dgrp/dgrp_dpa_ops.c
index 49e6709..021cca4 100644
--- a/drivers/staging/dgrp/dgrp_dpa_ops.c
+++ b/drivers/staging/dgrp/dgrp_dpa_ops.c
@@ -387,7 +387,7 @@ static long dgrp_dpa_ioctl(struct file *file, unsigned int cmd,
port = getchan.ch_port;
- if (port < 0 || port > nd->nd_chan_count)
+ if (port > nd->nd_chan_count)
return -EINVAL;
ch = nd->nd_chan + port;
diff --git a/drivers/staging/dgrp/dgrp_net_ops.c b/drivers/staging/dgrp/dgrp_net_ops.c
index ab839ea..c409cd0 100644
--- a/drivers/staging/dgrp/dgrp_net_ops.c
+++ b/drivers/staging/dgrp/dgrp_net_ops.c
@@ -1057,13 +1057,13 @@ static int dgrp_net_release(struct inode *inode, struct file *file)
spin_unlock_irqrestore(&dgrp_poll_data.poll_lock, lock_flags);
-done:
down(&nd->nd_net_semaphore);
dgrp_monitor_message(nd, "Net Close");
up(&nd->nd_net_semaphore);
+done:
module_put(THIS_MODULE);
file->private_data = NULL;
return 0;
@@ -1671,6 +1671,9 @@ static int dgrp_send(struct nd_struct *nd, long tmax)
* do the job.
*/
+ /* FIXME: jiffies - ch->ch_waketime can never
+ be < 0. Someone needs to work out what is
+ actually intended here */
if (ch->ch_pun.un_open_count &&
(ch->ch_pun.un_flag &
(UN_EMPTY|UN_TIME|UN_LOW|UN_PWAIT)) != 0) {
diff --git a/drivers/staging/dgrp/dgrp_sysfs.c b/drivers/staging/dgrp/dgrp_sysfs.c
index e5a3c88..43ab9f4 100644
--- a/drivers/staging/dgrp/dgrp_sysfs.c
+++ b/drivers/staging/dgrp/dgrp_sysfs.c
@@ -17,7 +17,6 @@
#include "dgrp_common.h"
#include <linux/kernel.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/string.h>
@@ -177,7 +176,7 @@ static ssize_t dgrp_node_description_show(struct device *c,
if (!nd)
return 0;
- if (nd->nd_state == NS_READY && nd->nd_ps_desc)
+ if (nd->nd_state == NS_READY)
return snprintf(buf, PAGE_SIZE, "%s\n", nd->nd_ps_desc);
return 0;
}
diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp/dgrp_tty.c
index e125b03..efa62ce 100644
--- a/drivers/staging/dgrp/dgrp_tty.c
+++ b/drivers/staging/dgrp/dgrp_tty.c
@@ -2615,21 +2615,6 @@ static int dgrp_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
*/
return 0;
- case TIOCGSOFTCAR:
- rc = access_ok(VERIFY_WRITE, (void __user *) arg,
- sizeof(long));
- if (rc == 0)
- return -EFAULT;
- put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long __user *) arg);
- return 0;
-
- case TIOCSSOFTCAR:
- get_user(arg, (unsigned long __user *) arg);
- tty->termios.c_cflag =
- ((tty->termios.c_cflag & ~CLOCAL) |
- (arg ? CLOCAL : 0));
- return 0;
-
case TIOCMGET:
rc = access_ok(VERIFY_WRITE, (void __user *) arg,
sizeof(unsigned int));