[PATCH 25/31] swim: Move swd initialization

Finn Thain <[email protected]> Thu, 16 Jul 2026 20:02:15 +1000
Newsgroups org.kernel.vger.linux-m68k,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel
Message-ID <2cc2eea25a2e1a444d037c3629fd8c144adb94f4.1784196135.git.fthain@linux-m68k.org>
For better readability, initialize the swd backpointer along with the
other floppy_state struct members. No functional change.

Signed-off-by: Finn Thain <[email protected]>
---
 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