aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/memory.c')
-rw-r--r--drivers/base/memory.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index b7ddd651d664..58801d718cc2 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -28,14 +28,13 @@
28static struct sysdev_class memory_sysdev_class = { 28static struct sysdev_class memory_sysdev_class = {
29 set_kset_name(MEMORY_CLASS_NAME), 29 set_kset_name(MEMORY_CLASS_NAME),
30}; 30};
31EXPORT_SYMBOL(memory_sysdev_class);
32 31
33static char *memory_hotplug_name(struct kset *kset, struct kobject *kobj) 32static const char *memory_uevent_name(struct kset *kset, struct kobject *kobj)
34{ 33{
35 return MEMORY_CLASS_NAME; 34 return MEMORY_CLASS_NAME;
36} 35}
37 36
38static int memory_hotplug(struct kset *kset, struct kobject *kobj, char **envp, 37static int memory_uevent(struct kset *kset, struct kobject *kobj, char **envp,
39 int num_envp, char *buffer, int buffer_size) 38 int num_envp, char *buffer, int buffer_size)
40{ 39{
41 int retval = 0; 40 int retval = 0;
@@ -43,19 +42,19 @@ static int memory_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
43 return retval; 42 return retval;
44} 43}
45 44
46static struct kset_hotplug_ops memory_hotplug_ops = { 45static struct kset_uevent_ops memory_uevent_ops = {
47 .name = memory_hotplug_name, 46 .name = memory_uevent_name,
48 .hotplug = memory_hotplug, 47 .uevent = memory_uevent,
49}; 48};
50 49
51static struct notifier_block *memory_chain; 50static struct notifier_block *memory_chain;
52 51
53static int register_memory_notifier(struct notifier_block *nb) 52int register_memory_notifier(struct notifier_block *nb)
54{ 53{
55 return notifier_chain_register(&memory_chain, nb); 54 return notifier_chain_register(&memory_chain, nb);
56} 55}
57 56
58static void unregister_memory_notifier(struct notifier_block *nb) 57void unregister_memory_notifier(struct notifier_block *nb)
59{ 58{
60 notifier_chain_unregister(&memory_chain, nb); 59 notifier_chain_unregister(&memory_chain, nb);
61} 60}
@@ -63,8 +62,7 @@ static void unregister_memory_notifier(struct notifier_block *nb)
63/* 62/*
64 * register_memory - Setup a sysfs device for a memory block 63 * register_memory - Setup a sysfs device for a memory block
65 */ 64 */
66static int 65int register_memory(struct memory_block *memory, struct mem_section *section,
67register_memory(struct memory_block *memory, struct mem_section *section,
68 struct node *root) 66 struct node *root)
69{ 67{
70 int error; 68 int error;
@@ -432,7 +430,7 @@ int __init memory_dev_init(void)
432 unsigned int i; 430 unsigned int i;
433 int ret; 431 int ret;
434 432
435 memory_sysdev_class.kset.hotplug_ops = &memory_hotplug_ops; 433 memory_sysdev_class.kset.uevent_ops = &memory_uevent_ops;
436 ret = sysdev_class_register(&memory_sysdev_class); 434 ret = sysdev_class_register(&memory_sysdev_class);
437 435
438 /* 436 /*