imx8/gpio: use u32int for bit mask

This commit is contained in:
cinap_lenrek 2022-06-13 23:26:14 +00:00
parent 04d1e6ffe9
commit 176206fb02

View file

@ -57,7 +57,7 @@ enable(uint pin)
void void
gpioout(uint pin, int set) gpioout(uint pin, int set)
{ {
int bit = 1 << (pin % 32); u32int bit = 1 << (pin % 32);
Ctlr *ctlr = enable(pin); Ctlr *ctlr = enable(pin);
if(ctlr == nil) if(ctlr == nil)
return; return;
@ -72,7 +72,7 @@ gpioout(uint pin, int set)
int int
gpioin(uint pin) gpioin(uint pin)
{ {
int bit = 1 << (pin % 32); u32int bit = 1 << (pin % 32);
Ctlr *ctlr = enable(pin); Ctlr *ctlr = enable(pin);
if(ctlr == nil) if(ctlr == nil)
return -1; return -1;