From patchwork Wed Sep 5 11:25:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1408651 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 63F0FDF28C for ; Wed, 5 Sep 2012 11:28:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388Ab2IEL2R (ORCPT ); Wed, 5 Sep 2012 07:28:17 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:41315 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750826Ab2IEL2R (ORCPT ); Wed, 5 Sep 2012 07:28:17 -0400 Received: by mail-pz0-f46.google.com with SMTP id y13so300122dad.19 for ; Wed, 05 Sep 2012 04:28:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=uH7xToq/DWfLLSisIdLe96udGvhlW+R3VJuAOpPuJAA=; b=nzzwAiRiHiW9C/xZLDODM+FPjmCSgk1xOmqX4x7LLFCtCu8Id6kj7C4EBSiSMQFUYl dOGgysSNpS01uEfwyWJMalbGWyoacunSjyUfhviCMwTFFIsoXr+ot/55r1VImWUq6g9w 50u8ceAeiqCPOL4Sw7Nu9BgqgLOK//vFmJLaZ4/1Vot+PVuHJ5gaowduuwjAQiu5QswB d6Yg7fLqrvrK5Dh7OMeVjtzjaOpgHKgvci4cvo9tgR6xA6I/UnG8mMyQPhSOmjdq/Zyr hD6yHBrya8Hd5I+JdIXn9QQW+wEADvRL7Mpo4zdUy+rJLCYRbuyragFDB+K5U9ODs8QU F9+g== Received: by 10.68.224.161 with SMTP id rd1mr54491531pbc.133.1346844496754; Wed, 05 Sep 2012 04:28:16 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id uu6sm1216195pbc.70.2012.09.05.04.28.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 04:28:16 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, g.liakhovetski@gmx.de Subject: [PATCH 2/2] [media] soc_camera: Use module_platform_driver macro Date: Wed, 5 Sep 2012 16:55:27 +0530 Message-Id: <1346844327-5524-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1346844327-5524-1-git-send-email-sachin.kamat@linaro.org> References: <1346844327-5524-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnOVTYI9I7g64TEfGRAHrYGKYJBIKGgqug3TlebB6ZSO5aBjIrsjCWSA5GIH3WDO0uykaRF Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org module_platform_driver simplifies the code by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- drivers/media/platform/soc_camera/soc_camera.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index acf5289..4c7d509 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c @@ -1575,18 +1575,7 @@ static struct platform_driver __refdata soc_camera_pdrv = { }, }; -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 ");