diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 21:44:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 21:44:12 -0500 |
commit | db9edfd7e339ca4113153d887e782dd05be5a9eb (patch) | |
tree | 0a4ba12447a0cabc800adc7e9667d284777b0181 /block/genhd.c | |
parent | 631b034724364b413e8a52e7c2e03a9d77e4c2b4 (diff) | |
parent | fd586bacf439f36dea9b9bf6e6133ac87df2730c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Trivial manual merge fixup for usb_find_interface clashes.
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/block/genhd.c b/block/genhd.c index f04609d553b..f1ed83f3f08 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -358,7 +358,7 @@ static struct sysfs_ops disk_sysfs_ops = { | |||
358 | static ssize_t disk_uevent_store(struct gendisk * disk, | 358 | static ssize_t disk_uevent_store(struct gendisk * disk, |
359 | const char *buf, size_t count) | 359 | const char *buf, size_t count) |
360 | { | 360 | { |
361 | kobject_hotplug(&disk->kobj, KOBJ_ADD); | 361 | kobject_uevent(&disk->kobj, KOBJ_ADD); |
362 | return count; | 362 | return count; |
363 | } | 363 | } |
364 | static ssize_t disk_dev_read(struct gendisk * disk, char *page) | 364 | static ssize_t disk_dev_read(struct gendisk * disk, char *page) |
@@ -455,14 +455,14 @@ static struct kobj_type ktype_block = { | |||
455 | 455 | ||
456 | extern struct kobj_type ktype_part; | 456 | extern struct kobj_type ktype_part; |
457 | 457 | ||
458 | static int block_hotplug_filter(struct kset *kset, struct kobject *kobj) | 458 | static int block_uevent_filter(struct kset *kset, struct kobject *kobj) |
459 | { | 459 | { |
460 | struct kobj_type *ktype = get_ktype(kobj); | 460 | struct kobj_type *ktype = get_ktype(kobj); |
461 | 461 | ||
462 | return ((ktype == &ktype_block) || (ktype == &ktype_part)); | 462 | return ((ktype == &ktype_block) || (ktype == &ktype_part)); |
463 | } | 463 | } |
464 | 464 | ||
465 | static int block_hotplug(struct kset *kset, struct kobject *kobj, char **envp, | 465 | static int block_uevent(struct kset *kset, struct kobject *kobj, char **envp, |
466 | int num_envp, char *buffer, int buffer_size) | 466 | int num_envp, char *buffer, int buffer_size) |
467 | { | 467 | { |
468 | struct kobj_type *ktype = get_ktype(kobj); | 468 | struct kobj_type *ktype = get_ktype(kobj); |
@@ -474,40 +474,40 @@ static int block_hotplug(struct kset *kset, struct kobject *kobj, char **envp, | |||
474 | 474 | ||
475 | if (ktype == &ktype_block) { | 475 | if (ktype == &ktype_block) { |
476 | disk = container_of(kobj, struct gendisk, kobj); | 476 | disk = container_of(kobj, struct gendisk, kobj); |
477 | add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, | 477 | add_uevent_var(envp, num_envp, &i, buffer, buffer_size, |
478 | &length, "MINOR=%u", disk->first_minor); | 478 | &length, "MINOR=%u", disk->first_minor); |
479 | } else if (ktype == &ktype_part) { | 479 | } else if (ktype == &ktype_part) { |
480 | disk = container_of(kobj->parent, struct gendisk, kobj); | 480 | disk = container_of(kobj->parent, struct gendisk, kobj); |
481 | part = container_of(kobj, struct hd_struct, kobj); | 481 | part = container_of(kobj, struct hd_struct, kobj); |
482 | add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, | 482 | add_uevent_var(envp, num_envp, &i, buffer, buffer_size, |
483 | &length, "MINOR=%u", | 483 | &length, "MINOR=%u", |
484 | disk->first_minor + part->partno); | 484 | disk->first_minor + part->partno); |
485 | } else | 485 | } else |
486 | return 0; | 486 | return 0; |
487 | 487 | ||
488 | add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, | 488 | add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length, |
489 | "MAJOR=%u", disk->major); | 489 | "MAJOR=%u", disk->major); |
490 | 490 | ||
491 | /* add physical device, backing this device */ | 491 | /* add physical device, backing this device */ |
492 | physdev = disk->driverfs_dev; | 492 | physdev = disk->driverfs_dev; |
493 | if (physdev) { | 493 | if (physdev) { |
494 | char *path = kobject_get_path(&physdev->kobj, GFP_KERNEL); | 494 | char *path = kobject_get_path(&physdev->kobj, GFP_KERNEL); |
495 | 495 | ||
496 | add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, | 496 | add_uevent_var(envp, num_envp, &i, buffer, buffer_size, |
497 | &length, "PHYSDEVPATH=%s", path); | 497 | &length, "PHYSDEVPATH=%s", path); |
498 | kfree(path); | 498 | kfree(path); |
499 | 499 | ||
500 | if (physdev->bus) | 500 | if (physdev->bus) |
501 | add_hotplug_env_var(envp, num_envp, &i, | 501 | add_uevent_var(envp, num_envp, &i, |
502 | buffer, buffer_size, &length, | 502 | buffer, buffer_size, &length, |
503 | "PHYSDEVBUS=%s", | 503 | "PHYSDEVBUS=%s", |
504 | physdev->bus->name); | 504 | physdev->bus->name); |
505 | 505 | ||
506 | if (physdev->driver) | 506 | if (physdev->driver) |
507 | add_hotplug_env_var(envp, num_envp, &i, | 507 | add_uevent_var(envp, num_envp, &i, |
508 | buffer, buffer_size, &length, | 508 | buffer, buffer_size, &length, |
509 | "PHYSDEVDRIVER=%s", | 509 | "PHYSDEVDRIVER=%s", |
510 | physdev->driver->name); | 510 | physdev->driver->name); |
511 | } | 511 | } |
512 | 512 | ||
513 | /* terminate, set to next free slot, shrink available space */ | 513 | /* terminate, set to next free slot, shrink available space */ |
@@ -520,13 +520,13 @@ static int block_hotplug(struct kset *kset, struct kobject *kobj, char **envp, | |||
520 | return 0; | 520 | return 0; |
521 | } | 521 | } |
522 | 522 | ||
523 | static struct kset_hotplug_ops block_hotplug_ops = { | 523 | static struct kset_uevent_ops block_uevent_ops = { |
524 | .filter = block_hotplug_filter, | 524 | .filter = block_uevent_filter, |
525 | .hotplug = block_hotplug, | 525 | .uevent = block_uevent, |
526 | }; | 526 | }; |
527 | 527 | ||
528 | /* declare block_subsys. */ | 528 | /* declare block_subsys. */ |
529 | static decl_subsys(block, &ktype_block, &block_hotplug_ops); | 529 | static decl_subsys(block, &ktype_block, &block_uevent_ops); |
530 | 530 | ||
531 | 531 | ||
532 | /* | 532 | /* |