Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304138
b: refs/heads/master
c: 3040942
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent b61ef5e commit c6ba7b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 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: 5ce76e77e0fde4a46bd230d0678099bd648b50d4
refs/heads/master: 30409420d2e181215745fdc7052446b439e0221f
27 changes: 10 additions & 17 deletions trunk/drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@

#define MAX_RX_URBS 2

static inline struct hso_serial *get_serial_by_tty(struct tty_struct *tty)
{
if (tty)
return tty->driver_data;
return NULL;
}

/*****************************************************************************/
/* Debugging functions */
/*****************************************************************************/
Expand Down Expand Up @@ -1114,7 +1107,7 @@ static void hso_init_termios(struct ktermios *termios)
static void _hso_serial_set_termios(struct tty_struct *tty,
struct ktermios *old)
{
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;
struct ktermios *termios;

if (!serial) {
Expand Down Expand Up @@ -1268,7 +1261,7 @@ static void hso_unthrottle_tasklet(struct hso_serial *serial)

static void hso_unthrottle(struct tty_struct *tty)
{
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;

tasklet_hi_schedule(&serial->unthrottle_tasklet);
}
Expand Down Expand Up @@ -1390,7 +1383,7 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
static int hso_serial_write(struct tty_struct *tty, const unsigned char *buf,
int count)
{
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;
int space, tx_bytes;
unsigned long flags;

Expand Down Expand Up @@ -1422,7 +1415,7 @@ static int hso_serial_write(struct tty_struct *tty, const unsigned char *buf,
/* how much room is there for writing */
static int hso_serial_write_room(struct tty_struct *tty)
{
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;
int room;
unsigned long flags;

Expand All @@ -1437,7 +1430,7 @@ static int hso_serial_write_room(struct tty_struct *tty)
/* setup the term */
static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
{
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;
unsigned long flags;

if (old)
Expand All @@ -1458,7 +1451,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
/* how many characters in the buffer */
static int hso_serial_chars_in_buffer(struct tty_struct *tty)
{
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;
int chars;
unsigned long flags;

Expand Down Expand Up @@ -1629,7 +1622,7 @@ static int hso_get_count(struct tty_struct *tty,
struct serial_icounter_struct *icount)
{
struct uart_icount cnow;
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;
struct hso_tiocmget *tiocmget = serial->tiocmget;

memset(icount, 0, sizeof(struct serial_icounter_struct));
Expand Down Expand Up @@ -1659,7 +1652,7 @@ static int hso_get_count(struct tty_struct *tty,
static int hso_serial_tiocmget(struct tty_struct *tty)
{
int retval;
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;
struct hso_tiocmget *tiocmget;
u16 UART_state_bitmap;

Expand Down Expand Up @@ -1693,7 +1686,7 @@ static int hso_serial_tiocmset(struct tty_struct *tty,
int val = 0;
unsigned long flags;
int if_num;
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;

/* sanity check */
if (!serial) {
Expand Down Expand Up @@ -1733,7 +1726,7 @@ static int hso_serial_tiocmset(struct tty_struct *tty,
static int hso_serial_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct hso_serial *serial = get_serial_by_tty(tty);
struct hso_serial *serial = tty->driver_data;
int ret = 0;
D4("IOCTL cmd: %d, arg: %ld", cmd, arg);

Expand Down

0 comments on commit c6ba7b5

Please sign in to comment.