From patchwork Fri Jul 31 15:37:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 6914311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7D32BC05AC for ; Fri, 31 Jul 2015 15:41:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0079620558 for ; Fri, 31 Jul 2015 15:41:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D6E22042A for ; Fri, 31 Jul 2015 15:41:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZLCOl-0000Zq-2J; Fri, 31 Jul 2015 15:39:03 +0000 Received: from mail-pd0-f171.google.com ([209.85.192.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZLCNy-0000De-Tg for linux-arm-kernel@lists.infradead.org; Fri, 31 Jul 2015 15:38:15 +0000 Received: by pdbnt7 with SMTP id nt7so44482909pdb.0 for ; Fri, 31 Jul 2015 08:37:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8PstKJbqtbeFhbNrCmEhw3sbmjz10VJ+slwxT4VQzfM=; b=Mn9UKnnlo6Cm2DNU1hXB7baEzX5AORwDkorG1lxPjpZOWn74y2CIslWDCMf+t9XnfJ bErmw0QcTRRbj3j9aWpuqiyU8QZEsIUBZIfMnJiLLYmiiUE5WFS2U1vCGrMUUuyHD/cz xs4W21iHZjYnkL6SIb4fQxWjCdJw1t8UqxUhItgksX0oF93DVNqka6WwG8qX/BP/lNTu /HFQglqsk82itDmDVszYE8cw1/UiLKvD3onoEh912DXIZ/M/huo+0iUOfFzSA5lgyIjh YC32/q90VyjO1P4MQnZUdmtGYmWQu8mF4QHsJ1qphBsiW4fn55T97pPoFNSzMzMhDByo bT3w== X-Gm-Message-State: ALoCoQnIJv0CuFiAIzEzLBdy3MdyYmRz5HlWGdeuG7VcHjjOI/P39ldG7t1hHzfSPGS7fcH4fLLY X-Received: by 10.70.36.38 with SMTP id n6mr8160369pdj.96.1438357074220; Fri, 31 Jul 2015 08:37:54 -0700 (PDT) Received: from t430.cg.shawcable.net ([184.64.168.246]) by smtp.gmail.com with ESMTPSA id y2sm8317284pdi.80.2015.07.31.08.37.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 31 Jul 2015 08:37:53 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 03/10] coresight: replicator: Use builtin_platform_driver() Date: Fri, 31 Jul 2015 09:37:23 -0600 Message-Id: <1438357050-22486-4-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438357050-22486-1-git-send-email-mathieu.poirier@linaro.org> References: <1438357050-22486-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150731_083815_068695_552A7FDC X-CRM114-Status: GOOD ( 13.57 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mathieu.poirier@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vaishali Thakkar Macro builtin_platform_driver can be used for builtin drivers that don't do anything in driver init. This file depends on Kconfig CONFIG_CORESIGHT_LINKS_AND_SINKS which eventually depends on CORESIGHT. Both CONFIG_CORESIGHT_LINKS_AND_SINKS and CORESIGHT are bool. So, use builtin_platform_driver and remove some boilerplate code. Also, remove header file init.h as functionality like module_init and module_exit is now relocated to module.h. Signed-off-by: Vaishali Thakkar Suggested-by: Paul Bolle Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-replicator.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c index 7974b7c3da6b..963ac197c253 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -184,17 +183,7 @@ static struct platform_driver replicator_driver = { }, }; -static int __init replicator_init(void) -{ - return platform_driver_register(&replicator_driver); -} -module_init(replicator_init); - -static void __exit replicator_exit(void) -{ - platform_driver_unregister(&replicator_driver); -} -module_exit(replicator_exit); +builtin_platform_driver(replicator_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("CoreSight Replicator driver");