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 <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2021-10-19 16:58:30 +02:00 committed by Kumar Gala
commit aa144ca3f0

View file

@ -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