]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools/testing/cxl: Use dev_is_platform()
authorKunwu Chan <chentao@kylinos.cn>
Tue, 27 Aug 2024 09:51:23 +0000 (17:51 +0800)
committerDave Jiang <dave.jiang@intel.com>
Tue, 3 Sep 2024 21:40:41 +0000 (14:40 -0700)
Use dev_is_platform() instead of checking bus type directly.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://patch.msgid.link/20240827095123.168696-1-kunwu.chan@linux.dev
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
tools/testing/cxl/mock_acpi.c

index 55813de26d46d3c5d7f0b1e221155445c61f33c4..8da94378ccecc0cfae8e6d9f53c56e74f91264af 100644 (file)
@@ -18,7 +18,7 @@ struct acpi_device *to_cxl_host_bridge(struct device *host, struct device *dev)
                goto out;
        }
 
-       if (dev->bus == &platform_bus_type)
+       if (dev_is_platform(dev))
                goto out;
 
        adev = to_acpi_device(dev);