From owner-freebsd-hackers Thu Dec 6 10:44:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id B5F3437B41C for ; Thu, 6 Dec 2001 10:44:31 -0800 (PST) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.3) with ESMTP id fB6InW001279; Thu, 6 Dec 2001 10:49:32 -0800 (PST) (envelope-from msmith@mass.dis.org) Message-Id: <200112061849.fB6InW001279@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: "Stephen Hulten" Cc: freebsd-hackers@freebsd.org, sgh@silvannetworks.com Subject: Re: DRIVER_MODULE macro devclass_t argument used? In-reply-to: Your message of "Thu, 06 Dec 2001 01:51:21 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 06 Dec 2001 10:49:32 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > This makes me believe the devclass_t structure defined in a driver is > never used. Is there another code path I'm missing? Yes; there is a twisty maze of macros which ultimately results in the driver_module_data structure ending up in a linker set. The devclass structure is, as Warner pointed out, critical in maintaining correct numbering for a class of devices. For example; you can legitimately have several different drivers calling themselves "foo", but there must only be one "foo" devclass, and they all have to reference it. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message