[dev] move the device/driver class api to __start __stop style symbols

This commit is contained in:
Travis Geiselbrecht
2020-05-15 00:11:14 -07:00
parent d3d22d68a5
commit 7544ff39b5
5 changed files with 6 additions and 30 deletions

View File

@@ -70,7 +70,7 @@ struct driver {
#define DRIVER_EXPORT(type_, ops_) \
const struct driver concat(__driver_, type_) \
__ALIGNED(sizeof(void *)) __SECTION(".drivers") = { \
__ALIGNED(sizeof(void *)) __SECTION("drivers") = { \
.type = #type_, \
.ops = ops_, \
}
@@ -78,7 +78,7 @@ struct driver {
#define DEVICE_INSTANCE(type_, name_, config_, flags_) \
extern struct driver concat(__driver_, type_); \
struct device concat(__device_, concat(type_, concat(_, name_))) \
__ALIGNED(sizeof(void *)) __SECTION(".devices") = { \
__ALIGNED(sizeof(void *)) __SECTION("devices") = { \
.name = #name_, \
.driver = &concat(__driver_, type_), \
.flags = flags_, \