[PATCH v2 26/32] swim: Move swd initialization

Finn Thain <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.linux-m68k
Message-ID <2edba6fa539e96afc0e9412ea81843b3523b60b4.1786929430.git.fthain@linux-m68k.org>
For better readability, initialize the swd backpointer along with the
other floppy_state struct members. No functional change.

Reviewed-by: Laurent Vivier <[email protected]>
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 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.