From patchwork Wed Sep 5 11:43:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11195 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 63A4E23E41 for ; Wed, 5 Sep 2012 11:46:16 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1BF00A18599 for ; Wed, 5 Sep 2012 11:45:23 +0000 (UTC) Received: by ieak11 with SMTP id k11so839469iea.11 for ; Wed, 05 Sep 2012 04:46:15 -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:in-reply-to:references :x-gm-message-state; bh=uH7xToq/DWfLLSisIdLe96udGvhlW+R3VJuAOpPuJAA=; b=LbivU3fAYRdhUSckifJuksJSTrLEy+8xpQNAULDyRXM0njHZP/AZLHJI8cb2ChbrR6 Rk8R7obpG0kcwBPeQxz0yW7IdCWqZhDVZ86xibAwoP8D6Z00VQ+M1oRDMJCh8yOTpwxw ZyYd31OlZDUPNIp/Pmt4Nd1BwlNvf17i5MSUS0igRZQ6BJF+TRYIQyXSCO5QlOAWNr1a pnSrLvUNoSs71hLro1LATqhH73vDUop8SkumTxyVD5ceyU7c8JHPkROZ+V9On1fHdmVU gvXCPCJK9kMv7qRN4fZ9rCcWyA8aIzTeD2WHqFqX6bXvwkYCRXDEtcTCZ9yEhTkmWOKV 80SA== Received: by 10.50.7.212 with SMTP id l20mr17282684iga.43.1346845575213; Wed, 05 Sep 2012 04:46:15 -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.50.184.232 with SMTP id ex8csp248915igc; Wed, 5 Sep 2012 04:46:14 -0700 (PDT) Received: by 10.66.75.105 with SMTP id b9mr22800842paw.58.1346845574251; Wed, 05 Sep 2012 04:46:14 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id pv1si2228375pbb.149.2012.09.05.04.46.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 04:46:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pz0-f50.google.com with SMTP id e7so348824dad.37 for ; Wed, 05 Sep 2012 04:46:14 -0700 (PDT) Received: by 10.68.234.73 with SMTP id uc9mr53413511pbc.158.1346845573933; Wed, 05 Sep 2012 04:46:13 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oc2sm1249324pbb.69.2012.09.05.04.46.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 04:46:13 -0700 (PDT) From: Sachin Kamat To: patches@linaro.org Cc: sachin.kamat@linaro.org Subject: [PATCH 2/2] [media] soc_camera: Use module_platform_driver macro Date: Wed, 5 Sep 2012 17:13:20 +0530 Message-Id: <1346845400-24598-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1346845400-24598-1-git-send-email-sachin.kamat@linaro.org> References: <1346845400-24598-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQmVAx4B6IbGHfJRgwdNybMKNgNLrdjwvW6nOpxutBi0wjYnS3nSKVZEnPlXKK+/4/lHyFVz 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 ");