From patchwork Tue Jan 26 19:46:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 75217 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0QJlFT5024729 for ; Tue, 26 Jan 2010 19:47:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754767Ab0AZTrE (ORCPT ); Tue, 26 Jan 2010 14:47:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754754Ab0AZTrE (ORCPT ); Tue, 26 Jan 2010 14:47:04 -0500 Received: from poutre.nerim.net ([62.4.16.124]:65006 "EHLO poutre.nerim.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754748Ab0AZTrB (ORCPT ); Tue, 26 Jan 2010 14:47:01 -0500 Received: from localhost (localhost [127.0.0.1]) by poutre.nerim.net (Postfix) with ESMTP id E18B239DE97; Tue, 26 Jan 2010 20:46:56 +0100 (CET) X-Virus-Scanned: amavisd-new at nerim.net Received: from poutre.nerim.net ([127.0.0.1]) by localhost (poutre.nerim.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5dWUSiKi2nKx; Tue, 26 Jan 2010 20:46:56 +0100 (CET) Received: from hyperion.delvare (jdelvare.pck.nerim.net [62.212.121.182]) by poutre.nerim.net (Postfix) with ESMTP id D5D5B39DE9D; Tue, 26 Jan 2010 20:46:55 +0100 (CET) Date: Tue, 26 Jan 2010 20:46:58 +0100 From: Jean Delvare To: LMML Cc: Mauro Carvalho Chehab Subject: [PATCH] dvb/bt8xx: Clean-up init and exit functions Message-ID: <20100126204658.11047e14@hyperion.delvare> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; i586-suse-linux-gnu) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org --- v4l-dvb.orig/linux/drivers/media/dvb/bt8xx/bt878.c 2010-01-26 19:13:38.000000000 +0100 +++ v4l-dvb/linux/drivers/media/dvb/bt8xx/bt878.c 2010-01-26 20:40:37.000000000 +0100 @@ -580,8 +580,6 @@ static struct pci_driver bt878_pci_drive .remove = __devexit_p(bt878_remove), }; -static int bt878_pci_driver_registered; - /*******************************/ /* Module management functions */ /*******************************/ @@ -589,34 +587,23 @@ static int bt878_pci_driver_registered; static int __init bt878_init_module(void) { bt878_num = 0; - bt878_pci_driver_registered = 0; printk(KERN_INFO "bt878: AUDIO driver version %d.%d.%d loaded\n", (BT878_VERSION_CODE >> 16) & 0xff, (BT878_VERSION_CODE >> 8) & 0xff, BT878_VERSION_CODE & 0xff); -/* - bt878_check_chipset(); -*/ - /* later we register inside of bt878_find_audio_dma() - * because we may want to ignore certain cards */ - bt878_pci_driver_registered = 1; + return pci_register_driver(&bt878_pci_driver); } static void __exit bt878_cleanup_module(void) { - if (bt878_pci_driver_registered) { - bt878_pci_driver_registered = 0; - pci_unregister_driver(&bt878_pci_driver); - } - return; + pci_unregister_driver(&bt878_pci_driver); } module_init(bt878_init_module); module_exit(bt878_cleanup_module); -//MODULE_AUTHOR("XXX"); MODULE_LICENSE("GPL"); /*