hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/sound/soc/soc-ac97.c
....@@ -82,13 +82,12 @@
8282 struct snd_soc_component *component = gpio_to_component(chip);
8383 int ret;
8484
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);
8786
8887 dev_dbg(component->dev, "get gpio %d : %d\n", offset,
89
- ret < 0 ? ret : ret & (1 << offset));
88
+ ret & (1 << offset));
9089
91
- return ret < 0 ? ret : !!(ret & (1 << offset));
90
+ return !!(ret & (1 << offset));
9291 }
9392
9493 static void snd_soc_ac97_gpio_set(struct gpio_chip *chip, unsigned offset,
....@@ -394,6 +393,8 @@
394393
395394 /**
396395 * snd_soc_set_ac97_ops_of_reset - Set ac97 ops with generic ac97 reset functions
396
+ * @ops: bus ops
397
+ * @pdev: platform device
397398 *
398399 * This function sets the reset and warm_reset properties of ops and parses
399400 * the device node of pdev to get pinctrl states and gpio numbers to use.