Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm Initialize and destroy aux->h...
details: https://anonhg.NetBSD.org/src/rev/9ddc7c1f9706
branches: trunk
changeset: 834902:9ddc7c1f9706
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 06:52:45 2018 +0000
description:
Initialize and destroy aux->hw_mutex appropriately.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_dp_helper.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (41 lines):
diff -r 65c2e52c49c3 -r 9ddc7c1f9706 sys/external/bsd/drm2/dist/drm/drm_dp_helper.c
--- a/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c Mon Aug 27 06:52:34 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c Mon Aug 27 06:52:45 2018 +0000
@@ -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 @@
*/
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 @@
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);
Home |
Main Index |
Thread Index |
Old Index