From 346e99246b27c741a22d47c5fb39e111a1d468ff Mon Sep 17 00:00:00 2001 From: Adam Madsen Date: Tue, 10 Nov 2020 11:36:29 -0600 Subject: [PATCH] Fix conditional guard against amdgpu module --- dkms.conf | 2 +- src/amd/common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dkms.conf b/dkms.conf index 26bb826..b14fc92 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME="vendor-reset" -PACKAGE_VERSION="0.0.3" +PACKAGE_VERSION="0.0.4" BUILT_MODULE_NAME[0]="${PACKAGE_NAME}" MAKE[0]="make KDIR=${kernel_source_dir}" CLEAN="make KDIR=${kernel_source_dir} clean" diff --git a/src/amd/common.c b/src/amd/common.c index b7e935d..b13cf99 100644 --- a/src/amd/common.c +++ b/src/amd/common.c @@ -37,7 +37,7 @@ int amd_common_pre_reset(struct vendor_reset_dev *dev) pdev->dev_flags |= PCI_DEV_FLAGS_NO_BUS_RESET; /* do not try to reset the card under amdgpu, it will cause problems */ - if (pdev->dev.driver && strcmp(pdev->dev.driver->name, "amdgpu")) + if (pdev->driver && !strcmp(pdev->driver->name, "amdgpu")) return -ENOTTY; priv = kzalloc(sizeof *priv, GFP_KERNEL);