diff options
author | Alexandros C. Couloumbis <alex@ozo.com> | 2010-06-08 16:58:06 +0000 |
---|---|---|
committer | Alexandros C. Couloumbis <alex@ozo.com> | 2010-06-08 16:58:06 +0000 |
commit | cfa9a1f6d6874f3cd1601e15664281c5184ce8ea (patch) | |
tree | 35ec283e7509baa64df1198dc1daef4a8d88e482 /target/linux/brcm47xx/patches-2.6.35/950-sbb-sysfs-files.patch | |
parent | ce6b70119c97a254277a07a169501018fb7c3805 (diff) | |
download | upstream-cfa9a1f6d6874f3cd1601e15664281c5184ce8ea.tar.gz upstream-cfa9a1f6d6874f3cd1601e15664281c5184ce8ea.tar.bz2 upstream-cfa9a1f6d6874f3cd1601e15664281c5184ce8ea.zip |
brcm47xx: add kernel 2.6.35 preliminary support
SVN-Revision: 21707
Diffstat (limited to 'target/linux/brcm47xx/patches-2.6.35/950-sbb-sysfs-files.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-2.6.35/950-sbb-sysfs-files.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.35/950-sbb-sysfs-files.patch b/target/linux/brcm47xx/patches-2.6.35/950-sbb-sysfs-files.patch new file mode 100644 index 0000000000..ddb1f1b383 --- /dev/null +++ b/target/linux/brcm47xx/patches-2.6.35/950-sbb-sysfs-files.patch @@ -0,0 +1,45 @@ +--- a/drivers/ssb/main.c ++++ b/drivers/ssb/main.c +@@ -385,6 +385,34 @@ static int ssb_device_uevent(struct devi + ssb_dev->id.revision); + } + ++#define ssb_config_attr(attrib, field, format_string) \ ++static ssize_t \ ++attrib##_show(struct device *dev, struct device_attribute *attr, char *buf) \ ++{ \ ++ return sprintf (buf, format_string, dev_to_ssb_dev(dev)->field); \ ++} ++ ++ssb_config_attr(core_num, core_index, "%u\n") ++ssb_config_attr(coreid, id.coreid, "0x%04x\n") ++ssb_config_attr(vendor, id.vendor, "0x%04x\n") ++ssb_config_attr(revision, id.revision, "%u\n") ++ssb_config_attr(irq, irq, "%u\n") ++static ssize_t ++name_show(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ return sprintf (buf, "%s\n", ssb_core_name(dev_to_ssb_dev(dev)->id.coreid)); ++} ++ ++static struct device_attribute ssb_device_attrs[] = { ++ __ATTR_RO(name), ++ __ATTR_RO(core_num), ++ __ATTR_RO(coreid), ++ __ATTR_RO(vendor), ++ __ATTR_RO(revision), ++ __ATTR_RO(irq), ++ __ATTR_NULL, ++}; ++ + static struct bus_type ssb_bustype = { + .name = "ssb", + .match = ssb_bus_match, +@@ -394,6 +422,7 @@ static struct bus_type ssb_bustype = { + .suspend = ssb_device_suspend, + .resume = ssb_device_resume, + .uevent = ssb_device_uevent, ++ .dev_attrs = ssb_device_attrs, + }; + + static void ssb_buses_lock(void) |