mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
Make all the remaining ops structure constants.
This excludes the mixer for now since it requires a change to the public headers. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
This commit is contained in:
parent
8b14625cc3
commit
2eaf9403d2
8 changed files with 12 additions and 12 deletions
|
|
@ -402,7 +402,7 @@ static int snd_ctl_ext_poll_revents(snd_ctl_t *handle, struct pollfd *pfds, unsi
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static snd_ctl_ops_t snd_ctl_ext_ops = {
|
||||
static const snd_ctl_ops_t snd_ctl_ext_ops = {
|
||||
.close = snd_ctl_ext_close,
|
||||
.nonblock = snd_ctl_ext_nonblock,
|
||||
.async = snd_ctl_ext_async,
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static ssize_t snd_hwdep_hw_read(snd_hwdep_t *hwdep, void *buffer, size_t size)
|
|||
return result;
|
||||
}
|
||||
|
||||
static snd_hwdep_ops_t snd_hwdep_hw_ops = {
|
||||
static const snd_hwdep_ops_t snd_hwdep_hw_ops = {
|
||||
.close = snd_hwdep_hw_close,
|
||||
.nonblock = snd_hwdep_hw_nonblock,
|
||||
.info = snd_hwdep_hw_info,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct _snd_hwdep {
|
|||
snd_hwdep_type_t type;
|
||||
int mode;
|
||||
int poll_fd;
|
||||
snd_hwdep_ops_t *ops;
|
||||
const snd_hwdep_ops_t *ops;
|
||||
void *private_data;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ typedef struct _snd_input_ops {
|
|||
|
||||
struct _snd_input {
|
||||
snd_input_type_t type;
|
||||
snd_input_ops_t *ops;
|
||||
const snd_input_ops_t *ops;
|
||||
void *private_data;
|
||||
};
|
||||
#endif
|
||||
|
|
@ -157,7 +157,7 @@ static int snd_input_stdio_ungetc(snd_input_t *input, int c)
|
|||
return ungetc(c, stdio->fp);
|
||||
}
|
||||
|
||||
static snd_input_ops_t snd_input_stdio_ops = {
|
||||
static const snd_input_ops_t snd_input_stdio_ops = {
|
||||
.close = snd_input_stdio_close,
|
||||
.scan = snd_input_stdio_scan,
|
||||
.gets = snd_input_stdio_gets,
|
||||
|
|
@ -283,7 +283,7 @@ static int snd_input_buffer_ungetc(snd_input_t *input, int c)
|
|||
return c;
|
||||
}
|
||||
|
||||
static snd_input_ops_t snd_input_buffer_ops = {
|
||||
static const snd_input_ops_t snd_input_buffer_ops = {
|
||||
.close = snd_input_buffer_close,
|
||||
.scan = snd_input_buffer_scan,
|
||||
.gets = snd_input_buffer_gets,
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ typedef struct _snd_output_ops {
|
|||
|
||||
struct _snd_output {
|
||||
snd_output_type_t type;
|
||||
snd_output_ops_t *ops;
|
||||
const snd_output_ops_t *ops;
|
||||
void *private_data;
|
||||
};
|
||||
#endif
|
||||
|
|
@ -165,7 +165,7 @@ static int snd_output_stdio_flush(snd_output_t *output)
|
|||
return fflush(stdio->fp);
|
||||
}
|
||||
|
||||
static snd_output_ops_t snd_output_stdio_ops = {
|
||||
static const snd_output_ops_t snd_output_stdio_ops = {
|
||||
.close = snd_output_stdio_close,
|
||||
.print = snd_output_stdio_print,
|
||||
.puts = snd_output_stdio_puts,
|
||||
|
|
@ -323,7 +323,7 @@ static int snd_output_buffer_flush(snd_output_t *output ATTRIBUTE_UNUSED)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static snd_output_ops_t snd_output_buffer_ops = {
|
||||
static const snd_output_ops_t snd_output_buffer_ops = {
|
||||
.close = snd_output_buffer_close,
|
||||
.print = snd_output_buffer_print,
|
||||
.puts = snd_output_buffer_puts,
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ static ssize_t snd_timer_hw_read(snd_timer_t *handle, void *buffer, size_t size)
|
|||
return result;
|
||||
}
|
||||
|
||||
static snd_timer_ops_t snd_timer_hw_ops = {
|
||||
static const snd_timer_ops_t snd_timer_hw_ops = {
|
||||
.close = snd_timer_hw_close,
|
||||
.nonblock = snd_timer_hw_nonblock,
|
||||
.async = snd_timer_hw_async,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ struct _snd_timer {
|
|||
snd_timer_type_t type;
|
||||
int mode;
|
||||
int poll_fd;
|
||||
snd_timer_ops_t *ops;
|
||||
const snd_timer_ops_t *ops;
|
||||
void *private_data;
|
||||
struct list_head async_handlers;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ static int snd_timer_query_hw_status(snd_timer_query_t *handle, snd_timer_gstatu
|
|||
return 0;
|
||||
}
|
||||
|
||||
static snd_timer_query_ops_t snd_timer_query_hw_ops = {
|
||||
static const snd_timer_query_ops_t snd_timer_query_hw_ops = {
|
||||
.close = snd_timer_query_hw_close,
|
||||
.next_device = snd_timer_query_hw_next_device,
|
||||
.info = snd_timer_query_hw_info,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue