Lines Matching defs:index

309  *	@index: returns the index of the tty
312 * and also passes back the index number.
317 static struct tty_driver *get_tty_driver(dev_t device, int *index)
325 *index = device - base;
348 int index, prefix_length = 0;
357 ret = kstrtoint(str, 10, &index);
367 if (index < p->num) {
368 *number = MKDEV(p->major, p->minor_start + index);
1189 * @index: the minor number
1197 static void pty_line_name(struct tty_driver *driver, int index, char *p)
1199 int i = index + driver->name_base;
1209 * @index: the minor number
1217 static ssize_t tty_line_name(struct tty_driver *driver, int index, char *p)
1223 index + driver->name_base);
1267 int idx = tty->index;
1291 driver->ttys[tty->index] = tty;
1301 * Install a tty object into the driver tables. The tty->index field
1320 * Remvoe a tty object from the driver tables. The tty->index field
1330 driver->ttys[tty->index] = NULL;
1380 * @idx: device index
1483 int idx = tty->index;
1595 WARN_ON(tty->index != idx);
1617 * @idx: index of the tty
1681 release_tty(tty, tty->index);
1689 * @idx: index of the tty
1751 idx = tty->index;
1882 * We cannot return driver and index like for the other nodes because
1914 * @index: index for the device in the @return driver
1923 int *index)
1932 *index = fg_console;
1937 struct tty_driver *console_driver = console_device(index);
1951 driver = get_tty_driver(device, index);
1978 int index = -1;
1981 driver = tty_lookup_driver(device, NULL, &index);
1988 tty = tty_driver_lookup_tty(driver, NULL, index);
1997 tty = tty_init_dev(driver, index);
2029 int index = -1;
2033 driver = tty_lookup_driver(device, filp, &index);
2040 tty = tty_driver_lookup_tty(driver, filp, index);
2068 tty = tty_init_dev(driver, index);
3106 tty->index = idx;
3136 unsigned int index, unsigned int count)
3141 driver->cdevs[index] = cdev_alloc();
3142 if (!driver->cdevs[index])
3144 driver->cdevs[index]->ops = &tty_fops;
3145 driver->cdevs[index]->owner = driver->owner;
3146 err = cdev_add(driver->cdevs[index], dev, count);
3148 kobject_put(&driver->cdevs[index]->kobj);
3155 * @index: the index in the tty driver for this tty device
3171 struct device *tty_register_device(struct tty_driver *driver, unsigned index,
3174 return tty_register_device_attr(driver, index, device, NULL, NULL);
3187 * @index: the index in the tty driver for this tty device
3205 unsigned index, struct device *device,
3210 dev_t devt = MKDEV(driver->major, driver->minor_start) + index;
3215 if (index >= driver->num) {
3217 driver->name, index);
3222 pty_line_name(driver, index, name);
3224 tty_line_name(driver, index, name);
3249 tp = driver->termios[index];
3251 driver->termios[index] = NULL;
3255 retval = tty_cdev_add(driver, devt, index, 1);
3277 * @index: the index in the tty driver for this tty device
3285 void tty_unregister_device(struct tty_driver *driver, unsigned index)
3288 MKDEV(driver->major, driver->minor_start) + index);
3290 cdev_del(driver->cdevs[index]);
3291 driver->cdevs[index] = NULL;
3493 return MKDEV(tty->driver->major, tty->driver->minor_start) + tty->index;
3547 int index = cs[i]->index;
3548 struct tty_driver *drv = cs[i]->device(cs[i], &index);
3551 if (drv && (cs[i]->index > 0 || drv->major != TTY_MAJOR))
3552 count += tty_line_name(drv, index, buf + count);
3555 cs[i]->name, cs[i]->index);