From patchwork Sun May 26 12:00:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 2615051 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by patchwork1.kernel.org (Postfix) with ESMTP id D94F43FD4E for ; Sun, 26 May 2013 12:03:12 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r4QC3CH0028022 for ; Sun, 26 May 2013 07:03:12 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r4QC3C0s002588 for ; Sun, 26 May 2013 07:03:12 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Sun, 26 May 2013 07:03:12 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r4QC3Crl019683 for ; Sun, 26 May 2013 07:03:12 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 4230080626 for ; Sun, 26 May 2013 07:03:12 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 57DC680627 for ; Sun, 26 May 2013 07:02:50 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id r4QC2odT006887 for ; Sun, 26 May 2013 07:02:50 -0500 (CDT) Received: from mail6.bemta8.messagelabs.com (mail6.bemta8.messagelabs.com [216.82.243.55]) by neches.ext.ti.com (8.13.7/8.13.7) with ESMTP id r4QC2n5L024692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 26 May 2013 07:02:49 -0500 Received: from [216.82.242.131:53641] by server-3.bemta-8.messagelabs.com id FE/A3-21061-9E9F1A15; Sun, 26 May 2013 12:02:49 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-8.tower-76.messagelabs.com!1369569767!28504548!1 X-Originating-IP: [209.85.192.173] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG, ML_RADAR_SPEW_LINKS_14,spamassassin: X-StarScan-Received: X-StarScan-Version: 6.8.6.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29917 invoked from network); 26 May 2013 12:02:48 -0000 Received: from mail-pd0-f173.google.com (HELO mail-pd0-f173.google.com) (209.85.192.173) by server-8.tower-76.messagelabs.com with RC4-SHA encrypted SMTP; 26 May 2013 12:02:48 -0000 Received: by mail-pd0-f173.google.com with SMTP id v14so4466303pde.4 for ; Sun, 26 May 2013 05:02:47 -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=KA+5XQWqFw6pT4Yyoh9hbXHCqIy4DAPFBVuX7M7kfjE=; b=XS6adXEjURdblnMZM4GL07CvsdmkCe0uX954qfusiWxQNigQazRI88x5MwmdP0nP6h 2OL2ffvmPrBbB1XfGwiMJAyvK+JGg4bzvCmAy5KL6ZObyslynnz/G3M4pV+WAqle74Lv gpJAco6JSpBS0xSSqiYGNfHB0nOIamhL5Xqw4K30VhnOt8QgpPLr4zX5btquL04YXeZP Mip1vFLn+e4iRLp99UyWg+qjFmWscQ1QSoAfj7N5/Yq7Ka65AU8iFmba8vyqnz/p7WC3 bBz+sxJHmU3gWy7HxxT1sNgXcPfQv+HYf0NlR3SsxOaloxat/j0HFhVHpX0i1Z3L4um/ Diew== X-Received: by 10.66.224.73 with SMTP id ra9mr25516121pac.163.1369569767385; Sun, 26 May 2013 05:02:47 -0700 (PDT) Received: from localhost.localdomain ([112.79.41.196]) by mx.google.com with ESMTPSA id ri8sm24237417pbc.3.2013.05.26.05.02.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 26 May 2013 05:02:46 -0700 (PDT) From: Prabhakar Lad To: Hans Verkuil , Mauro Carvalho Chehab , LMML , Laurent Pinchart Subject: [PATCH v3 5/9] media: davinci: vpif_capture: use module_platform_driver() Date: Sun, 26 May 2013 17:30:08 +0530 Message-ID: <1369569612-30915-6-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1369569612-30915-1-git-send-email-prabhakar.csengg@gmail.com> References: <1369569612-30915-1-git-send-email-prabhakar.csengg@gmail.com> CC: DLOS , 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+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com 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 files changed, 1 insertions(+), 27 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index f8b7304..38c1fba 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -2338,30 +2338,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);