Changeset 81fc57d in rtems-libbsd


Ignore:
Timestamp:
Jan 17, 2018, 1:14:30 PM (18 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5283630d2c9d40deb0183696d278e02644fe4326, bc2ba9a9cdc7381c2a4f2ae6ee303be636f31368
Children:
0f1d2f6
Parents:
44fca38
git-author:
Sebastian Huber <sebastian.huber@…> (01/17/18 13:14:30)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/23/18 13:54:53)
Message:

linux/of.h: Add of_find_node_by_path()

Update #3277.

Location:
rtemsbsd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/powerpc/include/linux/of.h

    r44fca38 r81fc57d  
    8989int of_device_is_compatible(const struct device_node *dn, const char *name);
    9090
     91struct device_node *of_find_node_by_path(struct device_node *dns,
     92    const char *path);
     93
    9194struct device_node *of_find_compatible_node(struct device_node *dns,
    9295    const struct device_node *dn, const char *type, const char *compatible);
  • rtemsbsd/sys/powerpc/compat.c

    r44fca38 r81fc57d  
    9191
    9292struct device_node *
     93of_find_node_by_path(struct device_node *dns, const char *path)
     94{
     95        const void *fdt = bsp_fdt_get();
     96        int node;
     97
     98        memset(dns, 0, sizeof(*dns));
     99
     100        node = fdt_path_offset(fdt, path);
     101        if (node < 0)
     102                return (NULL);
     103
     104        dns->offset = node;
     105        return (dns);
     106}
     107
     108struct device_node *
    93109of_find_compatible_node(struct device_node *dns, const struct device_node *dn,
    94110    const char *type, const char *compatible)
Note: See TracChangeset for help on using the changeset viewer.