From aa144ca3f09139b71ccfe0d6627cc5ec2bad4403 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Tue, 19 Oct 2021 16:58:30 +0200 Subject: [PATCH] drivers/usb: stm23: Fix deprecated macro declaration Use of '__DEPRECATED_MACRO' was not compatible with the way macro is used later in this driver. Remove it and keep the warning as vector for deprecation information. Additionally, replace DT_NODE_HAS_PROP with DT_INST_PROP as using the former is not recommended with boolean properties. Signed-off-by: Erwan Gouriou --- drivers/usb/device/usb_dc_stm32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/device/usb_dc_stm32.c b/drivers/usb/device/usb_dc_stm32.c index 95fe2e4e791..26b2af89e88 100644 --- a/drivers/usb/device/usb_dc_stm32.c +++ b/drivers/usb/device/usb_dc_stm32.c @@ -44,8 +44,8 @@ LOG_MODULE_REGISTER(usb_dc_stm32); #elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_usb) #define DT_DRV_COMPAT st_stm32_usb #define USB_IRQ_NAME usb -#if DT_INST_NODE_HAS_PROP(0, enable_pin_remap) -#define USB_ENABLE_PIN_REMAP __DEPRECATED_MACRO DT_INST_PROP(0, enable_pin_remap) +#if DT_INST_PROP(0, enable_pin_remap) +#define USB_ENABLE_PIN_REMAP DT_INST_PROP(0, enable_pin_remap) #warning "Property deprecated in favor of property 'remap-pa11-pa12' from 'st-stm32-pinctrl'" #endif #endif