From patchwork Mon Jun 17 15:20:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2734621 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C8E8EC0AB1 for ; Mon, 17 Jun 2013 15:25:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1ECA3203E5 for ; Mon, 17 Jun 2013 15:25:03 +0000 (UTC) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF39E203E1 for ; Mon, 17 Jun 2013 15:25:01 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5HFP0wA017596 for ; Mon, 17 Jun 2013 10:25:00 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5HFP0Pu017654 for ; Mon, 17 Jun 2013 10:25:00 -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; Mon, 17 Jun 2013 10:25:00 -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 r5HFP082028308 for ; Mon, 17 Jun 2013 10:25:00 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 879258062A for ; Mon, 17 Jun 2013 10:25:00 -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 EB71E8062A for ; Mon, 17 Jun 2013 10:22:09 -0500 (CDT) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5HFM9ut019996 for ; Mon, 17 Jun 2013 10:22:09 -0500 (CDT) Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5HFM9ou029340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Jun 2013 10:22:09 -0500 Received: from [216.82.250.99:37303] by server-4.bemta-12.messagelabs.com id C5/B1-30651-1A92FB15; Mon, 17 Jun 2013 15:22:09 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-6.tower-126.messagelabs.com!1371482527!8191044!1 X-Originating-IP: [209.85.160.54] 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 23526 invoked from network); 17 Jun 2013 15:22:08 -0000 Received: from mail-pb0-f54.google.com (HELO mail-pb0-f54.google.com) (209.85.160.54) by server-6.tower-126.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jun 2013 15:22:08 -0000 Received: by mail-pb0-f54.google.com with SMTP id ro2so2868035pbb.41 for ; Mon, 17 Jun 2013 08:22:07 -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=iRiZ+QiAk6SbaUfxtrssTWMHdcLe90bR0d+2sI8kAPk=; b=j1sntORyhmi2+0m6yo9mMmNa92tYyheakxcjOaxdUy6r26HaFn6WNIS8DTnW6t0hr4 CJcIdWV9p+ODxvNxS3Ha0V3scSBLdCIKJRn3umvjToyAZuogNc8L5oeLUAYnuu6Xnin3 761lLx67XlyvZY4g6ROjuXW2dvn5K6e+8VwP2WGiWfjLWnzzpxOc4ZEOJwPZbFCa3YC8 Qfz3lstoQ0RpMNQrNVHhVmgDZXnurOfK0T/einAXHSZSwwAThSNVDvJlHWUyBQc/kQew t0qaVq7DxymxRkRI9B4TGAm7Zoaqn8YLjoKH/LuinqlexHpFcT23s/2QqVUqXtKb3hKT 6/sA== X-Received: by 10.66.150.106 with SMTP id uh10mr13509484pab.118.1371482527011; Mon, 17 Jun 2013 08:22:07 -0700 (PDT) Received: from localhost.localdomain ([1.23.210.59]) by mx.google.com with ESMTPSA id fp2sm14187573pbb.36.2013.06.17.08.22.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 08:22:06 -0700 (PDT) From: Prabhakar Lad To: Mauro Carvalho Chehab , LMML , DLOS , Hans Verkuil , Laurent Pinchart Subject: [PATCH v4 09/11] media: davinci: vpif_display: use module_platform_driver() Date: Mon, 17 Jun 2013 20:50:49 +0530 Message-ID: <1371482451-18314-10-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+patchwork-davinci=patchwork.kernel.org@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_display.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index 371af34..473d1a9 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -1937,20 +1937,4 @@ static __refdata struct platform_driver vpif_driver = { .remove = vpif_remove, }; -static __init int vpif_init(void) -{ - return platform_driver_register(&vpif_driver); -} - -/* - * vpif_cleanup: This function 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); -} - -module_init(vpif_init); -module_exit(vpif_cleanup); +module_platform_driver(vpif_driver);