Skip to content

Commit 9bca492

Browse files
jilaypandyakartben
authored andcommitted
drivers: w1: place api in iterable sections
this commit places w1 driver class in iterable sections Signed-off-by: Jilay Pandya <[email protected]>
1 parent e16dece commit 9bca492

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

drivers/w1/w1_ds2482-800_channel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int ds2482_init(const struct device *dev)
149149
return 0;
150150
}
151151

152-
static const struct w1_driver_api ds2482_driver_api = {
152+
static DEVICE_API(w1, ds2482_driver_api) = {
153153
.reset_bus = ds2482_reset_bus,
154154
.read_bit = ds2482_read_bit,
155155
.write_bit = ds2482_write_bit,

drivers/w1/w1_ds2484.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int ds2484_init(const struct device *dev)
149149
return 0;
150150
}
151151

152-
static const struct w1_driver_api ds2484_driver_api = {
152+
static DEVICE_API(w1, ds2484_driver_api) = {
153153
.reset_bus = ds2484_reset_bus,
154154
.read_bit = ds2484_read_bit,
155155
.write_bit = ds2484_write_bit,

drivers/w1/w1_ds2485.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static int w1_ds2485_init(const struct device *dev)
8989
return w1_ds2477_85_init(dev);
9090
}
9191

92-
static const struct w1_driver_api w1_ds2485_driver_api = {
92+
static DEVICE_API(w1, w1_ds2485_driver_api) = {
9393
.reset_bus = ds2477_85_reset_bus,
9494
.read_bit = ds2477_85_read_bit,
9595
.write_bit = ds2477_85_write_bit,

drivers/w1/w1_max32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static int w1_max32_init(const struct device *dev)
177177
return ret;
178178
}
179179

180-
static const struct w1_driver_api w1_max32_driver_api = {
180+
static DEVICE_API(w1, w1_max32_driver_api) = {
181181
.reset_bus = api_reset_bus,
182182
.read_bit = api_read_bit,
183183
.write_bit = api_write_bit,

drivers/w1/w1_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static int w1_vnd_configure(const struct device *dev,
5353
return -ENOTSUP;
5454
}
5555

56-
static const struct w1_driver_api w1_vnd_api = {
56+
static DEVICE_API(w1, w1_vnd_api) = {
5757
.reset_bus = w1_vnd_reset_bus,
5858
.read_bit = w1_vnd_read_bit,
5959
.write_bit = w1_vnd_write_bit,

drivers/w1/w1_zephyr_gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ static int w1_gpio_init(const struct device *dev)
307307
return 0;
308308
}
309309

310-
static const struct w1_driver_api w1_gpio_driver_api = {
310+
static DEVICE_API(w1, w1_gpio_driver_api) = {
311311
.reset_bus = w1_gpio_reset_bus,
312312
.read_bit = w1_gpio_read_bit,
313313
.write_bit = w1_gpio_write_bit,

drivers/w1/w1_zephyr_serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ static int w1_serial_init(const struct device *dev)
265265
return 0;
266266
}
267267

268-
static const struct w1_driver_api w1_serial_driver_api = {
268+
static DEVICE_API(w1, w1_serial_driver_api) = {
269269
.reset_bus = w1_serial_reset_bus,
270270
.read_bit = w1_serial_read_bit,
271271
.write_bit = w1_serial_write_bit,

0 commit comments

Comments
 (0)