/** * pvr_hwrt_dataset_lookup() - Lookup HWRT dataset pointer from handle * @pvr_file: Pointer to pvr_file structure. * @handle: Object handle. * * Takes reference on dataset object. Call pvr_hwrt_dataset_put() to release. * * Returns: * * The requested object on success, or * * %NULL on failure (object does not exist in list, or is not a HWRT * dataset)
*/ static __always_inline struct pvr_hwrt_dataset *
pvr_hwrt_dataset_lookup(struct pvr_file *pvr_file, u32 handle)
{ struct pvr_hwrt_dataset *hwrt;
/** * pvr_hwrt_data_lookup() - Lookup HWRT data pointer from handle and index * @pvr_file: Pointer to pvr_file structure. * @handle: Object handle. * @index: Index of RT data within dataset. * * Takes reference on dataset object. Call pvr_hwrt_data_put() to release. * * Returns: * * The requested object on success, or * * %NULL on failure (object does not exist in list, or is not a HWRT * dataset, or index is out of range)
*/ static __always_inline struct pvr_hwrt_data *
pvr_hwrt_data_lookup(struct pvr_file *pvr_file, u32 handle, u32 index)
{ struct pvr_hwrt_dataset *hwrt_dataset = pvr_hwrt_dataset_lookup(pvr_file, handle);
if (hwrt_dataset) { if (index < ARRAY_SIZE(hwrt_dataset->data)) return &hwrt_dataset->data[index];
pvr_hwrt_dataset_put(hwrt_dataset);
}
return NULL;
}
/** * pvr_hwrt_data_put() - Release reference on HWRT data * @hwrt: Pointer to HWRT data to release reference on
*/ static __always_inline void
pvr_hwrt_data_put(struct pvr_hwrt_data *hwrt)
{ if (hwrt)
pvr_hwrt_dataset_put(hwrt->hwrt_dataset);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.