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.

Merge tag 'gpio-fixes-for-v6.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

- use the firmware node of the GPIO chip, not its label for software
node lookup

- fix invalid pointer access in GPIO debugfs

- drop unused functions from gpio-tb10x

- fix a regression in gpio-aggregator: restore the set_config()
callback in the driver

- correct schema $id path in ti,twl4030 DT bindings

* tag 'gpio-fixes-for-v6.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpio: tb10x: Drop unused tb10x_set_bits() function
gpio: aggregator: restore the set_config operation
gpiolib: fix invalid pointer access in debugfs
gpio: swnode: don't use the swnode's name as the key for GPIO lookup
dt-bindings: gpio: ti,twl4030: Correct the schema $id path

+10 -22
+1 -1
Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml
··· 1 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 2 %YAML 1.2 3 3 --- 4 - $id: http://devicetree.org/schemas/ti,twl4030-gpio.yaml# 4 + $id: http://devicetree.org/schemas/gpio/ti,twl4030-gpio.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 7 title: TI TWL4030 GPIO controller
+1
drivers/gpio/gpio-aggregator.c
··· 723 723 chip->get_multiple = gpio_fwd_get_multiple_locked; 724 724 chip->set = gpio_fwd_set; 725 725 chip->set_multiple = gpio_fwd_set_multiple_locked; 726 + chip->set_config = gpio_fwd_set_config; 726 727 chip->to_irq = gpio_fwd_to_irq; 727 728 chip->base = -1; 728 729 chip->ngpio = ngpios;
-19
drivers/gpio/gpio-tb10x.c
··· 50 50 return ioread32(gpio->base + offs); 51 51 } 52 52 53 - static inline void tb10x_reg_write(struct tb10x_gpio *gpio, unsigned int offs, 54 - u32 val) 55 - { 56 - iowrite32(val, gpio->base + offs); 57 - } 58 - 59 - static inline void tb10x_set_bits(struct tb10x_gpio *gpio, unsigned int offs, 60 - u32 mask, u32 val) 61 - { 62 - u32 r; 63 - 64 - guard(gpio_generic_lock_irqsave)(&gpio->chip); 65 - 66 - r = tb10x_reg_read(gpio, offs); 67 - r = (r & ~mask) | (val & mask); 68 - 69 - tb10x_reg_write(gpio, offs, r); 70 - } 71 - 72 53 static int tb10x_gpio_to_irq(struct gpio_chip *chip, unsigned offset) 73 54 { 74 55 struct tb10x_gpio *tb10x_gpio = gpiochip_get_data(chip);
+1 -1
drivers/gpio/gpiolib-swnode.c
··· 41 41 !strcmp(gdev_node->name, GPIOLIB_SWNODE_UNDEFINED_NAME)) 42 42 return ERR_PTR(-ENOENT); 43 43 44 - gdev = gpio_device_find_by_label(gdev_node->name); 44 + gdev = gpio_device_find_by_fwnode(fwnode); 45 45 return gdev ?: ERR_PTR(-EPROBE_DEFER); 46 46 } 47 47
+7 -1
drivers/gpio/gpiolib.c
··· 5296 5296 struct gpio_device *gdev; 5297 5297 loff_t index = *pos; 5298 5298 5299 + s->private = NULL; 5300 + 5299 5301 priv = kzalloc(sizeof(*priv), GFP_KERNEL); 5300 5302 if (!priv) 5301 5303 return NULL; ··· 5331 5329 5332 5330 static void gpiolib_seq_stop(struct seq_file *s, void *v) 5333 5331 { 5334 - struct gpiolib_seq_priv *priv = s->private; 5332 + struct gpiolib_seq_priv *priv; 5333 + 5334 + priv = s->private; 5335 + if (!priv) 5336 + return; 5335 5337 5336 5338 srcu_read_unlock(&gpio_devices_srcu, priv->idx); 5337 5339 kfree(priv);