@@ -1857,10 +1857,11 @@ static int ftdi_gpio_get(struct gpio_chip *gc, unsigned int gpio)
1857
1857
return !!(result & BIT (gpio ));
1858
1858
}
1859
1859
1860
- static void ftdi_gpio_set (struct gpio_chip * gc , unsigned int gpio , int value )
1860
+ static int ftdi_gpio_set (struct gpio_chip * gc , unsigned int gpio , int value )
1861
1861
{
1862
1862
struct usb_serial_port * port = gpiochip_get_data (gc );
1863
1863
struct ftdi_private * priv = usb_get_serial_port_data (port );
1864
+ int result ;
1864
1865
1865
1866
mutex_lock (& priv -> gpio_lock );
1866
1867
@@ -1869,9 +1870,11 @@ static void ftdi_gpio_set(struct gpio_chip *gc, unsigned int gpio, int value)
1869
1870
else
1870
1871
priv -> gpio_value &= ~BIT (gpio );
1871
1872
1872
- ftdi_set_cbus_pins (port );
1873
+ result = ftdi_set_cbus_pins (port );
1873
1874
1874
1875
mutex_unlock (& priv -> gpio_lock );
1876
+
1877
+ return result ;
1875
1878
}
1876
1879
1877
1880
static int ftdi_gpio_get_multiple (struct gpio_chip * gc , unsigned long * mask ,
@@ -1889,19 +1892,22 @@ static int ftdi_gpio_get_multiple(struct gpio_chip *gc, unsigned long *mask,
1889
1892
return 0 ;
1890
1893
}
1891
1894
1892
- static void ftdi_gpio_set_multiple (struct gpio_chip * gc , unsigned long * mask ,
1895
+ static int ftdi_gpio_set_multiple (struct gpio_chip * gc , unsigned long * mask ,
1893
1896
unsigned long * bits )
1894
1897
{
1895
1898
struct usb_serial_port * port = gpiochip_get_data (gc );
1896
1899
struct ftdi_private * priv = usb_get_serial_port_data (port );
1900
+ int result ;
1897
1901
1898
1902
mutex_lock (& priv -> gpio_lock );
1899
1903
1900
1904
priv -> gpio_value &= ~(* mask );
1901
1905
priv -> gpio_value |= * bits & * mask ;
1902
- ftdi_set_cbus_pins (port );
1906
+ result = ftdi_set_cbus_pins (port );
1903
1907
1904
1908
mutex_unlock (& priv -> gpio_lock );
1909
+
1910
+ return result ;
1905
1911
}
1906
1912
1907
1913
static int ftdi_gpio_direction_get (struct gpio_chip * gc , unsigned int gpio )
@@ -2142,9 +2148,9 @@ static int ftdi_gpio_init(struct usb_serial_port *port)
2142
2148
priv -> gc .direction_output = ftdi_gpio_direction_output ;
2143
2149
priv -> gc .init_valid_mask = ftdi_gpio_init_valid_mask ;
2144
2150
priv -> gc .get = ftdi_gpio_get ;
2145
- priv -> gc .set = ftdi_gpio_set ;
2151
+ priv -> gc .set_rv = ftdi_gpio_set ;
2146
2152
priv -> gc .get_multiple = ftdi_gpio_get_multiple ;
2147
- priv -> gc .set_multiple = ftdi_gpio_set_multiple ;
2153
+ priv -> gc .set_multiple_rv = ftdi_gpio_set_multiple ;
2148
2154
priv -> gc .owner = THIS_MODULE ;
2149
2155
priv -> gc .parent = & serial -> interface -> dev ;
2150
2156
priv -> gc .base = -1 ;
0 commit comments