diff options
author | Oron Peled <oron.peled@xorcom.com> | 2011-05-23 19:23:52 +0300 |
---|---|---|
committer | Oron Peled <oron.peled@xorcom.com> | 2011-05-23 19:23:52 +0300 |
commit | e894536f5e73b741bd55dfe53e864df93532c271 (patch) | |
tree | c4bc104dc9a5191b66b6b9c31482fe5a3a2b28b9 /include/dahdi/kernel.h | |
parent | 72779010659e968f3b400f4ef513f375eb022df2 (diff) |
add to dahdi_device a "hardware_id" attribute as an alternative to "location"
- The "hardware_id" does not change with device location (e.g: when a PCI
card is moved from one slot to another).
- Not all devices have this attribute. It is legal for it to be NULL (that
is the default for all low-level drivers that do not set it explicitly).
- When "hardware_id" is NULL, the sysfs attribute value is "\n"
Diffstat (limited to 'include/dahdi/kernel.h')
-rw-r--r-- | include/dahdi/kernel.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index d2f3dc7..2ca5acf 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -882,17 +882,22 @@ struct dahdi_span_ops { /** * dahdi_device - Represents a device that can contain one or more spans. * - * @spans: List of child spans. + * @spans: List of child spans. * @manufacturer: Device manufacturer. - * @location: The location of this device - * @devicetype: What type of device this is. - * @irqmisses: Count of "interrupt misses" for this device. + * @location: The location of this device. This should not change if + * the device is replaced (e.g: in the same PCI slot) + * @hardware_id: The hardware_id of this device (NULL for devices without + * a hardware_id). This should not change if the device is + * relocated to a different location (e.g: different PCI slot) + * @devicetype: What type of device this is. + * @irqmisses: Count of "interrupt misses" for this device. * */ struct dahdi_device { struct list_head spans; const char *manufacturer; const char *location; + const char *hardware_id; const char *devicetype; struct device dev; unsigned int irqmisses; |