diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 65089044d454..c4d8963ba933 100755 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -147,6 +147,7 @@ static int binder_set_stop_on_user_error(const char *val, module_param_call(stop_on_user_error, binder_set_stop_on_user_error, param_get_int, &binder_stop_on_user_error, 0644); +#ifdef DEBUG #define binder_debug(mask, x...) \ do { \ if (binder_debug_mask & mask) \ @@ -160,6 +161,16 @@ module_param_call(stop_on_user_error, binder_set_stop_on_user_error, if (binder_stop_on_user_error) \ binder_stop_on_user_error = 2; \ } while (0) +#else +static inline void binder_debug(uint32_t mask, const char *fmt, ...) +{ +} +static inline void binder_user_error(const char *fmt, ...) +{ + if (binder_stop_on_user_error) + binder_stop_on_user_error = 2; +} +#endif #define binder_set_extended_error(ee, _id, _command, _param) \ do { \