From patchwork Tue Jul 3 09:54:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1149941 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 67C95DFFCC for ; Tue, 3 Jul 2012 10:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754228Ab2GCKG7 (ORCPT ); Tue, 3 Jul 2012 06:06:59 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:44028 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750910Ab2GCKG6 (ORCPT ); Tue, 3 Jul 2012 06:06:58 -0400 Received: by gglu4 with SMTP id u4so5058798ggl.19 for ; Tue, 03 Jul 2012 03:06:57 -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:x-gm-message-state; bh=GJFF8GSFgAp++UiPtEFVKe3i+epPDh31C53LTD1tErc=; b=SPOxYQ+lJGcRYANBFrHbf+gHfVnI6jLjHe3VE9ttayzE8NHd+M9if5Sb8B2CvXMK9m QAl6ianQhrrCulOOI4sPJDWdmG92MWZ04FWDKEkc1e6YDjTlX+4djvtQ/fnZYorbi2eh 7MnMwvfcVcSymZy50cY0SR5sF2Rla4gxUwVWs85WxOkw2uDK3FM7/X7w1oCZRH27mWiu dGpIQirVFgSMBPN3+8aB7SyGEeXzW6ZAG6VNj8AnhrSz5iDM4pT8ezAQZXlS7Ql7jwVv /UMy5wyDAUgxor2Ole+pX9nNsE9SYyfLq5SgOSkwjoaoF/8E/oPKXRxIaTU11VrXTfTG J9dg== Received: by 10.66.75.201 with SMTP id e9mr28058911paw.54.1341310017079; Tue, 03 Jul 2012 03:06:57 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id se9sm15273579pbc.25.2012.07.03.03.06.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jul 2012 03:06:56 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: andrzej.p@samsung.com, sachin.kamat@linaro.org, mchehab@infradead.org, s.nawrocki@samsung.com, patches@linaro.org Subject: [PATCH 1/1] [media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file Date: Tue, 3 Jul 2012 15:24:33 +0530 Message-Id: <1341309273-1279-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmFwFAIrUE1ULLVhBi1oM9gvwxAWU92iUdD8AtZCbSevqAAw8Tlp1GDW02zKLeKrHasaTru Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org module_platform_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat Acked-by: Sylwester Nawrocki --- drivers/media/video/s5p-jpeg/jpeg-core.c | 24 +----------------------- 1 files changed, 1 insertions(+), 23 deletions(-) diff --git a/drivers/media/video/s5p-jpeg/jpeg-core.c b/drivers/media/video/s5p-jpeg/jpeg-core.c index 28b5225d..e40e79b 100644 --- a/drivers/media/video/s5p-jpeg/jpeg-core.c +++ b/drivers/media/video/s5p-jpeg/jpeg-core.c @@ -1503,29 +1503,7 @@ static struct platform_driver s5p_jpeg_driver = { }, }; -static int __init -s5p_jpeg_register(void) -{ - int ret; - - pr_info("S5P JPEG V4L2 Driver, (c) 2011 Samsung Electronics\n"); - - ret = platform_driver_register(&s5p_jpeg_driver); - - if (ret) - pr_err("%s: failed to register jpeg driver\n", __func__); - - return ret; -} - -static void __exit -s5p_jpeg_unregister(void) -{ - platform_driver_unregister(&s5p_jpeg_driver); -} - -module_init(s5p_jpeg_register); -module_exit(s5p_jpeg_unregister); +module_platform_driver(s5p_jpeg_driver); MODULE_AUTHOR("Andrzej Pietrasiewicz "); MODULE_DESCRIPTION("Samsung JPEG codec driver");