Module Name: src
Committed By: riastradh
Date: Mon Aug 27 06:52:45 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/dist/drm: drm_dp_helper.c
Log Message:
Initialize and destroy aux->hw_mutex appropriately.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c
diff -u src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c:1.7 src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c:1.8
--- src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c:1.7 Mon Aug 27 06:47:19 2018
+++ src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c Mon Aug 27 06:52:45 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_dp_helper.c,v 1.7 2018/08/27 06:47:19 riastradh Exp $ */
+/* $NetBSD: drm_dp_helper.c,v 1.8 2018/08/27 06:52:45 riastradh Exp $ */
/*
* Copyright © 2009 Keith Packard
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_dp_helper.c,v 1.7 2018/08/27 06:47:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_dp_helper.c,v 1.8 2018/08/27 06:52:45 riastradh Exp $");
#include <linux/kernel.h>
#include <linux/module.h>
@@ -769,7 +769,11 @@ static const struct i2c_algorithm drm_dp
*/
int drm_dp_aux_register(struct drm_dp_aux *aux)
{
+#ifdef __NetBSD__
+ linux_mutex_init(&aux->hw_mutex);
+#else
mutex_init(&aux->hw_mutex);
+#endif
aux->ddc.algo = &drm_dp_i2c_algo;
aux->ddc.algo_data = aux;
@@ -796,5 +800,10 @@ EXPORT_SYMBOL(drm_dp_aux_register);
void drm_dp_aux_unregister(struct drm_dp_aux *aux)
{
i2c_del_adapter(&aux->ddc);
+#ifdef __NetBSD__
+ linux_mutex_destroy(&aux->hw_mutex);
+#else
+ mutex_destroy(&aux->hw_mutex);
+#endif
}
EXPORT_SYMBOL(drm_dp_aux_unregister);