]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: ocores: rework clk code to handle NULL cookie
authorWolfram Sang <wsa@the-dreams.de>
Thu, 19 Feb 2015 16:22:34 +0000 (17:22 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 20 Feb 2015 17:01:23 +0000 (18:01 +0100)
commit7013bf30a6b0d980205edf56cbeeecb4d4ad0773
tree9674de914ac8c29d1c17c65ea93fbe2983b4900a
parentf34c19d1806c9c77c1e031688dc1bf20f6bdbc99
i2c: ocores: rework clk code to handle NULL cookie

For, !HAVE_CLK the clk API returns a NULL cookie. Rework the
initialization code to handle that. If clk_get_rate() delivers 0, we use
the fallback mechanisms. The patch is pretty easy when ignoring white
space issues (git diff -b).

Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
drivers/i2c/busses/i2c-ocores.c