From patchwork Wed Dec 21 15:03:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 9483163 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 8D2B760487 for ; Wed, 21 Dec 2016 15:06:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E82727FE4 for ; Wed, 21 Dec 2016 15:06:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 732FD28402; Wed, 21 Dec 2016 15:06:48 +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 15E1427FE4 for ; Wed, 21 Dec 2016 15:06:47 +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 1cJiRJ-00025M-Ba; Wed, 21 Dec 2016 15:04:21 +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 1cJiRC-0001wc-Kl for linux-arm-kernel@lists.infradead.org; Wed, 21 Dec 2016 15:04:15 +0000 Received: from imapserver.systec-electronic.com (unknown [212.185.67.146]) by webbox1416.server-home.net (Postfix) with ESMTPA id 4EC5C27A6E3; Wed, 21 Dec 2016 16:03:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by imapserver.systec-electronic.com (Postfix) with ESMTP id 5224ADA0A41; Wed, 21 Dec 2016 16:03:55 +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 7Iqvy02kLtcK; Wed, 21 Dec 2016 16:03:53 +0100 (CET) Received: from localhost.localdomain (ws-stein.systec.local [192.168.10.118]) by imapserver.systec-electronic.com (Postfix) with ESMTP id 96B13DA0A5A; Wed, 21 Dec 2016 16:03:51 +0100 (CET) From: Alexander Stein To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Will Deacon , Mark Rutland , Russell King Subject: [PATCH v2 2/2] arm: perf: Mark as non-removable Date: Wed, 21 Dec 2016 16:03:40 +0100 Message-Id: <20161221150340.25657-3-alexander.stein@systec-electronic.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161221150340.25657-1-alexander.stein@systec-electronic.com> References: <20161221150340.25657-1-alexander.stein@systec-electronic.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161221_070414_904403_CB9F4752 X-CRM114-Status: UNSURE ( 9.42 ) 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 This driver can only built into the kernel. So disallow driver bind/unbind and also prevent a kernel error in case DEBUG_TEST_DRIVER_REMOVE is enabled. Signed-off-by: Alexander Stein --- arch/arm/kernel/perf_event_v7.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index b942349..795e373 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c @@ -2029,6 +2029,7 @@ static int armv7_pmu_device_probe(struct platform_device *pdev) static struct platform_driver armv7_pmu_driver = { .driver = { .name = "armv7-pmu", + .suppress_bind_attrs = true, .of_match_table = armv7_pmu_of_device_ids, }, .probe = armv7_pmu_device_probe,