summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGao Pan <b54642@freescale.com>2015-11-02 17:05:30 +0800
committerWolfram Sang <wsa@the-dreams.de>2016-01-03 19:17:29 +0100
commite8e712916ceade419ab52900917ed568c7b3ec26 (patch)
tree3391fbf9290a43385711d0e557542398ad4f225c
parent5b6615398906150dea92fe67a1613a0151ddd0ba (diff)
downloadop-kernel-dev-e8e712916ceade419ab52900917ed568c7b3ec26.zip
op-kernel-dev-e8e712916ceade419ab52900917ed568c7b3ec26.tar.gz
i2c: imx: improve code readability
Replace of_get_named_gpio_flags with of_get_named_gpio because the latter has less parameters, which improves code readability. Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Gao Pan <b54642@freescale.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/busses/i2c-imx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 8f62e1f..dcea8d2 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1004,10 +1004,8 @@ static void i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx,
PINCTRL_STATE_DEFAULT);
i2c_imx->pinctrl_pins_gpio = pinctrl_lookup_state(i2c_imx->pinctrl,
"gpio");
- rinfo->sda_gpio = of_get_named_gpio_flags(pdev->dev.of_node,
- "sda-gpios", 0, NULL);
- rinfo->scl_gpio = of_get_named_gpio_flags(pdev->dev.of_node,
- "scl-gpios", 0, NULL);
+ rinfo->sda_gpio = of_get_named_gpio(pdev->dev.of_node, "sda-gpios", 0);
+ rinfo->scl_gpio = of_get_named_gpio(pdev->dev.of_node, "scl-gpios", 0);
if (!gpio_is_valid(rinfo->sda_gpio) ||
!gpio_is_valid(rinfo->scl_gpio) ||
OpenPOWER on IntegriCloud