fixes for linaro 4.7 from garwedgess & cosmicdan

Change-Id: I6e61defcac4dbf07328f73d044c68ee86a9781ad