aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-2.6.37/950-sbb-sysfs-files.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2010-11-27 22:47:11 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2010-11-27 22:47:11 +0000
commitfb27da9487421f7e008c6ddb59fb23122dcc51c5 (patch)
tree9a288522a688a655ab4963eb9c1d27b68994d10c /target/linux/brcm47xx/patches-2.6.37/950-sbb-sysfs-files.patch
parentb54002aa8ec6b3c4cc980179d0cf8b0e828d4efa (diff)
downloadupstream-fb27da9487421f7e008c6ddb59fb23122dcc51c5.tar.gz
upstream-fb27da9487421f7e008c6ddb59fb23122dcc51c5.tar.bz2
upstream-fb27da9487421f7e008c6ddb59fb23122dcc51c5.zip
brcm47xx: reorder patches like they were commitet upstream
SVN-Revision: 24162
Diffstat (limited to 'target/linux/brcm47xx/patches-2.6.37/950-sbb-sysfs-files.patch')
-rw-r--r--target/linux/brcm47xx/patches-2.6.37/950-sbb-sysfs-files.patch31
1 files changed, 24 insertions, 7 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.37/950-sbb-sysfs-files.patch b/target/linux/brcm47xx/patches-2.6.37/950-sbb-sysfs-files.patch
index 304865beaa..8bf092c086 100644
--- a/target/linux/brcm47xx/patches-2.6.37/950-sbb-sysfs-files.patch
+++ b/target/linux/brcm47xx/patches-2.6.37/950-sbb-sysfs-files.patch
@@ -1,14 +1,30 @@
+From 3cfa0a9d4b4cc30ec735c5c9535ff493bae24d08 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 27 Nov 2010 18:14:23 +0100
+Subject: [PATCH] ssb: Add sysfs attributes to ssb devices
+
+Make it possible to read out the attributes, till now only show on
+dmesg, through sysfs.
+
+This patch was some time in OpenWrt.
+
+Signed-off-by: Bernhard Loos <bernhardloos@googlemail.com>
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ drivers/ssb/main.c | 30 ++++++++++++++++++++++++++++++
+ 1 files changed, 30 insertions(+), 0 deletions(-)
+
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
-@@ -383,6 +383,34 @@ static int ssb_device_uevent(struct devi
+@@ -383,6 +383,35 @@ static int ssb_device_uevent(struct devi
ssb_dev->id.revision);
}
-+#define ssb_config_attr(attrib, field, format_string) \
-+static ssize_t \
++#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); \
++{ \
++ return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field); \
+}
+
+ssb_config_attr(core_num, core_index, "%u\n")
@@ -19,7 +35,8 @@
+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));
++ return sprintf(buf, "%s\n",
++ ssb_core_name(dev_to_ssb_dev(dev)->id.coreid));
+}
+
+static struct device_attribute ssb_device_attrs[] = {
@@ -35,7 +52,7 @@
static struct bus_type ssb_bustype = {
.name = "ssb",
.match = ssb_bus_match,
-@@ -392,6 +420,7 @@ static struct bus_type ssb_bustype = {
+@@ -392,6 +421,7 @@ static struct bus_type ssb_bustype = {
.suspend = ssb_device_suspend,
.resume = ssb_device_resume,
.uevent = ssb_device_uevent,