ID macros
[Public interface]

Macros to handle device and vendor ids. More...


Defines

#define TAG_PCI   1
 PCI ids.
#define TAG_EISA   2
 EISA ids (monitors, ISA-PnP, modems, mice etc).
#define TAG_USB   3
 USB ids.
#define TAG_SPECIAL   4
 Internally used ids.
#define TAG_PCMCIA   5
 PCMCIA ids.
#define ID_VALUE(id)   ((id) & 0xffff)
 Get the real id value.
#define ID_TAG(id)   (((id) >> 16) & 0xf)
 Get the tag value.
#define MAKE_ID(tag, id_val)   ((tag << 16) | (id_val))
 Combine tag and id value.


Detailed Description

Macros to handle device and vendor ids.

Example: to check if an id is a pci id and get its value, do something like this:

 if(ID_TAG(hd->dev) == TAG_PCI) {
   pci_id = ID_VALUE(hd->dev)
 }

Define Documentation

#define ID_TAG ( id   )     (((id) >> 16) & 0xf)

#define ID_VALUE ( id   )     ((id) & 0xffff)

#define MAKE_ID ( tag,
id_val   )     ((tag << 16) | (id_val))

#define TAG_EISA   2

#define TAG_PCI   1

#define TAG_PCMCIA   5

PCMCIA ids.

Referenced by hd_scan_xtra(), parse_id(), pcmcia_read_data(), and vend_id2str().

#define TAG_SPECIAL   4

#define TAG_USB   3