summaryrefslogtreecommitdiff
path: root/include/acpi/video.h
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2009-06-16 11:23:13 +0800
committerLen Brown <len.brown@intel.com>2009-06-23 23:38:41 -0400
commit86e437f077c68112edcb6854ec036ed7e3f9a7f3 (patch)
treeac6ec8b6ac4f96ce7ef7b5e9fa057099d7ce9af1 /include/acpi/video.h
parent07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff)
downloadlinux-3.10-86e437f077c68112edcb6854ec036ed7e3f9a7f3.tar.gz
linux-3.10-86e437f077c68112edcb6854ec036ed7e3f9a7f3.tar.bz2
linux-3.10-86e437f077c68112edcb6854ec036ed7e3f9a7f3.zip
ACPI: Add the reference count to avoid unloading ACPI video bus twice
Sometimes both acpi video and i915 driver are compiled as modules. And there exists the strict dependency between the two drivers. The acpi video bus will be unloaded in course of unloading the i915 driver. If we unload the acpi video driver, then the kernel oops will be triggered. Add the reference count to avoid unloading the ACPI video bus twice. The reference count should be checked before unregistering the acpi video bus. If the reference count is already zero, it won't unregister it again. And after the acpi video bus is already unregistered, the reference count will be set to zero. http://bugzilla.kernel.org/show_bug.cgi?id=13396 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/video.h')
-rw-r--r--include/acpi/video.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/acpi/video.h b/include/acpi/video.h
index af6fe95fd3d..cf7be3dd157 100644
--- a/include/acpi/video.h
+++ b/include/acpi/video.h
@@ -3,10 +3,10 @@
#if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE)
extern int acpi_video_register(void);
-extern int acpi_video_exit(void);
+extern void acpi_video_unregister(void);
#else
static inline int acpi_video_register(void) { return 0; }
-static inline void acpi_video_exit(void) { return; }
+static inline void acpi_video_unregister(void) { return; }
#endif
#endif