summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/adb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh/adb.c')
-rw-r--r--drivers/macintosh/adb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 057b0221f6..b0407c5fad 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -74,7 +74,9 @@ static struct adb_driver *adb_driver_list[] = {
NULL
};
-static struct class *adb_dev_class;
+static const struct class adb_dev_class = {
+ .name = "adb",
+};
static struct adb_driver *adb_controller;
BLOCKING_NOTIFIER_HEAD(adb_client_list);
@@ -888,10 +890,10 @@ adbdev_init(void)
return;
}
- adb_dev_class = class_create("adb");
- if (IS_ERR(adb_dev_class))
+ if (class_register(&adb_dev_class))
return;
- device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");
+
+ device_create(&adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");
platform_device_register(&adb_pfdev);
platform_driver_probe(&adb_pfdrv, adb_dummy_probe);