From patchwork Fri Sep 20 08:32:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 20139 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1VMw8C-0007gG-4R; Fri, 20 Sep 2013 10:32:04 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-5) with esmtp id 1VMw8A-0003cY-6T; Fri, 20 Sep 2013 10:32:03 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754195Ab3ITIb7 (ORCPT + 1 other); Fri, 20 Sep 2013 04:31:59 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:63854 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754156Ab3ITIb5 (ORCPT ); Fri, 20 Sep 2013 04:31:57 -0400 Received: by mail-pa0-f51.google.com with SMTP id lf1so445183pab.24 for ; Fri, 20 Sep 2013 01:31:57 -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:in-reply-to :references; bh=WdAIP+AMV/1f7U3PndSzfse1TztyiCqgn9p4hvR7NTI=; b=Z0kZwIGemB88Cl0Xn4D6rnt+Aa8+ICjQXkALz2aPFeg/EX+GY0FsxWMN524nZKjz69 PsWK59YY0LptMHtu9NlUoPjcVnq644J6Z95v+5clUaxxbtw2Jjv5yCeBVTLNlVyoDv7O HXM5oUx1Dk0wBAtPPEkLbxt3gF79NfDmw7Q05Gk+4xCz9TbFnrs7fw5uXwB95vdfZvaS haIEm4XMDZSquion9Zx2JSVfH9N3oHT+HG8XGFbYEUn+50dnE+8tCNR5seFnyxxWzy3g nThRX0brvln37Aud4LvoPq3vBLilNGyRO19BwUtTyVeN5b1tBqyB/9WqV5TYJ+KzHNOA bNqA== X-Gm-Message-State: ALoCoQkTD0ho5ZBjhip9kDgUcBnMBHCKHDFCXlPRlEnEJz477SyyWiUScqSo2P0uVLl0YpKaKvh2 X-Received: by 10.68.171.228 with SMTP id ax4mr6721605pbc.48.1379665917381; Fri, 20 Sep 2013 01:31:57 -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:57 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: m.chehab@samsung.com, Jelle Foks Subject: [PATCH 2/3] [media] pci: cx88-mpeg: Use module_pci_driver Date: Fri, 20 Sep 2013 14:02:06 +0530 Message-Id: <1379665927-18497-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1379665927-18497-1-git-send-email-sachin.kamat@linaro.org> References: <1379665927-18497-1-git-send-email-sachin.kamat@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.9.20.82414 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1200_1299 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' module_pci_driver removes some boilerplate and makes code simpler. Signed-off-by: Sachin Kamat Cc: Jelle Foks --- drivers/media/pci/cx88/cx88-mpeg.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index 86d2008..684eff5 100644 --- a/drivers/media/pci/cx88/cx88-mpeg.c +++ b/drivers/media/pci/cx88/cx88-mpeg.c @@ -902,20 +902,8 @@ static struct pci_driver cx8802_pci_driver = { .remove = cx8802_remove, }; -static int __init cx8802_init(void) -{ - printk(KERN_INFO "cx88/2: cx2388x MPEG-TS Driver Manager version %s loaded\n", - CX88_VERSION); - return pci_register_driver(&cx8802_pci_driver); -} - -static void __exit cx8802_fini(void) -{ - pci_unregister_driver(&cx8802_pci_driver); -} +module_pci_driver(cx8802_pci_driver); -module_init(cx8802_init); -module_exit(cx8802_fini); EXPORT_SYMBOL(cx8802_buf_prepare); EXPORT_SYMBOL(cx8802_buf_queue); EXPORT_SYMBOL(cx8802_cancel_buffers);