Skip to content

Commit 1599858

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
pcmcia: soc_common: Avoid using GPIOF_ACTIVE_LOW
Avoid using GPIOF_ACTIVE_LOW as it's deprecated and subject to remove. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Acked-by: Dominik Brodowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent e6a2f0e commit 1599858

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

drivers/pcmcia/soc_common.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,21 +204,19 @@ static int soc_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
204204

205205
for (i = 0; i < ARRAY_SIZE(skt->stat); i++) {
206206
if (gpio_is_valid(skt->stat[i].gpio)) {
207-
unsigned long flags = GPIOF_IN;
208-
209-
/* CD is active low by default */
210-
if (i == SOC_STAT_CD)
211-
flags |= GPIOF_ACTIVE_LOW;
212-
213207
ret = devm_gpio_request_one(skt->socket.dev.parent,
214-
skt->stat[i].gpio, flags,
208+
skt->stat[i].gpio, GPIOF_IN,
215209
skt->stat[i].name);
216210
if (ret) {
217211
__soc_pcmcia_hw_shutdown(skt, i);
218212
return ret;
219213
}
220214

221215
skt->stat[i].desc = gpio_to_desc(skt->stat[i].gpio);
216+
217+
/* CD is active low by default */
218+
if ((i == SOC_STAT_CD) ^ gpiod_is_active_low(skt->stat[i].desc))
219+
gpiod_toggle_active_low(skt->stat[i].desc);
222220
}
223221

224222
if (i < SOC_STAT_VS1 && skt->stat[i].desc) {

0 commit comments

Comments
 (0)