Lines Matching defs:unit
152 const char *unit, const char *prefix,
179 if (of_property_read_string(np, "unit", &s))
180 s = unit;
183 event->unit = kstrdup(s, GFP_KERNEL);
184 if (!event->unit)
190 kfree(event->unit);
208 kfree(events[i].unit);
246 /* Get a global unit and scale data if available */
250 if (of_property_read_string(node, "unit", &g_unit))
279 * memory for the scale and unit attribute for now.
313 if (pmu->events[i].unit) {
314 ev_unit_str = kasprintf(GFP_KERNEL, "%s.unit", pmu->events[i].name);
317 dev_str = device_str_attr_create(ev_unit_str, pmu->events[i].unit);
1774 * @parent: Device tree unit node