From 3ff2063e2a1217ae80205a447ffdf00974bf7c38 Mon Sep 17 00:00:00 2001 From: Siddartha Mohanadoss Date: Fri, 17 May 2013 10:53:03 -0700 Subject: [PATCH] hwmon: epm_adc: Fix clear buffer command Currently when clients request to clear the PSOC buffer the result returned to the user is not valid. This is because the response byte that indicates the status of the PSOC is the second byte and not the third. Fix it by reading the appropriate byte to indicate the status of the command request. Change-Id: I1604274619bb881ecc2e0afc46979ae4eb85a154 Signed-off-by: Siddartha Mohanadoss --- drivers/hwmon/epm_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/epm_adc.c b/drivers/hwmon/epm_adc.c index 552c71061b1..a587ed264be 100644 --- a/drivers/hwmon/epm_adc.c +++ b/drivers/hwmon/epm_adc.c @@ -1235,7 +1235,7 @@ static int epm_psoc_clear_buffer(struct epm_adc_drv *epm_adc) if (rc) return rc; - rc = rx_buf[2]; + rc = rx_buf[1]; return rc; }