From c36db208d38f01c3ff26d7b70f852cde01fb15ee Mon Sep 17 00:00:00 2001 From: njl Date: Thu, 15 Jul 2004 16:39:40 +0000 Subject: Re-work for fdc_acpi. Expose fdc_add_child() and move the static hints-based probe to fdc_hints_probe(). Also: * Fix some resource leaks when attach fails. * Remove the FDC_ATTACHED flag. It was supposed to prevent multiple unloads but this is not necessary. --- sys/dev/fdc/fdcvar.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/dev/fdc/fdcvar.h') diff --git a/sys/dev/fdc/fdcvar.h b/sys/dev/fdc/fdcvar.h index 30dd825..3322575 100644 --- a/sys/dev/fdc/fdcvar.h +++ b/sys/dev/fdc/fdcvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 M. Warner Losh. * All rights reserved. * @@ -80,7 +80,6 @@ struct fdc_data int dmacnt; int dmachan; int flags; -#define FDC_ATTACHED 0x01 #define FDC_STAT_VALID 0x08 #define FDC_HAS_FIFO 0x10 #define FDC_NEEDS_RESET 0x20 @@ -137,8 +136,11 @@ void fdout_wr(fdc_p, u_int8_t); int fd_cmd(struct fdc_data *, int, ...); void fdc_release_resources(struct fdc_data *); int fdc_attach(device_t); +int fdc_hints_probe(device_t); int fdc_detach(device_t dev); +device_t fdc_add_child(device_t, const char *, int); int fdc_initial_reset(struct fdc_data *); int fdc_print_child(device_t, device_t); int fdc_read_ivar(device_t, device_t, int, uintptr_t *); int fdc_write_ivar(device_t, device_t, int, uintptr_t); +int fdc_isa_alloc_resources(device_t, struct fdc_data *); -- cgit v1.1