From 5cf841df774555e30a0f5eddb5e8eadef61dfc1f Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Mon, 22 Nov 2004 15:37:43 +0000 Subject: added detach function to support hotpluggable gpios. ok grange@ --- sys/dev/gpio/gpio.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpio.c b/sys/dev/gpio/gpio.c index 42bad4f66ff..880beba48d2 100644 --- a/sys/dev/gpio/gpio.c +++ b/sys/dev/gpio/gpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpio.c,v 1.2 2004/09/15 17:47:52 grange Exp $ */ +/* $OpenBSD: gpio.c,v 1.3 2004/11/22 15:37:42 reyk Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko * @@ -40,13 +40,15 @@ struct gpio_softc { int gpio_match(struct device *, void *, void *); void gpio_attach(struct device *, struct device *, void *); +int gpio_detach(struct device *, int); int gpio_search(struct device *, void *, void *); int gpio_print(void *, const char *); struct cfattach gpio_ca = { sizeof (struct gpio_softc), gpio_match, - gpio_attach + gpio_attach, + gpio_detach }; struct cfdriver gpio_cd = { @@ -84,6 +86,12 @@ gpio_attach(struct device *parent, struct device *self, void *aux) config_search(gpio_search, self, NULL); } +int +gpio_detach(struct device *parent, int flags) +{ + return (0); +} + int gpio_search(struct device *parent, void *arg, void *aux) { -- cgit v1.2.3