Thread (19 messages) 19 messages, 5 authors, 2009-09-17

[PATCH 3/5] Export memory_sysdev_class

STALE6227d

From: Nathan Fontenot <hidden>
Date: 2009-09-11 21:13:24
Also in: lkml

Revision v1 of 4 in this series.

Revisions (4)
  1. v1 current
  2. v2 [diff vs current]
  3. v5 [diff vs current]
  4. v2 [diff vs current]
Export the memory_sysdev_class structure.  This is needed so we can create
a 'release' file in sysfs in addition to the existing 'probe' file in
order to support DLPAR removal of memory on the powerpc/pseries platform.
The new 'release' file will be powerpc/pseries only.

Signed-off-by: Nathan Fontenot <redacted>
---

Index: powerpc/drivers/base/memory.c
===================================================================
--- powerpc.orig/drivers/base/memory.c	2009-09-11 12:43:40.000000000 -0500
+++ powerpc/drivers/base/memory.c	2009-09-11 12:52:26.000000000 -0500
@@ -28,9 +28,10 @@
#define MEMORY_CLASS_NAME	"memory"

-static struct sysdev_class memory_sysdev_class = {
+struct sysdev_class memory_sysdev_class = {
	.name = MEMORY_CLASS_NAME,
};
+EXPORT_SYMBOL(memory_sysdev_class);

static const char *memory_uevent_name(struct kset *kset, struct kobject *kobj)
{
Index: powerpc/include/linux/memory_hotplug.h
===================================================================
--- powerpc.orig/include/linux/memory_hotplug.h	2009-09-11 12:43:44.000000000 -0500
+++ powerpc/include/linux/memory_hotplug.h	2009-09-11 12:52:26.000000000 -0500
@@ -12,6 +12,8 @@
#ifdef CONFIG_MEMORY_HOTPLUG

+extern struct sysdev_class memory_sysdev_class;
+
/*
 * Types for free bootmem.
 * The normal smallest mapcount is -1. Here is smaller value than it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help