Coding rule: fix coding rule violation 40/149340/2 accepted/tizen_4.0_unified tizen_4.0 tizen_4.0_tv accepted/tizen/4.0/unified/20170912.184512 submit/tizen_4.0/20170912.062317 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release
authorlokilee73 <changjoo.lee@samsung.com>
Tue, 12 Sep 2017 06:13:39 +0000 (15:13 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Tue, 12 Sep 2017 06:17:45 +0000 (15:17 +0900)
Change-Id: Id1eaefb397d7e00e2c371664779eb5230b028903
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
16 files changed:
hw/battery.h [changed mode: 0644->0755]
hw/common.h [changed mode: 0644->0755]
hw/cpu.h [changed mode: 0644->0755]
hw/display.h [changed mode: 0644->0755]
hw/display_internal.h [changed mode: 0644->0755]
hw/external_connection.h [changed mode: 0644->0755]
hw/ir.h [changed mode: 0644->0755]
hw/led.h [changed mode: 0644->0755]
hw/sensors.h [changed mode: 0644->0755]
hw/thermal.h [changed mode: 0644->0755]
hw/touchscreen.h [changed mode: 0644->0755]
hw/usb_client.h [changed mode: 0644->0755]
hw/usb_gadget.h [changed mode: 0644->0755]
include/device-node.h [changed mode: 0644->0755]
src/device-node.c [changed mode: 0644->0755]
src/device-plugin.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 3302a27..55f1725
@@ -35,7 +35,7 @@
 /**
  * The version of this device
  */
-#define BATTERY_HARDWARE_DEVICE_VERSION        MAKE_VERSION(0,1)
+#define BATTERY_HARDWARE_DEVICE_VERSION        MAKE_VERSION(0, 1)
 
 struct battery_info {
        char *name;
old mode 100644 (file)
new mode 100755 (executable)
index b333532..90c561b
@@ -22,8 +22,8 @@
 
 #include <stdint.h>
 
-#define MAKE_TAG_CONSTANT(A,B,C,D)     (((A) << 24) | ((B) << 16) | ((C) << 8) | (D))
-#define HARDWARE_INFO_TAG      MAKE_TAG_CONSTANT('T','H','I','T')
+#define MAKE_TAG_CONSTANT(A, B, C, D)  (((A) << 24) | ((B) << 16) | ((C) << 8) | (D))
+#define HARDWARE_INFO_TAG      MAKE_TAG_CONSTANT('T', 'H', 'I', 'T')
 
 struct hw_common;
 struct hw_info {
@@ -55,13 +55,13 @@ struct hw_common {
        struct hw_info *info;
 };
 
-#define MAKE_VERSION(maj,min) \
+#define MAKE_VERSION(maj, min) \
        ((((maj) & 0xff) << 8) | ((min) & 0xff))
 
 /**
  * Version of the struct hw_info
  */
-#define HARDWARE_INFO_VERSION  MAKE_VERSION(1,0)
+#define HARDWARE_INFO_VERSION  MAKE_VERSION(1, 0)
 
 /**
  * Name of the hardware info symbolic (Tizen Hardware Info)
old mode 100644 (file)
new mode 100755 (executable)
index c35f0c8..bdcf451
--- a/hw/cpu.h
+++ b/hw/cpu.h
@@ -30,7 +30,7 @@
 /**
  * The version of this device
  */
-#define CPU_HARDWARE_DEVICE_VERSION    MAKE_VERSION(0,1)
+#define CPU_HARDWARE_DEVICE_VERSION    MAKE_VERSION(0, 1)
 
 struct cpu_device {
        struct hw_common common;
old mode 100644 (file)
new mode 100755 (executable)
index 34b3d74..5114ee2
@@ -30,7 +30,7 @@
 /**
  * The version of this device
  */
-#define DISPLAY_HARDWARE_DEVICE_VERSION        MAKE_VERSION(0,2)
+#define DISPLAY_HARDWARE_DEVICE_VERSION        MAKE_VERSION(0, 2)
 
 enum display_state {
        DISPLAY_ON,       /* In use */
old mode 100644 (file)
new mode 100755 (executable)
index 125f0d9..4ebdefb
@@ -34,7 +34,7 @@
 /**
  * The version of this device
  */
-#define DISPLAY_INTERNAL_HARDWARE_DEVICE_VERSION       MAKE_VERSION(0,2)
+#define DISPLAY_INTERNAL_HARDWARE_DEVICE_VERSION       MAKE_VERSION(0, 2)
 
 typedef enum display_internal_enhance_mode {
        ENHANCE_MODE_NONE = 1001,
old mode 100644 (file)
new mode 100755 (executable)
index b860445..6175775
@@ -38,7 +38,7 @@
 /**
  * The version of this device
  */
-#define EXTERNAL_CONNECTION_HARDWARE_DEVICE_VERSION    MAKE_VERSION(0,1)
+#define EXTERNAL_CONNECTION_HARDWARE_DEVICE_VERSION    MAKE_VERSION(0, 1)
 
 struct connection_info {
        char *name;
diff --git a/hw/ir.h b/hw/ir.h
old mode 100644 (file)
new mode 100755 (executable)
index a7538d2..4f17fc5
--- a/hw/ir.h
+++ b/hw/ir.h
@@ -30,7 +30,7 @@
 /**
  * The version of this device
  */
-#define IR_HARDWARE_DEVICE_VERSION     MAKE_VERSION(0,1)
+#define IR_HARDWARE_DEVICE_VERSION     MAKE_VERSION(0, 1)
 
 struct ir_device {
        struct hw_common common;
old mode 100644 (file)
new mode 100755 (executable)
index 69c6c10..d01f5c8
--- a/hw/led.h
+++ b/hw/led.h
@@ -30,7 +30,7 @@
 /**
  * The version of this device
  */
-#define LED_HARDWARE_DEVICE_VERSION    MAKE_VERSION(1,0)
+#define LED_HARDWARE_DEVICE_VERSION    MAKE_VERSION(1, 0)
 
 /**
  * The id of led devices
old mode 100644 (file)
new mode 100755 (executable)
index 8fee6e3..abe77b7
@@ -24,7 +24,7 @@
 
 /* the id of this device */
 #define SENSOR_HARDWARE_DEVICE_ID "sensor"
-#define SENSOR_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+#define SENSOR_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 1)
 
 /**
  * Sensor types
old mode 100644 (file)
new mode 100755 (executable)
index 8262a38..0788a78
@@ -30,7 +30,7 @@
 /**
  * The version of this device
  */
-#define THERMAL_HARDWARE_DEVICE_VERSION        MAKE_VERSION(0,1)
+#define THERMAL_HARDWARE_DEVICE_VERSION        MAKE_VERSION(0, 1)
 
 typedef enum _thermal_state {
        THERMAL_STATE_LOW,
old mode 100644 (file)
new mode 100755 (executable)
index 9614164..c98a86a
@@ -30,7 +30,7 @@
 /**
  * The version of this device
  */
-#define TOUCHSCREEN_HARDWARE_DEVICE_VERSION    MAKE_VERSION(0,1)
+#define TOUCHSCREEN_HARDWARE_DEVICE_VERSION    MAKE_VERSION(0, 1)
 
 enum touchscreen_state {
        TOUCHSCREEN_OFF,     /* Disable touchscreen */
old mode 100644 (file)
new mode 100755 (executable)
index 4b4ffae..9c316bf
@@ -32,7 +32,7 @@
 /**
  * The version of this device
  */
-#define USB_CLIENT_HARDWARE_DEVICE_VERSION     MAKE_VERSION(0,1)
+#define USB_CLIENT_HARDWARE_DEVICE_VERSION     MAKE_VERSION(0, 1)
 
 struct usb_client {
        struct hw_common common;
old mode 100644 (file)
new mode 100755 (executable)
index 2db9566..e393e64
 /**
  * The version of this device
  */
-#define USB_GADGET_DEVICE_VERSION      MAKE_VERSION(0,1)
+#define USB_GADGET_DEVICE_VERSION      MAKE_VERSION(0, 1)
 
 #ifndef container_of
-#define container_of(ptr, type, member) ({                      \
-        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
-        (type *)( (char *)__mptr - offsetof(type,member) );})
+#define container_of(ptr, type, member) ({                             \
+               const typeof(((type *)0)->member) *__mptr = (ptr);      \
+               (type *)((char *)__mptr - offsetof(type, member)); })
 #endif
 
 #define _HELPER_Y(x) ((x) & -(x))
@@ -183,7 +183,7 @@ out:
 #define DEFINE_SIMPLE_USB_FUNCTION(_id, _name)                      \
        static struct usb_function _##_name##_function = {           \
                .function_group = USB_FUNCTION_GROUP_SIMPLE,         \
-               .id = _id,                                           \
+               .id = _id,                                           \
                .name = #_name,                                      \
                .instance = "default",                               \
                .free_func = free_simple_func,                       \
old mode 100644 (file)
new mode 100755 (executable)
index 56e4323..0df718c
@@ -45,10 +45,9 @@ extern "C" {
 
 /**
  * @par Description:
- *     device type enum
+ * device type enum
  */
-enum device_type
-{
+enum device_type {
        DEVICE_TYPE_DISPLAY,            /**< display */
        DEVICE_TYPE_VIBRATOR,           /**< vibrator */
        DEVICE_TYPE_EXTCON,             /**< extcon - Micro USB, 3.5 pi jack etc */
@@ -62,7 +61,7 @@ enum device_type
 
 /**
  * @par Description:
- *     DEVICE_TYPE_DISPLAY property for generic APIs
+ * DEVICE_TYPE_DISPLAY property for generic APIs
  */
 enum {
        PROP_DISPLAY_DISPLAY_COUNT,
@@ -93,7 +92,7 @@ enum {
 
 /**
  * @par Description:
- *     DEVICE_TYPE_JACK property for generic APIs
+ * DEVICE_TYPE_JACK property for generic APIs
  */
 enum {
        PROP_EXTCON_TA_ONLINE,        /**< Travel Adapter(Charger) */
@@ -111,7 +110,7 @@ enum {
 
 /**
  * @par Description:
- *  DEVICE_TYPE_LED property for generic APIs
+ * DEVICE_TYPE_LED property for generic APIs
  */
 enum {
        PROP_LED_BRIGHTNESS,
@@ -122,7 +121,7 @@ enum {
 
 /**
  * @par Description:
- *     DEVICE_TYPE_POWER property for generic APIs
+ * DEVICE_TYPE_POWER property for generic APIs
  */
 enum {
        PROP_POWER_CAPACITY,                    /**< Current remaining battery */
@@ -138,7 +137,7 @@ enum {
 
 /**
  * @par Description:
- *     DEVICE_TYPE_MEMORY property for generic APIs
+ * DEVICE_TYPE_MEMORY property for generic APIs
  */
 enum {
        PROP_MEMORY_NODE,
@@ -149,7 +148,7 @@ enum {
 
 /**
  * @par Description:
- *     DEVICE_TYPE_CPU property for generic APIs
+ * DEVICE_TYPE_CPU property for generic APIs
  */
 enum {
        PROP_CPU_CPUINFO_MAX_FREQ,
@@ -160,7 +159,7 @@ enum {
 
 /**
  * @par Description:
- *     DEVICE_TYPE_PROCESS property for generic APIs
+ * DEVICE_TYPE_PROCESS property for generic APIs
  */
 enum {
        PROP_PROCESS_NODE,
@@ -171,8 +170,8 @@ enum {
 /**
  * @fn int device_get_property(enum device_type devtype, int property, int *value)
  * @par Description:
- *     This generic API is used to get the property values of supported devices.\n
- *     If the caller process does not have permission, it returns failure.
+ * This generic API is used to get the property values of supported devices.\n
+ * If the caller process does not have permission, it returns failure.
  * @param[in] devtype device type that you want to get the value
  * @param[in] property value property that you want to get the value
  * @param[out] *value current value of device property
@@ -180,12 +179,12 @@ enum {
  * @see device_set_property()
  * @par Example:
  * @code
- *     ...
- *     if( device_get_property(DEVICE_TYPE_POWER, PROP_POWER_CAPACITY, &val) < 0 )
- *             printf("Fail to get property\n");
- *     else
- *             printf("Property is %d\n", val);
- *     ...
+ * ...
+ * if( device_get_property(DEVICE_TYPE_POWER, PROP_POWER_CAPACITY, &val) < 0 )
+ *     printf("Fail to get property\n");
+ * else
+ *     printf("Property is %d\n", val);
+ * ...
  * @endcode
  */
 int device_get_property(enum device_type devtype, int property, int *value);
@@ -193,8 +192,8 @@ int device_get_property(enum device_type devtype, int property, int *value);
 /**
  * @fn int device_set_property(enum device_type devtype, int property, int value)
  * @par Description:
- *     This generic API is used to set the property values of supported devices.\n
- *     If the caller process does not have permission, it returns failure.
+ * This generic API is used to set the property values of supported devices.\n
+ * If the caller process does not have permission, it returns failure.
  * @param[in] devtype device type that you want to set the value
  * @param[in] property value property that you want to set the value
  * @param[in] value value that you want to set
old mode 100644 (file)
new mode 100755 (executable)
index 3000a76..876310b
@@ -23,8 +23,8 @@
 #include "device-internal.h"
 
 #define container_of(ptr, type, member) ({            \
-                const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
-                (type *)( (char *)__mptr - offsetof(type,member) );})
+                const typeof(((type *)0)->member) *__mptr = (ptr);    \
+                (type *)((char *)__mptr - offsetof(type, member)); })
 
 static GList *dev_head;
 static void *dlopen_handle;
old mode 100644 (file)
new mode 100755 (executable)
index 4289903..f404220
@@ -378,11 +378,13 @@ static int OEM_sys_set_irled_control(char *value)
        return 0;
 }
 
-static int OEM_sys_get_hardkey_backlight(int *value){
+static int OEM_sys_get_hardkey_backlight(int *value)
+{
        return 0;
 }
 
-static int OEM_sys_set_hardkey_backlight(int value){
+static int OEM_sys_set_hardkey_backlight(int value)
+{
        return 0;
 }
 
@@ -440,7 +442,7 @@ const OEM_sys_devman_plugin_interface default_plugin = {
        .OEM_sys_get_battery_charge_now = &OEM_sys_get_battery_charge_now,
        .OEM_sys_get_battery_present = &OEM_sys_get_battery_present,
        .OEM_sys_get_battery_health = &OEM_sys_get_battery_health,
-       .OEM_sys_get_battery_polling_required= &OEM_sys_get_battery_polling_required,
+       .OEM_sys_get_battery_polling_required = &OEM_sys_get_battery_polling_required,
        .OEM_sys_get_battery_support_insuspend_charging = &OEM_sys_get_battery_support_insuspend_charging,
 
        /* Connection interfaces  */
@@ -494,5 +496,5 @@ const OEM_sys_devman_plugin_interface default_plugin = {
        .OEM_sys_set_irled_control = &OEM_sys_set_irled_control,
 
        .OEM_sys_get_hardkey_backlight = &OEM_sys_get_hardkey_backlight,
-       .OEM_sys_set_hardkey_backlight= &OEM_sys_set_hardkey_backlight
+       .OEM_sys_set_hardkey_backlight = &OEM_sys_set_hardkey_backlight
 };