return parse_prop_cells(np, prop_name, index, name, cells); \
}
-static int strcmp_suffix(const char *str, const char *suffix)
-{
- unsigned int len, suffix_len;
-
- len = strlen(str);
- suffix_len = strlen(suffix);
- if (len <= suffix_len)
- return -1;
- return strcmp(str + len - suffix_len, suffix);
-}
-
/**
* parse_suffix_prop_cells - Suffix property parsing function for suppliers
*
{
struct of_phandle_args sup_args;
- if (strcmp_suffix(prop_name, suffix))
+ if (!strends(prop_name, suffix))
return NULL;
if (of_parse_phandle_with_args(np, prop_name, cells_name, index,
static struct device_node *parse_gpios(struct device_node *np,
const char *prop_name, int index)
{
- if (!strcmp_suffix(prop_name, ",nr-gpios"))
+ if (strends(prop_name, ",nr-gpios"))
return NULL;
return parse_suffix_prop_cells(np, prop_name, index, "-gpios",