From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/3] device property: fallback to pset when gettng one string
Date: Mon, 10 Aug 2015 19:56:47 +0300 [thread overview]
Message-ID: <1439225808-132916-2-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1439225808-132916-1-git-send-email-andriy.shevchenko@linux.intel.com>
The one string as an equivalent to an array of one element. Allow user to read
one string as a plain string.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/base/property.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/base/property.c b/drivers/base/property.c
index 37a7bb7..841b15c 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -462,7 +462,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode,
return acpi_dev_prop_read(to_acpi_node(fwnode), propname,
DEV_PROP_STRING, val, 1);
- return -ENXIO;
+ return pset_prop_read_array(to_pset(fwnode), propname,
+ DEV_PROP_STRING, val, 1);
}
EXPORT_SYMBOL_GPL(fwnode_property_read_string);
--
2.5.0
next prev parent reply other threads:[~2015-08-10 16:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-10 16:56 [PATCH v1 1/3] device property: check fwnode type in to_of_node() Andy Shevchenko
2015-08-10 16:56 ` Andy Shevchenko [this message]
2015-08-12 11:48 ` [PATCH v1 2/3] device property: fallback to pset when gettng one string Mika Westerberg
2015-08-10 16:56 ` [PATCH v1 3/3] device property: attach 'else if' to the proper 'if' Andy Shevchenko
2015-08-10 17:05 ` Andy Shevchenko
2015-08-12 11:52 ` Mika Westerberg
2015-08-12 11:47 ` [PATCH v1 1/3] device property: check fwnode type in to_of_node() Mika Westerberg
2015-08-26 0:17 ` Rafael J. Wysocki
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=1439225808-132916-2-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.