aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
authorgregkh@suse.de <gregkh@suse.de>2005-03-23 12:53:36 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:08 -0400
commit7e25ab9155aef04e83da69545742cf65c9b801ce (patch)
tree0bed979a54852dda1459d60ba680a02a912955c4 /drivers/ieee1394
parentca8eca6884861c1ce294b05aacfdf9045bba9aff (diff)
[PATCH] class: convert drivers/ieee1394/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r--drivers/ieee1394/dv1394.c6
-rw-r--r--drivers/ieee1394/ieee1394_core.c8
-rw-r--r--drivers/ieee1394/ieee1394_core.h3
-rw-r--r--drivers/ieee1394/raw1394.c10
-rw-r--r--drivers/ieee1394/video1394.c4
5 files changed, 16 insertions, 15 deletions
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
index 68c7a5f0784..4538b0235ca 100644
--- a/drivers/ieee1394/dv1394.c
+++ b/drivers/ieee1394/dv1394.c
@@ -2343,8 +2343,8 @@ static void dv1394_remove_host (struct hpsb_host *host)
2343 dv1394_un_init(video); 2343 dv1394_un_init(video);
2344 } while (video != NULL); 2344 } while (video != NULL);
2345 2345
2346 class_simple_device_remove(MKDEV( 2346 class_device_destroy(hpsb_protocol_class,
2347 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); 2347 MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)));
2348 devfs_remove("ieee1394/dv/host%d/NTSC", id); 2348 devfs_remove("ieee1394/dv/host%d/NTSC", id);
2349 devfs_remove("ieee1394/dv/host%d/PAL", id); 2349 devfs_remove("ieee1394/dv/host%d/PAL", id);
2350 devfs_remove("ieee1394/dv/host%d", id); 2350 devfs_remove("ieee1394/dv/host%d", id);
@@ -2361,7 +2361,7 @@ static void dv1394_add_host (struct hpsb_host *host)
2361 2361
2362 ohci = (struct ti_ohci *)host->hostdata; 2362 ohci = (struct ti_ohci *)host->hostdata;
2363 2363
2364 class_simple_device_add(hpsb_protocol_class, MKDEV( 2364 class_device_create(hpsb_protocol_class, MKDEV(
2365 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), 2365 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)),
2366 NULL, "dv1394-%d", id); 2366 NULL, "dv1394-%d", id);
2367 devfs_mk_dir("ieee1394/dv/host%d", id); 2367 devfs_mk_dir("ieee1394/dv/host%d", id);
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c
index a294e45c77c..2d9a9b74e68 100644
--- a/drivers/ieee1394/ieee1394_core.c
+++ b/drivers/ieee1394/ieee1394_core.c
@@ -67,7 +67,7 @@ MODULE_LICENSE("GPL");
67 67
68/* Some globals used */ 68/* Some globals used */
69const char *hpsb_speedto_str[] = { "S100", "S200", "S400", "S800", "S1600", "S3200" }; 69const char *hpsb_speedto_str[] = { "S100", "S200", "S400", "S800", "S1600", "S3200" };
70struct class_simple *hpsb_protocol_class; 70struct class *hpsb_protocol_class;
71 71
72#ifdef CONFIG_IEEE1394_VERBOSEDEBUG 72#ifdef CONFIG_IEEE1394_VERBOSEDEBUG
73static void dump_packet(const char *text, quadlet_t *data, int size) 73static void dump_packet(const char *text, quadlet_t *data, int size)
@@ -1121,7 +1121,7 @@ static int __init ieee1394_init(void)
1121 if (ret < 0) 1121 if (ret < 0)
1122 goto release_all_bus; 1122 goto release_all_bus;
1123 1123
1124 hpsb_protocol_class = class_simple_create(THIS_MODULE, "ieee1394_protocol"); 1124 hpsb_protocol_class = class_create(THIS_MODULE, "ieee1394_protocol");
1125 if (IS_ERR(hpsb_protocol_class)) { 1125 if (IS_ERR(hpsb_protocol_class)) {
1126 ret = PTR_ERR(hpsb_protocol_class); 1126 ret = PTR_ERR(hpsb_protocol_class);
1127 goto release_class_host; 1127 goto release_class_host;
@@ -1159,7 +1159,7 @@ static int __init ieee1394_init(void)
1159cleanup_csr: 1159cleanup_csr:
1160 cleanup_csr(); 1160 cleanup_csr();
1161release_class_protocol: 1161release_class_protocol:
1162 class_simple_destroy(hpsb_protocol_class); 1162 class_destroy(hpsb_protocol_class);
1163release_class_host: 1163release_class_host:
1164 class_unregister(&hpsb_host_class); 1164 class_unregister(&hpsb_host_class);
1165release_all_bus: 1165release_all_bus:
@@ -1189,7 +1189,7 @@ static void __exit ieee1394_cleanup(void)
1189 1189
1190 cleanup_csr(); 1190 cleanup_csr();
1191 1191
1192 class_simple_destroy(hpsb_protocol_class); 1192 class_destroy(hpsb_protocol_class);
1193 class_unregister(&hpsb_host_class); 1193 class_unregister(&hpsb_host_class);
1194 for (i = 0; fw_bus_attrs[i]; i++) 1194 for (i = 0; fw_bus_attrs[i]; i++)
1195 bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); 1195 bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]);
diff --git a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h
index c4b4408e2e0..73bd8efd2b6 100644
--- a/drivers/ieee1394/ieee1394_core.h
+++ b/drivers/ieee1394/ieee1394_core.h
@@ -223,6 +223,7 @@ extern int hpsb_disable_irm;
223/* Our sysfs bus entry */ 223/* Our sysfs bus entry */
224extern struct bus_type ieee1394_bus_type; 224extern struct bus_type ieee1394_bus_type;
225extern struct class hpsb_host_class; 225extern struct class hpsb_host_class;
226extern struct class_simple *hpsb_protocol_class; 226extern struct class *hpsb_protocol_class;
227 227
228#endif /* _IEEE1394_CORE_H */ 228#endif /* _IEEE1394_CORE_H */
229
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index 6a08a8982ea..7419af450bd 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -2901,7 +2901,7 @@ static int __init init_raw1394(void)
2901 2901
2902 hpsb_register_highlevel(&raw1394_highlevel); 2902 hpsb_register_highlevel(&raw1394_highlevel);
2903 2903
2904 if (IS_ERR(class_simple_device_add(hpsb_protocol_class, MKDEV( 2904 if (IS_ERR(class_device_create(hpsb_protocol_class, MKDEV(
2905 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), 2905 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16),
2906 NULL, RAW1394_DEVICE_NAME))) { 2906 NULL, RAW1394_DEVICE_NAME))) {
2907 ret = -EFAULT; 2907 ret = -EFAULT;
@@ -2934,8 +2934,8 @@ static int __init init_raw1394(void)
2934 2934
2935out_dev: 2935out_dev:
2936 devfs_remove(RAW1394_DEVICE_NAME); 2936 devfs_remove(RAW1394_DEVICE_NAME);
2937 class_simple_device_remove(MKDEV( 2937 class_device_destroy(hpsb_protocol_class,
2938 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); 2938 MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16));
2939out_unreg: 2939out_unreg:
2940 hpsb_unregister_highlevel(&raw1394_highlevel); 2940 hpsb_unregister_highlevel(&raw1394_highlevel);
2941out: 2941out:
@@ -2944,8 +2944,8 @@ out:
2944 2944
2945static void __exit cleanup_raw1394(void) 2945static void __exit cleanup_raw1394(void)
2946{ 2946{
2947 class_simple_device_remove(MKDEV( 2947 class_device_destroy(hpsb_protocol_class,
2948 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); 2948 MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16));
2949 cdev_del(&raw1394_cdev); 2949 cdev_del(&raw1394_cdev);
2950 devfs_remove(RAW1394_DEVICE_NAME); 2950 devfs_remove(RAW1394_DEVICE_NAME);
2951 hpsb_unregister_highlevel(&raw1394_highlevel); 2951 hpsb_unregister_highlevel(&raw1394_highlevel);
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
index d68c4658f2f..06759b36afe 100644
--- a/drivers/ieee1394/video1394.c
+++ b/drivers/ieee1394/video1394.c
@@ -1370,7 +1370,7 @@ static void video1394_add_host (struct hpsb_host *host)
1370 hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id); 1370 hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id);
1371 1371
1372 minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id; 1372 minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id;
1373 class_simple_device_add(hpsb_protocol_class, MKDEV( 1373 class_device_create(hpsb_protocol_class, MKDEV(
1374 IEEE1394_MAJOR, minor), 1374 IEEE1394_MAJOR, minor),
1375 NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); 1375 NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
1376 devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), 1376 devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor),
@@ -1384,7 +1384,7 @@ static void video1394_remove_host (struct hpsb_host *host)
1384 struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); 1384 struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host);
1385 1385
1386 if (ohci) { 1386 if (ohci) {
1387 class_simple_device_remove(MKDEV(IEEE1394_MAJOR, 1387 class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR,
1388 IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); 1388 IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id));
1389 devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); 1389 devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
1390 } 1390 }