Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+14 -21
+2 -1
drivers/base/devtmpfs.c
··· 354 354 { 355 355 int err; 356 356 struct vfsmount *mnt; 357 + char options[] = "mode=0755"; 357 358 358 359 err = register_filesystem(&dev_fs_type); 359 360 if (err) { ··· 363 362 return err; 364 363 } 365 364 366 - mnt = kern_mount_data(&dev_fs_type, "mode=0755"); 365 + mnt = kern_mount_data(&dev_fs_type, options); 367 366 if (IS_ERR(mnt)) { 368 367 err = PTR_ERR(mnt); 369 368 printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n", err);
+12 -20
drivers/base/memory.c
··· 309 309 * Block size attribute stuff 310 310 */ 311 311 static ssize_t 312 - print_block_size(struct sysdev_class *class, 313 - struct sysdev_class_attribute *class_attr, 314 - char *buf) 312 + print_block_size(struct class *class, char *buf) 315 313 { 316 314 return sprintf(buf, "%#lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE); 317 315 } 318 316 319 - static SYSDEV_CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL); 317 + static CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL); 320 318 321 319 static int block_size_init(void) 322 320 { 323 321 return sysfs_create_file(&memory_sysdev_class.kset.kobj, 324 - &attr_block_size_bytes.attr); 322 + &class_attr_block_size_bytes.attr); 325 323 } 326 324 327 325 /* ··· 330 332 */ 331 333 #ifdef CONFIG_ARCH_MEMORY_PROBE 332 334 static ssize_t 333 - memory_probe_store(struct sysdev_class *class, 334 - struct sysdev_class_attribute *class_attr, 335 - const char *buf, size_t count) 335 + memory_probe_store(struct class *class, const char *buf, size_t count) 336 336 { 337 337 u64 phys_addr; 338 338 int nid; ··· 346 350 347 351 return count; 348 352 } 349 - static SYSDEV_CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store); 353 + static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store); 350 354 351 355 static int memory_probe_init(void) 352 356 { 353 357 return sysfs_create_file(&memory_sysdev_class.kset.kobj, 354 - &attr_probe.attr); 358 + &class_attr_probe.attr); 355 359 } 356 360 #else 357 361 static inline int memory_probe_init(void) ··· 367 371 368 372 /* Soft offline a page */ 369 373 static ssize_t 370 - store_soft_offline_page(struct sysdev_class *class, 371 - struct sysdev_class_attribute *class_attr, 372 - const char *buf, size_t count) 374 + store_soft_offline_page(struct class *class, const char *buf, size_t count) 373 375 { 374 376 int ret; 375 377 u64 pfn; ··· 384 390 385 391 /* Forcibly offline a page, including killing processes. */ 386 392 static ssize_t 387 - store_hard_offline_page(struct sysdev_class *class, 388 - struct sysdev_class_attribute *class_attr, 389 - const char *buf, size_t count) 393 + store_hard_offline_page(struct class *class, const char *buf, size_t count) 390 394 { 391 395 int ret; 392 396 u64 pfn; ··· 397 405 return ret ? ret : count; 398 406 } 399 407 400 - static SYSDEV_CLASS_ATTR(soft_offline_page, 0644, NULL, store_soft_offline_page); 401 - static SYSDEV_CLASS_ATTR(hard_offline_page, 0644, NULL, store_hard_offline_page); 408 + static CLASS_ATTR(soft_offline_page, 0644, NULL, store_soft_offline_page); 409 + static CLASS_ATTR(hard_offline_page, 0644, NULL, store_hard_offline_page); 402 410 403 411 static __init int memory_fail_init(void) 404 412 { 405 413 int err; 406 414 407 415 err = sysfs_create_file(&memory_sysdev_class.kset.kobj, 408 - &attr_soft_offline_page.attr); 416 + &class_attr_soft_offline_page.attr); 409 417 if (!err) 410 418 err = sysfs_create_file(&memory_sysdev_class.kset.kobj, 411 - &attr_hard_offline_page.attr); 419 + &class_attr_hard_offline_page.attr); 412 420 return err; 413 421 } 414 422 #else