diff mbox

[v2,1/1] spi: pxa2xx: missing break in pxa2xx_ssp_get_clk_div()

Message ID 1427809778-99984-1-git-send-email-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit eecacf73a40f37e74dc9d0453283c79b91f34d51
Headers show

Commit Message

Andy Shevchenko March 31, 2015, 1:49 p.m. UTC
From: Dan Carpenter <dan.carpenter@oracle.com>

We refactored this code but accidentally left out a break statement so
QUARK_X1000_SSP isn't handled correctly.

Fixes: 025ffe88ee60 ('spi: pxa2xx: shift clk_div in one place')
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/spi/spi-pxa2xx.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Dan Carpenter March 31, 2015, 2:04 p.m. UTC | #1
On Tue, Mar 31, 2015 at 04:49:38PM +0300, Andy Shevchenko wrote:
> From: Dan Carpenter <dan.carpenter@oracle.com>
> 
> We refactored this code but accidentally left out a break statement so
> QUARK_X1000_SSP isn't handled correctly.
> 
> Fixes: 025ffe88ee60 ('spi: pxa2xx: shift clk_div in one place')
> Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks for this.  Sorry, for the delay I was confused earlier about if
I should wait for you to switch it to an if statement but after Mark's
comments then planning to resend later.  But you have done it for me,
thanks!

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown March 31, 2015, 2:05 p.m. UTC | #2
On Tue, Mar 31, 2015 at 04:49:38PM +0300, Andy Shevchenko wrote:
> From: Dan Carpenter <dan.carpenter@oracle.com>
> 
> We refactored this code but accidentally left out a break statement so
> QUARK_X1000_SSP isn't handled correctly.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 60526a5..e3223ac 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -791,8 +791,10 @@  static unsigned int pxa2xx_ssp_get_clk_div(struct driver_data *drv_data,
 	switch (drv_data->ssp_type) {
 	case QUARK_X1000_SSP:
 		clk_div = quark_x1000_get_clk_div(rate, &chip->dds_rate);
+		break;
 	default:
 		clk_div = ssp_get_clk_div(drv_data, rate);
+		break;
 	}
 	return clk_div << 8;
 }