From patchwork Thu Dec 14 14:02:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 121958 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6844096qgn; Thu, 14 Dec 2017 06:03:21 -0800 (PST) X-Google-Smtp-Source: ACJfBouSdpJx6b+ZRu9iWx6bUWlR+VMFZWhOPWgNn2A4sU4Y8PBQmrlZFB55eiiRmP8i3uZG5Xn7 X-Received: by 10.98.208.67 with SMTP id p64mr9741766pfg.111.1513260201508; Thu, 14 Dec 2017 06:03:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513260201; cv=none; d=google.com; s=arc-20160816; b=iokYjYiM2EsaaWrpE+gcDcjW1DfcnuB80Jsolma3uJwOD8APrmTb1rvGDlqUmGWdm+ mLAkfGHFa8tt4cBr5ZRswgL38B9qn/zX2/fWZuvV/b3xYWZgD9Fvd29gU8+6OqE2sujz VxdC/o/zorjLb0wwEWmAHIka0lxLV8WizOjEAfGxqgKcGQR72V4WPr4x6cWLJjHx3Lfi fAXv8U9g3zz2YdS45lURI3Ellsz7j9DzlKEvmGzOOUmajRjTpQ7xASOvfSPljQUw+Fvh C6/4iVDmnvcYvAz1qGDrUuAlLLrA8WIdu5EoD7voH++0CF2GZA7iHFLh8CHc/Lm55aYq RbLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=jJ05ZIppRdbKvXlZPW4Y6tgfVqj4GRXfN2jJ1YPqLwg=; b=KDdLZOJAFNZ4Wcos9dqDG7cqse6w15f0/zsBGO131iJmO+yPse0INPh4Y0fXpFf/Hn QOmchj/R+ExKPBBaMvfDudV6TST5A12PNa7JYbSlzY0Mifa0e7fku8UeP0EEjOrS8WcR gx/sDIVAfpLlscCCL/aJkFiM208a8Gz40+ymM4FSiX8m9RSz7tDAo7KZJFZVCWNL7VN4 q3ds+s8uwT0hLfaQ17WFk7OvDE+bywQOl87GnUmISdvL4Oe6sYVDW4mmUONeKIhMzeon b2O0wTO2UkUWWcsFdvfj2xvt2XeIH9sLm0V+bAiSmruH9cK5oQeUU7wnc+Sm9Ugxqdn8 G0Ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x125si2932339pgb.138.2017.12.14.06.03.21; Thu, 14 Dec 2017 06:03:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752700AbdLNODR (ORCPT + 20 others); Thu, 14 Dec 2017 09:03:17 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42170 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752547AbdLNODP (ORCPT ); Thu, 14 Dec 2017 09:03:15 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B8A311435; Thu, 14 Dec 2017 06:03:14 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 069143F246; Thu, 14 Dec 2017 06:03:12 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH 03/10] staging: ccree: add explicit module init/exit func Date: Thu, 14 Dec 2017 14:02:40 +0000 Message-Id: <1513260170-26346-4-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com> References: <1513260170-26346-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to do a module global scope init/exit operation to support the debugfs interface we are about to introduce in the next patch, so wean the module of the boiler plate saving macro as it will no longer be sufficient. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index ad02d92..5427c7f 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -517,7 +517,18 @@ static struct platform_driver cc7x_driver = { .probe = cc7x_probe, .remove = cc7x_remove, }; -module_platform_driver(cc7x_driver); + +static int __init ccree_init(void) +{ + return platform_driver_register(&cc7x_driver); +} +module_init(ccree_init); + +static void __exit ccree_exit(void) +{ + platform_driver_unregister(&cc7x_driver); +} +module_exit(ccree_exit); /* Module description */ MODULE_DESCRIPTION("ARM TrustZone CryptoCell REE Driver");