[PATCH v2 26/32] swim: Move swd initialization
From: Finn Thain
Date: Sun Aug 16 2026 - 22:00:12 EST
For better readability, initialize the swd backpointer along with the
other floppy_state struct members. No functional change.
Reviewed-by: Laurent Vivier <laurent@xxxxxxxxx>
Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
---
drivers/block/swim.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index ae31b302dac4..c204108c50f0 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -761,6 +761,7 @@ static void swim_add_floppy(struct swim_priv *swd, enum drive_location location)
if (swim_track00(base))
goto out;
+ fs->swd = swd;
fs->location = location;
fs->type = HD_MEDIA;
@@ -849,8 +850,6 @@ static int swim_floppy_init(struct platform_device *pdev)
err = PTR_ERR(swd->unit[drive].disk);
goto exit_put_disks;
}
-
- swd->unit[drive].swd = swd;
}
for (drive = 0; drive < swd->floppy_count; drive++) {
--
2.52.0