1. 程式人生 > >Linux驅動開發雜記(0x10)

Linux驅動開發雜記(0x10)

struct uart_driver {
    struct module     *owner;           /* 擁有該uart_driver的模組,一般為THIS_MODULE */
    const char        *driver_name;     /* 串列埠驅動名,串列埠裝置檔名以驅動名為基礎 */
    const char        *dev_name;        /* 串列埠裝置名 */
    int                major;           /* 主裝置號 */
    int                minor;           /* 次裝置號 */
int nr; /* 該uart_driver支援的串列埠個數(最大) */ struct console *cons; /* 其對應的console.若該uart_driver支援serial console,否則為NULL */ /* * these are private; the low level driver should not * touch these; they should be initialised to NULL */ struct
uart_state *state; struct tty_driver *tty_driver; };