diff options
| -rw-r--r-- | drivers/hid/hid-cp2112.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c index 56be85a9a77c..3952d90723b9 100644 --- a/drivers/hid/hid-cp2112.c +++ b/drivers/hid/hid-cp2112.c | |||
| @@ -240,8 +240,6 @@ static int cp2112_gpio_direction_output(struct gpio_chip *chip, | |||
| 240 | u8 buf[5]; | 240 | u8 buf[5]; |
| 241 | int ret; | 241 | int ret; |
| 242 | 242 | ||
| 243 | cp2112_gpio_set(chip, offset, value); | ||
| 244 | |||
| 245 | ret = hid_hw_raw_request(hdev, CP2112_GPIO_CONFIG, buf, | 243 | ret = hid_hw_raw_request(hdev, CP2112_GPIO_CONFIG, buf, |
| 246 | sizeof(buf), HID_FEATURE_REPORT, | 244 | sizeof(buf), HID_FEATURE_REPORT, |
| 247 | HID_REQ_GET_REPORT); | 245 | HID_REQ_GET_REPORT); |
| @@ -260,6 +258,12 @@ static int cp2112_gpio_direction_output(struct gpio_chip *chip, | |||
| 260 | return ret; | 258 | return ret; |
| 261 | } | 259 | } |
| 262 | 260 | ||
| 261 | /* | ||
| 262 | * Set gpio value when output direction is already set, | ||
| 263 | * as specified in AN495, Rev. 0.2, cpt. 4.4 | ||
| 264 | */ | ||
| 265 | cp2112_gpio_set(chip, offset, value); | ||
| 266 | |||
| 263 | return 0; | 267 | return 0; |
| 264 | } | 268 | } |
| 265 | 269 | ||
