[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<TY3PR01MB113466D4073CF89035234B02F868F2@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Thu, 22 Aug 2024 14:22:08 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Rong Qianfeng <rongqianfeng@...o.com>, Wolfram Sang
<wsa+renesas@...g-engineering.com>, Andi Shyti <andi.shyti@...nel.org>, Paul
Cercueil <paul@...pouillou.net>, "linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>, "linux-i2c@...r.kernel.org"
<linux-i2c@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-mips@...r.kernel.org"
<linux-mips@...r.kernel.org>
CC: "opensource.kernel@...o.com" <opensource.kernel@...o.com>
Subject: RE: [PATCH v2 2/3] i2c: emev2: Drop sclk from struct em_i2c_device
Hi Rong Qianfeng,
> -----Original Message-----
> From: Rong Qianfeng <rongqianfeng@...o.com>
> Sent: Thursday, August 22, 2024 3:04 PM
> Subject: [PATCH v2 2/3] i2c: emev2: Drop sclk from struct em_i2c_device
>
> For no need to save clk pointer, drop sclk from struct em_i2c_device.
>
> Signed-off-by: Rong Qianfeng <rongqianfeng@...o.com>
Reviewed-by: Biju Das <biju.das.jz@...renesas.com>
Cheers,
Biju
> ---
> drivers/i2c/busses/i2c-emev2.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-emev2.c b/drivers/i2c/busses/i2c-emev2.c index
> 20efe0b0cb85..2a5d9d658246 100644
> --- a/drivers/i2c/busses/i2c-emev2.c
> +++ b/drivers/i2c/busses/i2c-emev2.c
> @@ -67,7 +67,6 @@ struct em_i2c_device {
> void __iomem *base;
> struct i2c_adapter adap;
> struct completion msg_done;
> - struct clk *sclk;
> struct i2c_client *slave;
> int irq;
> };
> @@ -361,6 +360,7 @@ static const struct i2c_algorithm em_i2c_algo = { static int em_i2c_probe(struct
> platform_device *pdev) {
> struct em_i2c_device *priv;
> + struct clk *sclk;
> int ret;
>
> priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); @@ -373,9 +373,9 @@ static int
> em_i2c_probe(struct platform_device *pdev)
>
> strscpy(priv->adap.name, "EMEV2 I2C", sizeof(priv->adap.name));
>
> - priv->sclk = devm_clk_get_enabled(&pdev->dev, "sclk");
> - if (IS_ERR(priv->sclk))
> - return PTR_ERR(priv->sclk);
> + sclk = devm_clk_get_enabled(&pdev->dev, "sclk");
> + if (IS_ERR(sclk))
> + return PTR_ERR(sclk);
>
> priv->adap.timeout = msecs_to_jiffies(100);
> priv->adap.retries = 5;
> --
> 2.39.0
Powered by blists - more mailing lists