[PATCH 7/9] staging: dgnc: fixes warning: initialization from incompatible pointer type
Lidza Louina
lidza.louina at gmail.com
Mon Aug 12 21:05:11 UTC 2013
Signed-off-by: Lidza Louina <lidza.louina at gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 37 ++-----------------------------------
1 file changed, 2 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 1e22b4b..1fbd09f 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -112,7 +112,7 @@ static struct ktermios DgncDefaultTermios =
static int dgnc_tty_open(struct tty_struct *tty, struct file *file);
static void dgnc_tty_close(struct tty_struct *tty, struct file *file);
static int dgnc_block_til_ready(struct tty_struct *tty, struct file *file, struct channel_t *ch);
-static int dgnc_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg);
+static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
static int dgnc_tty_digigeta(struct tty_struct *tty, struct digi_t __user *retinfo);
static int dgnc_tty_digiseta(struct tty_struct *tty, struct digi_t __user *new_info);
static int dgnc_tty_write_room(struct tty_struct* tty);
@@ -3123,7 +3123,7 @@ static void dgnc_tty_flush_buffer(struct tty_struct *tty)
*
* The usual assortment of ioctl's
*/
-static int dgnc_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd,
+static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
unsigned long arg)
{
struct board_t *bd;
@@ -3337,39 +3337,6 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned in
DGNC_UNLOCK(ch->ch_lock, lock_flags);
return(-ENOIOCTLCMD);
-#ifdef TIOCGETP
- case TIOCGETP:
-#endif
- case TCGETS:
- case TCGETA:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
- if (tty->ldisc->ops->ioctl) {
-#else
- if (tty->ldisc.ops->ioctl) {
-#endif
- int retval = (-ENXIO);
-
- DGNC_UNLOCK(ch->ch_lock, lock_flags);
-
- if (tty->termios) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
- retval = ((tty->ldisc->ops->ioctl) (tty, file, cmd, arg));
-#else
- retval = ((tty->ldisc.ops->ioctl) (tty, file, cmd, arg));
-#endif
- }
-
- DPR_IOCTL(("dgnc_tty_ioctl (LINE:%d) finish on port %d - cmd %s (%x), arg %lx\n",
- __LINE__, ch->ch_portnum, dgnc_ioctl_name(cmd), cmd, arg));
- return(retval);
- }
-
- DGNC_UNLOCK(ch->ch_lock, lock_flags);
- DPR_IOCTL(("dgnc_tty_ioctl (LINE:%d) finish on port %d - cmd %s (%x), arg %lx\n",
- __LINE__, ch->ch_portnum, dgnc_ioctl_name(cmd), cmd, arg));
-
- return(-ENOIOCTLCMD);
-
case TCSETSF:
case TCSETSW:
/*
--
1.8.1.2
More information about the devel
mailing list