From patchwork Fri Sep 20 08:32:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2915611 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0B86F9F1BF for ; Fri, 20 Sep 2013 08:32:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0619203FD for ; Fri, 20 Sep 2013 08:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEA3E203B6 for ; Fri, 20 Sep 2013 08:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754184Ab3ITIb5 (ORCPT ); Fri, 20 Sep 2013 04:31:57 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:58522 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754156Ab3ITIbz (ORCPT ); Fri, 20 Sep 2013 04:31:55 -0400 Received: by mail-pb0-f41.google.com with SMTP id rp2so120785pbb.28 for ; Fri, 20 Sep 2013 01:31:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+3WMc9QV2N0QA7pZHi/fA4Hl30sul5jDGLQyfKZdcZU=; b=lKSxeATfTKUaf0TXq2TaDcoFyQMUS8qL0D4l551AR4QPnkw0i1ozXE+DMgH3La2o1Z rh1wnxi8XtxcKFw6XZKmCYEyR7nPybzGsIlnURb57VWKpEs5Y4LijDBy32gPm6Dv/wgl S+yj4IslXAmeeuAFkK7906SmE/1lMDDWYJLIFV+SG69kCZ0ia/vuVHGbT8mYInHQ1Up8 x3ShmdwIGwsqZWD+lvbKShuAxQwA68ccytgHUn95VzS6HXFha6h7h5rcQTiyUWXBlL4f xALyJ/zYv2sQhHqoPs6x+839eYPWyt0W+AMUyKrDSONpNbpx/1L/vJW5/LrBfLUmaXBh NGpg== X-Gm-Message-State: ALoCoQnAA+bZCqw6QX2NPtZ3Csil+l3f7OufpHfmuUcFn/OuBZqwR22TkHMEyQmSl8BZ/gHbsYcC X-Received: by 10.66.150.232 with SMTP id ul8mr7633973pab.26.1379665915557; Fri, 20 Sep 2013 01:31:55 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id py4sm14273729pbc.14.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 01:31:55 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: m.chehab@samsung.com Subject: [PATCH 1/3] [media] pci: cx88-alsa: Use module_pci_driver Date: Fri, 20 Sep 2013 14:02:05 +0530 Message-Id: <1379665927-18497-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP module_pci_driver removes some boilerplate and makes code simpler. Signed-off-by: Sachin Kamat Acked-by: Hans Verkuil --- drivers/media/pci/cx88/cx88-alsa.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c index 05428bf..11d0692 100644 --- a/drivers/media/pci/cx88/cx88-alsa.c +++ b/drivers/media/pci/cx88/cx88-alsa.c @@ -949,27 +949,4 @@ static struct pci_driver cx88_audio_pci_driver = { .remove = cx88_audio_finidev, }; -/**************************************************************************** - LINUX MODULE INIT - ****************************************************************************/ - -/* - * module init - */ -static int __init cx88_audio_init(void) -{ - printk(KERN_INFO "cx2388x alsa driver version %s loaded\n", - CX88_VERSION); - return pci_register_driver(&cx88_audio_pci_driver); -} - -/* - * module remove - */ -static void __exit cx88_audio_fini(void) -{ - pci_unregister_driver(&cx88_audio_pci_driver); -} - -module_init(cx88_audio_init); -module_exit(cx88_audio_fini); +module_pci_driver(cx88_audio_pci_driver);