coresight: tmc: re-implementing tmc_read_prepare/unprepare() functions
authorMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 3 May 2016 17:33:46 +0000 (11:33 -0600)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 1 Jun 2016 21:46:31 +0000 (15:46 -0600)
commit8356894677ad1f9900a037346514866c35cc4bd3
tree1e8a94013db9f53f03010cca7971e2c8f8bd10e1
parent66c6e1177cfae0532c63b465bea65afaef289531
coresight: tmc: re-implementing tmc_read_prepare/unprepare() functions

In their current implementation the tmc_read_prepare/unprepare()
are a lump of if/else that is difficult to read.  This patch is
alleviating that by using a switch statement.  The latter also
allows for a better control on the error path.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b1789b793eb4627928f55a6acea8da7c25e5c6b4)
drivers/hwtracing/coresight/coresight-tmc.c