Module Name:    src
Committed By:   mlelstv
Date:           Sat Oct 11 13:56:01 UTC 2014

Modified Files:
        src/sys/dev/spi: spiflash.c

Log Message:
use disk_init() wrapper function instead of poking data structures.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/spi/spiflash.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/spi/spiflash.c
diff -u src/sys/dev/spi/spiflash.c:1.15 src/sys/dev/spi/spiflash.c:1.16
--- src/sys/dev/spi/spiflash.c:1.15	Fri Jul 25 08:10:39 2014
+++ src/sys/dev/spi/spiflash.c	Sat Oct 11 13:56:01 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: spiflash.c,v 1.15 2014/07/25 08:10:39 dholland Exp $ */
+/* $NetBSD: spiflash.c,v 1.16 2014/10/11 13:56:01 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.15 2014/07/25 08:10:39 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.16 2014/10/11 13:56:01 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -232,9 +232,7 @@ spiflash_attach(device_t parent, device_
 	bufq_alloc(&sc->sc_workq, "fcfs", BUFQ_SORT_RAWBLOCK);
 	bufq_alloc(&sc->sc_doneq, "fcfs", BUFQ_SORT_RAWBLOCK);
 
-	sc->sc_dk.dk_driver = &spiflash_dkdriver;
-	sc->sc_dk.dk_name = device_xname(self);
-
+	disk_init(&sc->sc_dk, device_xname(self), &spiflash_dkdriver);
 	disk_attach(&sc->sc_dk);
 
 	/* arrange to allocate the kthread */

Reply via email to