From owner-freebsd-arch@FreeBSD.ORG Mon Dec 19 18:17:21 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0BF3106566C for ; Mon, 19 Dec 2011 18:17:21 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 6428D8FC08 for ; Mon, 19 Dec 2011 18:17:21 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 1367B73027; Mon, 19 Dec 2011 19:14:10 +0100 (CET) Date: Mon, 19 Dec 2011 19:14:10 +0100 From: Luigi Rizzo To: arch@freebsd.org Message-ID: <20111219181410.GA13742@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: generic pci device_probe routine ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 18:17:21 -0000 haven't done device drivers for a while, but i just noticed that pretty much all PCI drivers have their own replica of the *_probe code which does the same exact thing -- define an array of vendor,product entries, and lookup the entry in the array. Would it make sense (or, do we have already) to have common struct and routine, similar to what we have in usb_lookup.c ? cheers luigi