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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 May 2016 21:59:30 +0000 (14:59 -0700)
commitb1789b793eb4627928f55a6acea8da7c25e5c6b4
tree63d4327bdd58e2094892ea2c3f367a8d02e50380
parent358f42184e97f9a216b927a5a744597b98e0eee1
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>
drivers/hwtracing/coresight/coresight-tmc.c