drivers: remove a couple of DT abstraction violations
DT_CALL_WITH_ARG() is an internal implementation detail that should not be used outside of devicetree.h. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
db4a0c0b42
commit
bbd6473136
2 changed files with 6 additions and 2 deletions
|
@ -363,8 +363,10 @@ static const struct adc_driver_api mcp320x_adc_api = {
|
|||
*/
|
||||
#define MCP3208_DEVICE(n) MCP320X_DEVICE(3208, n, 8)
|
||||
|
||||
#define CALL_WITH_ARG(arg, expr) expr(arg);
|
||||
|
||||
#define DT_INST_MCP320X_FOREACH(t, inst_expr) \
|
||||
UTIL_LISTIFY(DT_NUM_INST(microchip_mcp##t), DT_CALL_WITH_ARG, inst_expr)
|
||||
UTIL_LISTIFY(DT_NUM_INST(microchip_mcp##t), CALL_WITH_ARG, inst_expr)
|
||||
|
||||
DT_INST_MCP320X_FOREACH(3204, MCP3204_DEVICE);
|
||||
DT_INST_MCP320X_FOREACH(3208, MCP3208_DEVICE);
|
||||
|
|
|
@ -599,8 +599,10 @@ static const struct eeprom_driver_api eeprom_at2x_api = {
|
|||
#define EEPROM_AT24_DEVICE(n) EEPROM_AT2X_DEVICE(n, 24)
|
||||
#define EEPROM_AT25_DEVICE(n) EEPROM_AT2X_DEVICE(n, 25)
|
||||
|
||||
#define CALL_WITH_ARG(arg, expr) expr(arg);
|
||||
|
||||
#define DT_INST_AT2X_FOREACH(t, inst_expr) \
|
||||
UTIL_LISTIFY(DT_NUM_INST(atmel_at##t), DT_CALL_WITH_ARG, inst_expr)
|
||||
UTIL_LISTIFY(DT_NUM_INST(atmel_at##t), CALL_WITH_ARG, inst_expr)
|
||||
|
||||
#ifdef CONFIG_EEPROM_AT24
|
||||
DT_INST_AT2X_FOREACH(24, EEPROM_AT24_DEVICE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue