/** * rpmb_dev_find_device() - return first matching rpmb device * @start: rpmb device to begin with * @data: data for the match function * @match: the matching function * * Iterate over registered RPMB devices, and call @match() for each passing * it the RPMB device and @data. * * The return value of @match() is checked for each call. If it returns * anything other 0, break and return the found RPMB device. * * It's the callers responsibility to call rpmb_dev_put() on the returned * device, when it's done with it. * * Returns: a matching rpmb device or NULL on failure
*/ struct rpmb_dev *rpmb_dev_find_device(constvoid *data, conststruct rpmb_dev *start, int (*match)(struct device *dev, constvoid *data))
{ struct device *dev; conststruct device *start_dev = NULL;
if (start)
start_dev = &start->dev;
dev = class_find_device(&rpmb_class, start_dev, data, match);
return dev ? to_rpmb_dev(dev) : NULL;
}
EXPORT_SYMBOL_GPL(rpmb_dev_find_device);
int rpmb_interface_register(struct class_interface *intf)
{
intf->class = &rpmb_class;
/** * rpmb_dev_unregister() - unregister RPMB partition from the RPMB subsystem * @rdev: the rpmb device to unregister * * This function should be called from the release function of the * underlying device used when the RPMB device was registered. * * Returns: < 0 on failure
*/ int rpmb_dev_unregister(struct rpmb_dev *rdev)
{ if (!rdev) return -EINVAL;
/** * rpmb_dev_register - register RPMB partition with the RPMB subsystem * @dev: storage device of the rpmb device * @descr: RPMB device description * * While registering the RPMB partition extract needed device information * while needed resources are available. * * Returns: a pointer to a 'struct rpmb_dev' or an ERR_PTR on failure
*/ struct rpmb_dev *rpmb_dev_register(struct device *dev, struct rpmb_descr *descr)
{ struct rpmb_dev *rdev; int ret;
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.