[dev] move the device/driver class api to __start __stop style symbols
This commit is contained in:
@@ -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_, \
|
||||
|
||||
Reference in New Issue
Block a user