i2c: sh_mobile: check timing parameters for valid range
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 2 May 2014 19:15:15 +0000 (21:15 +0200)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:22:43 +0000 (09:22 +0900)
commit37858bcdbfb5047f67f7b5f85688f36afc9c472d
tree054d669cf39f59d4648355d063936317b82644bd
parentb28fb894c6cd7906319aa62479288aa98ace0fb6
i2c: sh_mobile: check timing parameters for valid range

Due to misconfiguration, it can happen that the calculated timing
parameters are out of range. Bail out if that happens. We can also
simplify some logic later because of the verified value. Also, make the
printouts of the values more precise by adding the hex-prefixes.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 7663ebefca8079ef0fd2fff1047d3d10af654c78)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/i2c/busses/i2c-sh_mobile.c