[mmotm] adapt drivers/base/topology.c to new sysfs API

From: KOSAKI Motohiro
Date: Mon Jul 14 2008 - 07:06:21 EST



Patch title: fix-driver-topology-type-incompatible.patch
Against: mmotm Jul 14
Applies after: linux-next.patch

if arch_provides_topology_pointers is not defined, topology.c output following warnings.
because sysfs function parameter was changed recently.

drivers/base/topology.c:106: warning: initialization from incompatible pointer type
drivers/base/topology.c:107: warning: initialization from incompatible pointer type
drivers/base/topology.c:110: warning: initialization from incompatible pointer type
drivers/base/topology.c:111: warning: initialization from incompatible pointer type


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
CC: Mike Travis <travis@xxxxxxx>
CC: Ingo Molnar <mingo@xxxxxxx>
CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CC: Andi Kleen <ak@xxxxxxxxxxxxxxx>
CC: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/base/topology.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Index: b/drivers/base/topology.c
===================================================================
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -77,7 +77,8 @@ static ssize_t show_##name##_list(struct

#else
#define define_siblings_show_map(name) \
-static ssize_t show_##name(struct sys_device *dev, char *buf) \
+static ssize_t show_##name(struct sys_device *dev, \
+ struct sysdev_attribute *attr, char *buf) \
{ \
unsigned int cpu = dev->id; \
cpumask_t mask = topology_##name(cpu); \
@@ -85,7 +86,8 @@ static ssize_t show_##name(struct sys_de
}

#define define_siblings_show_list(name) \
-static ssize_t show_##name##_list(struct sys_device *dev, char *buf) \
+static ssize_t show_##name##_list(struct sys_device *dev, \
+ struct sysdev_attribute *attr, char *buf) \
{ \
unsigned int cpu = dev->id; \
cpumask_t mask = topology_##name(cpu); \



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/