/* Per IrLMP 1.1, 4.3.3.2, strings are up to 256 chars - Jean II  */
struct ias_value* irias_new_string_value(char *string)
/* Per IrLMP 1.1, 4.3.3.2, strings are up to 256 chars - Jean II  */
struct ias_value* irias_new_string_value(char *string)
{
	struct ias_value *value;
	value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
	if (value == NULL) {
		IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
		return NULL;
	}
	value->type = IAS_STRING;
	value->charset = CS_ASCII;
	value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC);
	if (!value->t.string) {
		IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
		kfree(value);
		return NULL;
	}
	value->len = strlen(value->t.string);
	return value;
}