Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fbdev: via: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Bartosz Golaszewski and committed by
Helge Deller
2be35879 0f70f5b0

+5 -5
+5 -5
drivers/video/fbdev/via/via-gpio.c
··· 81 81 /* 82 82 * GPIO access functions 83 83 */ 84 - static void via_gpio_set(struct gpio_chip *chip, unsigned int nr, 85 - int value) 84 + static int via_gpio_set(struct gpio_chip *chip, unsigned int nr, int value) 86 85 { 87 86 struct viafb_gpio_cfg *cfg = gpiochip_get_data(chip); 88 87 u8 reg; ··· 98 99 reg &= ~(0x10 << gpio->vg_mask_shift); 99 100 via_write_reg(VIASR, gpio->vg_port_index, reg); 100 101 spin_unlock_irqrestore(&cfg->vdev->reg_lock, flags); 102 + 103 + return 0; 101 104 } 102 105 103 106 static int via_gpio_dir_out(struct gpio_chip *chip, unsigned int nr, 104 107 int value) 105 108 { 106 - via_gpio_set(chip, nr, value); 107 - return 0; 109 + return via_gpio_set(chip, nr, value); 108 110 } 109 111 110 112 /* ··· 146 146 .label = "VIAFB onboard GPIO", 147 147 .owner = THIS_MODULE, 148 148 .direction_output = via_gpio_dir_out, 149 - .set = via_gpio_set, 149 + .set_rv = via_gpio_set, 150 150 .direction_input = via_gpio_dir_input, 151 151 .get = via_gpio_get, 152 152 .base = -1,