From patchwork Wed Dec 21 10:19:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 9482819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6A97660772 for ; Wed, 21 Dec 2016 10:21:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CD5827FB6 for ; Wed, 21 Dec 2016 10:21:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51AE7283FD; Wed, 21 Dec 2016 10:21:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 14D6827FB6 for ; Wed, 21 Dec 2016 10:21:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cJe0a-0005Kt-Al; Wed, 21 Dec 2016 10:20:28 +0000 Received: from webbox1416.server-home.net ([77.236.96.61]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cJe0L-000455-P4 for linux-arm-kernel@lists.infradead.org; Wed, 21 Dec 2016 10:20:16 +0000 Received: from imapserver.systec-electronic.com (unknown [212.185.67.146]) by webbox1416.server-home.net (Postfix) with ESMTPA id 188B927A6E0; Wed, 21 Dec 2016 11:19:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by imapserver.systec-electronic.com (Postfix) with ESMTP id 04952DA0A5A; Wed, 21 Dec 2016 11:19:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at imapserver.systec-electronic.com Received: from imapserver.systec-electronic.com ([127.0.0.1]) by localhost (imapserver.systec-electronic.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G6GDcGSJQDOp; Wed, 21 Dec 2016 11:19:49 +0100 (CET) Received: from localhost.localdomain (ws-stein.systec.local [192.168.10.118]) by imapserver.systec-electronic.com (Postfix) with ESMTP id A51FFDA0A61; Wed, 21 Dec 2016 11:19:46 +0100 (CET) From: Alexander Stein To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Will Deacon , Mark Rutland , Russell King Subject: [PATCH 3/3] arm: perf: Add platform driver removal function Date: Wed, 21 Dec 2016 11:19:35 +0100 Message-Id: <20161221101935.17178-4-alexander.stein@systec-electronic.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161221101935.17178-1-alexander.stein@systec-electronic.com> References: <20161221101935.17178-1-alexander.stein@systec-electronic.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161221_022014_117430_E0811E49 X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. 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: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alexander Stein MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Despite the driver cannot be built as a module using the option DEBUG_TEST_DRIVER_REMOVE requires the drivers to actually remove the device. Signed-off-by: Alexander Stein --- arch/arm/kernel/perf_event_v7.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index b942349..3ad02a2 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c @@ -2026,12 +2026,18 @@ static int armv7_pmu_device_probe(struct platform_device *pdev) armv7_pmu_probe_table); } +static int armv7_pmu_device_remove(struct platform_device *pdev) +{ + return arm_pmu_device_remove(pdev); +} + static struct platform_driver armv7_pmu_driver = { .driver = { .name = "armv7-pmu", .of_match_table = armv7_pmu_of_device_ids, }, .probe = armv7_pmu_device_probe, + .remove = armv7_pmu_device_remove, }; static int __init register_armv7_pmu_driver(void)