From patchwork Tue Mar 5 11:52:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2218881 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 650D3DF5B1 for ; Tue, 5 Mar 2013 12:02:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754737Ab3CEMCr (ORCPT ); Tue, 5 Mar 2013 07:02:47 -0500 Received: from mail-pb0-f52.google.com ([209.85.160.52]:37467 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752351Ab3CEMCq (ORCPT ); Tue, 5 Mar 2013 07:02:46 -0500 Received: by mail-pb0-f52.google.com with SMTP id ma3so4342963pbc.25 for ; Tue, 05 Mar 2013 04:02:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=TA/P8lqbhReVE06wAx2F01YpKQ5Tn80EYvvlHvmjCyc=; b=PxJNbis+2T677fRdr9B1gWnPiAEcGkaFo/j/XIPfZCSs++jJiIDedpqecs9BpaS/d4 lPjhE/CXjqI/YTvbayVZKMF/kNkmSDW4+E0Fpw9xIgsygJP3uY5Hk3sINfijOZFdibAi GEgsuvFGw8U/ScV1wvfWtWRGAtSRiQFAmRxuqRJSiB9B+RT4SZIUlgB1QkMLOb7w8Zr+ PbLJiADRSfUZNslRd7dfyNAXCtr9TgMFqaoiP+k5qpOR4H0KnYFaOsPO4GB5M1T91dD6 +D5ZENrFdBxqCvkEVkSAkhRSP8ZVEE5sMHW7S5A9v5yT925N/YJ+OoFzCbTvqaqxkG8c H5Aw== X-Received: by 10.68.245.229 with SMTP id xr5mr36638528pbc.163.1362484965562; Tue, 05 Mar 2013 04:02:45 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id qd8sm9203918pbc.29.2013.03.05.04.02.42 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Mar 2013 04:02:44 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, prabhakar.lad@ti.com, sachin.kamat@linaro.org, manjunath.hadli@ti.com Subject: [PATCH 1/1] [media] davinci_vpfe: Use module_platform_driver macro Date: Tue, 5 Mar 2013 17:22:14 +0530 Message-Id: <1362484334-18804-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkZdxxqZzYKujs3yFYykIwauWidHx/awWyaOmqWCxUHvsOCkR5uVtlejSQwxOMGWha/3tkn Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org module_platform_driver() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat Acked-by: Lad, Prabhakar --- .../staging/media/davinci_vpfe/vpfe_mc_capture.c | 20 +------------------- 1 files changed, 1 insertions(+), 19 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c index 7b35171..c7ae7d7 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c @@ -719,22 +719,4 @@ static struct platform_driver vpfe_driver = { .remove = vpfe_remove, }; -/** - * vpfe_init : This function registers device driver - */ -static __init int vpfe_init(void) -{ - /* Register driver to the kernel */ - return platform_driver_register(&vpfe_driver); -} - -/** - * vpfe_cleanup : This function un-registers device driver - */ -static void vpfe_cleanup(void) -{ - platform_driver_unregister(&vpfe_driver); -} - -module_init(vpfe_init); -module_exit(vpfe_cleanup); +module_platform_driver(vpfe_driver);