summaryrefslogtreecommitdiff
path: root/devices
diff options
context:
space:
mode:
authorjy910.yun <jy910.yun@samsung.com>2013-03-20 17:47:31 +0900
committerjy910.yun <jy910.yun@samsung.com>2013-03-20 17:49:19 +0900
commit616124ee1140bdf425955a4bd664d00b5fc28d59 (patch)
treeaa2c08c11d0afaf4efd00bb5b6ad940ee002a73f /devices
parenta9b868536aae1b3fd60a8c7399589f9eed7c363b (diff)
downloadlibdevice-node-616124ee1140bdf425955a4bd664d00b5fc28d59.tar.gz
libdevice-node-616124ee1140bdf425955a4bd664d00b5fc28d59.tar.bz2
libdevice-node-616124ee1140bdf425955a4bd664d00b5fc28d59.zip
add default smack label using udev rule and revise brightness_by_lux's param.submit/trunk/20130320.090347
add 51-devices-priv.rules for controling default device node change the position to add smack label to udev rules file Change-Id: I4285b5897cb80d1bd5ca4d3bf7edf75f9cdda2fb
Diffstat (limited to 'devices')
-rw-r--r--devices/display.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/devices/display.c b/devices/display.c
index f4355ff..57bb713 100644
--- a/devices/display.c
+++ b/devices/display.c
@@ -28,6 +28,7 @@ static int display_get_prop(int __prop, int *val)
{
int prop = PROPERTY_PROP(__prop);
int index = PROPERTY_INDEX(__prop);
+ int lux = index;
int ps_stat;
int ps_disp_stat;
int disp_cnt;
@@ -39,9 +40,11 @@ static int display_get_prop(int __prop, int *val)
return -1;
}
- if (index >= disp_cnt) {
- DEVERR("Invalid Argument: index(%d) > max(%d)", index, disp_cnt);
- return -1;
+ if (prop != PROP_DISPLAY_BRIGHTNESS_BY_LUX) {
+ if (index >= disp_cnt) {
+ DEVERR("Invalid Argument: index(%d) > max(%d)", index, disp_cnt);
+ return -1;
+ }
}
switch (prop) {
@@ -61,7 +64,7 @@ static int display_get_prop(int __prop, int *val)
case PROP_DISPLAY_ONOFF:
return PLUGIN_GET(lcd_power)(index, val);
case PROP_DISPLAY_BRIGHTNESS_BY_LUX:
- return PLUGIN_GET(backlight_brightness_by_lux)(val);
+ return PLUGIN_GET(backlight_brightness_by_lux)(lux, val);
case PROP_DISPLAY_IMAGE_ENHANCE_MODE:
return PLUGIN_GET(image_enhance_mode)(val);
case PROP_DISPLAY_IMAGE_ENHANCE_SCENARIO: