Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Jan 1997 09:36:56 -0600
From:      "Eric L. Hernes" <erich@lodgenet.com>
To:        hackers@freebsd.org
Subject:   device driver initialization
Message-ID:  <199701031536.JAA16890@jake.lodgenet.com>

next in thread | raw e-mail | index | archive | help

Howdy,

It looks like most of the ISA drivers now days have a frag like:

SYSINIT(foo,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,foo_drvinit,NULL)

foo_drvinit(void *nothing){
  static int foo_devsw_installed=0;
  dev_t   dev;

  if (! foo_devsw_installed ) {
    dev = makedev(CDEV_MAJOR, 0);
    cdevsw_add(&dev, &foo_cdevsw, NULL);
    foo_devsw_installed = 1;
  }
}

Is there any reason that this can't be absorbed in the attach function,
somewhere around where the devfs stuff is done?  What's the reason for
adding yet another entry point during re-boot.  Isn't probe/attach enough?

eric.

-- 
erich@lodgenet.com
http://rrnet.com/~erich erich@rrnet.com






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701031536.JAA16890>