From patchwork Wed Oct 10 18:34:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas KANDAGATLA X-Patchwork-Id: 1575391 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id F31A53FE36 for ; Wed, 10 Oct 2012 18:35:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754149Ab2JJSfR (ORCPT ); Wed, 10 Oct 2012 14:35:17 -0400 Received: from eu1sys200aog119.obsmtp.com ([207.126.144.147]:51529 "EHLO eu1sys200aog119.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754597Ab2JJSfQ (ORCPT ); Wed, 10 Oct 2012 14:35:16 -0400 Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob119.postini.com ([207.126.147.11]) with SMTP ID DSNKUHW/4Al1ovezWwcDYA8dCnS7OkASKzuF@postini.com; Wed, 10 Oct 2012 18:35:16 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7C04619D; Wed, 10 Oct 2012 18:35:11 +0000 (GMT) Received: from mail7.sgp.st.com (mail7.sgp.st.com [164.129.223.81]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 43D8F258B; Wed, 10 Oct 2012 18:35:11 +0000 (GMT) Received: from localhost (king.bri.st.com [10.65.51.147]) by mail7.sgp.st.com (MOS 4.3.3-GA) with ESMTP id APB71115 (AUTH srinivak); Wed, 10 Oct 2012 20:35:10 +0200 From: Srinivas KANDAGATLA To: mchehab@redhat.com Cc: srinivas.kandagatla@st.com, Scott.Jiang.Linux@gmail.com, javier.martin@vista-silicon.com, linux-media@vger.kernel.org, kernel@pengutronix.de, g.liakhovetski@gmx.de Subject: [PATCH 3.6.0- 4/5] media/soc_camera: use module_platform_driver macro Date: Wed, 10 Oct 2012 19:34:00 +0100 Message-Id: <1349894040-8127-1-git-send-email-srinivas.kandagatla@st.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Srinivas Kandagatla This patch removes some code duplication by using module_platform_driver. Signed-off-by: Srinivas Kandagatla --- drivers/media/platform/soc_camera/soc_camera.c | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 3be9294..d4bfe29 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c @@ -1585,19 +1585,7 @@ static struct platform_driver __refdata soc_camera_pdrv = { .owner = THIS_MODULE, }, }; - -static int __init soc_camera_init(void) -{ - return platform_driver_register(&soc_camera_pdrv); -} - -static void __exit soc_camera_exit(void) -{ - platform_driver_unregister(&soc_camera_pdrv); -} - -module_init(soc_camera_init); -module_exit(soc_camera_exit); +module_platform_driver(soc_camera_pdrv); MODULE_DESCRIPTION("Image capture bus driver"); MODULE_AUTHOR("Guennadi Liakhovetski ");