@@ -164,24 +164,44 @@ enum cons_flags {
164
164
CON_EXTENDED = BIT (6 ),
165
165
};
166
166
167
+ /**
168
+ * struct console - The console descriptor structure
169
+ * @name: The name of the console driver
170
+ * @write: Write callback to output messages (Optional)
171
+ * @read: Read callback for console input (Optional)
172
+ * @device: The underlying TTY device driver (Optional)
173
+ * @unblank: Callback to unblank the console (Optional)
174
+ * @setup: Callback for initializing the console (Optional)
175
+ * @exit: Callback for teardown of the console (Optional)
176
+ * @match: Callback for matching a console (Optional)
177
+ * @flags: Console flags. See enum cons_flags
178
+ * @index: Console index, e.g. port number
179
+ * @cflag: TTY control mode flags
180
+ * @ispeed: TTY input speed
181
+ * @ospeed: TTY output speed
182
+ * @seq: Sequence number of the next ringbuffer record to print
183
+ * @dropped: Number of unreported dropped ringbuffer records
184
+ * @data: Driver private data
185
+ * @node: hlist node for the console list
186
+ */
167
187
struct console {
168
- char name [16 ];
169
- void (* write )(struct console * , const char * , unsigned );
170
- int (* read )(struct console * , char * , unsigned );
171
- struct tty_driver * (* device )(struct console * , int * );
172
- void (* unblank )(void );
173
- int (* setup )(struct console * , char * );
174
- int (* exit )(struct console * );
175
- int (* match )(struct console * , char * name , int idx , char * options );
176
- short flags ;
177
- short index ;
178
- int cflag ;
179
- uint ispeed ;
180
- uint ospeed ;
181
- u64 seq ;
182
- unsigned long dropped ;
183
- void * data ;
184
- struct hlist_node node ;
188
+ char name [16 ];
189
+ void (* write )(struct console * co , const char * s , unsigned int count );
190
+ int (* read )(struct console * co , char * s , unsigned int count );
191
+ struct tty_driver * (* device )(struct console * co , int * index );
192
+ void (* unblank )(void );
193
+ int (* setup )(struct console * co , char * options );
194
+ int (* exit )(struct console * co );
195
+ int (* match )(struct console * co , char * name , int idx , char * options );
196
+ short flags ;
197
+ short index ;
198
+ int cflag ;
199
+ uint ispeed ;
200
+ uint ospeed ;
201
+ u64 seq ;
202
+ unsigned long dropped ;
203
+ void * data ;
204
+ struct hlist_node node ;
185
205
};
186
206
187
207
#ifdef CONFIG_LOCKDEP
0 commit comments