From patchwork Sun Apr 19 17:07:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11497625 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B11BC112C for ; Sun, 19 Apr 2020 17:08:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9990E22240 for ; Sun, 19 Apr 2020 17:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316101; bh=szac4l2QAhbEUWicT3jzxxM5fGRs62FUmFI8tfeKehA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WpYwxDVLMplLjHbnqCNeKGZhIBJSQGa/KOVqmA4/oyzGnBYpfUYNGkOzhGzjUtL8R Mf/4wLFu2Ft2ALeosTdLV3HrDSeDFffaoJ7TFAvyrf8nejjzRTldWlepqSgp4OR9VF ZWkenqHjWOXrrJfJsXtGxCrDVeyOZiXJUXxwAuqU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726620AbgDSRIV (ORCPT ); Sun, 19 Apr 2020 13:08:21 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:36534 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726613AbgDSRIV (ORCPT ); Sun, 19 Apr 2020 13:08:21 -0400 Received: by mail-oi1-f194.google.com with SMTP id s202so6772111oih.3; Sun, 19 Apr 2020 10:08:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rkm1yVQrueouMlMynX/IUSbPHuMCnuzEP4ZMzc2uSk4=; b=uLKWkiKig45Yrm6j5rcm4kw8g8GkGBO9vaVp/IB2s9DaGJxzWBlo75Rn7Tb0syveQA /47m//9XRJeqow79FXWI9mPpvK1TnDcwRlhWX71c3i9bAAuz+Cm8n0Mb7sfVXNntv9Gv 7vKWvKQIksstshLQmo1J7yVQ8/Y4tjtuYBSLMgVwsDFsOMuyA3EckOeIJGEO+EMNmWtk bf1deNuGIfRvG9xRy/liMHW2yoHmdKYGFhJLrzwfIJMHAJsu/TLNQbCBV600xC3EgaM9 PGazcj86bmjT9uI6zGMfdgkn37glAFQiAxgWYQJyDx7U2xX8oF9AxJ4zUiaY6lDs/nxj WrcA== X-Gm-Message-State: AGi0PuaKiBgzMKOu/dAbmzn76+bv/97I4S9bOiT2JIAjYQM1pT+NJfhz q58aNTql9sIWcTh8P50ezA== X-Google-Smtp-Source: APiQypLVQEjKhtfaW8eTl7YjGxsB7Qz3p8JXmiFRCoXKab90R013s1nz5LZs7Fjm2ta59f95TNmGeQ== X-Received: by 2002:aca:f254:: with SMTP id q81mr8228410oih.12.1587316098741; Sun, 19 Apr 2020 10:08:18 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:18 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 04/17] power/reset: vexpress: Support building as a module Date: Sun, 19 Apr 2020 12:07:57 -0500 Message-Id: <20200419170810.5738-5-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Enable building the VExpress power-off/reset driver as a module. Cc: Catalin Marinas Cc: Will Deacon Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Sebastian Reichel Cc: linux-pm@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Sudeep Holla --- drivers/power/reset/Kconfig | 2 +- drivers/power/reset/vexpress-poweroff.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index 890380302080..0ba18221ba40 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -182,7 +182,7 @@ config POWER_RESET_VERSATILE reference boards. config POWER_RESET_VEXPRESS - bool "ARM Versatile Express power-off and reset driver" + tristate "ARM Versatile Express power-off and reset driver" depends on ARM || ARM64 depends on VEXPRESS_CONFIG help diff --git a/drivers/power/reset/vexpress-poweroff.c b/drivers/power/reset/vexpress-poweroff.c index 90cbaa8341e3..8a6d3add894c 100644 --- a/drivers/power/reset/vexpress-poweroff.c +++ b/drivers/power/reset/vexpress-poweroff.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -87,6 +88,7 @@ static const struct of_device_id vexpress_reset_of_match[] = { }, {} }; +MODULE_DEVICE_TABLE(of, vexpress_reset_of_match); static int _vexpress_register_restart_handler(struct device *dev) { @@ -145,9 +147,5 @@ static struct platform_driver vexpress_reset_driver = { .of_match_table = vexpress_reset_of_match, }, }; - -static int __init vexpress_reset_init(void) -{ - return platform_driver_register(&vexpress_reset_driver); -} -device_initcall(vexpress_reset_init); +module_platform_driver(vexpress_reset_driver); +MODULE_LICENSE("GPL v2");