aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sh/intc/userimask.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/sh/intc/userimask.c
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'drivers/sh/intc/userimask.c')
-rw-r--r--drivers/sh/intc/userimask.c17
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
20static void __iomem *uimask; 19static void __iomem *uimask;
21 20
22static ssize_t 21static ssize_t
23show_intc_userimask(struct device *dev, 22show_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
29static ssize_t 28static ssize_t
30store_intc_userimask(struct device *dev, 29store_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
58static DEVICE_ATTR(userimask, S_IRUSR | S_IWUSR, 57static 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
62static int __init userimask_sysdev_init(void) 61static 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}
69late_initcall(userimask_sysdev_init); 68late_initcall(userimask_sysdev_init);
70 69