[PATCH 25/31] swim: Move swd initialization

From: Finn Thain

Date: Thu Jul 16 2026 - 06:23:36 EST


For better readability, initialize the swd backpointer along with the
other floppy_state struct members. No functional change.

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 4679f554fec5..c41d56ab6c04 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -760,6 +760,7 @@ static int swim_add_floppy(struct swim_priv *swd, enum drive_location location)
struct floppy_state *fs = &swd->unit[swd->floppy_count];
struct swim __iomem *base = swd->base;

+ fs->swd = swd;
fs->location = location;

swim_motor(base, OFF);
@@ -855,8 +856,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