forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/drivers/video/console/dummycon.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/drivers/video/dummycon.c -- A dummy console driver
34 *
....@@ -33,6 +34,8 @@
3334
3435 void dummycon_register_output_notifier(struct notifier_block *nb)
3536 {
37
+ WARN_CONSOLE_UNLOCKED();
38
+
3639 raw_notifier_chain_register(&dummycon_output_nh, nb);
3740
3841 if (dummycon_putc_called)
....@@ -41,11 +44,15 @@
4144
4245 void dummycon_unregister_output_notifier(struct notifier_block *nb)
4346 {
47
+ WARN_CONSOLE_UNLOCKED();
48
+
4449 raw_notifier_chain_unregister(&dummycon_output_nh, nb);
4550 }
4651
4752 static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos)
4853 {
54
+ WARN_CONSOLE_UNLOCKED();
55
+
4956 dummycon_putc_called = true;
5057 raw_notifier_call_chain(&dummycon_output_nh, 0, NULL);
5158 }