driver core: Adds flags param to fwnode_link_add()
Allow the callers to set fwnode link flags when adding fwnode links. Signed-off-by: Saravana Kannan <saravanak@google.com> Acked-by: "Rafael J. Wysocki" <rafael@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20240305050458.1400667-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
952c3fce29
commit
75cde56a5b
@ -92,12 +92,13 @@ static int __fwnode_link_add(struct fwnode_handle *con,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup)
|
||||
int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup,
|
||||
u8 flags)
|
||||
{
|
||||
int ret;
|
||||
|
||||
mutex_lock(&fwnode_link_lock);
|
||||
ret = __fwnode_link_add(con, sup, 0);
|
||||
ret = __fwnode_link_add(con, sup, flags);
|
||||
mutex_unlock(&fwnode_link_lock);
|
||||
return ret;
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ static int efifb_add_links(struct fwnode_handle *fwnode)
|
||||
if (!sup_np)
|
||||
return 0;
|
||||
|
||||
fwnode_link_add(fwnode, of_fwnode_handle(sup_np));
|
||||
fwnode_link_add(fwnode, of_fwnode_handle(sup_np), 0);
|
||||
of_node_put(sup_np);
|
||||
|
||||
return 0;
|
||||
|
@ -1085,7 +1085,7 @@ static void of_link_to_phandle(struct device_node *con_np,
|
||||
tmp_np = of_get_next_parent(tmp_np);
|
||||
}
|
||||
|
||||
fwnode_link_add(of_fwnode_handle(con_np), of_fwnode_handle(sup_np));
|
||||
fwnode_link_add(of_fwnode_handle(con_np), of_fwnode_handle(sup_np), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -214,7 +214,8 @@ static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode,
|
||||
fwnode->flags &= ~FWNODE_FLAG_INITIALIZED;
|
||||
}
|
||||
|
||||
int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup);
|
||||
int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup,
|
||||
u8 flags);
|
||||
void fwnode_links_purge(struct fwnode_handle *fwnode);
|
||||
void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode);
|
||||
bool fw_devlink_is_strict(void);
|
||||
|
Loading…
Reference in New Issue
Block a user