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/via Empty suspend/resume handler for v...



details:   https://anonhg.NetBSD.org/src/rev/eb3c9cebd70d
branches:  trunk
changeset: 337825:eb3c9cebd70d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Apr 29 12:30:43 2015 +0000

description:
Empty suspend/resume handler for viadrmums.

diffstat:

 sys/external/bsd/drm2/via/via_pci.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 62c84f923961 -r eb3c9cebd70d sys/external/bsd/drm2/via/via_pci.c
--- a/sys/external/bsd/drm2/via/via_pci.c       Wed Apr 29 11:37:31 2015 +0000
+++ b/sys/external/bsd/drm2/via/via_pci.c       Wed Apr 29 12:30:43 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: via_pci.c,v 1.1 2015/04/29 11:25:36 riastradh Exp $    */
+/*     $NetBSD: via_pci.c,v 1.2 2015/04/29 12:30:43 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,10 +30,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: via_pci.c,v 1.1 2015/04/29 11:25:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: via_pci.c,v 1.2 2015/04/29 12:30:43 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/device.h>
+#include <sys/pmf.h>
 #include <sys/systm.h>
 
 #include <linux/pci.h>
@@ -112,6 +113,9 @@
 
        KASSERT(cookiep != NULL);
 
+       if (!pmf_device_register(self, NULL, NULL))
+               aprint_error_dev(self, "couldn't establish power handler\n");
+
        /* XXX errno Linux->NetBSD */
        error = -drm_pci_attach(self, pa, &sc->sc_pci_dev, via_drm_driver,
            *cookiep, &sc->sc_drm_dev);
@@ -137,5 +141,6 @@
        if (error)
                return error;
        sc->sc_drm_dev = NULL;
+       pmf_device_deregister(self);
 out:   return 0;
 }



Home | Main Index | Thread Index | Old Index