From: Jinhyung Choi Date: Tue, 21 Jul 2015 05:42:23 +0000 (+0900) Subject: sensor: bug fix - function call w/o initializaion X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~286^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1932905e088c54e9f239920eb78c54add29bdca;p=sdk%2Femulator%2Fqemu.git sensor: bug fix - function call w/o initializaion mutex is used at set_sensor_data() and it is initialized when device is realized. Sensor may be used in some profile, such as tv. However, skin will set rotation without considering profile. Therefore, sensor will set value after checking validity. Change-Id: If7482bdea338883ae82fbffa82ce86b06a029b3f Signed-off-by: Jinhyung Choi --- diff --git a/tizen/src/hw/virtio/maru_virtio_sensor.c b/tizen/src/hw/virtio/maru_virtio_sensor.c index d0b6ce700a..b362128210 100644 --- a/tizen/src/hw/virtio/maru_virtio_sensor.c +++ b/tizen/src/hw/virtio/maru_virtio_sensor.c @@ -544,7 +544,9 @@ void req_sensor_data (enum sensor_types type, enum request_cmd req, char* data, char msg_info [__MAX_BUF_SENSOR]; memset(msg_info, 0, sizeof(msg_info)); - if (type >= sensor_type_max || (req != request_get && req != request_set)) { + if (type >= sensor_type_max + || (req != request_get && req != request_set) + || sensor_capability == 0) { LOG_SEVERE("unavailable sensor type request.\n"); return; }