From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Muizelaar Subject: [PATCH] cleanup pci init routines Date: Sat, 20 Mar 2004 21:15:41 -0500 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: <405CFACD.4060106@rogers.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080600020603080701030806" Return-path: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org This is a multi-part message in MIME format. --------------080600020603080701030806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit the attached patch basically does this for the pci drivers in alsa-kernel static int __init alsa_card_mychip_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { - #ifdef MODULE - printk(KERN_ERR "My chip soundcard not found " - "or device busy\n"); - #endif - return err; - } - return 0; + return pci_module_init(&driver); } the added message does not really give any additional information. The patch also improves the consistency with the majority of the drivers in the kernel that just use return pci_module_init(&driver); with out giving any message. -Jeff --------------080600020603080701030806 Content-Type: text/x-patch; name="cleanup-pci-module-init.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cleanup-pci-module-init.patch" diff -ur alsa-kernel/Documentation/DocBook/writing-an-alsa-driver.tmpl alsa-kernel-mod-init/Documentation/DocBook/writing-an-alsa-driver.tmpl --- alsa-kernel/Documentation/DocBook/writing-an-alsa-driver.tmpl 2004-03-20 19:33:32.000000000 -0500 +++ alsa-kernel-mod-init/Documentation/DocBook/writing-an-alsa-driver.tmpl 2004-03-20 19:57:12.000000000 -0500 @@ -1355,16 +1355,7 @@ // initialization of the module static int __init alsa_card_mychip_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { - #ifdef MODULE - printk(KERN_ERR "My chip soundcard not found " - "or device busy\n"); - #endif - return err; - } - return 0; + return pci_module_init(&driver); } // clean up the module @@ -1781,16 +1772,7 @@