Skip to content

Commit 75cde56

Browse files
Saravana Kannangregkh
authored andcommitted
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>
1 parent 952c3fc commit 75cde56

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

drivers/base/core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,13 @@ static int __fwnode_link_add(struct fwnode_handle *con,
9292
return 0;
9393
}
9494

95-
int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup)
95+
int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup,
96+
u8 flags)
9697
{
9798
int ret;
9899

99100
mutex_lock(&fwnode_link_lock);
100-
ret = __fwnode_link_add(con, sup, 0);
101+
ret = __fwnode_link_add(con, sup, flags);
101102
mutex_unlock(&fwnode_link_lock);
102103
return ret;
103104
}

drivers/firmware/efi/sysfb_efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int efifb_add_links(struct fwnode_handle *fwnode)
336336
if (!sup_np)
337337
return 0;
338338

339-
fwnode_link_add(fwnode, of_fwnode_handle(sup_np));
339+
fwnode_link_add(fwnode, of_fwnode_handle(sup_np), 0);
340340
of_node_put(sup_np);
341341

342342
return 0;

drivers/of/property.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ static void of_link_to_phandle(struct device_node *con_np,
10851085
tmp_np = of_get_next_parent(tmp_np);
10861086
}
10871087

1088-
fwnode_link_add(of_fwnode_handle(con_np), of_fwnode_handle(sup_np));
1088+
fwnode_link_add(of_fwnode_handle(con_np), of_fwnode_handle(sup_np), 0);
10891089
}
10901090

10911091
/**

include/linux/fwnode.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode,
214214
fwnode->flags &= ~FWNODE_FLAG_INITIALIZED;
215215
}
216216

217-
int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup);
217+
int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup,
218+
u8 flags);
218219
void fwnode_links_purge(struct fwnode_handle *fwnode);
219220
void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode);
220221
bool fw_devlink_is_strict(void);

0 commit comments

Comments
 (0)