aboutsummaryrefslogtreecommitdiffstats
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-12-21 17:48:43 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-21 17:48:43 -0500
commit10fbcf4c6cb122005cdf36fc24d7683da92c7a27 (patch)
tree1a2ad572b421d576e14dbf006ecb321a53063f0c /mm/compaction.c
parent8a25a2fd126c621f44f3aeaef80d51f00fc11639 (diff)
convert 'memory' sysdev_class to a regular subsystem
This moves the 'memory sysdev_class' over to a regular 'memory' subsystem and converts the devices to regular devices. The sysdev drivers are implemented as subsystem interfaces now. After all sysdev classes are ported to regular driver core entities, the sysdev implementation will be entirely removed from the kernel. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 899d95638586..1253d7ac332b 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -721,23 +721,23 @@ int sysctl_extfrag_handler(struct ctl_table *table, int write,
721} 721}
722 722
723#if defined(CONFIG_SYSFS) && defined(CONFIG_NUMA) 723#if defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
724ssize_t sysfs_compact_node(struct sys_device *dev, 724ssize_t sysfs_compact_node(struct device *dev,
725 struct sysdev_attribute *attr, 725 struct device_attribute *attr,
726 const char *buf, size_t count) 726 const char *buf, size_t count)
727{ 727{
728 compact_node(dev->id); 728 compact_node(dev->id);
729 729
730 return count; 730 return count;
731} 731}
732static SYSDEV_ATTR(compact, S_IWUSR, NULL, sysfs_compact_node); 732static DEVICE_ATTR(compact, S_IWUSR, NULL, sysfs_compact_node);
733 733
734int compaction_register_node(struct node *node) 734int compaction_register_node(struct node *node)
735{ 735{
736 return sysdev_create_file(&node->sysdev, &attr_compact); 736 return device_create_file(&node->dev, &dev_attr_compact);
737} 737}
738 738
739void compaction_unregister_node(struct node *node) 739void compaction_unregister_node(struct node *node)
740{ 740{
741 return sysdev_remove_file(&node->sysdev, &attr_compact); 741 return device_remove_file(&node->dev, &dev_attr_compact);
742} 742}
743#endif /* CONFIG_SYSFS && CONFIG_NUMA */ 743#endif /* CONFIG_SYSFS && CONFIG_NUMA */