2020-02-05 17:43:02 +01:00
|
|
|
/*
|
2023-02-14 15:03:52 +00:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2020-02-05 17:43:02 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/os_interface/linux/hw_device_id.h"
|
|
|
|
|
#include "shared/source/os_interface/linux/sys_calls.h"
|
2020-02-05 17:43:02 +01:00
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
2023-02-14 15:03:52 +00:00
|
|
|
void HwDeviceIdDrm::closeFileDescriptor() {
|
|
|
|
|
if (fileDescriptor > 0) {
|
|
|
|
|
SysCalls::close(fileDescriptor);
|
|
|
|
|
fileDescriptor = -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-24 17:34:55 +00:00
|
|
|
HwDeviceIdDrm::~HwDeviceIdDrm() {
|
2023-02-14 15:03:52 +00:00
|
|
|
closeFileDescriptor();
|
2020-02-05 17:43:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace NEO
|