File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -124,17 +124,16 @@ EXPORT_SYMBOL(tty_unthrottle);
124
124
* conditions when throttling is conditional on factors evaluated prior to
125
125
* throttling.
126
126
*
127
- * Returns 0 if tty is throttled (or was already throttled)
127
+ * Returns false if tty is throttled (or was already throttled)
128
128
*/
129
-
130
- int tty_throttle_safe (struct tty_struct * tty )
129
+ bool tty_throttle_safe (struct tty_struct * tty )
131
130
{
132
- int ret = 0 ;
131
+ bool ret = false ;
133
132
134
133
mutex_lock (& tty -> throttle_mutex );
135
134
if (!tty_throttled (tty )) {
136
135
if (tty -> flow_change != TTY_THROTTLE_SAFE )
137
- ret = 1 ;
136
+ ret = true ;
138
137
else {
139
138
set_bit (TTY_THROTTLED , & tty -> flags );
140
139
if (tty -> ops -> throttle )
@@ -155,17 +154,16 @@ int tty_throttle_safe(struct tty_struct *tty)
155
154
* unthrottle due to race conditions when unthrottling is conditional
156
155
* on factors evaluated prior to unthrottling.
157
156
*
158
- * Returns 0 if tty is unthrottled (or was already unthrottled)
157
+ * Returns false if tty is unthrottled (or was already unthrottled)
159
158
*/
160
-
161
- int tty_unthrottle_safe (struct tty_struct * tty )
159
+ bool tty_unthrottle_safe (struct tty_struct * tty )
162
160
{
163
- int ret = 0 ;
161
+ bool ret = false ;
164
162
165
163
mutex_lock (& tty -> throttle_mutex );
166
164
if (tty_throttled (tty )) {
167
165
if (tty -> flow_change != TTY_UNTHROTTLE_SAFE )
168
- ret = 1 ;
166
+ ret = true ;
169
167
else {
170
168
clear_bit (TTY_THROTTLED , & tty -> flags );
171
169
if (tty -> ops -> unthrottle )
Original file line number Diff line number Diff line change @@ -416,8 +416,8 @@ unsigned int tty_chars_in_buffer(struct tty_struct *tty);
416
416
unsigned int tty_write_room (struct tty_struct * tty );
417
417
void tty_driver_flush_buffer (struct tty_struct * tty );
418
418
void tty_unthrottle (struct tty_struct * tty );
419
- int tty_throttle_safe (struct tty_struct * tty );
420
- int tty_unthrottle_safe (struct tty_struct * tty );
419
+ bool tty_throttle_safe (struct tty_struct * tty );
420
+ bool tty_unthrottle_safe (struct tty_struct * tty );
421
421
int tty_do_resize (struct tty_struct * tty , struct winsize * ws );
422
422
int tty_get_icount (struct tty_struct * tty ,
423
423
struct serial_icounter_struct * icount );
You can’t perform that action at this time.
0 commit comments