diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/sh/intc/userimask.c | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'drivers/sh/intc/userimask.c')
-rw-r--r-- | drivers/sh/intc/userimask.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/sh/intc/userimask.c b/drivers/sh/intc/userimask.c index e649ceaaa41..e32304b66cf 100644 --- a/drivers/sh/intc/userimask.c +++ b/drivers/sh/intc/userimask.c | |||
@@ -10,25 +10,24 @@ | |||
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/device.h> | 13 | #include <linux/sysdev.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> | ||
17 | #include <asm/sizes.h> | 16 | #include <asm/sizes.h> |
18 | #include "internals.h" | 17 | #include "internals.h" |
19 | 18 | ||
20 | static void __iomem *uimask; | 19 | static void __iomem *uimask; |
21 | 20 | ||
22 | static ssize_t | 21 | static ssize_t |
23 | show_intc_userimask(struct device *dev, | 22 | show_intc_userimask(struct sysdev_class *cls, |
24 | struct device_attribute *attr, char *buf) | 23 | struct sysdev_class_attribute *attr, char *buf) |
25 | { | 24 | { |
26 | return sprintf(buf, "%d\n", (__raw_readl(uimask) >> 4) & 0xf); | 25 | return sprintf(buf, "%d\n", (__raw_readl(uimask) >> 4) & 0xf); |
27 | } | 26 | } |
28 | 27 | ||
29 | static ssize_t | 28 | static ssize_t |
30 | store_intc_userimask(struct device *dev, | 29 | store_intc_userimask(struct sysdev_class *cls, |
31 | struct device_attribute *attr, | 30 | struct sysdev_class_attribute *attr, |
32 | const char *buf, size_t count) | 31 | const char *buf, size_t count) |
33 | { | 32 | { |
34 | unsigned long level; | 33 | unsigned long level; |
@@ -55,8 +54,8 @@ store_intc_userimask(struct device *dev, | |||
55 | return count; | 54 | return count; |
56 | } | 55 | } |
57 | 56 | ||
58 | static DEVICE_ATTR(userimask, S_IRUSR | S_IWUSR, | 57 | static SYSDEV_CLASS_ATTR(userimask, S_IRUSR | S_IWUSR, |
59 | show_intc_userimask, store_intc_userimask); | 58 | show_intc_userimask, store_intc_userimask); |
60 | 59 | ||
61 | 60 | ||
62 | static int __init userimask_sysdev_init(void) | 61 | static int __init userimask_sysdev_init(void) |
@@ -64,7 +63,7 @@ static int __init userimask_sysdev_init(void) | |||
64 | if (unlikely(!uimask)) | 63 | if (unlikely(!uimask)) |
65 | return -ENXIO; | 64 | return -ENXIO; |
66 | 65 | ||
67 | return device_create_file(intc_subsys.dev_root, &dev_attr_userimask); | 66 | return sysdev_class_create_file(&intc_sysdev_class, &attr_userimask); |
68 | } | 67 | } |
69 | late_initcall(userimask_sysdev_init); | 68 | late_initcall(userimask_sysdev_init); |
70 | 69 | ||