diff options
| author | riastradh <riastradh@NetBSD.org> | 2015-05-30 16:44:28 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2015-05-30 16:44:28 +0000 |
| commit | db6af7cb2aaeff41e98cbb581b8a8d972add4d84 (patch) | |
| tree | 56545d0622dbca52ec2b64bf42d4743ec2f4c8c1 /sys/dev | |
| parent | a0a3713d07ce4fcb0a160a25301042fa5910c449 (diff) | |
Null suspend/resume handler for uplcom(4).
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/uplcom.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index fb8d1f654e4..0e9f64c48fa 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -1,4 +1,4 @@ -/* $NetBSD: uplcom.c,v 1.74 2014/07/14 12:04:48 ryoon Exp $ */ +/* $NetBSD: uplcom.c,v 1.75 2015/05/30 16:44:28 riastradh Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.74 2014/07/14 12:04:48 ryoon Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.75 2015/05/30 16:44:28 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -418,6 +418,9 @@ uplcom_attach(device_t parent, device_t self, void *aux) sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, ucomprint, ucomsubmatch); + if (!pmf_device_register(self, NULL, NULL)) + aprint_error_dev(self, "couldn't establish power handler\n"); + return; } @@ -452,6 +455,9 @@ uplcom_detach(device_t self, int flags) usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, sc->sc_dev); + if (rv == 0) + pmf_device_deregister(self); + return (rv); } |
