Skip to content

Commit 08b7d17

Browse files
committed
iio: adc: ad7768-1: use static for local functions
All of the gpio functions are not exported or meant to be user by another source file or driver. Therefore define them as static. This was spotted when preparing a 6.12 RPI branch as we'll start getting warnings regarding this. So better fix it now. Signed-off-by: Nuno Sá <nuno.sa@analog.com>
1 parent 36cae35 commit 08b7d17

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/iio/adc/ad7768-1.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ static int ad7768_set_dig_fil(struct ad7768_state *st,
378378
return 0;
379379
}
380380

381-
int ad7768_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
381+
static int ad7768_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
382382
{
383383
struct ad7768_state *st = gpiochip_get_data(chip);
384384
int ret;
@@ -393,8 +393,8 @@ int ad7768_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
393393
return ret;
394394
}
395395

396-
int ad7768_gpio_direction_output(struct gpio_chip *chip,
397-
unsigned int offset, int value)
396+
static int ad7768_gpio_direction_output(struct gpio_chip *chip,
397+
unsigned int offset, int value)
398398
{
399399
struct ad7768_state *st = gpiochip_get_data(chip);
400400
int ret;
@@ -409,7 +409,7 @@ int ad7768_gpio_direction_output(struct gpio_chip *chip,
409409
return ret;
410410
}
411411

412-
int ad7768_gpio_get(struct gpio_chip *chip, unsigned int offset)
412+
static int ad7768_gpio_get(struct gpio_chip *chip, unsigned int offset)
413413
{
414414
struct ad7768_state *st = gpiochip_get_data(chip);
415415
unsigned int val;
@@ -435,7 +435,7 @@ int ad7768_gpio_get(struct gpio_chip *chip, unsigned int offset)
435435
return ret;
436436
}
437437

438-
void ad7768_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
438+
static void ad7768_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
439439
{
440440
struct ad7768_state *st = gpiochip_get_data(chip);
441441
unsigned int val;
@@ -456,7 +456,7 @@ void ad7768_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
456456
mutex_unlock(&st->lock);
457457
}
458458

459-
int ad7768_gpio_request(struct gpio_chip *chip, unsigned int offset)
459+
static int ad7768_gpio_request(struct gpio_chip *chip, unsigned int offset)
460460
{
461461
struct ad7768_state *st = gpiochip_get_data(chip);
462462

@@ -468,7 +468,7 @@ int ad7768_gpio_request(struct gpio_chip *chip, unsigned int offset)
468468
return 0;
469469
}
470470

471-
int ad7768_gpio_init(struct ad7768_state *st)
471+
static int ad7768_gpio_init(struct ad7768_state *st)
472472
{
473473
int ret;
474474

0 commit comments

Comments
 (0)