mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
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: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
67b0cda76a
commit
e65f9ef9f2
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ int sound_setup(struct udevice *dev)
|
||||||
struct sound_ops *ops = sound_get_ops(dev);
|
struct sound_ops *ops = sound_get_ops(dev);
|
||||||
|
|
||||||
if (!ops->setup)
|
if (!ops->setup)
|
||||||
return -ENOSYS;
|
return 0;
|
||||||
|
|
||||||
return ops->setup(dev);
|
return ops->setup(dev);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ void sound_create_square_wave(uint sample_rate, unsigned short *data, int size,
|
||||||
/* Operations for sound */
|
/* Operations for sound */
|
||||||
struct sound_ops {
|
struct sound_ops {
|
||||||
/**
|
/**
|
||||||
* setup() - Set up to play a sound
|
* setup() - Set up to play a sound (optional)
|
||||||
*/
|
*/
|
||||||
int (*setup)(struct udevice *dev);
|
int (*setup)(struct udevice *dev);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue