From 0fc63394621d3c074076a5a7bed6a5c63c66ac8b Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 15 Feb 2022 10:30:23 +0000 Subject: [PATCH] consistently use __linux__ --- sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 2 +- sys/dev/pci/drm/i915/i915_drv.c | 2 +- sys/dev/pci/drm/radeon/radeon_device.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index df17e8a425e..b885a543ae6 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -1031,7 +1031,7 @@ static int amdgpu_device_doorbell_init(struct amdgpu_device *adev) return 0; } -#ifdef __linux +#ifdef __linux__ if (pci_resource_flags(adev->pdev, 2) & IORESOURCE_UNSET) return -EINVAL; #endif diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c index 75131297847..d8ba0d61577 100644 --- a/sys/dev/pci/drm/i915/i915_drv.c +++ b/sys/dev/pci/drm/i915/i915_drv.c @@ -961,7 +961,7 @@ int i915_driver_probe(struct drm_i915_private *i915, const struct pci_device_id #endif int ret; -#ifdef __linux +#ifdef __linux__ i915 = i915_driver_create(pdev, ent); if (IS_ERR(i915)) return PTR_ERR(i915); diff --git a/sys/dev/pci/drm/radeon/radeon_device.c b/sys/dev/pci/drm/radeon/radeon_device.c index a046f656ff2..c1a537bd954 100644 --- a/sys/dev/pci/drm/radeon/radeon_device.c +++ b/sys/dev/pci/drm/radeon/radeon_device.c @@ -1436,7 +1436,7 @@ int radeon_device_init(struct radeon_device *rdev, radeon_doorbell_init(rdev); /* io port mapping */ -#ifdef linux +#ifdef __linux__ for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { if (pci_resource_flags(rdev->pdev, i) & IORESOURCE_IO) { rdev->rio_mem_size = pci_resource_len(rdev->pdev, i); -- 2.20.1