* Return the device_t for the specified driver or NULL * if the driver identifier is invalid. */
| 1080 | * if the driver identifier is invalid. |
| 1081 | */ |
| 1082 | device_t |
| 1083 | crypto_find_device_byhid(int hid) |
| 1084 | { |
| 1085 | struct cryptocap *cap; |
| 1086 | device_t dev; |
| 1087 | |
| 1088 | dev = NULL; |
| 1089 | CRYPTO_DRIVER_LOCK(); |
| 1090 | cap = crypto_checkdriver(hid); |
| 1091 | if (cap != NULL) |
| 1092 | dev = cap->cc_dev; |
| 1093 | CRYPTO_DRIVER_UNLOCK(); |
| 1094 | return (dev); |
| 1095 | } |
| 1096 | |
| 1097 | /* |
| 1098 | * Return the device/driver capabilities. |
no test coverage detected