Re: [Patch V1] i2c: imx: improve code readability
On Mon, Nov 02, 2015 at 05:05:30PM +0800, Gao Pan wrote: > 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> Signed-off-by: Gao Pan Applied to for-next, thanks! signature.asc Description: Digital signature
Re: [Patch V1] i2c: imx: improve code readability
Hello, On Mon, Nov 02, 2015 at 05:05:30PM +0800, Gao Pan wrote: > 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> Signed-off-by: Gao Pan > --- > drivers/i2c/busses/i2c-imx.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c > index 1e4d99d..b0fe090 100644 > --- a/drivers/i2c/busses/i2c-imx.c > +++ b/drivers/i2c/busses/i2c-imx.c > @@ -996,10 +996,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); Acked-by: Uwe Kleine-König Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[Patch V1] 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 DuanSigned-off-by: Gao Pan --- drivers/i2c/busses/i2c-imx.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 1e4d99d..b0fe090 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -996,10 +996,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) || -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html