lkml.org 
[lkml]   [2019]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/16] device connection: use new match_string() helper/macro
Date
The `device_connection` struct is defined as:
struct device_connection {
struct fwnode_handle *fwnode;
const char *endpoint[2];
const char *id;
struct list_head list;
};

The `endpoint` member is a static array of strings (on the struct), so
using the match_string() (which does an ARRAY_SIZE((con->endpoint)) should
be fine.

The recent change to match_string() (to ignore NULL entries up to the size
of the array) shouldn't affect this.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
drivers/base/devcon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/devcon.c b/drivers/base/devcon.c
index 7bc1c619b721..4a2338665585 100644
--- a/drivers/base/devcon.c
+++ b/drivers/base/devcon.c
@@ -70,7 +70,7 @@ void *device_connection_find_match(struct device *dev, const char *con_id,
mutex_lock(&devcon_lock);

list_for_each_entry(con, &devcon_list, list) {
- ep = __match_string(con->endpoint, 2, devname);
+ ep = match_string(con->endpoint, devname);
if (ep < 0)
continue;

--
2.17.1
\
 
 \ /
  Last update: 2019-05-08 13:33    [W:0.195 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site