i2c: designware: set the common config before the if else
authorWeifeng Voon <weifeng.voon@intel.com>
Fri, 12 Aug 2016 14:02:50 +0000 (17:02 +0300)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 25 Aug 2016 22:42:06 +0000 (00:42 +0200)
commit548e6695d16d201f390f7554ae7d0b5bb8690166
tree34600c2e0d5b83645ed998c288b2bfd31ca173b4
parentd608c3d9ac818fc0addc884144c7550e03b0fc6f
i2c: designware: set the common config before the if else

DW_IC_CON_MASTER, DW_IC_CON_SLAVE_DISABLE and DW_IC_CON_RESTART_EN are
common config that need to be set for i2c designware master. So, configure
it first without having to repeat inside the if else.

Signed-off-by: Weifeng Voon <weifeng.voon@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-designware-platdrv.c