summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWentong Tian <tianwentong2000@gmail.com>2026-01-12 19:27:09 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-01-20 23:47:52 +0300
commit6cebd8e193d023c2580ca7b4f8b22a60701cb3d4 (patch)
treec9f099a87032877557e608d0f199ec3c3ec3708c
parent3033da61dc3982234da896be03e50633b62cfbd3 (diff)
downloadlinux-6cebd8e193d023c2580ca7b4f8b22a60701cb3d4.tar.xz
Input: serio - complete sizeof(*pointer) conversions
Complete the sizeof(*pointer) conversion for arc_ps2, altera_ps2, and olpc_apsp drivers. This follows the cleanup initiated in commit 06b449d7f7c3 ("Input: serio - use sizeof(*pointer) instead of sizeof(type)). Signed-off-by: Wentong Tian <tianwentong2000@gmail.com> Link: https://patch.msgid.link/20260112162709.89515-1-tianwentong2000@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/serio/altera_ps2.c2
-rw-r--r--drivers/input/serio/arc_ps2.c3
-rw-r--r--drivers/input/serio/olpc_apsp.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c
index aa445b1941e9..761aaaa3e571 100644
--- a/drivers/input/serio/altera_ps2.c
+++ b/drivers/input/serio/altera_ps2.c
@@ -81,7 +81,7 @@ static int altera_ps2_probe(struct platform_device *pdev)
struct serio *serio;
int error, irq;
- ps2if = devm_kzalloc(&pdev->dev, sizeof(struct ps2if), GFP_KERNEL);
+ ps2if = devm_kzalloc(&pdev->dev, sizeof(*ps2if), GFP_KERNEL);
if (!ps2if)
return -ENOMEM;
diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c
index e991c72296c9..29095d8804d2 100644
--- a/drivers/input/serio/arc_ps2.c
+++ b/drivers/input/serio/arc_ps2.c
@@ -189,8 +189,7 @@ static int arc_ps2_probe(struct platform_device *pdev)
if (irq < 0)
return -EINVAL;
- arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data),
- GFP_KERNEL);
+ arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(*arc_ps2), GFP_KERNEL);
if (!arc_ps2) {
dev_err(&pdev->dev, "out of memory\n");
return -ENOMEM;
diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_apsp.c
index a24324830021..c07fb8a1799d 100644
--- a/drivers/input/serio/olpc_apsp.c
+++ b/drivers/input/serio/olpc_apsp.c
@@ -171,7 +171,7 @@ static int olpc_apsp_probe(struct platform_device *pdev)
struct olpc_apsp *priv;
int error;
- priv = devm_kzalloc(&pdev->dev, sizeof(struct olpc_apsp), GFP_KERNEL);
+ priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;