From: Segwon Date: Tue, 21 Nov 2017 01:46:52 +0000 (+0900) Subject: log: change file name "peripheral_common.h" to "peripheral_log.h" X-Git-Tag: submit/tizen_4.0/20171220.125806^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c526b07930a4ee9f70877e09f91e374d1c4577d6;p=platform%2Fcore%2Fsystem%2Fperipheral-bus.git log: change file name "peripheral_common.h" to "peripheral_log.h" Change-Id: I4cbf8be541b34d592b95c47d2a9a975935b65a95 Signed-off-by: Segwon --- diff --git a/src/daemon/include/peripheral_common.h b/src/daemon/include/peripheral_common.h deleted file mode 100644 index 9c3b8fe..0000000 --- a/src/daemon/include/peripheral_common.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2016-2017 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __PERIPHERAL_COMMON_H__ -#define __PERIPHERAL_COMMON_H__ - -#include -#include - -#undef LOG_TAG -#define LOG_TAG "PERIPHERAL-BUS" - -#define _E(fmt, arg...) LOGE(fmt, ##arg) -#define _D(fmt, arg...) LOGD(fmt, ##arg) -#define _W(fmt, arg...) LOGW(fmt, ##arg) - -#define RET_IF(expr) \ - do { \ - if (expr) { \ - _E("(%s)", #expr); \ - return; \ - } \ - } while (0) -#define RETV_IF(expr, val) \ - do {\ - if (expr) { \ - _E("(%s)", #expr); \ - return (val); \ - } \ - } while (0) -#define RETM_IF(expr, fmt, arg...) \ - do {\ - if (expr) { \ - _E(fmt, ##arg); \ - return; \ - } \ - } while (0) -#define RETVM_IF(expr, val, fmt, arg...) \ - do {\ - if (expr) { \ - _E(fmt, ##arg); \ - return (val); \ - } \ - } while (0) - -#endif /* __PERIPHERAL_COMMON_H__ */ diff --git a/src/daemon/include/peripheral_log.h b/src/daemon/include/peripheral_log.h new file mode 100644 index 0000000..7198845 --- /dev/null +++ b/src/daemon/include/peripheral_log.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2016-2017 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef __PERIPHERAL_LOG_H__ +#define __PERIPHERAL_LOG_H__ + +#include +#include + +#undef LOG_TAG +#define LOG_TAG "PERIPHERAL-BUS" + +#define _E(fmt, arg...) LOGE(fmt, ##arg) +#define _D(fmt, arg...) LOGD(fmt, ##arg) +#define _W(fmt, arg...) LOGW(fmt, ##arg) + +#define RET_IF(expr) \ + do { \ + if (expr) { \ + _E("(%s)", #expr); \ + return; \ + } \ + } while (0) +#define RETV_IF(expr, val) \ + do {\ + if (expr) { \ + _E("(%s)", #expr); \ + return (val); \ + } \ + } while (0) +#define RETM_IF(expr, fmt, arg...) \ + do {\ + if (expr) { \ + _E(fmt, ##arg); \ + return; \ + } \ + } while (0) +#define RETVM_IF(expr, val, fmt, arg...) \ + do {\ + if (expr) { \ + _E(fmt, ##arg); \ + return (val); \ + } \ + } while (0) + +#endif /* __PERIPHERAL_COMMON_H__ */ diff --git a/src/daemon/peripheral_bus.c b/src/daemon/peripheral_bus.c index 6c18e58..7f66434 100644 --- a/src/daemon/peripheral_bus.c +++ b/src/daemon/peripheral_bus.c @@ -24,7 +24,7 @@ #include "peripheral_io_gdbus.h" #include "peripheral_bus.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_gdbus_gpio.h" #include "peripheral_bus_gdbus_i2c.h" #include "peripheral_bus_gdbus_pwm.h" diff --git a/src/daemon/peripheral_bus_board.c b/src/daemon/peripheral_bus_board.c index b2abbc7..48e2a0d 100644 --- a/src/daemon/peripheral_bus_board.c +++ b/src/daemon/peripheral_bus_board.c @@ -24,7 +24,7 @@ #include #include "peripheral_bus_board.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #define STR_BUF_MAX 255 diff --git a/src/daemon/peripheral_bus_gdbus_gpio.c b/src/daemon/peripheral_bus_gdbus_gpio.c index b45115b..b864c1d 100644 --- a/src/daemon/peripheral_bus_gdbus_gpio.c +++ b/src/daemon/peripheral_bus_gdbus_gpio.c @@ -20,7 +20,7 @@ #include "peripheral_io_gdbus.h" #include "peripheral_bus.h" #include "peripheral_bus_gpio.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" #include "peripheral_bus_gdbus_gpio.h" diff --git a/src/daemon/peripheral_bus_gdbus_i2c.c b/src/daemon/peripheral_bus_gdbus_i2c.c index 8a55bd5..6e0bfbb 100644 --- a/src/daemon/peripheral_bus_gdbus_i2c.c +++ b/src/daemon/peripheral_bus_gdbus_i2c.c @@ -19,7 +19,7 @@ #include "peripheral_io_gdbus.h" #include "peripheral_bus.h" #include "peripheral_bus_i2c.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" #include "peripheral_bus_gdbus_i2c.h" diff --git a/src/daemon/peripheral_bus_gdbus_pwm.c b/src/daemon/peripheral_bus_gdbus_pwm.c index 9560829..47ead35 100644 --- a/src/daemon/peripheral_bus_gdbus_pwm.c +++ b/src/daemon/peripheral_bus_gdbus_pwm.c @@ -19,7 +19,7 @@ #include "peripheral_io_gdbus.h" #include "peripheral_bus.h" #include "peripheral_bus_pwm.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" #include "peripheral_bus_gdbus_pwm.h" diff --git a/src/daemon/peripheral_bus_gdbus_spi.c b/src/daemon/peripheral_bus_gdbus_spi.c index 11eb0e6..f609690 100644 --- a/src/daemon/peripheral_bus_gdbus_spi.c +++ b/src/daemon/peripheral_bus_gdbus_spi.c @@ -19,7 +19,7 @@ #include "peripheral_io_gdbus.h" #include "peripheral_bus.h" #include "peripheral_bus_spi.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" #include "peripheral_bus_gdbus_spi.h" diff --git a/src/daemon/peripheral_bus_gdbus_uart.c b/src/daemon/peripheral_bus_gdbus_uart.c index 811d2eb..3aa3ea2 100644 --- a/src/daemon/peripheral_bus_gdbus_uart.c +++ b/src/daemon/peripheral_bus_gdbus_uart.c @@ -19,7 +19,7 @@ #include "peripheral_io_gdbus.h" #include "peripheral_bus.h" #include "peripheral_bus_uart.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" #include "peripheral_bus_gdbus_uart.h" diff --git a/src/daemon/peripheral_bus_gpio.c b/src/daemon/peripheral_bus_gpio.c index 057cac6..6ac8d20 100644 --- a/src/daemon/peripheral_bus_gpio.c +++ b/src/daemon/peripheral_bus_gpio.c @@ -26,7 +26,7 @@ #include "peripheral_interface_gpio.h" #include "peripheral_bus.h" #include "peripheral_bus_gdbus_gpio.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" static bool peripheral_bus_gpio_is_available(int pin, peripheral_bus_s *pb_data) diff --git a/src/daemon/peripheral_bus_i2c.c b/src/daemon/peripheral_bus_i2c.c index e0edbd5..88f8156 100644 --- a/src/daemon/peripheral_bus_i2c.c +++ b/src/daemon/peripheral_bus_i2c.c @@ -22,7 +22,7 @@ #include "peripheral_interface_i2c.h" #include "peripheral_bus.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" #define INITIAL_BUFFER_SIZE 128 diff --git a/src/daemon/peripheral_bus_pwm.c b/src/daemon/peripheral_bus_pwm.c index 6bf13dd..a9c657c 100644 --- a/src/daemon/peripheral_bus_pwm.c +++ b/src/daemon/peripheral_bus_pwm.c @@ -22,7 +22,7 @@ #include "peripheral_interface_pwm.h" #include "peripheral_bus.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" static bool peripheral_bus_pwm_is_available(int chip, int pin, peripheral_bus_s *pb_data) diff --git a/src/daemon/peripheral_bus_spi.c b/src/daemon/peripheral_bus_spi.c index f982c2a..e1d7f07 100644 --- a/src/daemon/peripheral_bus_spi.c +++ b/src/daemon/peripheral_bus_spi.c @@ -22,7 +22,7 @@ #include "peripheral_interface_spi.h" #include "peripheral_bus.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" static bool __peripheral_bus_spi_is_available(int bus, int cs, peripheral_bus_s *pb_data) diff --git a/src/daemon/peripheral_bus_uart.c b/src/daemon/peripheral_bus_uart.c index 1ca35e7..a73007a 100644 --- a/src/daemon/peripheral_bus_uart.c +++ b/src/daemon/peripheral_bus_uart.c @@ -23,7 +23,7 @@ #include "peripheral_interface_uart.h" #include "peripheral_io_gdbus.h" #include "peripheral_bus.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "peripheral_bus_util.h" #define INITIAL_BUFFER_SIZE 128 diff --git a/src/daemon/peripheral_bus_util.c b/src/daemon/peripheral_bus_util.c index 8204885..eb27024 100644 --- a/src/daemon/peripheral_bus_util.c +++ b/src/daemon/peripheral_bus_util.c @@ -24,7 +24,7 @@ #include #include "peripheral_bus.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #include "privilege_checker.h" diff --git a/src/daemon/privilege_checker.c b/src/daemon/privilege_checker.c index 20c3760..e35298d 100644 --- a/src/daemon/privilege_checker.c +++ b/src/daemon/privilege_checker.c @@ -27,7 +27,7 @@ #include #include "peripheral_bus.h" -#include "peripheral_common.h" +#include "peripheral_log.h" #define CACHE_SIZE 100 diff --git a/src/interface/include/peripheral_interface_common.h b/src/interface/include/peripheral_interface_common.h index e51f611..d411ae7 100644 --- a/src/interface/include/peripheral_interface_common.h +++ b/src/interface/include/peripheral_interface_common.h @@ -23,7 +23,7 @@ #include #include -#include "peripheral_common.h" +#include "peripheral_log.h" #define MAX_ERR_LEN 255 #define MAX_BUF_LEN 64