tools/testing/cxl: Use dev_is_platform()

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>
This commit is contained in:
Kunwu Chan 2024-08-27 17:51:23 +08:00 committed by Dave Jiang
parent 1f9651bfc5
commit 1c1d348b08

View 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);