Commit f8c7e6c2 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  Revert "sysdev: fix prototype for memory_sysdev_class show/store functions"
  driver-core: fix devtmpfs crash on s390
parents c9140487 bd796671
...@@ -354,6 +354,7 @@ int __init devtmpfs_init(void) ...@@ -354,6 +354,7 @@ int __init devtmpfs_init(void)
{ {
int err; int err;
struct vfsmount *mnt; struct vfsmount *mnt;
char options[] = "mode=0755";
err = register_filesystem(&dev_fs_type); err = register_filesystem(&dev_fs_type);
if (err) { if (err) {
...@@ -362,7 +363,7 @@ int __init devtmpfs_init(void) ...@@ -362,7 +363,7 @@ int __init devtmpfs_init(void)
return err; return err;
} }
mnt = kern_mount_data(&dev_fs_type, "mode=0755"); mnt = kern_mount_data(&dev_fs_type, options);
if (IS_ERR(mnt)) { if (IS_ERR(mnt)) {
err = PTR_ERR(mnt); err = PTR_ERR(mnt);
printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n", err); printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n", err);
......
...@@ -309,19 +309,17 @@ static SYSDEV_ATTR(removable, 0444, show_mem_removable, NULL); ...@@ -309,19 +309,17 @@ static SYSDEV_ATTR(removable, 0444, show_mem_removable, NULL);
* Block size attribute stuff * Block size attribute stuff
*/ */
static ssize_t static ssize_t
print_block_size(struct sysdev_class *class, print_block_size(struct class *class, char *buf)
struct sysdev_class_attribute *class_attr,
char *buf)
{ {
return sprintf(buf, "%#lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE); return sprintf(buf, "%#lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE);
} }
static SYSDEV_CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL); static CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL);
static int block_size_init(void) static int block_size_init(void)
{ {
return sysfs_create_file(&memory_sysdev_class.kset.kobj, return sysfs_create_file(&memory_sysdev_class.kset.kobj,
&attr_block_size_bytes.attr); &class_attr_block_size_bytes.attr);
} }
/* /*
...@@ -332,9 +330,7 @@ static int block_size_init(void) ...@@ -332,9 +330,7 @@ static int block_size_init(void)
*/ */
#ifdef CONFIG_ARCH_MEMORY_PROBE #ifdef CONFIG_ARCH_MEMORY_PROBE
static ssize_t static ssize_t
memory_probe_store(struct sysdev_class *class, memory_probe_store(struct class *class, const char *buf, size_t count)
struct sysdev_class_attribute *class_attr,
const char *buf, size_t count)
{ {
u64 phys_addr; u64 phys_addr;
int nid; int nid;
...@@ -350,12 +346,12 @@ memory_probe_store(struct sysdev_class *class, ...@@ -350,12 +346,12 @@ memory_probe_store(struct sysdev_class *class,
return count; return count;
} }
static SYSDEV_CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store); static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store);
static int memory_probe_init(void) static int memory_probe_init(void)
{ {
return sysfs_create_file(&memory_sysdev_class.kset.kobj, return sysfs_create_file(&memory_sysdev_class.kset.kobj,
&attr_probe.attr); &class_attr_probe.attr);
} }
#else #else
static inline int memory_probe_init(void) static inline int memory_probe_init(void)
...@@ -371,9 +367,7 @@ static inline int memory_probe_init(void) ...@@ -371,9 +367,7 @@ static inline int memory_probe_init(void)
/* Soft offline a page */ /* Soft offline a page */
static ssize_t static ssize_t
store_soft_offline_page(struct sysdev_class *class, store_soft_offline_page(struct class *class, const char *buf, size_t count)
struct sysdev_class_attribute *class_attr,
const char *buf, size_t count)
{ {
int ret; int ret;
u64 pfn; u64 pfn;
...@@ -390,9 +384,7 @@ store_soft_offline_page(struct sysdev_class *class, ...@@ -390,9 +384,7 @@ store_soft_offline_page(struct sysdev_class *class,
/* Forcibly offline a page, including killing processes. */ /* Forcibly offline a page, including killing processes. */
static ssize_t static ssize_t
store_hard_offline_page(struct sysdev_class *class, store_hard_offline_page(struct class *class, const char *buf, size_t count)
struct sysdev_class_attribute *class_attr,
const char *buf, size_t count)
{ {
int ret; int ret;
u64 pfn; u64 pfn;
...@@ -405,18 +397,18 @@ store_hard_offline_page(struct sysdev_class *class, ...@@ -405,18 +397,18 @@ store_hard_offline_page(struct sysdev_class *class,
return ret ? ret : count; return ret ? ret : count;
} }
static SYSDEV_CLASS_ATTR(soft_offline_page, 0644, NULL, store_soft_offline_page); static CLASS_ATTR(soft_offline_page, 0644, NULL, store_soft_offline_page);
static SYSDEV_CLASS_ATTR(hard_offline_page, 0644, NULL, store_hard_offline_page); static CLASS_ATTR(hard_offline_page, 0644, NULL, store_hard_offline_page);
static __init int memory_fail_init(void) static __init int memory_fail_init(void)
{ {
int err; int err;
err = sysfs_create_file(&memory_sysdev_class.kset.kobj, err = sysfs_create_file(&memory_sysdev_class.kset.kobj,
&attr_soft_offline_page.attr); &class_attr_soft_offline_page.attr);
if (!err) if (!err)
err = sysfs_create_file(&memory_sysdev_class.kset.kobj, err = sysfs_create_file(&memory_sysdev_class.kset.kobj,
&attr_hard_offline_page.attr); &class_attr_hard_offline_page.attr);
return err; return err;
} }
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment