diff options
Diffstat (limited to 'drivers/tty/tty_ldisc.c')
-rw-r--r-- | drivers/tty/tty_ldisc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index 1c4d7b6d8a76..5bdc241628ac 100644 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c | |||
@@ -308,19 +308,19 @@ EXPORT_SYMBOL_GPL(tty_ldisc_deref); | |||
308 | 308 | ||
309 | 309 | ||
310 | static inline int __lockfunc | 310 | static inline int __lockfunc |
311 | tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout) | 311 | __tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout) |
312 | { | 312 | { |
313 | return ldsem_down_write(&tty->ldisc_sem, timeout); | 313 | return ldsem_down_write(&tty->ldisc_sem, timeout); |
314 | } | 314 | } |
315 | 315 | ||
316 | static inline int __lockfunc | 316 | static inline int __lockfunc |
317 | tty_ldisc_lock_nested(struct tty_struct *tty, unsigned long timeout) | 317 | __tty_ldisc_lock_nested(struct tty_struct *tty, unsigned long timeout) |
318 | { | 318 | { |
319 | return ldsem_down_write_nested(&tty->ldisc_sem, | 319 | return ldsem_down_write_nested(&tty->ldisc_sem, |
320 | LDISC_SEM_OTHER, timeout); | 320 | LDISC_SEM_OTHER, timeout); |
321 | } | 321 | } |
322 | 322 | ||
323 | static inline void tty_ldisc_unlock(struct tty_struct *tty) | 323 | static inline void __tty_ldisc_unlock(struct tty_struct *tty) |
324 | { | 324 | { |
325 | return ldsem_up_write(&tty->ldisc_sem); | 325 | return ldsem_up_write(&tty->ldisc_sem); |
326 | } | 326 | } |
@@ -332,24 +332,24 @@ tty_ldisc_lock_pair_timeout(struct tty_struct *tty, struct tty_struct *tty2, | |||
332 | int ret; | 332 | int ret; |
333 | 333 | ||
334 | if (tty < tty2) { | 334 | if (tty < tty2) { |
335 | ret = tty_ldisc_lock(tty, timeout); | 335 | ret = __tty_ldisc_lock(tty, timeout); |
336 | if (ret) { | 336 | if (ret) { |
337 | ret = tty_ldisc_lock_nested(tty2, timeout); | 337 | ret = __tty_ldisc_lock_nested(tty2, timeout); |
338 | if (!ret) | 338 | if (!ret) |
339 | tty_ldisc_unlock(tty); | 339 | __tty_ldisc_unlock(tty); |
340 | } | 340 | } |
341 | } else { | 341 | } else { |
342 | /* if this is possible, it has lots of implications */ | 342 | /* if this is possible, it has lots of implications */ |
343 | WARN_ON_ONCE(tty == tty2); | 343 | WARN_ON_ONCE(tty == tty2); |
344 | if (tty2 && tty != tty2) { | 344 | if (tty2 && tty != tty2) { |
345 | ret = tty_ldisc_lock(tty2, timeout); | 345 | ret = __tty_ldisc_lock(tty2, timeout); |
346 | if (ret) { | 346 | if (ret) { |
347 | ret = tty_ldisc_lock_nested(tty, timeout); | 347 | ret = __tty_ldisc_lock_nested(tty, timeout); |
348 | if (!ret) | 348 | if (!ret) |
349 | tty_ldisc_unlock(tty2); | 349 | __tty_ldisc_unlock(tty2); |
350 | } | 350 | } |
351 | } else | 351 | } else |
352 | ret = tty_ldisc_lock(tty, timeout); | 352 | ret = __tty_ldisc_lock(tty, timeout); |
353 | } | 353 | } |
354 | 354 | ||
355 | if (!ret) | 355 | if (!ret) |
@@ -370,9 +370,9 @@ tty_ldisc_lock_pair(struct tty_struct *tty, struct tty_struct *tty2) | |||
370 | static void __lockfunc tty_ldisc_unlock_pair(struct tty_struct *tty, | 370 | static void __lockfunc tty_ldisc_unlock_pair(struct tty_struct *tty, |
371 | struct tty_struct *tty2) | 371 | struct tty_struct *tty2) |
372 | { | 372 | { |
373 | tty_ldisc_unlock(tty); | 373 | __tty_ldisc_unlock(tty); |
374 | if (tty2) | 374 | if (tty2) |
375 | tty_ldisc_unlock(tty2); | 375 | __tty_ldisc_unlock(tty2); |
376 | } | 376 | } |
377 | 377 | ||
378 | static void __lockfunc tty_ldisc_enable_pair(struct tty_struct *tty, | 378 | static void __lockfunc tty_ldisc_enable_pair(struct tty_struct *tty, |