Module Name: src Committed By: riastradh Date: Sun Sep 8 15:26:24 UTC 2013
Modified Files: src/sys/external/bsd/drm2/drm [riastradh-drm2]: drm_module.c Log Message: Initialize and destroy drm_global_mutex on module init/fini. To generate a diff of this commit: cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/external/bsd/drm2/drm/drm_module.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/drm/drm_module.c diff -u src/sys/external/bsd/drm2/drm/drm_module.c:1.1.2.5 src/sys/external/bsd/drm2/drm/drm_module.c:1.1.2.6 --- src/sys/external/bsd/drm2/drm/drm_module.c:1.1.2.5 Wed Jul 24 03:51:04 2013 +++ src/sys/external/bsd/drm2/drm/drm_module.c Sun Sep 8 15:26:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_module.c,v 1.1.2.5 2013/07/24 03:51:04 riastradh Exp $ */ +/* $NetBSD: drm_module.c,v 1.1.2.6 2013/09/08 15:26:24 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.1.2.5 2013/07/24 03:51:04 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.1.2.6 2013/09/08 15:26:24 riastradh Exp $"); #include <sys/types.h> #include <sys/device.h> @@ -38,6 +38,9 @@ __KERNEL_RCSID(0, "$NetBSD: drm_module.c #include <sys/systm.h> #include <linux/highmem.h> +#include <linux/mutex.h> + +#include <drm/drmP.h> /* * XXX I2C stuff should be moved to a separate drm2edid module. @@ -65,6 +68,7 @@ drm2_modcmd(modcmd_t cmd, void *arg __un switch (cmd) { case MODULE_CMD_INIT: + linux_mutex_init(&drm_global_mutex); error = linux_kmap_init(); if (error) { aprint_error("drm: unable to initialize linux kmap:" @@ -105,6 +109,7 @@ drm2_modcmd(modcmd_t cmd, void *arg __un return error; #endif linux_kmap_fini(); + linux_mutex_destroy(&drm_global_mutex); return 0; default: