* This is called when a user reads the characters or chartab sys file.
*/
static ssize_t chars_chartab_show(struct kobject *kobj,
- struct kobj_attribute *attr, char *buf)
+ struct kobj_attribute *attr, char *buf)
{
int i;
int len = 0;
* character descriptions or chartab entries.
*/
static void report_char_chartab_status(int reset, int received, int used,
- int rejected, int do_characters)
+ int rejected, int do_characters)
{
static char const *object_type[] = {
"character class entries",
pr_info("%s reset to defaults\n", object_type[do_characters]);
} else if (received) {
len = snprintf(buf, sizeof(buf),
- " updated %d of %d %s\n",
+ " updated %d of %d %s\n",
used, received, object_type[do_characters]);
if (rejected)
snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
* This is called when a user changes the characters or chartab parameters.
*/
static ssize_t chars_chartab_store(struct kobject *kobj,
- struct kobj_attribute *attr, const char *buf, size_t count)
+ struct kobj_attribute *attr, const char *buf, size_t count)
{
char *cp = (char *)buf;
char *end = cp + count; /* the null at the end of the buffer */
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
report_char_chartab_status(reset, received, used, rejected,
- do_characters);
+ do_characters);
return retval;
}
* This is called when a user reads the keymap parameter.
*/
static ssize_t keymap_show(struct kobject *kobj, struct kobj_attribute *attr,
- char *buf)
+ char *buf)
{
char *cp = buf;
int i;
* This is called when a user changes the keymap parameter.
*/
static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr,
- const char *buf, size_t count)
+ const char *buf, size_t count)
{
int i;
ssize_t ret = count;
i *= (int)cp1[-1] + 1;
i += 2; /* 0 and last map ver */
if (cp1[-3] != KEY_MAP_VER || cp1[-1] > 10 ||
- i + SHIFT_TBL_SIZE + 4 >= sizeof(spk_key_buf)) {
+ i + SHIFT_TBL_SIZE + 4 >= sizeof(spk_key_buf)) {
pr_warn("i %d %d %d %d\n", i,
- (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]);
+ (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]);
kfree(in_buff);
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
return -EINVAL;
if (i != 0 || cp1[-1] != KEY_MAP_VER || cp1[-2] != 0) {
ret = -EINVAL;
pr_warn("end %d %d %d %d\n", i,
- (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]);
+ (int)cp1[-3], (int)cp1[-2], (int)cp1[-1]);
} else {
if (spk_set_key_info(in_buff, spk_key_buf)) {
spk_set_key_info(spk_key_defaults, spk_key_buf);
* This is called when a user changes the value of the silent parameter.
*/
static ssize_t silent_store(struct kobject *kobj, struct kobj_attribute *attr,
- const char *buf, size_t count)
+ const char *buf, size_t count)
{
int len;
struct vc_data *vc = vc_cons[fg_console].d;
* This is called when a user reads the synth setting.
*/
static ssize_t synth_show(struct kobject *kobj, struct kobj_attribute *attr,
- char *buf)
+ char *buf)
{
int rv;
* This is called when a user requests to change synthesizers.
*/
static ssize_t synth_store(struct kobject *kobj, struct kobj_attribute *attr,
- const char *buf, size_t count)
+ const char *buf, size_t count)
{
int len;
char new_synth_name[10];
* This is called when text is sent to the synth via the synth_direct file.
*/
static ssize_t synth_direct_store(struct kobject *kobj,
- struct kobj_attribute *attr, const char *buf, size_t count)
+ struct kobj_attribute *attr, const char *buf, size_t count)
{
u_char tmp[256];
int len;
* This function is called when a user reads the version.
*/
static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr,
- char *buf)
+ char *buf)
{
char *cp;
* This is called when a user reads the punctuation settings.
*/
static ssize_t punc_show(struct kobject *kobj, struct kobj_attribute *attr,
- char *buf)
+ char *buf)
{
int i;
char *cp = buf;
var = spk_get_punc_var(p_header->var_id);
if (!var) {
pr_warn("var is null, p_header->var_id is %i\n",
- p_header->var_id);
+ p_header->var_id);
return -EINVAL;
}
* This is called when a user changes the punctuation settings.
*/
static ssize_t punc_store(struct kobject *kobj, struct kobj_attribute *attr,
- const char *buf, size_t count)
+ const char *buf, size_t count)
{
int x;
struct st_var_header *p_header;
var = spk_get_punc_var(p_header->var_id);
if (!var) {
pr_warn("var is null, p_header->var_id is %i\n",
- p_header->var_id);
+ p_header->var_id);
return -EINVAL;
}
* This function is called when a user reads one of the variable parameters.
*/
ssize_t spk_var_show(struct kobject *kobj, struct kobj_attribute *attr,
- char *buf)
+ char *buf)
{
int rv = 0;
struct st_var_header *param;
break;
default:
rv = sprintf(buf, "Bad parameter %s, type %i\n",
- param->name, param->var_type);
+ param->name, param->var_type);
break;
}
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
* Used to reset either default_pitch or default_vol.
*/
static inline void spk_reset_default_value(char *header_name,
- int *synth_default_value, int idx)
+ int *synth_default_value, int idx)
{
struct st_var_header *param;
* variable parameters.
*/
ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
- const char *buf, size_t count)
+ const char *buf, size_t count)
{
struct st_var_header *param;
int ret;
var_data = param->data;
value = var_data->u.n.value;
spk_reset_default_value("pitch", synth->default_pitch,
- value);
+ value);
spk_reset_default_value("vol", synth->default_vol,
- value);
+ value);
}
break;
case VAR_STRING:
ret = spk_set_string_var(cp, param, len);
if (ret == -E2BIG)
pr_warn("value too long for %s\n",
- param->name);
+ param->name);
break;
default:
pr_warn("%s unknown type %d\n",
*/
static ssize_t message_show_helper(char *buf, enum msg_index_t first,
- enum msg_index_t last)
+ enum msg_index_t last)
{
size_t bufsize = PAGE_SIZE;
char *buf_pointer = buf;
if (bufsize <= 1)
break;
printed = scnprintf(buf_pointer, bufsize, "%d\t%s\n",
- index, spk_msg_get(cursor));
+ index, spk_msg_get(cursor));
buf_pointer += printed;
bufsize -= printed;
}
}
static void report_msg_status(int reset, int received, int used,
- int rejected, char *groupname)
+ int rejected, char *groupname)
{
int len;
char buf[160];
}
static ssize_t message_store_helper(const char *buf, size_t count,
- struct msg_group_t *group)
+ struct msg_group_t *group)
{
char *cp = (char *)buf;
char *end = cp + count;
}
static ssize_t message_show(struct kobject *kobj,
- struct kobj_attribute *attr, char *buf)
+ struct kobj_attribute *attr, char *buf)
{
ssize_t retval = 0;
struct msg_group_t *group = spk_find_msg_group(attr->attr.name);
}
static ssize_t message_store(struct kobject *kobj, struct kobj_attribute *attr,
- const char *buf, size_t count)
+ const char *buf, size_t count)
{
struct msg_group_t *group = spk_find_msg_group(attr->attr.name);