From owner-freebsd-multimedia Mon Jul 21 04:47:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA08909 for multimedia-outgoing; Mon, 21 Jul 1997 04:47:03 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA08902; Mon, 21 Jul 1997 04:46:44 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id VAA10007; Mon, 21 Jul 1997 21:33:47 +1000 Date: Mon, 21 Jul 1997 21:33:47 +1000 From: Bruce Evans Message-Id: <199707211133.VAA10007@godzilla.zeta.org.au> To: bde@zeta.org.au, se@FreeBSD.ORG Subject: Re: snd driver attach routine Cc: hackers@FreeBSD.ORG, hasty@rah.star-gate.com, luigi@labinfo.iet.unipi.it, multimedia@FreeBSD.ORG, rhh@ct.picker.com Sender: owner-freebsd-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> >Problem: what should be the return type of *attach() routines ? >> >> Perhaps it should be void to match reality, but it currently must be >> int for isa drivers to match the prototype in `struct isa_driver'. >> >> >The drivers in /sys/pci all return void for the attach routine. >> >> They have to, to match the prototype in `strcuct pci_driver'. > >I could easily change the return type of >the PCI attach function. Should I ??? If anything is attached above the driver level, then you need a status from the driver attach to decide whether to clean up or attach more. For ISA, only interrupts are attached at a high level, but they shouldn't be, so ISA attach function shouldn't need to return status (but they should clean up if they fail). I'm not sure about PCI. Bruce