From: Wolfram Sang Date: Thu, 19 Feb 2015 16:22:34 +0000 (+0100) Subject: i2c: ocores: rework clk code to handle NULL cookie X-Git-Tag: fixes-v4.0-rc1~32^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d8fb59924cf20e7bef2c41f8d4e87127f573546;p=pandora-kernel.git 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 Signed-off-by: Wolfram Sang Tested-by: Max Filippov --- Reading git-diff-tree failed