aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-uniphier.c
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-04-22 15:19:54 +0200
committerWolfram Sang <wsa@the-dreams.de>2016-04-27 19:03:15 +0200
commitf3a36fbdd359608bf73d674533cc419bf7e65aae (patch)
treee3a398be2472e6e3466316c84efe021b93a03023 /drivers/i2c/busses/i2c-uniphier.c
parenti2c: mv64xxx: use clk_{prepare_enable,disable_unprepare} (diff)
downloadlinux-dev-f3a36fbdd359608bf73d674533cc419bf7e65aae.tar.xz
linux-dev-f3a36fbdd359608bf73d674533cc419bf7e65aae.zip
i2c: mv64xxx: remove CONFIG_HAVE_CLK conditionals
When clock support was added to the i2c-mv64xxx, not all clk functions had stubs when for !CONFIG_HAVE_CLK configurations. However, nowadays, both "struct clk" and all the clock framework functions have stubs when CONFIG_HAVE_CLK is not enabled, so it no longer makes sense to carry such compile-time conditionals in the driver. This commit was compile tested on both ARM64 (which has both CONFIG_OF=y and CONFIG_HAVE_CLK=y) and PowerPC c2k_defconfig (which has CONFIG_OF=y, CONFIG_HAVE_CLK disabled, and the i2c-mv64xxx driver enabled). The only non-trivial change is in the mv64xxx_of_config() function, which was returning -ENODEV unconditionally if CONFIG_HAVE_CLK was disabled. Simply removing this condition works fine because the first test done by the function is to verify if drv_data->clk points to a valid clock, and if it doesn't, we return -ENODEV. When CONFIG_HAVE_CLK is disabled, devm_clk_get() unconditionally returns NULL, so mv64xxx_of_config() will return -ENODEV when no clock is provided, which is the intended behavior. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-uniphier.c')
0 files changed, 0 insertions, 0 deletions