File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -7166,7 +7166,7 @@ static void tcpm_fw_get_timings(struct tcpm_port *port, struct fwnode_handle *fw
7166
7166
7167
7167
static int tcpm_fw_get_caps (struct tcpm_port * port , struct fwnode_handle * fwnode )
7168
7168
{
7169
- struct fwnode_handle * capabilities , * child , * caps = NULL ;
7169
+ struct fwnode_handle * capabilities , * caps = NULL ;
7170
7170
unsigned int nr_src_pdo , nr_snk_pdo ;
7171
7171
const char * opmode_str ;
7172
7172
u32 * src_pdo , * snk_pdo ;
@@ -7232,9 +7232,7 @@ static int tcpm_fw_get_caps(struct tcpm_port *port, struct fwnode_handle *fwnode
7232
7232
if (!capabilities ) {
7233
7233
port -> pd_count = 1 ;
7234
7234
} else {
7235
- fwnode_for_each_child_node (capabilities , child )
7236
- port -> pd_count ++ ;
7237
-
7235
+ port -> pd_count = fwnode_get_child_node_count (capabilities );
7238
7236
if (!port -> pd_count ) {
7239
7237
ret = - ENODATA ;
7240
7238
goto put_capabilities ;
You can’t perform that action at this time.
0 commit comments