Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/usb/clients/video/usbvc/usbvc_var.h
          +++ new/usr/src/uts/common/sys/usb/clients/video/usbvc/usbvc_var.h
↓ open down ↓ 24 lines elided ↑ open up ↑
  25   25  
  26   26  #ifndef _SYS_USB_USBVC_VAR_H
  27   27  #define _SYS_USB_USBVC_VAR_H
  28   28  
  29   29  
  30   30  #ifdef  __cplusplus
  31   31  extern "C" {
  32   32  #endif
  33   33  
  34   34  #include <sys/list.h>
       35 +#include <sys/sysmacros.h>
  35   36  #include <sys/usb/usba/usbai_private.h>
  36   37  #include <sys/videodev2.h>
  37   38  #include <sys/usb/clients/video/usbvc/usbvc.h>
  38   39  
  39   40  typedef struct usbvc_state usbvc_state_t;
  40   41  
  41   42  /*
  42   43   * Power Management support
  43   44   */
  44   45  typedef struct usbvc_power  {
↓ open down ↓ 121 lines elided ↑ open up ↑
 166  167  #define PRINT_MASK_CLOSE        0x00000004
 167  168  #define PRINT_MASK_READ         0x00000008
 168  169  #define PRINT_MASK_IOCTL        0x00000010
 169  170  #define PRINT_MASK_PM   0x00000020
 170  171  #define PRINT_MASK_CB   0x00000040
 171  172  #define PRINT_MASK_HOTPLUG      0x00000080
 172  173  #define PRINT_MASK_DEVCTRL      0x00000100
 173  174  #define PRINT_MASK_DEVMAP       0x00000200
 174  175  #define PRINT_MASK_ALL          0xFFFFFFFF
 175  176  
 176      -#define offsetof(s, m)  ((size_t)(&(((s *)0)->m)))
 177      -
 178  177  #define USBVC_MAX_PKTS 40
 179  178  
 180  179  #define USBVC_DEFAULT_READ_BUF_NUM 3
 181  180  #define USBVC_MAX_READ_BUF_NUM 40
 182  181  #define USBVC_MAX_MAP_BUF_NUM 40
 183  182  
 184  183  /* According to UVC specs, the frame interval is in 100ns unit */
 185  184  #define USBVC_FRAME_INTERVAL_DENOMINATOR        10000000
 186  185  
 187  186  /* Only D3...D0 are writable, Table 4-6, UVC Spec */
↓ open down ↓ 205 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX