Diff for /src/sys/dev/misc/pps/pps.c between versions 1.8 and 1.9

version 1.8, 2004/05/13 23:49:17 version 1.9, 2004/05/19 22:52:43
Line 91  ppsprobe(device_t ppsdev) Line 91  ppsprobe(device_t ppsdev)
 {  {
         struct pps_data *sc;          struct pps_data *sc;
         dev_t dev;          dev_t dev;
         int unit;  
   
         sc = DEVTOSOFTC(ppsdev);          sc = DEVTOSOFTC(ppsdev);
         bzero(sc, sizeof(struct pps_data));          bzero(sc, sizeof(struct pps_data));
   
         unit = device_get_unit(ppsdev);  
         dev = make_dev(&pps_cdevsw, unit,  
             UID_ROOT, GID_WHEEL, 0644, PPS_NAME "%d", unit);  
   
         device_set_desc(ppsdev, "Pulse per second Timing Interface");          device_set_desc(ppsdev, "Pulse per second Timing Interface");
   
         sc->pps.ppscap = PPS_CAPTUREASSERT | PPS_ECHOASSERT;          sc->pps.ppscap = PPS_CAPTUREASSERT | PPS_ECHOASSERT;
Line 113  ppsattach(device_t dev) Line 108  ppsattach(device_t dev)
         struct pps_data *sc = DEVTOSOFTC(dev);          struct pps_data *sc = DEVTOSOFTC(dev);
         device_t ppbus = device_get_parent(dev);          device_t ppbus = device_get_parent(dev);
         int irq, zero = 0;          int irq, zero = 0;
           int unit;
   
         /* retrieve the ppbus irq */          /* retrieve the ppbus irq */
         BUS_READ_IVAR(ppbus, dev, PPBUS_IVAR_IRQ, &irq);          BUS_READ_IVAR(ppbus, dev, PPBUS_IVAR_IRQ, &irq);
Line 126  ppsattach(device_t dev) Line 122  ppsattach(device_t dev)
         if (sc->intr_resource == 0)          if (sc->intr_resource == 0)
                 return (ENXIO);                  return (ENXIO);
   
           unit = device_get_unit(ppsdev);
           cdevsw_add(&pps_cdevsw, -1, unit);
           dev = make_dev(&pps_cdevsw, unit, UID_ROOT, GID_WHEEL, 0644,
                           PPS_NAME "%d", unit);
         return (0);          return (0);
 }  }
   

Removed from v.1.8  
changed lines
  Added in v.1.9