Skip to content

Commit 27c73d3

Browse files
mmahadevan108cfriedt
authored andcommitted
drivers: lpc_gpio: Fix warning when interrupt is not defined
Unused variable warnings were seen when the GPIO interrupt property was not defined. Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 77f05e3 commit 27c73d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpio/gpio_mcux_lpc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ static const clock_ip_name_t gpio_clock_names[] = GPIO_CLOCKS;
364364

365365
#define GPIO_MCUX_LPC_IRQ_CONNECT(n, m) \
366366
do { \
367+
struct gpio_mcux_lpc_data *data = dev->data; \
367368
IRQ_CONNECT(DT_INST_IRQ_BY_IDX(n, m, irq), \
368369
DT_INST_IRQ_BY_IDX(n, m, priority), \
369370
gpio_mcux_lpc_port_isr, DEVICE_DT_INST_GET(n), 0); \
@@ -374,6 +375,7 @@ static const clock_ip_name_t gpio_clock_names[] = GPIO_CLOCKS;
374375
#define GPIO_MCUX_LPC_IRQ(n, m) \
375376
COND_CODE_1(DT_INST_IRQ_HAS_IDX(n, m), (GPIO_MCUX_LPC_IRQ_CONNECT(n, m)), ())
376377

378+
377379
#define GPIO_MCUX_LPC(n) \
378380
static int lpc_gpio_init_##n(const struct device *dev); \
379381
\
@@ -398,8 +400,6 @@ static const clock_ip_name_t gpio_clock_names[] = GPIO_CLOCKS;
398400
\
399401
static int lpc_gpio_init_##n(const struct device *dev) \
400402
{ \
401-
struct gpio_mcux_lpc_data *data = dev->data; \
402-
\
403403
gpio_mcux_lpc_init(dev); \
404404
\
405405
GPIO_MCUX_LPC_IRQ(n, 0); \

0 commit comments

Comments
 (0)