Commit 7e25ab91 authored by gregkh@suse.de's avatar gregkh@suse.de Committed by Greg Kroah-Hartman

[PATCH] class: convert drivers/ieee1394/* to use the new class api instead of class_simple

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ca8eca68
...@@ -2343,8 +2343,8 @@ static void dv1394_remove_host (struct hpsb_host *host) ...@@ -2343,8 +2343,8 @@ static void dv1394_remove_host (struct hpsb_host *host)
dv1394_un_init(video); dv1394_un_init(video);
} while (video != NULL); } while (video != NULL);
class_simple_device_remove(MKDEV( class_device_destroy(hpsb_protocol_class,
IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)));
devfs_remove("ieee1394/dv/host%d/NTSC", id); devfs_remove("ieee1394/dv/host%d/NTSC", id);
devfs_remove("ieee1394/dv/host%d/PAL", id); devfs_remove("ieee1394/dv/host%d/PAL", id);
devfs_remove("ieee1394/dv/host%d", id); devfs_remove("ieee1394/dv/host%d", id);
...@@ -2361,7 +2361,7 @@ static void dv1394_add_host (struct hpsb_host *host) ...@@ -2361,7 +2361,7 @@ static void dv1394_add_host (struct hpsb_host *host)
ohci = (struct ti_ohci *)host->hostdata; ohci = (struct ti_ohci *)host->hostdata;
class_simple_device_add(hpsb_protocol_class, MKDEV( class_device_create(hpsb_protocol_class, MKDEV(
IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)),
NULL, "dv1394-%d", id); NULL, "dv1394-%d", id);
devfs_mk_dir("ieee1394/dv/host%d", id); devfs_mk_dir("ieee1394/dv/host%d", id);
......
...@@ -67,7 +67,7 @@ MODULE_LICENSE("GPL"); ...@@ -67,7 +67,7 @@ MODULE_LICENSE("GPL");
/* Some globals used */ /* Some globals used */
const char *hpsb_speedto_str[] = { "S100", "S200", "S400", "S800", "S1600", "S3200" }; const char *hpsb_speedto_str[] = { "S100", "S200", "S400", "S800", "S1600", "S3200" };
struct class_simple *hpsb_protocol_class; struct class *hpsb_protocol_class;
#ifdef CONFIG_IEEE1394_VERBOSEDEBUG #ifdef CONFIG_IEEE1394_VERBOSEDEBUG
static void dump_packet(const char *text, quadlet_t *data, int size) static void dump_packet(const char *text, quadlet_t *data, int size)
...@@ -1121,7 +1121,7 @@ static int __init ieee1394_init(void) ...@@ -1121,7 +1121,7 @@ static int __init ieee1394_init(void)
if (ret < 0) if (ret < 0)
goto release_all_bus; goto release_all_bus;
hpsb_protocol_class = class_simple_create(THIS_MODULE, "ieee1394_protocol"); hpsb_protocol_class = class_create(THIS_MODULE, "ieee1394_protocol");
if (IS_ERR(hpsb_protocol_class)) { if (IS_ERR(hpsb_protocol_class)) {
ret = PTR_ERR(hpsb_protocol_class); ret = PTR_ERR(hpsb_protocol_class);
goto release_class_host; goto release_class_host;
...@@ -1159,7 +1159,7 @@ static int __init ieee1394_init(void) ...@@ -1159,7 +1159,7 @@ static int __init ieee1394_init(void)
cleanup_csr: cleanup_csr:
cleanup_csr(); cleanup_csr();
release_class_protocol: release_class_protocol:
class_simple_destroy(hpsb_protocol_class); class_destroy(hpsb_protocol_class);
release_class_host: release_class_host:
class_unregister(&hpsb_host_class); class_unregister(&hpsb_host_class);
release_all_bus: release_all_bus:
...@@ -1189,7 +1189,7 @@ static void __exit ieee1394_cleanup(void) ...@@ -1189,7 +1189,7 @@ static void __exit ieee1394_cleanup(void)
cleanup_csr(); cleanup_csr();
class_simple_destroy(hpsb_protocol_class); class_destroy(hpsb_protocol_class);
class_unregister(&hpsb_host_class); class_unregister(&hpsb_host_class);
for (i = 0; fw_bus_attrs[i]; i++) for (i = 0; fw_bus_attrs[i]; i++)
bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]);
......
...@@ -223,6 +223,7 @@ extern int hpsb_disable_irm; ...@@ -223,6 +223,7 @@ extern int hpsb_disable_irm;
/* Our sysfs bus entry */ /* Our sysfs bus entry */
extern struct bus_type ieee1394_bus_type; extern struct bus_type ieee1394_bus_type;
extern struct class hpsb_host_class; extern struct class hpsb_host_class;
extern struct class_simple *hpsb_protocol_class; extern struct class *hpsb_protocol_class;
#endif /* _IEEE1394_CORE_H */ #endif /* _IEEE1394_CORE_H */
...@@ -2901,7 +2901,7 @@ static int __init init_raw1394(void) ...@@ -2901,7 +2901,7 @@ static int __init init_raw1394(void)
hpsb_register_highlevel(&raw1394_highlevel); hpsb_register_highlevel(&raw1394_highlevel);
if (IS_ERR(class_simple_device_add(hpsb_protocol_class, MKDEV( if (IS_ERR(class_device_create(hpsb_protocol_class, MKDEV(
IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16),
NULL, RAW1394_DEVICE_NAME))) { NULL, RAW1394_DEVICE_NAME))) {
ret = -EFAULT; ret = -EFAULT;
...@@ -2934,8 +2934,8 @@ static int __init init_raw1394(void) ...@@ -2934,8 +2934,8 @@ static int __init init_raw1394(void)
out_dev: out_dev:
devfs_remove(RAW1394_DEVICE_NAME); devfs_remove(RAW1394_DEVICE_NAME);
class_simple_device_remove(MKDEV( class_device_destroy(hpsb_protocol_class,
IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16));
out_unreg: out_unreg:
hpsb_unregister_highlevel(&raw1394_highlevel); hpsb_unregister_highlevel(&raw1394_highlevel);
out: out:
...@@ -2944,8 +2944,8 @@ out: ...@@ -2944,8 +2944,8 @@ out:
static void __exit cleanup_raw1394(void) static void __exit cleanup_raw1394(void)
{ {
class_simple_device_remove(MKDEV( class_device_destroy(hpsb_protocol_class,
IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16));
cdev_del(&raw1394_cdev); cdev_del(&raw1394_cdev);
devfs_remove(RAW1394_DEVICE_NAME); devfs_remove(RAW1394_DEVICE_NAME);
hpsb_unregister_highlevel(&raw1394_highlevel); hpsb_unregister_highlevel(&raw1394_highlevel);
......
...@@ -1370,7 +1370,7 @@ static void video1394_add_host (struct hpsb_host *host) ...@@ -1370,7 +1370,7 @@ static void video1394_add_host (struct hpsb_host *host)
hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id); hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id);
minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id; minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id;
class_simple_device_add(hpsb_protocol_class, MKDEV( class_device_create(hpsb_protocol_class, MKDEV(
IEEE1394_MAJOR, minor), IEEE1394_MAJOR, minor),
NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor),
...@@ -1384,7 +1384,7 @@ static void video1394_remove_host (struct hpsb_host *host) ...@@ -1384,7 +1384,7 @@ static void video1394_remove_host (struct hpsb_host *host)
struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host);
if (ohci) { if (ohci) {
class_simple_device_remove(MKDEV(IEEE1394_MAJOR, class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR,
IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id));
devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
} }
......
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