Revert removing ARRAY_SIZE macro 33/223933/1 accepted/tizen/5.5/unified/20200205.063450 submit/tizen_5.5/20200205.062045
authorINSUN PYO <insun.pyo@samsung.com>
Wed, 5 Feb 2020 06:12:43 +0000 (15:12 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 5 Feb 2020 06:12:43 +0000 (06:12 +0000)
device-manager-plugin-sc7730 use ARRAY_SIZE as symbol instead of simple define.

E/DEVICE_NODE(  350): common.c: hw_get_info(63) > fail to open module : /usr/lib/hw/external_connection.so: undefined symbol: ARRAY_SIZE
E/DEVICED (  350): extcon.c: extcon_probe(411) > There is no extcon class.
E/DEVICED (  350): devices.c: devices_init(118) > [extcon] Failed to probe.
E/DEVICE_NODE(  350): common.c: hw_get_info(63) > fail to open module : /usr/lib/hw/led.so: undefined symbol: ARRAY_SIZE
E/DEVICED (  350): rgb.c: rgb_probe(387) > There is no LED HAL.
E/DEVICED (  350): devices.c: devices_init(118) > [rgbled] Failed to probe.
E/DEVICE_NODE(  350): common.c: hw_get_info(63) > fail to open module : /usr/lib/hw/led.so: undefined symbol: ARRAY_SIZE
E/DEVICED (  350): torch.c: led_service_load(160) > Failed to load led shared library: -2
E/DEVICED (  350): devices.c: devices_init(118) > [torchled] Failed to probe.
E/DEVICE_NODE(  350): common.c: hw_get_info(63) > fail to open module : /usr/lib/hw/led.so: undefined symbol: ARRAY_SIZE

Change-Id: I621dbca201a36681e23ece03fbb9d7c12eb5d127
(cherry picked from commit 9a038fa3dfa3b8aea9606a7b9586d8f6103ecdc5)

hw/shared.h

index 990c55fdf8f7edcde359b2e677810efd69c82cfb..a0687e265de383d02654336739df9b9818724339 100644 (file)
@@ -40,6 +40,8 @@
 #define _E(x, ...)                     do { } while (0)
 #endif
 
+#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
+
 #define SHARED_H_BUF_MAX 255
 
 static inline int sys_read_buf(char *file, char *buf, int len)