aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-20 19:00:33 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-20 19:00:33 -0400
commit1d345dac1f30af1cd9f3a1faa12f9f18f17f236e (patch)
tree42a7deda7589edf704fe60dc262046755bd3f6a8 /drivers/block
parentfb395884576684ebb54b19b1054f4caed589d5f0 (diff)
parent87c8a4433b608261a9becdb0ce2d2f2ed4b71d05 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/aoe/aoechr.c10
-rw-r--r--drivers/block/as-iosched.c4
-rw-r--r--drivers/block/cfq-iosched.c4
-rw-r--r--drivers/block/deadline-iosched.c4
-rw-r--r--drivers/block/genhd.c2
-rw-r--r--drivers/block/ll_rw_blk.c4
-rw-r--r--drivers/block/paride/pg.c14
-rw-r--r--drivers/block/paride/pt.c20
-rw-r--r--drivers/block/ub.c2
9 files changed, 32 insertions, 32 deletions
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
index 14aeca3e2e8c..45a243096187 100644
--- a/drivers/block/aoe/aoechr.c
+++ b/drivers/block/aoe/aoechr.c
@@ -36,7 +36,7 @@ static int emsgs_head_idx, emsgs_tail_idx;
36static struct semaphore emsgs_sema; 36static struct semaphore emsgs_sema;
37static spinlock_t emsgs_lock; 37static spinlock_t emsgs_lock;
38static int nblocked_emsgs_readers; 38static int nblocked_emsgs_readers;
39static struct class_simple *aoe_class; 39static struct class *aoe_class;
40static struct aoe_chardev chardevs[] = { 40static struct aoe_chardev chardevs[] = {
41 { MINOR_ERR, "err" }, 41 { MINOR_ERR, "err" },
42 { MINOR_DISCOVER, "discover" }, 42 { MINOR_DISCOVER, "discover" },
@@ -218,13 +218,13 @@ aoechr_init(void)
218 } 218 }
219 sema_init(&emsgs_sema, 0); 219 sema_init(&emsgs_sema, 0);
220 spin_lock_init(&emsgs_lock); 220 spin_lock_init(&emsgs_lock);
221 aoe_class = class_simple_create(THIS_MODULE, "aoe"); 221 aoe_class = class_create(THIS_MODULE, "aoe");
222 if (IS_ERR(aoe_class)) { 222 if (IS_ERR(aoe_class)) {
223 unregister_chrdev(AOE_MAJOR, "aoechr"); 223 unregister_chrdev(AOE_MAJOR, "aoechr");
224 return PTR_ERR(aoe_class); 224 return PTR_ERR(aoe_class);
225 } 225 }
226 for (i = 0; i < ARRAY_SIZE(chardevs); ++i) 226 for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
227 class_simple_device_add(aoe_class, 227 class_device_create(aoe_class,
228 MKDEV(AOE_MAJOR, chardevs[i].minor), 228 MKDEV(AOE_MAJOR, chardevs[i].minor),
229 NULL, chardevs[i].name); 229 NULL, chardevs[i].name);
230 230
@@ -237,8 +237,8 @@ aoechr_exit(void)
237 int i; 237 int i;
238 238
239 for (i = 0; i < ARRAY_SIZE(chardevs); ++i) 239 for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
240 class_simple_device_remove(MKDEV(AOE_MAJOR, chardevs[i].minor)); 240 class_device_destroy(aoe_class, MKDEV(AOE_MAJOR, chardevs[i].minor));
241 class_simple_destroy(aoe_class); 241 class_destroy(aoe_class);
242 unregister_chrdev(AOE_MAJOR, "aoechr"); 242 unregister_chrdev(AOE_MAJOR, "aoechr");
243} 243}
244 244
diff --git a/drivers/block/as-iosched.c b/drivers/block/as-iosched.c
index a9575bb58a5e..638db06de2be 100644
--- a/drivers/block/as-iosched.c
+++ b/drivers/block/as-iosched.c
@@ -2044,7 +2044,7 @@ as_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
2044 struct as_fs_entry *entry = to_as(attr); 2044 struct as_fs_entry *entry = to_as(attr);
2045 2045
2046 if (!entry->show) 2046 if (!entry->show)
2047 return 0; 2047 return -EIO;
2048 2048
2049 return entry->show(e->elevator_data, page); 2049 return entry->show(e->elevator_data, page);
2050} 2050}
@@ -2057,7 +2057,7 @@ as_attr_store(struct kobject *kobj, struct attribute *attr,
2057 struct as_fs_entry *entry = to_as(attr); 2057 struct as_fs_entry *entry = to_as(attr);
2058 2058
2059 if (!entry->store) 2059 if (!entry->store)
2060 return -EINVAL; 2060 return -EIO;
2061 2061
2062 return entry->store(e->elevator_data, page, length); 2062 return entry->store(e->elevator_data, page, length);
2063} 2063}
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c
index 2210bacad56a..3ac47dde64da 100644
--- a/drivers/block/cfq-iosched.c
+++ b/drivers/block/cfq-iosched.c
@@ -1775,7 +1775,7 @@ cfq_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
1775 struct cfq_fs_entry *entry = to_cfq(attr); 1775 struct cfq_fs_entry *entry = to_cfq(attr);
1776 1776
1777 if (!entry->show) 1777 if (!entry->show)
1778 return 0; 1778 return -EIO;
1779 1779
1780 return entry->show(e->elevator_data, page); 1780 return entry->show(e->elevator_data, page);
1781} 1781}
@@ -1788,7 +1788,7 @@ cfq_attr_store(struct kobject *kobj, struct attribute *attr,
1788 struct cfq_fs_entry *entry = to_cfq(attr); 1788 struct cfq_fs_entry *entry = to_cfq(attr);
1789 1789
1790 if (!entry->store) 1790 if (!entry->store)
1791 return -EINVAL; 1791 return -EIO;
1792 1792
1793 return entry->store(e->elevator_data, page, length); 1793 return entry->store(e->elevator_data, page, length);
1794} 1794}
diff --git a/drivers/block/deadline-iosched.c b/drivers/block/deadline-iosched.c
index d63d34c671f7..7f79f3dd0165 100644
--- a/drivers/block/deadline-iosched.c
+++ b/drivers/block/deadline-iosched.c
@@ -886,7 +886,7 @@ deadline_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
886 struct deadline_fs_entry *entry = to_deadline(attr); 886 struct deadline_fs_entry *entry = to_deadline(attr);
887 887
888 if (!entry->show) 888 if (!entry->show)
889 return 0; 889 return -EIO;
890 890
891 return entry->show(e->elevator_data, page); 891 return entry->show(e->elevator_data, page);
892} 892}
@@ -899,7 +899,7 @@ deadline_attr_store(struct kobject *kobj, struct attribute *attr,
899 struct deadline_fs_entry *entry = to_deadline(attr); 899 struct deadline_fs_entry *entry = to_deadline(attr);
900 900
901 if (!entry->store) 901 if (!entry->store)
902 return -EINVAL; 902 return -EIO;
903 903
904 return entry->store(e->elevator_data, page, length); 904 return entry->store(e->elevator_data, page, length);
905} 905}
diff --git a/drivers/block/genhd.c b/drivers/block/genhd.c
index 8bbe01d4b487..53f7d846b747 100644
--- a/drivers/block/genhd.c
+++ b/drivers/block/genhd.c
@@ -322,7 +322,7 @@ static ssize_t disk_attr_show(struct kobject *kobj, struct attribute *attr,
322 struct gendisk *disk = to_disk(kobj); 322 struct gendisk *disk = to_disk(kobj);
323 struct disk_attribute *disk_attr = 323 struct disk_attribute *disk_attr =
324 container_of(attr,struct disk_attribute,attr); 324 container_of(attr,struct disk_attribute,attr);
325 ssize_t ret = 0; 325 ssize_t ret = -EIO;
326 326
327 if (disk_attr->show) 327 if (disk_attr->show)
328 ret = disk_attr->show(disk,page); 328 ret = disk_attr->show(disk,page);
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
index f20eba22b14b..81fe3a0c1fe7 100644
--- a/drivers/block/ll_rw_blk.c
+++ b/drivers/block/ll_rw_blk.c
@@ -3574,7 +3574,7 @@ queue_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
3574 3574
3575 q = container_of(kobj, struct request_queue, kobj); 3575 q = container_of(kobj, struct request_queue, kobj);
3576 if (!entry->show) 3576 if (!entry->show)
3577 return 0; 3577 return -EIO;
3578 3578
3579 return entry->show(q, page); 3579 return entry->show(q, page);
3580} 3580}
@@ -3588,7 +3588,7 @@ queue_attr_store(struct kobject *kobj, struct attribute *attr,
3588 3588
3589 q = container_of(kobj, struct request_queue, kobj); 3589 q = container_of(kobj, struct request_queue, kobj);
3590 if (!entry->store) 3590 if (!entry->store)
3591 return -EINVAL; 3591 return -EIO;
3592 3592
3593 return entry->store(q, page, length); 3593 return entry->store(q, page, length);
3594} 3594}
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index dbeb107bb971..84d8e291ed96 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -222,7 +222,7 @@ static int pg_identify(struct pg *dev, int log);
222 222
223static char pg_scratch[512]; /* scratch block buffer */ 223static char pg_scratch[512]; /* scratch block buffer */
224 224
225static struct class_simple *pg_class; 225static struct class *pg_class;
226 226
227/* kernel glue structures */ 227/* kernel glue structures */
228 228
@@ -666,7 +666,7 @@ static int __init pg_init(void)
666 err = -1; 666 err = -1;
667 goto out; 667 goto out;
668 } 668 }
669 pg_class = class_simple_create(THIS_MODULE, "pg"); 669 pg_class = class_create(THIS_MODULE, "pg");
670 if (IS_ERR(pg_class)) { 670 if (IS_ERR(pg_class)) {
671 err = PTR_ERR(pg_class); 671 err = PTR_ERR(pg_class);
672 goto out_chrdev; 672 goto out_chrdev;
@@ -675,7 +675,7 @@ static int __init pg_init(void)
675 for (unit = 0; unit < PG_UNITS; unit++) { 675 for (unit = 0; unit < PG_UNITS; unit++) {
676 struct pg *dev = &devices[unit]; 676 struct pg *dev = &devices[unit];
677 if (dev->present) { 677 if (dev->present) {
678 class_simple_device_add(pg_class, MKDEV(major, unit), 678 class_device_create(pg_class, MKDEV(major, unit),
679 NULL, "pg%u", unit); 679 NULL, "pg%u", unit);
680 err = devfs_mk_cdev(MKDEV(major, unit), 680 err = devfs_mk_cdev(MKDEV(major, unit),
681 S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u", 681 S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u",
@@ -688,8 +688,8 @@ static int __init pg_init(void)
688 goto out; 688 goto out;
689 689
690out_class: 690out_class:
691 class_simple_device_remove(MKDEV(major, unit)); 691 class_device_destroy(pg_class, MKDEV(major, unit));
692 class_simple_destroy(pg_class); 692 class_destroy(pg_class);
693out_chrdev: 693out_chrdev:
694 unregister_chrdev(major, "pg"); 694 unregister_chrdev(major, "pg");
695out: 695out:
@@ -703,11 +703,11 @@ static void __exit pg_exit(void)
703 for (unit = 0; unit < PG_UNITS; unit++) { 703 for (unit = 0; unit < PG_UNITS; unit++) {
704 struct pg *dev = &devices[unit]; 704 struct pg *dev = &devices[unit];
705 if (dev->present) { 705 if (dev->present) {
706 class_simple_device_remove(MKDEV(major, unit)); 706 class_device_destroy(pg_class, MKDEV(major, unit));
707 devfs_remove("pg/%u", unit); 707 devfs_remove("pg/%u", unit);
708 } 708 }
709 } 709 }
710 class_simple_destroy(pg_class); 710 class_destroy(pg_class);
711 devfs_remove("pg"); 711 devfs_remove("pg");
712 unregister_chrdev(major, name); 712 unregister_chrdev(major, name);
713 713
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index 8fbd6922fe0d..5fe8ee86f095 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -242,7 +242,7 @@ static struct file_operations pt_fops = {
242}; 242};
243 243
244/* sysfs class support */ 244/* sysfs class support */
245static struct class_simple *pt_class; 245static struct class *pt_class;
246 246
247static inline int status_reg(struct pi_adapter *pi) 247static inline int status_reg(struct pi_adapter *pi)
248{ 248{
@@ -963,7 +963,7 @@ static int __init pt_init(void)
963 err = -1; 963 err = -1;
964 goto out; 964 goto out;
965 } 965 }
966 pt_class = class_simple_create(THIS_MODULE, "pt"); 966 pt_class = class_create(THIS_MODULE, "pt");
967 if (IS_ERR(pt_class)) { 967 if (IS_ERR(pt_class)) {
968 err = PTR_ERR(pt_class); 968 err = PTR_ERR(pt_class);
969 goto out_chrdev; 969 goto out_chrdev;
@@ -972,29 +972,29 @@ static int __init pt_init(void)
972 devfs_mk_dir("pt"); 972 devfs_mk_dir("pt");
973 for (unit = 0; unit < PT_UNITS; unit++) 973 for (unit = 0; unit < PT_UNITS; unit++)
974 if (pt[unit].present) { 974 if (pt[unit].present) {
975 class_simple_device_add(pt_class, MKDEV(major, unit), 975 class_device_create(pt_class, MKDEV(major, unit),
976 NULL, "pt%d", unit); 976 NULL, "pt%d", unit);
977 err = devfs_mk_cdev(MKDEV(major, unit), 977 err = devfs_mk_cdev(MKDEV(major, unit),
978 S_IFCHR | S_IRUSR | S_IWUSR, 978 S_IFCHR | S_IRUSR | S_IWUSR,
979 "pt/%d", unit); 979 "pt/%d", unit);
980 if (err) { 980 if (err) {
981 class_simple_device_remove(MKDEV(major, unit)); 981 class_device_destroy(pt_class, MKDEV(major, unit));
982 goto out_class; 982 goto out_class;
983 } 983 }
984 class_simple_device_add(pt_class, MKDEV(major, unit + 128), 984 class_device_create(pt_class, MKDEV(major, unit + 128),
985 NULL, "pt%dn", unit); 985 NULL, "pt%dn", unit);
986 err = devfs_mk_cdev(MKDEV(major, unit + 128), 986 err = devfs_mk_cdev(MKDEV(major, unit + 128),
987 S_IFCHR | S_IRUSR | S_IWUSR, 987 S_IFCHR | S_IRUSR | S_IWUSR,
988 "pt/%dn", unit); 988 "pt/%dn", unit);
989 if (err) { 989 if (err) {
990 class_simple_device_remove(MKDEV(major, unit + 128)); 990 class_device_destroy(pt_class, MKDEV(major, unit + 128));
991 goto out_class; 991 goto out_class;
992 } 992 }
993 } 993 }
994 goto out; 994 goto out;
995 995
996out_class: 996out_class:
997 class_simple_destroy(pt_class); 997 class_destroy(pt_class);
998out_chrdev: 998out_chrdev:
999 unregister_chrdev(major, "pt"); 999 unregister_chrdev(major, "pt");
1000out: 1000out:
@@ -1006,12 +1006,12 @@ static void __exit pt_exit(void)
1006 int unit; 1006 int unit;
1007 for (unit = 0; unit < PT_UNITS; unit++) 1007 for (unit = 0; unit < PT_UNITS; unit++)
1008 if (pt[unit].present) { 1008 if (pt[unit].present) {
1009 class_simple_device_remove(MKDEV(major, unit)); 1009 class_device_destroy(pt_class, MKDEV(major, unit));
1010 devfs_remove("pt/%d", unit); 1010 devfs_remove("pt/%d", unit);
1011 class_simple_device_remove(MKDEV(major, unit + 128)); 1011 class_device_destroy(pt_class, MKDEV(major, unit + 128));
1012 devfs_remove("pt/%dn", unit); 1012 devfs_remove("pt/%dn", unit);
1013 } 1013 }
1014 class_simple_destroy(pt_class); 1014 class_destroy(pt_class);
1015 devfs_remove("pt"); 1015 devfs_remove("pt");
1016 unregister_chrdev(major, name); 1016 unregister_chrdev(major, name);
1017 for (unit = 0; unit < PT_UNITS; unit++) 1017 for (unit = 0; unit < PT_UNITS; unit++)
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 19c5e59bcfa8..685f061e69b2 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -430,7 +430,7 @@ static void ub_cmdtr_sense(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
430 } 430 }
431} 431}
432 432
433static ssize_t ub_diag_show(struct device *dev, char *page) 433static ssize_t ub_diag_show(struct device *dev, struct device_attribute *attr, char *page)
434{ 434{
435 struct usb_interface *intf; 435 struct usb_interface *intf;
436 struct ub_dev *sc; 436 struct ub_dev *sc;