Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/spi use disk_init() wrapper function instead of poki...



details:   https://anonhg.NetBSD.org/src/rev/f72949539cd1
branches:  trunk
changeset: 803045:f72949539cd1
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sat Oct 11 13:56:01 2014 +0000

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

diffstat:

 sys/dev/spi/spiflash.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 2d59a07e2ed4 -r f72949539cd1 sys/dev/spi/spiflash.c
--- a/sys/dev/spi/spiflash.c    Sat Oct 11 13:34:01 2014 +0000
+++ b/sys/dev/spi/spiflash.c    Sat Oct 11 13:56:01 2014 +0000
@@ -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 @@
        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 */



Home | Main Index | Thread Index | Old Index