1 --- a/drivers/ssb/main.c
2 +++ b/drivers/ssb/main.c
3 @@ -385,6 +385,34 @@ static int ssb_device_uevent(struct devi
7 +#define ssb_config_attr(attrib, field, format_string) \
9 +attrib##_show(struct device *dev, struct device_attribute *attr, char *buf) \
11 + return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \
14 +ssb_config_attr(core_num, core_index, "%u\n")
15 +ssb_config_attr(coreid, id.coreid, "0x%04x\n")
16 +ssb_config_attr(vendor, id.vendor, "0x%04x\n")
17 +ssb_config_attr(revision, id.revision, "%u\n")
18 +ssb_config_attr(irq, irq, "%u\n")
20 +name_show(struct device *dev, struct device_attribute *attr, char *buf)
22 + return sprintf(buf, "%s\n", ssb_core_name(dev_to_ssb_dev(dev)->id.coreid));
25 +static struct device_attribute ssb_device_attrs[] = {
27 + __ATTR_RO(core_num),
30 + __ATTR_RO(revision),
35 static struct bus_type ssb_bustype = {
37 .match = ssb_bus_match,
38 @@ -394,6 +422,7 @@ static struct bus_type ssb_bustype = {
39 .suspend = ssb_device_suspend,
40 .resume = ssb_device_resume,
41 .uevent = ssb_device_uevent,
42 + .dev_attrs = ssb_device_attrs,
45 static void ssb_buses_lock(void)