.. | .. |
---|
82 | 82 | struct snd_soc_component *component = gpio_to_component(chip); |
---|
83 | 83 | int ret; |
---|
84 | 84 | |
---|
85 | | - if (snd_soc_component_read(component, AC97_GPIO_STATUS, &ret) < 0) |
---|
86 | | - ret = -1; |
---|
| 85 | + ret = snd_soc_component_read(component, AC97_GPIO_STATUS); |
---|
87 | 86 | |
---|
88 | 87 | dev_dbg(component->dev, "get gpio %d : %d\n", offset, |
---|
89 | | - ret < 0 ? ret : ret & (1 << offset)); |
---|
| 88 | + ret & (1 << offset)); |
---|
90 | 89 | |
---|
91 | | - return ret < 0 ? ret : !!(ret & (1 << offset)); |
---|
| 90 | + return !!(ret & (1 << offset)); |
---|
92 | 91 | } |
---|
93 | 92 | |
---|
94 | 93 | static void snd_soc_ac97_gpio_set(struct gpio_chip *chip, unsigned offset, |
---|
.. | .. |
---|
394 | 393 | |
---|
395 | 394 | /** |
---|
396 | 395 | * snd_soc_set_ac97_ops_of_reset - Set ac97 ops with generic ac97 reset functions |
---|
| 396 | + * @ops: bus ops |
---|
| 397 | + * @pdev: platform device |
---|
397 | 398 | * |
---|
398 | 399 | * This function sets the reset and warm_reset properties of ops and parses |
---|
399 | 400 | * the device node of pdev to get pinctrl states and gpio numbers to use. |
---|