mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 11:06:39 +07:00
86e437f077
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>
14 lines
333 B
C
14 lines
333 B
C
#ifndef __ACPI_VIDEO_H
|
|
#define __ACPI_VIDEO_H
|
|
|
|
#if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE)
|
|
extern int acpi_video_register(void);
|
|
extern void acpi_video_unregister(void);
|
|
#else
|
|
static inline int acpi_video_register(void) { return 0; }
|
|
static inline void acpi_video_unregister(void) { return; }
|
|
#endif
|
|
|
|
#endif
|
|
|