~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/isdn/gigaset/interface.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
 
116
116
static int  if_open(struct tty_struct *tty, struct file *filp);
117
117
static void if_close(struct tty_struct *tty, struct file *filp);
118
 
static int  if_ioctl(struct tty_struct *tty, struct file *file,
 
118
static int  if_ioctl(struct tty_struct *tty,
119
119
                     unsigned int cmd, unsigned long arg);
120
120
static int  if_write_room(struct tty_struct *tty);
121
121
static int  if_chars_in_buffer(struct tty_struct *tty);
122
122
static void if_throttle(struct tty_struct *tty);
123
123
static void if_unthrottle(struct tty_struct *tty);
124
124
static void if_set_termios(struct tty_struct *tty, struct ktermios *old);
125
 
static int  if_tiocmget(struct tty_struct *tty, struct file *file);
126
 
static int  if_tiocmset(struct tty_struct *tty, struct file *file,
 
125
static int  if_tiocmget(struct tty_struct *tty);
 
126
static int  if_tiocmset(struct tty_struct *tty,
127
127
                        unsigned int set, unsigned int clear);
128
128
static int  if_write(struct tty_struct *tty,
129
129
                     const unsigned char *buf, int count);
156
156
        if (!cs || !try_module_get(cs->driver->owner))
157
157
                return -ENODEV;
158
158
 
159
 
        if (mutex_lock_interruptible(&cs->mutex))
 
159
        if (mutex_lock_interruptible(&cs->mutex)) {
 
160
                module_put(cs->driver->owner);
160
161
                return -ERESTARTSYS;
 
162
        }
161
163
        tty->driver_data = cs;
162
164
 
163
165
        ++cs->open_count;
205
207
        module_put(cs->driver->owner);
206
208
}
207
209
 
208
 
static int if_ioctl(struct tty_struct *tty, struct file *file,
 
210
static int if_ioctl(struct tty_struct *tty,
209
211
                    unsigned int cmd, unsigned long arg)
210
212
{
211
213
        struct cardstate *cs;
280
282
        return retval;
281
283
}
282
284
 
283
 
static int if_tiocmget(struct tty_struct *tty, struct file *file)
 
285
static int if_tiocmget(struct tty_struct *tty)
284
286
{
285
287
        struct cardstate *cs;
286
288
        int retval;
303
305
        return retval;
304
306
}
305
307
 
306
 
static int if_tiocmset(struct tty_struct *tty, struct file *file,
 
308
static int if_tiocmset(struct tty_struct *tty,
307
309
                       unsigned int set, unsigned int clear)
308
310
{
309
311
        struct cardstate *cs;