From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: daniel.lezcano@linaro.org, rafael@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
lukasz.luba@arm.com
Subject: [PATCH 1/2] powercap/drivers/dtpm: Export the symbols for the modules
Date: Sat, 13 Mar 2021 01:11:04 +0100 [thread overview]
Message-ID: <20210313001105.7568-1-daniel.lezcano@linaro.org> (raw)
The DTPM framework provides a generic API to register devices which
power capable. The devices may be compiled as modules while the
framework is not.
Export the necessary API to let the drivers register themselves.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/powercap/dtpm.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/powercap/dtpm.c b/drivers/powercap/dtpm.c
index a4784ac2f79b..69fb5a8e9822 100644
--- a/drivers/powercap/dtpm.c
+++ b/drivers/powercap/dtpm.c
@@ -202,6 +202,7 @@ struct dtpm *dtpm_get(const char *name)
return dtpm;
}
+EXPORT_SYMBOL_GPL(dtpm_get);
static void dtpm_release(struct kref *kref)
{
@@ -221,6 +222,7 @@ void dtpm_put(struct dtpm *dtpm)
{
kref_put(&dtpm->kref, dtpm_release);
}
+EXPORT_SYMBOL_GPL(dtpm_put);
/**
* dtpm_register - Register the dtpm in the dtpm list
@@ -266,6 +268,7 @@ int dtpm_register(const char *name, struct dtpm *dtpm)
return ret;
}
+EXPORT_SYMBOL_GPL(dtpm_register);
/**
* dtpm_unregister - Remove the dtpm device from the list
@@ -295,6 +298,7 @@ void dtpm_unregister(const char *name)
mutex_unlock(&dtpm_lock);
}
+EXPORT_SYMBOL_GPL(dtpm_unregister);
/**
* dtpm_update_power - Update the power on the dtpm
@@ -315,6 +319,7 @@ int dtpm_update_power(struct dtpm *dtpm)
return ret;
}
+EXPORT_SYMBOL_GPL(dtpm_update_power);
/**
* dtpm_release_zone - Cleanup when the node is released
@@ -515,6 +520,7 @@ void dtpm_init(struct dtpm *dtpm, struct dtpm_ops *ops)
dtpm->ops = ops;
}
}
+EXPORT_SYMBOL_GPL(dtpm_init);
/**
* dtpm_destroy - Destroy a dtpm node from the hierarchy tree
@@ -530,6 +536,7 @@ void dtpm_destroy(struct dtpm *dtpm)
pr_info("Destroyed dtpm node '%s'\n", dtpm->zone.name);
}
+EXPORT_SYMBOL_GPL(dtpm_destroy);
/**
* dtpm_create - Create a dtpm node in the hierarchy tree
@@ -604,6 +611,7 @@ int dtpm_create(const char *name, struct dtpm *dtpm, struct dtpm *parent)
return 0;
}
+EXPORT_SYMBOL_GPL(dtpm_create);
static int __init init_dtpm(void)
{
--
2.17.1
next reply other threads:[~2021-03-13 0:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-13 0:11 Daniel Lezcano [this message]
2021-03-13 0:11 ` [PATCH 2/2] powercap/drivers/dtpm: Allow dtpm node device creation through configfs Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210313001105.7568-1-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox