From patchwork Mon Jun 17 15:20:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2734641 Return-Path: X-Original-To: patchwork-davinci@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 DA6449F39E for ; Mon, 17 Jun 2013 15:25:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 395E9203E9 for ; Mon, 17 Jun 2013 15:25:30 +0000 (UTC) Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 750D5203E5 for ; Mon, 17 Jun 2013 15:25:25 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5HFONqp021012; Mon, 17 Jun 2013 10:24:23 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5HFONrU016546; Mon, 17 Jun 2013 10:24:23 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Mon, 17 Jun 2013 10:24:23 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5HFONQu003210; Mon, 17 Jun 2013 10:24:23 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 30D9280626; Mon, 17 Jun 2013 10:24:23 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id CB9608062A for ; Mon, 17 Jun 2013 10:21:46 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5HFLkVh019839 for ; Mon, 17 Jun 2013 10:21:46 -0500 (CDT) Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by neches.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5HFLkba000890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Jun 2013 10:21:46 -0500 Received: from [216.82.253.147:26757] by server-9.bemta-7.messagelabs.com id 01/CD-28694-A892FB15; Mon, 17 Jun 2013 15:21:46 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-16.tower-165.messagelabs.com!1371482504!17304849!1 X-Originating-IP: [209.85.160.46] X-SpamReason: No, hits=0.7 required=7.0 tests=BODY_RANDOM_LONG, ML_RADAR_SPEW_LINKS_14,RCVD_ILLEGAL_IP,spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 670 invoked from network); 17 Jun 2013 15:21:45 -0000 Received: from mail-pb0-f46.google.com (HELO mail-pb0-f46.google.com) (209.85.160.46) by server-16.tower-165.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jun 2013 15:21:45 -0000 Received: by mail-pb0-f46.google.com with SMTP id rq2so2866208pbb.5 for ; Mon, 17 Jun 2013 08:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=gAaSE4U5M7aIqtdWHsrMyxtj0e47vpz4lyfiEs64VhY=; b=fkKhG4kz1E6AwZc42OLxDIuXq4QnM5FBH9CMMjC1YbfId+zkZn42Iwz2bqf7xU24ML 5CiljXD/Hff0c1jyQCngrNPJeRaHF5g++K3GfY3jsj4lGfr4I9FEajzJhvdzfQqVMwpl uLCg+QJrmS+MDE4VikqAfD+bJqJ+27NB061+e5psMJEsSQXSfdcrIKFtCn/B5IQkbx3X Rh/qlmB+aeeXNgj7RriHHIvcPzCXtsMmUOxMl5kYMuatydE1iQlLpSu7d+p5ejojgVoH hC7Z2xR3KHywyIm6xFTlf6KQIlRMw3UvE8I6RP4aON+AB5aPDaKcilVq6vWf+qC7f9JE 2fFw== X-Received: by 10.68.248.100 with SMTP id yl4mr13227985pbc.125.1371482504665; Mon, 17 Jun 2013 08:21:44 -0700 (PDT) Received: from localhost.localdomain ([1.23.210.59]) by mx.google.com with ESMTPSA id fp2sm14187573pbb.36.2013.06.17.08.21.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 08:21:43 -0700 (PDT) From: Prabhakar Lad To: Mauro Carvalho Chehab , LMML , DLOS , Hans Verkuil , Laurent Pinchart Subject: [PATCH v4 05/11] media: davinci: vpif_capture: use module_platform_driver() Date: Mon, 17 Jun 2013 20:50:45 +0530 Message-ID: <1371482451-18314-6-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371482451-18314-1-git-send-email-prabhakar.csengg@gmail.com> References: <1371482451-18314-1-git-send-email-prabhakar.csengg@gmail.com> CC: LKML X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 From: "Lad, Prabhakar" This patch uses module_platform_driver() to simplify the code. Signed-off-by: Lad, Prabhakar Acked-by: Laurent Pinchart --- drivers/media/platform/davinci/vpif_capture.c | 28 +------------------------ 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index 7d3c449..091c7a4 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -2270,30 +2270,4 @@ static __refdata struct platform_driver vpif_driver = { .remove = vpif_remove, }; -/** - * vpif_init: initialize the vpif driver - * - * This function registers device and driver to the kernel, requests irq - * handler and allocates memory - * for channel objects - */ -static __init int vpif_init(void) -{ - return platform_driver_register(&vpif_driver); -} - -/** - * vpif_cleanup : This function clean up the vpif capture resources - * - * This will un-registers device and driver to the kernel, frees - * requested irq handler and de-allocates memory allocated for channel - * objects. - */ -static void vpif_cleanup(void) -{ - platform_driver_unregister(&vpif_driver); -} - -/* Function for module initialization and cleanup */ -module_init(vpif_init); -module_exit(vpif_cleanup); +module_platform_driver(vpif_driver);