From 1ab2e8918de583f7f98289448af6d8784a4c4ced Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva Date: Sun, 16 Aug 2015 00:48:03 +0100 Subject: [PATCH] greybus: makefile: use POSIX functions for kernel cmp [[, == and echo -e are bash/zsh-ism and not POSIX, so when using a POSIX shell the kernel_cmp can issue some warnings and not work properly. Use only POSIX operators for kernel version compare. Signed-off-by: Rui Miguel Silva Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile index 5c29b63c6c28..31b025da5e98 100644 --- a/drivers/staging/greybus/Makefile +++ b/drivers/staging/greybus/Makefile @@ -61,7 +61,7 @@ ifneq ($(KERNELRELEASE),) # This function returns the argument version if current kernel version is minor # than the passed version, return 1 if equal or the current kernel version if it # is greater than argument version. -kvers_cmp=$(shell [[ "$(KERNELVERSION)" == "$(1)" ]] && echo 1 || echo -e "$(1)\n$(KERNELVERSION)" | sort -V | tail -1) +kvers_cmp=$(shell [ "$(KERNELVERSION)" = "$(1)" ] && echo 1 || printf "$(1)\n$(KERNELVERSION)" | sort -V | tail -1) ifneq ($(call kvers_cmp,"3.19.0"),3.19.0) CONFIG_OPTIONS_ENABLE += LEDS_CLASS_FLASH -- 2.20.1