From 61df4475a17a82000e7d8041f6bc3f8e788bafa8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 19 Aug 2024 00:03:12 +0000 Subject: [PATCH] pvbus_activate does nothing except call config_activate_children (4 possible cases). it does not need to exist. encoding NULL into the cfattach structure does the same thing. --- sys/dev/pv/pvbus.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/sys/dev/pv/pvbus.c b/sys/dev/pv/pvbus.c index 38910973862..165fcc9fbff 100644 --- a/sys/dev/pv/pvbus.c +++ b/sys/dev/pv/pvbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pvbus.c,v 1.28 2024/05/24 10:05:55 jsg Exp $ */ +/* $OpenBSD: pvbus.c,v 1.29 2024/08/19 00:03:12 deraadt Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -45,7 +45,6 @@ int has_hv_cpuid = 0; extern void rdrand(void *); -int pvbus_activate(struct device *, int); int pvbus_match(struct device *, void *, void *); void pvbus_attach(struct device *, struct device *, void *); int pvbus_print(void *, const char *); @@ -64,8 +63,6 @@ const struct cfattach pvbus_ca = { sizeof(struct pvbus_softc), pvbus_match, pvbus_attach, - NULL, - pvbus_activate }; struct cfdriver pvbus_cd = { @@ -218,29 +215,6 @@ pvbus_init_cpu(void) } } -int -pvbus_activate(struct device *self, int act) -{ - int rv = 0; - - switch (act) { - case DVACT_SUSPEND: - rv = config_activate_children(self, act); - break; - case DVACT_RESUME: - rv = config_activate_children(self, act); - break; - case DVACT_POWERDOWN: - rv = config_activate_children(self, act); - break; - default: - rv = config_activate_children(self, act); - break; - } - - return (rv); -} - int pvbus_search(struct device *parent, void *arg, void *aux) { -- 2.20.1