Module Name: src Committed By: uwe Date: Sun Apr 5 02:35:03 UTC 2009
Modified Files: src/sys/dev/pcmcia: wdc_pcmcia.c Log Message: Register with pmf(9), tell it we don't need anything. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/dev/pcmcia/wdc_pcmcia.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/dev/pcmcia/wdc_pcmcia.c diff -u src/sys/dev/pcmcia/wdc_pcmcia.c:1.114 src/sys/dev/pcmcia/wdc_pcmcia.c:1.115 --- src/sys/dev/pcmcia/wdc_pcmcia.c:1.114 Sat Mar 21 12:35:17 2009 +++ src/sys/dev/pcmcia/wdc_pcmcia.c Sun Apr 5 02:35:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_pcmcia.c,v 1.114 2009/03/21 12:35:17 drochner Exp $ */ +/* $NetBSD: wdc_pcmcia.c,v 1.115 2009/04/05 02:35:03 uwe Exp $ */ /*- * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.114 2009/03/21 12:35:17 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.115 2009/04/05 02:35:03 uwe Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -320,6 +320,10 @@ tsleep(wdc_pcmcia_attach, PWAIT, "wdcattach", hz / 2); wdcattach(&sc->ata_channel); + + if (!pmf_device_register(self, NULL, NULL)) + aprint_error_dev(self, "unable to establish power handler\n"); + config_pending_decr(); ata_delref(&sc->ata_channel); sc->sc_state = WDC_PCMCIA_ATTACHED; @@ -338,6 +342,8 @@ if (sc->sc_state != WDC_PCMCIA_ATTACHED) return (0); + pmf_device_deregister(self); + if ((error = wdcdetach(self, flags)) != 0) return (error);