summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 19:43:33 +0100
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 20:48:33 +0100
commit2eaf9403d205c71ba2008875ef42d9ae37bc3d46 (patch)
treea88005b874b4a948650fbb475fc58bc08993c994
parent8b14625cc3700c8efa2ae5381e4d566ed23e2fab (diff)
downloadalsa-lib-2eaf9403d205c71ba2008875ef42d9ae37bc3d46.tar.gz
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>
-rw-r--r--src/control/control_ext.c2
-rw-r--r--src/hwdep/hwdep_hw.c2
-rw-r--r--src/hwdep/hwdep_local.h2
-rw-r--r--src/input.c6
-rw-r--r--src/output.c6
-rw-r--r--src/timer/timer_hw.c2
-rw-r--r--src/timer/timer_local.h2
-rw-r--r--src/timer/timer_query_hw.c2
8 files changed, 12 insertions, 12 deletions
diff --git a/src/control/control_ext.c b/src/control/control_ext.c
index 28bd49d3..a8675c13 100644
--- a/src/control/control_ext.c
+++ b/src/control/control_ext.c
@@ -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,
diff --git a/src/hwdep/hwdep_hw.c b/src/hwdep/hwdep_hw.c
index 75dc7266..238a507a 100644
--- a/src/hwdep/hwdep_hw.c
+++ b/src/hwdep/hwdep_hw.c
@@ -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,
diff --git a/src/hwdep/hwdep_local.h b/src/hwdep/hwdep_local.h
index d911f7a0..47467f95 100644
--- a/src/hwdep/hwdep_local.h
+++ b/src/hwdep/hwdep_local.h
@@ -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;
};
diff --git a/src/input.c b/src/input.c
index 392eed23..7cfbe56a 100644
--- a/src/input.c
+++ b/src/input.c
@@ -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,
diff --git a/src/output.c b/src/output.c
index 15872979..8a723f8b 100644
--- a/src/output.c
+++ b/src/output.c
@@ -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,
diff --git a/src/timer/timer_hw.c b/src/timer/timer_hw.c
index 5355705d..34538584 100644
--- a/src/timer/timer_hw.c
+++ b/src/timer/timer_hw.c
@@ -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,
diff --git a/src/timer/timer_local.h b/src/timer/timer_local.h
index 8f543fed..19cadfe6 100644
--- a/src/timer/timer_local.h
+++ b/src/timer/timer_local.h
@@ -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;
};
diff --git a/src/timer/timer_query_hw.c b/src/timer/timer_query_hw.c
index 743ee1fb..9f62b78a 100644
--- a/src/timer/timer_query_hw.c
+++ b/src/timer/timer_query_hw.c
@@ -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,