diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-16 21:20:23 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-18 20:32:21 -0700 |
commit | d1e85308feed8ea66d2af71860130f004d5f9632 (patch) | |
tree | 9ab40b929d5b34f3e092f6aafd118000634b8eaa /test/dm | |
parent | df3dc209526e9d8b5636a01cdb5cc0a396742159 (diff) | |
download | u-boot-d1e85308feed8ea66d2af71860130f004d5f9632.tar.gz |
x86: Simplify acpi_device_infer_name()
There is no-longer any need to check if sequence numbers are valid, since
this is ensured by driver model. Drop the unwanted logic.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm')
-rw-r--r-- | test/dm/acpi.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/dm/acpi.c b/test/dm/acpi.c index c5c3726382..e0a323ecd4 100644 --- a/test/dm/acpi.c +++ b/test/dm/acpi.c @@ -123,7 +123,7 @@ UCLASS_DRIVER(testacpi) = { static int dm_test_acpi_get_name(struct unit_test_state *uts) { char name[ACPI_NAME_MAX]; - struct udevice *dev, *dev2, *i2c, *spi, *serial, *timer, *sound; + struct udevice *dev, *dev2, *i2c, *spi, *timer, *sound; struct udevice *pci, *root; /* Test getting the name from the driver */ @@ -146,10 +146,6 @@ static int dm_test_acpi_get_name(struct unit_test_state *uts) ut_assertok(acpi_get_name(spi, name)); ut_asserteq_str("SPI0", name); - /* The uart has no sequence number, so this should fail */ - ut_assertok(uclass_first_device(UCLASS_SERIAL, &serial)); - ut_asserteq(-ENXIO, acpi_get_name(serial, name)); - /* ACPI doesn't know about the timer */ ut_assertok(uclass_first_device(UCLASS_TIMER, &timer)); ut_asserteq(-ENOENT, acpi_get_name(timer, name)); |