[platform-bus][test] Migrate test-child-2.proxy to new bind rules
TESTED: fx test //src/devices/bus/drivers/platform/
Change-Id: Ib80fee4f942ce449c3112ee150028c64b90dcdac
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/450315
Fuchsia-Auto-Submit: Alex Legg <alexlegg@google.com>
Reviewed-by: Suraj Malhotra <surajmalhotra@google.com>
Testability-Review: Suraj Malhotra <surajmalhotra@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
diff --git a/src/devices/bus/drivers/platform/test/BUILD.gn b/src/devices/bus/drivers/platform/test/BUILD.gn
index b2d8d6e..d205559 100644
--- a/src/devices/bus/drivers/platform/test/BUILD.gn
+++ b/src/devices/bus/drivers/platform/test/BUILD.gn
@@ -372,6 +372,11 @@
]
}
+bind_rules("test-child-2.proxy-bind") {
+ output = "test-child-2.proxy-bind.h"
+ disable_autobind = true
+}
+
driver_module("test-child-2.proxy") {
configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ]
configs += [
@@ -380,11 +385,9 @@
]
sources = [ "test/child-2.proxy.c" ]
deps = [
+ ":test-child-2.proxy-bind",
"//src/devices/lib/driver",
"//src/lib/ddk",
-
- # TODO(fxb/38132): Migrate to the new bind rules and delete the below
- "//src/lib/ddk:ddk-deprecated-binding-headers",
]
}
diff --git a/src/devices/bus/drivers/platform/test/test/child-2.proxy.c b/src/devices/bus/drivers/platform/test/test/child-2.proxy.c
index 643aa7e..1c890a2 100644
--- a/src/devices/bus/drivers/platform/test/test/child-2.proxy.c
+++ b/src/devices/bus/drivers/platform/test/test/child-2.proxy.c
@@ -5,12 +5,13 @@
#include <stdlib.h>
#include <string.h>
-#include <ddk/binding.h>
#include <ddk/debug.h>
#include <ddk/device.h>
#include <ddk/driver.h>
#include <ddk/platform-defs.h>
+#include "src/devices/bus/drivers/platform/test/test-child-2.proxy-bind.h"
+
#define DRIVER_NAME "test-child-4"
typedef struct {
@@ -76,6 +77,4 @@
.create = test_create,
};
-ZIRCON_DRIVER_BEGIN(test_bus, test_driver_ops, "zircon", "0.1", 1)
-BI_ABORT_IF_AUTOBIND
-ZIRCON_DRIVER_END(test_bus)
+ZIRCON_DRIVER(test_bus, test_driver_ops, "zircon", "0.1")