linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, sudeep.holla@arm.com
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	linux-amlogic@lists.infradead.org, khilman@baylibre.com,
	heiko@sntech.de, wxt@rock-chips.com, frank.wang@rock-chips.com
Subject: [RFC PATCH v3 2/8] firmware: scpi: Switch arm_scpi to use new registry
Date: Tue,  9 Aug 2016 12:29:16 +0200	[thread overview]
Message-ID: <1470738562-20026-3-git-send-email-narmstrong@baylibre.com> (raw)
In-Reply-To: <1470738562-20026-1-git-send-email-narmstrong@baylibre.com>

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/firmware/arm_scpi.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 4388937..c6d6528 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -162,7 +162,6 @@ struct scpi_drvinfo {
 	u32 firmware_version;
 	int num_chans;
 	atomic_t next_chan;
-	struct scpi_ops *scpi_ops;
 	struct scpi_chan *channels;
 	struct scpi_dvfs_info *dvfs[MAX_DVFS_DOMAINS];
 };
@@ -580,12 +579,6 @@ static struct scpi_ops scpi_ops = {
 	.device_set_power_state = scpi_device_set_power_state,
 };
 
-struct scpi_ops *get_scpi_ops(void)
-{
-	return scpi_info ? scpi_info->scpi_ops : NULL;
-}
-EXPORT_SYMBOL_GPL(get_scpi_ops);
-
 static int scpi_init_versions(struct scpi_drvinfo *info)
 {
 	int ret;
@@ -769,7 +762,10 @@ err:
 		  FW_REV_MAJOR(scpi_info->firmware_version),
 		  FW_REV_MINOR(scpi_info->firmware_version),
 		  FW_REV_PATCH(scpi_info->firmware_version));
-	scpi_info->scpi_ops = &scpi_ops;
+
+	ret = devm_scpi_ops_register(dev, &scpi_ops);
+	if (ret)
+		return ret;
 
 	ret = sysfs_create_groups(&dev->kobj, versions_groups);
 	if (ret)
-- 
2.7.0

  parent reply	other threads:[~2016-08-09 10:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 10:29 [RFC PATCH v3 0/8] scpi: Add SCPI registry to handle legacy protocol Neil Armstrong
2016-08-09 10:29 ` [RFC PATCH v3 1/8] firmware: Add a SCPI registry to handle multiple implementations Neil Armstrong
2016-08-09 10:29 ` Neil Armstrong [this message]
2016-08-09 10:29 ` [RFC PATCH v3 3/8] scpi: Add vendor_send_message to enable access to vendor commands Neil Armstrong
2016-08-09 10:29 ` [RFC PATCH v3 4/8] firmware: arm_scpi: Enable vendor_send_message as ext commands Neil Armstrong
2016-08-09 10:29 ` [RFC PATCH v3 5/8] firmware: Add legacy SCPI protocol driver Neil Armstrong
2016-08-15 13:35   ` Sudeep Holla
2016-08-16  9:41     ` Neil Armstrong
2016-08-16  9:58       ` Sudeep Holla
2016-08-09 10:29 ` [RFC PATCH v3 6/8] dt-bindings: arm: Update arm,scpi bindings with Meson GXBB SCPI Neil Armstrong
     [not found] ` <d7f260f8-5e1a-a16a-fed9-2f6d8aa8f28f@rock-chips.com>
2016-08-11  8:35   ` [RFC PATCH v3 0/8] scpi: Add SCPI registry to handle legacy protocol Neil Armstrong

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=1470738562-20026-3-git-send-email-narmstrong@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=frank.wang@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=wxt@rock-chips.com \
    /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;
as well as URLs for NNTP newsgroup(s).