diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2019-08-29 17:22:33 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 16:04:52 +0200 |
commit | 44493062abc38e5895e0cf8d22698f2ca39a1e4d (patch) | |
tree | 43300e21c254fceea83b77dab52b56c8f9cc7d21 /include/linux/device.h | |
parent | 977607653cdd06a2c4d1d0f179ff46cc0cbe83a5 (diff) | |
download | linux-stable-44493062abc38e5895e0cf8d22698f2ca39a1e4d.tar.gz linux-stable-44493062abc38e5895e0cf8d22698f2ca39a1e4d.tar.bz2 linux-stable-44493062abc38e5895e0cf8d22698f2ca39a1e4d.zip |
device connection: Add fwnode_connection_find_match()
The fwnode_connection_find_match() function is exactly the
same as device_connection_find_match(), except it takes
struct fwnode_handle as parameter instead of struct device.
That allows locating device connections before the device
entries have been created.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1567070558-29417-7-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 47ccb2029bc3..b3aa7295b4cb 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -781,10 +781,14 @@ struct device_connection { struct list_head list; }; +typedef void *(*devcon_match_fn_t)(struct device_connection *con, int ep, + void *data); + +void *fwnode_connection_find_match(struct fwnode_handle *fwnode, + const char *con_id, void *data, + devcon_match_fn_t match); void *device_connection_find_match(struct device *dev, const char *con_id, - void *data, - void *(*match)(struct device_connection *con, - int ep, void *data)); + void *data, devcon_match_fn_t match); struct device *device_connection_find(struct device *dev, const char *con_id); |