!2 修改驱动动态加载策略

Merge pull request !2 from Allenhui89/master
This commit is contained in:
Allenhui89
2020-09-14 10:27:31 +08:00
committed by openharmony_ci
parent 75fc97c172
commit b7f2b4bc24
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -62,7 +62,6 @@ int DevHostServiceClntInstallDriver(struct DevHostServiceClnt *hostClnt)
}
ret = devHostSvcIf->AddDevice(devHostSvcIf, deviceInfo);
if (ret != HDF_SUCCESS) {
deviceInfo->preload = DEVICE_PRELOAD_DISABLE;
HDF_LOGE("Install %s driver failed, ret = %d", deviceInfo->svcName, ret);
}
}
+1 -1
View File
@@ -77,7 +77,7 @@ static int DevmgrServiceFindAndActiveDevice(const char *svcName, bool isLoad)
HdfSListIteratorInit(&itDeviceInfo, hostClnt->deviceInfos);
while (HdfSListIteratorHasNext(&itDeviceInfo)) {
deviceInfo = (struct HdfDeviceInfo *)HdfSListIteratorNext(&itDeviceInfo);
if (strcmp(deviceInfo->svcName, svcName) == 0) {
if ((strcmp(deviceInfo->svcName, svcName) == 0) && (deviceInfo->preload == DEVICE_PRELOAD_DISABLE)) {
return DevmgrServiceActiveDevice(hostClnt, deviceInfo, isLoad);
}
}