From nobody Thu Mar 5 16:35:48 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 179BA30ACE6; Mon, 23 Feb 2026 15:59:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771862360; cv=none; b=BIJtTiMo1bVCapYKNtQLTTeloI6tvF6bpPmn/CDpgjhiW7fKYQUIh+VapsmyUnbLS0b1brMdHpQoBjQo0vm0CrZFSCbUOcEWmEraYUt9aZmY2hjw5evBaeks8W84NsS55Uek4VQu6bJZ0aaMAgu8ADLKVK6j+/ue8ESaWfuLJhc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771862360; c=relaxed/simple; bh=BPWk7V6IosdqQatWb/+R1Zbr9KXhb6qDSmUpXNtngrc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ud8vqhAagkS8KGE5igtxqKScKSjnxtnOururjKItlT9XncfmlAH1x5n3Q0njbMGXyOgAiC1Cp6VUtbBbEOrM4SbHUu8atWeXdNa+XE8OGhhyp9aLs+D1vJ1YRRZj+U1MS7gLE3tg/xYpvVPU67IAnw9NzLxwLxnOXTptx/b6m4A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LDwhHkLK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LDwhHkLK" Received: by smtp.kernel.org (Postfix) with ESMTPS id DF669C2BC87; Mon, 23 Feb 2026 15:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771862359; bh=BPWk7V6IosdqQatWb/+R1Zbr9KXhb6qDSmUpXNtngrc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=LDwhHkLKG9KcD8jSRzplUoYde45EYwtAlkOLDsQgJ6hFdtkNZKXyLtXklMfbiUciV XAon3Fp9dXWZ5dGid93ZWN5IGACgzCLoZhIv3euRM9glKwCvNNh295Ti5SXt2Y/p3s M0jfw39TNBVSBp2airqjJng5hOdEsLtIGbqcw+V/I5ewr+LNNyoum1i4JzgVJkkT51 /KdQtRr7v7cjvhTtGMHS+aLPioXC/zjdWM6eTNFwlOz7S3ZAdGUzdcLoPPH7S6SR2f Aa7Krl9RBLjgBwRI3LVGD/dsa61/geU/pn5jRFZQaXUKgYrioFzuTnw6QxOJ0vLRg4 UQr9gQNKaZK4w== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8BA4EF5862; Mon, 23 Feb 2026 15:59:19 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Mon, 23 Feb 2026 15:59:19 +0000 Subject: [PATCH v12 4/7] i2c: xiic: cosmetic cleanup Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260223-i2c-xiic-v12-4-b6c9ce4e4f3c@nexthop.ai> References: <20260223-i2c-xiic-v12-0-b6c9ce4e4f3c@nexthop.ai> In-Reply-To: <20260223-i2c-xiic-v12-0-b6c9ce4e4f3c@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Abdurrahman Hussain X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1771862359; l=2687; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=WKrYUysErSt8JUMYxG926hSrEQ6AQxFlt9ypfj4o7Ls=; b=0xl97kExS2O1dCFZT7JYp7TvujhDRbiZfVq2+5xolj18xlWwOIv5wHYnOdMebT/aBdAwI3c5H fcWtjcT2wxgCSclCnrPIcwIr/DjQkEj0x6YWnEFgBsxR40QYWZgG4ad X-Developer-Key: i=abdurrahman@nexthop.ai; a=ed25519; pk=S+ysnf+NwMcBdHBlyKIUEAtaFGSIhQwcJcgcXhq0osg= X-Endpoint-Received: by B4 Relay for abdurrahman@nexthop.ai/20260119 with auth_id=608 X-Original-From: Abdurrahman Hussain Reply-To: abdurrahman@nexthop.ai From: Abdurrahman Hussain Re-use dev pointer instead of referencing &pdev->dev everywhere. Reviewed-by: Andy Shevchenko Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index c7f641e291a2..463a207c6a76 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1430,7 +1430,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) u8 i; u32 sr; =20 - i2c =3D devm_kzalloc(&pdev->dev, sizeof(*i2c), GFP_KERNEL); + i2c =3D devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL); if (!i2c) return -ENOMEM; =20 @@ -1446,7 +1446,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) if (irq < 0) return irq; =20 - pdata =3D dev_get_platdata(&pdev->dev); + pdata =3D dev_get_platdata(dev); =20 /* hook up driver to tree */ platform_set_drvdata(pdev, i2c); @@ -1468,9 +1468,10 @@ static int xiic_i2c_probe(struct platform_device *pd= ev) return dev_err_probe(&pdev->dev, PTR_ERR(i2c->clk), "failed to enable input clock.\n"); =20 - i2c->dev =3D &pdev->dev; - pm_runtime_set_autosuspend_delay(i2c->dev, XIIC_PM_TIMEOUT); - pm_runtime_use_autosuspend(i2c->dev); + i2c->dev =3D dev; + + pm_runtime_set_autosuspend_delay(dev, XIIC_PM_TIMEOUT); + pm_runtime_use_autosuspend(dev); ret =3D devm_pm_runtime_set_active_enabled(dev); if (ret) return ret; @@ -1482,9 +1483,8 @@ static int xiic_i2c_probe(struct platform_device *pde= v) if (ret || i2c->i2c_clk > I2C_MAX_FAST_MODE_PLUS_FREQ) i2c->i2c_clk =3D 0; =20 - ret =3D devm_request_threaded_irq(&pdev->dev, irq, NULL, - xiic_process, IRQF_ONESHOT, - pdev->name, i2c); + ret =3D devm_request_threaded_irq(dev, irq, NULL, xiic_process, + IRQF_ONESHOT, pdev->name, i2c); if (ret) return ret; =20 @@ -1527,21 +1527,21 @@ static int xiic_i2c_probe(struct platform_device *p= dev) =20 static void xiic_i2c_remove(struct platform_device *pdev) { + struct device *dev =3D &pdev->dev; struct xiic_i2c *i2c =3D platform_get_drvdata(pdev); int ret; =20 /* remove adapter & data */ i2c_del_adapter(&i2c->adap); =20 - ret =3D pm_runtime_get_sync(i2c->dev); - + ret =3D pm_runtime_get_sync(dev); if (ret < 0) - dev_warn(&pdev->dev, "Failed to activate device for removal (%pe)\n", + dev_warn(dev, "Failed to activate device for removal (%pe)\n", ERR_PTR(ret)); else xiic_deinit(i2c); =20 - pm_runtime_put_sync(i2c->dev); + pm_runtime_put_sync(dev); } =20 static const struct dev_pm_ops xiic_dev_pm_ops =3D { --=20 2.52.0