Skip to content

Commit f0b4e4c

Browse files
VitekSTcarlescufi
authored andcommitted
drivers: gpio_mcux_lpc: Fix xt-clang error
Remove gpio_clock_names and gpio_mcux_lpc_config->clock_ip_name from drivers/gpio/gpio_mcux_lpc.c. The drivers/gpio/gpio_mcux_lpc.c file did not compile with xt-clang RI-2021.8-win32, as the gpio_clock_names was initialised with a reference to a static const array. The clock_ip_name member was initialised from this variable, but it isn't used anywhere else. Signed-off-by: Vit Stanicek <[email protected]>
1 parent 715dc68 commit f0b4e4c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/gpio/gpio_mcux_lpc.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ struct gpio_mcux_lpc_config {
4444
IOCON_Type *pinmux_base;
4545
#endif
4646
uint32_t port_no;
47-
clock_ip_name_t clock_ip_name;
4847
};
4948

5049
struct gpio_mcux_lpc_data {
@@ -381,7 +380,6 @@ static int gpio_mcux_lpc_manage_cb(const struct device *port,
381380
static int gpio_mcux_lpc_init(const struct device *dev)
382381
{
383382
const struct gpio_mcux_lpc_config *config = dev->config;
384-
385383
GPIO_PortInit(config->gpio_base, config->port_no);
386384

387385
return 0;
@@ -398,7 +396,7 @@ static const struct gpio_driver_api gpio_mcux_lpc_driver_api = {
398396
.manage_callback = gpio_mcux_lpc_manage_cb,
399397
};
400398

401-
static const clock_ip_name_t gpio_clock_names[] = GPIO_CLOCKS;
399+
402400

403401
#ifdef IOPCTL
404402
#define PINMUX_BASE IOPCTL
@@ -429,8 +427,7 @@ static const clock_ip_name_t gpio_clock_names[] = GPIO_CLOCKS;
429427
.gpio_base = GPIO, \
430428
.pinmux_base = PINMUX_BASE, \
431429
.int_source = DT_INST_ENUM_IDX(n, int_source), \
432-
.port_no = DT_INST_PROP(n, port), \
433-
.clock_ip_name = gpio_clock_names[DT_INST_PROP(n, port)], \
430+
.port_no = DT_INST_PROP(n, port) \
434431
}; \
435432
\
436433
static struct gpio_mcux_lpc_data gpio_mcux_lpc_data_##n; \

0 commit comments

Comments
 (0)