aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sh
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2012-01-06 14:42:52 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-06 14:42:52 -0500
commitff4b8a57f0aaa2882d444ca44b2b9b333d22a4df (patch)
treed851c923f85566572112d4c0f884cff388a3cc05 /drivers/sh
parent805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff)
parentea04018e6bc5ddb2f0466c0e5b986bd4901b7e8e (diff)
Merge branch 'driver-core-next' into Linux 3.2
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file, and it fixes the build error in the arch/x86/kernel/microcode_core.c file, that the merge did not catch. The microcode_core.c patch was provided by Stephen Rothwell <sfr@canb.auug.org.au> who was invaluable in the merge issues involved with the large sysdev removal process in the driver-core tree. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/sh')
-rw-r--r--drivers/sh/intc/core.c29
-rw-r--r--drivers/sh/intc/internals.h6
-rw-r--r--drivers/sh/intc/userimask.c16
3 files changed, 26 insertions, 25 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
437struct sysdev_class intc_sysdev_class = { 437struct bus_type intc_subsys = {
438 .name = "intc", 438 .name = "intc",
439 .dev_name = "intc",
439}; 440};
440 441
441static ssize_t 442static ssize_t
442show_intc_name(struct sys_device *dev, struct sysdev_attribute *attr, char *buf) 443show_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
451static SYSDEV_ATTR(name, S_IRUGO, show_intc_name, NULL); 452static DEVICE_ATTR(name, S_IRUGO, show_intc_name, NULL);
452 453
453static int __init register_intc_sysdevs(void) 454static 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}
479device_initcall(register_intc_sysdevs); 480device_initcall(register_intc_devs);
diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index 5b934851efa8..1c2722e5af3f 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -4,7 +4,7 @@
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <linux/types.h> 5#include <linux/types.h>
6#include <linux/radix-tree.h> 6#include <linux/radix-tree.h>
7#include <linux/sysdev.h> 7#include <linux/device.h>
8 8
9#define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \ 9#define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \
10 ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \ 10 ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \
@@ -51,7 +51,7 @@ struct intc_subgroup_entry {
51 51
52struct intc_desc_int { 52struct intc_desc_int {
53 struct list_head list; 53 struct list_head list;
54 struct sys_device sysdev; 54 struct device dev;
55 struct radix_tree_root tree; 55 struct radix_tree_root tree;
56 raw_spinlock_t lock; 56 raw_spinlock_t lock;
57 unsigned int index; 57 unsigned int index;
@@ -157,7 +157,7 @@ void _intc_enable(struct irq_data *data, unsigned long handle);
157extern struct list_head intc_list; 157extern struct list_head intc_list;
158extern raw_spinlock_t intc_big_lock; 158extern raw_spinlock_t intc_big_lock;
159extern unsigned int nr_intc_controllers; 159extern unsigned int nr_intc_controllers;
160extern struct sysdev_class intc_sysdev_class; 160extern struct bus_type intc_subsys;
161 161
162unsigned int intc_get_dfl_prio_level(void); 162unsigned int intc_get_dfl_prio_level(void);
163unsigned int intc_get_prio_level(unsigned int irq); 163unsigned int intc_get_prio_level(unsigned int irq);
diff --git a/drivers/sh/intc/userimask.c b/drivers/sh/intc/userimask.c
index 56bf9336b92b..e649ceaaa410 100644
--- a/drivers/sh/intc/userimask.c
+++ b/drivers/sh/intc/userimask.c
@@ -10,7 +10,7 @@
10#define pr_fmt(fmt) "intc: " fmt 10#define pr_fmt(fmt) "intc: " fmt
11 11
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/sysdev.h> 13#include <linux/device.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/stat.h> 16#include <linux/stat.h>
@@ -20,15 +20,15 @@
20static void __iomem *uimask; 20static void __iomem *uimask;
21 21
22static ssize_t 22static ssize_t
23show_intc_userimask(struct sysdev_class *cls, 23show_intc_userimask(struct device *dev,
24 struct sysdev_class_attribute *attr, char *buf) 24 struct device_attribute *attr, char *buf)
25{ 25{
26 return sprintf(buf, "%d\n", (__raw_readl(uimask) >> 4) & 0xf); 26 return sprintf(buf, "%d\n", (__raw_readl(uimask) >> 4) & 0xf);
27} 27}
28 28
29static ssize_t 29static ssize_t
30store_intc_userimask(struct sysdev_class *cls, 30store_intc_userimask(struct device *dev,
31 struct sysdev_class_attribute *attr, 31 struct device_attribute *attr,
32 const char *buf, size_t count) 32 const char *buf, size_t count)
33{ 33{
34 unsigned long level; 34 unsigned long level;
@@ -55,8 +55,8 @@ store_intc_userimask(struct sysdev_class *cls,
55 return count; 55 return count;
56} 56}
57 57
58static SYSDEV_CLASS_ATTR(userimask, S_IRUSR | S_IWUSR, 58static DEVICE_ATTR(userimask, S_IRUSR | S_IWUSR,
59 show_intc_userimask, store_intc_userimask); 59 show_intc_userimask, store_intc_userimask);
60 60
61 61
62static int __init userimask_sysdev_init(void) 62static int __init userimask_sysdev_init(void)
@@ -64,7 +64,7 @@ static int __init userimask_sysdev_init(void)
64 if (unlikely(!uimask)) 64 if (unlikely(!uimask))
65 return -ENXIO; 65 return -ENXIO;
66 66
67 return sysdev_class_create_file(&intc_sysdev_class, &attr_userimask); 67 return device_create_file(intc_subsys.dev_root, &dev_attr_userimask);
68} 68}
69late_initcall(userimask_sysdev_init); 69late_initcall(userimask_sysdev_init);
70 70