aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r--arch/sh/kernel/cpu/sh4/sq.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c
index f0907995b4c9..a8140f0bbf6c 100644
--- a/arch/sh/kernel/cpu/sh4/sq.c
+++ b/arch/sh/kernel/cpu/sh4/sq.c
@@ -13,7 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/cpu.h> 14#include <linux/cpu.h>
15#include <linux/bitmap.h> 15#include <linux/bitmap.h>
16#include <linux/sysdev.h> 16#include <linux/device.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
@@ -337,9 +337,9 @@ static struct kobj_type ktype_percpu_entry = {
337 .default_attrs = sq_sysfs_attrs, 337 .default_attrs = sq_sysfs_attrs,
338}; 338};
339 339
340static int __devinit sq_sysdev_add(struct sys_device *sysdev) 340static int __devinit sq_dev_add(struct device *dev)
341{ 341{
342 unsigned int cpu = sysdev->id; 342 unsigned int cpu = dev->id;
343 struct kobject *kobj; 343 struct kobject *kobj;
344 int error; 344 int error;
345 345
@@ -348,25 +348,27 @@ static int __devinit sq_sysdev_add(struct sys_device *sysdev)
348 return -ENOMEM; 348 return -ENOMEM;
349 349
350 kobj = sq_kobject[cpu]; 350 kobj = sq_kobject[cpu];
351 error = kobject_init_and_add(kobj, &ktype_percpu_entry, &sysdev->kobj, 351 error = kobject_init_and_add(kobj, &ktype_percpu_entry, &dev->kobj,
352 "%s", "sq"); 352 "%s", "sq");
353 if (!error) 353 if (!error)
354 kobject_uevent(kobj, KOBJ_ADD); 354 kobject_uevent(kobj, KOBJ_ADD);
355 return error; 355 return error;
356} 356}
357 357
358static int __devexit sq_sysdev_remove(struct sys_device *sysdev) 358static int __devexit sq_dev_remove(struct device *dev)
359{ 359{
360 unsigned int cpu = sysdev->id; 360 unsigned int cpu = dev->id;
361 struct kobject *kobj = sq_kobject[cpu]; 361 struct kobject *kobj = sq_kobject[cpu];
362 362
363 kobject_put(kobj); 363 kobject_put(kobj);
364 return 0; 364 return 0;
365} 365}
366 366
367static struct sysdev_driver sq_sysdev_driver = { 367static struct subsys_interface sq_interface = {
368 .add = sq_sysdev_add, 368 .name = "sq"
369 .remove = __devexit_p(sq_sysdev_remove), 369 .subsys = &cpu_subsys,
370 .add_dev = sq_dev_add,
371 .remove_dev = __devexit_p(sq_dev_remove),
370}; 372};
371 373
372static int __init sq_api_init(void) 374static int __init sq_api_init(void)
@@ -386,7 +388,7 @@ static int __init sq_api_init(void)
386 if (unlikely(!sq_bitmap)) 388 if (unlikely(!sq_bitmap))
387 goto out; 389 goto out;
388 390
389 ret = sysdev_driver_register(&cpu_sysdev_class, &sq_sysdev_driver); 391 ret = subsys_interface_register(&sq_interface);
390 if (unlikely(ret != 0)) 392 if (unlikely(ret != 0))
391 goto out; 393 goto out;
392 394
@@ -401,7 +403,7 @@ out:
401 403
402static void __exit sq_api_exit(void) 404static void __exit sq_api_exit(void)
403{ 405{
404 sysdev_driver_unregister(&cpu_sysdev_class, &sq_sysdev_driver); 406 subsys_interface_unregister(&sq_interface);
405 kfree(sq_bitmap); 407 kfree(sq_bitmap);
406 kmem_cache_destroy(sq_cache); 408 kmem_cache_destroy(sq_cache);
407} 409}