aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty_driver.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-04-13 03:50:21 -0400
committerIngo Molnar <mingo@kernel.org>2012-04-13 03:50:21 -0400
commit659c36fcda403013a01b85da07cf2d9711e6d6c7 (patch)
treeece2e7d0e2c19ea5a3d0ec172ad0b81a8a19021d /include/linux/tty_driver.h
parent9521d830b6341d1887dcfc2aebde23fbfa5f1473 (diff)
parent5a7ed29c7572d00a75e8c4529e30c5ac2ef82271 (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Fixes and improvements for perf/core: . Overhaul the tools/ makefiles, gluing them to the top level Makefile, from Borislav Petkov. . Move the UI files from tools/perf/util/ui/ to tools/perf/ui/. Also move the GTK+ browser to tools/perf/ui/gtk/, from Namhyung Kim. . Only fallback to sw cycles counter on ENOENT for the hw cycles, from Robert Richter . Trivial fixes from Robert Richter . Handle the autogenerated bison/flex files better, from Namhyung and Jiri Olsa. . Navigate jump instructions in the annotate browser, just press enter or ->, still needs support for a jump navigation history, i.e. to go back. . Search string in the annotate browser: same keys as vim: / forward n next backward/forward ? backward . Clarify number of events/samples in the report header, from Ashay Rane Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/tty_driver.h')
-rw-r--r--include/linux/tty_driver.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 5cf685086dd3..6e6dbb7447b6 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -50,6 +50,8 @@
50 * Note that tty_shutdown() is not called if ops->shutdown is defined. 50 * Note that tty_shutdown() is not called if ops->shutdown is defined.
51 * This means one is responsible to take care of calling ops->remove (e.g. 51 * This means one is responsible to take care of calling ops->remove (e.g.
52 * via tty_driver_remove_tty) and releasing tty->termios. 52 * via tty_driver_remove_tty) and releasing tty->termios.
53 * Note that this hook may be called from *all* the contexts where one
54 * uses tty refcounting (e.g. tty_port_tty_get).
53 * 55 *
54 * 56 *
55 * void (*cleanup)(struct tty_struct * tty); 57 * void (*cleanup)(struct tty_struct * tty);
@@ -234,6 +236,7 @@
234 * if provided (otherwise EINVAL will be returned). 236 * if provided (otherwise EINVAL will be returned).
235 */ 237 */
236 238
239#include <linux/export.h>
237#include <linux/fs.h> 240#include <linux/fs.h>
238#include <linux/list.h> 241#include <linux/list.h>
239#include <linux/cdev.h> 242#include <linux/cdev.h>
@@ -298,7 +301,6 @@ struct tty_driver {
298 int name_base; /* offset of printed name */ 301 int name_base; /* offset of printed name */
299 int major; /* major device number */ 302 int major; /* major device number */
300 int minor_start; /* start of minor device number */ 303 int minor_start; /* start of minor device number */
301 int minor_num; /* number of *possible* devices */
302 int num; /* number of devices allocated */ 304 int num; /* number of devices allocated */
303 short type; /* type of tty driver */ 305 short type; /* type of tty driver */
304 short subtype; /* subtype of tty driver */ 306 short subtype; /* subtype of tty driver */
@@ -324,7 +326,7 @@ struct tty_driver {
324 326
325extern struct list_head tty_drivers; 327extern struct list_head tty_drivers;
326 328
327extern struct tty_driver *alloc_tty_driver(int lines); 329extern struct tty_driver *__alloc_tty_driver(int lines, struct module *owner);
328extern void put_tty_driver(struct tty_driver *driver); 330extern void put_tty_driver(struct tty_driver *driver);
329extern void tty_set_operations(struct tty_driver *driver, 331extern void tty_set_operations(struct tty_driver *driver,
330 const struct tty_operations *op); 332 const struct tty_operations *op);
@@ -332,6 +334,8 @@ extern struct tty_driver *tty_find_polling_driver(char *name, int *line);
332 334
333extern void tty_driver_kref_put(struct tty_driver *driver); 335extern void tty_driver_kref_put(struct tty_driver *driver);
334 336
337#define alloc_tty_driver(lines) __alloc_tty_driver(lines, THIS_MODULE)
338
335static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) 339static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
336{ 340{
337 kref_get(&d->kref); 341 kref_get(&d->kref);