mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
driver core: Add fwnode_init()
There are multiple locations in the kernel where a struct fwnode_handle is initialized. Add fwnode_init() so that we have one way of initializing a fwnode_handle. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20201121020232.908850-8-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c84b90909e
commit
01bb86b380
7 changed files with 15 additions and 9 deletions
|
@ -170,6 +170,12 @@ struct fwnode_operations {
|
|||
} while (false)
|
||||
#define get_dev_from_fwnode(fwnode) get_device((fwnode)->dev)
|
||||
|
||||
static inline void fwnode_init(struct fwnode_handle *fwnode,
|
||||
const struct fwnode_operations *ops)
|
||||
{
|
||||
fwnode->ops = ops;
|
||||
}
|
||||
|
||||
extern u32 fw_devlink_get_flags(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue