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: 51781 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id D59F822D9C for ; Fri, 31 Jul 2015 15:40:17 +0000 (UTC) Received: by labkf3 with SMTP id kf3sf7652001lab.0 for ; Fri, 31 Jul 2015 08:40:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=bXdxMB0UM5BwdpJ+kmIWQG9pKLelEJ+5sWELEB4xjog=; b=MQpnVnqU58+cFOH3ELS7JoNVjoDe5JIu2AmnBbP26h8gORXThXXBoRCVN8s8P9/WI3 VhhIPyF7oZ43AhtpY72WbajbTJZdoErKb0qm53UAID/GNKRuB5MxDL1IjOf0dvylkKEw ORK1qlMO2+JZEfXIc7EMNvtQ1pMpHfPHbYkLy13b3tKhRuCbth4Tb/+nHOv2iP56P/dA CBt6ufGzg0eBNo9S5bayP+1r23XjysbVBKDGU/3MDhWF+vnY5rFwE7DJtlkok9apf8MU Z45MyI9oDSADcpsDTVSunQyIb9fSmzQgdbv6U8l6SJxmSw3CF8Mj3QeUWVVK+6Ks9Ojb wHmw== X-Gm-Message-State: ALoCoQnFC3K+6WJF1tXNeYMgHJ0w+QHS4Pdkuwxdn13wcmgPLUOmjem1IrK2Ft+iNQZeROg5PIW4 X-Received: by 10.112.142.97 with SMTP id rv1mr1130872lbb.12.1438357216750; Fri, 31 Jul 2015 08:40:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.135 with SMTP id ky7ls361445lac.20.gmail; Fri, 31 Jul 2015 08:40:16 -0700 (PDT) X-Received: by 10.152.28.73 with SMTP id z9mr3681405lag.93.1438357216559; Fri, 31 Jul 2015 08:40:16 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id qb5si4095526lbb.28.2015.07.31.08.40.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 08:40:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lafd3 with SMTP id d3so46672877laf.1 for ; Fri, 31 Jul 2015 08:40:16 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr3784568lbb.56.1438357216443; Fri, 31 Jul 2015 08:40:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp465362lba; Fri, 31 Jul 2015 08:40:15 -0700 (PDT) X-Received: by 10.70.65.5 with SMTP id t5mr8540676pds.16.1438357215081; Fri, 31 Jul 2015 08:40:15 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id pr7si10973655pdb.236.2015.07.31.08.40.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 08:40:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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-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-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.192.171 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.192.171 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mathieu.poirier@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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");