Skip to content

Commit e5fdd46

Browse files
mathieuchopstmfabiobaltieri
authored andcommitted
drivers: usb: udc: stm32: expand USB_RAM_SIZE in place where it's consumed
Instead of using global macro "USB_RAM_SIZE", replace it by its content (i.e., DT_INST_PROP()) in the only place where it was used. Signed-off-by: Mathieu Choplain <[email protected]>
1 parent 87ab3e3 commit e5fdd46

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/udc/udc_stm32.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,6 @@ static const struct udc_api udc_stm32_api = {
12191219
* Kconfig system.
12201220
*/
12211221
#define USB_NUM_BIDIR_ENDPOINTS DT_INST_PROP(0, num_bidir_endpoints)
1222-
#define USB_RAM_SIZE DT_INST_PROP(0, ram_size)
12231222

12241223
static struct udc_stm32_data udc0_priv;
12251224

@@ -1231,7 +1230,7 @@ static struct udc_data udc0_data = {
12311230
static const struct udc_stm32_config udc0_cfg = {
12321231
.base = (void *)DT_INST_REG_ADDR(0),
12331232
.num_endpoints = USB_NUM_BIDIR_ENDPOINTS,
1234-
.dram_size = USB_RAM_SIZE,
1233+
.dram_size = DT_INST_PROP(0, ram_size),
12351234
.irqn = UDC_STM32_IRQ,
12361235
.ep_mps = UDC_STM32_NODE_EP_MPS(DT_DRV_INST(0)),
12371236
.selected_phy = UDC_STM32_NODE_PHY_ITFACE(DT_DRV_INST(0)),

0 commit comments

Comments
 (0)