diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-25 05:10:29 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-03 03:04:18 -0400 |
commit | 8f677ea07a2a934ac74ffa57db0f5617aec15ddf (patch) | |
tree | fb552d7c721e1e0a6c34319453fa2850ffa42dd2 /drivers/pcmcia/ds.c | |
parent | 0ca724d37af370dbf2d55dc4d6359ead558e5756 (diff) |
pcmcia: export resource information to sysfs
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r-- | drivers/pcmcia/ds.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 0bb780c3f263..028c97353b92 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -1011,6 +1011,18 @@ pcmcia_device_stringattr(prod_id2, prod_id[1]); | |||
1011 | pcmcia_device_stringattr(prod_id3, prod_id[2]); | 1011 | pcmcia_device_stringattr(prod_id3, prod_id[2]); |
1012 | pcmcia_device_stringattr(prod_id4, prod_id[3]); | 1012 | pcmcia_device_stringattr(prod_id4, prod_id[3]); |
1013 | 1013 | ||
1014 | static ssize_t pcmcia_show_resources(struct device *dev, | ||
1015 | struct device_attribute *attr, char *buf) | ||
1016 | { | ||
1017 | struct pcmcia_device *p_dev = to_pcmcia_dev(dev); | ||
1018 | char *str = buf; | ||
1019 | int i; | ||
1020 | |||
1021 | for (i = 0; i < PCMCIA_NUM_RESOURCES; i++) | ||
1022 | str += sprintf(str, "%pr\n", p_dev->resource[i]); | ||
1023 | |||
1024 | return str - buf; | ||
1025 | } | ||
1014 | 1026 | ||
1015 | static ssize_t pcmcia_show_pm_state(struct device *dev, struct device_attribute *attr, char *buf) | 1027 | static ssize_t pcmcia_show_pm_state(struct device *dev, struct device_attribute *attr, char *buf) |
1016 | { | 1028 | { |
@@ -1081,6 +1093,7 @@ static ssize_t pcmcia_store_allow_func_id_match(struct device *dev, | |||
1081 | static struct device_attribute pcmcia_dev_attrs[] = { | 1093 | static struct device_attribute pcmcia_dev_attrs[] = { |
1082 | __ATTR(function, 0444, func_show, NULL), | 1094 | __ATTR(function, 0444, func_show, NULL), |
1083 | __ATTR(pm_state, 0644, pcmcia_show_pm_state, pcmcia_store_pm_state), | 1095 | __ATTR(pm_state, 0644, pcmcia_show_pm_state, pcmcia_store_pm_state), |
1096 | __ATTR(resources, 0444, pcmcia_show_resources, NULL), | ||
1084 | __ATTR_RO(func_id), | 1097 | __ATTR_RO(func_id), |
1085 | __ATTR_RO(manf_id), | 1098 | __ATTR_RO(manf_id), |
1086 | __ATTR_RO(card_id), | 1099 | __ATTR_RO(card_id), |