提交 e65f9ef9 编写于 作者: S Simon Glass 提交者: Bin Meng

sound: Mark sound_setup() as optional

This method in the sound API is optional since some drivers can do this
when probing or as part of SoC init. Mark it as such.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
上级 67b0cda7
......@@ -16,7 +16,7 @@ int sound_setup(struct udevice *dev)
struct sound_ops *ops = sound_get_ops(dev);
if (!ops->setup)
return -ENOSYS;
return 0;
return ops->setup(dev);
}
......
......@@ -54,7 +54,7 @@ void sound_create_square_wave(uint sample_rate, unsigned short *data, int size,
/* Operations for sound */
struct sound_ops {
/**
* setup() - Set up to play a sound
* setup() - Set up to play a sound (optional)
*/
int (*setup)(struct udevice *dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册