From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephane Grosjean Subject: Re: [PATCH v4.3] peak_pci: add support for PEAK-System PCIe/PCIeC/miniPCI cards Date: Fri, 03 Feb 2012 14:02:45 +0100 Message-ID: <4F2BDAF5.30101@peak-system.com> References: <1328188792-2982-1-git-send-email-s.grosjean@peak-system.com> <4F2ACFE9.3080602@hartkopp.net> <4F2B16F9.8020903@hartkopp.net> <4F2BB498.60606@grandegger.com> <4F2BBA8C.3020501@peak-system.com> <4F2BBE24.5090601@grandegger.com> <4F2BCC8F.1060402@peak-system.com> <4F2BD302.7070803@grandegger.com> Reply-To: Stephane Grosjean Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail.peak-system.com ([213.157.13.214]:60754 "EHLO mail.peak-system.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753848Ab2BCNCz (ORCPT ); Fri, 3 Feb 2012 08:02:55 -0500 In-Reply-To: <4F2BD302.7070803@grandegger.com> Sender: linux-can-owner@vger.kernel.org List-ID: To: Wolfgang Grandegger Cc: Oliver Hartkopp , linux-can Mailing List Le 03/02/2012 13:28, Wolfgang Grandegger a =E9crit : > On 02/03/2012 01:01 PM, Stephane Grosjean wrote: >> Le 03/02/2012 11:59, Wolfgang Grandegger a =E9crit : >>> I mean, no support for the PCIEC >>> if CAN_PEAK_PCIEC is not enabled. >> ... Hmm: I don't know how to do that without adding another >> #ifdef/#endif block in the pci devices table: >> >> static DEFINE_PCI_DEVICE_TABLE(peak_pci_tbl) =3D { >> {PEAK_PCI_VENDOR_ID, PEAK_PCI_DEVICE_ID, PCI_ANY_ID, PCI_AN= Y_ID,}, >> {PEAK_PCI_VENDOR_ID, PEAK_PCIE_DEVICE_ID, PCI_ANY_ID, PCI_A= NY_ID,}, >> {PEAK_PCI_VENDOR_ID, PEAK_MPCI_DEVICE_ID, PCI_ANY_ID, PCI_A= NY_ID,}, >> +#ifdef CONFIG_CAN_PEAK_PCIEC >> {PEAK_PCI_VENDOR_ID, PEAK_PCIEC_DEVICE_ID, PCI_ANY_ID, >> PCI_ANY_ID,}, >> +#endif >> {0,} >> }; > Fine for me! In principle the probe function could also just return > -ENODEV. BTW: s/peak_pciec_init/peak_pciec_probe/ would now be perfec= t. > Well, always the same: depends whether the driver should be modprobe'd=20 or not , during pci enum... What is the "approved" way? (_probe() failure could be nice to log a msg notifying to select the=20 CONFIG_CAN_PEAK_PCIEC kernel option, to support the card...) St=E9phane -- PEAK-System Technik GmbH, Otto-Roehm-Strasse 69, D-64293 Darmstadt=20 Geschaeftsleitung: A.Gach/U.Wilhelm,St.Nr.:007/241/13586 FA Darmstadt=20 HRB-9183 Darmstadt, Ust.IdNr.:DE 202220078, WEE-Reg.-Nr.: DE39305391=20 Tel.+49 (0)6151-817320 / Fax:+49 (0)6151-817329, info@peak-system.com