Print this page
4823 don't open-code NSEC2MSEC and MSEC2NSEC

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/power.c
          +++ new/usr/src/uts/common/io/power.c
↓ open down ↓ 108 lines elided ↑ open up ↑
 109  109   * FWARC 2005/687: power device compatible property
 110  110   */
 111  111  #define POWER_DEVICE_TYPE "power-device-type"
 112  112  
 113  113  /*
 114  114   * Driver global variables
 115  115   */
 116  116  static void *power_state;
 117  117  static int power_inst = -1;
 118  118  
 119      -static hrtime_t power_button_debounce = NANOSEC/MILLISEC*10;
      119 +static hrtime_t power_button_debounce = MSEC2NSEC(10);
 120  120  static hrtime_t power_button_abort_interval = 1.5 * NANOSEC;
 121  121  static int      power_button_abort_presses = 3;
 122  122  static int      power_button_abort_enable = 1;
 123  123  static int      power_button_enable = 1;
 124  124  
 125  125  static int      power_button_pressed = 0;
 126  126  static int      power_button_cancel = 0;
 127  127  static int      power_button_timeouts = 0;
 128  128  static int      timeout_cancel = 0;
 129  129  static int      additional_presses = 0;
↓ open down ↓ 1123 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX