FreeBSD/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
// In the cdevsw routines, we find our softc by using the si_drv1 member
// of struct cdev. We set this variable to point to our softc in our
// attach routine when we create the /dev entry.
In the cdevsw routines, we find our softc by using the si_drv1 member
of struct cdev. We set this variable to point to our softc in our
attach routine when we create the /dev entry.
In the cdevsw routines we find our softc by using the si_drv1 member of struct cdev . We set this variable to point to our softc in our attach routine when we create the / dev entry .
int agtiapi_open( struct cdev *dev, int oflags, int devtype, struct thread *td )
{
  struct agtiapi_softc *sc;
  sc = dev->si_drv1;
  AGTIAPI_PRINTK("agtiapi_open\n");
  AGTIAPI_PRINTK("Opened successfully. sc->my_dev %p\n", sc->my_dev);
  return( 0 );
}
int agtiapi_open ( struct cdev * dev , int oflags , int devtype , struct thread * td ) { struct agtiapi_softc * sc ; sc = dev -> si_drv1 ; AGTIAPI_PRINTK ( " \n " ) ; AGTIAPI_PRINTK ( " \n " , sc -> my_dev ) ; return ( 0 ) ; }
In the cdevsw routines, we find our softc by using the si_drv1 member
of struct cdev.
In the cdevsw routines we find our softc by using the si_drv1 member of struct cdev .
/* Look up our softc. */