File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1701,6 +1701,11 @@ static inline void gpiochip_irqchip_free_valid_mask(struct gpio_chip *gc)
1701
1701
*/
1702
1702
int gpiochip_generic_request (struct gpio_chip * gc , unsigned int offset )
1703
1703
{
1704
+ #ifdef CONFIG_PINCTRL
1705
+ if (list_empty (& gc -> gpiodev -> pin_ranges ))
1706
+ return 0 ;
1707
+ #endif
1708
+
1704
1709
return pinctrl_gpio_request (gc -> gpiodev -> base + offset );
1705
1710
}
1706
1711
EXPORT_SYMBOL_GPL (gpiochip_generic_request );
@@ -1712,6 +1717,11 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_request);
1712
1717
*/
1713
1718
void gpiochip_generic_free (struct gpio_chip * gc , unsigned int offset )
1714
1719
{
1720
+ #ifdef CONFIG_PINCTRL
1721
+ if (list_empty (& gc -> gpiodev -> pin_ranges ))
1722
+ return ;
1723
+ #endif
1724
+
1715
1725
pinctrl_gpio_free (gc -> gpiodev -> base + offset );
1716
1726
}
1717
1727
EXPORT_SYMBOL_GPL (gpiochip_generic_free );
You can’t perform that action at this time.
0 commit comments