Changeset 81fc57d in rtems-libbsd


Ignore:
Timestamp:
Jan 17, 2018, 1:14:30 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
b96abfd647154f10ea8f7fac68e25676636eded5, 7f47f2784138109b8363804c2aecd3d83231ab0f, f1f03620800b14146977d78fb4322d80da04b53a, 90a9fd66e0a85d8520bbb4bbcb72bfd274965961
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.