Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351550
b: refs/heads/master
c: cdc4827
h: refs/heads/master
v: v3
  • Loading branch information
Tilman Schmidt authored and David S. Miller committed Jan 21, 2013
1 parent 49f01a3 commit 0b70cb8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2ca8481941efca3300227f0a60003af21ad2895
refs/heads/master: cdc4827098d128423297720dcf33792d85079b78
46 changes: 15 additions & 31 deletions trunk/drivers/isdn/gigaset/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,36 +112,6 @@ static int if_config(struct cardstate *cs, int *arg)
}

/*** the terminal driver ***/
/* stolen from usbserial and some other tty drivers */

static int if_open(struct tty_struct *tty, struct file *filp);
static void if_close(struct tty_struct *tty, struct file *filp);
static int if_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg);
static int if_write_room(struct tty_struct *tty);
static int if_chars_in_buffer(struct tty_struct *tty);
static void if_throttle(struct tty_struct *tty);
static void if_unthrottle(struct tty_struct *tty);
static void if_set_termios(struct tty_struct *tty, struct ktermios *old);
static int if_tiocmget(struct tty_struct *tty);
static int if_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static int if_write(struct tty_struct *tty,
const unsigned char *buf, int count);

static const struct tty_operations if_ops = {
.open = if_open,
.close = if_close,
.ioctl = if_ioctl,
.write = if_write,
.write_room = if_write_room,
.chars_in_buffer = if_chars_in_buffer,
.set_termios = if_set_termios,
.throttle = if_throttle,
.unthrottle = if_unthrottle,
.tiocmget = if_tiocmget,
.tiocmset = if_tiocmset,
};

static int if_open(struct tty_struct *tty, struct file *filp)
{
Expand Down Expand Up @@ -355,7 +325,7 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count)
static int if_write_room(struct tty_struct *tty)
{
struct cardstate *cs = tty->driver_data;
int retval = -ENODEV;
int retval;

gig_dbg(DEBUG_IF, "%u: %s()", cs->minor_index, __func__);

Expand Down Expand Up @@ -498,6 +468,20 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old)
mutex_unlock(&cs->mutex);
}

static const struct tty_operations if_ops = {
.open = if_open,
.close = if_close,
.ioctl = if_ioctl,
.write = if_write,
.write_room = if_write_room,
.chars_in_buffer = if_chars_in_buffer,
.set_termios = if_set_termios,
.throttle = if_throttle,
.unthrottle = if_unthrottle,
.tiocmget = if_tiocmget,
.tiocmset = if_tiocmset,
};


/* wakeup tasklet for the write operation */
static void if_wake(unsigned long data)
Expand Down

0 comments on commit 0b70cb8

Please sign in to comment.