diff options
Diffstat (limited to 'drivers/sh/intc/core.c')
-rw-r--r-- | drivers/sh/intc/core.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c index 8b7a141ff35e..e85512dd9c72 100644 --- a/drivers/sh/intc/core.c +++ b/drivers/sh/intc/core.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/stat.h> | 25 | #include <linux/stat.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/sh_intc.h> | 27 | #include <linux/sh_intc.h> |
28 | #include <linux/sysdev.h> | 28 | #include <linux/device.h> |
29 | #include <linux/syscore_ops.h> | 29 | #include <linux/syscore_ops.h> |
30 | #include <linux/list.h> | 30 | #include <linux/list.h> |
31 | #include <linux/spinlock.h> | 31 | #include <linux/spinlock.h> |
@@ -434,46 +434,47 @@ struct syscore_ops intc_syscore_ops = { | |||
434 | .resume = intc_resume, | 434 | .resume = intc_resume, |
435 | }; | 435 | }; |
436 | 436 | ||
437 | struct sysdev_class intc_sysdev_class = { | 437 | struct bus_type intc_subsys = { |
438 | .name = "intc", | 438 | .name = "intc", |
439 | .dev_name = "intc", | ||
439 | }; | 440 | }; |
440 | 441 | ||
441 | static ssize_t | 442 | static ssize_t |
442 | show_intc_name(struct sys_device *dev, struct sysdev_attribute *attr, char *buf) | 443 | show_intc_name(struct device *dev, struct device_attribute *attr, char *buf) |
443 | { | 444 | { |
444 | struct intc_desc_int *d; | 445 | struct intc_desc_int *d; |
445 | 446 | ||
446 | d = container_of(dev, struct intc_desc_int, sysdev); | 447 | d = container_of(dev, struct intc_desc_int, dev); |
447 | 448 | ||
448 | return sprintf(buf, "%s\n", d->chip.name); | 449 | return sprintf(buf, "%s\n", d->chip.name); |
449 | } | 450 | } |
450 | 451 | ||
451 | static SYSDEV_ATTR(name, S_IRUGO, show_intc_name, NULL); | 452 | static DEVICE_ATTR(name, S_IRUGO, show_intc_name, NULL); |
452 | 453 | ||
453 | static int __init register_intc_sysdevs(void) | 454 | static int __init register_intc_devs(void) |
454 | { | 455 | { |
455 | struct intc_desc_int *d; | 456 | struct intc_desc_int *d; |
456 | int error; | 457 | int error; |
457 | 458 | ||
458 | register_syscore_ops(&intc_syscore_ops); | 459 | register_syscore_ops(&intc_syscore_ops); |
459 | 460 | ||
460 | error = sysdev_class_register(&intc_sysdev_class); | 461 | error = subsys_system_register(&intc_subsys, NULL); |
461 | if (!error) { | 462 | if (!error) { |
462 | list_for_each_entry(d, &intc_list, list) { | 463 | list_for_each_entry(d, &intc_list, list) { |
463 | d->sysdev.id = d->index; | 464 | d->dev.id = d->index; |
464 | d->sysdev.cls = &intc_sysdev_class; | 465 | d->dev.bus = &intc_subsys; |
465 | error = sysdev_register(&d->sysdev); | 466 | error = device_register(&d->dev); |
466 | if (error == 0) | 467 | if (error == 0) |
467 | error = sysdev_create_file(&d->sysdev, | 468 | error = device_create_file(&d->dev, |
468 | &attr_name); | 469 | &dev_attr_name); |
469 | if (error) | 470 | if (error) |
470 | break; | 471 | break; |
471 | } | 472 | } |
472 | } | 473 | } |
473 | 474 | ||
474 | if (error) | 475 | if (error) |
475 | pr_err("sysdev registration error\n"); | 476 | pr_err("device registration error\n"); |
476 | 477 | ||
477 | return error; | 478 | return error; |
478 | } | 479 | } |
479 | device_initcall(register_intc_sysdevs); | 480 | device_initcall(register_intc_devs); |