int (*write)(struct serio *, unsignedchar); int (*open)(struct serio *); void (*close)(struct serio *); int (*start)(struct serio *); void (*stop)(struct serio *);
struct serio *parent; /* Entry in parent->children list */ struct list_head child_node; struct list_head children; /* Level of nesting in serio hierarchy */ unsignedint depth;
/* * serio->drv is accessed from interrupt handlers; when modifying * caller should acquire serio->drv_mutex and serio->lock.
*/ struct serio_driver *drv; /* Protects serio->drv so attributes can pin current driver */ struct mutex drv_mutex;
struct device dev;
struct list_head node;
/* * For use by PS/2 layer when several ports share hardware and * may get indigestion when exposed to concurrent access (i8042).
*/ struct mutex *ps2_cmd_mutex;
}; #define to_serio_port(d) container_of(d, struct serio, dev)
int __must_check __serio_register_driver(struct serio_driver *drv, struct module *owner, constchar *mod_name);
/* use a define to avoid include chaining to get THIS_MODULE & friends */ #define serio_register_driver(drv) \
__serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME)
/** * module_serio_driver() - Helper macro for registering a serio driver * @__serio_driver: serio_driver struct * * Helper macro for serio drivers which do not do anything special in * module init/exit. This eliminates a lot of boilerplate. Each module * may only use this macro once, and calling it replaces module_init() * and module_exit().
*/ #define module_serio_driver(__serio_driver) \
module_driver(__serio_driver, serio_register_driver, \
serio_unregister_driver)
/* * Use the following functions to protect critical sections in * driver code from port's interrupt handler
*/ staticinlinevoid serio_pause_rx(struct serio *serio)
{
spin_lock_irq(&serio->lock);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.