Message ID | AANLkTi=UrUVinO-Px-yc+7OfskODJADD_QpgRYDRHYxm@mail.gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Dear Chris Packham, In message <AANLkTi=UrUVinO-Px-yc+7OfskODJADD_QpgRYDRHYxm@mail.gmail.com> you wrote: > > There is one minor fixup we might want to squash into v3 (or if > someone wants me to submit a v4 I can). It makes sense to have > pca953x_ngpio as a function in both cases. The compiler will > auto-inline the function so we won't see a increase in size and having > a function instead of a macro allows the compiler to do proper type > checking. Please send a v4. Thanks. Best regards, Wolfgang Denk
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index c8f5403..359fdee 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c @@ -65,7 +65,10 @@ static int pca953x_ngpio(uint8_t chip) return 8; } #else -#define pca953x_ngpio(chip) 8 +static int pca953x_ngpio(uint8_t chip) +{ + return 8; +} #endif /*