diff options
author | 2013-10-20 11:16:56 +0000 | |
---|---|---|
committer | 2013-10-20 11:16:56 +0000 | |
commit | f7fdd60ae96b29770cce7ba9e2c3067eecc7c401 (patch) | |
tree | fe477f74993aee4a113e055a632f8d7964b4c29c | |
parent | Put a large chunk of the IPv6 rdomain support in-tree. (diff) | |
download | wireguard-openbsd-f7fdd60ae96b29770cce7ba9e2c3067eecc7c401.tar.xz wireguard-openbsd-f7fdd60ae96b29770cce7ba9e2c3067eecc7c401.zip |
Simplify definition of the side-effect-free wd io routine.
-rw-r--r-- | sys/arch/amd64/amd64/hibernate_machdep.c | 12 | ||||
-rw-r--r-- | sys/arch/i386/i386/hibernate_machdep.c | 12 |
2 files changed, 10 insertions, 14 deletions
diff --git a/sys/arch/amd64/amd64/hibernate_machdep.c b/sys/arch/amd64/amd64/hibernate_machdep.c index 7ba95610682..ec9f0b04dc9 100644 --- a/sys/arch/amd64/amd64/hibernate_machdep.c +++ b/sys/arch/amd64/amd64/hibernate_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hibernate_machdep.c,v 1.15 2013/10/20 09:41:31 mlarkin Exp $ */ +/* $OpenBSD: hibernate_machdep.c,v 1.16 2013/10/20 11:16:56 deraadt Exp $ */ /* * Copyright (c) 2012 Mike Larkin <mlarkin@openbsd.org> @@ -47,11 +47,6 @@ #include "ahci.h" #include "sd.h" -#if NWD > 0 -#include <dev/ata/atavar.h> -#include <dev/ata/wdvar.h> -#endif - /* Hibernate support */ void hibernate_enter_resume_4k_pte(vaddr_t, paddr_t); void hibernate_enter_resume_2m_pde(vaddr_t, paddr_t); @@ -81,8 +76,11 @@ get_hibernate_io_function(void) return NULL; #if NWD > 0 - if (strcmp(blkname, "wd") == 0) + if (strcmp(blkname, "wd") == 0) { + extern int wd_hibernate_io(dev_t dev, daddr_t blkno, + vaddr_t addr, size_t size, int op, void *page); return wd_hibernate_io; + } #endif #if NAHCI > 0 && NSD > 0 if (strcmp(blkname, "sd") == 0) { diff --git a/sys/arch/i386/i386/hibernate_machdep.c b/sys/arch/i386/i386/hibernate_machdep.c index 51f1ca25eb7..cd600eaf517 100644 --- a/sys/arch/i386/i386/hibernate_machdep.c +++ b/sys/arch/i386/i386/hibernate_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hibernate_machdep.c,v 1.27 2013/10/20 09:41:31 mlarkin Exp $ */ +/* $OpenBSD: hibernate_machdep.c,v 1.28 2013/10/20 11:16:56 deraadt Exp $ */ /* * Copyright (c) 2011 Mike Larkin <mlarkin@openbsd.org> @@ -45,11 +45,6 @@ #include "ahci.h" #include "sd.h" -#if NWD > 0 -#include <dev/ata/atavar.h> -#include <dev/ata/wdvar.h> -#endif - /* Hibernate support */ void hibernate_enter_resume_4k_pte(vaddr_t, paddr_t); void hibernate_enter_resume_4k_pde(vaddr_t); @@ -79,8 +74,11 @@ get_hibernate_io_function(void) if (blkname == NULL) return NULL; #if NWD > 0 - if (strcmp(blkname, "wd") == 0) + if (strcmp(blkname, "wd") == 0) { + extern int wd_hibernate_io(dev_t dev, daddr_t blkno, + vaddr_t addr, size_t size, int op, void *page); return wd_hibernate_io; + } #endif #if NAHCI > 0 && NSD > 0 if (strcmp(blkname, "sd") == 0) { |