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: 9784 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0141B23E4F for ; Tue, 3 Jul 2012 10:07:00 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id BDEC5A1821C for ; Tue, 3 Jul 2012 10:06:59 +0000 (UTC) Received: by ggnf1 with SMTP id f1so5488204ggn.11 for ; Tue, 03 Jul 2012 03:06:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=GJFF8GSFgAp++UiPtEFVKe3i+epPDh31C53LTD1tErc=; b=kwmR6zBok4WonV5kqZtqIHntdVh5niT1T62++4nh73K48pIcKCBC2NiFYveTqyaVbV /7YxPerm2CFmU0TYPMRKImKohoCq9Gj62kCNSbGyngvalqetDI/ENsb179oHEV9mb2sw TsKU+lAymFc7pOpV7bUMjw8YU991NFXawNQnzoHXGVfSGOW9i03IjC/pENrXsrPXyyPS 0jdazzaivxs5+OGNaE7+ZRMEPeXQ1TttOJEWsGa1KTFE/4rKyChNguZ7masuCahh7rv8 EvRuSkdqwPifXhxYWTBLGAoPgJpyDNS6Iy9lYAi94CQH09OM+3LQkALfaPeY+0AFFh48 Y/vw== Received: by 10.50.193.196 with SMTP id hq4mr7664970igc.57.1341310018862; Tue, 03 Jul 2012 03:06:58 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp37585ibb; Tue, 3 Jul 2012 03:06:58 -0700 (PDT) Received: by 10.101.141.21 with SMTP id t21mr5893999ann.34.1341310017887; Tue, 03 Jul 2012 03:06:57 -0700 (PDT) Received: from mail-gh0-f178.google.com (mail-gh0-f178.google.com [209.85.160.178]) by mx.google.com with ESMTPS id o41si12158107yhl.9.2012.07.03.03.06.57 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jul 2012 03:06:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by ghbf1 with SMTP id f1so6012799ghb.37 for ; Tue, 03 Jul 2012 03:06:57 -0700 (PDT) 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: ALoCoQnDtn25ljnEytmga5fsd8111CRuEywiNCjX2DRYvNz0cnOaSbFUAG5Z6IXoLUFwFl4FcDuv 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");