Skip to content

Commit

Permalink
[i2c] Make bus and speed attributes read-only
Browse files Browse the repository at this point in the history
Fixes issue intel#477.

Signed-off-by: Geoff Gustafson <[email protected]>
  • Loading branch information
grgustaf committed Dec 23, 2016
1 parent faeec02 commit 4d4364f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/zjs_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ static jerry_value_t zjs_i2c_open(const jerry_value_t function_obj,
jerry_value_t i2c_obj = jerry_create_object();
jerry_set_prototype(i2c_obj, zjs_i2c_prototype);

zjs_obj_add_number(i2c_obj, bus, "bus");
zjs_obj_add_number(i2c_obj, speed, "speed");
zjs_obj_add_readonly_number(i2c_obj, bus, "bus");
zjs_obj_add_readonly_number(i2c_obj, speed, "speed");

return i2c_obj;
}
Expand Down
4 changes: 2 additions & 2 deletions src/zjs_i2c_ipm.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ static jerry_value_t zjs_i2c_open(const jerry_value_t function_obj,
zjs_obj_add_function(i2c_obj, zjs_i2c_write, "write");
zjs_obj_add_function(i2c_obj, zjs_i2c_abort, "abort");
zjs_obj_add_function(i2c_obj, zjs_i2c_close, "close");
zjs_obj_add_number(i2c_obj, bus, "bus");
zjs_obj_add_number(i2c_obj, speed, "speed");
zjs_obj_add_readonly_number(i2c_obj, bus, "bus");
zjs_obj_add_readonly_number(i2c_obj, speed, "speed");

return i2c_obj;
}
Expand Down

0 comments on commit 4d4364f

Please sign in to comment.