[igt-dev] [V4 i-g-t 04/24] lib/igt_msm: Use drm_close_driver() to close the drm fd
Kamil Konieczny
kamil.konieczny at linux.intel.com
Mon Jun 26 16:17:50 UTC 2023
Hi Bhanuprakash,
On 2023-06-26 at 10:40:11 +0530, Bhanuprakash Modem wrote:
> To close the drm file descriptor, use igt helper drm_close_driver()
> instead of using close().
>
> Cc: Rob Clark <robdclark at chromium.org>
> Cc: Abhinav Kumar <quic_abhinavk at quicinc.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
> lib/igt_msm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_msm.c b/lib/igt_msm.c
> index 8c0380f42..a236898b6 100644
> --- a/lib/igt_msm.c
> +++ b/lib/igt_msm.c
> @@ -87,7 +87,7 @@ igt_msm_dev_close(struct msm_device *dev)
> {
> if (!dev)
> return;
> - close(dev->fd);
> + drm_close_driver(dev->fd);
> free(dev);
> }
>
> --
> 2.40.0
>
More information about the igt-dev
mailing list