Re: [PATCH] ASoC:pcm512x: Fix divide by zero issue.

2015-03-22 Thread Mark Brown
On Fri, Mar 20, 2015 at 09:13:45PM +, Howard Mitchell wrote: > If den=1 and pllin_rate>20MHz then den and num are adjusted to 0 > causing a divide by zero error a few lines further on. Therefore > this patch correctly scales num and den such that > pllin_rate/den < 20MHz as required in the

RE: [PATCH] ASoC:pcm512x: Fix divide by zero issue.

2015-03-22 Thread Peter Rosin
Howard Mitchell wrote; > If den=1 and pllin_rate>20MHz then den and num are adjusted to 0 > causing a divide by zero error a few lines further on. Therefore > this patch correctly scales num and den such that > pllin_rate/den < 20MHz as required in the device data sheet. Yep, the old code is

RE: [PATCH] ASoC:pcm512x: Fix divide by zero issue.

2015-03-22 Thread Peter Rosin
Howard Mitchell wrote; If den=1 and pllin_rate20MHz then den and num are adjusted to 0 causing a divide by zero error a few lines further on. Therefore this patch correctly scales num and den such that pllin_rate/den 20MHz as required in the device data sheet. Yep, the old code is plain

Re: [PATCH] ASoC:pcm512x: Fix divide by zero issue.

2015-03-22 Thread Mark Brown
On Fri, Mar 20, 2015 at 09:13:45PM +, Howard Mitchell wrote: If den=1 and pllin_rate20MHz then den and num are adjusted to 0 causing a divide by zero error a few lines further on. Therefore this patch correctly scales num and den such that pllin_rate/den 20MHz as required in the device